Block Api ROR13 IV randomization#21306
Conversation
|
I will put it in draft for now, there is more stuff to do on this |
…api randomization
942db86 to
340a724
Compare
|
i'm unsure in what is the problem with CI, updating the cache size i am getting this that looks wrong: |
smcintyre-r7
left a comment
There was a problem hiding this comment.
We should be able to remove all the instances where you initialize the value by calling #block_api_iv.
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
Co-authored-by: Spencer McIntyre <58950994+smcintyre-r7@users.noreply.github.com>
The only missing is this one, will do asap |
smcintyre-r7
left a comment
There was a problem hiding this comment.
Tested 32-bit and 64-bit stagers both with and without PrependMigrate. Code all looks good, and the API with how opts is handled is optimized for the most common use case where the IV is entirely handled by the library, but allows the caller to control it if necessary.
I think we're ready to land this now.
Release NotesThis updates the Block API shellcode to use a random IV when calculating the ROR13 hash of methods which it calls. The result is the removal of a static piece of data that could have been previously signatured. |
This PR updates the usage of
Rex::Text.block_api_hashto take in account IV randomization.The way it works is simple, the
BlockApiandBlockApi_x64will generate, per-run, a random IV (32 bit value) and will patch on-the-fly theasm_block_apioutput and will pass the iv to theRex::Text.block_api_hashto have the updated hashThere also some other fix here and there and slight edge-cases covered, like handling how the migration stub generation works and also the
exitfunkhandling using a helper