# 1. 简介

Nikto是一款开源的(GPL)网页服务器扫描器,它可以对网页服务器进行全面的多种扫描,包含超过3300种有潜在危险的文件/CGIs;超过625种服务器版本;超过230种特定服务器问题。扫描项和插件可以自动更新(如果需要)。基于Whisker/libwhisker完成其底层功能。

# 站点

https://cirt.net/Nikto2 (opens new window)

# github源码

https://github.com/sullo/nikto (opens new window)

# 使用手册

https://cirt.net/nikto2-docs (opens new window)

# 2. 安装

# 2.1 源码

git clone https://github.com/sullo/nikto

# Main script is in program/
cd nikto/program

# Run using the shebang interpreter
./nikto.pl -h http://www.example.com

# Run using perl (if you forget to chmod)
perl nikto.pl -h http://www.example.com

1
2
3
4
5
6
7
8
9
10
11

# 2.2 docker安装

git clone https://github.com/sullo/nikto.git
cd nikto
docker build -t sullo/nikto .

# Call it without arguments to display the full help
docker run --rm sullo/nikto

# Basic usage
docker run --rm sullo/nikto -h http://www.example.com

# To save the report in a specific format, mount /tmp as a volume:
docker run --rm -v $(pwd):/tmp sullo/nikto -h http://www.example.com -o /tmp/out.json
1
2
3
4
5
6
7
8
9
10
11
12

# 3. 选项说明

简单使用

perl nikto.pl –h www.example.com –p 80,88,443 -o result.html -F html
1

选项

  • Cgidirs   扫描CGI目录。

  • config 使用指定的config文件来替代安装在本地的config.txt文件

  • dbcheck 选择语法错误的扫描数据库

  • evasion 使用LibWhisker中对IDS的躲避技术,可使用以下几种类型:

    • 随机URL编码(非UTF-8方式)
    • 自选择路径(/./)
    • 虚假的请求结束
    • 长的URL请求
    • 参数隐藏
    • 使用TAB作为命令的分隔符
    • 大小写敏感
    • 使用Windows路径分隔符\替换/
    • 会话重组
  • findonly 仅用来发现HTTP和HTTPS端口,而不执行检测规则

  • Format 指定检测报告输出文件的格式,默认是txt文件格式(csv/txt/htm)

  • host 目标主机,主机名、IP地址、主机列表文件。

  • id  ID和密码对于授权的HTTP认证。格式:id:password

  • mutate 变化猜测技术

    • 使用所有的root目录测试所有文件
    • 猜测密码文件名字
    • 列举Apache的用户名字(/~user)
    • 列举cgiwrap的用户名字(/cgi-bin/cgiwrap/~user)
  • nolookup 不执行主机名查找

  • output 报告输出指定地点

  • port 扫描端口指定,默认为80端口。

  • Pause 每次操作之间的延迟时间

  • Display 控制Nikto输出的显示

    • 直接显示信息
    • 显示的cookies信息
    • 显示所有200/OK的反应
    • 显示认证请求的URLs
    • Debug输出
  • ssl  强制在端口上使用SSL模式

  • Single 执行单个对目标服务的请求操作。

  • timeout 每个请求的超时时间,默认为10秒

  • Tuning Tuning 选项控制Nikto使用不同的方式来扫描目标。

    • 文件上传
    • 日志文件
    • 默认的文件
    • 信息泄漏
    • 注射(XSS/Script/HTML)
    • 远程文件检索(Web 目录中)
    • 拒绝服务
    • 远程文件检索(服务器)
    • 代码执行-远程shell
    • SQL注入
    • 认证绕过
    • 软件关联
    • 属性(不要依懒banner的信息)
    • 反向连接选项
  • useproxy 使用指定代理扫描

  • update 更新插件和数据库