How’d you all find it (trivial enough?) Gonna do some of them challenges later
Demo (Pico CTF) “Forbidden Paths” (Local File Disclosure)
Why is this bad?
../../../../../../etc/passwd
<?php
// Get the page to include from the URL parameter
$page = $_GET['page'];
// Include the requested page
include($page . '.html');
?>
What if you can upload files and then have them executed? Whats that called?
How do we fix?
allowlist santise inputs for “../” dont do it?
HAAS
, we can’t access KB
, but HAAS
could, and we can send requests through HAAS
HAAS
, which aren’t expecting itTemplating engines (eg. Jinja2, Pug) use templates to inject code and variables into static files
Jinja2: {{
<CODE HERE>}}
e.g. {{7*7}}
=> 49
what if we tricked the template rendering into thinking our user-supplied content was code?
checkout explainshell and revshells
Midterm walkthrough? Yes or No?
What you all came for lol