Linux Netfilter discussions
 help / color / mirror / Atom feed
* mangle + TCP Flags
@ 2003-12-10 14:19 Jean-Marie
  2003-12-10 16:31 ` Maciej Soltysiak
  2003-12-10 19:25 ` Maciej Soltysiak
  0 siblings, 2 replies; 15+ messages in thread
From: Jean-Marie @ 2003-12-10 14:19 UTC (permalink / raw)
  To: netfilter

Hello, can someone tell me if it is possible, thanks to the mangle table, to modify the flags of a TCP packet before it is routed.
I think to something like that:
iptables -t mangle -A INPUT -j TCPFLAG --set-flags FIN,URG
Thank you.


^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: mangle + TCP Flags
@ 2003-12-11 15:57 bmcdowell
  2003-12-11 20:43 ` Maciej Soltysiak
  0 siblings, 1 reply; 15+ messages in thread
From: bmcdowell @ 2003-12-11 15:57 UTC (permalink / raw)
  To: netfilter


Now that is a truly interesting question, if a bit off-topic.  What is the best way to handle recon?  Is it best to comply and hope your network looks un-interesting?  Is it best to try and make scanning as costly as possible (aka Tarpitting)?  Is it best to make everything appear open, thereby polluting the results of the scans?

Personally, I go for a mix of the latter two.  I'd like to make recon take absolutely forever AND return false information.  Particularly randomly false information - to make the prospect of rescanning unpalatable.

One down side is, I wind up making my network more 'interesting' than my neighbors.  I'm not quite sure if it is worth the extra interest...


Bob

-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org]On Behalf Of Antony Stone
Sent: Thursday, December 11, 2003 9:44 AM
To: netfilter@lists.netfilter.org
Subject: Re: mangle + TCP Flags


On Thursday 11 December 2003 3:32 pm, Jean-Marie Orset wrote:

> > Well, you could just:
> > -p tcp -j REJECT --reject-with tcp-reset (uses tcp rst)
> > -p udp -j REJECT (uses icmp port-unreach)
> >That makes nmap say: ports closed.
>
> Yes, that's what I should do but My idea was to answer false SYN,ACK
> even if the ports are closed. In that way a scan would declare all my ports
> open but in reality, they would be closed.

Why is that better for security?

Antony.

-- 
G- GIT/E d- s+:--(-) a+ C++++$ UL++++$ P+(---)>++ L+++(++++)$ !E W(-) N(-) o? 
w-- O !M V+++(--) !PS !PE Y+ PGP+> t- tv@ b+++ DI++ D--- e++>+++ h++ r@? 5? 
!X- !R K--?

                                                     Please reply to the list;
                                                           please don't CC me.



^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: mangle + TCP Flags
@ 2003-12-11  9:55 Jean-Marie
  2003-12-11 10:48 ` Maciej Soltysiak
  2003-12-11 14:54 ` Damjan
  0 siblings, 2 replies; 15+ messages in thread
From: Jean-Marie @ 2003-12-11  9:55 UTC (permalink / raw)
  To: netfilter

>If a module like this existed it would be a great way to violate the
>protocol and cause antisocial behaviour of your tcp stack.

Yes, I agree, but in any case there would be more efficient ways to
cause antisocial behaviour. In fact, in the beginning, my idea was to return a RST,ACK, for each SYN received on one of my closed ports, in order to make a scan tool belive that they are all open. (Perhaps it is useles but I  found the idea amusing.

>Anyway such a module is not difficult to write. So it is possible, but
>nor the iptables package and the kernel, nor patch-o-matic
>do not contain such a module.

I saw yesterday that Craig Shelley did provide such a module on the devel-list in june but I can't recover the tarball he sended in attachment.



^ permalink raw reply	[flat|nested] 15+ messages in thread
* mangle + TCP Flags
@ 2003-12-10 10:08 Jean-Marie
  2003-12-11 17:06 ` Tom Marshall
  0 siblings, 1 reply; 15+ messages in thread
From: Jean-Marie @ 2003-12-10 10:08 UTC (permalink / raw)
  To: netfilter

Hello, can someone tell me if it is possible, thanks to the mangle table, to modify the flags of a TCP packet before it is routed.
I think to something like that:
iptables -t mangle -A INPUT -j TCPFLAG --set-flags FIN,URG
Thank you.


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-12-11 20:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-10 14:19 mangle + TCP Flags Jean-Marie
2003-12-10 16:31 ` Maciej Soltysiak
2003-12-10 19:25 ` Maciej Soltysiak
2003-12-10 19:38   ` Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2003-12-11 15:57 bmcdowell
2003-12-11 20:43 ` Maciej Soltysiak
2003-12-11  9:55 Jean-Marie
2003-12-11 10:48 ` Maciej Soltysiak
2003-12-11 14:54 ` Damjan
2003-12-11 15:27   ` Jean-Marie Orset
2003-12-11 15:32   ` Jean-Marie Orset
2003-12-11 15:43     ` Antony Stone
2003-12-11 15:57   ` Jean-Marie Orset
2003-12-10 10:08 Jean-Marie
2003-12-11 17:06 ` Tom Marshall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox