mysql-pentesting
Warn
Audited by Gen Agent Trust Hub on Oct 16, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONPERSISTENCEPRIVILEGE_ESCALATIONDATA_EXFILTRATIONCREDENTIALS_UNSAFEDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONOBFUSCATIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The skill provides instructions for executing system commands directly through the MySQL client using the ! syntax and through the creation of User Defined Functions (UDF) like sys_exec. It includes examples of running arbitrary shells and modifying file permissions (chmod 777).
- [REMOTE_CODE_EXECUTION]: Instructions include setting up reverse shells using bash and TCP connections, and details the use of Rogue MySQL servers to execute code on clients via JDBC vulnerabilities (e.g., propertiesTransform).
- [PERSISTENCE]: The methodology describes techniques for maintaining access by injecting attacker-controlled keys into /root/.ssh/authorized_keys and creating malicious scheduled tasks via cron jobs in /etc/cron.d/backdoor.
- [PRIVILEGE_ESCALATION]: Detailed guides are provided for escalating from a database user to a system root account by loading malicious shared libraries (.so or .dll) into the MySQL plugin directory or using NTFS ADS to create directories on Windows.
- [DATA_EXFILTRATION]: Payloads are included for reading sensitive system files such as /etc/shadow, /etc/mysql/debian.cnf, and user-specific credentials in ~/.my.cnf. It also documents Out-of-Band (OOB) data leakage via DNS lookups.
- [CREDENTIALS_UNSAFE]: The skill documents methods for dumping database user hashes (mysql_native_password, caching_sha2_password) and extracting plain-text credentials from local configuration files.
- [DYNAMIC_EXECUTION]: Describes using .pth files to trigger code execution within Python environments and the dynamic loading of binary objects for UDF exploitation.
- [INDIRECT_PROMPT_INJECTION]: The skill establishes an attack surface for indirect injection by processing data from potentially hostile sources. Ingestion points: Data is ingested from external MySQL servers during Rogue Server attacks and via LOAD_FILE from arbitrary system files. Boundary markers: The instructions lack delimiters or warnings to ignore instructions embedded in the processed data. Capability inventory: The skill possesses powerful capabilities including shell command execution, arbitrary file writing, and network access. Sanitization: No input sanitization, validation, or escaping of external content is specified before interpolation or execution.
- [OBFUSCATION]: Mentions the use of SQL encoding techniques (UNHEX, FROM_BASE64) and comment-based bypasses (/**/, /!/) to evade security monitoring and filters.
- [EXTERNAL_DOWNLOADS]: Recommends downloading and using third-party exploitation tools and Rogue Server implementations from external sources like GitHub.
Audit Metadata