Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2021-42392 PoC — H2database代码问题漏洞

Source
Associated Vulnerability
Title:H2database代码问题漏洞 (CVE-2021-42392)
Description:The org.h2.util.JdbcUtils.getConnection method of the H2 database takes as parameters the class name of the driver and URL of the database. An attacker may pass a JNDI driver name and a URL leading to a LDAP or RMI servers, causing remote code execution. This can be exploited through various attack vectors, most notably through the H2 Console which leads to unauthenticated remote code execution.
Readme
# CVE-2021-42392-Detect
# About
The script detects vulnerable H2 server for the give list of IPs, it can identify the H2 Console web pages and check for access restrictions.


### Usage

Create a file containing list of IPs and name the file IP.txt, place the 'IP.txt' and 'h2-detect.py' in a directory and execute the script.

Here "IP.txt" is the default filename that's hardcoded into script however the script can also take an random filename as input argument and
when if no filename is specified it searched for "IP.txt" file in the current directory and if it is not found it throws an file not found error.

So either specify a filename or simply place IP.txt file with the h2_detect.py scripts. 

![usage1](https://github.com/cybersecurityworks553/CVE-2021-42392-Detect/blob/main/Detect_usage1.png)

![usage2](https://github.com/cybersecurityworks553/CVE-2021-42392-Detect/blob/main/Detect_usage2.png)

### Script Syntax
```
# Useing Default filename  
`$ python h2_detect_v0.3.py IP.txt ` or  `$ python h2_detect_v0.3.py`

# Specifying filename
`$ python3 h2_detect_v0.3.py <filename.txt>`
```
#### Error
![error](https://github.com/cybersecurityworks553/CVE-2021-42392-Detect/blob/main/Detect_error1.png)

### Requirments
pip install bs4


### Created by
Vivek Gopal
#### Security Analyst
#### Cybersecurityworks
File Snapshot

[4.0K] /data/pocs/e506ae47d936900883cf76ea189a6c025946345e ├── [ 29K] Detect_error1.png ├── [ 28K] Detect.png ├── [ 21K] Detect_usage1.png ├── [ 26K] Detect_usage2.png ├── [4.0K] h2_detect_v0.3.4.py ├── [8.6K] h2_detect_v0.3.7.py └── [1.3K] README.md 0 directories, 7 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →