Skip to content
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

Reflective Loader as payload #6

Open
Atsika opened this issue Aug 29, 2021 · 5 comments
Open

Reflective Loader as payload #6

Atsika opened this issue Aug 29, 2021 · 5 comments

Comments

@Atsika
Copy link

Atsika commented Aug 29, 2021

Hi,
Reflective loaders like Cobalt Strike's beacon or Metasploit's meterpreter don't callback home.
Beacon seems alive but not calling back home.
image
Also nothing on wireshark.
Do you have an idea of why ?
Thanks in advance

@hasherezade
Copy link
Owner

Hi, I see that the error was on referencing the token? I think the reason is the parameters that are passed to the newly created process are incomplete. Some of the components are not filled:

NTSTATUS status = RtlCreateProcessParametersEx(
&params,
(PUNICODE_STRING)&uTargetPath,
(PUNICODE_STRING)&uDllDir,
(PUNICODE_STRING)&uCurrentDir,
(PUNICODE_STRING)&uTargetPath,
environment,
(PUNICODE_STRING)&uWindowName,
nullptr,
nullptr,
nullptr,
RTL_USER_PROC_PARAMS_NORMALIZED
);

This is because the PoC is not finished, I added only those components that were essential for making the process run.
It will be fixed in the future, as mentioned here: #2

@Atsika
Copy link
Author

Atsika commented Aug 30, 2021

I understand now. How can I try to find missing parameters ?

@hasherezade
Copy link
Owner

The problem is, it is not that easy. By parameters I mean not just some particular values, but structures that have to be initialized in a proper way, and filled manually. It will require some research about how those parameters are set in the original process creation. And it is not documented, so it will take some digging. It is on my TODO, but I currently have some more urgent work.

@hasherezade
Copy link
Owner

For now what I can offer you is trying a similar method, which does not require it: transacted_hollowing. Please let me know if it works for you (it should).

@Atsika
Copy link
Author

Atsika commented Aug 30, 2021

Alright, I got you.
Since process is created using CreateProcessInternalW most of the process parameters and environment are set.
I'll give it a try.
Thanks for your help.

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

No branches or pull requests

2 participants