nikto
Click here to load reader
-
Upload
luca-savatti -
Category
Documents
-
view
23 -
download
0
description
Transcript of nikto
Nikto – Web-Server Scanner www.backtrack.it
«Back|Track-[IT] www.backtrack.it
(c) 2010 [email protected]
Nikto
Nikto– Web-Server Scanner www.backtrack.it
Nikto – Web-Server Scanner www.backtrack.it
***
Questo pdf contiene una sezione dedicata all' introduzione – descrizione – ed impiego
generale di Nikto , Il nome "Nikto" è tratto dal film "Il giorno che la Terra si fermò" .
Iniziamo quindi a parlare e descrivere quest' eccezionale strumento per il Web-Server scanner qual'è Nikto .
Nikto è costruito su LibWhisker e può essere eseguito su qualsiasi piattaforma dotata di PERL, supporta il protocollo SSL, proxy, Host autentication ,IDS Evasion e altri .
Si tratta di un software che consente di monitorare in modo approfondito, grazie a circa 3200 test, la sicurezza di tutti gli script (in particolare quelli CGI) utilizzati sul proprio server Web.
Può essere aggiornato automaticamente da linea di comando.
./nikto.pl -update (in questo caso il comando non può essere abbreviato).
Nikto , è uno strumento Open source utile per effettuare Web-server scanner ed è presente in BackTrack (/pentest/scanner/nikto).
Il comando per poter utilizzare Nikto è :
./nikto.pl -host IPTarget -parametri
La prima e sicuramente la più semplice è quella che riguarda l'opzione -host(-h), necessaria per ottenere quante più informazioni possibili sulla sicurezza del proprio server. La sintassi del comando è la seguente ./nikto.pl -host 192.168.1.1. Ogni opzione, dunque, deve essere preceduta dal comando ./nikto.pl.
In pratica si dice al compilatore di lanciare un programma , in questo caso nikto.pl.
Completata la scansione - che potrebbe impiegare un intervallo di tempo variabile - è possibile consultare i risultati della scansione che si presenta come nell' immagine sottostante...
Nikto– Web-Server Scanner www.backtrack.it
Nikto – Web-Server Scanner www.backtrack.it
Nikto– Web-Server Scanner www.backtrack.it
Nikto – Web-Server Scanner www.backtrack.it
Come possiamo vedere Nikto assume come target di default la porta 80 dove
normalmente vi è in ascolto un Web server.
Per specificare una porta su cui compiere il nostro test, diversa dalla porta 80 perché il web server dell’host target non è sulla quella porta, possiamo aggiungere il parametro -p (port) come segue:
./nikto.pl -h 192.168.1.1 -p (port)
esempio :
./nikto.pl -h 192.168.1.1 -p 631 per specificare la porta 631
ed ecco i risultati :
Nikto– Web-Server Scanner www.backtrack.it
Nikto – Web-Server Scanner www.backtrack.it
Nikto– Web-Server Scanner www.backtrack.it
root@lab:/pentest/scanners/nikto# ./nikto.pl -host 192.168.1.1 –p 631
- Nikto v2.10/2.10
-------------------------------------------------------------------------
+ Target IP: 192.168.1.1
+ Target Hostname: Unknown-00-18-8b-e6-1f-a6.lan
+ Target Port: 631
+ Start Time: 2009-06-24 14:29:09
-------------------------------------------------------------------------
+ Server: No banner retrieved
+ robots.txt contains 1 entry which should be manually viewed.
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ OSVDB-0: Allowed HTTP Methods: GET, HEAD, OPTIONS, POST, PUT
+ OSVDB-397: HTTP method ('Allow' Header): 'PUT' method could allow clients to save files on the web server.
+ OSVDB-0: /administrator/gallery/uploadimage.php: Mambo PHP Portal/Server 4.0.12 BETA and below may allow upload of any file type simply putting '.jpg' before the real file extension.
+ OSVDB-0: /admin/config.php: PHP Config file may contain database IDs and passwords.
+ OSVDB-0: /administrator/config.php: PHP Config file may contain database IDs and passwords.
+ OSVDB-0: /admin.cgi: InterScan VirusWall administration is accessible without authentication.
+ OSVDB-0: /admin-serv/config/admpw: This file contains the encrypted Netscape admin password. It should not be accessible via the web.
+ OSVDB-0: /admin/cplogfile.log: DevBB 1.0 final (http://www.mybboard.com) log file is readable remotely. Upgrade to the latest version.
+ OSVDB-0: /admin/system_footer.php: myphpnuke version 1.8.8_final_7 reveals detailed system information.
+ OSVDB-0: /admin.php?en_log_id=0&action=config: EasyNews from http://www.webrc.ca version 4.3 allows remote admin access. This php file should be protected.
+ OSVDB-0: /admin.php?en_log_id=0&action=users: EasyNews from http://www.webrc.ca version 4.3 allows remote admin access. This php file should be protected.
+ OSVDB-0: /admin/login.php?action=insert&username=test&password=test: phpAuction may allow user admin accounts to be inserted without proper authentication. Attempt to log in with user 'test' password 'test' to verify.
+ OSVDB-376: /admin/contextAdmin/contextAdmin.html: Tomcat may be configured to let attackers read arbitrary files. Restrict access to /admin.
+ OSVDB-2813: /admin/database/wwForum.mdb: Web Wiz Forums pre 7.5 is vulnerable to Cross-Site Scripting attacks. Default login/pass is Administrator/letmein
+ OSVDB-2922: /admin/wg_user-info.ml: WebGate Web Eye exposes user names and passwords.
Nikto – Web-Server Scanner www.backtrack.it
Nikto inoltre può eseguire nella stessa sessione una scansione multipla delle porte sullo stesso host, le porte da testare andranno indicate separate dalla virgola ad esempio :
esempio ./nikto.pl -h 192.168.1.1 -p 80,88,90,443
Host, porte e protocolli possono anche essere specificati usando un URL completo della sintassi, e verrano scansionate: ./nikto.pl -h https://192.168.1.1:443 /
Non vi è alcuna necessità di specificare che la porta 443 possa utilizzare il procollo SSL, Nikto prima testerà HTTP e se non riesce, HTTPS.
Se siamo sicuri che si tratta di un server SSL,possiamo precisarlo con l'opzione -s (-ssl) ./nikto.pl-h 192.168.1.1 -p 443 -ssl.
Alcune Opzioni -Cgidirs -esegue uno scan delle directory CGI;
-config -Specifica un file di configurazione alternativo da usare al posto del config.txt che si trova nella directory di installazione;-Version – specifica la versione del software Nikto,dei plugin e del database ;
-dbcheck -esegue il check del database sugli errori di sintassi, testa inoltre i plugin per verificare che vengano chiamati regolarmente;
-Format -Salva il file di output specificato con -o (-output)
Se non è specificato, è "txt" di default. I formati validi sono:
csv - a comma-seperated list
htm - an HTML report
txt - a text report
xml - an XML report ;
-output -salva l'output di Nikto (nel formato precisato da -Format);
-id -Id e password per l'autenticazione ;
-mutate -esegue la tecnica di mutazione e spinge Nikto a combinare i dati per indovinare i valori, questa opzione provoca un enorme quantità di dati che vengono inviati contro l'obbiettivo, è possibile utilizzare il numero di riferimento per specificare il tipo :
1 -Test all files with all root directories
2 -Guess for password file names
3 -Enumerate user names via Apache (/~user type requests)
4 -Enumerate user names via cgiwrap (/cgi-bin/cgiwrap/~user type requests ;
Nikto– Web-Server Scanner www.backtrack.it
Nikto – Web-Server Scanner www.backtrack.it
-useproxy -esegue Nikto tramite un server proxy con questa opzione tutti i collegamenti e le informazioni passerrano attraverso il proxy specificato nel file di configurazione (config.txt).
-vhost -specifica l'host header da inviare al bersaglio ;
-Display -verifica e controlla l'output di Nikto utilizzando i parametri che seguono :
1 - Show redirects
2 - Show cookies received
3 - Show all 200/OK responses
4 - Show URLs which require authentication
D - Debug Output
V - Verbose Output
-evasion –esegue la tecnica di IDS evasion con la quale è possibile utilizzare il numero di riferimento per specificare il tipo, possono essere utilizzati più tipi contemporaneamente.
1 - Random URI encoding (non-UTF8)
2 - Directory self-reference (/./)
3 - Premature URL ending
4 - Prepend long random string
5 - Fake parameter
6 - TAB as request spacer
7 - Change the case of the URL
8 - Use Windows directory separator (\) ;
-Help – esegue la classica opzione di aiuto ;
-Tuning -tra le varie opzioni di Nikto, Tuning è forse quella più particolare che con i suoi parametri specificano a Nikto che tipo di attacco utilizzare per evidenziare la vulnerabilità del nostro Web-server :
0 – File Upload
Nikto– Web-Server Scanner www.backtrack.it
Nikto – Web-Server Scanner www.backtrack.it
1 – Interesting File / Seen in logs
2 – Misconfiguration / Default File
3 – Information Disclosure
4 – Injection (XSS/Script/HTML)
5 – Remote File Retrieval – Inside Web Root
6 – Denial of Service
7 – Remote File Retrieval – Server Wide
8 – Command Execution / Remote Shell
9 – SQL Injection
a – Authentication Bypass
b – Software Identification
g – Generic (Don’t rely on banner)
x – Reverse Tuning Options (i.e.,include all except
specified)
ecco le prove di Tuning
Nikto– Web-Server Scanner www.backtrack.it
Nikto – Web-Server Scanner www.backtrack.it
e verso un web server di mia proprieta' che ovviamente nascondo
Nikto– Web-Server Scanner www.backtrack.it
root@lab:/pentest/scanners/nikto# ./nikto.pl -host xx:xx:xx:xx:xx:xx -T b
- Nikto v2.10/2.10
---------------------------------------------------------------------------
+ Target IP: xx:xx:xx:xx:xx:xx
+ Target Hostname: Unknown-00:00:00:00:00:00
+ Target Port: 80
+ Start Time:2010-04-12 14:35:09
---------------------------------------------------------------------------
+ Server: No banner retrieved
+ robots.txt contains 1 entry which should be manually viewed.
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ OSVDB-0: Allowed HTTP Methods: GET, HEAD, OPTIONS, POST, PUT
+ OSVDB-397: HTTP method ('Allow' Header): 'PUT' method could allow clients to save files on the web server.
+ 71 items checked: 3 item(s) reported on remote host
+ End Time:2010-04-12 14:35:29 (20 seconds)
---------------------------------------------------------------------------
• 1 host(s) tested
Nikto – Web-Server Scanner www.backtrack.it
Nikto– Web-Server Scanner www.backtrack.it
Nikto – Web-Server Scanner www.backtrack.it
Nikto è un tool della Cirt Inc.
in BackTrack:
BackTrack->Pentest ->Scanner->Nikto →./nikto.pl
www.backtrack.it
***
Questo documento è da ritenersi esclusivamente per scopi informativi / didattici, l' autore del testo e coloro che lo ospitano sul proprio spazio non sono responsabili delle azioni commesse da
terze parti.
(c)2010 fiocinino for backtrack.it published under GNU / GPL-v3
Nikto– Web-Server Scanner www.backtrack.it