നിക്ടോ - വെബ് സെർവറുകൾക്കായുള്ള ഒരു വെബ് ആപ്ലിക്കേഷൻ ദുർബലതയും CGI സ്കാനറും


Nikto Web Scanner എന്നത് ഏതൊരു Linux അഡ്uമിനിസ്uട്രേറ്ററുടെ ആയുധപ്പുരയ്ക്കായുള്ള മറ്റൊരു മികച്ച ഉപകരണമാണ്. GPL ലൈസൻസിന് കീഴിൽ പുറത്തിറക്കിയ ഒരു ഓപ്പൺ സോഴ്uസ് വെബ് സ്കാനറാണിത്, ഇത് 6500-ലധികം അപകടകരമായ ഫയലുകൾ/CGI-കൾ ഉൾപ്പെടെ ഒന്നിലധികം ഇനങ്ങൾക്കായി വെബ് സെർവറുകളിൽ സമഗ്രമായ പരിശോധനകൾ നടത്താൻ ഉപയോഗിക്കുന്നു.

ഇത് ക്രിസ് സോളോയും ഡേവിഡ് ലോഡ്ജും ചേർന്ന് വൾനറബിലിറ്റി വിലയിരുത്തലിനായി എഴുതിയതാണ്, ഇത് 1250 വെബ് സെർവറുകളിൽ കൂടുതൽ കാലഹരണപ്പെട്ട പതിപ്പുകളും 270-ലധികം പതിപ്പ് നിർദ്ദിഷ്ട പ്രശ്നങ്ങളും പരിശോധിക്കുന്നു. കാലഹരണപ്പെട്ട വെബ് സെർവർ സോഫ്uറ്റ്uവെയറുകൾക്കും പ്ലഗിന്നുകൾക്കുമായി ഇത് സ്കാൻ ചെയ്യുകയും റിപ്പോർട്ടുചെയ്യുകയും ചെയ്യുന്നു.

നിക്ടോ വെബ് സ്കാനറിന്റെ സവിശേഷതകൾ

  1. എസ്എസ്എൽ പിന്തുണയ്ക്കുന്നു
  2. പൂർണ്ണ HTTP പ്രോക്സിയെ പിന്തുണയ്ക്കുന്നു
  3. റിപ്പോർട്ടുകൾ സംരക്ഷിക്കാൻ ടെക്സ്റ്റ്, HTML, XML, CSV എന്നിവയെ പിന്തുണയ്ക്കുന്നു.
  4. ഒന്നിലധികം പോർട്ടുകൾക്കായി സ്കാൻ ചെയ്യുക
  5. nmap ഔട്ട്uപുട്ട് പോലുള്ള ഫയലുകളിൽ നിന്ന് ഇൻപുട്ടുകൾ എടുത്ത് ഒന്നിലധികം സെർവറുകളിൽ സ്കാൻ ചെയ്യാൻ കഴിയും
  6. LibWhisker IDS പിന്തുണയ്ക്കുക
  7. തലക്കെട്ടുകൾ, ഫയലുകൾ, ഫേവിക്കോണുകൾ എന്നിവ ഉപയോഗിച്ച് ഇൻസ്റ്റാൾ ചെയ്ത സോഫ്uറ്റ്uവെയർ തിരിച്ചറിയാൻ മതിയായ കഴിവുണ്ട്
  8. മെറ്റാസ്uപ്ലോയിറ്റുകൾക്കായുള്ള ലോഗുകൾ
  9. അസാധാരണ തലക്കെട്ടുകൾക്കുള്ള റിപ്പോർട്ടുകൾ.
  10. അപ്പാച്ചെ, cgiwrap ഉപയോക്തൃ കണക്ക്
  11. ബേസിക്, NTLM എന്നിവ ഉപയോഗിച്ച് ഹോസ്റ്റുകൾ പ്രാമാണീകരിക്കുക
  12. നിർദ്ദിഷ്uട സമയത്ത് സ്കാനുകൾ സ്വയമേവ താൽക്കാലികമായി നിർത്താനാകും.

നിക്ടോ ആവശ്യകതകൾ

