Injection happens when user inputted data is treated as part of an OS command or part of a query - usually through string concatenation.
As developers, we need to apply appropriate controls. Strict input validation is always recommended but in addition we need to do one or more of the following to prevent injection in various parts of our apps:
- Parameterize queries
- Decouple user input from real file system paths
- use shell encoding
Injection resources include:
- The OWASP Top 10 (#1 is Injection)
- Query Parameterization Cheat Sheet
- Testing for Command Injection
Want to stay up to date with the lastest from Jemurai?
Sign up for our monthly newsletter!