HTTP/2 Stuart Larsen John Villamil Yahoo!
HTTP2 HTTP2 http2fuzz ATS Firefox NodeJS
Stuart Larsen https://c0nrad.io John Villamil @day6reak
HTTP/1.1 1999 HTML Java Script Web ISP Web SSL
HTTP/2 HTTP/2 よこんにちは さようなら SPDY http://blog.chromium.org/2015/02/hello-http2-goodbye-spdy-http-is_9.html HTTP/2 は SPDY および SPDY/2 から進化したもの 機能 : TCP 使用の改善 バイナリプロトコル フレームとストリーム マルチプレキ シング ( ストリーム ) かねてから認識されていた遅延を緩和 サーバからのプッシュ (PUSH_PROMISE) データ圧縮 (HPACK) フレーム その他いろいろ 大きな攻撃の可能性
HTTP/1.1 http:// https:// URI TLS Chrome Firefox Internet Explorer curl http:// HTTP/2 GET /index.html HTTP/1.1 Host: example.com Connection: Upgrade, HTTP2-Settings Upgrade: h2c HTTP2-Settings: <SETTINGS payload> HTTP/1.1 101 Switching Protocols Connection: Upgrade Upgrade: h2c
HPACK HTTP (cookies ) Hpack was designed to make it difficult for a conforming implementation to leak information, to make encoding and decoding very fast/cheap, to provide for receiver control over compression context size, to allow for proxy re-indexing (i.e. shared state between frontend and backend within a proxy), and for quick comparisons of huffman-encoded strings. Roberto Peon, http://lists.w3.org/archives/public/ietf-http-wg//2014aprjun/1044.html 0 2^32 SETTINGS SPDY CRIME(Compression Ratio Info-leak Made Easy)
HPACK name:value
HPACK 1 4k https://tools.ietf.org/html/rfc7541
ATS Yahoo ATS (Apache Traffic Server) Http2ConnectionState.cc
ATS 2 RFC - http://tools.ietf.org/html/rfc7541#section-4.3 4.3. headers
マルチプレキ シング HTTP/1.1 はパイプライン化で複数のリクエストを送ることができる ヘッドオブラインブロッキング 1 2 3 4 レスポンスは送信された順に行われなくてはならない 1 2 3 4 1 2 3 4 HTTP/1.1 1 3 4 2 HTTP/2
Length (24 bits) Type (8 bits) Flags (8 bits) R Stream Identifier (31 bits) Payload (0+ bits) Headers Data Priority Reset Settings Push Ping Goaway Update Continuation
index.html Web Web logo.png logo.png logo.png
HTTP/2 HPACK アップグレード ダウングレード つじつまの合わないマルチプレキ シング 不正なフォーマットのフレーム クライアントに任意のデータをプッシュ サーバに任意のデータをプッシュ ストリーム依存 無効なフレームの記述
behavior
HTTP
http2fuzz http2 golang
http2fuzz: 1. Web http 2. ALPN h2 h2-14 3. 4. 5.
http2fuzz: 1. TLS 2. 3. setinterval(function() { $.get( https://localhost:8000 ) }, 2000)
http2fuzz 1 1 2 2 3 3 4 3 4
SettingsFuzzer: 0 5 SettingsFrame HeaderFuzzer: 0 5 HTTP HeadersFrame
PriorityFuzzer: Priority streamdependencysteamid weight exclusive value PingFuzzer: ping 8 ResetFuzzer: RST streamid errorcode
WindowUpdateFuzzer: Window Update Frame streamid incr value RawFrameFuzzer: frametype (0-12) randomflags (0-256) streamid(2**31) 0 10000
DataFuzzer: Data Frame streamid endstream bool 0 10000 PushPromiseFuzzer: PushPromise Frame 0 10000 streamid promiseid endheaders bool padlengnth (0-256)
ContinuationFuzzer: Continuation Frame streamid endstream bool 0 10000 RawTCPFuzzer: TLS 0 10000
replay.json./http2fuzz
FireFox HTTP2 DoS http2 pad length steam dependency identifier weight header block fragment padding 1 nscstring 2^32
FireFox HTTP2 DoS Http2Session.cpp 1226
FireFox PushPromise DoS Http2Session.cpp 1634 = 4294967292
node-http2
HTTP2 HTTP2 http2fuzz ATS Firefox NodeJS