-
Notifications
You must be signed in to change notification settings - Fork 14k
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
Remove hardcoded blockapi hashes and ASM Blockapi #19609
base: master
Are you sure you want to change the base?
Remove hardcoded blockapi hashes and ASM Blockapi #19609
Conversation
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.
Not able to do fixedgenerate
here
Re-Drafting as I need to work on some more hard-coded thing which I hoped I would be able to bypass. |
8e6bcb3
to
eb58072
Compare
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 think you missed:
push 0x56A2B5F0 ; hardcoded to exitprocess for size jmphost_loc = p.index("\x68\x3a\x56\x79\xa7\xff\xd5") + 8 # push 0xA779563A ; hash( "wininet.dll", "InternetOpenA" ) ; call ebp
Generally speaking in the future when you edit a line like the following, it would clean things up a bit to remove the comment since it's now redundant with the source code. I wouldn't bother going back and deleting all of these comments, but as you continue to make changes, and it's convenient, I'd drop them.
push #{Rex::Text.block_api_hash("kernel32.dll", "VirtualAllocEx")} ; hash( "kernel32.dll", "VirtualAllocEx" )
Also, would you mind making a list of modules that have had non-trivial changes that should be tested? Any module that was previously hard coding the block API should probably get a quick test to ensure that it's still working. Adding them as checklist items to the PR description would be great. I can get started going through those next week after the two I found that were missing updates are addressed as well.
Good catch with the |
So I re-wrote the |
This PR removes some old hardcoded block-api hashes and update some block api assembly block using the dedicated mixin.
Verification
generate_<payload>
function and checked for the hashes