Mangle on a Connection, not on a Packet
Hello all,
I want to extend the functionality of the XOR module. I am cool with the
connection tracking helper concepts, and I am cool with the way XOR is doing its mangling as a target .. but what I'm not so cool with is how I register my intent to mangle a "connection" with conntrack, rather than the currently registerd mangle .. per a packet .. as with the target.
The deal is that XOR mangles each packet with a seed/string/primer,
starting at the payload with the first octet in the seed. Depending on the blocksize paramater the seed is altered, but in a way that makes the seed no harder to retrieve. Simply, if any part of the XOR'd stream is guaranteed to be known/repeated (such as an SMTP hello, or a POP3 hello, etc), then the pieces of the key can be readily retrieved. The point being that XOR always starts in the same place and runs the same way; creating a WEP-like issue .. a sort of privacy .. a stream that can be analysed and restored quickly (depending on the predictability of the underlying data).
What I'd like to do, is to have XOR operate on a stream .. taking the
seed and working through successive, derrivative, seeds as the stream purpetuates. This should greatly increase the strength of the XOR encryption. However, to do this, we need to get above a packet.
There's not a lot of information published in the netfilter docs on this
type of work (mangling). Is there a nice way to perform non-NAT packet mangling in conntrack; or is that the purpose of conntrack-nat?
Thanks,
--
Ian Latter
Internet and Networking Security Officer
Macquarie University
Quoted 6 lines · Ian Latter
I want to extend the functionality of the XOR module. I am cool with the connection tracking helper concepts, and I am cool with the way XOR is doing its mangling as a target .. but what I'm not so cool with is how I register my intent to mangle a "connection" with conntrack, rather than the currently registerd mangle .. per a packet .. as with the target.
For this purpose I think you should be able to use the CONNMARK patch to mark the connection. The CONNMARK patch provides you with a 32bit piece of memory per conntrack, and can be used very much like the MARK target.
Regards
Henrik