WAF: wrong approach firewall - why the common negative security model is wrong, why the positive model is superior and how you can implement it with #vinylcache. talk at #gpn24
https://media.ccc.de/v/gpn24-385-waf-wrong-approach-firewall

WAF: wrong approach firewall - why the common negative security model is wrong, why the positive model is superior and how you can implement it with #vinylcache. talk at #gpn24
https://media.ccc.de/v/gpn24-385-waf-wrong-approach-firewall

correction: someone noticed a mistake in the path regex quiz:
ยซit can't be /[^/]+/ (or /[^/?]+/ for URLs) because that would also match the "hidden" directory /.foo/, which the glob would not match.
so we end up with /[^/.][^/]*/ (or /[^/?.][^/?]*/).ยป
I think they are absolutely correct. I was focused on making the point about ? and overlooked hidden file behaviour. Thank you anonymous reporter for this correction!
slides pdf: https://uplex.de/Vinyl_Cache/20260607_gpn24_waf_wrong_approach_firewall.pdf
slides odp: https://uplex.de/Vinyl_Cache/20260607_gpn24_waf_wrong_approach_firewall.odp
Feel free to reuse at will, this content is in the public domain (licensed CC0)
@slink thank for your talk. Takeaways for me:
- signed cookies
- stripping unneeded headers from the backend requests
@slink
I watched the presentation and would rate it as worth watching.
Thanks again for your presentation.
My takeaway:
The firewall I was developing in my youth was, as any similar approach today, futile.
I should have just closed all ports and opened the ones I really needed.
@slink thank you so much for this talk! super interesting to see a completely different approach to this subject.
Do you think some sort of .well-known or open standard for applications to expose valid Path/Method/Headers to a fronting WAF would work or I figure if you're going to modify an application to provide this you might as well implement HTTP Signatures (I'd vaguely heard about these but didn't know you could use them this way).
Maybe web frameworks (example django because i'm familiar with it) could provide an export that could be uploaded to a CDN/WAF to create a base ruleset? Do you have any thoughts on a format specification?
Thanks for your work on Vinyl Cache, cheers!
@theraspb here's part one of the answer: https://fosstodon.org/@vinyl_cache/116738762630361715
You sent me down a rabbit hole (no criticism), but I wanted to make this helpful.
@slink I did not expect such a response! (would have been a bit hard on stage eh?)
Honestly this has got me more excited to run Vinyl Cache, I think people that are hosting their own stuff for community benefit face these scraping issues too much which is a burden and ads even more pressure for people to use less FOSS alternatives or give up control.
I've been thinking that we already have the tools to face these issues but not packaged up in a way that makes it easy for someone to make use of them, articles like this help people implement this stuff easier and i appreciate the "Why" explained in the article too.
Thank you!
@theraspb So, regarding Anubis: Ideally, I would like to write an article similar to the one on Iocaine including the "here's how to do the same in Vinyl Cache", but in this case this involves developing some JS to be run in the browser, and this triggers a defense reflex, because I really don't like JS. So I am not sure if I will get around to it, and will try to give a comparably shorter response:
The central problem of all "crawler defense" techniques is to identify either ...
@theraspb simply check if the user-agent supports cookies or supports cache validation. As many crawlers do, people resorted to checking if Javascript works, and crawlers adapted.
Anubis implements this idea combined with a proof of work: The client is tasked to find a hash collision by running javascript code, which induces relevant cost in terms of CPU time. If all goes well, crawlers will not invest that cost and stay out, but, IMHO, clearly thjs model is not sustainable:
@theraspb To summarise, Anubis is an HTTP proxy to issue and validate proof of work tasks. This function can also be implemented in Vinyl Cache, but someone would need to do it.
Also, there could be better options to achieve a similar goal. Stay tuned.