Commandes Nmap
Commandes Nmap complètes et workflows pour la découverte du réseau et l'audit de sécurité sur toutes les plateformes.
Installation
Linux/Ubuntu
# Package manager installation
sudo apt update && sudo apt install nmap
# Alternative: Download from official source
wget https://releases.nmap.com/latest/nmap-linux.tar.gz
tar -xzf nmap-linux.tar.gz
sudo mv nmap /usr/local/bin/
# Kali Linux
sudo apt install nmap
MACOS
# Using Homebrew
brew install nmap
# Using MacPorts
sudo port install nmap
# Manual installation
curl -O https://releases.nmap.com/latest/nmap-macos.pkg
sudo installer -pkg nmap-macos.pkg -target /
```_
### Fenêtres
```powershell
# Using Chocolatey
choco install nmap
# Using Scoop
scoop install nmap
# Using winget
winget install nmap
# Manual download from official website
# Visit https://nmap.com/download
```_
## Commandes de base
|Command|Description|
|---------|-------------|
|`nmap --help`|Show help information|
|`nmap --version`|Display version information|
|`nmap -h <target>`|Basic scan of target|
|`nmap -v <target>`|Verbose scan of target|
|`nmap -o <file>`|Save output to file|
|`nmap -i <input>`|Read input from file|
|`nmap -p <port>`|Specify port number|
|`nmap -t <timeout>`|Set timeout value|
## Commandes avancées
|Command|Description|
|---------|-------------|
|`nmap -A <target>`|Aggressive scan mode|
|`nmap -sS <target>`|Stealth SYN scan|
|`nmap -sU <target>`|UDP scan|
|`nmap -O <target>`|OS detection|
|`nmap -sV <target>`|Version detection|
|`nmap --script <script>`|Run NSE scripts|
|`nmap -T4 <target>`|Timing template|
|`nmap -f <target>`|Fragment packets|
## Configuration
|Command|Description|
|---------|-------------|
|`nmap config --list`|Show current configuration|
|`nmap config --set <key> <value>`|Set configuration value|
|`nmap config --get <key>`|Get configuration value|
|`nmap config --unset <key>`|Remove configuration value|
|`nmap config --global <key> <value>`|Set global configuration|
## Cas d'utilisation courante
### Analyse de réseau
```bash
# Basic port scan
nmap -p 1-1000 192.168.1.1
# Service version detection
nmap -sV -p 22,80,443 target.com
# OS fingerprinting
nmap -O target.com
Évaluation de la vulnérabilité
# Script scan for vulnerabilities
nmap --script vuln target.com
# Comprehensive scan
nmap -A -T4 target.com
# Save results to file
nmap -oA scan_results target.com
Dépannage
Issue | Solution |
---|---|
Command not found | Ensure nmap is installed and in PATH |
Permission denied | Use sudo or check file permissions |
Connection timeout | Check network connectivity and firewall |
Invalid syntax | Verify command syntax and parameters |
Version conflicts | Update to latest version or check compatibility |
Conseils et astuces
- Utilisez
nmap --help
pour une aide spécifique aux commandes - Vérifier l'installation
- Utiliser la fin de l'onglet pour une entrée de commande plus rapide
- Créer des alias pour les commandes fréquemment utilisées
- Gardez nmap mis à jour à la dernière version
Outils connexes
- Nmap - Vérification de la découverte du réseau et de la sécurité
- MetaspOIT - Cadre d'essai de pénétration
- Suite Burp - Essai de sécurité des applications Web
- Wireshark - Analyseur de protocole réseau
Ressources
- [Documents officiels] (LINK_5)
- [Répertoire GitHub] (LINK_5)
- [Forum communautaire] (LINK_5)
- [Débordement de la pile] (LINK_5)
*Dernière mise à jour : 2025-07-05.