-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
News rules: CVE-2023-47218 and git-config (#1078)
* add rules to collec --------- Co-authored-by: GitHub Action <[email protected]>
- Loading branch information
1 parent
7b7452e
commit 82f9c46
Showing
9 changed files
with
227 additions
and
3 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-2023-47218.yaml | ||
nuclei_template: test-CVE-2023-47218.yaml |
28 changes: 28 additions & 0 deletions
28
.appsec-tests/vpatch-CVE-2023-47218/test-CVE-2023-47218.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,28 @@ | ||
id: test-CVE-2023-47218 | ||
info: | ||
name: test-CVE-2023-47218 | ||
author: crowdsec | ||
severity: info | ||
description: test-CVE-2023-47218 testing | ||
tags: appsec-testing | ||
variables: | ||
file: "{{rand_base(6)}}" | ||
cmd: "%22$($(echo -n aWQ=|base64 -d)>{{file}})%22" | ||
http: | ||
- raw: | ||
- | | ||
POST /cgi-bin/quick/quick.cgi?func=switch_os&todo=uploaf_firmware_image HTTP/1.1 | ||
Host: {{Hostname}} | ||
Content-Type: multipart/form-data;boundary="avssqwfz" | ||
--avssqwfz | ||
Content-Disposition: form-data; xxpcscma="field2"; zczqildp="{{cmd}}" | ||
Content-Type: text/plain | ||
skfqduny | ||
--avssqwfz- | ||
matchers: | ||
- type: status | ||
status: | ||
- 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
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-git-config.yaml | ||
nuclei_template: test-vpatch-git-config.yaml |
17 changes: 17 additions & 0 deletions
17
.appsec-tests/vpatch-git-config/test-vpatch-git-config.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,17 @@ | ||
id: test-vpatch-git-config | ||
info: | ||
name: test-vpatch-git-config | ||
author: crowdsec | ||
severity: info | ||
description: test-vpatch-git-config testing | ||
tags: appsec-testing | ||
http: | ||
- method: GET | ||
path: | ||
- "{{BaseURL}}/toto/.git/config" | ||
|
||
cookie-reuse: true | ||
matchers: | ||
- type: status | ||
status: | ||
- 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,48 @@ | ||
name: crowdsecurity/vpatch-CVE-2023-47218 | ||
debug: true | ||
description: "QNAP QTS - RCE (CVE-2023-47218)" | ||
rules: | ||
- and: | ||
- zones: | ||
- METHOD | ||
match: | ||
type: equals | ||
value: POST | ||
- zones: | ||
- URI | ||
transform: | ||
- lowercase | ||
match: | ||
type: endsWith | ||
value: /cgi-bin/quick/quick.cgi | ||
- zones: | ||
- ARGS | ||
variables: | ||
- func | ||
transform: | ||
- lowercase | ||
match: | ||
type: equals | ||
value: "switch_os" | ||
- zones: | ||
- ARGS | ||
variables: | ||
- todo | ||
transform: | ||
- lowercase | ||
match: | ||
type: equals | ||
value: "uploaf_firmware_image" | ||
labels: | ||
type: exploit | ||
service: http | ||
confidence: 3 | ||
spoofable: 0 | ||
behavior: "http:exploit" | ||
label: "QNAP QTS - RCE" | ||
classification: | ||
- cve.CVE-2023-47218 | ||
- attack.T1595 | ||
- attack.T1190 | ||
- cwe.CWE-78 | ||
- cwe.CWE-77 |
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 @@ | ||
name: crowdsecurity/vpatch-git-config | ||
description: "Detect access to .git files" | ||
rules: | ||
- zones: | ||
- URI | ||
transform: | ||
- lowercase | ||
match: | ||
type: contains | ||
value: /.git/config | ||
labels: | ||
type: scan | ||
service: http | ||
confidence: 3 | ||
spoofable: 0 | ||
behavior: "http:scan" | ||
label: "Access to .git file" | ||
classification: | ||
- attack.T1595 |
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