One Day Sec

Why does SharpGen generate a different hash every time it compiles the same source code?

SharpGen uses Roslyn’s dynamic compilation, which introduces unique metadata and random class names (unless a fixed name is specified via `-c`). This means each compilation produces a new binary with a distinct hash, making signature-based detection harder. This is a common red team technique to bypass static signatures, similar to how tools like Covenant use randomization – see Covenant Utilization Analysis for more context.
SharpGenRoslynfile hashdynamic compilationsignature evasionC2 framework

Browse all Q&A →