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: Routers, Switches, and Firewall testing |
|---|---|
| Date: | Mon, 17 Jan 2005 11:46:22 +0100 |
On Mon, Jan 03, 2005 at 09:25:02AM -0700, Chris Kuethe wrote: [..] > * perl [..] In the Perl modules category, I can add my own one. Net::Packet is a packet construction framework, you can build packets from Layer 2 to Layer 7. It really made easy to match requests with replies, and hides many trivial tasks that you must do by hand using Net::Pcap/Net::RawIP/NetPacket. Actually on CPAN, the 1.28 version. I'm finalising the 2.00, which features IPv6 headers as well, and full documentation (not terminated). You can get the 2.00-RC1 here: http://www.gomor.org/netpkt/Net-Packet-2.00-RC1.tar.gz Example SYN send with 2.00-RC1 version (not compatible with 1.28): --8<-- #!/usr/bin/perl use Getopt::Std; my %opts; getopts('i:I:p:d:v', \%opts); die "Usage: send-syn.pl -i dstIp -p dstPort [-v]\n" unless $opts{i} && $opts{p}; use Net::Pkt; $Env->debug(3) if $opts{v}; my $ip = Net::Packet::IPv4->new(dst => $opts{i}); my $tcp = Net::Packet::TCP->new( flags => NP_TCP_FLAG_SYN, dst => $opts{p}, ); my $frame = Net::Packet::Frame->new(l3 => $ip, l4 => $tcp); print "Request:\n"; print $frame->ipPrint, "\n"; print $frame->tcpPrint, "\n"; $frame->send; until ($Env->timeout) { if ($frame->recv) { print "\nReply:\n"; print $frame->reply->ipPrint, "\n"; print $frame->reply->tcpPrint, "\n"; last; } } --8<-- -- ^ ___ ___ FreeBSD Network - http://www.GomoR.org/ <-+ | / __ |__/ Security Engineer, searching for work | | \__/ | \ ---[ zsh$ alias psed='perl -pe ' ]--- | +--> Net::Packet <=> http://search.cpan.org/~gomor/ <--+
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Discovering users by RCPT TO, Baltasar Cevc |
|---|---|
| Next by Date: | Re: priviledge escalation techniques, Chuck Herrin |
| Previous by Thread: | Re: Routers, Switches, and Firewall testing, R. DuFresne |
| Next by Thread: | RE: Routers, Switches, and Firewall testing, Matt Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |