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 6

La contraseña se encuentra en algún archivo dentro del directorio inhere, que a su vez cuenta con múltiples directorios dentro de este. El archivo cuenta con las siguientes características:

  • legible por humanos

  • 1033 bytes en tamaño

  • no ejecutable

El siguiente comando nos devuelve la ruta absoluta del archivo en cuestión. La c después de 1033 sirve para indicarle que son bytes.

find . -type f -readable -not -executable -size 1033c
./maybehere07/.file2

O también podría ser de esta forma, ya que el signo de exclamación en bash funciona como un operador lógico de negación.

find . -type f -readable ! -executable -size 1033c
./maybehere07/.file2

De forma paralela con xargs aplicamos un cat para leer el archivo.

find . -readable -not -executable -size 1033c | xargs cat 

Avanzamos al siguiente nivel como bandit6.

ssh bandit6@bandit.labs.overthewire -p 2220
PreviousNivel 5NextNivel 7

Last updated 1 year ago