LoRexxar / Kunlun-M

KunLun-M是一个完全开源的静态白盒扫描工具,支持PHP、JavaScript的语义扫描,基础安全、组件安全扫描,Chrome Ext\Solidity的基础扫描。
MIT License
2.21k stars 309 forks source link

Rules in files and in the database are different #200

Closed mark0smith closed 2 years ago

mark0smith commented 2 years ago

System and Python Environment

Item Tooltip Value
System uname -a Linux kali 5.10.0-kali9-amd64 #1 SMP Debian 5.10.46-4kali1 (2021-08-09) x86_64 GNU/Linux
Python python -V Python 3.9.7
Cobra python kunlun.py v2.6.3

Description

When running python3 kunlun.py console, there is an alert showing that rules in files and in the database are different. And I never change the rule file.

It looks like in database double quotation marks " are escaped and the comparison process goes wrong.

 [06:58:14] [INIT][Load Rules] Check Rule CVI_10001 Reflected XSS
 [06:58:14] [INIT][Rule Check] CVI_10001 config match has changed:
 [06:58:14] [INIT][Rule Check] match in Rule File is (echo\s?['"]?(.+?)?\$(.+?)?['"]?(.+?)?;)
 [06:58:14] [INIT][Rule Check] match in Database is (echo\s?['\"]?(.+?)?\$(.+?)?['\"]?(.+?)?;)
 [06:58:14] [INIT][Rule Check] whether load new match from Rule File(Y/N):  <--------------------------- HERE!
N
 [06:58:21] [INIT][Load Rules] Check Rule CVI_1007 RFI
 [06:58:21] [INIT][Load Rules] Check Rule CVI_1013 URL Redirector Abuse
 [06:58:21] [INIT][Load Rules] Check Rule CVI_1005 SQLI
LoRexxar commented 2 years ago

噢,这是做了一次特殊处理...这个我想想怎么改