stamin4
  • whoami
  • HTB Academy
    • Introduction to Academy
    • Learning Process
    • Vulnerability Assessment
    • Web Requests
    • Introduction to Networking
    • Linux Fundamentals
    • Brief Intro to Hardware Attacks
    • Setting Up
    • Using the Metasploit Framework
    • Security Incident Reporting
    • Introduction to Web Applications
    • JavaScript Deobfuscation
    • Attacking Web Applications with Ffuf
    • Windows Fundamentals
    • File Inclusion
  • HTB Machines
    • Windows
      • 🟢Easy
      • 🟠Medium
      • 🔴Difficult
      • 🟣Insane
    • Linux
      • 🟢Easy
        • Cap
      • 🟠Medium
      • 🔴Difficult
      • 🟣Insane
  • OverTheWire
    • Bandit
      • Nivel 0
      • Nivel 1
      • Nivel 2
      • Nivel 3
      • Nivel 4
      • Nivel 5
      • Nivel 6
      • Nivel 7
      • Nivel 8
      • Nivel 9
      • Nivel 10
  • Base de datos
    • SQL
      • SELECT queries 101
      • Queries with constraints (Pt. 1)
      • Queries with constraints (Pt. 2)
      • Filtering and sorting Query results
      • Simple SELECT Queries
      • Multi-table queries with JOINs
      • OUTER JOINs
      • A short note on NULLs
      • Queries with expressions
      • Queries with aggregates (Pt. 1)
      • Queries with aggregates (Pt. 2)
      • Order of execution of a Query
      • Inserting rows
      • Updating rows
      • Deleting rows
      • Creating tables
      • Altering tables
      • Dropping tables
  • PortSwigger
    • Path Traversal
  • Dockerlabs
    • Trust
    • Firsthacking
    • Upload
Powered by GitBook
On this page
  1. OverTheWire
  2. Bandit

Nivel 4

La contraseña para el siguiente nivel se encuentra en un archivo oculto dentro del directorio inhere. Nos movemos a dicho directorio:

cd inhere

Con un ls no veremos ningún archivo, puesto que está oculto, por lo que usamos el siguiente comando en su lugar:

ls -la
total 12
drwxr-xr-x 2 root    root    4096 Oct  5 06:19 .
drwxr-xr-x 3 root    root    4096 Oct  5 06:19 ..
-rw-r----- 1 bandit4 bandit3   33 Oct  5 06:19 .hidden

Ahí podemos ver un archivo ``.hidden` que contiene la flag.

cat .hidden

Cabe destacar que en bash podemos atravesar directorios, por lo que no es necesario primero moverse para luego hacer un ls. Podríamos hacer esto directamente:

ls -la inhere

Otra forma posible sería usar find para que busque todos los archivos (sin incluir directorios) que existen en la ruta actual de forma recursiva.

find . -type f
./inhere/.hidden
./.profile
./.bashrc
./.bash_logout

Nos conectamos al próximo nivel como bandit4.

ssh bandit4@bandit.labs.overthewire -p 2220
PreviousNivel 3NextNivel 5