Skip to content

Change RDI so that the loader function can be specified by name or ordinal #9

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

Merged
merged 2 commits into from
Jun 23, 2020

Conversation

OJ
Copy link

@OJ OJ commented May 18, 2020

With the goal of removing more and more recognisable stuff from the DLLs, I've modified the code to allow the user to specify the name or ordinal of the ReflectiveLoader.

This means that:

  1. The loader can be exported via a DEF using a different name or ordinal
  2. The loader can still load that custom DLL
  3. We can remove all evidence of ReflectiveLoader from the DLL images we produce, and load functions based on ordinals

Clearly this breaks back compat, so it might need to be rolled into all the other things that we've done.

This relates to:

@OJ
Copy link
Author

OJ commented Jun 19, 2020 via email


// test if we are importing by name or by ordinal...
if ((((DWORD_PTR)cpReflectiveLoaderName) >> 16) == 0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on Slack @smcintyre-r7 @bcook-r7 👍 Thanks!

@smcintyre-r7
Copy link

I tested this with the corresponding metasploit-payloads PR. The payloads are loading and it looks like the functionality that this introduces is solid and working as intended. I'll have this merged momentarily before moving on to some more indepth testing on the payloads side of things. Thanks @OJ !

@smcintyre-r7 smcintyre-r7 merged commit 127cda3 into master Jun 23, 2020
@OJ
Copy link
Author

OJ commented Jun 23, 2020

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants