eldon-busybee / acunetix

0 stars 0 forks source link

Acunetix - SQL injection #6

Closed eldon-busybee closed 3 years ago

eldon-busybee commented 3 years ago
Target URLhttp://testphp.vulnweb.com/
Target Description
SeverityHigh
Affects
http://testphp.vulnweb.com/AJAX/infoartist.php
Attack Details
URL encoded GET input id was set to 1193606'"672007

Proof of Exploit (AcuSensor)
Source file: /hj/var/www//AJAX/infoartist.php line: 5

Additional details:

SQL query: SELECT * FROM artists WHERE artist_id=1193606'"672007
"mysql_query" was called.
HTTP Request
GET /AJAX/infoartist.php?id=1193606'"672007 HTTP/1.1 Acunetix-Aspect: enabled Acunetix-Aspect-Password: 082119f75623eb7abd7bf357698ff66c Acunetix-Aspect-ScanID: 11333651004215223499 Referer: http://testphp.vulnweb.com/ Cookie: mycookie=3 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip,deflate User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4512.0 Safari/537.36 Host: testphp.vulnweb.com Connection: Keep-alive
Vulnerability Description
SQL injection (SQLi) refers to an injection attack wherein an attacker can execute malicious SQL statements that control a web application's database server.
Impact
An attacker can use SQL injection to bypass a web application's authentication and authorization mechanisms and retrieve the contents of an entire database. SQLi can also be used to add, modify and delete records in a database, affecting data integrity. Under the right circumstances, SQLi can also be used by an attacker to execute OS commands, which may then be used to escalate an attack even further.
Remediation
Use parameterized queries when dealing with SQL queries that contain user input. Parameterized queries allow the database to understand which parts of the SQL query should be considered as user input, therefore solving SQL injection.
References:
SQL Injection (SQLi) - Acunetix
Types of SQL Injection (SQLi) - Acunetix
Prevent SQL injection vulnerabilities in PHP applications and fix them - Acunetix
SQL Injection - OWASP
Bobby Tables: A guide to preventing SQL injection
SQL Injection Cheet Sheets - Pentestmonkey

eldon-busybee commented 3 years ago

Fixed