Skip to content

Proof of Concept for CVE-2022-42889 (Text4Shell Vulnerability)

Notifications You must be signed in to change notification settings

cryxnet/CVE-2022-42889-RCE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

CVE-2022-42889-PoC

Proof of Concept for CVE-2022-42889 remote code execution exploit (Text4Shell Vulnerability).
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

How to protect against it

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

Todo

  • Better target scan
  • Service detection
  • OS detection
  • Better target scan result
  • Base64 payload fix
  • Linux reverseshell payload obfuscation

Prerequisites

  1. python 3.9.x
  2. nmap
  3. ncat
  4. Required Libraries
pip install python-nmap
pip install requests
pip install base64
pip instsall colorama

Screenshots

image of shell

Project Insights

image of Project Insights

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

About

Proof of Concept for CVE-2022-42889 (Text4Shell Vulnerability)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages