Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


slowloris attack fix for apache2?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

slowloris attack fix for apache2?

Mark_RMark_R Member

Hi.

For a very long time now the old slowloris attack still affects apache..

Does anyone knows a quickfix for this? The apache team probably wont fix this themselfs anytime soon. And no, i wont switch to nginx!! Apache is convenient.

Thanks.

Comments

  • mod_antiloris

  • ZappieZappie Member, Host Rep, LIR

    IMO a quick fix would be nginx :P
    but in all seriousness as IceCream said, mod_antiloris apache module will do the job

  • Install mod_security, default rules are effective against it.

  • Alright thanks, ill try it.

  • Well, you could also use Nginx as a reverse proxy infront of Apache to fight Slowloris.

  • @mickeyfin said:

    You look butthurt.

  • Mark would you use Nginx with Apache in a reverse proxy setup? That would not only defeat slowloris but would also lower resource usage of your Apache server.

  • @SandwichBagGhost said:
    Mark would you use Nginx with Apache in a reverse proxy setup? That would not only defeat slowloris but would also lower resource usage of your Apache server.

    Im not sure yet, ill first try the previous suggestions - if that wont work i have to give it a shot.

  • @mickeyfin said:
    You piece of shit carder.

    Keep it up kid, your rage is delicious.

  • Nginx buddy.

  • MunMun Member

    You can put nginx infront and just proxy everything to Apache.

    Btw Apache doesn't fix it because it is abusing a routine to help speed up connections.

  • joepie91joepie91 Member, Patron Provider
    edited March 2015

    Mun said: Btw Apache doesn't fix it because it is abusing a routine to help speed up connections.

    Well no, not really. It has to do with the fundamental model (threading) that Apache is designed around - Slowloris just tries to keep all 'workers' (threads) occupied by drip-feeding them data, very very slowly. Daemons like nginx don't have this problem because they're event-based, thus incoming data starvation doesn't have any effect - it'll just switch to handling something else in the meantime.

    Thanked by 1Mark_R
  • @Mun said:
    You can put nginx infront and just proxy everything to Apache.

    Btw Apache doesn't fix it because it is abusing a routine to help speed up connections.

    isn't slowloris just trying to fill up the max apache connections limit?

  • @slowlorris said:
    Noob.

    Welcome back. go on. you're definitly getting somewhere.

  • MunMun Member

    @joepie91 said:
    Well no, not really. It has to do with the fundamental model (threading) that Apache is designed around - Slowloris just tries to keep all 'workers' (threads) occupied by drip-feeding them data, very very slowly. Daemons like nginx don't have this problem because they're event-based, thus incoming data starvation doesn't have any effect - it'll just switch to handling something else in the meantime.

    Correct, and thus why my point that it was abusing a routine. If I remember correctly slowlorris maxes out Keep Alive as well to get this effect? Maybe I am mistaking it with another attack program?

  • Mark_RMark_R Member
    edited March 2015

    @slowlorris said:

    dont you have anything better to do? im actually relaxing after a day hard work. what did you do all day? registering fake accounts at LET and messaging bullshit? its pretty sad. i wonder how long you will continue until you realize that it is useless just like you are. feel free to continue though - go waste as much of your lifetime as possible.

  • joepie91joepie91 Member, Patron Provider
    edited March 2015

    Mun said: Correct, and thus why my point that it was abusing a routine. If I remember correctly slowlorris maxes out Keep Alive as well to get this effect? Maybe I am mistaking it with another attack program?

    Keep-Alive abuse is a different attack - commonly known as Keep-Dead. As far as I know, Slowloris doesn't use it (and it doesn't have to - the single requests it makes, never finish anyway).

    Mark_R said: isn't slowloris just trying to fill up the max apache connections limit?

    That is correct, but it does it specifically through never-ending requests. See my earlier comment. That is what makes it so low-bandwidth.

  • MunMun Member

    ...

    In any case it is easily mitigated by installing nginx infront and using it with proxy pass.

  • @Mun said:
    ...

    In any case it is easily mitigated by installing nginx infront and using it with proxy pass.

    Yeah, it looks like i have to widen my horizon and see what nginx is all about. so many people recommend it, that must have a reason.

  • MunMun Member

    @Mark_R said:

    You aren't getting rid of apache, you are just sitting nginx infront of it and allowing nginx to handle the rougher outer world. Apache just sits in the back accepting the more cleaned up versions.

    I have actually seen improvement benefits using both in combination then either as a single entity.

    Thanked by 2Mark_R geekalot
  • @Mun said:

    alright, ill get onto this later this evening. i thank all of you who gave me suggestions - i will make good use of it and get everything setup the right way. if shit hits the van i will definitly get back to this thread!

  • MunMun Member

    I suggest for the time being you get another VM.

    apt-get install nginx

    edit a file in /etc/nginx/site-available/sitename.com

    
    server {
                    listen 80;
                    listen [::]:80;
                    listen 443 ssl spdy;
                    listen [::]:443 ssl spdy;
                    ssl_certificate /etc/nginx/ssl/server.crt;
                    ssl_certificate_key /etc/nginx/ssl/server.key;
                    server_name sitename.com ;
    
                    try_files $uri;
                    index index.php index.htm index.html;
                    access_log /logs/path;
                    error_log /logs/path;
    
            location ~^ / {
            proxy_redirect off;
            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header CF-Connecting-IP $remote_addr;
            proxy_set_header Host $host;
            proxy_pass https://ip:port;
             }
    
    }
    
    

    The above should work though I haven't tested it. It is sorta pulled out of my current config, though mine is a little different.

  • joepie91joepie91 Member, Patron Provider

    Shouldn't even really need a separate VM. Just make Apache listen on localhost:8000 or something instead of 80, and have nginx sitting on 80/443, proxying to localhost:8000.

    Thanked by 1Mark_R
Sign In or Register to comment.