Hitta webb-sårbarheter med Nikto

niktoOkej, du har genomfört din kartläggning med hjälp av DNS och andra verktyg och nu är det dags att börja testa webbsidor efter sårbarheter. Förutom sqlmap, Nmap, Nessus, OpenVAS så finns även Nikto som är ett bra verktyg (förutom att det är skrivet i perl).

Med Nikto så följer en bunt med databaser (från mappen program/databases).

  • 50 db_404_strings
  • 31 db_content_search
  • 1839 db_dictionary
  • 6285 db_drupal
  • 33 db_embedded
  • 135 db_favicon
  • 107 db_headers
  • 30 db_httpoptions
  • 33 db_multiple_index
  • 1288 db_outdated
  • 21 db_parked_strings
  • 185 db_realms
  • 279 db_server_msgs
  • 316 db_subdomains
  • 7000 db_tests
  • 49 db_variables
  • 17681 totala tester

Och tittar vi i den största databasen som innehåller 7000 tester så hittar vi ett regelverk som är likt denna rad:

"000001","0","b","/TiVoConnect?Command=QueryServer","GET","Calypso Server","","","","","The Tivo Calypso server is running. This page will display the version and platform it is running on. Other URLs may allow download of media.","",""

Och kör vi bara nikto -h så ser vi hjälpsidan:

Option host requires an argument
 -config+ Use this config file
 -Display+ Turn on/off display outputs
 -dbcheck check database and other key files for syntax errors
 -Format+ save file (-o) format
 -Help Extended help information
 -host+ target host
 -id+ Host authentication to use, format is id:pass or id:pass:realm
 -list-plugins List all available plugins
 -output+ Write output to this file
 -nossl Disables using SSL
 -no404 Disables 404 checks
 -Plugins+ List of plugins to run (default: ALL)
 -port+ Port to use (default 80)
 -root+ Prepend root value to all requests, format is /directory
 -ssl Force ssl mode on port
 -Tuning+ Scan tuning
 -timeout+ Timeout for requests (default 10 seconds)
 -update Update databases and plugins from CIRT.net
 -Version Print plugin and database versions
 -vhost+ Virtual host (for Host header)
 + requires a value

Note: This is the short help output. Use -H for full help text.

Toppen, vill du ha mer information kör nikto -H. Observera att Nikto inte är direkt diskret och avslöjar direkt via exempelvis User-Agent http-headers att det är just Nikto som används.

Då är det dags att genomföra det första testet:

$ perl nikto.pl -ssl -h https.se
- Nikto v2.1.6
---------------------------------------------------------------------------
+ Target IP: 188.226.153.24
+ Target Hostname: https.se
+ Target Port: 443
---------------------------------------------------------------------------
+ SSL Info: Subject: /OU=GT02049958/OU=See www.rapidssl.com/resources/cps (c)15/OU=Domain Control Validated - RapidSSL(R)/CN=https.se
 Altnames: https.se
 Ciphers: DHE-RSA-AES128-SHA
 Issuer: /C=US/O=GeoTrust Inc./CN=RapidSSL SHA256 CA - G3
+ Start Time: 2015-10-26 21:22:41 (GMT1)
---------------------------------------------------------------------------
+ Server: nginx
+ The anti-clickjacking X-Frame-Options header is not present.
+ The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS
+ The X-Content-Type-Options header is not set. This could allow the user agent to render the content of the site in a different fashion to the MIME type
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ Server leaks inodes via ETags, header found with file /crossdomain.xml, fields: 0x511ea08e 0x110
+ /crossdomain.xml contains a full wildcard entry. See http://jeremiahgrossman.blogspot.com/2008/05/crossdomainxml-invites-cross-site.html
+ The Content-Encoding header is set to "deflate" this may mean that the server is vulnerable to the BREACH attack.
+ OSVDB-3092: /test.html: This might be interesting...
+ OSVDB-3092: /test/: This might be interesting...
+ 7544 requests: 6 error(s) and 8 item(s) reported on remote host
+ End Time: 2015-10-26 21:49:51 (GMT1) (1630 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

Nikto kan även spara ner rapporter i format såsom XML, HTML, NBE eller CSV. Vill du ändra User-agents så kan du göra det i nikto.conf-filen som bl.a. innehåller denna rad:

USERAGENT=Mozilla/5.00 (Nikto/@VERSION) (Evasions:@EVASIONS) (Test:@TESTID)

Verktyget följer så klart med Kali Linux eller så kan du ladda hem det från Github här.

Lämna ett svar

Din e-postadress kommer inte publiceras. Obligatoriska fält är märkta *