Skip navigation
HTTP is supposed to be stateless, but sometimes... it isn't!
0:00 / 3:23

HTTP is supposed to be stateless, but sometimes... it isn't!

James Kettle

@albinowax86K followers

Visit on X
1,238 likesDownloadOriginal post

140,310 views

HTTP is supposed to be stateless, but sometimes... it isn't! Some servers create invisible vulnerabilities by only validating the first request on each TCP/TLS connection. I've just published a Custom Action to help you detect & exploit this - here's a narrated demo:

27 Comments

Comments from the original post on X (Twitter)

  • James Kettle's profile picture

    @albinowax

    You can install this Custom Action via the Extensibility Helper extension, or copy+paste from here: Try it out on the Academy lab here:

    53 likes

  • tilver's profile picture

    @tilver

    Blew up a WAF with this a long time ago. Their answer was to turn off keep-alives, but then they exempted themselves from performance metrics. Glad to hear it's still a thing.

    6 likes

  • Wahid Fayad's profile picture

    @0xcdn

    @PortSwiggerRes This is pretty cool. Loved the tutorial to this feature. I will try it as soon as I can. Thanks James!

    3 likes

  • pwd0_ls's profile picture

    @ImoJOnDz

    this kind of attack scenario has happened to me many times when I request for example /sensitivefile I initially get a 404 but if I keep sending the request multiple times I eventually get the content of the requested file I think it’s caused by some reverseproxy or loadbalancer

    3 likes

  • ProEvilz's profile picture

    @ProEvilz

    @rauchg would vercel be effected by attacks like this?

    2 likes

  • Koen's profile picture

    @koenengineering

    The AirPlay protocol also attaches state to the socket on many occasions.

    1 like

  • Ricardo Iramar's profile picture

    @ricardo_iramar

    Not sure if it's just me, but it seems the "Host validation bypass via connection state attack" lab is broken.

    1 like

  • James Kettle's profile picture

    @albinowax

    Make sure you don’t lose the cookies :)

    5 likes

  • Ricardo Iramar's profile picture

    @ricardo_iramar

    Thanks James! I was assuming that 192.168.0.1 was a totally different application.

    1 like

  • James Kettle's profile picture

    @albinowax

    It is, but from the Academy front-end’s perspective it needs to know which lab instance you’re talking to and it does this via the host header or cookies. It’s basically a technical limitation.

    2 likes

  • Ricardo Iramar's profile picture

    @ricardo_iramar

    Got it! Thanks for the quick reply.

  • Karel Origin's profile picture

    @Karel_Origin

    I don't think this is as much validation as it is routing. A reverse proxy will likely use the initial host header to determine what the destination should be which will persist for as long as the connection is alive. However, I only see the SSRF occur in very specific scenario's: e.g. an upstream server takes arbitrary host headers but isn't bound to a known list, unlike the first proxy.

    1 like

  • NIGERIA 🇳🇬's profile picture

    @NG_maybeblessed

    The real security researchers

    1 like

  • Beejaybee's profile picture

    @Beejaybee11

    This is amazing

    1 like

  • Durable Disorder 🇺🇸's profile picture

    @eM7yPKfGGCbzSJb

    Good job. Love the narration.

    1 like

  • Md Maruf Hosan 🇧🇩's profile picture

    @0xMaruf

    u should make videos like this rather than writeups.

  • the Beast's profile picture

    @Hamoon_TheBeast

    Nice trick thanks

  • Meek's profile picture

    @msakiart

    banger

  • SecInterviewHub's profile picture

    @sec_hub93028

    This is great! Thanks for sharing this.

  • 0xmaddy | Tech Adrenaline's profile picture

    @tech_maddy

    Great find on stateful validation bypass. This pattern shows up in load balancers and CDNs too. Reusing connections for exploit chaining is clever. Can help audit these if needed!