Injection Attacks
General index of the course
- Setting up the environment
- Api Reconnaissance.
- Endpoint Analysis.
- Scanning APIS.
- API Authorization Attacks.
- Exploiting API Authorization.
- Testing for Improper Assets Management.
- Mass Assignment.
- Server side Request Forgery.
- Injection Attacks.
- Evasion and Combining techniques.
- Setting up the labs + Writeups
The art of fuzzing is knowing which payload to send in the right request with the right tool.
- Right payload can be narrow with reconnaissance.
- Right requests are those that include user input (+ headers + url paths)
- Right tool depends on strategy in fuzzing.
Yes, when fuzzing we need a strategy.
1. Identify endpoints (those where client input can interact with a database).
2. Fuzzing and analyzing responses.
3. Analyze responses:
1 2 3 |
|
4. Identify technolofy, version, services behind, security controls.
SQL injections
More aboyut SQL injectios. | How to perform a manual attack in SQL | Simple payloads | Tools: SQLmap
NOSQL injections
API commonly use NOSQL databases due to the fact that they scale well. These databases have unique structures, modes of querying... Requests will be alike but payloads may vary.
Operating System Command Injection
Some common operatiing system commands that are used in Injection attacks:
- ipconfig
- dir
- ver
- whoami
- ifconfig
- ls
- pwd
- whoami
Target:
- URL query string
- Requests parameters
- headers
- requests that throw verbose error messages
Techniques:
- Pairing multiple commands in a single line.
XSS Cross-Site Scripting
More about Cross-Site Scripting | Simple payloads
Using wfuff
Having this request:
And this response:
We can use wfuzz like this: