-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Port payload/windows/download_exec to x64 #20386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Port payload/windows/download_exec to x64 #20386
Conversation
for some reason when running it with c, it crashes during URLDownloadToFileA function call. |
add CachedSize & fix the fifth arg problem & run rubocop
@xHector1337 Were you able to resolve this issue? 👀 |
Thanks, I was. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks clean and correct, i'll give it a shot this week and if everything works i think we are good to go.
@xHector1337, can you please fix the linting issue?
rubocop -a modules/payloads/singles/windows/x64/download_exec.rb
Thanks!
Thank you, I'll be fixing it immediately. |
main: | ||
pop rbp | ||
call LoadLibrary | ||
db "urlmon.dllK" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for not just null-terminating inline?
db "urlmon.dll", 0
Then you don't have to do any XOR later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate null-bytes. That's the reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intent was avoiding null-bytes as much as possible.
end | ||
|
||
def generate(_opts = {}) | ||
url = datastore['URL'] || 'http://localhost/hi.exe' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to have a default? Surely a hard failure when not specified or not a valid URL would be better?
I have tried my best to port it from x86 to x64. It has some little problems that I can not see clearly.