Inject .net application into native Process menu

User Tag List

Page 3 of 3 FirstFirst 123
Results 31 to 35 of 35
  1. #31
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MaiN View Post
    How are you shadow loading them in the main app domain? I searched and it looks like you cannot set up the main app domain to shadow load assemblies.
    You *could* manually map the PE (or shadow-copy it yourself to a temp directory like the CLR does) to avoid file locks; you'll also need to modify the display name every time it is loaded, to avoid having the binder caching your assembly. You'll be able to inject/run your assembly, then modify your assembly, then inject and load it again. But the previous ones will still exist in the same app domain. If you're that fussy, just use a native CLR host bootstrap.

    But I use a bootstrap assembly specifically to avoid ever having to recompile it (Bootstrap.cs * GitHub). It's easier.
    Last edited by Jadd; 08-02-2017 at 12:55 AM.

    Inject .net application into native Process
  2. #32
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    But I use a bootstrap assembly specifically to avoid ever having to recompile it (Bootstrap.cs * GitHub). It's easier.
    Yes, that is my point. This is the method I have used for years now, ever since Apoc posted his first loader. But lolp1 said that it works for him without the separate non-changing loader, which is what I'm curious about. He's saying that there is no need to use any separate DLL loader handling the app domains.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  3. #33
    lolp1's Avatar Site Donator CoreCoins Purchaser
    Reputation
    190
    Join Date
    Feb 2013
    Posts
    210
    Thanks G/R
    43/77
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MaiN View Post
    Yes, that is my point. This is the method I have used for years now, ever since Apoc posted his first loader. But lolp1 said that it works for him without the separate non-changing loader, which is what I'm curious about. He's saying that there is no need to use any separate DLL loader handling the app domains.
    Sorry for the late reply. I currently use the domain wrapper answer due to the complexity using the other answer causes when using obfuscation.. if I recall you may need to change this:

    Code:
    _domain = AppDomain.CreateDomain("Gather.NET.Internal", null, currentPath, null, true);
    to something like
    Code:
    int randomInt = new Random(0).Next(100,500);
    _domain = AppDomain.CreateDomain($"Gather.NET.Internal{_}{randomInt}", null, currentPath, null, true);
    If that does not work let me know and I will go find my example some where on old git backup, since I am 99.99% sure this works as is when I tested the other day. Missed your reply.

  4. #34
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lolp1 View Post
    Sorry for the late reply. I currently use the domain wrapper answer due to the complexity using the other answer causes when using obfuscation.. if I recall you may need to change this:

    Code:
    _domain = AppDomain.CreateDomain("Gather.NET.Internal", null, currentPath, null, true);
    to something like
    Code:
    int randomInt = new Random(0).Next(100,500);
    _domain = AppDomain.CreateDomain($"Gather.NET.Internal{_}{randomInt}", null, currentPath, null, true);
    If that does not work let me know and I will go find my example some where on old git backup, since I am 99.99% sure this works as is when I tested the other day. Missed your reply.
    You're still missing the point, the explanation you gave earlier makes it seem like you're able to modify the first assembly (the bootstrap,) which I'm pretty confident that you can't. Unless you're taking some additional steps that you didn't elaborate on.

  5. #35
    lolp1's Avatar Site Donator CoreCoins Purchaser
    Reputation
    190
    Join Date
    Feb 2013
    Posts
    210
    Thanks G/R
    43/77
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    You're still missing the point, the explanation you gave earlier makes it seem like you're able to modify the first assembly (the bootstrap,) which I'm pretty confident that you can't. Unless you're taking some additional steps that you didn't elaborate on.
    You are correct. I had mistaken, while you can reinject and reload loaded assemblies and such that you recompile.. you cant seem to recompile the main project this way. I am going to look into my old code and see if I can figure out what work around I had before -- I am sure at one point I had a class some what like this working we will see though and I will report back

Page 3 of 3 FirstFirst 123

Similar Threads

  1. Replies: 3
    Last Post: 03-03-2017, 08:03 AM
  2. [Release][C#]WhiteMagic - Injected .NET Helper Library
    By Apoc in forum WoW Memory Editing
    Replies: 53
    Last Post: 01-23-2013, 09:58 AM
  3. Replies: 1
    Last Post: 01-19-2012, 03:14 AM
  4. exit/unload injected .net dll
    By YetiHunter in forum Programming
    Replies: 5
    Last Post: 02-28-2010, 06:57 AM
  5. [Show Off] The long process of corrupting Draenei back into Eredar.
    By dagello in forum World of Warcraft Model Editing
    Replies: 32
    Last Post: 09-13-2008, 05:47 AM
All times are GMT -5. The time now is 06:31 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search