IDOR_detect_tool 使用教程
IDOR_detect_tool一款API水平越权漏洞检测工具项目地址:https://gitcode.com/gh_mirrors/id/IDOR_detect_tool
1. 项目的目录结构及介绍
IDOR_detect_tool 是一个用于检测 API 水平越权漏洞的开源工具。以下是其基本的目录结构:
IDOR_detect_tool/
├── config/
│ └── config.yml
├── report/
│ └── result.html
├── scripts/
│ └── detect.py
├── README.md
└── requirements.txt
config/
:包含配置文件config.yml
,用于设置目标系统的账号信息和鉴权逻辑。report/
:包含生成的漏洞报告result.html
。scripts/
:包含主要的检测脚本detect.py
。README.md
:项目说明文档。requirements.txt
:项目依赖文件。
2. 项目的启动文件介绍
项目的启动文件是 scripts/detect.py
。这个脚本负责执行漏洞检测的主要逻辑。以下是启动文件的基本介绍:
# scripts/detect.py
import sys
import requests
from config import config
def main():
# 读取配置文件
config_data = config.load_config()
# 执行漏洞检测逻辑
results = detect_idor(config_data)
# 生成报告
generate_report(results)
if __name__ == "__main__":
main()
main()
函数是脚本的主入口,负责读取配置、执行检测逻辑并生成报告。detect_idor(config_data)
函数负责具体的漏洞检测逻辑。generate_report(results)
函数负责生成漏洞检测报告。
3. 项目的配置文件介绍
配置文件位于 config/config.yml
,用于设置目标系统的账号信息和鉴权逻辑。以下是配置文件的基本结构:
# config/config.yml
accounts:
A:
username: "userA"
password: "passwordA"
cookie: "cookie_value_A"
B:
username: "userB"
password: "passwordB"
cookie: "cookie_value_B"
auth_logic:
headers:
Authorization: "Bearer token"
params:
api_key: "api_key_value"
accounts
部分包含两个账号的信息,分别是A
和B
。auth_logic
部分包含鉴权逻辑,如请求头headers
和请求参数params
。
通过以上配置,工具可以模拟不同账号的访问行为,检测是否存在越权漏洞。
IDOR_detect_tool一款API水平越权漏洞检测工具项目地址:https://gitcode.com/gh_mirrors/id/IDOR_detect_tool