Theory Behind CVE-2023-44487 (HTTP2 Rapid Reset) Explained | HTTP DoS

Rahul Singh Chauhan
20 Oct 202306:11

Summary

TLDRこの動画では、HTTP2 Rapid Reset攻撃について解説しています。この攻撃は、GoogleやAmazonなどのクラウドベンダーにも影響を与え、公開的に報告された大規模な影響をもたらしました。HTTP1とHTTP2の違い、特にHTTP2の二進制性とストリーム機能が攻撃にどのように関係するかを説明し、攻撃の仕組みとその影響を解説しています。

Takeaways

  • 🌐 HTTP/2のRapid Reset攻撃について解説。CVE-2023-487が関連している。
  • 🔍 攻撃の影響は広範囲で、Google、Amazon、Cloudflareなどのクラウドベンダーが公開して説明している。
  • 📚 HTTP/1.1とHTTP/2の違いを説明。HTTP/1.1はテキストベースで、HTTP/2はバイナリベース。
  • 🚫 HTTP/1.1では一度に一つのリクエストしか送ることができないのに対し、HTTP/2では複数のストリームを一つのTCP接続で送ることができる。
  • 🔗 HTTP/2のストリームは、各リクエストに相当し、サーバーはそれらを並列で処理する。
  • 💡 HTTP/2では、一つのTCP接続で約100個のストリーム(リクエスト)を送信できる可能性がある。
  • 🛑 Rapid Reset攻撃では、リクエストを送信しながらrst stream frameを送ることで、サーバーのリソースを枯渇させる。
  • 🔎 Google Cloudのドキュメントでは、HTTP/2のクライアントが一つのTCP接続で複数のストリームを開くことができ、各ストリームが一つのHTTPリクエストに対応するように説明されている。
  • 📈 攻撃の仕組みは、リクエストを送信しながらrst stream frameを送信することで、サーバーは処理を開始するが、すぐにキャンセルする。
  • 📖 HTTP reset攻撃について詳しく知るために、Googleで関連する記事を読むことを推奨する。

Q & A

  • ビデオで話されているHTTP2 Rapid Reset攻撃とは何ですか?

    -HTTP2 Rapid Reset攻撃は、HTTP2プロトコルの特性を悪用したDoS攻撃で、サーバーのリソースを消費させるために多数のストリームを開設し、直ちにリセットする行為です。

  • CVE-2023-487はどのような意味を持ちますか?

    -CVE-2023-487は、このHTTP2 Rapid Reset攻撃に割り当てられたCommon Vulnerabilities and ExposuresのIDです。

  • HTTP1とHTTP2の最大の違いは何ですか?

    -HTTP1.1はテキストベースで、HTTP2はバイナリベースです。HTTP2はストリームと呼ばれる並列処理が可能で、HTTP1.1では1つのリクエストごとに1つのレスポンスが送られます。

  • HTTP2におけるストリームとは何ですか?

    -HTTP2のストリームは、1つのTCP接続内で独立して送受信できるHTTPリクエストまたはレスポンスを表します。

  • HTTP2で多重化を利用することの利点は何ですか?

    -HTTP2の多重化により、1つのTCP接続を通じて同時に複数のリクエストを送ることができます。これにより、通信効率が向上し、遅延が減ります。

  • RST_STREAMフレームとは何ですか?

    -RST_STREAMフレームは、HTTP2でストリームを異常終了するためのフレームです。サーバーはこのフレームを受け取ると、対応するストリームの処理を中止します。

  • HTTP2 Rapid Reset攻撃の目的は何ですか?

    -この攻撃の目的は、サーバーのリソースを消費させることです。攻撃者は多数のストリームを開設し、直ちにリセットすることで、サーバーのCPUやメモリなどのリソースを過負荷させ、サービスを妨害します。

  • Google Cloudはどのようにこの攻撃を検出しましたか?

    -Google Cloudは、HTTP2で定義されているRST_STREAMフレームの異常なパターンを監視し、多数のストリームが開設されてからすぐに閉じられていることを検出し、この攻撃を検出しました。

  • HTTP2 Rapid Reset攻撃を防ぐ方法は何ですか?

    -この攻撃を防ぐためには、サーバー側でストリームの状態を正しく管理し、異常なリセットパターンを検出するためのモニタリングシステムを構築することが重要です。また、セキュリティアップデートを適時適切に適用することも重要です。

  • HTTP2攻撃の影響を受けたクラウドベンダーには誰がいますか?

    -Google、Amazon、Cloudflareなどの大規模なクラウドベンダーに影響がでました。

  • HTTP2攻撃が発生した際に推奨される対応策は何ですか?

    -攻撃が発生した場合、関連する情報を収集し、セキュリティチームと協力して問題を分析し、適切な対策を講じることが推奨されます。また、最新のセキュリティ情報やアップデートに注意することも重要です。

Outlines

00:00

🌐 HTTP/2 Rapid Reset Attack Explained

この段落では、RahulがHTTP/2 Rapid Reset攻撃について説明しています。この攻撃はCVE-2023-487と呼ばれ、Google、Amazon、Cloudflareなどのクラウドベンダーが公開して検証した大規模な影響を受けています。動画では、攻撃がどのように実装され、HTTP/2の特徴がどのように攻撃に利用されるかについて説明します。また、HTTP/1とHTTP/2の違いについても説明し、リクエストのスモーギングとダウングレード攻撃に関する情報も提供します。

05:00

🚀 攻撃手法とHTTP/1.1の問題点

この段落では、RahulはHTTP/1.1でのリクエストの問題点を説明し、HTTP/2がどのようにその問題を解決したかを述べています。HTTP/1.1では、一度に一つのリクエストしか送信できず、サーバーからのレスポンスを受け取る前に多くのプロセスが行われます。しかし、HTTP/2では、一つのTCP接続で複数のストリーム(リクエスト)を送信でき、これにより並行処理が可能となり、効率が向上します。

🔄 HTTP/2の多重ストリーム機能と攻撃の可能性

この段落では、RahulはHTTP/2の多重ストリーム機能と、その機能が攻撃者にどのように悪用される可能性があるかについて説明しています。特に、rst streamフレーム(リセットストリームフレーム)を使用することで、攻撃者は一つのTCP接続で多数のストリームを送信し、サーバーのリソースを枯渇させることができます。この攻撃手法は、HTTP/2の規格上の問題を悪用しており、多数のストリームを迅速に開閉することでサーバーに影響を与えることがあります。

📚 詳細な攻撃方法と対策の解説

最後の段落では、RahulはHTTP/2 Rapid Reset攻撃の詳細なメカニズムと、どのようにしてサーバーのリソースを消費するかについて説明しています。また、この攻撃に関する多くの記事がGoogleで検索できることを示唆し、読者が攻撃に関する情報を深く理解するためのリソースを提供しています。ただし、この動画では実際に攻撃を試みることをお勧めしません。

Mindmap

Keywords

💡HTTP2

HTTP2は、インターネット上でデータを送受信するためのプロトコルで、HTTP1.1の後継者です。このプロトコルはバイナリ形式でデータをやりとりし、効率を向上させることで、ウェブサイトの読み込み速度を改善することを目的としています。ビデオスクリプトでは、HTTP2が1つのTCP接続で複数のリクエストを送ることができる「マルチプレクシング」機能を持ち、その機能が攻撃者に悪用される可能性があることが説明されています。

💡Rapid Reset Attack

Rapid Reset Attackは、HTTP2プロトコルの弱点を悪用する攻撃方法です。攻撃者は、サーバーに対して多くのリクエストを送信し、すぐにリセットフレーム(rst stream frame)を送信することで、サーバーのリソースを消費させることがあります。この攻撃は、サーバーがリクエストを処理する前にリセットされることで、リソースの無駄遣いにつながります。

💡CVE-2023-487

CVE-2023-487は、HTTP2プロトコルに関連する脆弱性に対するCommon Vulnerabilities and Exposures(CVE)の識別子です。この脆弱性は、攻撃者がRapid Reset Attackを実行することで、サーバーのリソースを枯渇させる可能性がある問題です。

💡Binary

バイナリは、データが2進法で表現される形式を指します。HTTP2はバイナリ形式を使用し、これによりデータをより効率的に送信することができます。バイナリフォーマットは、テキストベースのHTTP1.1と比べて、データの解釈や処理がはるかに迅速であり、効率的です。

💡Streams

ストリームは、HTTP2で導入された機能で、1つのTCP接続を通じて複数のリクエストを同時に送信することができる方法です。ストリームを使用することで、ウェブページの読み込み速度が向上し、並列処理が可能となります。しかし、ストリームの機能が悪用されると、サーバーへのDoS攻撃などのセキュリティリスクが生じる可能性があります。

💡Content-Length

Content-Lengthは、HTTPヘッダーの一つで、リクエストまたはレスポンスのボディーの長さを示します。HTTP1.1では、Content-Lengthヘッダーが必須であったり、リクエストの smugging と呼ばれる攻撃のリスクが高まることがあります。HTTP2では、ストリームベースのプロトコルであるため、Content-Lengthヘッダーは必要ではなく、リクエストの smugging が減少する傾向があります。

💡TLS Handshake

TLSハンドシェイクは、セキュリティ層での通信を開始するためのプロセスで、インターネット上でデータの暗号化を確保するために使用されます。HTTPS通信においては、TLSハンドシェイクが行われることで、安全な接続が確保されます。スクリプトでは、HTTP1.1でのリクエストプロセスにおいてTLSハンドシェイクが行われる前に発生する一連のイベントが触れられています。

💡Multiplexing

マルチプレクシングは、複数のリクエストを同時に1つの接続で送信することができるHTTP2の機能です。これにより、ウェブページの読み込み速度が向上し、効率的なリソースの使用が可能になります。ただし、この機能が悪用されると、サーバーへのDoS攻撃などのリスクが生じる可能性があります。

💡RST Stream Frame

RST Stream Frameは、HTTP2プロトコルで使用されるフレームの1つで、ストリームをリセットするためのメカニズムを提供します。攻撃者はこのフレームを悪用して、サーバーに多くのリクエストを送信し、すぐにリセットすることで、リソースを消費させる攻撃を行うことができます。

💡Server Resources

サーバーリソースは、サーバーが処理やサービスを提供するために使用するコンピューティング能力、メモリ、ネットワーク帯域幅などを指します。Rapid Reset AttackのようなDoS攻撃では、攻撃者が意図的にサーバーリソースを過剰に消費させることで、サーバーの正常な機能を妨害する可能性があります。

💡Google Cloud Documentation

Google Cloud Documentationは、Google Cloud Platformのサービスや機能に関する公式ドキュメントです。このドキュメントには、HTTP2の機能やRapid Reset Attackについての情報が含まれており、クラウドサービスプロバイダーが直面したセキュリティ問題や対策方法について説明されています。

Highlights

Rahul introduces the topic of the HTTP2 Rapid Reset attack, which has been given the CVE 2023-487.

The attack has a wide impact, prompting major cloud vendors like Google, Amazon, and Cloudflare to publicly disclose their experiences.

The video will discuss how the attack is implemented and how a feature of HTTP2 is turned against it.

There is an exploit available, though Rahul does not recommend trying it.

Rahul explains the differences between HTTP1 and HTTP2, noting that HTTP1.1 is textual while HTTP2 is binary.

In HTTP2, the content length header is not mandatory, reducing the prevalence of request smuggling.

HTTP2 allows for multiple streams (equivalent to HTTP requests) in one TCP connection, unlike HTTP1.1 which only allows one request at a time.

Multiplexing in HTTP2 means sending multiple requests simultaneously over one TCP connection, which can be abused for attacks.

Google Cloud documentation mentions that clients can open up to 100 streams per request on a single TCP connection.

The server processes all HTTP2 requests in parallel, which can be exploited by sending and canceling streams rapidly.

The Rapid Reset attack relies on sending a stream and immediately canceling it with a rst stream frame, exhausting server resources.

The attack allows sending over 100 streams on one TCP connection by continuously sending and canceling streams.

Rahul recommends reading more about the HTTP reset attack to understand its implications fully.

The video aims to provide insights into the HTTP2 Rapid Reset attack and its potential impact on server resources.

Transcripts

play00:00

hello everybody my name is Rahul and in

play00:02

this video we will be talking about the

play00:05

http2 rapid reset attack which has been

play00:08

given the cve 2023

play00:11

487 now this attack has such a wide

play00:14

impact that even the biggest cloud

play00:16

vendors like Google Amazon and even

play00:19

Cloud flare had to come up and publicly

play00:21

disclose what they witnessing in the

play00:23

wild so in this

play00:26

video that we'll be going through uh how

play00:30

that attack is actually implemented how

play00:32

a feature of http2 turned against it and

play00:37

there is also an exploit that you can

play00:39

try but I won't recommend doing that but

play00:42

before we move on with the video let's

play00:44

talk about the differences of HTTP 1 and

play00:47

two so that you have a better

play00:49

understanding of how this attack

play00:52

actually came into existence all right

play00:55

so what is http1 and how it is different

play00:58

from http2 now the biggest difference is

play01:01

that HTTP 1.1 is textual in nature and

play01:05

http2 is actually binary in nature so

play01:09

what do I mean so in http2 uh if you

play01:12

read the documentations what you'll find

play01:16

reference in most of the places is the

play01:18

word binary or streams all right but in

play01:21

HTTP 1 you won't find that and if you

play01:25

want to uh actually look into it what

play01:27

you can do is just look up that whether

play01:30

content length is mandatory for http2 or

play01:32

not and you'll be quite surprised to

play01:34

know that you don't actually need the

play01:36

content length header to um to send

play01:40

along with the HTTP to request and that

play01:43

is one of the reasons uh why request

play01:46

smuggling might not be that prevalent in

play01:48

HTTP 2 you can try downgrading attacks

play01:51

but that's a whole different video so

play01:54

let's talk about CV 2023 487 now what

play01:58

happens here is when it comes to http

play02:01

1.1 you can only send one request at a

play02:04

time and then uh what the server will do

play02:07

is it will send one response now in

play02:11

there is a whole lot of things happening

play02:13

for example a three-way TLS handshake

play02:15

will take place and a bunch of other

play02:17

things before the server finally gives

play02:20

you a response this is in terms of

play02:23

https so this was a major problem right

play02:26

because you can only have one request at

play02:28

a time but you if you try to send in

play02:31

multiple requests for example you can

play02:33

try multiplexing so what would happen is

play02:35

if the first request fails the

play02:37

subsequent requests will also fail now

play02:40

this is a big problem because if the

play02:42

first one fails other will eventually

play02:44

fail but with

play02:46

http2 you can send in multiple streams

play02:50

in one TCP connection and is May each

play02:53

stream is equivalent to an HTTP request

play02:57

so as you can see multiplexing that you

play03:00

are sending in multiple requests at the

play03:02

same time through one TCP connection now

play03:07

the best part here is that you can send

play03:08

in a lot of other streams or lot of

play03:10

other requests in one TCP connection or

play03:13

through one TCP connection now what do I

play03:15

mean by that is I think it's a bit

play03:19

contextual and how you configure your

play03:20

server but from what I was reading

play03:22

through the documentation U you can

play03:26

actually send in about uh 100 streams or

play03:29

100 requests through one TCP connection

play03:33

and I'll show you where it is written in

play03:34

a moment now if you send in 100

play03:38

streams that's a big thing because you

play03:40

sending a lot of traffic through one TCB

play03:42

connection and that is where you can

play03:46

abuse this feature now let's go here and

play03:50

this is the Google Cloud documentation

play03:52

that I'm reading on uh how they came

play03:54

across the rapid reset so here it says

play03:56

that http2 the client can open multiple

play03:58

concurrent streams on a single TCP

play04:01

connection and each stream corresponds

play04:03

to one HTTP request some clients may

play04:06

open 100 streams per request and the

play04:09

server processes all these requests in

play04:11

parallel so what will happen here is if

play04:13

you send in two requests the server will

play04:15

actually process both of these requests

play04:18

parallely and then send you the response

play04:20

back now this is the part where it's get

play04:22

pretty interesting so here is a diagram

play04:24

of

play04:26

http1 so what is happening here is you

play04:28

are sending in

play04:30

one request there's a lot of things

play04:33

happening but we'll not get into that

play04:34

you'll get one response now with HTTP 2

play04:38

you get a lot of streams a lot of

play04:41

requests that you can send in with one

play04:43

TCP connection and you get all those

play04:45

responses back but it gets pretty

play04:48

interesting because you can also abuse

play04:50

this feature okay so let's try to uh see

play04:54

what happens so there is a frame called

play04:56

rst stream frame so

play05:00

what happens here is as soon as you send

play05:04

all these requests to the server you do

play05:07

not wait for its response as long as

play05:09

you're sending the request you also send

play05:12

a frame called The rstd Stream frame

play05:15

that we just learned about so this

play05:18

attack primarily relies on you sending

play05:21

the stream the server just begins to

play05:24

process it but just after that you send

play05:27

a rst stream frame and the server

play05:30

cancels the processing now in this way

play05:34

you can utilize this attack to send one

play05:38

over 100 streams over one TCB connection

play05:41

because you are sending a stream

play05:43

cancelling it sending cancelling sending

play05:46

cancelling in this way you can send a

play05:49

lot of streams through one TCB

play05:52

connection and exhaust the resources of

play05:56

the server so this is how the h HTTP

play06:00

reset attack comes into play now I

play06:03

highly recommend that you actually go

play06:05

and read Around the HTTP reset attack

play06:08

there are a lot of Articles around it on

play06:10

Google

Rate This

5.0 / 5 (0 votes)

関連タグ
HTTP2RapidResetCVE-2023-487セキュリティクラウドGoogleAmazonCloudflare攻撃手法対策