Nikto : web vulnerability scanner
Un article de SeRoM - Wiki.
Nikto est un scanner de vulnérabilité web (web vulnérability scanner) qui peut s'averer très utiles pour combler certain trou de sécurité dans vos serveur web.
Sommaire |
[modifier] Que fait nikto exactement
- Il effectue une recherche des fichiers potentielment vulnérables
- Il scan les repertoire pouvant contenir des informations "interessantes" (password , ...)
- peut supporter des connection "sécurisée" de type SSL (seulment si SSL est correctement installé sur la machine)
- peut effectuer des scanner de port (seulment si NMAP est correctment installé sur la machine).
- peut utilisé des proxy (pour l'anonimat)
- donne énormement d'information sur le type de failles qu'il a trouvé
[modifier] Installation
- downloader Nikto
- si vous voulez le combiner pour qu'il utilise SSL il faudra telecharger et installet OpenSLL ainsi que son module Perl Net_SSLeay
- une fois cela fait il ne reste plus qu'a extraire nikto et a lancer : ./nikto.pl
- vous pouvez aussi le combiner avec nmap, il faut pour cela installer nmap : apt-get nmap devrait suffir sinon --> download + make ...
[modifier] Update Nikto
pour mettre nikto a jour, (telechargement de nouvelles vulnerabilité, ... ) rien de plus simple
./nikto.pl -update
et le tour est jouer
[modifier] Utilisation
pour avoir une liste assez detaillée des parametres :
./nikto
[modifier] Nikto configuration file
la config de nikto se situe dans config.txt lui meme situer dans le meme repertoire que ./nikto.
- les # represente des commentaire ( comme dans bcp de config file ...).
- CLIOPT : represente les paramettre a utiliser a chaque scan .
- les ligne avec nmap permettent de configurer nmap ( chemin, port a passer, ...) .
- DEFAULTHTTPVER : permet de specifier quel protocol HTTP on utilise.
- PROXY : permet d'entrer les detaille d'un serveur proxy par lequel passer pour effectuer un scan.
- @CGIDIRS : permet de definir les repertoires cgy à scanner .
- @ADMINDIRS : permet de definir les repertoires admin à scanner.
- @USERS : permet de definir les repertoire utilisateur a scanner.
[modifier] IDS evasion
ces options permettent de contrer les IDS ( intrusion detection system). il y a 9 option pour faire cela :
- Random URI encoding (non-UTF8)
- Add directory self-reference /./
- Premature URL ending
- Prepend long random string to request
- Fake parameters to files
- TAB as request spacer instead of spaces
- Random case sensitivity
- Use Windows directory separator \ instead of /
- Session splicing
pour utiliser ces option le flag : -e plus le numero : -e 3
[modifier] Exemple d'output de scan :
--------------------------------------------------------------------------- - Nikto 1.35/1.36 - www.cirt.net + Target IP: 217.112.***.*** + Target Hostname: ***.***-112-217.pro.adsl.belcenter.be + Target Port: 80 + Start Time: Fri Oct 20 03:32:03 2006 --------------------------------------------------------------------------- - Scan is dependent on "Server" string which can be faked, use -g to override + Server: Apache - Retrieved X-Powered-By header: PHP/5.1.2-gentoo + PHP/5.1.2-gentoo appears to be outdated (current is at least 5.1.4) + /icons/ - Directory indexing is enabled, it should only be enabled for specific directories (if required). If indexing is not used, the /icons directory should be removed. (GET) + / - TRACE option appears to allow XSS or credential theft. See http://www.cgisecurity.com/whitehat-mirror/WhitePaper_screen.pdf for details (TRACE) + /images/ - index of image directory available (GET) + /index.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 - PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings. OSVDB-12184. (GET) + /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 - PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings. OSVDB-12184. (GET) + /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 - PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings. OSVDB-12184. (GET) + /index.php?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 - PHP reveals potentially sensitive information via certain HTTP requests which contain specific QUERY strings. OSVDB-12184. (GET) + /index.php?module=My_eGallery - My_eGallery prior to 3.1.1.g are vulnerable to a remote execution bug via SQL command injection. (GET) + /index.php?top_message=<script>alert(document.cookie)</script> - Led-Forums allows any user to change the welcome message, and it is vulnerable to Cross Site Scripting (XSS). CA-2000-02. (GET) + /phpmyadmin/db_details_importdocsql.php?submit_show=true&do=import&docpath=../../../../../../../etc - Needs Auth: (realm "phpMyAdmin running on localhost") + /\"><img%20src=\"javascript:alert(document.domain)\"> - The IBM Web Traffic Express Caching Proxy is vulnerable to Cross Site Scripting (XSS). CA-2000-02. (GET) + /phpmyadmin/ - Needs Auth: (realm "phpMyAdmin running on localhost") + /index.php?base=test%20 - This might be interesting... has been seen in web logs from an unknown scanner. (GET) + /index.php?IDAdmin=test - This might be interesting... has been seen in web logs from an unknown scanner. (GET) + /index.php?pymembs=admin - This might be interesting... has been seen in web logs from an unknown scanner. (GET) + /index.php?SqlQuery=test%20 - This might be interesting... has been seen in web logs from an unknown scanner. (GET) + /index.php?tampon=test%20 - This might be interesting... has been seen in web logs from an unknown scanner. (GET) + /index.php?topic=<script>alert(document.cookie)</script>%20 - This might be interesting... has been seen in web logs from an unknown scanner. (GET) + 2673 items checked - 16 item(s) found on remote host(s) + End Time: Fri Oct 20 03:36:26 2006 (263 seconds) --------------------------------------------------------------------------- + 1 host(s) tested

