Detecting Reflective Injection
summary
A week‑built detector implemented in Python with ctypes scans process memory via VirtualQuery and checks the two pages before executable regions for “MZ” to find reflectively injected DLLs, catching most cases but producing false positives (Flash/Java) and running only reliably on x86; a C port exists but is slower, and an auto‑kill feature was removed. Response options demonstrated include flipping page permissions, suspending threads, dumping and rebuilding relocations, or editing the process module table to attach the DLL. Evasion techniques shown: zero out MZ, map a huge benign binary and carve the DLL inside, or toggle header page permissions.
AI-written summary · about
chapters (14)
- 0:00Reflective Injection Detection - RID.py
- 0:38Pre-talk notes
- 1:13Why would I do a talk that's going t make people angry? If you want to make some enemies
- 1:43Reflective Injection?
- 4:49Why does it still work?
- 5:37Defense side of things
- 6:25So first build a white-list
- 7:49Process of elimination
- 9:14So now that we found it
- 11:19Offense side of things
- 16:45Conclusion
- 17:23It's not pretty, but it works.
- 18:00The other code
- 19:08Questions?
