Re: Who uses libnet, and for what?

Mike Schiffman <[email protected]>
Newsgroups gmane.comp.security.libnet
Message-ID <[email protected]>
Hey Enrico, is there a URL for this project? Also, good catch on the 
memory leak in the advanced interface. I just added:

void
libnet_adv_free_packet(libnet_t *l, u_int8_t *packet)
{
     /*
      *  Restore original pointer address so free won't complain about a
      *  modified chunk pointer.
      */
     if (l->aligner > 0)
     {
         packet = packet - l->aligner;
     }
     free(packet);
}

The reason I did this rather than adding the call to free() inside of 
libnet_adv_write_link() is flexibility. What if you wanted to use the 
libnet advanced interface to write a packet you built yourself? If the 
memory wasn't heap-based, you'd choke when trying to free it.

On Feb 16, 2004, at 10:16 AM, Enrico Zini wrote:

> On Sun, Feb 15, 2004 at 11:11:29PM -0800, Mike Schiffman wrote:
>
>> Hey guys, I want to compile a list of who uses libnet, and for what
>> projects... So let's start rattling off who's done what and doing what
>> with the ole' libnet...
>
> I do!
>
> I use libnet in guessnet.  The purpose of guessnet is to try some more
> tricks to properly configure the network when DCHP isn't around.
>
> libnet is used to create ARP probes to look for known machines in the
> local network.  I intend to use libnet1 (when it will work on
> unconfigured interfaces) to also send DHCP probes.
>
> I've also started an experimental tool, part of guessnet, that tries to
> infer a suitable network configuration by looking at sniffed packets.
> That tool uses libnet to send out ARP packets to see which addresses 
> are
> local and which are not.  I'll shortly be looking for people submitting
> ideas (and possibly working code) to it.
>
> I only use packet construction and link-layer injection.  I then use
> libpcap to pickup network traffic.
>
> I have threads that build a probe once, and then send it out at regular
> intervals.  It's very handy for me to build a packet, save it on a
> buffer and toss that buffer into the network as many times as needed.
>
> I'm having problems doing it with libnet1, as I can't find out a 
> proper,
> documented way to deallocate the result of libnet_adv_cull_packet.
>
> I really love being able to use libnet, so that I don't have to worry
> too much about system-specific issues of packet-injection, nor about 
> the
> error-prone bit-mangling of packet creation.  I was really looking
> forward to have DHCP packet construction around, and I've been happy
> when I saw it in libnet1.
>
> I'm not pestering you to release a fixed libnet1 only because I have
> submission deadline for my graduation thesis on march, 10.  After 
> march,
> 25, expect more news from me :-)
>
>
> Ciao,
>
> Enrico
>
> --
> GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <[email protected]>
>
--
Mike Schiffman, CISSP
http://www.packetfactory.net/schiffman
Doveryay No Proveryay
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.