当前位置:   article > 正文

Afuzz:一款功能强大的自动化Web路径模糊测试工具

afuzz

关于Afuzz

Afuzz是一款功能强大的自动化Web路径模糊测试工具,该工具专为Web安全专家和漏洞奖励Hunter设计,可以帮助我们以自动化的形式扫描和收集目标Web应用程序中的页面、语言和相关统计分析等数据。

功能介绍

1、Afuzz可以通过自动化的形式检测目标Web应用程序所使用的开发语言;

2、使用黑名单过滤无效页面;

3、使用白名单寻找漏洞奖励Hunter感兴趣的页面内容;

4、过滤页面中的随机内容;

5、以多种方式判断404错误页面;

6、扫描完成后执行统计数据分析,并生成最终的结果;

7、支持HTTP2;

工具安装

由于该工具基于Python开发,因此我们首先需要在本地设备上安装并配置好Python环境。接下来,广大研究人员可以直接使用下列命令将该项目源码克隆至本地:

git clone https://github.com/rapiddns/Afuzz.git

然后切换到项目目录中,使用pip工具和项目提供的requirements.txt文件安装该工具所需的其他依赖组件:

cd Afuzz

pip install -r requirements.txt

依赖组件安装完成后,执行下列安装脚本即可:

python setup.py install

除此之外,我们还可以直接使用pip工具安装Afuzz:

pip install afuzz

工具选项

参数解释

