-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add a hex_double_quoted option to the echo cmdstager #3
Add a hex_double_quoted option to the echo cmdstager #3
Conversation
This appears to be needed for rapid7/metasploit-framework#7626 Also, might be nice to have in general, since it can help keep the stager size down.
Since @wvu-r7 is already involved in rapid7/metasploit-framework#7626, I'd love his help on figuring out how to test and land this thing (I haven't contributed an update to the rex libraries since the split). |
'hex' => "\\\\x", | ||
'octal' => "\\\\", | ||
'hex_quoted' => "\\x", | ||
'hex_single_quoted' => "\\x", |
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.
Is it necessary to have a duplicate?
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.
Oh, it's for enc_format
. Nvm.
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.
yep, zactly, https://github.com/todb-r7/rex-exploitation/blob/c00f523505fd7d91bf2a6bbb8bfb5f57d9d4575f/lib/rex/exploitation/cmdstager/echo.rb#L41 wants exact matches.
So looking at PR #2 and talking to @bcook-r7 , it looks like I'm not supposed to bump the version on my own; @msjenkins-r7 will do that. With that, order of operations here looks to be:
Seem right? (And it needn't be @wvu-r7 or @bcook-r7 -- anyone in @rapid7/metasploit-committers is welcome. :) ) |
'octal' => "\\\\" | ||
'hex' => "\\\\x", | ||
'octal' => "\\\\", | ||
'hex_quoted' => "\\x", |
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.
Maybe call this hex_double_quoted
?
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.
Sure why not
Yes @todb-r7 that's the right order of operations. |
This appears to be needed for rapid7/metasploit-framework#7626
Also, might be nice to have in general, since it can help keep the
stager size down.
This PR includes some updated spec's to exercise some of the functionality a little better, but of course, my spec writing is still quite innocent and child-like.