Share what you know with millions of people
Focus is the best place to turn what you know into remarkable content
Inputs on ModSecurity and JavaScript?
Hi!
I'm a student doing a research with ModSecurity. I'm coming up with some rules to prevent * HTTP POST DoS attack on the Apache server by using javascript cookies. ModSecurity injects the JavaScript code on any webpage then ModSecurity is then configured to drop requests without these cookies. My main assumption is that most bots especially those that use the slow HTTP DoS POST attack don't use browsers and thus don't use JavaScript.
Can anyone here give me some insights as to how effective/not effective that prevention is? Can someone also use JavaScript to create a Slow HTTP POST attack tool that triggers or steals that cookie and proceed with the attack?
Many Thanks!
Events
- Dos and Don'ts of Small Business Marketing May 29 @ 11 am PT
- Lead Nurturing 202: The Next Generation May 31 @ 11 am PT
- The Tricks to Paid Media June 6 @ 11 am PT
- Display Advertising for Brand Awareness June 20 @ 11 am PT





1 Answer
====== As an example, some said that Javascript code can easily be stolen even with obfuscation.
Sure it can! JS, even obfuscated, is not secure in the slightest!! As everyone should know, it is a parsed language, and run locally, so everything it requires must be accessible, in clear text, to the browser. Given JS was never ever meant to be used for any form of security, it is wide open to the end user, and subsequently the attacker.
Due to the open nature of the 'net, if you can inject it in the page, it can be read by an attacker.
Finally: If your attacker owns the "browser" it is not secure anymore, and you lost the fight before it started.
In summary, you can NOT secure the client using any method whatsoever as you do not control it. You are kidding yourself if you think you can.
====== I'm a student doing a research with ModSecurity. I'm coming up with some rules to prevent * HTTP POST DoS attack on the Apache server by using javascript cookies.
Fix Apache properly, i.e. in the code, if it can be fixed at all. The source code is freely available, so there is no reason not to do this.
You might also want to consider using a IDS or IPS to monitor for multiple connects from the same host in rapid succession. You need to do this lower down the stack in order for it to take least resources. Doing it at the application layer is getting a bit late (as too many user-land software firewalls discover).
Don't defend the Castle - defend the moat surrounding it. :)
Answer This Question