Skip to contentSkip to conversation

netfilter http request filter patch

DISCUSSION [email protected] 2 participants 2 messages Apr 29, 2003 – Apr 30, 2003 1 message not in the archive netfilter

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

I send you this mail with a NETFILTER patch made for me. This patch (http request filter) find in a http request, bad and dangerous http request like nimda, red code, unicodes attacks. Then this patch drop, log ,etc. this packet.

my patch is finished but i want your opinion about this.

How to use httpr?

FORWARD LOG
iptables -A INPUT -p tcp --dport 80 -m httpr --httpr '"GET"?"default.ida?"?[XN0]*' -j DROP
(Regular Expresion)

I would like that this patch is inserted in de NETFILTER patch list.

I look forward to heaving from you.

best regards.

PD: Sorry for my English.

macada.

#2 lore raw
Quoted 6 lines · On Tue, Apr 29, 2003 at 10:32:20AM +0200, [email protected] wrote:

I send you this mail with a NETFILTER patch made for me. This patch (http request filter) find in a http request, bad and dangerous http request like nimda, red code, unicodes attacks. Then this patch drop, log ,etc. this packet.

my patch is finished but i want your opinion about this.

A couple of issues:

1) please don't send compressed tar archives to the list, use plaintext unified diffs as attachment

2) you seem not to be aware of /usr/src/linux/Documentation/CodingStyle, since about everything inside your kernel module is violationg the kernel coding style: indentation, language, c++-style comments, ...

3) the module is not very useful, since you will only match a request that is contained within a single packet. You would need tcp stream reassembly to catch http requests spread over multiple packets. For a fast implementation of in-kernel pattern matching with tcp stream reassembly, look for libqsearch of the prelude project.

Quoted 1 line

macada.

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie