-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CVE 2024 0012 & CVE 2024 9474 (#1171)
Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Sebastien Blot <[email protected]>
- Loading branch information
Showing
23 changed files
with
488 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
appsec-rules: | ||
- ./appsec-rules/crowdsecurity/base-config.yaml | ||
- ./appsec-rules/crowdsecurity/vpatch-CVE-2024-0012.yaml | ||
nuclei_template: test-CVE-2024-0012.yaml |
21 changes: 21 additions & 0 deletions
21
.appsec-tests/vpatch-CVE-2024-0012/test-CVE-2024-0012.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
id: test-CVE-2024-0012 | ||
info: | ||
name: test-CVE-2024-0012 | ||
author: crowdsec | ||
severity: info | ||
description: test-CVE-2024-0012 testing | ||
tags: appsec-testing | ||
http: | ||
- raw: | ||
- | | ||
GET /php/ztp_gate.php/.js.map HTTP/1.1 | ||
Host: {{Hostname}} | ||
X-PAN-AUTHCHECK: off | ||
cookie-reuse: true | ||
matchers: | ||
- type: dsl | ||
condition: and | ||
dsl: | ||
- "status_code_1 == 403" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
appsec-rules: | ||
- ./appsec-rules/crowdsecurity/base-config.yaml | ||
- ./appsec-rules/crowdsecurity/vpatch-CVE-2024-9474.yaml | ||
nuclei_template: test-CVE-2024-9474.yaml |
24 changes: 24 additions & 0 deletions
24
.appsec-tests/vpatch-CVE-2024-9474/test-CVE-2024-9474.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
id: test-CVE-2024-9474 | ||
info: | ||
name: test-CVE-2024-9474 | ||
author: crowdsec | ||
severity: info | ||
description: test-CVE-2024-9474 testing | ||
tags: appsec-testing | ||
http: | ||
- raw: | ||
- | | ||
POST /php/utils/createRemoteAppwebSession.php/watchTowr.js.map HTTP/1.1 | ||
Host: {{Hostname}} | ||
Content-Type: application/x-www-form-urlencoded | ||
user=`echo $(uname -a) > /var/appweb/htdocs/unauth/watchTowr.php`&userRole=superuser&remoteHost=&vsys=vsys1 | ||
cookie-reuse: true | ||
matchers: | ||
- type: dsl | ||
condition: and | ||
dsl: | ||
- "status_code_1 == 403" | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
10.0.0.1 - - [20/Nov/2024:04:13:06 +0000] "GET /index.php/.js.map HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" "-" | ||
10.0.0.2 - - [20/Nov/2024:04:13:06 +0000] "GET /php/ztp_gate.php/.js.map HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" "-" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
parsers: | ||
- crowdsecurity/nginx-logs | ||
- crowdsecurity/syslog-logs | ||
- crowdsecurity/dateparse-enrich | ||
scenarios: | ||
- ./scenarios/crowdsecurity/CVE-2024-0012.yaml | ||
postoverflows: | ||
- "" | ||
log_file: CVE-2024-0012.log | ||
log_type: nginx | ||
ignore_parsers: true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
len(results) == 2 | ||
"10.0.0.2" in results[0].Overflow.GetSources() | ||
results[0].Overflow.Sources["10.0.0.2"].IP == "10.0.0.2" | ||
results[0].Overflow.Sources["10.0.0.2"].Range == "" | ||
results[0].Overflow.Sources["10.0.0.2"].GetScope() == "Ip" | ||
results[0].Overflow.Sources["10.0.0.2"].GetValue() == "10.0.0.2" | ||
results[0].Overflow.Alert.Events[0].GetMeta("datasource_path") == "CVE-2024-0012.log" | ||
results[0].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_path") == "/php/ztp_gate.php/.js.map" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_status") == "404" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_user_agent") == "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_verb") == "GET" | ||
results[0].Overflow.Alert.Events[0].GetMeta("log_type") == "http_access-log" | ||
results[0].Overflow.Alert.Events[0].GetMeta("service") == "http" | ||
results[0].Overflow.Alert.Events[0].GetMeta("source_ip") == "10.0.0.2" | ||
results[0].Overflow.Alert.Events[0].GetMeta("timestamp") == "2024-11-20T04:13:06Z" | ||
results[0].Overflow.Alert.GetScenario() == "crowdsecurity/CVE-2024-0012" | ||
results[0].Overflow.Alert.Remediation == true | ||
results[0].Overflow.Alert.GetEventsCount() == 1 | ||
"10.0.0.1" in results[1].Overflow.GetSources() | ||
results[1].Overflow.Sources["10.0.0.1"].IP == "10.0.0.1" | ||
results[1].Overflow.Sources["10.0.0.1"].Range == "" | ||
results[1].Overflow.Sources["10.0.0.1"].GetScope() == "Ip" | ||
results[1].Overflow.Sources["10.0.0.1"].GetValue() == "10.0.0.1" | ||
results[1].Overflow.Alert.Events[0].GetMeta("datasource_path") == "CVE-2024-0012.log" | ||
results[1].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file" | ||
results[1].Overflow.Alert.Events[0].GetMeta("http_path") == "/index.php/.js.map" | ||
results[1].Overflow.Alert.Events[0].GetMeta("http_status") == "404" | ||
results[1].Overflow.Alert.Events[0].GetMeta("http_user_agent") == "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" | ||
results[1].Overflow.Alert.Events[0].GetMeta("http_verb") == "GET" | ||
results[1].Overflow.Alert.Events[0].GetMeta("log_type") == "http_access-log" | ||
results[1].Overflow.Alert.Events[0].GetMeta("service") == "http" | ||
results[1].Overflow.Alert.Events[0].GetMeta("source_ip") == "10.0.0.1" | ||
results[1].Overflow.Alert.Events[0].GetMeta("timestamp") == "2024-11-20T04:13:06Z" | ||
results[1].Overflow.Alert.GetScenario() == "crowdsecurity/CVE-2024-0012" | ||
results[1].Overflow.Alert.Remediation == true | ||
results[1].Overflow.Alert.GetEventsCount() == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10.0.0.1 - - [20/Nov/2024:04:13:06 +0000] "POST /php/utils/createRemoteAppwebSession.php/watchTowr.js.map HTTP/1.1" 404 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" "-" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
parsers: | ||
- crowdsecurity/nginx-logs | ||
- crowdsecurity/syslog-logs | ||
- crowdsecurity/dateparse-enrich | ||
scenarios: | ||
- ./scenarios/crowdsecurity/CVE-2024-9474.yaml | ||
postoverflows: | ||
- "" | ||
log_file: CVE-2024-9474.log | ||
log_type: nginx | ||
ignore_parsers: true |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
len(results) == 1 | ||
"10.0.0.1" in results[0].Overflow.GetSources() | ||
results[0].Overflow.Sources["10.0.0.1"].IP == "10.0.0.1" | ||
results[0].Overflow.Sources["10.0.0.1"].Range == "" | ||
results[0].Overflow.Sources["10.0.0.1"].GetScope() == "Ip" | ||
results[0].Overflow.Sources["10.0.0.1"].GetValue() == "10.0.0.1" | ||
results[0].Overflow.Alert.Events[0].GetMeta("datasource_path") == "CVE-2024-9474.log" | ||
results[0].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_path") == "/php/utils/createRemoteAppwebSession.php/watchTowr.js.map" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_status") == "404" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_user_agent") == "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" | ||
results[0].Overflow.Alert.Events[0].GetMeta("http_verb") == "POST" | ||
results[0].Overflow.Alert.Events[0].GetMeta("log_type") == "http_access-log" | ||
results[0].Overflow.Alert.Events[0].GetMeta("service") == "http" | ||
results[0].Overflow.Alert.Events[0].GetMeta("source_ip") == "10.0.0.1" | ||
results[0].Overflow.Alert.Events[0].GetMeta("timestamp") == "2024-11-20T04:13:06Z" | ||
results[0].Overflow.Alert.GetScenario() == "crowdsecurity/CVE-2024-9474" | ||
results[0].Overflow.Alert.Remediation == true | ||
results[0].Overflow.Alert.GetEventsCount() == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
name: crowdsecurity/vpatch-CVE-2024-0012 | ||
description: "PanOS - Authentication Bypass (CVE-2024-0012)" | ||
rules: | ||
- and: | ||
- zones: | ||
- HEADERS | ||
variables: | ||
- x-pan-authcheck | ||
transform: | ||
- lowercase | ||
match: | ||
type: equals | ||
value: off | ||
labels: | ||
type: exploit | ||
service: http | ||
confidence: 3 | ||
spoofable: 0 | ||
behavior: "http:exploit" | ||
label: "PanOS - Authentication Bypass" | ||
classification: | ||
- cve.CVE-2024-0012 | ||
- attack.T1595 | ||
- attack.T1190 | ||
- cwe.CWE-306 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
name: crowdsecurity/vpatch-CVE-2024-9474 | ||
description: "PanOS - Privilege Escalation (CVE-2024-9474)" | ||
rules: | ||
- and: | ||
- zones: | ||
- METHOD | ||
match: | ||
type: equals | ||
value: POST | ||
- zones: | ||
- URI | ||
transform: | ||
- lowercase | ||
match: | ||
type: contains | ||
value: /php/utils/createremoteappwebsession.php/ | ||
- zones: | ||
- URI | ||
transform: | ||
- lowercase | ||
match: | ||
type: endsWith | ||
value: .js.map | ||
- zones: | ||
- BODY_ARGS | ||
variables: | ||
- user | ||
transform: | ||
- lowercase | ||
match: | ||
type: regex | ||
value: "[$;|&`>]" | ||
labels: | ||
type: exploit | ||
service: http | ||
confidence: 3 | ||
spoofable: 0 | ||
behavior: "http:exploit" | ||
label: "PanOS - Privilege Escalation (CVE-2024-9474)" | ||
classification: | ||
- cve.CVE-2024-9474 | ||
- attack.T1595 | ||
- attack.T1190 | ||
- cwe.CWE-78 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Detect exploitation of PanOS CVE-2024-0012 | ||
|
||
Ref: https://labs.watchtowr.com/pots-and-pans-aka-an-sslvpn-palo-alto-pan-os-cve-2024-0012-and-cve-2024-9474/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
type: trigger | ||
format: 2.0 | ||
name: crowdsecurity/CVE-2024-0012 | ||
description: "Detect CVE-2024-0012 exploitation attempts" | ||
filter: | | ||
let request = Lower(evt.Parsed.request); | ||
evt.Meta.log_type in ['http_access-log', 'http_error-log'] && | ||
evt.Meta.http_status in ['404', '403'] && | ||
(request matches '/php/.*/\\.js\\.map' || request matches '/index.php/.*\\.js\\.map') | ||
groupby: "evt.Meta.source_ip" | ||
blackhole: 2m | ||
labels: | ||
type: exploit | ||
remediation: true | ||
classification: | ||
- attack.T1595 | ||
- attack.T1190 | ||
- cve.CVE-2024-0012 | ||
confidence: 3 | ||
spoofable: 0 | ||
behavior: "http:exploit" | ||
label: "CVE-2024-0012" | ||
service: panos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Detect exploitation of PanOS CVE-2024-9474 | ||
|
||
Ref: https://labs.watchtowr.com/pots-and-pans-aka-an-sslvpn-palo-alto-pan-os-cve-2024-0012-and-cve-2024-9474/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
type: trigger | ||
format: 2.0 | ||
name: crowdsecurity/CVE-2024-9474 | ||
description: "Detect CVE-2024-9474 exploitation attempts" | ||
filter: | | ||
let request = Lower(evt.Parsed.request); | ||
evt.Meta.log_type in ['http_access-log', 'http_error-log'] && | ||
evt.Meta.http_status in ['404', '403'] && | ||
evt.Meta.http_verb == 'POST' && | ||
request contains '/php/utils/createremoteappwebsession.php/watchtowr.js.map' | ||
groupby: "evt.Meta.source_ip" | ||
blackhole: 2m | ||
labels: | ||
type: exploit | ||
remediation: true | ||
classification: | ||
- attack.T1595 | ||
- attack.T1190 | ||
- cve.CVE-2024-9474 | ||
confidence: 3 | ||
spoofable: 0 | ||
behavior: "http:exploit" | ||
label: "CVE-2024-9474" | ||
service: panos |
Oops, something went wrong.