Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Any way to automatically change arbitrary headers of IP packets on-the-fly? |
|---|---|
| Date: | Mon, 18 Apr 2005 18:50:42 -0700 (PDT) |
Use NetSED: http://www.mirrors.wiretapped.net/security/packet-construction/netsed/netsed-README.txt --- João Paulo Caldas Campello <protecao@gmail.com> wrote:
On 4/14/05, Valdis.Kletnieks@vt.edu <Valdis.Kletnieks@vt.edu> wrote:Currently, iptables doesn't seem to support that,probably to keep you fromshooting yourself in the foot. Consider forexample how fast the kernel willfold up if you change that first nybble of thepacket from an x'4' to an x'6'without changing the rest of the packet to match.Suddenly, that sk_buff isa lot too short.. ;)Yeah, maybe, who knows :P Well, I've did some searching last days and found a couple ways to achieve what I've described in my email. One is using "DIVERT sockets" and other is the use of the "-j QUEUE" target of iptables/netfilter. Both approaches are similar: you match a packet using iptables to flush them to userspace, where you can mangle the entire packet as you like and send it back to iptables, who will put it again onto the stack. The "-j QUEUE" approach is manipulated through the "libipq" API: - netfilter can feed userspace using IPQUEUE: * http://www.crhc.uiuc.edu/~grier/projects/libipq.html - Perl: * http://www.intercode.com.au/jmorris/perlipq/ - Python: * http://woozle.org/~neale/src/ipqueue/ As you can see, there's already libraries written in Perl and Python to query IPQUEUE, so the effort of writing userspace code to deal with IP packets wiil be much more easier. That's it =) Cheers, João Paulo.
| Previous by Date: | RE: Netcat through Squid HTTP Proxy, Todd Towles |
|---|---|
| Next by Date: | ZoneAlarm, Chuck Fullerton |
| Previous by Thread: | Re: Any way to automatically change arbitrary headers of IP packets on-the-fly?, Manu Garg |
| Next by Thread: | [Full-disclosure] IBM WebSphere Widespread configuration JSP disclosure, SPI Labs |
| Indexes: | [Date] [Thread] [Top] [All Lists] |