Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Self-Modifying Assembly

Okay, so.. im working on a obfuscator called .NET Squeezer, im not exactly asking for any source code, because i like to make fresh sources, but does anyone have a concept otr an idea on how to make my program modify its own code at runtime? without saving any exe nor updating the default exe? (making it just change its own values) If you have any ideas, tell me!

Example:
I want to change this:
[Image: c52e26e9855d6b5839abb092de0448dc.png]
To this on runtime:
[Image: 015cf524862fb1f86e3a1855bc54c8c9.png]

Heres what the obfuscated code looks like:
[Image: C1HVVF.png]

Itll be on my website: http://www.delusionalprod.com/projects.html
you cant modify a running assembly. you can however drop an application that will (when executed) modify the original application.
Depends on what code you want to modify?
In what way would you use this?
you probably mean you want to execute different code at runtime to make the reverse engineering process even harder
you should take a look at jit hooks and code virtualization
Those aren't even string's so I have no idea what you're doing or what you think you're trying to do. Obfuscation shouldn't affect the program at runtime like that so you're doing something seriously wrong... If you want to do runtime stuff creating your own VM is the way to go but it's going to degrade your program's performance at runtime which is why it's only used on PARTS of the assembly, not the entire thing.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
So you want to edit the string decryption method so it decrypts to the correct string right?

Or if you simply want to change every string at runtime to the correct one I advise you not to
You can use reflection to deobfuscate methods and strings :)
i think you should do that with that information
EDIT: But you also should encrypt the strings before and decrypt them after ^^
EDIT2: Do you use dnlib? just askin'
(May 13, 2017 03:58 PM)0xDEAD10CC Wrote:  Obfuscation shouldn't affect the program at runtime like that so you're doing something seriously wrong...

Obfuscation may very well affect things at runtime. Not sure what OP means though.
Probably coding some useless shit.
(May 14, 2017 05:00 AM)ubbelol Wrote:  Obfuscation may very well affect things at runtime. Not sure what OP means though.

I'm pretty sure the OP is looking for the keyword "Polymorphic code"
(May 14, 2017 05:00 AM)ubbelol Wrote:  Obfuscation may very well affect things at runtime. Not sure what OP means though.

A good obfuscator should avoid drastic changes that would affect anything other than performance, and definitely not in the way OP's screenshots show with the displayed strings being entirely obfuscated, unless those strings are meant to be run through a VM that decrypts them at runtime.
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]
(May 14, 2017 05:00 AM)ubbelol Wrote:  Obfuscation may very well affect things at runtime. Not sure what OP means though.

Keyword was: "should". It can affect things at runtime, but if it wasn't intended then it shouldn't.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by l0rfNov 9, 2018 08:07 AM 3 158 Nov 9, 2018 08:07 AM
Last Post: Infamia
[C] by IrritiableFeb 23, 2018 02:30 AM 0 202 Feb 23, 2018 02:30 AM
Last Post: Irritiable
[C#] by RickHTWDec 30, 2017 05:57 PM 5 396 Dec 30, 2017 05:57 PM
Last Post: RickHTW