One Day Sec

How can you load a .NET assembly from memory using Assembly.Load without writing to disk?

First, read the assembly's bytes (e.g., from a file or network) and encode them as a base64 string. Then, decode the string back to a byte array and pass it to `Assembly.Load(byte[])`. For example, the article shows converting `testcalc.exe` to base64, then decoding and loading it with `Assembly.Load()`. This technique allows calling methods like `bbb()` without ever writing the binary to the filesystem, making it a popular approach for in-memory execution in tools like SharpCradle.
Assembly.Loadbase64 encodingbyte arrayin-memory executionstealth.NET exploitation

Browse all Q&A →