You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Mauricio Tavares <ra...@gmail.com> on 2011/01/11 20:24:16 UTC
Understanding TrustPath
I want to use whitelist_from_rcvd, so I am trying to understand
TrustPAth. If you had your MTA outside of your LAN (outside IP LANIP,
internal subnet LANSUB) with its own public IP (say MAILIP), would you have
internal_networks = MAILIP LANIP LANSUB
trusted_networks = MAILIP LANIP LANSUB (+ other machines you have
outside the LAN you trust)
Am I correct? What would stop someone from trying to fake the
originating IP to fit the ones in the above list?
Re: Understanding TrustPath
Posted by Mark Martinec <Ma...@ijs.si>.
Mauricio,
> I want to use whitelist_from_rcvd, so I am trying to understand
> TrustPAth. If you had your MTA outside of your LAN (outside IP LANIP,
> internal subnet LANSUB) with its own public IP (say MAILIP), would you have
>
> internal_networks = MAILIP LANIP LANSUB
> trusted_networks = MAILIP LANIP LANSUB (+ other machines you have
> outside the LAN you trust)
>
> Am I correct?
If there are no clients of your own on the LANSUB, then you
would not want to list it in internal_networks.
Just keep LANSUB in trusted_networks. The rest is ok.
> What would stop someone from trying to fake the
> originating IP to fit the ones in the above list?
If one of your trusted MTAs reports in its Received header field
that it got a message from some untrusted IP address,
then the trust chain breaks at that point. No matter what
IP address is shown in remaining Received header fields
(possibly faked), they are not considered neither trusted
nor internal.
The key point is: it is your own trusted MTA which stops the
trust chain.
Mark
Re: Understanding TrustPath
Posted by Mauricio Tavares <ra...@gmail.com>.
On 01/11/2011 03:33 PM, Adam Moffett wrote:
> On 01/11/2011 03:24 PM, Jari Fredriksson wrote:
>> On 11.1.2011 21:24, Mauricio Tavares wrote:
>>> Am I correct? What would stop someone from trying to fake the
>>> originating IP to fit the ones in the above list?
>> If I am not mistaken, the IP protocol and SMTP. Someone might fake the
>> address when sending to you MTA, but your MTA's response would go to
>> wrong address, the fake one. There would be no session and talk between
>> the hosts to create a SPAM
>
> Right, it's kind of difficult to fake your source IP in a TCP session.
> But if I read the manual correctly the whitelist_from_rcvd that he's
> asking about does lookups on hosts in the "Received-from: " headers in
> the message.....which would be trivial to fake.
>
Sounds like whitelist_from_rcvd is not particularly useful then.
Re: Understanding TrustPath
Posted by mouss <mo...@ml.netoyen.net>.
Le 11/01/2011 22:07, Mark Martinec a écrit :
>> Consider for a moment how hard it would be for an average spammer to
>> spoof rDNS
>
> This has nothing to do with DNS. The trusted/internal/msa networks
> only checks an IP address as it stands in an Received header field,
> it does not check nor depend on its rDNS or forward DNS.
>
actually, SA relies on MTA headers. if the implicit contract between SA
and MTA falls, the result falls too. so it is important that peple
understand that we rely on what the trusted MTA say.
Re: Understanding TrustPath
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2011-01-11 at 22:07 +0100, Mark Martinec wrote:
> > Consider for a moment how hard it would be for an average spammer to
> > spoof rDNS
>
> This has nothing to do with DNS. The trusted/internal/msa networks
> only checks an IP address as it stands in an Received header field,
> it does not check nor depend on its rDNS or forward DNS.
The whitelist_from_rcvd option, which ultimately triggered this thread,
does though. As I understood that post, Kris was outlining what needs to
be done by an attacker in order to abuse this whitelisting variant.
Plus, of course, the knowledge of the exact option being used by the
victim...
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: Understanding TrustPath
Posted by Mark Martinec <Ma...@ijs.si>.
> Consider for a moment how hard it would be for an average spammer to
> spoof rDNS
This has nothing to do with DNS. The trusted/internal/msa networks
only checks an IP address as it stands in an Received header field,
it does not check nor depend on its rDNS or forward DNS.
Mark
Re: Understanding TrustPath
Posted by Kris Deugau <kd...@vianet.ca>.
Adam Moffett wrote:
> Right, it's kind of difficult to fake your source IP in a TCP session.
> But if I read the manual correctly the whitelist_from_rcvd that he's
> asking about does lookups on hosts in the "Received-from: " headers in
> the message.....which would be trivial to fake.
Not really. Sane MTAs (and even most of the not-so-sane ones) look up
the rDNS for a connecting IP, then see if that name resolves to that
connecting IP. Only if there's a match will they add the rDNS to that
Received header; otherwise most will just put "unknown".
Consider for a moment how hard it would be for an average spammer to
spoof rDNS for eg PayPal/eBay (admittedly trivial if they have their own
netblock to play with) *and* forward lookups on hostnames under
.paypal.com or .ebay.com (distinctly nontrivial unless they've managed
to break into eBay's DNS infrastructure).
-kgd
Re: Understanding TrustPath
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Tue, 2011-01-11 at 15:33 -0500, Adam Moffett wrote:
> Right, it's kind of difficult to fake your source IP in a TCP session.
> But if I read the manual correctly the whitelist_from_rcvd that he's
> asking about does lookups on hosts in the "Received-from: " headers in
> the message.....which would be trivial to fake.
The IP of the handing-over host and its rDNS (which is used here) in
that Received header must be added by the receiving SMTP. Usually your
MX, and trusted. If it fakes headers, you should not trust it... ;)
SA does not do a DNS lookup itself for whitelist_from_rcvd.
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: Understanding TrustPath
Posted by Adam Moffett <ad...@plexicomm.net>.
On 01/11/2011 03:24 PM, Jari Fredriksson wrote:
> On 11.1.2011 21:24, Mauricio Tavares wrote:
>> Am I correct? What would stop someone from trying to fake the
>> originating IP to fit the ones in the above list?
> If I am not mistaken, the IP protocol and SMTP. Someone might fake the
> address when sending to you MTA, but your MTA's response would go to
> wrong address, the fake one. There would be no session and talk between
> the hosts to create a SPAM
Right, it's kind of difficult to fake your source IP in a TCP session.
But if I read the manual correctly the whitelist_from_rcvd that he's
asking about does lookups on hosts in the "Received-from: " headers in
the message.....which would be trivial to fake.
Re: Understanding TrustPath
Posted by Jari Fredriksson <ja...@iki.fi>.
On 11.1.2011 21:24, Mauricio Tavares wrote:
> Am I correct? What would stop someone from trying to fake the
> originating IP to fit the ones in the above list?
If I am not mistaken, the IP protocol and SMTP. Someone might fake the
address when sending to you MTA, but your MTA's response would go to
wrong address, the fake one. There would be no session and talk between
the hosts to create a SPAM.
--
You single-handedly fought your way into this hopeless mess.