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.
The CAPE version of cuckoosandbox/cuckoo#3199
This sample https://www.virustotal.com/gui/file/a076938fa168d283115525aebeb972f8eba151566a82e06503c23e0d95c4dffa when run on Win7x64 calls out to http[://]208[.]67[.]105[.]179/damianozx[.]exe on port 8080.
The
tcpdata
for this network call (https://github.com/kevoreilly/CAPEv2/blob/master/modules/processing/network.py#L515) looks like this:As you can see, the host is found within the "URI" portion of "GET " where the "URI" is supposed to be just the path, in this case "/damianozx[.]exe". When these components get put together using
urlunparse
(https://github.com/kevoreilly/CAPEv2/blob/master/modules/processing/network.py#L545), the resulting URL looks like this http[://]208[.]67[.]105[.]179[:[8080/http[://]208[.]67[.]105[.]179/damianozx[.]exe which is obviously incorrect.We need to pop the host out of the path if it is in there. The
elif
is for when a non-80 port is used.