Last active
December 18, 2015 07:19
-
-
Save ormaaj/5746174 to your computer and use it in GitHub Desktop.
Puzzle. Moderately easy difficulty.
This file contains hidden or 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
| # Exploit this vulnerable program to run an arbitrary command without renaming or adding any files. | |
| k# ksh -c 'touch printf "you fail\n"; printf "%s: " "give me a value"; read -r b; a=(~(N)*); "${a[@]}" "$b" "$@"' _ args...; code... |
This file contains hidden or 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
| # My solution. There may be others. | |
| k# ksh -c 'rm *; touch printf "you fail\n"; printf "%s\n" "give me a value"; read -r b; a=(~(N)*); "${a[@]}" "$b" "$@"' \ | |
| _ I win. |& { sleep .2; rm -- ~(N)*; print -p echo; cat <&p; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment