Does anyone know how to hack dvwa(http://www.dvwa.co.uk) via submitting a form input like ../../../../../etc/passwd
to expose the /etc/passwd
of a given server?
Is there a endpoint to hit for this?
Thanks
Does anyone know how to hack dvwa(http://www.dvwa.co.uk) via submitting a form input like ../../../../../etc/passwd
to expose the /etc/passwd
of a given server?
Is there a endpoint to hit for this?
Thanks
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$file=$_POST['filename'];
include($file);
}?>
<html>
<title>test</title>
<head>
</head>
<body>
<form method="post" action="index.php">
<p>filename<input type="text" name="filename"><p>
</form>
</body>
</html>
This is usually the vulnerable back end code for Local file inclusion.If you intercept the request and change the filename parameter you can read data from the victim server.This code can also result in remote file inclusion if allow_url_include is turned on.
url
but not via a form field... do you know where to find that