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

Was this helpful?

  1. WRITEUPS
  2. OverTheWire
  3. Bandit

Nivel 21-30

PreviousNivel 11-20NextNivel 31-34

Last updated 8 months ago

Was this helpful?

NIVEL 21

Ingresamos las credenciales para el nivel 21.

  • Usuario: bandit21

  • Contraseña: EeoULMCra2q0dSkYj561DX7s1CpBuOBt

Un programa se está ejecutando automáticamente a intervalos regulares desde cron, el programador de trabajos basado en el tiempo. Busca en /etc/cron.d/ la configuración y verifica qué comando se está ejecutando.

NIVEL 22

Ingresamos las credenciales para el nivel 22.

  • Usuario: bandit22

  • Contraseña: tRae0UfB9v0UzbCdn9cY0gQnds9GF58Q

Un programa se está ejecutando automáticamente a intervalos regulares desde cron, el programador de tareas basado en el tiempo. Mira en /etc/cron.d/ para ver la configuración y qué comando está siendo ejecutado.

NIVEL 23

Ingresamos las credenciales para el nivel 23.

  • Usuario: bandit23

  • Contraseña: 0Zf11ioIjMVN551jX3CmStKLYqjk54Ga

Un programa se está ejecutando automáticamente a intervalos regulares desde cron, el programador de tareas basado en el tiempo. Revisa la configuración en /etc/cron.d/ para ver qué comando se está ejecutando.

NOTA: Este nivel requiere que crees tu propio script en shell. ¡Este es un gran paso y deberías sentirte orgulloso de ti mismo cuando completes este nivel!

NOTA 2: Ten en cuenta que tu script en shell será eliminado una vez que se ejecute, por lo que puede ser una buena idea mantener una copia guardada.

mkdir /tmp/bandit24
cd /tmp/bandit24
ls
echo "cat /etc/bandit_pass/bandit24 > /tmp/bandit24/pass" > script.sh
ls
touch pass
chmod +rwx pass
chmod +rx script.sh
ls
chmod 777 /tmp/bandit24
ls
cp script.sh /var/spool/bandit24/foo/
cat pass

La contraseña es gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8

NIVEL 24

Ingresamos las credenciales para el nivel 24.

  • Usuario: bandit24

  • Contraseña: gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8

El escenario que describes implica que un programa o "daemon" está escuchando en el puerto 30002, y te proporcionará la contraseña para "bandit25" si le proporcionas la contraseña correcta para "bandit24" y un código PIN secreto de 4 dígitos. Como no se conoce el PIN, la única manera de encontrarlo es mediante un ataque de fuerza bruta, probando todas las posibles combinaciones desde 0000 hasta 9999. Por lo que he creado este script de bash.

Aquí tienes el script en formato Markdown con el código en Bash:

#!/bin/bash

for i in {0000..9999}
do
        echo gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8 $i >> possibilities.txt
done

cat possibilities.txt | nc localhost 30002 > result.txt

Este script genera todas las combinaciones posibles de 4 dígitos y las guarda en un archivo possibilities.txt junto con la contraseña gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8. Luego, usa nc para enviar el contenido del archivo al puerto 30002 del localhost, y guarda la respuesta en result.txt.

La contraseña es iCi86ttT4KSNe1armKiwbQNmB3YJP3q4

NIVEL 25

Ingresamos las credenciales para el nivel 25.

  • Usuario: bandit25

  • Contraseña: iCi86ttT4KSNe1armKiwbQNmB3YJP3q4

El problema consiste en iniciar sesión en el usuario bandit26 desde bandit25. Sin embargo, la shell del usuario bandit26 no es /bin/bash, sino otra diferente. El objetivo es descubrir qué shell es, cómo funciona y cómo salir de ella para obtener un acceso completo a la terminal.

El script utiliza el comando more para mostrar un arte ASCII y luego sale directamente. Por lo tanto, el comando more podría ser un punto de entrada que podríamos explotar para obtener una shell normal. Ahora, necesitamos redimensionar nuestra terminal para activar los efectos del comando more y entrar en el modo de visualización de comandos.

Para editar un archivo que se está viendo con more, presiona v. Esto lanzará el editor de texto que está configurado en la variable de entorno $EDITOR en la línea que se está viendo.

Introduce :e /etc/bandit_pass/bandit26 y entra en el modo de edición para verificar la contraseña de bandit26.

NIVEL 26

Ingresamos las credenciales para el nivel 26.

  • Usuario: bandit26

  • Contraseña: s0773xxkk0MXfdqOfPRVr9L3jJBUOgCZ

NIVEL 27

Ingresamos las credenciales para el nivel 27.

  • Usuario: bandit27

  • Contraseña: upsNCc7vzaRDx6oZC6GiR6ERwe1MowGB

Hay un repositorio de Git en ssh://bandit27-git@localhost/home/bandit27-git/repo a través del puerto 2220. La contraseña para el usuario bandit27-git es la misma que la de bandit27.

# Clonar el repositorio de Git
git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo

Salida:

lessCopiar códigoCloning into 'repo'...
The authenticity of host '[localhost]:2220 ([127.0.0.1]:2220)' can't be established.
ED25519 key fingerprint is SHA256:C2ihUBV7ihnV1wUXRb4RrEcLfXC5CXlhmAAM/urerLY.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Could not create directory '/home/bandit27/.ssh' (Permission denied).
Failed to add the host to the list of known hosts (/home/bandit27/.ssh/known_hosts).
                         _                     _ _ _
                        | |__   __ _ _ __   __| (_) |_
                        | '_ \ / _` | '_ \ / _` | | __|
                        | |_) | (_| | | | | (_| | | |_
                        |_.__/ \__,_|_| |_|\__,_|_|\__|


                      This is an OverTheWire game server.
            More information on http://www.overthewire.org/wargames

bandit27-git@localhost's password:
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
# Listar el contenido del directorio 'repo'
ls -al repo

Salida:

total 16
drwxrwxr-x 3 bandit27 bandit27 4096 Aug 23 19:10 .
drwxrwxr-x 3 bandit27 bandit27 4096 Aug 23 19:10 ..
drwxrwxr-x 8 bandit27 bandit27 4096 Aug 23 19:10 .git
-rw-rw-r-- 1 bandit27 bandit27   68 Aug 23 19:10 README
cat repo/README

Salida:

The password to the next level is: Yz9IpL0sBcCeuG7m9uQFt8ZNpS4HZRcN

NIVEL 28

Ingresamos las credenciales para el nivel 28.

  • Usuario: bandit28

  • Contraseña: Yz9IpL0sBcCeuG7m9uQFt8ZNpS4HZRcN

NIVEL 29

Ingresamos las credenciales para el nivel 29.

  • Usuario: bandit29

  • Contraseña: 4pT1t5DENaYuqnqvadYs1oE4QLCdjmJ7

NIVEL 30

Ingresamos las credenciales para el nivel 30.

  • Usuario: bandit30

  • Contraseña: qp30ex3VLz5MDG1n91YowTv4Q8l7CDZL