web扫描工具-Nikto介绍与使用

时间:2022-06-15 14:55:26

Nikto
Perl语言开发的开源Web安全扫描器

web扫描模式:
截断代理
主动扫描

可以扫描的方面:
软件版本
搜索存在安全隐患的文件
服务器配置漏洞
WEB Application层面的安全隐患
避免404误判
-很多服务器不尊从RFC标准,对于不存在的对象返回200响应码
-依据响应文件内容判断,不同扩展名的文件404响应内容不同
-去除时间信息后的内容取MD5
-no404(考虑速度的话,)

1.Nikto 简单使用
2.Nikto-interactive(交互方式)
3.设置使用 cookie 自动登录扫描
4.使用 LibWhisker 中对 IDS 的躲避技术

1.简单使用

a 最基本的nikto扫描只需要指定目标的host(通过 -host 参数指定),也可以指定要扫描的端口号(通过 -port 来指定),默认是80,output是输出这个文件
nikto -host ip -port 80

nikto -host ip -ssl -port 443

nikto -host ip -port 80 -output

b 多端口扫描
扫描80,88,443三个端口

nikto -host ip -port 80,88,443

nikto -host ip -ssl -port 80,88,443

扫描80~90共10个端口

nikto -host ip -p 80-90

c 多host扫描
-h 参数的值为一个文件,该文件存一系列的host或者ip。

文件的格式要求是:每个host必须占一行,端口号放行末,端口号通过冒号或者逗号和host其他端口号区分开
文件示例:
192.168.0.1:80

http://192.168.0.1:8080
192.168.0.3:80

nikto -host host.txt

d 和nmap结合使用,将 nmap 发现的主机进行扫描

nmap -p80 192.168.1.0/24 -oG - | nikto -host -

e 支持代理
nikto -host ip -usertproxy url

2.Nikto-interactive(交互方式)

在扫描的过程中敲下按键,即可打开开关

按一次为打开开关,再按一次为关闭

Space – report current scan status

v – verbose mode on/off
//显示正在扫描的内容详细信息

d – debug mode on/off
//更详细的扫描内容信息

e – error reporting on/off

//查看扫描过程中错误的信息

p – progress reporting on/off
//查看扫描的进度

r – redirect display on/off
//把所有的重定向显示出来

c – cookie display on/off

//把所有COOKIE显示出来

a – auth display on/off

//把身份认证的过程显示出来

q – quit

//退出扫描

N – next host

//停止这个地址的扫描,扫描host列表的下一个

P - Pause

//暂停

3.设置使用 cookie 自动登录扫描

第一种:基于HTTP身份认证
现在使用基于HTTP做身份验证的网站很少,这种方式更多应用于嵌入式设备,更多网站基于表单做身份验证。

使用id参数
id 主机使用的身份验证,格式是 ID:密码 或 ID:密码:域

第二种:使用 cookie 自动登录扫描

我们需要把cookie设置到配置文件
配置文件位置: /etc/nikto.conf

a 配置文件默认使用 Nikto 的 User Agent,更改为 IE8 或其他

root@kali:~# vim /etc/nikto.conf

#USERAGENT=Mozilla/5.00 (Nikto/@VERSION) (Evasions:@EVASIONS) (Test:@TESTID)

USERAGENT=Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)
# 17行

# 更换为 IE8:单击 User-Agent-Swicher,选择并复制其中的UA值

b 配置默认 cookie

# "cookie1"="cookie value";"cookie2"="cookie val"

STATIC-COOKIE="PHPSESSID"="31ce7cd539ed93f182d7881460fe0def";"security"="high"
# 57行

c 使用修改过配置文件的 nikto 进行扫描,扫描过程中按 d 进行 debug 模式,进行验证配置信息

root@kali:~# nikto -host http://172.16.10.133/dvwa -port 80

4. 使用 LibWhisker 中对 IDS 的躲避技术
# -evasion
Specify the LibWhisker IDS evasion technique to use (see the LibWhisker docs for detailed information on
these). Use the reference number to specify the type, multiple may be used:

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

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

1 随机 URL 编码(非 UTF-8 方式)

2 自然选择路径 (/./)

3 过早的结束URL

4 优先考虑长随机字符串

5 参数欺骗

6 使用 TAB 作为命令的分隔符

