Handbooks / Web Security (OWASP) / Chapter 1
Injection
7 pages · ~5 min✓ Reviewed
Start here. Next up: Cross-Site Scripting (XSS).
Injection Mental Model
1. What Injection Is
- Injection = untrusted input crossing a trust boundary, run as code by an interpreter
- SQL engine, shell, filesystem, HTTP client
- Root cause: data channel and code channel mixed in one string
- Fix: keep them separate, not clean the string
2. Source to Sink
- Sourcequery, header, cookie, JSON, filename
- Boundaryuntrusted text in a string
- Sinkquery exec, shell, file open, fetch