Nikto - ລະບົບຄວາມປອດໄພຂອງການ ນຳ ໃຊ້ເວັບແລະເຄື່ອງສະແກນ CGI ສຳ ລັບເຄື່ອງແມ່ຂ່າຍເວັບ


Nikto Web Scanner ແມ່ນເຄື່ອງມືທີ່ດີອີກອັນ ໜຶ່ງ ທີ່ມີເຄື່ອງມື ສຳ ລັບສານຫນູຂອງຜູ້ບໍລິຫານ Linux. ມັນແມ່ນເຄື່ອງສະແກນເວບໄຊທ໌ Open source ທີ່ປ່ອຍອອກມາພາຍໃຕ້ໃບອະນຸຍາດ GPL, ເຊິ່ງຖືກ ນຳ ໃຊ້ເພື່ອທົດສອບທີ່ສົມບູນແບບໃນເຄື່ອງແມ່ຂ່າຍເວບໄຊທ໌ ສຳ ລັບຫລາຍລາຍການເຊິ່ງລວມມີຫລາຍກວ່າ 6500 ໄຟລ໌/CGIs ທີ່ເປັນອັນຕະລາຍ.

ມັນຖືກຂຽນໂດຍ Chris Solo ແລະ David Lodge ສຳ ລັບການປະເມີນຄວາມອ່ອນແອ, ມັນກວດເບິ່ງເວີຊັນທີ່ລ້າສະ ໄໝ ກວ່າ 1250 ເຄື່ອງແມ່ຂ່າຍເວັບໄຊຕ໌ແລະຫລາຍກວ່າ 270 ບັນຫາສະເພາະ. ມັນຍັງສະແກນແລະລາຍງານ ສຳ ລັບໂປແກຼມໂປແກຼມແລະໂປແກຼມ plugins ຂອງເວັບທີ່ລ້າສະ ໄໝ.

ຄຸນລັກສະນະຂອງເຄື່ອງສະແກນເວບ Nikto

