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

Arguments not showing up when used via metasploit execute_dotnet_assembly #20

Open
Invoke-Mimikatz opened this issue Nov 18, 2020 · 1 comment
Labels
wontfix This will not be worked on

Comments

@Invoke-Mimikatz
Copy link

Hey there. Great tool! I was testing some generated dotnet binaries with metasploit's execute assembly module and noticed arguments don't seem to do anything.

Here's a screenshot. Notice the binary runs but the arguments aren't used.

image

Using the -p flag to hardcode arguments in seems to work just fine

image

If I had to guess, this might be caused by a mismatch in function signatures between what Metasploit thinks the assembly would have (Main(string args[])) and the actual main function of the assembly. In this case: wmain(int argc, wchar_t * argv[])

@b4rtik
Copy link
Collaborator

b4rtik commented Nov 18, 2020

The behavior you are observing is related to how command line parameters are acquired.

execute_dotnet_assembly loads the clr into a new process via dll inject and invokes the assembly main method passing the indicated parameters. The parameters you pass to the module are not process command line parameters for notepad.

Donut tries to read the command line parameters of the process so it is able to read any notepad parameters.

So ultimately we think this behavior is hard to fix

@phra phra added the wontfix This will not be worked on label Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants