BARIH0x
GITHUBHTB
  • 📀BARIHO
    • 📜 CERTIFICACIONES
      • ✅eJPT
      • ✅OSWP
      • OSCP
  • 🛡️ PROYECTOS
    • ⚙️HOME LAB
      • 🍓PI-HOLE
      • 🗄️OPENMEDIAVAULT
      • ⛓️HOME ASSISTANTS [TRABAJANDO]
      • 🌐OPNSense [PROXIMO]
    • ⛔T-POT
  • ⚔️ WALKTHROUGH
    • 📄 HackTheBox
      • Legacy
      • Blue
      • Lame
    • 📄 TryHackme
      • 27 ~ Cmess - Linux
      • 26 ~ Battery - Linux
      • 25 ~ ConvertMyVideo - Linux
      • 24 ~ DogCat - Linux
      • 23 ~ Wonderland - Linux
      • 22 ~ Lian_Yu - Linux
      • 21 ~ Tomghost - Linux
      • 20 ~ LazyAdmin - Linux
      • 19 ~Boiler CTF - Linux
      • 18 ~ Couchdb - Linux
      • 17 ~ 0day - Linux
      • 16 ~ Brute It - Linux
      • 15 ~ Blog - Linux
      • 14 ~ Madness - Linux
      • 13 ~ Year Of The Rabbit - Linux
      • 12 ~ Inclusion - Linux
      • 11 ~ UltraTech - Linux
      • 10 ~ Anonymous - Linux
      • 9 ~ Ignite - Linux
      • 8 ~ Vulnversity - Linux
      • 7 ~ Basic Pentesting - Linux
      • 6 ~ MrRobot - Linux
      • 5 ~ Agent-Sudo - Linux
      • 4 ~ EasyCTF - Linux
      • 3 ~ Thompson - Linux
      • 2 ~ RootMe - Linux
      • 1 ~ Bounty Hacker - Linux
    • 🎮 OverTheWire
      • BANDIT
      • NATAS
        • Natas 0
    • 🎮 DVWA
      • Instalación DVWA (XAMPP)
      • Instalación DVWA (DOCKER)
      • Command Injection
      • File Inclusion
      • SQL Injection
  • 🛠️RECURSOS
  • Herramientas
  • 🗃️ Scripts
    • KillSSH
  • 💣 Maquinas
    • Login Wordpress - MrRobot
    • Fuzzing - Madness
  • 🔎 LINKS DE INTERERES
Con tecnología de GitBook
En esta página
  • Low Security Level
  • Medium Security Level
  • High Security Level
  • Impossible Security Level
  1. ⚔️ WALKTHROUGH
  2. 🎮 DVWA

File Inclusion

Low Security Level

No tiene medida de seguridad.

<?php

// The page we wish to display
$file = $_GET[ 'page' ];

?>

LFI:

  • localhost/vulnerabilities/fi/?page=/etc/passwd

Podemos listar el archivo /etc/passwd sin muchas complicaciones.

Medium Security Level

Malas practicas de seguridad.

<?php

// The page we wish to display
$file = $_GET[ 'page' ];

// Input validation
$file = str_replace( array( "http://", "https://" ), "", $file );
$file = str_replace( array( "../", "..\"" ), "", $file );

?>

LFI:

  • localhost/vulnerabilities/fi/?page=php://filter/convert.base64-encode/resource=/etc/passwd

Nos dará el archivo codificado en base64, lo copiaremos y en nuestras shell, lo decodificaremos de la base64, y podremos visualizar el archivo /etc/passwd.

High Security Level

Malas prácticas más duras o alternativas.

<?php

// The page we wish to display
$file = $_GET[ 'page' ];

// Input validation
if( !fnmatch( "file*", $file ) && $file != "include.php" ) {
    // This isn't the page we want!
    echo "ERROR: File not found!";
    exit;
}

?>

NO COMPLETADO AUN!

Impossible Security Level

Segura contra todas las vulnerabilidades.

AnteriorCommand InjectionSiguienteSQL Injection

Última actualización hace 3 años