原理:通过并发连接池进行的慢速读攻击(基于TCP持久时间)等。慢速攻击基于HTTP协议,通过精心的设计和构造,这种特殊的请求包会造成服务器延时,而当服务器负载能力消耗过大即会导致拒绝服务
解决方案:
1 设置Tomcat / server.xml文件 connectiontimeout 值,默认为20000ms,修改为8000ms(Tomcat 自身安全漏洞)
2 设置AJAX的全局timeout时间(默认为30000ms) $.ajaxSetup({timeout:8000});
3.3 If possible, you should set the Secure flag for this cookie,set the HTTPOnly flag for this cookie解决方案:
1 (Tomcat 自身安全漏洞)设置设置Tomcat / web.xml文件:
<session-config>
<session-timeout>30<session-timeout>
<cookie-config>
<secure>true<secure>
<http-only>true<http-only>
</cookie-config>
<session-config>
2 在Login .jsp主页面加入:
response.setHeader("SET-COOKIE", "JSESSIONID=" + sessionid + "; secure ; HttpOnly");
最后欢迎大家访问我的个人网站:1024s