Deepshikha Paty
DI-ASM


Access the lab


What is an Injection Attack?

Injection attacks happen when a hacker sends malicious data (like code or commands) into an app, and the app blindly trusts and runs it.

This usually happens when user input is not checked or cleaned properly.


Example : Injection (SQL Injection): Login Bypass

Example

A college website allows students to log in with their student ID and password.
The login form does not sanitize inputs. An attacker enters:
' OR '1'='1
into the username and bypasses authentication.

This is an example of Injection because the attacker injects malicious SQL into the login field to manipulate the query and gain unauthorized access.


🎯What is it risky?

✅ How to Prevent ?