habu v0.0.98 released: Python Network Hacking Toolkit

Habu: Python Network Hacking Toolkit

I’m developing Habu to teach (and learn) some concepts about Python and Network Hacking.

These are basic functions that help with some tasks for Ethical Hacking and Penetration Testing.

Most of them are related to networking, and the implementations are intended to be understandable for who wants to read the source code and learn from that.

Some techniques implemented in the current version are:

  • ARP Poisoning
  • ARP Sniffing
  • DHCP Discover
  • DHCP Starvation
  • Land Attack
  • SNMP Cracking
  • SYN Flooding
  • TCP Flags Analysis
  • TCP ISN Analysis
  • TCP Port Scan
  • Web Technologies Identification



  • Minor fixes and snmp.crack improvements


$ pip3 install habu


habu.arpoison: ARP Poisoning

This command sends ARP ‘is-at’ packets to each victim, poisoning their ARP tables for sending the traffic to your system.

$ sudo habu.arpoison
Ether / ARP is at 00:c2:c6:30:2c:58 says
Ether / ARP is at 00:c2:c6:30:2c:58 says
Ether / ARP is at 00:c2:c6:30:2c:58 says
Ether / ARP is at 00:c2:c6:30:2c:58 says

Note: If you want a full working Man In The Middle attack, you need to enable the packet forwarding on your operating system to act as a router. You can do that using:

echo 1 > /proc/sys/net/ipv4/ip_forward
habu.arpsniff: Discover devices on your LAN capturing ARP packets

This command listens for ARP packets and shows information about each device.

Columns: Seconds from last packet | IP | MAC | Vendor

1         a4:08:f5:19:17:a4   Sagemcom Broadband SAS
7         64:bc:0c:33:e5:57   LG Electronics (Mobile Communications)
2         00:c2:c6:30:2c:58   Intel Corporate
6         54:f2:01:db:35:58   Samsung Electronics Co.,Ltd
habu.contest: Check your connection capabilities

This command tries to connect to various services and check if you can reach them using your internet connection.

$ habu.contest
IP:    True
DNS:   True
FTP:   True
SSH:   True
HTTP:  True
habu.dhcp_discover: Discover DHCP servers

This command sends a DHCP request and shows what devices have replied. Using the ‘-v’ parameter (verbose) you can see all the options (like DNS servers) included in the responses.

$ sudo habu.dhcp_discover
Ether / IP / UDP > / BOOTP / DHCP
habu.dhcp_starvation: Fill the DHCP leases

This command sends multiple DHCP requests from forged MAC addresses to fill the DHCP server leases. When all the available network addresses are assigned, the DHCP server doesn’t send responses. So, some attacks, like DHCP spoofing can be made.

$ sudo habu.dhcp_starvation
Ether / IP / UDP > / BOOTP / DHCP
Ether / IP / UDP > / BOOTP / DHCP
Ether / IP / UDP > / BOOTP / DHCP
habu.eicar: Prints the EICAR test string

This command prints the EICAR test string that can be used to test antimalware engines. More info: http://www.eicar.org/86-0-Intended-use.html

$ habu.eicar
Note: The below string is incorrect because is not a good idea write the complete in this text file. Some antivirus program can be detect it like a virus. 🙂



Copyright (c) 2018, Fabian Martinez Portantier
All rights reserved.

Source: https://github.com/portantier/

Anastasis Vasileiadis

PC Technical || Penetration Tester || Ethical Hacker || Cyber Security Expert || Cyber Security Analyst || Information Security Researcher || Malware analyst || Malware Investigator || Reverse Engineering

Leave a Reply

SC ProDefence SRL - Cyber Security Services