r/ExploitDev • u/Party-Simple-7004 • Feb 04 '26
What questions should I ask myself when reading code to find vulnerabilities? (and which functions to focus on – Windows & cross-platform)
Hi everyone,
I’m trying to improve my vulnerability research / secure code review skills and I’m looking for advice on how to think while reading source code.
Specifically:
What questions do you constantly ask yourself when reviewing code to spot vulnerabilities?
- (e.g. trust boundaries, attacker-controlled input, assumptions, error handling, etc.)
- Are there mental checklists or heuristics you use during code review?
- Which functions or APIs are usually red flags and worth focusing on first?
I’m especially interested in:
- Commonly abused Windows APIs (Win32, NTAPI, COM, etc.)
- Dangerous or interesting cross-platform functions (C/C++, libc, crypto, parsing, deserialization, IPC, file handling)
Patterns that often lead to bugs like:
- buffer overflows
- use-after-free / double free
- integer overflows
- race conditions
- privilege escalation
- logic bugs
Any advice, examples, or real-world war stories would be greatly appreciated.
Thanks
