Skip to content

Commit 0f4b775

Browse files
committed
alpha-detect for multiple products
Signed-off-by: research <[email protected]>
1 parent 2d56d5e commit 0f4b775

File tree

11 files changed

+236
-0
lines changed

11 files changed

+236
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
- list: shell_binaries
3+
items: [ash, bash, csh, ksh, sh, tcsh, zsh, dash]
4+
5+
6+
- macro: check_process_atlassian_confluence
7+
condition: (proc.aname[0]=java and proc.name contains http-nio and proc.cmdline contains -DConfluence)
8+
9+
10+
- rule: Atlassian Confluence Server and Data Center Possible CVE-2022-26134 Exploit Detection(RCE)
11+
desc: Possible CVE-2022-26134 Attempt exploit observed.
12+
condition: >
13+
evt.dir=< and
14+
evt.type in (stat, execve) and
15+
check_process_atlassian_confluence and
16+
(evt.arg.path contains 'java.lang.Runtime@getRuntime().exec' or evt.arg.path contains '${new javax.script.ScriptEngineManager().getEngineByName("nashorn").eval') or (evt.arg.exe in (shell_binaries) and evt.arg.args startswith '-c')
17+
output: "CVE-2022-26134 (Atlassian Confluence) exploit detected (user.name=%user.name user.loginuid=%user.loginuid proc.exeline=%proc.exeline proc.name=%proc.name proc.cwd=%proc.cwd container.id=%container.id evt.args=%evt.args)"
18+
priority: CRITICAL
19+
tags: [host, container, exploit, CVE_2022_26134, atlassian_confluence, Mitre_Initial_Access, T1190]
20+
21+
22+
- macro: read_socket
23+
condition: evt.type=read and (fd.typechar='4' or fd.typechar='6')
24+
25+
26+
- rule: Atlassian Confluence Server and Data Center CVE-2022-26134 Exploit Attempt Detection(RCE)
27+
desc: Possible CVE-2022-26134 Attempt exploit attempt observed.
28+
condition: >
29+
evt.dir=< and
30+
read_socket and
31+
check_process_atlassian_confluence and
32+
(evt.arg.data contains 'org.apache.commons.io.IOUtils' and evt.arg.data contains 'java.lang.Runtime' and evt.arg.data contains '.exec') or
33+
(evt.arg.data contains 'javax.script.ScriptEngineManager' and evt.arg.data contains 'getEngineByName' and evt.arg.data contains '.eval' and evt.arg.data contains 'java.lang.ProcessBuilder' and evt.arg.data contains '.command')
34+
35+
output: "CVE-2022-26134 (Atlassian Confluence) exploit attempt detected (user.name=%user.name user.loginuid=%user.loginuid proc.exeline=%proc.exeline proc.name=%proc.name proc.cwd=%proc.cwd container.id=%container.id evt.args=%evt.args cip=%fd.cip)"
36+
priority: CRITICAL
37+
tags: [host, container, exploit, CVE_2022_26134, atlassian_confluence, Mitre_Initial_Access, T1190]
38+
39+
40+
41+
42+
43+
44+
45+
46+
47+
48+
49+
50+
51+

