Misconfigured SPF Record Flag
The SPF record for the domain ended with a soft-fail qualifier instead of a hard-fail one, so receiving mail servers would only mark spoofed messages as suspicious rather than reject them. An attacker could send email that appears to come from the organisation's address and potentially trick recipients.
- Disclosed after 10 months
Hello Team ,
####Description : this report is about misconfigured spf record flag , which can be use to abuse the organization by posing the identity , which allowing to fake mailing on behalf of respected organization .
####About the Issue : as i seen the SPF and TXT record for the Udemy.com which is :
v=spf1 include:_spf.google.com include:smtp1.uservoice.com include:mktomail.com ~all
as u can see the symbol at last which Tilde (~all) is the issue , which should be replace by Hyphen (-all) symbol .
so valid record will be look like :
v=spf1 include:_spf.google.com include:smtp1.uservoice.com include:mktomail.com -all
```
####Whats the issue :
as u can see in the article difference between softmail and fail you should be using fail as Softmail allows anyone to send spoofed emails from your domains.
in current SPF record you should replace ~ with - at last before all , - is strict which prevents all spoofed emails except if you are sending .
####Attack Scenario :
an attacker will send phishing mail or anything malicious mail to the victim via mail : [email protected]__ , even if the victim is aware of phishing attack , he will check the Origin email which will be [email protected]__ , so he will be sure that its not fake mail and get trapped by attacker !
This can be done using any php mailer tool like this ,
__u can check your SPF record form here : http://www.kitterman.com/spf/validate.html__ !
####Reference : https://www.digitalocean.com/community/tutorials/how-to-use-an-spf-record-to-prevent-spoofing-improve-e-mail-reliability
have a look on the __digitalocean__ article for the better understanding !
Please let me know if any more info needed !
__Thank You
Geekboy :)__
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
The SPF record used the soft-fail qualifier (~all) instead of the hard-fail qualifier (-all), so unauthorised senders were not strictly rejected.
Impact
An attacker could send spoofed email appearing to come from the organisation's address, which recipients might trust; the report does not show that any message was actually delivered or accepted.
What the attacker needed
Ability to send email with a forged sender address
The fix
The SPF record should be changed to end with -all so that unauthorised senders are rejected.
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 servers are allowed to send email for a domain. The record ended with a 'soft fail' setting, which means a server that is not on the list is only marked as suspicious, not rejected. Changing it to 'hard fail' tells receivers to reject such mail outright.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.