Skip to content

Commit 3866f1b

Browse files
committed
2.0
1 parent 01a74ca commit 3866f1b

39 files changed

Lines changed: 1305 additions & 2364 deletions

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
# 更新日志
2+
3+
## 2.0 😌
4+
- 优化 UI 界面布局,提升操作体验
5+
- 新增`Nested JSON Key`功能,支持自定义参数名称扫描嵌套 JSON 格式内容(示例:`{"a":"{\"b\":\"1\"}"}`),嵌套参数以`parm_a->name`形式展示
6+
- 新增配置导出 / 导入功能,支持规则快速迁移复用
7+
- 新增批量发送能力,可在 `History/Logger/Intruder `界面多选日志条目,一键批量发送至扫描器进行检测
8+
- 调整部分代码逻辑
9+
210
## 1.0.9
311
- 增加`Ignore Params`功能跳过对指定参数的扫描
412
- 内置了一些隐藏参数
513
- 修复JSON TYPE错误处理导致遗漏参数问题
614

715
## 1.0.8
816
- 优化颜色标记与颜色/主表格排序错乱与2次生效问题
9-
- 取消respond长度相同但是内容不同的标记
17+
- 取消response长度相同但是内容不同的标记
1018

1119
## 1.0.7
1220
- 添加`Delete item` 选项,可删除单条日志。

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ SQL Injection Scout 是一个用于 Burp Suite 的扩展,专为帮助安全研
66

77
## 💯 功能特性
88

9-
- **被动检测SQL**:支持对除`OPTIONS`外的所有请求的参数进行 `FUZZ` 测试,支持 `XML``JSON``FORM`等表单数据格式。
9+
- **被动/主动检测SQL**:支持对除`OPTIONS`外的所有请求的参数进行 `FUZZ` 测试,支持 `XML``JSON``FORM`等表单数据格式。
1010
- **最小化探测**:通过最小化的 `payload` 探测,减少对目标的影响。
11-
- **响应差异分析**:对响应进行 `diff` 分析,自动标记无趣(灰色)和有趣(绿色)的响应。
11+
- **`Flag`响应差异分析**:对响应进行 `diff` 分析,自动标记无趣(灰色)和有趣(绿色)的响应。
1212
- **✅:标记为值得进一步分析的响应。**
1313
- **🔥:标记为存在Sql注入**
1414
- **`Error`:标记为检测到`SQL Error`信息存在`Response`**
1515
- **`Max Params`:标记为请求参数大于配置数**
16-
- **`Skip URL`:匹配配置中需绕过的URL**
17-
-
16+
- **`Skip URL`:匹配配置中绕过的URL规则**
1817
- ....
1918
- **判断原理**:假设页面参数为反射类型,通过比较 `payload``diff` 的长度,相同则认为无趣。
2019
- **重复内容过滤**:对绿色标记的分组进行进一步分析,出现`6`次以上重复的 `diff` 被标记为无趣。
2120
- **结果排序**:根据颜色对最终结果进行排序展示。
22-
- **自动匹配**:在扫描页面的响应中自动匹配 `diff` 结果,默认取第一处的差异。
21+
- **自动匹配并标记差异**:在扫描页面的响应中自动匹配 `diff` 结果,默认取第一处的差异。
2322
- **正则匹配**:正则匹配无需扫描的`URL`
2423
- **内置范围**:支持内置的 `scope` 范围设置。
2524
- **延时扫描**:支持固定抖动+随机抖动发包检测,更精准规避 `WAF`
2625
- **自定义扫描参数数量**:防止参数过多导致的性能问题或误报,默认`50`
2726
- **🔥 Fuzz隐藏参数SQL注入**: 支持用户在原始请求中追加隐藏参数列表,进行`FUZZ`测试
27+
- (搭配[CaA](https://github.com/gh0stkey/CaA)使用本插件的`Hidden Params`功能)
28+
- **支持多层嵌套`JSON`**:支持自定义参数名称扫描嵌套 JSON 格式内容(示例:`{"a":"{\"b\":\"1\"}"}`
2829
-`Site map`/`HTTP history`/`Logger`面板添加右键菜单,支持检测站点**单个****所有**请求
29-
- (搭配[CaA](https://github.com/gh0stkey/CaA)使用本插件的`Fuzz Params List`功能)
3030
## ✅️ 安装
3131

3232
1. 确保已安装 [Burp Suite](https://portswigger.net/burp)
@@ -54,7 +54,7 @@ SQL Injection Scout 是一个用于 Burp Suite 的扩展,专为帮助安全研
5454
## 🔖 待办事项
5555
> 先画饼
5656
57-
- ~~**数据持久化:**~~ 配置持久化✅ | 数据持久化❌
57+
- ~~**数据持久化:**~~
5858
- ~~**启发式检测**:支持自定义 response 的无趣匹配特征,无需再担心频繁误报。~~
5959
- ~~**不安全的直接对象引用**:检测和报告不安全的直接对象引用。~~
6060
- **diff 差异面板**:提供更详细的差异分析面板。

build.gradle.kts

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,44 @@
11
plugins {
2-
// Provides Kotlin Language Support
3-
// https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm
42
kotlin("jvm") version "2.0.20"
5-
6-
// Provides the shadowJar task in Gradle
7-
// https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow
83
id("com.github.johnrengelman.shadow") version "8.1.1"
9-
kotlin("plugin.serialization") version "2.0.20"
10-
}
114

125

13-
group = "com.yournamehere.montoya"
6+
}
147

158
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
16-
archiveFileName.set("${project.findProperty("extensionName")}-${project.findProperty("projectVersion")}-all.jar")
9+
archiveFileName.set("${project.findProperty("extensionName")} ${project.findProperty("projectVersion")}.jar")
1710
}
1811

1912
repositories {
20-
//add maven local in case you want to build some reusable libraries and host them within your home directory
21-
// mavenLocal()
22-
mavenCentral()
2313

2414
mavenCentral()
2515
maven(url="https://jitpack.io") {
2616
content {
27-
28-
includeGroup("com.github.milchreis")
29-
includeGroup("com.github.ncoblentz")
30-
// includeGroup("com.github.CoreyD97")
31-
17+
// includeGroup("com.github.milchreis")
18+
// includeGroup("com.github.ncoblentz")
3219
}
3320
}
3421

3522
}
3623

37-
3824
dependencies {
3925
testImplementation(kotlin("test"))
40-
41-
// Include the Montoya API from Maven Central:
42-
// https://central.sonatype.com/artifact/net.portswigger.burp.extensions/montoya-api
4326
// Check for latest version: https://central.sonatype.com/artifact/net.portswigger.burp.extensions/montoya-api/versions
4427
implementation("net.portswigger.burp.extensions:montoya-api:2024.11")
45-
implementation ("io.github.java-diff-utils:java-diff-utils:4.12")
46-
47-
48-
// implementation("com.github.Google.Diff-Match-Patch:diff-match-patch:20121119")
49-
// implementation("com.github.ncoblentz:BurpMontoyaLibrary:0.1.12")
50-
51-
// Enable these if you want to use https://github.com/ncoblentz/BurpMontoyaLibrary
5228
implementation("com.github.ncoblentz:BurpMontoyaLibrary:0.1.26")
53-
//https://github.com/Milchreis/UiBooster/releases (a dependency of BurpMontoyaLibrary)
54-
// implementation("com.github.milchreis:uibooster:1.21.1")
55-
// implementation ("com.github.CoreyD97:Burp-Montoya-Utilities:1.0.0")
56-
// implementation ("org.swinglabs:swingx:1.6.1")
29+
implementation ("io.github.java-diff-utils:java-diff-utils:4.12")
5730
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
31+
implementation("com.google.code.gson:gson:2.13.2")
5832
}
5933

60-
tasks.test {
61-
useJUnitPlatform()
62-
}
6334
kotlin {
6435
jvmToolchain(21)
6536
}
6637

6738
tasks.processResources {
6839
from("gradle.properties")
40+
}
41+
42+
tasks.test {
43+
useJUnitPlatform()
6944
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
projectVersion=1.0.9
1+
projectVersion=2.0
22
extensionName=SQL Injection Scout

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
plugins {
22
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
33
}
4-
//rootProject.name = "SQL Injection Scout"
4+
//rootProject.name = "SQL Injection Scout"

src/main/kotlin/MyExtension.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import burp.api.montoya.MontoyaApi
33
import burp.api.montoya.extension.ExtensionUnloadingHandler
44
import config.Configs
55
import config.DataPersistence
6+
import config.ExecutorManager
67
import example.contextmenu.SiteMapContextMenuItemsProvider
78
import model.logentry.LogEntry
89
import model.logentry.ModifiedLogEntry
@@ -17,11 +18,11 @@ class MyExtension : BurpExtension, ExtensionUnloadingHandler{
1718
private lateinit var httpInterceptor: HttpInterceptor
1819
private lateinit var dataPersistence: DataPersistence
1920
private lateinit var logViewPanel: LogViewPanel
21+
private var config: Configs = Configs.INSTANCE
2022

2123
override fun initialize(api: MontoyaApi) {
2224
this.api = api
23-
val configs = Configs.INSTANCE
24-
api.extension().setName("${configs.extensionName}")
25+
api.extension().setName(config.extensionName)
2526

2627
dataPersistence = DataPersistence(api) // 先初始化数据持久化
2728
logs = LogEntry(api)
@@ -30,16 +31,16 @@ class MyExtension : BurpExtension, ExtensionUnloadingHandler{
3031
logViewPanel = LogViewPanel(api, logs, modifiedLog, httpInterceptor,dataPersistence)
3132

3233
// 注册HTTP处理器和UI
33-
api.userInterface().registerSuiteTab("SQL Scout",logViewPanel.buildUI() )
34+
api.userInterface().registerSuiteTab("🎶SQL Scout",logViewPanel.buildUI() )
3435
api.http().registerHttpHandler(httpInterceptor)
3536
api.userInterface().registerContextMenuItemsProvider(SiteMapContextMenuItemsProvider(api, httpInterceptor))
3637

3738
api.logging().logToOutput(
3839
"""
39-
[#] ${configs.extensionName}
40+
[#] ${config.extensionName}
4041
[#] Author: JaveleyQAQ
4142
[#] Github: https://github.com/JaveleyQAQ
42-
[#] Version: ${Configs.INSTANCE.version}
43+
[#] Version: ${config.version}
4344
""".trimIndent()
4445
)
4546
}

src/main/kotlin/config/Configs.kt

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ package config
22

33
import java.util.Properties
44

5-
enum class Configs {
6-
INSTANCE;
5+
class Configs {
6+
companion object {
7+
val INSTANCE = Configs()
8+
}
79

810
var version: String
911
var extensionName: String
@@ -22,44 +24,22 @@ enum class Configs {
2224
var isInScope: Boolean = true
2325
var proxy: Boolean = true
2426
var repeater: Boolean = true
25-
var requestTimeout = 600L
2627

2728
var nullCheck: Boolean = true
2829
var neverScanRegex: String = "(delete|del)"
2930

30-
var filterStatusButton: Boolean = true
31-
var randomCheckTimer: Long = 3000 // 随机扫描时间改为1秒
32-
var fixedIntervalTime: Long = 100 // 固定间隔改为100ms
31+
var randomCheckTimer: Long = 3000
32+
var fixedIntervalTime: Long = 300
3333

34-
var urlFileExtension:MutableList<String> = mutableListOf(
35-
"js", "css", "jpg", "jpeg", "png", "gif", "ico",
36-
"woff", "woff2", "ttf", "eot", "mp4", "webm", "mp3",
37-
"wav", "pdf", "doc", "docx", "xls", "xlsx"
38-
)
3934
var payloads: MutableList<String> = mutableListOf<String>(
4035
"åååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååå",
4136
"'\"%df",
42-
"/1",
4337
"'''",
4438
"''''",
4539
"#{xx}",
4640
"#xx}",
4741
"sb'='\"=\"",
48-
// "'",
49-
// "\"",
50-
// "')",
51-
// "''",
52-
// "'||'1",
53-
// "\"||\"1",
54-
// "sb'='\"=\"",
55-
// "'OR'1\"OR\"1",
56-
// "'OR'+1+\"OR\"+1=0",
57-
// "' sleep(3)",
58-
// "';WAITFOR DELAY '0:0:5'--" ,
59-
// "' AND (SELECT * FROM (SELECT(SLEEP(5)))a)--",
60-
// "SLEEP(3) /*' or SLEEP(3) or'\" or SLEEP(3) or \""
6142
)
62-
6343
val ERROR_SYNTAX: Array<String> = arrayOf(
6444
// 通用SQL语法错误
6545
"You have an error in your SQL syntax", // MySQL通用语法错误信息
@@ -170,7 +150,7 @@ enum class Configs {
170150
"\"code\":400",
171151
"无法解析请求参数",
172152
"无效的请求",
173-
)
153+
)
174154
var ignoreParams: MutableList<String> = mutableListOf(
175155
"_t",
176156
"ts",
@@ -188,12 +168,5 @@ enum class Configs {
188168
"column",
189169
"field"
190170
)
191-
}
192-
193-
194-
195-
196-
197-
198-
199-
171+
var nestedJsonParams: String =""
172+
}

0 commit comments

Comments
 (0)