Skip to content

Commit 874e4a5

Browse files
committed
增加JBoss EAP/AS <= 6.X探测
1 parent e067a49 commit 874e4a5

4 files changed

Lines changed: 57 additions & 2 deletions

File tree

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## 声明
22
>特别声明:此工具仅限于安全研究,禁止使用该项目进行违法操作,否则自行承担相关责任
33
4+
## 问题反馈
5+
6+
![cai.jpeg](./image/cai.jpeg)
7+
48
## 特点
59
- 方便二次开发,快速增加插件
610
- 支持输出结果到excel文档
@@ -72,7 +76,7 @@ cube probe -x oxid,ms17010 -s 192.168.2.1/24
7276
```
7377

7478
#### 支持的探测插件
75-
| FUNC | PORT | LOAD BY X |
79+
| FUNC | PORT | LOAD BY X |
7680
|-----------|-------|-----------|
7781
| docker | 2375 | Y |
7882
| dubbo | 20880 | Y |
@@ -89,6 +93,7 @@ cube probe -x oxid,ms17010 -s 192.168.2.1/24
8993
| winrm | 5985 | N |
9094
| wmi | 135 | N |
9195
| zookeeper | 2181 | Y |
96+
| jboss | 3873 | Y |
9297

9398
* `smb/wmi/winrm/mssql`是利用NTLM认证过程获取[Windows版本系统信息](https://jkme.github.io/2021/08/06/windows-ntlm-smb-scan.html)
9499
* 使用`ping/netbios`的时候,最好单独使用获取更准确的结果,线程数量建议为10

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ const (
1111

1212
var CrackX = []string{"elastic", "ftp", "mongo", "mssql", "mysql", "postgres", "smb", "ssh", "redis", "oracle"}
1313

14-
var ProbeX = []string{"docker", "rmi", "oxid", "ms17010", "smb", "zookeeper", "dubbo", "etcd", "k8s", "smbghost"}
14+
var ProbeX = []string{"docker", "rmi", "oxid", "ms17010", "smb", "zookeeper", "dubbo", "etcd", "k8s", "smbghost", "jboss"}
1515

1616
var PASSWORDS = []string{" ", "123456", "admin", "admin123", "root", "5201314", "pass123", "pass@123", "password", "123123", "654321", "111111", "123", "1", "admin@123", "Admin@123", "admin123!@#", "1234qwer!@#$", "1qaz@WSX1qaz", "QAZwsxEDC", "{user}", "{user}1", "{user}12", "{user}111", "{user}123", "{user}1234", "{user}12345", "{user}123456", "{user}@123", "{user}_123", "{user}#123", "{user}@111", "{user}@2019", "P@ssw0rd!", "P@ssw0rd", "Passw0rd", "qwe123", "12345678", "test", "test123", "123qwe!@#", "123456789", "123321", "666666", "a123456.", "123456~a", "000000", "1234567890", "8888888", "!QAZ2wsx", "1qaz2wsx", "1QAZ2wsx", "1q2w3e4r", "abc123", "abc123456", "1qaz@WSX", "a11111", "a12345", "Aa1234", "Aa1234.", "Aa12345", "123456a", "123456aa", "a123456", "a123123", "Aa123123", "Aa123456", "Aa12345.", "sysadmin", "system"}

core/probemodule/jboss.go

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package probemodule
2+
3+
import (
4+
"cube/config"
5+
"cube/pkg"
6+
"encoding/hex"
7+
"fmt"
8+
"net"
9+
)
10+
11+
type JBoss struct {
12+
*Probe
13+
}
14+
15+
func (J JBoss) ProbeName() string {
16+
return "jboss"
17+
}
18+
19+
func (J JBoss) ProbePort() string {
20+
return "3873"
21+
}
22+
23+
func (J JBoss) PortCheck() bool {
24+
return true
25+
}
26+
27+
func (J JBoss) ProbeExec() ProbeResult {
28+
//https://jspin.re/jboss-eap-as-6-rce-a-little-bit-beyond-xac-xed/
29+
//https://s3.amazonaws.com/files.joaomatosf.com/slides/alligator_slides.pdf
30+
result := ProbeResult{Probe: *J.Probe, Result: "", Err: nil}
31+
32+
host := fmt.Sprintf("%s:%v", J.Ip, J.Port)
33+
conn, _ := net.DialTimeout("tcp", host, config.TcpConnTimeout)
34+
//_, err := conn.Write([]byte{0x4a, 0x52, 0x4d, 0x49, 0x00, 0x02, 0x4b})
35+
//if err != nil {
36+
// return result
37+
//}
38+
r1, _ := pkg.ReadBytes(conn)
39+
fmt.Printf("Receive: %s\n", hex.EncodeToString(r1[:4]))
40+
if hex.EncodeToString(r1[:4]) == "aced0005" {
41+
result.Result = "JBoss EAP/AS <= 6.X"
42+
}
43+
return result
44+
}
45+
46+
func init() {
47+
AddProbeKeys("jboss")
48+
}

core/probemodule/probe_interface.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ func (p *Probe) NewIProbe() IProbe {
5757
return &Etcd{p}
5858
case "k8s":
5959
return &K8s{p}
60+
case "jboss":
61+
return &JBoss{p}
6062
default:
6163
return nil
6264
}

0 commit comments

Comments
 (0)