再次运行相同的扫描,并添加 -nolookup 标志
现在你已经有了基线执行时间,让我们运行完全相同的扫描,但添加 -nolookup 标志。这将阻止 Nikto 执行任何反向 DNS 查找。
在你的终端中执行以下命令:
time nikto -h 127.0.0.1 -nolookup
扫描将再次运行。Nikto 的输出本身将与之前的扫描非常相似,但你应该会注意到 time 命令报告的执行时间有所不同。
- Nikto v2.5.0
---------------------------------------------------------------------------
+ Target IP: 127.0.0.1
+ Target Hostname: 127.0.0.1
+ Target Port: 80
+ Start Time: ...
---------------------------------------------------------------------------
+ Server: nginx/1.18.0 (Ubuntu)
+ 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)
+ Retrieved x-powered-by header: PHP/8.1.2
+ Allowed HTTP Methods: GET, HEAD
+ Public HTTP Methods: GET, HEAD
+ OSVDB-3233: /index.html: Server may leak inodes via ETags, header found with file /var/www/html/index.html inode 262204, size 612, mtime ...
+ 7554 requests: 0 error(s) and 7 item(s) reported on remote host
+ End Time: ... (8 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested
real 0m8.123s
user 0m7.890s
sys 0m0.201s
请注意,输出中的 Target Hostname 现在是 127.0.0.1 而不是 localhost。这是因为 Nikto 没有执行反向查找来将 IP 解析为主机名。此外,请记下新的 real 时间。