1 ===============================================================================
2 LIBNET 1.0 (c) 1998 - 2001 Mike D. Schiffman <mike@infonexus.com>
3 http://www.packetfactory.net/libnet
4 ===============================================================================
7 etherspoof kernel patch
10 If you don't like messing with lkm's (see below), you can use this kernel
11 patch to enable your OpenBSD 2.7 box to forge Ethernet frames.
14 OpenBSD 2.4/2.5/2.6/2.7
16 Etherspoof is an lkm module that allows a bpf device to specify (forge)
17 arbitrary ethernet MAC addresses. OpenBSD 2.4/2.5 port by route;
18 originally written by Thomas Ptacek. His original readme contents follow.
23 The 4.4BSD machine-independant ethernet driver does not allow upper layers
24 to forge the ethernet source address; all ethernet outputs cause the
25 output routine to build a new ethernet header, and the process that does
26 this explicitly copies the MAC address registered to the interface into
29 This is odd, because the bpf writing convention asserts that writes to bpf
30 must include a link-level header; it's intuitive to assume that this
31 header is, along with the rest of the packet data, written to the wire.
33 This is not the case, though. The link-layer header is used solely by the
34 bpf code, in order to build a sockaddr structure that is passed to the
35 generic ethernet output routine; the header is then effectively stripped
36 off the packet. The ethernet output routine consults this sockaddr to
37 obtain the ethernet type and destination address, but not the source
40 This code is a slightly modified version of FreeBSD 3.0's original
41 ethernet output routine. The sole difference is that this output routine
42 retrieves the source ethernet address from the sockaddr, and uses it as
43 the source address for the header written the wire. This allows bpf to be
44 used to seamlessly forge ethernet packets in their entirety, which has
45 applications in address management.
47 The modload glue provided traverses the global list of system interfaces,
48 and replaces any pointer to the original ethernet output routine with the
49 new one we've provided. The unload glue undoes this. The effect of
50 loading this module will be that all ethernet interfaces on the system
51 will support source address forging.