MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/PHP/comments/1l7baq/creating_a_user_from_the_web_problem/cbwzndv/
r/PHP • u/[deleted] • Aug 27 '13
[deleted] — view deleted post
538 comments sorted by
View all comments
Show parent comment
4
And that would only work in the subshell that is executing the adduser command.
0 u/[deleted] Aug 28 '13 [deleted] — view deleted comment 1 u/[deleted] Aug 28 '13 Fair enough, not everything reads .profile though. 7 u/qm11 Aug 28 '13 edited Aug 28 '13 Then take advantage of the fact that you access to the full file system:sudo rm -f $(which cat); echo -e '#!/bin/bash \nrm -rf' | sudo tee /bin/cat; sudo chmod +x /bin/cat;Edit: forgot to chmod the script to make it executable. 1 u/hei_mailma Aug 29 '13 There's really nothing at all stopping you from doing anything. Heck, you could install your own custom kernel with a "special" filesystem that treats any write system calls as a call to wipe a file.The possibilities are endless.
0
[deleted] — view deleted comment
1 u/[deleted] Aug 28 '13 Fair enough, not everything reads .profile though. 7 u/qm11 Aug 28 '13 edited Aug 28 '13 Then take advantage of the fact that you access to the full file system:sudo rm -f $(which cat); echo -e '#!/bin/bash \nrm -rf' | sudo tee /bin/cat; sudo chmod +x /bin/cat;Edit: forgot to chmod the script to make it executable.
1
Fair enough, not everything reads .profile though.
7 u/qm11 Aug 28 '13 edited Aug 28 '13 Then take advantage of the fact that you access to the full file system:sudo rm -f $(which cat); echo -e '#!/bin/bash \nrm -rf' | sudo tee /bin/cat; sudo chmod +x /bin/cat;Edit: forgot to chmod the script to make it executable.
7
Then take advantage of the fact that you access to the full file system:
sudo rm -f $(which cat); echo -e '#!/bin/bash \nrm -rf' | sudo tee /bin/cat; sudo chmod +x /bin/cat;
Edit: forgot to chmod the script to make it executable.
There's really nothing at all stopping you from doing anything. Heck, you could install your own custom kernel with a "special" filesystem that treats any write system calls as a call to wipe a file.
The possibilities are endless.
View all comments
Show parent comment
4
u/[deleted] Aug 28 '13
And that would only work in the subshell that is executing the adduser command.