Share
## https://sploitus.com/exploit?id=15920FC5-2EF1-5D1B-81C1-361E8B248365
# CVE-2022-42889-PoC

Proof of Concept for CVE-2022-42889 remote code execution exploit (Text4Shell Vulnerability).
<br /> Give a โญ for support โค๏ธ

## About this vulnerability

CVE-2022-42889 is a new critical vulnerability similar to Spring4Shell and Log4Shell.
Its a RCE (Remote Code Execution) vulnerability with the severity score of 9.8.
This allows hacker to execute arbitary malicious code on the attacked machine.
The version 1.5 - 1.9 from Apache Commons Text are affected.

## How this works

> Apache Commons Text performs variable interpolation, allowing properties to be dynamically evaluated and expanded. The standard format for interpolation is "${prefix:name}", where "prefix" is used to locate an instance of org.apache.commons.text.lookup.StringLookup that performs the interpolation. Starting with version 1.5 and continuing through 1.9, the set of default Lookup instances included interpolators that could result in arbitrary code execution or contact with remote servers. These lookups are: - "script" - execute expressions using the JVM script execution engine (javax.script) - "dns" - resolve dns records - "url" - load values from urls, including from remote servers Applications using the interpolation defaults in the affected versions may be vulnerable to remote code execution or unintentional contact with remote servers if untrusted configuration values are used. - [cve.mitre.org](https://vulners.com/cve/CVE-2022-42889)

## How to protect against it

You just need to upgrade this service to the version =< 1.10

## Todo

- [x] Better target scan
- [x] Service detection
- [x] OS detection
- [x] Better target scan result
- [ ] Base64 payload fix
- [ ] Linux reverseshell payload obfuscation

## Prerequisites

1. python 3.9.x
2. nmap
3. ncat
4. Required Libraries

```sh
pip install python-nmap
pip install requests
pip install base64
pip instsall colorama
```

## Screenshots

![image of shell](/docs/assets/images/shell.png)

## Project Insights

![image of Project Insights](/docs/assets/images/traffic_insights_16.11.png)

## Disclaimer

**YOUR USAGE OF THIS PROJECT CONSTITUTES YOUR AGREEMENT TO THE FOLLOWING TERMS:**

- THE MISUSE OF THE DATA PROVIDED BY THIS PROJECT AND ITS EXPLOITS MAY LEAD TO CRIMINAL CHARGES AGAINST THE PERSONS CONCERNED.

- I DO NOT TAKE ANY RESPONSIBILITY FOR THE CASE. USE THIS PROJECT ONLY FOR RESEARCH PURPOSES, EDUCATIONAL PURPOSES & ETHICAL ONLY.

- Its a project related to Computer Security and for Educational Purposes and not a project that promotes illegal activities.

- Don't use this Project for any illegal activities.

- If something happens, we do not take any liability.

- It should teach people how a Malware and a complex Hack Strategie could work and also how to deal with those threats.

- THIS IS A EDUCATIONAL RESEARCH PROJECT