工具介绍
Hae2Yakit用于转换 BurpSuite 平台中无敌的Hae信息收集插件的配置规则为yakit使用,减少因为插件不支持而无法脱离burp的烦恼。
使用方法
1 安装插件
在 yakit 的插件仓库中搜索关键词 hae2yakit,hae2yakit.yak
yakit.AutoInitYakit()# 镜像地址hae_yaml_url := cli.String("hae_yaml_url", cli.setDefault("https://raw.gitmirror.com/gh0stkey/HaE/refs/heads/master/src/main/resources/rules/Rules.yml"))cli.setRequired(true)cli.check()// 转换 HAE 规则为 YAKIT 规则func convertHaeToYakit(ruleGroup, name, rule, loaded, scope, color, index) {if !loaded {return make(map[string]var) } yakitDict = {"ExtraTag": [f"{ruleGroup}/{name}"],"VerboseName": name,"Rule": rule,"NoReplace": true,"Color": color,"Index": index,"EnableForRequest": true,"EnableForResponse": true,"EnableForHeader": true,"EnableForBody": true } // 根据 scope 调整字段if scope.EndsWith("body") { yakitDict["EnableForBody"] = true } elseif scope.EndsWith("header") { yakitDict["EnableForHeader"] = true }if scope.StartsWith("request") { yakitDict["EnableForRequest"] = true } elseif scope.StartsWith("response") { yakitDict["EnableForResponse"] = true }return yakitDict}func yamlToJson(data) { allDictList = [] result = yaml.Unmarshal([]byte(data))~ println(result) index = 0 // 遍历规则组for group in get(result, "rules", []) { println("-----------------hello-------------------") ruleGroup = get(group, "group", [])for rule in get(group, "rule", []) { index += 1 name = get(rule, "name", "") regex = get(rule, "regex", "") regex = get(rule, "s_regex", "") ? get(rule, "s_regex", "") : regex regex = get(rule, "f_regex", "") ? get(rule, "f_regex", "") : regex loaded = get(rule, "loaded", false) scope = get(rule, "scope", false) color = get(rule, "color", false) yakitDict = convertHaeToYakit(ruleGroup, name, regex, loaded, scope, color, index)if yakitDict { allDictList = append(allDictList, yakitDict) } } } // 转换为 JSON 并保存 yakitJson = json.dumps(allDictList) println(yakitJson)return yakitJson}rsp, _, err := poc.Get(hae_yaml_url, poc.https(true), poc.appendHeaders({"User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"}))if err != nil { yakit.Error("获取失败,错误原因:%v",err)}die(err)rspRaw = rsp.RawPacketheaders, body = str.SplitHTTPHeadersAndBodyFromPacket(rspRaw)yakit.Text(yamlToJson(body))
(如果商店搜不到可以新建插件导入)
2 运行插件
3 导入配置
参考项目
https://github.com/MZgoudan/hae-yakit
工具获取
原文始发于微信公众号(黑白之道):Yakit插件-用于转换BurpSuite上无敌的Hae信息收集插件的配置规则为yakit使用
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论