[fw-wiz] 1. dirty packet tricks? (Marcus J. Ranum)
From: Boni Bruno (firstname.lastname@example.org)
- Next message: Ryan Russell: "Re: [fw-wiz] dirty packet tricks?"
- Previous message: Charles Swiger: "Re: [fw-wiz] dirty packet tricks?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Boni Bruno" <email@example.com> To: firstname.lastname@example.org Date: Thu Jul 11 16:50:47 2002
I have come across your problem before. I opted for a transparent
bridge design to steal or inspect the connection. This was the safest,
fastest, and most reliable scenario I found to be effective.
You basically will need to create two physical segments for the 188.8.131.52
node (as shown in your example) or net and place your security device in
the middle in bridging mode so no NAT or any readdressing is needed - the
network is the same on both sides. You can extend OpenBSD's ethernet bridging
software with ipf to extend link layer bridging with the security features
you described below. You can also add the IPsec support available in OpenBSD,
to allow creation of virtual LANs. The changes necessary to the bridge and
IPsec code for this are fairly minimal.
If you want to be real hard core about it, build your own asic based
appliance. I hope this helps....
VP of Engineering & Security
Data Systems Worldwide, Inc.
Hi, I'm a bit out of date on the latest/greatest dirty packet-flogging
tricks; perhaps someone can point me in the right direction...
Back a zillion years ago we implemented "proxy transparency" type
things in BSD firewalls by whacking the code in the IP stack so that
the firewall would ARP for (basically) anything that was not internal,
then convince its IP stack that it was the destination, allow a
connection to occur in user-space, then connect out and relay traffic.
It was gross but it worked. Are there better ways of doing that
I'm somewhat restricted from using stuff like arpd and arp spoofing,
because the application in question will be in a location where I
want to grab the traffic when it won't ever be on the destination
subnet. For example - consider:
1) our network is 10.10.10.0/24
2) our "target" machine is 184.108.40.206/32 port 23
3) there is a router/firewall on the edge of 10.10.10.0 that blocks all
traffic to 220.127.116.11
4) the router/firewall _allows_ traffic from one machine (our mystery
box) to the target 18.104.22.168 port 23
5) all machines on network 10 that try to talk to 22.214.171.124 port 23
should get the connection "stolen" from our machine, which
should connect to the _real_ 126.96.36.199 and get packets back
I was thinking of using bpf to vacuum up packets into user space
then push them down into the stack using /dev/tun driver. Once it
was in the stack, I could probably get most of the dirty work done
with NATting that traffic to an internal process on the machine based
on whether it came in or out of /dev/tun.
Getting traffic back out would follow (presumably) the reverse path.
Fortunately, the traffic I want to grab is relatively low bandwidth.
The other alternative appears to be to just do user-mode TCP by
sucking the packets up using bpf, passing them to a process that
connects to the target, and simulates tcp on the other side. Kind
of like honeyd does.
Or is there a better way? I figured I'd better ask because if I just
start whaling away at solving the problem I could work for months and
have someone hand me a manpage and say "DUH!" ;)