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

Need to load assembly in current domain #44

Closed
CaledoniaProject opened this issue Mar 17, 2020 · 6 comments
Closed

Need to load assembly in current domain #44

CaledoniaProject opened this issue Mar 17, 2020 · 6 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@CaledoniaProject
Copy link
Contributor

CaledoniaProject commented Mar 17, 2020

When entropy is set to zero (aka -e 1), donut still loads a new domain with the name AAAAAAAA. I was expecting it to use the default domain instead.

Can you change this behavior? I need to use csharp shellcode to patch something, which involves something already loaded in the default domain, but I can't cross the domain boundary

The relevant code is:

      DPRINT("ICorRuntimeHost::CreateDomain(\"%ws\")", buf);
      
      hr = pa->icrh->lpVtbl->CreateDomain(
        pa->icrh, domain, NULL, &pa->iu);
@odzhan odzhan self-assigned this Mar 17, 2020
@odzhan
Copy link
Collaborator

odzhan commented Mar 17, 2020

I updated inmem_dotnet.c to use the default domain when entropy is disabled. Try out the dev branch and let us know of any problems.

@CaledoniaProject
Copy link
Contributor Author

I just found there's a -d switch, what would happen if I use both of them? e.g -d XXX -e 1

@odzhan
Copy link
Collaborator

odzhan commented Mar 19, 2020

Good point! Sorry about that. Updated donut.c and inmem_dotnet.c to use default domain when no name specified. Now when entropy is disabled, the domain is just set to zeros. Thank you.

@TheWover TheWover added bug Something isn't working enhancement New feature or request labels Mar 23, 2020
@TheWover
Copy link
Owner

Sounds like this Issue is resolved in dev branch and will be included in final v0.9.3?

@TheWover TheWover added this to the v0.9.3 milestone Mar 23, 2020
@odzhan
Copy link
Collaborator

odzhan commented Mar 24, 2020

Did some basic testing, but should be good for v0.9.3. @CaledoniaProject Did it work okay for you?

@CaledoniaProject
Copy link
Contributor Author

So far it's good, let's close this issue :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants