web-traffic-generator:一款功能强大的HTTP和HTTPs流量混淆工具

关于web-traffic-generator

web-traffic-generator是一款功能强大的HTTP和HTTPs流量混淆工具,该工具基于纯Python开发,可以帮助广大研究人员在HTTP或HTTPs网络流量中提添加噪声,以此来实现流量混淆的目的。

本质上来说,web-traffic-generator是一个网络噪声生成工具,可以用于红队或蓝队的事件响应或网络防御任务中。web-traffic-generator已在Ubuntu 14.04 & 16.04平台上进行过测试,理论上该工具支持在任何安装了Python环境的操作系统上使用。

工具运行机制

首先,我们需要在脚本开头部分指定一些配置信息:

1、MAX_DEPTH = 10, MIN_DEPTH = 5:从每一个根URL(例如www.yahoo.com)开始,该工具会尝试访问MIN_DEPTH和MAX_DEPTH之间一个随机深度的节点地址;

每一个HTTP GET请求之间的时间间隔会根据下列变量进行随机选取:

1、MIN_WAIT = 5:请求间最少间隔5秒,这个时间太短的话可能会被目标Web服务器屏蔽;

2、MAX_WAIT = 10:请求间最多间隔10秒;

3、DEBUG = False:设置调试模式,设置为True则开启Verbose模式,工具会实时打印出详细的输出和调试信息;

4、ROOT_URLS = [url1,url2,url3]:根URL地址列表,工具会在其中随机选择;

5、blacklist = [".gif", "intent/tweet", "badlink", etc...]:针对每个链接需要检测的字符串黑名单,如果链接包含此列表中的任何字符串,则将丢弃该链接;

6、userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3).......':设置传递给Web服务器的用户代理(无头浏览器),我们可以将其设置为默认值,或根据需要进行修改;

工具环境

当前版本的web-traffic-generator同时兼容Python 2.7和Python 3.x环境。

工具依赖

该工具的运行只需要使用到requests库,安装命令如下:

sudo pip install requests

工具安装

广大研究人员可以直接使用下列命令将该项目源码克隆至本地:

git clone https://github.com/ReconInfoSec/web-traffic-generator.git

工具使用

首先,我们需要创建一个配置文件:

cp config.py.template config.py

然后直接运行web-traffic-generator即可:

python gen.py

调试信息

如果将config.py配置文件中的Debug变量设置为True的话,我们将查看到如下所示的Verbose输出信息:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Traffic generator started

Diving between 3 and 10 links deep into 489 different root URLs,

Waiting between 5 and 10 seconds between requests.

This script will run indefinitely. Ctrl+C to stop.

Randomly selecting one of 489 URLs

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recursively browsing [https://arstechnica.com] ~~~ [depth = 7]

  Requesting page...

  Page size: 77.6KB

  Data meter: 77.6KB

  Good requests: 1

  Bad reqeusts: 0

  Scraping page for links

  Found 171 valid links

  Pausing for 7 seconds...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recursively browsing [https://arstechnica.com/author/jon-brodkin/] ~~~ [depth = 6]

  Requesting page...

  Page size: 75.7KB

  Data meter: 153.3KB

  Good requests: 2

  Bad reqeusts: 0

  Scraping page for links

  Found 168 valid links

  Pausing for 9 seconds...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recursively browsing [https://arstechnica.com/information-technology/2020/01/directv-races-to-decommission-broken-boeing-satellite-before-it-explodes/] ~~~ [depth = 5]

  Requesting page...

  Page size: 43.8KB

  Data meter: 197.1KB

  Good requests: 3

  Bad reqeusts: 0

  Scraping page for links

  Found 32 valid links

  Pausing for 8 seconds...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Recursively browsing [https://www.facebook.com/sharer.php?u=https%3A%2F%2Farstechnica.com%2F%3Fpost_type%3Dpost%26p%3D1647915] ~~~ [depth = 4]

  Requesting page...

  Page size: 64.2KB

  Data meter: 261.2KB

  Good requests: 4

  Bad reqeusts: 0

  Scraping page for links

  Found 0 valid links

  Stopping and blacklisting: no links

上述输出中的最后一个URL抛出了一个错误信息,因为我们将其添加到了config.blacklist黑名单数组中。

工具运行截图

工具使用演示

演示视频:【点我观看

许可证协议

本项目的开发与发布遵循MIT开源许可证协议。

项目地址

web-traffic-generator:【GitHub传送门

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-28 05:42:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-28 05:42:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-28 05:42:03       82 阅读
  4. Python语言-面向对象

    2024-04-28 05:42:03       91 阅读

热门阅读

  1. 聊聊redisson的RRateLimiter

    2024-04-28 05:42:03       154 阅读
  2. static变量获取nacos配置文件值

    2024-04-28 05:42:03       39 阅读
  3. Cocos Creator 声音管理模块SoundMgr详解

    2024-04-28 05:42:03       34 阅读
  4. 深入浅出MySQL-04-【常用函数】

    2024-04-28 05:42:03       25 阅读
  5. 探索Vue.js状态管理的艺术:深入理解与实践Vuex

    2024-04-28 05:42:03       35 阅读
  6. mongodb替代品SequoiaDB的安装使用

    2024-04-28 05:42:03       32 阅读
  7. C++面经 每日一问(一)

    2024-04-28 05:42:03       33 阅读
  8. 前端小白学习vue3框架(二)

    2024-04-28 05:42:03       32 阅读
  9. 常见的SSH功能

    2024-04-28 05:42:03       29 阅读