Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

dreamncn/CustomCrypto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

重要

本项目关闭,合并至iCrypto:https://github.com/dreamncn/iCrypto

项目简介

做一些app测试经常会遇到加密、签名的问题,这个插件可以帮助你进行重新签名、数据包解密、偷天换日...

使用

  • 启用插件
  • 编写你的脚本
  • ProxyHistory中,可以看到被修改后的请求,Repeater部分也可以自动进行修改 image-20220926231527312

自动加解密配置

img.png

手动加解密

本来这里想用createMessageEditor实现的,但是测试过程中发现在渲染MessageEditor的过程中也会渲染Select extension导致出现递归异常。

img_1.png

脚本编写指南

插件调用脚本为:

执行命令 请求类型 临时文件夹

其中,第一个参数为 请求类型,一共有四种类型:

const RequestFromClient = "0";// 日志/Interrupt收到请求(请求包解密)
const RequestToServer = "1";// Repeater/Interrupt发出请求(请求包加密)
const ResponseFromServer = "2";// 日志/Repeater/Interrupt收到响应(响应包解密)
const ResponseToClient = "3";// Repeater/Interrupt发出响应(响应包加密

可以根据burp的生命周期来理解这四种类型:

7338E56B-BB55-4C6B-B1B6-BD486C4BCEA4

第二个参数为临时文件夹,数据如下: img_2.png

脚本在收到请求后,去修改对应临时文件夹的数据,处理成功,必须输出success字样

文件释义

名称 解释 举例 在哪种请求下存在
body.txt 请求包的body部分 id=1 Request/Response
headers.txt 请求包的headers部分 Host: 127.0.0.1 等 Request/Response
method.txt 请求包的请求方法 GET Request/Response
path.txt 请求包的请求路径 /index.php Request/Response
version.txt 请求包使用的Http协议版本 HTTP/2 Request/Response
response_body.txt 响应包的body部分 {"body":"sssss"} Response
response_headers.txt 响应包的headers部分 Set-cookle: www=12333 Response
response_version.txt 响应包的Http协议版本 HTTP/2 Response
state.txt 响应包的响应代码 404 Response
state_msg.txt 响应包的响应消息 Not Found Response

脚本调试指南

  • 多关注ExtenderCustomCryptooutput内容,如果脚本生效,则会在这里输出处理的请求包响应包等。
  • 如果你发现脚本未生效,也可以复制CustomCrypto输出的命令内容,直接在命令行进行测试,以便于调试脚本。

案例&模板

协议

MIT