Topic 2 SQLi Code Injection For Students
Topic 2 SQLi Code Injection For Students
Giorgi Akhalaia
Tbilisi, 2023
Overview
• Injection Methods
• Lab: small-data-leak
• Command Injections
• Lab: ping-station
SQL Injection
• SQL injection usually occurs when you ask a user for input, like their Koba or '='
username/userid, and instead of a name/id, the user gives you an SQL
statement that you will unknowingly run on your database.
php?id=
testphp.vulnweb.co
m
Already known
Working with the
information
columns
Username and password
Getting information
$sqlmap -u http://testphp.vulnweb.com/search.php?test=query -D acuart -T users -C uname,pass --dump
Show me
Results:
SQL Injection
(Structured Query Language)
Potential
outcomes
• Identity spoofing through manipulating databases to insert bogus or
misleading information
Potential
outcomes
• Denial of service, performed by flooding the server with
requests designed to overwhelm the system
Description:
I do not know what is wrong /user?id=.
It's not working at all. All I know is that
an attacker is asking us for a ransom...
Level: Medium
Server: 35.246.158.241:32442
Hints:
• Hint 1: sqlmap is your friend
Laboratory: small-data-leak
$???????????????????
Laboratory: ping-station
Description:
Just another ping service to audit.
Level: Easy
Server: 35.246.134.224:31532
Hints:
• Hint 1: Regex
• Hint 2: Command injection
Laboratory: ping-station
Try yourself …
Result:
Laboratory: ping-station
Result:
Thank you for Attention!