<

  • ສະ ໜັບ ສະ ໜູນ SSL
  • ສະ ໜັບ ສະ ໜູນ ໂປແກຼມ HTTP proxy ເຕັມ
  • ສະ ໜັບ ສະ ໜູນ ຂໍ້ຄວາມ, HTML, XML ແລະ CSV ເພື່ອບັນທຶກບົດລາຍງານ.
  • ສະແກນຫລາຍພອດ
  • ສາມາດສະແກນໄດ້ໃນຫລາຍເຊີບເວີໂດຍການ ນຳ ເອົາວັດສະດຸປ້ອນຈາກແຟ້ມຕ່າງໆເຊັ່ນ nmap output
  • ສະ ໜັບ ສະ ໜູນ LibWhisker IDS
  • ມີຄວາມສາມາດພຽງພໍໃນການລະບຸໂປແກຼມທີ່ຕິດຕັ້ງໄວ້ດ້ວຍຫົວ, ແຟ້ມແລະໂປແກມ
  • ບັນທຶກ ສຳ ລັບ Metasploits
  • ລາຍງານຫົວເລື່ອງທີ່ຜິດປົກກະຕິ.
  • ການຈົດທະບຽນການ ນຳ ໃຊ້ Apache ແລະ cgiwrap
  • ໂຮດຕິ້ງເປັນເຈົ້າພາບກັບ Basic ແລະ NTLM
  • ການສະແກນສາມາດຢຸດຊົ່ວຄາວໂດຍອັດຕະໂນມັດໃນເວລາທີ່ ກຳ ນົດ.
  • ຄວາມຕ້ອງການ Nikto

    ລະບົບທີ່ມີພື້ນຖານ Perl, Modl Perl, ການຕິດຕັ້ງ OpenSSL ຄວນເຮັດໃຫ້ Nikto ສາມາດໃຊ້ງານໄດ້. ມັນໄດ້ຖືກທົດສອບຢ່າງລະອຽດກ່ຽວກັບ Windows, Mac OSX ແລະການແຈກຈ່າຍ Unix/Linux ຕ່າງໆເຊັ່ນ Red Hat, Debian, Ubuntu, BackTrack, ແລະອື່ນໆ.

    ການຕິດຕັ້ງເຄື່ອງສະແກນເວບ Nikto ໃນ Linux

    ລະບົບ Linux ສ່ວນໃຫຍ່ຂອງມື້ນີ້ແມ່ນມາພ້ອມກັບຊຸດ Perl, Perl Modules ແລະ OpenSSL ທີ່ຕິດຕັ້ງໄວ້ກ່ອນ. ຖ້າບໍ່ລວມເຂົ້າ, ທ່ານສາມາດຕິດຕັ້ງພວກມັນໄດ້ໂດຍໃຊ້ລະບົບຜູ້ຈັດການຊຸດລະບົບເລີ່ມຕົ້ນທີ່ເອີ້ນວ່າ yum ຫຼື apt-get.

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

    ຖັດໄປ, ຮວບຮວມເອກະສານແຫຼ່ງຂ່າວ Nikto ທີ່ມີຄວາມ ໝັ້ນ ຄົງລ້າສຸດຈາກ Github repository, ຍ້າຍເຂົ້າໄປໃນ Nikto/programs/directory ແລະແລ່ນມັນໂດຍໃຊ້ 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.
    

    “ ເຈົ້າຂອງຕົວເລືອກຕ້ອງການການໂຕ້ຖຽງ” ແມ່ນບອກຢ່າງຈະແຈ້ງວ່າພວກເຮົາບໍ່ໄດ້ລວມເອົາຕົວ ກຳ ນົດທີ່ ຈຳ ເປັນໃນຂະນະທີ່ ດຳ ເນີນການທົດສອບ. ດັ່ງນັ້ນ, ພວກເຮົາ ຈຳ ເປັນຕ້ອງເພີ່ມພາລາມິເຕີທີ່ ຈຳ ເປັນພື້ນຖານເພື່ອເຮັດການທົດສອບ.

    ການສະແກນຂັ້ນພື້ນຖານຮຽກຮ້ອງໃຫ້ເຈົ້າພາບທີ່ທ່ານຕ້ອງການເປົ້າ ໝາຍ, ໂດຍຄ່າເລີ່ມຕົ້ນມັນຈະສະແກນ port 80 ຖ້າບໍ່ມີຫຍັງລະບຸ. ເຈົ້າພາບສາມາດເປັນ hostname ຫຼື IP Address ຂອງລະບົບ. ທ່ານສາມາດລະບຸເຈົ້າພາບໂດຍໃຊ້ຕົວເລືອກ“ -h”.

    ຕົວຢ່າງ, ຂ້ອຍຕ້ອງການເຮັດການສະແກນໃນ IP 172.16.27.56 ໃນພອດ TCP 80.

     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]. ຕົວຢ່າງ, ຂ້ອຍຕ້ອງການເຮັດການສະແກນຢູ່ IP 172.16.27.56 ໃນພອດ TCP 443.

     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

    ທ່ານຍັງສາມາດລະບຸເຈົ້າພາບ, ພອດແລະໂປໂຕຄອນໂດຍໃຊ້ syntax URL ເຕັມ, ແລະມັນຈະຖືກສະແກນ.

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

    ທ່ານຍັງສາມາດສະແກນເວບໄຊທ໌ຕ່າງໆ. ຕົວຢ່າງ, ຢູ່ນີ້ຂ້ອຍໄດ້ເຮັດການສະແກນໃນ 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 (i. e. ຫຼາຍກວ່າ 2000 ທົດສອບ) ໃນເວັບເຊີຟເວີ.

    ທ່ານຍັງສາມາດປະຕິບັດການສະແກນຫລາຍພອດໃນເວລາດຽວກັນ. ເພື່ອສະແກນຫລາຍພອດໃນໂຮດດຽວກັນ, ເພີ່ມຕົວເລືອກ“ -p” [-port] ແລະລະບຸລາຍຊື່ຂອງພອດຕ່າງໆ. ບັນດາທ່າເຮືອສາມາດຖືກ ກຳ ນົດເປັນຊ່ວງ (ເຊັ່ນ, 80-443), ຫຼືເປັນຈຸດທີ່ແຍກກັນ (ໝາຍ ເຫດ, 80,443). ຕົວຢ່າງ, ຂ້ອຍຕ້ອງການສະແກນພອດ 80 ແລະ 443 ໃນໂຮດ 172.16.27.56.

     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" ແລະບໍ່ເຮັດໃຫ້ '#' ຕັ້ງແຕ່ຈຸດເລີ່ມຕົ້ນຂອງເສັ້ນດັ່ງທີ່ສະແດງ. ຫຼັງຈາກນັ້ນຕື່ມຜູ້ໃຫ້ບໍລິການຕົວແທນ, ພອດ, ຜູ້ໃຊ້ຕົວແທນແລະລະຫັດຜ່ານ. ບັນທຶກແລະປິດແຟ້ມ.

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

    ໃນປັດຈຸບັນ, ປະຕິບັດ Nikto ໂດຍໃຊ້ຕົວເລືອກ "-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

    ເພື່ອດໍາເນີນການ Nikto ໂດຍກົງຈາກເສັ້ນຄໍາສັ່ງໂດຍໃຊ້ຕົວເລືອກ "-useproxy" ໂດຍການຕັ້ງຄ່າຕົວແທນເປັນການໂຕ້ຖຽງ.

    [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

    ທ່ານສາມາດອັບເດດ Nikto ໃຫ້ກັບ plugins ແລະຖານຂໍ້ມູນລ້າສຸດໂດຍອັດຕະໂນມັດ, ພຽງແຕ່ໃຊ້ ຄຳ ສັ່ງ“ -update”.

     perl nikto.pl -update

    ຖ້າມີການປັບປຸງ ໃໝ່, ທ່ານຈະເຫັນລາຍຊື່ຂອງການປັບປຸງ ໃໝ່ ທີ່ດາວໂຫລດມາ.

    + 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

    ທ່ານຍັງສາມາດດາວໂຫລດແລະອັບເດດປັinsກອິນແລະຖານຂໍ້ມູນ Nikto ດ້ວຍຕົນເອງໄດ້ຈາກເວັບໄຊທ໌ http://cirt.net/nikto/UPDATES/.

    ລິ້ງອ້າງອີງ

    ໜ້າ ທຳ ອິດ Nikto