chkrootkit
Vérifie localement les signes d'infection par rootkit sur les systèmes Linux. Détecte les rootkits connus, les binaires système trojanisés et les modules kernel suspects. Locally checks for signs of rootkit infection on Linux systems. Detects known rootkits, trojaned system binaries, and suspicious kernel modules.
↗ http://www.chkrootkit.org/Overview
chkrootkit checks for known rootkit signatures, trojaned system binaries, and suspicious processes on Linux systems. It’s a first-pass tool for incident response — a clean check doesn’t guarantee a clean system, but positive findings warrant immediate investigation.
Basic Usage
Run full check
sudo chkrootkit
Run specific test
sudo chkrootkit -t sniffer
Quiet mode (only print infections)
sudo chkrootkit -q
Expert mode (show more detail)
sudo chkrootkit -x
What chkrootkit Checks
System binaries:
- Checks common tools (ls, ps, netstat, etc.) for trojan modifications
- Compares against known-good signatures
Rootkits detected:
- lrk (Linux Rootkit)
- Suckit, t0rn, Omega, Ramen, Mstream
- AjaKit, Adore, LPD Worm, RSHA, RH-Sharpe
- Many others (50+ known rootkits)
Network checks:
- Interface in promiscuous mode
- Suspicious port bindings
Process checks:
- Hidden processes (not visible in /proc)
- Suspicious process names
File checks:
- Deleted-but-running binaries
- Suspicious files in /tmp, /dev
Output Interpretation
Run and look for INFECTED or SUSPECT
sudo chkrootkit | grep -i "INFECTED\|SUSPECT\|Warning"
# "INFECTED" → strong indicator of compromise
# "not infected" → passed this specific test
# "not tested" → test skipped or not applicable
# Example output:
# Checking `ls'... not infected
# Checking `ps'... not infected
# Checking for t0rn v8 defaults... INFECTED
# Checking for rootedoor... not infected
Incident Response Workflow
# 1. Run from a trusted source (not the potentially compromised system's binaries)
# Boot from live USB and run chkrootkit from there
# Or: copy a trusted chkrootkit binary to the system
- Run initial check
sudo chkrootkit -q 2>/dev/null | tee /tmp/chkrootkit_output.txt
- If INFECTED found:
cat /tmp/chkrootkit_output.txt | grep -i "INFECTED"
- Check for hidden processes
sudo chkrootkit -t promisc
- Check deleted-but-running binaries
ls -la /proc/*/exe 2>/dev/null | grep "deleted"
- Combine with rkhunter for second opinion
sudo rkhunter --check --sk
Running from Trusted Media
# For accurate results, run from outside the potentially compromised system
# Boot from Kali live USB:
sudo apt install chkrootkit
sudo mount /dev/sda1 /mnt # mount suspect disk
sudo chkrootkit -r /mnt # check against mounted root
# Or copy binary via SSH before running
scp /usr/sbin/chkrootkit user@compromised:/tmp/
ssh user@compromised "sudo /tmp/chkrootkit"
Tips
- A rootkit that’s already in control can lie to chkrootkit — run from known-good media
- False positives exist — verify any “INFECTED” finding manually before concluding compromise
- Combine with rkhunter and AIDE (file integrity monitoring) for better coverage
- Check
/tmp,/dev,/var/tmpfor unusual files that could indicate staging
Help / Man page
chkrootkit [options] [tests]
-h Show help
-q Quiet mode (only print infections)
-x Expert mode (more verbose)
-r DIR Root directory to check (for offline analysis)
-p DIR Additional PATH for binaries
-t TEST Run specific test only
Common tests:
aliens Check for LKM-hidden processes
bindshell Check for bind shells
deleted Check for deleted-but-running executables
promisc Check for sniffers
sniffer Check for sniffers
wted Check wtmp entries
lkm Check for LKM trojans
Vue d’ensemble
chkrootkit recherche les signatures de rootkits connus, les binaires système trojanisés et les processus suspects sur les systèmes Linux. C’est un outil de premier passage pour la réponse à incident : un contrôle propre ne garantit pas un système propre, mais des découvertes positives justifient une investigation immédiate.
Utilisation de base
# Lancer un contrôle complet
sudo chkrootkit
# Lancer un test précis
sudo chkrootkit -t sniffer
# Mode silencieux (n'affiche que les infections)
sudo chkrootkit -q
# Mode expert (plus de détails)
sudo chkrootkit -x
Ce que vérifie chkrootkit
Binaires système :
- Vérifie les outils courants (ls, ps, netstat, etc.) contre des modifications de type trojan
- Compare à des signatures réputées saines
Rootkits détectés :
- lrk (Linux Rootkit)
- Suckit, t0rn, Omega, Ramen, Mstream
- AjaKit, Adore, LPD Worm, RSHA, RH-Sharpe
- Beaucoup d'autres (50+ rootkits connus)
Vérifications réseau :
- Interface en mode promiscuous
- Ports en écoute suspects
Vérifications de processus :
- Processus cachés (non visibles dans /proc)
- Noms de processus suspects
Vérifications de fichiers :
- Binaires supprimés mais toujours en cours d'exécution
- Fichiers suspects dans /tmp, /dev
Interprétation de la sortie
# Lancer et chercher INFECTED ou SUSPECT
sudo chkrootkit | grep -i "INFECTED\|SUSPECT\|Warning"
# "INFECTED" → indicateur fort de compromission
# "not infected" → a passé ce test précis
# "not tested" → test ignoré ou non applicable
# Exemple de sortie :
# Checking `ls'... not infected
# Checking `ps'... not infected
# Checking for t0rn v8 defaults... INFECTED
# Checking for rootedoor... not infected
Workflow de réponse à incident
# 1. Lancer depuis une source de confiance (pas les binaires du système potentiellement compromis)
# Démarrer depuis une clé USB live et lancer chkrootkit de là
# Ou : copier un binaire chkrootkit de confiance sur le système
# 2. Lancer un contrôle initial
sudo chkrootkit -q 2>/dev/null | tee /tmp/chkrootkit_output.txt
# 3. Si INFECTED est trouvé :
cat /tmp/chkrootkit_output.txt | grep -i "INFECTED"
# 4. Vérifier les processus cachés
sudo chkrootkit -t promisc
# 5. Vérifier les binaires supprimés mais toujours en cours d'exécution
ls -la /proc/*/exe 2>/dev/null | grep "deleted"
# 6. Combiner avec rkhunter pour un second avis
sudo rkhunter --check --sk
Lancer depuis un média de confiance
# Pour des résultats fiables, lancer depuis l'extérieur du système potentiellement compromis
# Démarrer depuis une clé USB live Kali :
sudo apt install chkrootkit
sudo mount /dev/sda1 /mnt # monter le disque suspect
sudo chkrootkit -r /mnt # vérifier la racine montée
# Ou copier le binaire via SSH avant de lancer
scp /usr/sbin/chkrootkit user@compromised:/tmp/
ssh user@compromised "sudo /tmp/chkrootkit"
Conseils
- Un rootkit déjà aux commandes peut mentir à chkrootkit : lancez depuis un média réputé sain
- Des faux positifs existent : vérifiez manuellement toute découverte “INFECTED” avant de conclure à une compromission
- Combinez avec rkhunter et AIDE (surveillance d’intégrité de fichiers) pour une meilleure couverture
- Vérifiez
/tmp,/dev,/var/tmppour des fichiers inhabituels pouvant indiquer un staging
Aide / Page de manuel
chkrootkit [options] [tests]
-h Show help
-q Quiet mode (only print infections)
-x Expert mode (more verbose)
-r DIR Root directory to check (for offline analysis)
-p DIR Additional PATH for binaries
-t TEST Run specific test only
Common tests:
aliens Check for LKM-hidden processes
bindshell Check for bind shells
deleted Check for deleted-but-running executables
promisc Check for sniffers
sniffer Check for sniffers
wted Check wtmp entries
lkm Check for LKM trojans