അടിസ്ഥാന പേൾ, പേൾ മൊഡ്യൂളുകൾ, ഓപ്പൺഎസ്എസ്എൽ ഇൻസ്റ്റലേഷൻ എന്നിവയുള്ള ഒരു സിസ്റ്റം നിക്ടോയെ പ്രവർത്തിപ്പിക്കാൻ പ്രാപ്തമാക്കണം. ഇത് Windows, Mac OSX എന്നിവയിലും Red Hat, Debian, Ubuntu, BackTrack, മുതലായ വിവിധ Unix/Linux വിതരണങ്ങളിലും നന്നായി പരീക്ഷിച്ചു.

Linux-ൽ Nikto Web Scanner-ന്റെ ഇൻസ്റ്റാളേഷൻ

ഇന്നത്തെ മിക്ക ലിനക്സ് സിസ്റ്റങ്ങളും പ്രീ-ഇൻസ്റ്റാൾ ചെയ്ത പേൾ, പേൾ മൊഡ്യൂളുകൾ, ഓപ്പൺഎസ്എസ്എൽ പാക്കേജുകൾ എന്നിവയുമായാണ് വരുന്നത്. ഉൾപ്പെടുത്തിയിട്ടില്ലെങ്കിൽ, yum അല്ലെങ്കിൽ apt-get എന്ന് വിളിക്കുന്ന ഡിഫോൾട്ട് സിസ്റ്റം പാക്കേജ് മാനേജർ യൂട്ടിലിറ്റി ഉപയോഗിച്ച് നിങ്ങൾക്ക് അവ ഇൻസ്റ്റാൾ ചെയ്യാൻ കഴിയും.

 yum install perl perl-Net-SSLeay openssl
 apt-get install perl openssl libnet-ssleay-perl

അടുത്തതായി, Github ശേഖരണത്തിൽ നിന്ന് ഏറ്റവും പുതിയ സ്ഥിരതയുള്ള Nikto സോഴ്uസ് ഫയലുകൾ ക്ലോൺ ചെയ്യുക, Nikto/programs/ ഡയറക്ടറിയിലേക്ക് നീങ്ങി perl ഉപയോഗിച്ച് പ്രവർത്തിപ്പിക്കുക:

$ git clone https://github.com/sullo/nikto.git
$ cd nikto/programs
$ perl nikto.pl -h 
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.

\ഓപ്ഷൻ ഹോസ്റ്റിന് ഒരു ആർഗ്യുമെന്റ് ആവശ്യമാണ് എന്നത് ഒരു ടെസ്റ്റ് നടത്തുമ്പോൾ ആവശ്യമായ പാരാമീറ്ററുകൾ ഞങ്ങൾ ഉൾപ്പെടുത്തിയിട്ടില്ലെന്ന് വ്യക്തമായി പറയുന്നു. അതിനാൽ, ഒരു ടെസ്റ്റ് റൺ നടത്തുന്നതിന് ആവശ്യമായ അടിസ്ഥാന പാരാമീറ്റർ ഞങ്ങൾ ചേർക്കേണ്ടതുണ്ട്.

അടിസ്ഥാന സ്കാനിന് നിങ്ങൾ ടാർഗെറ്റുചെയ്യാൻ ആഗ്രഹിക്കുന്ന ഒരു ഹോസ്റ്റ് ആവശ്യമാണ്, ഒന്നും വ്യക്തമാക്കിയിട്ടില്ലെങ്കിൽ സ്ഥിരസ്ഥിതിയായി അത് പോർട്ട് 80 സ്കാൻ ചെയ്യുന്നു. ഹോസ്റ്റ് ഒന്നുകിൽ ഒരു സിസ്റ്റത്തിന്റെ ഹോസ്റ്റ്നാമം അല്ലെങ്കിൽ IP വിലാസം ആകാം. \-h ഓപ്ഷൻ ഉപയോഗിച്ച് നിങ്ങൾക്ക് ഒരു ഹോസ്റ്റ് വ്യക്തമാക്കാം.

