Testing for security

We already saw the best tool for security testing in Chapter 6, Network Security with Python, with Scapy, in my opinion. There are lots of open source tools for security, but none offers the flexibility that comes with constructing our packets.

Another great tool for network security testing is hping3 (http://www.hping.org/). It offers a simple way to generate a lot of packets at once. For example, you can use the following one-liner to generate a TCP Syn flood:

# DON'T DO THIS IN PRODUCTION #echou@ubuntu:/var/log$ sudo hping3 -S -p 80 --flood 192.168.1.202HPING 192.168.1.202 (eth0 192.168.1.202): S set, 40 headers + 0 data byteshping in flood mode, no replies will be shown^C--- 192.168.1.202 hping statistic ---2281304 ...

Get Mastering Python Networking - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.