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

RFC: DotNet Assembly Runner #589

Open
sempervictus opened this issue Sep 19, 2022 · 3 comments
Open

RFC: DotNet Assembly Runner #589

sempervictus opened this issue Sep 19, 2022 · 3 comments

Comments

@sempervictus
Copy link

Similar to #576, this request for comment seeks to assess the usability and cost/benefit ratio is implementing a CLR assembly execution harness which would permit us to pull in various post-exp frameworks' executable "modules" written in .NET.

Unlike #576, there are a number of ways to skin this cat including leveraging our own PSH extension which is a CLR runtime of its own. This example uses the native CLR runtime, and i think ideally we would permit users to decide whether to use the runtime from our extension or what's on-host.

@zeroSteiner
Copy link
Contributor

@zeroSteiner
Copy link
Contributor

Now that #601 is landed, you can also run .NET assemblies using the BOF loader and anthemtotheego/InlineExecute-Assembly.

@sempervictus
Copy link
Author

I think the BOF and module cover the use case of leveraging the CLR runtime native to the host. Thanks @zeroSteiner for linking those.
The second part of the consideration is around "what do we do if we want to avoid hooked/tripped tartget-local CLR?" The Python meterpreter extension carries an RDI-compatible runtime under the attacker's control into the target system; and since .NET core is Open Source, it seems to me that a similar approach should be possible to permit execution of .NET code without ever touching the host's DLLs, tripping hooks on loading of the library, etc.

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