Re: Any way to automatically change arbitrary headers of IP packets on-the-fly?

[email protected] Thu, 14 Apr 2005 01:23:31 -0400
Newsgroups gmane.comp.security.linux,gmane.comp.security.penetration,gmane.comp.security.vulnerabilities,gmane.comp.security.libnet,gmane.comp.security.basics
Message-ID <[email protected]>
--==_Exmh_1113456209_9472P
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, 11 Apr 2005 19:39:25 -0300, =3D?ISO-8859-1?Q?Jo=3DE3o_Paulo_Calda=
s_Campello?=3D said:

>    I've already read Netfilter documentation (specially the =22Linux
> netfilter Hacking HOWTO=22) so I know this kind of packet mangling can
> be done in userspace. I thought it could be done in the =22MANGLE=22 ta=
ble
> of netfilter, but I found no TARGET that achieves that nor any
> documentation about altering arbitrary IP headers.

Currently, iptables doesn't seem to support that, probably to keep you fr=
om
shooting yourself in the foot.  Consider for example how fast the kernel =
will
fold up if you change that first nybble of the packet from an x'4' to an =
x'6'
without changing the rest of the packet to match.  Suddenly, that sk_buff=
 is
a lot too short.. ;)

--==_Exmh_1113456209_9472P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Exmh version 2.5 07/13/2001

iD8DBQFCXf5QcC3lWbTT17ARAkyuAJ9yZWwjXhwJuQUteFxWnLLvuUockACg/eUc
O/mynKyCwewOMpPuEOPfGZI=
=o1nc
-----END PGP SIGNATURE-----

--==_Exmh_1113456209_9472P--