Created
October 15, 2012 12:21
-
-
Save michaelhood/3892179 to your computer and use it in GitHub Desktop.
dtruss "drop" privileges
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
mh@mbp:~% sudo dtruss -f sudo -u\#$UID whoami 2>/dev/null | |
mh | |
mh@mbp:~% sudo dtruss -f -t fakesyscall sudo -u\#$UID touch / | |
PID/THRD SYSCALL(args) = return | |
28082/0xad253: fork() = 0 0 | |
touch: setting times of ‘/’: Permission denied | |
mh@mbp:~% # note that i only used these methods to hide output | |
mh@mbp:~% # to keep the demo short. dtruss is functional. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment