使用 -evasion 1 进行随机 URI 编码扫描
在本步骤中,你将使用第一个规避技术,“随机 URI 编码”。此技术以非标准方式对请求 URI 的部分进行编码。虽然 Web 服务器通常能理解这些编码,但基于签名的简单 IDS 可能会无法匹配模式,从而使请求在未被检测到的情况下通过。
我们将对你在实验设置中启动的简单 Web 服务器进行扫描。它运行在 http://127.0.0.1:8000。
要使用技术 1,你需要将该编号附加到 -evasion 选项。在你的终端中执行以下命令:
nikto -h http://127.0.0.1:8000 -evasion 1
Nikto 现在将开始扫描目标。扫描将照常进行,但发送到服务器的请求的 URI 将被随机编码。
以下是你可能看到的输出示例:
- Nikto v2.5.0
---------------------------------------------------------------------------
+ Target IP: 127.0.0.1
+ Target Hostname: 127.0.0.1
+ Target Port: 8000
+ Start Time: ...
---------------------------------------------------------------------------
+ Server: SimpleHTTP/0.6 Python/3.10.12
+ The anti-clickjacking X-Frame-Options header is not present.
+ 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 a possible file system path: /home/labex/project/test-site/. This may suggest the server is running on a Unix-like system.
+ Allowed HTTP Methods: GET, HEAD, OPTIONS
+ Public HTTP Methods: GET, HEAD, OPTIONS
+ OSVDB-3233: /: HTTP TRACE method is active, suggesting the host is vulnerable to XST
...
+ 15 requests: 0 error(s) and 7 item(s) reported on remote host
+ End Time: ... (15 seconds)
---------------------------------------------------------------------------
+ 1 host(s) tested
请注意,扫描已完成并提供了发现结果,但底层请求已修改为更具规避性。