Exadra37
Today I came across this article, and I was surprised to never have heard about this type of attack…
The slow loris is a kind of slow and low attack invented by RSnake in 2009. Instead of sending requests as fast as possible, it sends requests as slow as possible. The attacker splits the HTTP GET request in as many packets as possible, and sends them as slow as possible.
Do you know it?
How you defend against it in the Beam?
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use togethe...
New
:warning: Security advisory: Decimal DoS vulnerability
A vulnerability has been published for decimal where very large exponents can cau...
New
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
What IDE or editor are you using for Elixir development?
Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
Other Trending Topics
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
josevalim
Unfortunately you cannot really defend from slowloris. I mean, you can defend by asking clients to send data faster and refuting connections that send data too slow, but when you do that, you are also legitimately denying actual slow clients.
FWIW, plug+cowboy already ships with reasonable defaults for this.
Exadra37
Well if the to slow time is a reasonable limit, then you may not block legitimate clients, but you will limit the amount of damage a slow loris attack can do. Off course the slow time limit will be different from application to application.
Are this settings we can configure?
hauleth
BEAM (from the developer viewpoint) is preemptive scheduler (in reality it is cooperative, but you do not “see” that), so slow loris will not kill whole application as in Cowboy (and I believe most other HTTP server implementations in Erlang) you have process per connection/client, that mean that you cannot starve server. In theory you could run to the BEAM process limit, but I think that earlier your OS would ran out of amount of allowed opened ports. 4 years ago in testing single node was able to handle 2 million simultaneous connections and the
ulimitwas only reason why it couldn’t go further. So I would say that BEAM is safe against such attack.Exadra37
In a DDOS with slow loris the BEAM will not be safe, just much more resilient then an Apache or Nginx server, because exhausting the
ulimitwill take much more time then reaching the open connection limit in traditional servers.hauleth
Nginx is also pretty safe from Slow Lorris and is limited in exactly the same way as BEAM - by number of allowed opened connections.
Exadra37
In my opinion limiting the number of open connections doesn’t seem the best way to defend against the slow loris attack. In my point of view the best way is to first limit how slow a request can be made by the client, but I don’t know if it is possible at all in the BEAM. I will keep searching…
Thanks for the link.
Exadra37
I found this article by @alvises that seems to shed some light in the settings that we can tweak:
AstonJ
HAProxy is also worth a look:
Exadra37
After thinking more on the slow loris attack and have discussed it at work, we cannot really completely defend against it, just as Jose have mentioned, even by playing with the
inactivity_timeoutandidle_timeout, because the attacker will enumerate this values and never let his attack trigger them.So we may try to make it harder to perform a slow loris attack by employing some traffic analysis and try to find patterns and start blocking them, but it will be always a cat and mouse game.
josevalim
Yup, this is a much better way to put what I originally said as “Unfortunately you cannot really defend from slowloris.”