Nikto – 作者:LXNSEC

Nikto 已经在 Kali 中集成

Nikto1.png


Nikto 帮助手册

root@X:~# nikto -H



   Options:

       -ask+               Whether to ask about submitting updates

                               yes   Ask about each (default)

                               no    Don't ask, don't send

                               auto  Don't ask, just send

       -Cgidirs+           Scan these CGI dirs: "none", "all", or values like "/cgi/ /cgi-a/"

       -config+            Use this config file

       -Display+           Turn on/off display outputs:

                               1     Show redirects

                               2     Show cookies received

                               3     Show all 200/OK responses

                               4     Show URLs which require authentication

                               D     Debug output

                               E     Display all HTTP errors

                               P     Print progress to STDOUT

                               S     Scrub output of IPs and hostnames

                               V     Verbose output

       -dbcheck           Check database and other key files for syntax errors

       -evasion+          Encoding technique:

                               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 (\)

                               A     Use a carriage return (0x0d) as a request spacer

                               B     Use binary value 0x0b as a request spacer

        -Format+           Save file (-o) format:

                               csv   Comma-separated-value

                               json  JSON Format

                               htm   HTML Format

                               nbe   Nessus NBE format

                               sql   Generic SQL (see docs for schema)

                               txt   Plain text

                               xml   XML Format

                               (if not specified the format will be taken from the file extension passed to -output)

       -Help              Extended help information

       -host+             Target host/URL

       -404code           Ignore these HTTP codes as negative responses (always). Format is "302,301".

       -404string         Ignore this string in response body content as negative response (always). Can be a regular expression.

       -id+               Host authentication to use, format is id:pass or id:pass:realm

       -key+              Client certificate key file

       -list-plugins      List all available plugins, perform no testing

       -maxtime+          Maximum testing time per host (e.g., 1h, 60m, 3600s)

       -mutate+           Guess additional file names:

                               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)

                               5     Attempt to brute force sub-domain names, assume that the host name is the parent domain

                               6     Attempt to guess directory names from the supplied dictionary file

       -mutate-options    Provide information for mutates

       -nointeractive     Disables interactive features

       -nolookup          Disables DNS lookups

       -nossl             Disables the use of SSL

       -no404             Disables nikto attempting to guess a 404 page

       -Option            Over-ride an option in nikto.conf, can be issued multiple times

       -output+           Write output to this file ('.' for auto-name)

       -Pause+            Pause between tests (seconds, integer or float)

       -Plugins+          List of plugins to run (default: ALL)

       -port+             Port to use (default 80)

       -RSAcert+          Client certificate file

       -root+             Prepend root value to all requests, format is /directory

       -Save              Save positive responses to this directory ('.' for auto-name)

       -ssl               Force ssl mode on port

       -Tuning+           Scan tuning:

                               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

                               0     File Upload

                               a     Authentication Bypass

                               b     Software Identification

                               c     Remote Source Inclusion

                               d     WebService

                               e     Administrative Console

                               x     Reverse Tuning Options (i.e., include all except specified)

       -timeout+          Timeout for requests (default 10 seconds)

       -Userdbs           Load only user databases, not the standard databases

                               all   Disable standard dbs and load only user dbs

                               tests Disable only db_tests and load udb_tests

       -useragent         Over-rides the default useragent

       -until             Run until the specified time or duration

       -update            Update databases and plugins from CIRT.net

       -url+              Target host/URL (alias of -host)

       -useproxy          Use the proxy defined in nikto.conf, or argument http://server:port

       -Version           Print plugin and database versions

       -vhost+            Virtual host (for Host header)

    + requires a value


使用前可以先查看一下当前版本

root@X:~# nikto -Version

nikto2.png

如果当前版本较低可以自行更新

root@X:~# nikto -update


接下来通过 Metasploitable2 进行效果测试


nikto3.png


root@X:~# nikto -host http://192.168.1.7/dvwa

- Nikto v2.1.6

---------------------------------------------------------------------------

+ Target IP:          192.168.1.7

+ Target Hostname:    192.168.1.7

+ Target Port:        80

+ Start Time:         2020-06-24 14:26:58 (GMT8)

---------------------------------------------------------------------------

+ Server: Apache/2.2.8 (Ubuntu) DAV/2

+ Retrieved x-powered-by header: PHP/5.2.4-2ubuntu5.10

+ 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

+ Cookie PHPSESSID created without the httponly flag

+ Cookie security created without the httponly flag

+ Root page / redirects to: login.php

+ No CGI Directories found (use '-C all' to force check all possible dirs)

+ Server may leak inodes via ETags, header found with file /dvwa/robots.txt, inode: 93164, size: 26, mtime: Tue Mar 16 13:56:22 2010

+ Apache/2.2.8 appears to be outdated (current is at least Apache/2.4.37). Apache 2.2.34 is the EOL for the 2.x branch.

+ Uncommon header 'tcn' found, with contents: list

+ Apache mod_negotiation is enabled with MultiViews, which allows attackers to easily brute force file names. See http://www.wisec.it/sectou.php?id=4698ebdc59d15. The following alternatives for 'index' were found: index.php

+ Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE 

+ OSVDB-877: HTTP TRACE method is active, suggesting the host is vulnerable to XST

+ OSVDB-3268: /dvwa/config/: Directory indexing found.

+ /dvwa/config/: Configuration information may be available remotely.

+ OSVDB-12184: /dvwa/?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000: PHP reveals potentially sensitive information via certain HTTP requests that contain specific QUERY strings.

+ OSVDB-12184: /dvwa/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42: PHP reveals potentially sensitive information via certain HTTP requests that contain specific QUERY strings.

+ OSVDB-12184: /dvwa/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42: PHP reveals potentially sensitive information via certain HTTP requests that contain specific QUERY strings.

+ OSVDB-12184: /dvwa/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42: PHP reveals potentially sensitive information via certain HTTP requests that contain specific QUERY strings.

+ OSVDB-3092: /dvwa/login/: This might be interesting...

+ OSVDB-3268: /dvwa/docs/: Directory indexing found.

+ OSVDB-3092: /dvwa/CHANGELOG.txt: A changelog was found.

+ /dvwa/login.php: Admin login page/section found.

+ /dvwa/?-s: PHP allows retrieval of the source code via the -s parameter, and may allow command execution. See http://www.kb.cert.org/vuls/id/520827

+ /dvwa/login.php?-s: PHP allows retrieval of the source code via the -s parameter, and may allow command execution. See http://www.kb.cert.org/vuls/id/520827

+ /dvwa/CHANGELOG.txt: Version number implies that there is a SQL Injection in Drupal 7, can be used for authentication bypass (Drupageddon: see https://www.sektioneins.de/advisories/advisory-012014-drupal-pre-auth-sql-injection-vulnerability.html).

+ 7914 requests: 0 error(s) and 25 item(s) reported on remote host

+ End Time:           2020-06-24 14:27:34 (GMT8) (36 seconds)

---------------------------------------------------------------------------

+ 1 host(s) tested



扫描结果中看到有 OSVDB-877 漏洞,接下来可以利用一下

Nikto4.png

暴露了服务器配置信息



OSVDB-3268 漏洞

nikto5.png


OSVDB-12184 漏洞

nikto6.png

来源:freebuf.com 2020-06-24 15:27:20 by: LXNSEC

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享
评论 抢沙发

请登录后发表评论