58
Lab 11: Authorization Bypass Through Type Juggling
Inside the provided Virtual Machine, edit /etc/hosts as follows.
Navigate to http://shopware.local/juggling.php
The source code of the vulnerable application is the below.
// $FLAG, $USER and $PASSWORD_SHA256 in secret file
require("secret.php");
// show my source code
if(isset($_GET['source'])){
show_source(__FILE__);
die();
}
$return['status'] = 'Authentication failed!';
if (isset($_POST["auth"])) {
// retrieve JSON data
$auth = @json_decode($_POST['auth'], true);
// check login and password (sha256)
Do'stlaringiz bilan baham: |