-h, --help             显示工具帮助信息和退出

  -u URL, --url URL      设置目标URL

  -o OUTPUT, --output OUTPUT

                        输出文件路径

  -e EXTENSIONS, --extensions EXTENSIONS

                        扩展列表,逗号分隔 (例如: php,aspx,jsp)

  -t THREAD, --thread THREAD

                        线程数量

  -d DEPTH, --depth DEPTH

                        最大递归深度

  -w WORDLIST, --wordlist WORDLIST

                        字典文件路径

  -f, --fullpath           完整路径

  -p PROXY, --proxy PROXY

                        代理, (例如:http://127.0.0.1:8080)

工具运行

使用命令

afuzz -u https://target
afuzz -e php,html,js,json -u https://target
afuzz -e php,html,js -u https://target -d 3

多线程使用

afuzz -e aspx,jsp,php,htm,js,bak,zip,txt,xml -u https://target -t 50

工具运行样例

afuzz -u http://testphp.vulnweb.com -t 30

扫描结果

数据表

  1. +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  2. |                                                                                    http://testphp.vulnweb.com/                                                                                    |
  3. +-----------------------------+---------------------+--------+-----------------------------------+-----------------------+--------+--------------------------+-------+-------+-----------+----------+
  4. |            target           |         path        | status |              redirect             |         title         | length |       content-type       | lines | words |    type   |   mark   |
  5. +-----------------------------+---------------------+--------+-----------------------------------+-----------------------+--------+--------------------------+-------+-------+-----------+----------+
  6. | http://testphp.vulnweb.com/ | .idea/workspace.xml |  200   |                                   |                       | 12437  |         text/xml         |  217  |  774  |   check   |          |
  7. | http://testphp.vulnweb.com/ |        admin        |  301   | http://testphp.vulnweb.com/admin/ | 301 Moved Permanently |  169   |        text/html         |   8   |   11  |   folder  |   30x    |
  8. | http://testphp.vulnweb.com/ |      login.php      |  200   |                                   |       login page      |  5009  |        text/html         |  120  |  432  |   check   |          |
  9. | http://testphp.vulnweb.com/ |     .idea/.name     |  200   |                                   |                       |   6    | application/octet-stream |   1   |   1   |   check   |          |
  10. | http://testphp.vulnweb.com/ |    .idea/vcs.xml    |  200   |                                   |                       |  173   |         text/xml         |   8   |   13  |   check   |          |
  11. | http://testphp.vulnweb.com/ |        .idea/       |  200   |                                   |    Index of /.idea/   |  937   |        text/html         |   14  |   46  | whitelist | index of |
  12. | http://testphp.vulnweb.com/ |       cgi-bin/      |  403   |                                   |     403 Forbidden     |  276   |        text/html         |   10  |   28  |   folder  |   403    |
  13. | http://testphp.vulnweb.com/ | .idea/encodings.xml |  200   |                                   |                       |  171   |         text/xml         |   6   |   11  |   check   |          |
  14. | http://testphp.vulnweb.com/ |      search.php     |  200   |                                   |         search        |  4218  |        text/html         |  104  |  364  |   check   |          |
  15. | http://testphp.vulnweb.com/ |     product.php     |  200   |                                   |    picture details    |  4576  |        text/html         |  111  |  377  |   check   |          |
  16. | http://testphp.vulnweb.com/ |        admin/       |  200   |                                   |    Index of /admin/   |  248   |        text/html         |   8   |   16  | whitelist | index of |
  17. | http://testphp.vulnweb.com/ |        .idea        |  301   | http://testphp.vulnweb.com/.idea/ | 301 Moved Permanently |  169   |        text/html         |   8   |   11  |   folder  |   30x    |
  18. +-----------------------------+---------------------+--------+-----------------------------------+-----------------------+--------+--------------------------+-------+-------+-----------+----------+```

JSON格式数据

  1. {
  2.     "result": [
  3.         {
  4.             "target": "http://testphp.vulnweb.com/",
  5.             "path": ".idea/workspace.xml",
  6.             "status": 200,
  7.             "redirect": "",
  8.             "title": "",
  9.             "length": 12437,
  10.             "content_type": "text/xml",
  11.             "lines": 217,
  12.             "words": 774,
  13.             "type": "check",
  14.             "mark": "",
  15.             "subdomain": "testphp.vulnweb.com",
  16.             "depth": 0,
  17.             "url": "http://testphp.vulnweb.com/.idea/workspace.xml"
  18.         },
  19.         {
  20.             "target": "http://testphp.vulnweb.com/",
  21.             "path": "admin",
  22.             "status": 301,
  23.             "redirect": "http://testphp.vulnweb.com/admin/",
  24.             "title": "301 Moved Permanently",
  25.             "length": 169,
  26.             "content_type": "text/html",
  27.             "lines": 8,
  28.             "words": 11,
  29.             "type": "folder",
  30.             "mark": "30x",
  31.             "subdomain": "testphp.vulnweb.com",
  32.             "depth": 0,
  33.             "url": "http://testphp.vulnweb.com/admin"
  34.         },
  35.         {
  36.             "target": "http://testphp.vulnweb.com/",
  37.             "path": "login.php",
  38.             "status": 200,
  39.             "redirect": "",
  40.             "title": "login page",
  41.             "length": 5009,
  42.             "content_type": "text/html",
  43.             "lines": 120,
  44.             "words": 432,
  45.             "type": "check",
  46.             "mark": "",
  47.             "subdomain": "testphp.vulnweb.com",
  48.             "depth": 0,
  49.             "url": "http://testphp.vulnweb.com/login.php"
  50.         },
  51.         {
  52.             "target": "http://testphp.vulnweb.com/",
  53.             "path": ".idea/.name",
  54.             "status": 200,
  55.             "redirect": "",
  56.             "title": "",
  57.             "length": 6,
  58.             "content_type": "application/octet-stream",
  59.             "lines": 1,
  60.             "words": 1,
  61.             "type": "check",
  62.             "mark": "",
  63.             "subdomain": "testphp.vulnweb.com",
  64.             "depth": 0,
  65.             "url": "http://testphp.vulnweb.com/.idea/.name"
  66.         },
  67.         {
  68.             "target": "http://testphp.vulnweb.com/",
  69.             "path": ".idea/vcs.xml",
  70.             "status": 200,
  71.             "redirect": "",
  72.             "title": "",
  73.             "length": 173,
  74.             "content_type": "text/xml",
  75.             "lines": 8,
  76.             "words": 13,
  77.             "type": "check",
  78.             "mark": "",
  79.             "subdomain": "testphp.vulnweb.com",
  80.             "depth": 0,
  81.             "url": "http://testphp.vulnweb.com/.idea/vcs.xml"
  82.         },
  83.         {
  84.             "target": "http://testphp.vulnweb.com/",
  85.             "path": ".idea/",
  86.             "status": 200,
  87.             "redirect": "",
  88.             "title": "Index of /.idea/",
  89.             "length": 937,
  90.             "content_type": "text/html",
  91.             "lines": 14,
  92.             "words": 46,
  93.             "type": "whitelist",
  94.             "mark": "index of",
  95.             "subdomain": "testphp.vulnweb.com",
  96.             "depth": 0,
  97.             "url": "http://testphp.vulnweb.com/.idea/"
  98.         },
  99.         {
  100.             "target": "http://testphp.vulnweb.com/",
  101.             "path": "cgi-bin/",
  102.             "status": 403,
  103.             "redirect": "",
  104.             "title": "403 Forbidden",
  105.             "length": 276,
  106.             "content_type": "text/html",
  107.             "lines": 10,
  108.             "words": 28,
  109.             "type": "folder",
  110.             "mark": "403",
  111.             "subdomain": "testphp.vulnweb.com",
  112.             "depth": 0,
  113.             "url": "http://testphp.vulnweb.com/cgi-bin/"
  114.         },
  115.         {
  116.             "target": "http://testphp.vulnweb.com/",
  117.             "path": ".idea/encodings.xml",
  118.             "status": 200,
  119.             "redirect": "",
  120.             "title": "",
  121.             "length": 171,
  122.             "content_type": "text/xml",
  123.             "lines": 6,
  124.             "words": 11,
  125.             "type": "check",
  126.             "mark": "",
  127.             "subdomain": "testphp.vulnweb.com",
  128.             "depth": 0,
  129.             "url": "http://testphp.vulnweb.com/.idea/encodings.xml"
  130.         },
  131.         {
  132.             "target": "http://testphp.vulnweb.com/",
  133.             "path": "search.php",
  134.             "status": 200,
  135.             "redirect": "",
  136.             "title": "search",
  137.             "length": 4218,
  138.             "content_type": "text/html",
  139.             "lines": 104,
  140.             "words": 364,
  141.             "type": "check",
  142.             "mark": "",
  143.             "subdomain": "testphp.vulnweb.com",
  144.             "depth": 0,
  145.             "url": "http://testphp.vulnweb.com/search.php"
  146.         },
  147.         {
  148.             "target": "http://testphp.vulnweb.com/",
  149.             "path": "product.php",
  150.             "status": 200,
  151.             "redirect": "",
  152.             "title": "picture details",
  153.             "length": 4576,
  154.             "content_type": "text/html",
  155.             "lines": 111,
  156.             "words": 377,
  157.             "type": "check",
  158.             "mark": "",
  159.             "subdomain": "testphp.vulnweb.com",
  160.             "depth": 0,
  161.             "url": "http://testphp.vulnweb.com/product.php"
  162.         },
  163.         {
  164.             "target": "http://testphp.vulnweb.com/",
  165.             "path": "admin/",
  166.             "status": 200,
  167.             "redirect": "",
  168.             "title": "Index of /admin/",
  169.             "length": 248,
  170.             "content_type": "text/html",
  171.             "lines": 8,
  172.             "words": 16,
  173.             "type": "whitelist",
  174.             "mark": "index of",
  175.             "subdomain": "testphp.vulnweb.com",
  176.             "depth": 0,
  177.             "url": "http://testphp.vulnweb.com/admin/"
  178.         },
  179.         {
  180.             "target": "http://testphp.vulnweb.com/",
  181.             "path": ".idea",
  182.             "status": 301,
  183.             "redirect": "http://testphp.vulnweb.com/.idea/",
  184.             "title": "301 Moved Permanently",
  185.             "length": 169,
  186.             "content_type": "text/html",
  187.             "lines": 8,
  188.             "words": 11,
  189.             "type": "folder",
  190.             "mark": "30x",
  191.             "subdomain": "testphp.vulnweb.com",
  192.             "depth": 0,
  193.             "url": "http://testphp.vulnweb.com/.idea"
  194.         }
  195.     ],
  196.     "total": 12,
  197.     "target": "http://testphp.vulnweb.com/"
  198. }

字典(重要)

1、Afuzz所使用的字典是一个text文本文件,每一个路径单独每一行;

2、关于后缀,Afuzz会使用-e参数提供的后缀替换%EXT%关键词,如果没设置-e的话,则使用默认值;

3、我们可以基于域名来生成字典,Afuzz可以使用主机替换%subdomain%,使用根域名替换%rootdomain%,使用子域名替换%sub%,使用域名替换%domain%;

使用样例

普通后缀:

index.%EXT%

设置asp和aspx后缀将生成下列字典:

index

index.asp

index.aspx

主机:

%subdomain%.%ext%

%sub%.bak

%domain%.zip

%rootdomain%.zip

传递https://test-www.hackerone.com和php后缀将生成下列字典:

test-www.hackerone.com.php

test-www.zip

test.zip

www.zip

testwww.zip

hackerone.zip

hackerone.com.zip

项目地址

Afuzz:【GitHub传送门

参考链接

https://github.com/xmendez/wfuzz

https://github.com/s0md3v/Arjun

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/空白诗007/article/detail/799782
推荐阅读
相关标签
  

闽ICP备14008679号