7 使用变化的 URL

8 使用 windows 路径风额度 "\"

例子:nikto -host http://172.16.10.133/dvwa -evasion 167

nikto 参数
Nikto 是一个比较全面的网页扫描器。

选项:
-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+ 扫描这些CGI目录: "none", "all", or values like "/cgi/ /cgi-a/"
-config+ 使用指定的config文件来替代安装在本地的config.txt文件

-Display+ Turn on/off display outputs:
1 显示重定向
2 显示接受 cookie
3 显示所有200/OK响应
4 显示要求验证的 URL
D 调试输出
E 显示所有HTTP错误 P 打印处理进度到STDOUT
S 格式输出IP地址和主机名
V 详细输出

-dbcheck Check database and other key files for syntax errors

-evasion+ 编码技术: 该选项能够对扫描包进行一些变形,绕过IDC检测。可使用以下几种类型:
1 随机URI编码 (non-UTF8)
2 使用相对路径作为参考 (/./)
3 Premature URL ending 虚假的请求结束
4 Prepend long random string 长的URL请求
5 隐藏参数
6 使用 TAB 作为命令的分隔符
7 大小写敏感
8 使用Windows路径分隔符\替换

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 逗号分隔值
htm HTML格式
nbe Nessus的NBE格式
sql Generic SQL (see docs for schema)
txt 文本(默认情况下,如果没有指定)
xml XML格式
(if not specified the format will be taken from the file extension passed to -output)

-Help 帮助
-host+ 目标主机
-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+ 主机使用的身份验证,格式是 ID:密码 或 ID:密码:领域
-key+ Client certificate key file
-list-plugins 列出所有可用的插件,不执行测试
-maxtime+ 每个主机的最大测试时间 (e.g., 1h, 60m, 3600s)

-mutate+ 猜额外的文件名。变化猜测技术:
1 测试所有的文件,所有的根目录
2 猜测密码文件名
3 通过Apache枚举用户名(/~user type requests)
4 通过cgiwrap枚举用户名(/cgi-bin/cgiwrap/~user type requests)
5 试暴力破解子域名,假设主机名称是父域名
6 尝试使用从提供的字典文件的目录名称

-mutate-options Provide information for mutates
-nointeractive 禁用交互特性
-nolookup 禁止DNS查找
-nossl 禁止使用SSL
-no404 禁用Nikto尝试猜测404页
-Option Over-ride an option in nikto.conf, can be issued multiple times
-output+ Write output to this file ('.' for auto-name)
-Pause+ 测试之间的停顿(秒,整数或浮点数)
-Plugins+ 列出正在运行的插件(默认:ALL)
-port+ 要使用的端口(默认80)
-RSAcert+ Client certificate file
-root+ 前面加上root值到所有请求,格式为/目录
-Save Save positive responses to this directory ('.' for auto-name)
-ssl 强制SSL端口模式

-Tuning+ 扫描选项: 选项控制Nikto使用不同的方式来扫描目标。
1 日志文件
2 默认文件
3 信息泄漏
4 注入 (XSS/Script/HTML)
5 远程文件检索 - Inside Web Root
6 拒绝服务
7 远程文件检索 - Server Wide
8 执行命令 / 远程shell
9 SQL 注入
0 文件上传
a 认证绕过
b 软件关联
c Remote Source Inclusion
d WebService
e Administrative Console
x 反向连接选项 (i.e., include all except specified)

-timeout+ 请求超时时间 (默认 10 秒)
-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 从 CIRT.net 更新 数据库 和 插件
-useproxy 使用在 nikto.conf 定义的代理, 或者 使用参数 http://server:port
-Version 打印插件和数据库版本
-vhost+ 虚拟主机(用于主机头)
+ requires a value

