If your question is not answered here, please consult our mailing list.
netsniff-ng is a high performance Linux network sniffer for packet inspection. The project started during my B. Sc. thesis at the Max Planck Institute and continued to grow into a useful toolkit ever since. At the time of its initial development, the famous libpcap library did not support the zero-copy extensions of the Linux kernel. Therefore, I closed this gap by developing a sniffer that had a significantly better performance than existing ones that used libpcap.
netsniff-ngs main goal is to be a high performance network sniffer that focuses on usability, robustness and functionality. Its aim is to support the daily work for networking engineers, developers, admins or Linux users by providing support with or in network monitoring, protocol analysis, reverse engineering, network debugging and penetration testing. Also, since 0.5.6.0 we've added further tools for high-performance traffic generation and reliable top-like networking statistics.
Sure, we're always happy to hear that. If you think this software is good, then please consider donating (Flattr) some money for our development. For non-money stuff, we'd prefer hardware like servers, switches, routers, access points, specific NICs or wireless cards or other (also exotic) kinds of embedded systems in order to do research, test our software and integrate new features. You are welcome to leave us a short message at .
New releases will be announced on our homepage, mailing list and Freshmeat. We have a project page at Freshmeat where you can subscribe.
Yes, of course there is. It's a moderated, spam-free mailing list on GoogleGroups where you can add yourself and post your questions to .
Sometimes we're reachable via #netsniff-ng which is located at Freenode.
Yes, it's http://dev.netsniff-ng.org/. The RSS feed can be found here: http://blog.cryptoism.org/t_netsniff-ng.xml
No, sorry. ;-)
Because we like HTML too much. ;-) Moderating all those comments costs too much time that we could also spend on development. If you'd like to discuss certain issues, then please use our mailing list.
Have a look at our Wiki within the benchmark section. For instance, on commodity hardware with Gigabit-Ethernet, we've reached nearly wirespeed with trafgen (64 Byte, 1.2 Mio pps).
Yes. The statistics are extracted from the kernel directly, so this is what the NICs device driver gets to see. There is no sniffing or the like involved to generate these figures.
It's netsniff-ngs manpage. The manpage is shipped with the latest stable netsniff-ng release. Everything that needs to be known for using netsniff-ng is documented within this manpage.
Currently only operating systems running on Linux kernels with CONFIG_PACKET_MMAP enabled. This feature can be found even back to the days of 2.4 kernels. Most operating systems ship pre-compiled kernels that have this config option enabled and even the latest kernel versions got rid of this option and have this functionality built-in. However, we recommend using a kernel >= 2.6.31, because the TX_RING support has been added since then.
Well, for version 0.5.5.0 libc is the only one. Most operating systems already have their libc shipped. That's it, nothing else. For version 0.5.6.0 you'll need libncurses, zlib, libgcrypt. All of them are usually available via your operating systems packet management system.
That depends. If you prefer to use the latest features, use the version that is marked as -next on the frontpage. The source is available via tarball and Git. Note that -next is our development tree and nearly daily changes are made. Otherwise there is a stable version that is usually recommended.
Yes, if the dumps are formatted as pcap files. This is default on Wireshark for instance. On the other hand, Wireshark can also read netsniff-ng dumps.
If you want to run netsniff-ng in combination with -f or --filter <file> you need to build a so called Berkeley Packet Filter program within a plaintext file (here, marked as: <file>). The Berkeley Packet Filters language description can be obtained from netsniff-ngs documentation section. One way to create a custom filter for the non-lazy people is to hack the opcodes by hand according to the specification. In this case you have all the freedom to build your filters for your needs. The alternative way is to use tcpdumps -dd option. Simply pipe the output into a textfile and pass this to netsniff-ng.
Furthermore, we already ship some common filters and we are planning our own filter compiler! Most distributions put these files into /etc/netsniff-ng/rules/.
If you try to create custom socket filters with tcpdump -dd, you have to edit the ret opcode (0x6) of the resulting filter, otherwise your payload will be cut off:
0x6, 0, 0, 0xFFFFFFFF instead of 0x6, 0, 0, 0x00000060
The Linux kernel now takes skb->len instead of 0xFFFFFFFF. If you do not change it, the kernel will take 0x00000060 as buffer length and packets larger than 96 Byte will be cut off (filled with zero Bytes)! It's a bug in libpcaps filter compiler. Detailed information about this issue can be found on our blog post.
I rudely refer to the dSniff documentation that says:
The easiest route is simply to impersonate the local gateway, stealing client traffic en route to some remote destination. Of course, the traffic must be forwarded by your attacking machine, either by enabling kernel IP forwarding or with a userland program that acccomplishes the same (fragrouter -B1).
Several people have reportedly destroyed connectivity on their LAN to the outside world by arpspoof'ing the gateway, and forgetting to enable IP forwarding on the attacking machine. Don't do this. You have been warned.
No, you need to be root on your box in oder to run netsniff-ng.
It's the GNU GPL, version 2. Here's the licensing text.
No. We've thought this through and the GPL version 2 is the best that suits our needs.
Yes, if you mean "I work for a commercial organization and I'd like to use netsniff-ng for capturing and analyzing network traffic in our company's networks or in our customer's networks.".
It depends, if you mean "Can I use netsniff-ng as a part of my commercial product?". See below.
As long as your commercial product then stays compatible with the GNU GPL, version 2, then it should be no problem. Have a look at the frequently asked questions of gnu.org in order to clarify your questions.
netsniff-ng is "free software"; you can download it without paying any license fee. The version of netsniff-ng you download isn't a "demo" version, with limitations not present in a "full" version; it is the full version. And the good thing is: it will always stay that way!
netsniff-ng is licensed under the GNU GPL, version 2. Read more about this here.
For the fun and freedom of contributing to the open source community and for learning and researching purposes. Simple, isn't it?
No, we don't. We used to, but since netsniff-ng is a spare time project and sometimes there's lots of other stuff to do and sometimes not, we think we are more flexible this way without making hard deadline promises. Nevertheless, netsniff-ng is a long-term project, so even if there's hard times for weeks of not pushing to Git, there will be others with the opposite situation. We think netsniff-ng is useful for our daily network engineering work and research and we will do our best that it stays this way! This should be your take-home message! ;-)
Well, that depends. If it's a good feature and you make us think that adding this would make sense, then why not. You are also free to discuss this specific feature with us and post a patch.
No! Only the repositories stated on our homepage are official ones!
No, it isn't. We completely moved to repo.or.cz and do not use any of the functionality from GoogleCode. Please consider our repo.or.cz page http://repo.or.cz/w/netsniff-ng.git as our official repository.
Sure, we'd be happy about that. Send us your ideas or code and we're going to evaluate and probably integrate it. Have a look at the HACKING file. The release Git repository is located at http://repo.or.cz/w/netsniff-ng.git, so you are free to clone and hack.
Have a look at the HACKING file of netsniff-ngs source for further instructions.
Have a look at the Git documentation at http://www.kernel.org/pub/software/scm/git/docs/.
Probably not, at least this is not our main interest. netsniff-ng is intened to run on any Linux boxes including the ones without graphical user interfaces, so that you are able to run netsniff-ng on your server or router. But of course, you are free to develop a GUI and let us know about it! :-)
Yes, we're planning it.
We're experimenting on our own kernelspace zero-copy mechanism and also enhancements of the PACKET_MMAP. Nevertheless, the official netsniff-ng version will have the kernel-supported packet mmap, as is. If our findings really outperform the RX_RING/TX_RING and are worth publishing, then it will be shipped as a patch and contribute it to netdev.
Well, no. There are two reasons for this: First reason is, that it's not part of the mainline kernel. A interesting discussion about getting PF_RING into the kernel can be found at the netdev lists (http://lists.openwall.net/netdev/2009/10/14/37) and obviously there are no further efforts (browse the netdev/LKML, also netfilter) from the ntop project to merge both architectures or add features to PF_PACKET. Second reason is that we've evaluated the PF_RING (without the commercial Direct NIC Access [DNA]) regarding its performance and came to the conclusion, that there is no significant performance enhancement on our IBM HS21 Bladeserver test system. ntopi's DNA ships its own versions of some modified device drivers like Broadcoms tg3 and NetXtreme, Intels e1000(e), igb and ixgbe. Since these modifications are not official, neither to the kernel, nor to the vendors and cover only a small amout of what is out there, we're not doing further investigations at the moment. Also, netsniff-ng users have reported similar observations. A benchmark with PF_RING in transparent_mode 0 and 1 is even slower than netsniff-ng and in transparent_mode 2 both have the same performance. The test was done on a Dell PowerEdge 2850. Nevertheless, ntop is a very interesting project you definately should check out!
Yes, but only for Debian GNU/Linux, which then automatically gets updated in some other distros like GRML. People that maintain netsniff-ng in other distributions are listed within the CREDITS file.
No, at least we are not doing this simply because we don't have any Windows box! Why would we? Why would we encourage people to stay at a fucked up operating system? Have a look at the FSF site for more information, if you don't know why you should switch to Linux or *BSD.
Could be possible for the future.
Yes, we have. Emmanuels devel tree is at http://github.com/eroullit/netsniff-ng/ and Daniels devel tree can be found at http://repo.or.cz/w/netsniff-ng.git. Unlike otherwise clarified, you normally patch against the tree stated on our website, which is http://repo.or.cz/w/netsniff-ng.git.
No, it isn't rude. We're focusing on answering every mail, but in some rare cases it's mostly because of sheer lack of time to answer each email that gets sent to us. Furthermore, some hints for writing good e-mails can be found in rfc2635 and rfc1855.
$ flite -o play -t "netsniff n g"
Yes, here (note: we do not take any commission for the products).
Great! We'd very much like to see it. Please mail it to us ;-)
Copyright (C) 2009-2012 Daniel Borkmann
,
Emmanuel Roullit
and others
|