Created
September 12, 2017 08:47
-
-
Save chosenonehacks/0f797376a9f7fab90161b69576a63731 to your computer and use it in GitHub Desktop.
Hijack a binary's full path in bash to exec your own code
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
$ function /usr/bin/foo () { /usr/bin/echo "It works"; } | |
$ export -f /usr/bin/foo | |
$ /usr/bin/foo | |
It works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment