Skip to content

Segflow/nethme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nethme (Network hacking made easy)

Nethme aims to make network hacking easy by providing a single, yet powerfull API such as Network and Device classes.

Nethme is written in python and uses scapy for packets crafting and manipulation.

How to get started

  1. clone this repo

  2. install all the necessary packages (we recommend using a virtual environment)

pip install -r requirements.txt

  1. check the examples folder and start Hacking.

  2. if you like this project, give it a star :)

How to use

Network object

Start by creating a Network object

from nethme import *

net = Network(iface='en0')

The Network class provides many functions and attributes such as:

  • gateway property returns a Device object describing the default gateway
print(net.gateway)
  • this_device property returns a Device object of the machine executing nethme
print(net.this_device)
  • Find a device using MAC or IP addresses, note that for now nethme only uses ARP to find devices.
try:
      dev = net.get_device(ip='192.168.1.5')
except DeviceNotFoundException as e:
      print(e)
  • Loop over all up hosts:
for device in net:
      print(device, "is up")

Device object

The Device object represents a host in the local network, and can be used to perform actions such as:

  • ARP Poison: The poison_arp method will poison the ARP entry related to the default gateway if no argument is passed. Note thatpoison_arp will spwn a new thread and keep sending who_has ARP requests forever.
try:
      dev = net.get_device(ip='192.168.1.5')
except DeviceNotFoundException as e:
      print(e)
else:
      dev.poison_arp()
  • Intercept requests: For now nethme only support the http_request event
def http_handler(device, http_request):
      print("Got http request packet from:", device)
      http_request.show()
try:
      victim = net.get_device(ip='192.168.1.5')
except DeviceNotFoundException as e:
      print(e)
else:
      victim.intercept('http_request', http_handler)

Status

Now Nethme is being developed only by me, and only support basic actions, the project is not very stable and may be buggy sometimes.

TODO:

  • Implement other host discovery methods
  • Follow tcp stream
  • Write installation guide
  • Check open ports/services on a given device
  • Comment the code
  • Implement other event intercepter
  • Improve the http_request event intercepter
  • Improve this README
  • Many other things..

About

Network Hacking Made Easy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages