Commit Graph

241 Commits

Author SHA1 Message Date
Jan Engelhardt
7cdfc0ac3d Add xt_length2
xt_length2 provides exact layer-4,-5 and -7 length matching
besides the preexisting layer-3 length match.
2009-01-30 06:01:12 +01:00
Jan Engelhardt
85cab10371 Xtables-addons 1.8 v1.8 2009-01-10 14:05:46 +01:00
Jan Engelhardt
61d8425cb6 Merge branch 'TEE6' 2009-01-10 14:03:04 +01:00
Jan Engelhardt
d49b6244c1 Merge branch 'TEE' 2009-01-10 14:03:03 +01:00
Jan Engelhardt
10c2b97786 Merge branch 'ipp2p' 2009-01-10 13:59:43 +01:00
Jan Engelhardt
9ed364ed36 TEE: collapse tee_tg_send{4,6} 2009-01-10 13:58:19 +01:00
Jan Engelhardt
b95e5f6417 TEE: IPv6 support for iptables module 2009-01-10 10:19:21 +01:00
Jan Engelhardt
4afebf88eb Merge branch 'TEE' into TEE6 2009-01-10 10:01:31 +01:00
Jan Engelhardt
d523158e92 TEE: iptables -nL and -L produced conversely output 2009-01-10 10:01:27 +01:00
Jan Engelhardt
1fd1787a1c TEE: limit iptables module to NFPROTO_IPV4
The code here is only usable with IPv4.
2009-01-10 09:57:44 +01:00
Jan Engelhardt
fbbca68790 ipp2p: partial revert of 3c8131b9
Revert part of 3c8131b976.

The transport header offset is not (yet) set by the time Netfilter
is invoked so using tcp_hdr/udp_hdr has undefined behavior.
2009-01-10 08:25:42 +01:00
Jan Engelhardt
4cdfd49637 ipp2p: add boundary check in search_all_kazaa
To avoid underflow on "end - 18", we must check for plen >= 18.
2009-01-10 06:11:13 +01:00
Jan Engelhardt
31c01cf107 portscan: update manpage about --grscan caveats 2009-01-10 05:23:43 +01:00
Jan Engelhardt
879e964f60 ipp2p: remove log flooding
Syslog was flooded by lots of messages due to if (plen >= 5) firing
on any packet, when it should have been plen < 5. Incidentally, this
turned up that plen also takes on huge nonsense values, assuming
underflow - yet to be investigated.
2009-01-10 04:47:14 +01:00
Jan Engelhardt
019c9de291 ipp2p: update help text
More suggestions from Stanley Pinchak.
2009-01-10 04:42:27 +01:00
Jan Engelhardt
af370f81f0 ipp2p: update manpage
(With suggestions from Stanley Pinchak.)
2009-01-09 20:24:41 +01:00
Jan Engelhardt
598c7ede37 Xtables-addons 1.7 v1.7 2008-12-25 20:10:38 +01:00
Jan Engelhardt
2f66755226 Merge branch 'ipp2p' 2008-12-10 16:51:34 +01:00
Jan Engelhardt
d01a5f3d17 ipp2p: ensure better array bounds checking 2008-12-10 16:50:45 +01:00
Jan Engelhardt
bbda3e53da Merge branch 'SYSRQ' 2008-12-10 16:03:13 +01:00
Jan Engelhardt
22e73ea31f xt_SYSRQ: src: prefix variables 2008-12-10 16:02:21 +01:00
Jan Engelhardt
6b37f201d7 xt_SYSRQ: make new code compile for kernel <= 2.6.23 2008-12-10 15:45:43 +01:00
John Haxby
94ecf3847b xt_SYSRQ: improve security
I want to be able to use SYSRQ to reboot, crash or partially diagnose
machines that become unresponsive for one reason or another. These
machines, typically, are blades or rack mounted machines that do not
have a PS/2 connection for a keyboard and the old method of wheeling
round a "crash trolley" that has a monitor and a keyboard on it no
longer works: USB keyboards rarely, if ever, work because by the time
the machine is responding only to a ping, udev is incapable of
setting up a new keyboard.

This patch extends the xt_SYSRQ module to avoid both disclosing the
sysrq password and preventing replay. This is done by changing the
request packet from the simple "<key><password>" to a slightly more
complex "<key>,<seqno>,<salt>,<hash>". The hash is the sha1 checksum
of "<key>,<seqno>,<salt>,<password>". A request can be constructed in
a small shell script (see manpage).

Verification of the hash in xt_SYSRQ follows much the same process.
The sequence number, seqno, is initialised to the current time (in
seconds) when the xt_SYSRQ module is loaded and is updated each time
a valid request is received. A request with a sequence number less
than the current sequence number or a wrong hash is silently ignored.
(Using the time for the sequence number assumes (requires) that time
doesn't go backwards on a reboot and that the requester and victim
have reasonably synchronized clocks.)

The random salt is there to prevent pre-computed dictionary attacks
difficult: dictionary attacks are still feasible if you capture a
packet because the hash is computed quickly -- taking perhaps several
milliseconds to compute a more complex hash in xt_SYSRQ when the
machine is unresponsive is probably not the best thing you could do.
However, cracking, say, a random 32 character password would take
some time and is probably beyond what the people in the target
untrustworthy environment are prepared to do or have the resources
for. It almost goes without saying that no two victim machines should
use the same password.

Finally, the module allocates all the resources it need at module
initialisation time on the assumption that if things are going badly
resource allocation is going to be troublesome.
2008-12-02 19:45:22 +01:00
Jan Engelhardt
ee968691d7 ipp2p: fix newline inspection in kazaa
LFCR looks suspect, it should most likely be CRLF.
2008-11-26 00:47:36 +01:00
Jan Engelhardt
22db3bcb9c ipp2p: kazaa code cleanup 2008-11-26 00:46:44 +01:00
Jan Engelhardt
7da803e908 doc: add manpages for xt_ECHO and xt_TEE 2008-11-24 17:42:32 +01:00
Jan Engelhardt
4aad07bdc4 TEE: IPv6 support 2008-11-21 01:15:21 +01:00
Jan Engelhardt
7a3f874753 TEE: various cleanups, add comments
Normalize function names in light of upcoming IPv6 support.
Reformat other lines.
Add comment note about tee_send4.
2008-11-21 01:15:03 +01:00
Jan Engelhardt
f77a8e2eda TEE: do not use TOS for routing
Otherwise the cloned packet may be subject to more policy routing
rules than expected.
2008-11-21 01:15:02 +01:00
Jan Engelhardt
bd99e950f5 ipset: enable building of new modules
Whoops, modules need to be listed in GNUmakefile.in!
(Needed for out-of-srcdir builds.)
2008-11-20 23:08:33 +01:00
Jan Engelhardt
fdb7f34bc8 build: use new vars from automake-tranquility-3 2008-11-20 21:17:42 +01:00
Jan Engelhardt
85e3c24167 build: do not unconditionally install ipset
build_ipset=n was not completely respected and the ipset userspace
parts were still installed. This is now fixed.
2008-11-20 20:19:55 +01:00
Jan Engelhardt
aab8dd360f src: avoid use of _init
Xtables-addons's extensions will always be built as modules, so it is
safe to use __attribute__((constructor)).
2008-11-20 20:00:26 +01:00
Jan Engelhardt
a8f60d0d4b xt_ECHO: compile fix 2008-11-19 17:38:45 +01:00
Jan Engelhardt
5b1bfedb82 Xtables-addons 1.6 v1.6 2008-11-18 18:16:34 +01:00
Jan Engelhardt
ee7e4f5a42 Update for Linux 2.6.28 2008-11-18 12:51:25 +01:00
Jan Engelhardt
d20d1922db ipset: upgrade to ipset 2.4.5 2008-11-18 12:01:59 +01:00
Jan Engelhardt
be6fbee56a src: use NFPROTO_ constants 2008-11-18 11:57:14 +01:00
Jan Engelhardt
3c0b26c4b9 src: add NULL to sentinel struct option 2008-11-18 11:29:57 +01:00
Jan Engelhardt
25e2fbdf7d ipset: upgrade to ipset 2.4.4 2008-11-13 17:46:11 +01:00
Jan Engelhardt
5bd67db123 ipset: upgrade to ipset 2.4.3 2008-11-11 19:36:33 +01:00
Jan Engelhardt
f3737502bd build: use readlink -f
Coreutils 5.x does not know `readlink -e`; we can also use
`readlink -f` instead which is supported by 5.x.
2008-10-16 20:49:21 -04:00
Jan Engelhardt
74e7eb283a ipp2p: parenthesize unaligned-access macros 2008-09-24 12:29:21 -04:00
Jan Engelhardt
f3f0741469 Support for Linux 2.6.17 2008-09-22 13:40:25 -04:00
Jan Engelhardt
9c43965a86 Resolve compiler warnings in xt_ECHO
Reported-by: Jiri Moravec <jim.lkml@gmail.com>
2008-09-19 17:10:23 -04:00
Jan Engelhardt
3a4e719b8c src: compile fixes for 2.6.18 and 2.6.19
I did not test f30793f591 on all
supported kernel versions and noticed too late.
2008-09-01 18:41:45 -04:00
Jan Engelhardt
e87dc5d5e1 Xtables-addons 1.5.7 v1.5.7 2008-09-01 15:35:51 -04:00
Jan Engelhardt
a0d3ee45ea xt_SYSRQ: add missing aliases 2008-09-01 15:33:28 -04:00
Jan Engelhardt
38343af9e6 xt_portscan: IPv6 support 2008-09-01 15:32:15 -04:00
Jan Engelhardt
53abb1e735 src: remove redundant return statements 2008-09-01 15:31:10 -04:00