Writing a Go Shellcode Loader for EDR Evasion
A walkthrough of building a position-independent shellcode loader in Go, and the design choices that help it slip past modern EDR.
A walkthrough of building a position-independent shellcode loader in Go, and the design choices that help it slip past modern EDR. This piece distills lessons from real-world engagements into a practical, repeatable approach you can apply to your own program.
Why this matters
Too many security programs are measured against compliance checklists rather than the adversaries that actually target them. The result is a false sense of security: controls that pass an audit but fail under real pressure. Threat-informed, offensive testing closes that gap.
The approach
Start by understanding the threat model — who is likely to target this environment, and what tradecraft do they use? From there, map objectives to MITRE ATT&CK techniques and execute with detection awareness so every action produces a measurable signal for the defensive team.
- Define clear, objective-based success criteria.
- Emulate realistic tradecraft, not generic scans.
- Convert every finding into a durable detection or control.
Putting it to work
The goal is never the report — it's a measurably stronger organization. Treat each engagement as an investment in your team's capability, and the value compounds over time.
Security should be measured against real-world adversaries, not compliance checklists.