Netsweeper 4.0.9 – Arbitrary File Upload and Execution
Netsweeper 4.0.9 (and probably other versions) allows an authenticated user with admin privileges, to upload arbitrary PHP code (eg PHP shell) and further execute it with root rights. To replicate the bug, an attacker must login as admin at https://<netsweeper>/webadmin, go to System Tools | System Configuration, select 'Routes Advertising Service' then Add new Peer, and add the IP address of the Netsweeper server. The attacker must then copy and paste a malicious bash script into the 'File Template' field, set the 'Config file' field to '/tmp/secuid0.sh' and the 'Service Restart Command' field to '/bin/bash /tmp/secuid0.sh'. The attacker must then set up a netcat listener on port 1234 and click 'Save'. Once the malicious bash script is submitted, it will be executed with root privileges.