I am studying a little bit SPF and other spam/phishing prevention techniques that have been developed during the years, and I have a few question about SPF. I know the difference between the MAIL FROM verb and the FROM header, but I am having problems into understanding if and how SPF makes harder for a spammer/phisher to achieve it's goal.
What I do understand is that while it is usually desirable, for a spammer/phisher, to abuse the FROM header so that the mail seems to be coming from a legit source (this is what the user sees, after all), the MAIL FROM field is not shown to the user. For example, the phisher could register a real, valid domain to send mail from, and this would be bypassed. Another thing that comes to my mind is that, for example, mybank.com has a very simple SPF entry: mybank.com. IN TXT "v=spf1 a -all"
. In this case, a spammer could easily forge emails with the MAIL FROM set to secure.mybank.com, thus bypassing the SPF check as for secure.mybank.com there is no SPF entry (and the default is a pass, if no SPF entry exists). Also, he could abuse a completely non-existing domain, not a subdomain of something that exists.
In the last cases, the only thing that the receiver server could do would be to cross-validate the MAIL FROM verb and the FROM header to ensure they are the same, but again, the FROM header could be spoofed to admin@secure.mybank.com (I know that for that there is DMARC, but I'm considering a case where SPF only is implemented).
Mainly, I don't understand if SPF was born with the goal to make life harder for spammer/phishers, or if it was born to make sysadmin's life easier (since an appropriate SPF configuration could reduce the number of error messages received by a domain that is being abused). Even if it is the latter, I don't understand the main benefit for a spammer/phisher to use a legit MAIL FROM address.
Thanks in advance to anyone.
EDIT: I see that this question was marked as duplicate, and I may have missed a point, but I think that the other questions don't answer my main point, that is, what is the point of having SPF alone? Along with DMARC and DKIM it can be used to detect phishing attempts, but SPF alone can be easily bypassed by using a subdomain of an existing domain or a new domain. In my understanding, SPF can help in reducing UBE for sysadmins, but not a single user from spam/phish, and was looking for a confirmation or refutation for this.