web扫描工具-Nikto介绍与使用的更多相关文章

  1. 小白日记28:kali渗透测试之Web渗透-扫描工具-Nikto

    扫描工具-Nikto #WEB渗透 靶机:metasploitable 靶场:DVWA[默认账号/密码:admin/password] #新手先将DVWA的安全性,调到最低,可容易发现漏洞 侦察[减少 ...

  2. 小白学习安全测试(三)——扫描工具-Nikto使用

    扫描工具-Nikto #基于WEB的扫描工具,基本都支持两种扫描模式.代理截断模式,主动扫描模式 手动扫描:作为用户操作发现页面存在的问题,但可能会存在遗漏 自动扫描:基于字典,提高速度,但存在误报和 ...

  3. 漏洞扫描工具AWVS介绍及安装教程

    PS:webug靶场全都通关了,你也就是个合格的新手了. 上次我们在通关webug靶场第三关的时候,提到一个漏洞扫描工具叫做AWVS.这次我们介绍一下它. 1 AWVS漏洞扫描工具 Acunetix ...

  4. Arachni web扫描工具

    扫描工具-Arachni from:https://blog.csdn.net/zixuanfy/article/details/52818527 ./arachni_console         ...

  5. IBM Security AppScan Standard WEB扫描工具

    IBM Security AppScan Standard是一款著名的web漏洞扫描工具, 可以设定登录账户,录制登录 扫描完成后可以生成报告,生成的报告非常详细

  6. nikto for windows(web扫描工具) 使用教程

    本文出处: 欧普软件 ----------------------------------------------------------------------------------------- ...

  7. 扫描工具nmap介绍

    NMap,也就是Network Mapper,最早是Linux下的网络扫描和嗅探工具包. 简介 nmap是一个网络连接端扫描软件,用来扫描网上电脑开放的网络连接端.确定哪些服务运行在哪些连接端,并且推 ...

  8. 扫描工具-Nikto

    靶机 192.168.1.101 攻击机 192.168.1.102 尝试ping命令 第一个工具 作用 Httrack --->(把目标的网站复制过来) 这样可以减少与目标系统的交互 mkdi ...

  9. AppScan--图解Web扫描工具IBM Security App Scan Standard

    App Scan用法:   首先打开IBM Security AppScan Standard 工具   点击 创建新的扫描 ->  点击”常规扫描“ ->之后你就会看到如下图:     ...

随机推荐

  1. C 调用redis缓冲

    下载 redis 文件, 进行编译 wget https://github.com/redis/hiredis/archive/master.zip 将其解压, 并编译 unzip -x  maste ...

  2. Oracle 在线重定义表分区

    ==================原始表================原始表=====================原始表 create table BUILDING_temp(building ...

  3. 线上任务的mysql 重启

    我们的业务是 所使用的数据库是 自己搭建的mysql-server-5.05, 服务器 红帽子6.0. 考虑到 服务的稳定性,计划将数据库向dba进行迁移,由他们进行维护.dba的迁移计划是 1 先创 ...

  4. 用 R 进行高频金融数据分析简介

    作者:李洪成 摘自:http://cos.name/wp-content/uploads/2013/11/ChinaR2013SH_Nov03_04_LiHongcheng.pdf 高频数据 金融市场 ...

  5. 调用xml文件的bean

    AcTest.class package com.zyz.db; import com.zyz.dao.PersonDao; import org.springframework.context.Ap ...

  6. SVN switch 用法详解

    一直知道SVN有个switch命令,但是对它的介绍教程却很少,大多是生硬的svn帮助文档里的文字,从而一直不怎么会用.今天看了这篇文章,突觉豁然开朗,整理下来以备查阅. 使用SVN,自然是需要与别人合 ...

  7. 微信开发笔记(一)通过.net如何实现接入微信

    微信公众平台,给个人.企业和组织提供业务服务与用户管理能力的全新服务平台.现在基本上每个地方都可以看到微信存在,动不动就是让你扫一下加下微信. 经常遇到这样情况,“到一家餐馆吃饭,拿了个号,前台服务引 ...

  8. Java OOP考试错题分析

      解析: A.ArrayList 可以存储NULL值,也可以存储重复的值,对集合没有任何影响. B.一旦实例化不可改变自身大小,这是数组的特性.集合的容量是自身扩容的. C.ArrayList可以存 ...

  9. OpenAI dota2大战人类顶尖选手视频

    AI大战Dendi:http://www.bilibili.com/video/av13267474/?zw#quality=3 AI大战Sumail:http://www.bilibili.com/ ...

  10. 做自己的软件的Gallery(一)

    先上效果图: 如图,android默认也有Gallery,很多软件在调用时,都是使用自己的Gallery,一方面好维护,另外一方面可以做优化.要做成以上样式,图片加载类起至关重要,一不小心,就好OOM ...