* tcp conn tracking
@ 2007-01-15 5:14 Anil Gunturu
2007-01-15 7:47 ` Jozsef Kadlecsik
0 siblings, 1 reply; 7+ messages in thread
From: Anil Gunturu @ 2007-01-15 5:14 UTC (permalink / raw)
To: netfilter
Hi,
Does the tcp connection tracking reorder and reassemble the tcp data. I am particularly interested in how ip_conntrack_ftp works, if the tcp data for port commnad comes in two different out-of-order segments.
Thanks,
-Anil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tcp conn tracking
2007-01-15 5:14 tcp conn tracking Anil Gunturu
@ 2007-01-15 7:47 ` Jozsef Kadlecsik
2007-01-15 16:57 ` Anil Gunturu
0 siblings, 1 reply; 7+ messages in thread
From: Jozsef Kadlecsik @ 2007-01-15 7:47 UTC (permalink / raw)
To: Anil Gunturu; +Cc: netfilter
On Sun, 14 Jan 2007, Anil Gunturu wrote:
> Does the tcp connection tracking reorder and reassemble the tcp data. I
> am particularly interested in how ip_conntrack_ftp works, if the tcp
> data for port commnad comes in two different out-of-order segments.
The connection tracking in netfilter defragments fragmented packets but
does not reorder out of order packets. Moreover FTP connection tracking
won't work on PORT/etc commands which arrive in multiple (not fragmented)
packets, even if those are in order.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tcp conn tracking
2007-01-15 7:47 ` Jozsef Kadlecsik
@ 2007-01-15 16:57 ` Anil Gunturu
2007-01-15 16:59 ` Jan Engelhardt
0 siblings, 1 reply; 7+ messages in thread
From: Anil Gunturu @ 2007-01-15 16:57 UTC (permalink / raw)
To: netfilter; +Cc: Jozsef Kadlecsik
Thank you for the response.
So, ftp connection tracking doesn't work always. Just curious about what is the rationale for such a solution? Is it assumed that if the packet with PORT command is fragmented someone is deliberatly attacking the system?
Cheers,
-Anil
----- Original Message -----
From: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
To: Anil Gunturu <anil@mistletoetech.com>
Cc: netfilter@lists.netfilter.org
Sent: Sunday, January 14, 2007 11:47:23 PM GMT-0800 US/Pacific
Subject: Re: tcp conn tracking
On Sun, 14 Jan 2007, Anil Gunturu wrote:
> Does the tcp connection tracking reorder and reassemble the tcp data. I
> am particularly interested in how ip_conntrack_ftp works, if the tcp
> data for port commnad comes in two different out-of-order segments.
The connection tracking in netfilter defragments fragmented packets but
does not reorder out of order packets. Moreover FTP connection tracking
won't work on PORT/etc commands which arrive in multiple (not fragmented)
packets, even if those are in order.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tcp conn tracking
2007-01-15 16:57 ` Anil Gunturu
@ 2007-01-15 16:59 ` Jan Engelhardt
2007-01-15 17:24 ` Anil Gunturu
0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2007-01-15 16:59 UTC (permalink / raw)
To: Anil Gunturu; +Cc: netfilter, Jozsef Kadlecsik
>So, ftp connection tracking doesn't work always. Just curious about
>what is the rationale for such a solution? Is it assumed that if the
>packet with PORT command is fragmented someone is deliberatly attacking
>the system?
Yes you can assume that. FTP commands are usually not that long to not
fit into a small packet.
-`J'
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tcp conn tracking
2007-01-15 16:59 ` Jan Engelhardt
@ 2007-01-15 17:24 ` Anil Gunturu
2007-01-15 18:42 ` Jozsef Kadlecsik
0 siblings, 1 reply; 7+ messages in thread
From: Anil Gunturu @ 2007-01-15 17:24 UTC (permalink / raw)
To: netfilter, Jan Engelhardt; +Cc: Jozsef Kadlecsik
OK. Does the same thing apply to ftp when NAT is involved? If the port command comes fragmented and out-of-order, and the conntrack module doesn't reassemble the packets, the "inside" ip address goes out untranslated. Is this considered a security breach.
Cheers,
-Anil
----- Original Message -----
From: Jan Engelhardt <jengelh@linux01.gwdg.de>
To: Anil Gunturu <anil@mistletoetech.com>
Cc: netfilter@lists.netfilter.org, Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Sent: Monday, January 15, 2007 8:59:48 AM GMT-0800 US/Pacific
Subject: Re: tcp conn tracking
>So, ftp connection tracking doesn't work always. Just curious about
>what is the rationale for such a solution? Is it assumed that if the
>packet with PORT command is fragmented someone is deliberatly attacking
>the system?
Yes you can assume that. FTP commands are usually not that long to not
fit into a small packet.
-`J'
--
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tcp conn tracking
2007-01-15 17:24 ` Anil Gunturu
@ 2007-01-15 18:42 ` Jozsef Kadlecsik
2007-01-15 18:49 ` Grant Taylor
0 siblings, 1 reply; 7+ messages in thread
From: Jozsef Kadlecsik @ 2007-01-15 18:42 UTC (permalink / raw)
To: Anil Gunturu; +Cc: netfilter
On Mon, 15 Jan 2007, Anil Gunturu wrote:
> OK. Does the same thing apply to ftp when NAT is involved? If the port
> command comes fragmented and out-of-order, and the conntrack module
> doesn't reassemble the packets, the "inside" ip address goes out
> untranslated. Is this considered a security breach.
[Please do not top-post. Thanks.]
NAT is built on top of conntrack. So fragmented packets get defragmented
before processing but out of order packets are not reordered by netfilter.
A deliberate attacker can force to break up PORT commands and PASV
responses to be carried in multiple non-fragmented packets and those then
"slip through" without NATing. However what can be gained by this?
Conntrack cannot detect the IP address/port so the data channel won't be
"opened up" by conntrack. The attacker can discover the real IP address of
the other side, that's all. NAT is not meant to be a security solution.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: tcp conn tracking
2007-01-15 18:42 ` Jozsef Kadlecsik
@ 2007-01-15 18:49 ` Grant Taylor
0 siblings, 0 replies; 7+ messages in thread
From: Grant Taylor @ 2007-01-15 18:49 UTC (permalink / raw)
To: Mail List - Netfilter
Jozsef Kadlecsik wrote:
> "... NAT is not meant to be a security solution. ..."
Indeed NAT in and of its self is not a security solution. That being
said, quite often the obscurity that it provides is erroneously used as
a (basic) security solution.
Grant. . . .
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-01-15 18:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-15 5:14 tcp conn tracking Anil Gunturu
2007-01-15 7:47 ` Jozsef Kadlecsik
2007-01-15 16:57 ` Anil Gunturu
2007-01-15 16:59 ` Jan Engelhardt
2007-01-15 17:24 ` Anil Gunturu
2007-01-15 18:42 ` Jozsef Kadlecsik
2007-01-15 18:49 ` Grant Taylor
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.