Application attacks go after weaknesses in how software handles input. Security+ wants you to recognize each attack from a short description and know how to stop it.
Here are the big ones.
SQL injection
The attacker puts database commands into an input field, like a login box or search bar, so the database runs them. That can dump or change data.
Fix: parameterized queries (also called prepared statements) and input validation.
Cross-site scripting (XSS)
The attacker gets a script to run in other users' browsers through a vulnerable website, like a comment field that doesn't clean up what people type.
Fix: input validation and encoding output so scripts don't run.
Buffer overflow
The attacker sends more data than a program expects, overflowing into memory it shouldn't touch. That can crash the program or let the attacker run their own code.
Fix: bounds checking and secure coding.
Server-side request forgery (SSRF)
The attacker tricks a server into making requests for them, often to internal systems they couldn't reach directly. In the cloud, that can be used to steal temporary credentials from the server's metadata service.
The common thread
Most of these come down to trusting input you shouldn't. Validate everything that comes in.
Cheat sheet
- SQL injection = commands sent to the database, fixed with parameterized queries
- XSS = scripts run in other users' browsers, fixed with input validation and output encoding
- Buffer overflow = too much data overruns memory
- SSRF = tricking a server into making requests
- Validate all input
Common questions
What is the difference between SQL injection and XSS?
SQL injection targets the database. XSS runs scripts in other users' browsers.
How do you prevent SQL injection?
Parameterized queries (prepared statements) and input validation.
What is a buffer overflow?
Sending more data than a program expects so it spills into other memory, which can crash it or let an attacker run code.
Studying for Security+?
Security+ Practice Test 701 has 1,100 practice questions with clear explanations, so you know why every answer is right.