Posted by speedping 3 hours ago
Just keep that protocol disabled for now. It's apparently too difficult for any human to write a secure implementation of http2. (As for http3, forget about it, we need AGI for that.)
Unlike IPv6 it doesn't need any OS or ISP support, just a browser that's newer than 2020. Everyone outside of air gap networks and government sites should be switching.
Because clearly the patching treadmill is not sustainable, you will need a a second line of defense and reduce the blast radius of every individual vulnerability.
One, as the RCEs are coming out, admins are on edge and paying more attention, so more likely to catch the annoucement on their platform. "Oh, that's on PHP, we don't use this. Oh, wait, another one?"
Two, all of these hitting at once, while they may expand the surface for attackers, it also spreads their attention. They only have so much time and bandwidth. When a new shiny RCE hits, they need to consider "do we continue to try an prosecute the old one or jump on this bandwagon".
So, in the sense, it can actually slow down the actual potential impact of the revelations.
We can only hope this gives users time to get their systems up to date before they come knocking.
I mean, I know its a reach, but...who knows.
Only a little bit. An attacker will just hand this to an LLM with a "ping me when this is ready to use..." prompt.
Today we are going to take a look at how to avoid this vuln by not having Nginx and not using HTTP/2 (for most use cases).
We will assume that you are using Nginx for any of the following: Serving files or serving dynamic website content through some integration with a programming language.
We will be using python, but you can use any programming language that has a native integration with sockets through it's C interface (literally every language:
Step 1: import socket # import the socket library from glibc or glibc.
Step 2: socket.socket() # socket.socket()
Step 3: socket.bind((PUBLIC_ADDR,80)) # bind before listening obviously. Use a local address if you are below the IPoverty4 line.
Step 4: conn,addr = socket.accept() # this creates a connection, wrap it in a While True and a try catch for production. Sprinkle in some import threading to support multiple concurrent requests.
Step 4: req = conn.recv(4096) # split on b"\r\n\r\n" to separate headers from body, read HTTP RFCs for the rest. Feel free to reject HTTP/2 requests, they'll probably just resend as HTTP/1.1
Step 5: #Fill in the details, most likely if you are using nginx, you will end up connecting two sockets with pipe, or just storing and forwarding to another tcp endpoint. Again take a look at the HTTP RFCs and the glibc socket and stdio manuals.
Thank you for reading my tutorial, and best of lucks.