ഉദാഹരണത്തിന്, TCP പോർട്ട് 80-ൽ ഒരു IP 172.16.27.56-ൽ ഒരു സ്കാൻ ചെയ്യാൻ ഞാൻ ആഗ്രഹിക്കുന്നു.

 perl nikto.pl -h 172.16.27.56
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        80
+ Start Time:         2014-01-10 00:48:12 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Retrieved x-powered-by header: PHP/5.3.3
+ The anti-clickjacking X-Frame-Options header is not present.
+ Server leaks inodes via ETags, header found with file /robots.txt, inode: 5956160, size: 24, mtime: 0x4d4865a054e32
+ File/dir '/' in robots.txt returned a non-forbidden or redirect HTTP code (200)
+ "robots.txt" contains 1 entry which should be manually viewed.
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
+ Multiple index files found: index.php, index.htm, index.html
+ DEBUG HTTP verb may show server debugging information. See http://msdn.microsoft.com/en-us/library/e8z01xdh%28VS.80%29.aspx for details.
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST
+ OSVDB-3233: /phpinfo.php: Contains PHP configuration information
+ OSVDB-12184: /index.php?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000: PHP reveals potentially sensitive information via certain HTTP requests that contain specific QUERY strings.
+ OSVDB-3092: /test.html: This might be interesting...
+ OSVDB-3268: /icons/: Directory indexing found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ /connect.php?path=http://cirt.net/rfiinc.txt?: Potential PHP MySQL database connection string found.
+ OSVDB-3092: /test.php: This might be interesting...
+ 6544 items checked: 0 error(s) and 16 item(s) reported on remote host
+ End Time:           2014-01-10 00:48:23 (GMT5.5) (11 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

നിങ്ങൾക്ക് മറ്റൊരു പോർട്ട് നമ്പറിൽ സ്കാൻ ചെയ്യണമെങ്കിൽ, \-p” [-port] ഓപ്ഷൻ ചേർക്കുക. ഉദാഹരണത്തിന്, TCP പോർട്ട് 443-ൽ IP 172.16.27.56-ൽ ഒരു സ്കാൻ ചെയ്യാൻ ഞാൻ ആഗ്രഹിക്കുന്നു.

 perl nikto.pl -h 172.16.27.56 -p 443
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        443
---------------------------------------------------------------------------
+ SSL Info:        Subject: /O=*.mid-day.com/OU=Domain Control Validated/CN=*.mid-day.com
                   Ciphers: DHE-RSA-AES256-GCM-SHA384
                   Issuer:  /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certificates.starfieldtech.com/repository/CN=Starfield Secure Certification Authority/serialNumber=10688435
+ Start Time:         2014-01-10 01:08:26 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Server leaks inodes via ETags, header found with file /, inode: 2817021, size: 5, mtime: 0x4d5123482b2e9
+ The anti-clickjacking X-Frame-Options header is not present.
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
+ Server is using a wildcard certificate: '*.mid-day.com'
+ Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE
+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST
+ OSVDB-3268: /icons/: Directory indexing found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ 6544 items checked: 0 error(s) and 8 item(s) reported on remote host
+ End Time:           2014-01-10 01:11:20 (GMT5.5) (174 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested

ഒരു പൂർണ്ണ URL വാക്യഘടന ഉപയോഗിച്ച് നിങ്ങൾക്ക് ഹോസ്റ്റുകൾ, പോർട്ടുകൾ, പ്രോട്ടോക്കോളുകൾ എന്നിവ വ്യക്തമാക്കാനും കഴിയും, അത് സ്കാൻ ചെയ്യപ്പെടും.

 perl nikto.pl -h http://172.16.27.56:80

നിങ്ങൾക്ക് ഏത് വെബ്uസൈറ്റും സ്കാൻ ചെയ്യാനും കഴിയും. ഉദാഹരണത്തിന്, ഇവിടെ ഞാൻ google.com-ൽ ഒരു സ്കാൻ നടത്തി.

 perl nikto.pl -h http://www.google.com
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          173.194.38.177
+ Target Hostname:    www.google.com
+ Target Port:        80
+ Start Time:         2014-01-10 01:13:36 (GMT5.5)
---------------------------------------------------------------------------
+ Server: gws
+ Cookie PREF created without the httponly flag
+ Cookie NID created without the httponly flag
+ Uncommon header 'x-frame-options' found, with contents: SAMEORIGIN
+ Uncommon header 'x-xss-protection' found, with contents: 1; mode=block
+ Uncommon header 'alternate-protocol' found, with contents: 80:quic
+ Root page / redirects to: http://www.google.co.in/?gws_rd=cr&ei=xIrOUomsCoXBrAee34DwCQ
+ Server banner has changed from 'gws' to 'sffe' which may suggest a WAF, load balancer or proxy is in place
+ Uncommon header 'x-content-type-options' found, with contents: nosniff
+ No CGI Directories found (use '-C all' to force check all possible dirs)
+ File/dir '/groups/' in robots.txt returned a non-forbidden or redirect HTTP code (302)
….

മുകളിലുള്ള കമാൻഡ് വെബ് സെർവറിൽ ഒരു കൂട്ടം http അഭ്യർത്ഥനകൾ (അതായത് 2000-ലധികം ടെസ്റ്റുകൾ) നടത്തും.

നിങ്ങൾക്ക് ഒരേ സെഷനിൽ ഒന്നിലധികം പോർട്ടുകൾ സ്കാൻ ചെയ്യാനും കഴിയും. ഒരേ ഹോസ്റ്റിൽ ഒന്നിലധികം പോർട്ടുകൾ സ്കാൻ ചെയ്യുന്നതിന്, “-p” [-port] ഓപ്ഷൻ ചേർത്ത് പോർട്ടുകളുടെ ലിസ്റ്റ് വ്യക്തമാക്കുക. പോർട്ടുകളെ ഒരു ശ്രേണിയായി നിർവചിക്കാം (അതായത്, 80-443), അല്ലെങ്കിൽ കോമ വേർതിരിച്ച് (അതായത്, 80,443). ഉദാഹരണത്തിന്, ഹോസ്റ്റ് 172.16.27.56-ൽ 80, 443 പോർട്ടുകൾ സ്കാൻ ചെയ്യാൻ ഞാൻ ആഗ്രഹിക്കുന്നു.

 perl nikto.pl -h 172.16.27.56 -p 80,443
- Nikto v2.1.5
---------------------------------------------------------------------------
+ No web server found on cmsstage.mid-day.com:88
---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        80
+ Start Time:         2014-01-10 20:38:26 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ Retrieved x-powered-by header: PHP/5.3.3
+ The anti-clickjacking X-Frame-Options header is not present.

---------------------------------------------------------------------------
+ Target IP:          172.16.27.56
+ Target Hostname:    example.com
+ Target Port:        443
---------------------------------------------------------------------------
+ SSL Info:        Subject: /O=*.mid-day.com/OU=Domain Control Validated/CN=*.mid-day.com
                   Ciphers: DHE-RSA-AES256-GCM-SHA384
                   Issuer:  /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certificates.starfieldtech.com/repository/CN=Starfield Secure Certification Authority/serialNumber=10688435
+ Start Time:         2014-01-10 20:38:36 (GMT5.5)
---------------------------------------------------------------------------
+ Server: Apache/2.2.15 (CentOS)
+ All CGI directories 'found', use '-C none' to test none
+ Apache/2.2.15 appears to be outdated (current is at least Apache/2.2.22). Apache 1.3.42 (final release) and 2.0.64 are also current.
.....

Nikto പ്രവർത്തിക്കുന്ന ഒരു സിസ്റ്റത്തിന് ഒരു HTTP പ്രോക്സി വഴി ടാർഗെറ്റ് ഹോസ്റ്റിലേക്ക് മാത്രമേ ആക്സസ് ഉള്ളൂ എന്ന് നമുക്ക് പറയാം, രണ്ട് വ്യത്യസ്ത വഴികൾ ഉപയോഗിച്ച് ഇപ്പോഴും ടെസ്റ്റ് നടത്താം. ഒന്ന് nikto.conf ഫയൽ ഉപയോഗിക്കുന്നു, മറ്റൊരു മാർഗ്ഗം കമാൻഡ് ലൈനിൽ നിന്ന് നേരിട്ട് പ്രവർത്തിപ്പിക്കുക എന്നതാണ്.

ഏതെങ്കിലും കമാൻഡ് ലൈൻ എഡിറ്റർ ഉപയോഗിച്ച് nikto.conf ഫയൽ തുറക്കുക.

 vi nikto.conf

PROXY എന്ന വേരിയബിളിനായി തിരയുക, കാണിച്ചിരിക്കുന്നതുപോലെ വരികളുടെ തുടക്കം മുതൽ '#' കമന്റ് ചെയ്യുക. തുടർന്ന് പ്രോക്uസി ഹോസ്റ്റ്, പോർട്ട്, പ്രോക്uസി യൂസർ, പാസ്uവേഡ് എന്നിവ ചേർക്കുക. ഫയൽ സംരക്ഷിച്ച് അടയ്ക്കുക.

# Proxy settings -- still must be enabled by -useproxy
PROXYHOST=172.16.16.37
PROXYPORT=8080
PROXYUSER=pg
PROXYPASS=pg

ഇപ്പോൾ, “-useproxy” ഓപ്ഷൻ ഉപയോഗിച്ച് നിക്ടോ എക്സിക്യൂട്ട് ചെയ്യുക. എല്ലാ കണക്ഷനുകളും HTTP പ്രോക്സി വഴി റിലേ ചെയ്യപ്പെടുമെന്ന് ദയവായി ശ്രദ്ധിക്കുക.

[email  nikto-2.1.5]# perl nikto.pl -h localhost -p 80 -useproxy
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          127.0.0.1
+ Target Hostname:    localhost
+ Target Port:        80
+ Start Time:         2014-01-10 21:28:29 (GMT5.5)
---------------------------------------------------------------------------
+ Server: squid/2.6.STABLE6
+ Retrieved via header: 1.0 netserv:8080 (squid/2.6.STABLE6)
+ The anti-clickjacking X-Frame-Options header is not present.
+ Uncommon header 'x-squid-error' found, with contents: ERR_CACHE_ACCESS_DENIED 0
+ Uncommon header 'x-cache-lookup' found, with contents: NONE from netserv:8080

പ്രോക്uസിയെ ആർഗ്യുമെന്റായി സജ്ജീകരിച്ച് “-useproxy” ഓപ്ഷൻ ഉപയോഗിച്ച് കമാൻഡ് ലൈനിൽ നിന്ന് നേരിട്ട് Nikto പ്രവർത്തിപ്പിക്കുന്നതിന്.

[email  nikto-2.1.5]# perl nikto.pl -h localhost -useproxy http://172.16.16.37:8080/
- Nikto v2.1.5
---------------------------------------------------------------------------
+ Target IP:          127.0.0.1
+ Target Hostname:    localhost
+ Target Port:        80
+ Start Time:         2014-01-10 21:34:51 (GMT5.5)
---------------------------------------------------------------------------
+ Server: squid/2.6.STABLE6
+ Retrieved via header: 1.0 netserv:8080 (squid/2.6.STABLE6)
+ The anti-clickjacking X-Frame-Options header is not present.
+ Uncommon header 'x-squid-error' found, with contents: ERR_CACHE_ACCESS_DENIED 0
+ Uncommon header 'x-cache-lookup' found, with contents: NONE from netserv:8080

നിങ്ങൾക്ക് ഏറ്റവും പുതിയ പ്ലഗിന്നുകളിലേക്കും ഡാറ്റാബേസുകളിലേക്കും സ്വയമേവ നിക്റ്റോ അപ്ഡേറ്റ് ചെയ്യാം, -അപ്ഡേറ്റ് കമാൻഡ് പ്രവർത്തിപ്പിക്കുക.

 perl nikto.pl -update

പുതിയ അപ്uഡേറ്റുകൾ ലഭ്യമാണെങ്കിൽ, ഡൗൺലോഡ് ചെയ്uത പുതിയ അപ്uഡേറ്റുകളുടെ ഒരു ലിസ്റ്റ് നിങ്ങൾ കാണും.

+ Retrieving 'nikto_report_csv.plugin'
+ Retrieving 'nikto_headers.plugin'
+ Retrieving 'nikto_cookies.plugin'
+ Retrieving 'db_tests'
+ Retrieving 'db_parked_strings'
+ Retrieving 'CHANGES.txt'
+ CIRT.net message: Please submit Nikto bugs to http://trac2.assembla.com/Nikto_2/report/2

നിങ്ങൾക്ക് http://cirt.net/nikto/UPDATES/ എന്നതിൽ നിന്ന് നിക്uടോ പ്ലഗിന്നുകളും ഡാറ്റാബേസുകളും സ്വമേധയാ ഡൗൺലോഡ് ചെയ്യാനും അപ്uഡേറ്റ് ചെയ്യാനും കഴിയും.

റഫറൻസ് ലിങ്കുകൾ

നിക്ടോ ഹോംപേജ്