Atlassian-Confluence/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CVE-2022-26134 Exploit Detection
2+
3+
Command to run using Falco - `sudo falco -r falco-cve-2022-21634.yaml -A`
4+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
- required_engine_version: 17
3+
4+
- macro: check_goanywhereMFT_fingerprint
5+
condition: (proc.exeline contains java and proc.exeline contains bootstrap.GoAnywhereBootstrap)
6+
7+
- macro: check_process_goanywhere
8+
condition: (proc.name contains http-nio)
9+
10+
- rule: Fortra Goanywhere Managed File Transfer (MFT) CVE-2023-0669 Exploit Detection
11+
desc: Possible CVE-2023-0669 exploit observed from Request URI '/lic/accept' (License Response Servlet) with POST method having a serialized payload in the Body.
12+
condition: >
13+
evt.dir=< and check_goanywhereMFT_fingerprint and check_process_goanywhere and evt.args contains POST and evt.args contains /lic/accept and evt.args contains 'bundle='
14+
enabled: true
15+
output: "CVE-2023-0669 exploit attempt detected (user.name=%user.name user.loginuid=%user.loginuid proc.exeline=%proc.exeline proc.name=%proc.name proc.cwd=%proc.cwd container.id=%container.id evt.args=%evt.args)"
16+
priority: CRITICAL
17+
tags: [host, container, exploit, CVE_2023_0669, goanywhere_mft, Mitre_Initial_Access, T1190]
18+
19+
20+
- macro: shell_access
21+
condition: (evt.args contains ./bin/bash or evt.args contains ./bin/csh or evt.args contains ./bin/sh or evt.args contains ./bin/zsh or evt.args contains ./bin/dash)
22+
23+
- rule: Fortra Goanywhere MFT Possible Command Injection Detection
24+
desc: Detecting possible command injection through Goanywhere MFT exploit (false positives may appear)
25+
condition: >
26+
evt.dir=< and check_goanywhereMFT_fingerprint and check_process_goanywhere and shell_access and syscall.type=execve
27+
output: "Possible Command Injection through Goanywhere MFT (user.name=%user.name user.loginuid=%user.loginuid proc.exeline=%proc.exeline proc.name=%proc.pid proc.cwd=%proc.cwd container.id=%container.id)"
28+
priority: WARNING
29+
tags: [host, container, anomaly, CVE_2023_0669, goanywhere_mft, Mitre_Initial_Access, T1190]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
SELECT
2+
p.name AS process_name,
3+
p.pid AS process_pid,
4+
p.cmdline AS process_cmdline,
5+
p.path AS process_path,
6+
pof.path AS opened_files,
7+
yara.count,
8+
yara.matches
9+
FROM processes p
10+
JOIN process_open_files AS pof
11+
ON p.pid = pof.pid
12+
AND process_name = 'java'
13+
AND process_cmdline LIKE '%bootstrap.GoAnywhereBootstrap%'
14+
AND pof.path LIKE '%/goanywhere.log'
15+
JOIN yara
16+
ON yara.path = pof.path
17+
AND yara.count > 0
18+
AND sigrule = '
19+
rule goanywhere_2023_0669_log{
20+
meta:
21+
author = "Loginsoft Research Team"
22+
description = "Detect the CVE-2023-0669 exploitation on goanywhere mft"
23+
strings:
24+
$parse_error = "Error parsing license response"
25+
$http_reponse_500 = {41 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 72 65 64 20 77 68 69 6c 65 20 70 72 6f 63 65 73 73 69 6e 67 20 74 68 65 20 72 65 71 75 65 73 74 20 55 52 49 20 27 2f 67 6f 61 6e 79 77 68 65 72 65 2f 6c 69 63 2f 61 63 63 65 70 74 27 20 66 72 6f 6d 20 74 68 65 20 69 70 20 61 64 64 72 65 73 73 20 27 [1-3] 2e [1-3] 2e [1-3] 2e [1-3] 27 2e 20 54 68 65 20 48 54 54 50 20 73 74 61 74 75 73 20 63 6f 64 65 20 69 73 20 27 35 30 30 27}
26+
$error_class = "at com.linoma.ga.ui.admin.servlet.LicenseResponseServlet.doPost(LicenseResponseServlet.java"
27+
condition:
28+
all of them
29+
}';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CVE-2023-0669 Exploit Detection
2+
3+
Command to run using Falco - `sudo falco -r falco-cve-2023-0669.yaml -A`
4+
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
- required_engine_version: 17
2+
3+
4+
- macro: rocketmq_check_netty_server
5+
condition: (proc.name contains NettyServer and proc.env contains ROCKETMQ)
6+
7+
- macro: read_socket
8+
condition: evt.type=read and (fd.typechar='4' or fd.typechar='6')
9+
10+
- macro: rocketmq_check_payload_for_conf_update
11+
condition: (read_socket and evt.buffer contains 'code":25' and evt.buffer contains serialize)
12+
13+
- rule: Apache Rocketmq CVE-2023-33246 Exploit Detection
14+
desc: >
15+
CVE-2023-33246 is exploited at the function used to update configuration & can be detected by looking at the buffer for broker code-25 and serializeTypeCurrentRPC function.
16+
condition: >
17+
evt.dir=< and rocketmq_check_netty_server and rocketmq_check_payload_for_conf_update
18+
output: CVE-2023-33246 exploit detected (event=%evt.type server_ip=%fd.sip server_port=%fd.sport proto=%fd.l4proto parent=%proc.pname process=%proc.name command=%proc.cmdline container_id=%container.id)
19+
priority: CRITICAL
20+
tags: [host, container, exploit, CVE_2023_33246, rocketmq, apache,Mitre_Initial_Access, Mitre_Execution,TA0001, TA0002, T1133, T1059]
21+
22+
- macro: open_write
23+
condition: (evt.type in (open,openat,openat2) and evt.is_open_write=true and fd.typechar='f' and fd.num>=0)
24+
25+
- macro: rocketmq_check_env_variable
26+
condition: (proc.env contains ROCKETMQ)
27+
28+
- macro: rocketmq_check_properties_file_write_conf
29+
condition: (fd.nameraw contains conf and fd.nameraw endswith '.properties')
30+
31+
- rule: Apache Rocketmq CVE-2023-33246 Exploit Attempt based on properties file
32+
desc: >
33+
Observed the file ends with '.properties' created under folder 'CONF' upon exploit CVE-2023-33246 attempt
34+
condition: >
35+
open_write and evt.dir=< and rocketmq_check_env_variable and rocketmq_check_properties_file_write_conf
36+
output: CVE-2023-33246 exploit attempt detected (event=%evt.type filepath=%fd.name server_ip=%fd.sip server_port=%fd.sport proto=%fd.l4proto parent=%proc.pname process=%proc.name command=%proc.cmdline container_id=%container.id)
37+
priority: WARNING
38+
tags: [host, container, anomaly, CVE_2023_33246, rocketmq, apache,Mitre_Initial_Access, Mitre_Execution,TA0001, TA0002, T1133, T1059]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SELECT
2+
p.name AS process_name,
3+
p.pid AS process_pid,
4+
p.cmdline AS process_cmdline,
5+
p.path AS process_path,
6+
pof.path AS opened_files,
7+
yara.count,
8+
yara.matches
9+
FROM processes p
10+
JOIN process_open_files AS pof
11+
ON p.pid = pof.pid
12+
AND name = 'java'
13+
AND cmdline LIKE '%rocketmq%'
14+
AND pof.path LIKE '%/broker.log'
15+
JOIN yara
16+
ON yara.path = pof.path
17+
AND yara.count > 0
18+
AND sigrule = '
19+
rule rocketmq_2023_33246_log{
20+
meta:
21+
author = "Loginsoft Research Team"
22+
description = "Detect the updatebrokerconfig request to add keys before exploitation from broker.log file"
23+
strings:
24+
$update_info_1 = "Broker receive request to update config, caller address"
25+
$update_info_2 = "updateBrokerConfig called by"
26+
$update_key_info = /updateBrokerConfig, new config: \[\{filterServerNums=(0*[1-9]\d*|0\d{*,}), rocketmqHome=-c/
27+
28+
condition:
29+
1 of ($update_info_*) and $update_key_info
30+
}';
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
SELECT
2+
target_path,
3+
category,
4+
action,
5+
atime,
6+
mtime,
7+
ctime,
8+
count,
9+
matches
10+
FROM file_events
11+
JOIN yara
12+
ON yara.path = target_path
13+
AND target_path LIKE '%.properties'
14+
AND count > 0
15+
AND sigrule = '
16+
rule rocketmq_2023_33246_properties{
17+
meta:
18+
author = "Loginsoft Research Team"
19+
description = "Detect the addition of key in properties file before exploitation."
20+
strings:
21+
$key_value_1 = /filterServerNums=(0*[1-9]\d*|0\d{*,})/
22+
$key_value_2 = "rocketmqHome=-c"
23+
condition:
24+
all of them
25+
}';

RocketMQ/CVE-2023-33246/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# CVE-2023-33246 Exploit Detection
2+
3+
Command to run using Falco - `sudo falco -r falco-cve-2023-33246.yaml -A`
4+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
- required_engine_version: 17
2+
3+
4+
#resuing macro #api-manager
5+
- macro: open_write
6+
condition: (evt.type in (open,openat,openat2) and evt.is_open_write=true and fd.typechar='f' and fd.num>=0)
7+
8+
- macro: check_process_wso2
9+
condition: (proc.aname[0]=java and (proc.exeline contains org.wso2.carbon.bootstrap) or proc.exeline contains org.wso2.carbon.server)
10+
11+
- rule: WSO2 CVE-2022-29464 Exploit Detection
12+
desc: Possible CVE-2022-29464 exploit observed.
13+
condition: >
14+
check_process_wso2 and open_write and fd.directory contains /repository/ and fd.nameraw contains '../../../../' and evt.arg.mode=0666 and (fd.filename contains '.jsp' or fd.filename contains '.war' or fd.filename contains '.class')
15+
output: "CVE-2022-29464 exploit attempt detected (user=%user.name user_loginuid=%user.loginuid command=%proc.cmdline pid=%proc.pid file=%fd.filename directory=%fd.directory container.id=%container.id))"
16+
priority: CRITICAL
17+
tags: [host, container, exploit, CVE_2022_29464, wso2_apim, wso2_is]
18+

0 commit comments

Comments
 (0)