HTTP slow http request , slow http post, slow http reading. 统称 SHA
各自原理这里不再描述。简述F5防御方法:
- slow request
HTTP profile自身可防御,如果需要快速主动断开连接,可配合irule - slow post
使用ASM,V13之前通过调整系统全局的internal的slow transaction 两个参数防御。In version 11.3.0, the ASM module's low-and-slow prevention works on inbound requests such as a Slow POST. - slow reading,可调整tcp profile的0窗口探测超时参数,如果攻击端不是发起0窗口,则可以额外考虑以下irule
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162when SERVER_CONNECTED {TCP::collect}when SERVER_DATA {set rtimer 0# Time in milliseconds before HTTP response read is considered slow:after 5000 {if { not $rtimer} {set hsl [HSL::open -proto UDP -pool hsl_pool]# Slow read detected for this server response. Increment the count by adding atable entry:# Add the client source IP::port to the subtable with a timeouttable set -subtable "MyApp" "[IP::client_addr]:[TCP::client_port]""ignored" 180# If we are over the concurrency limit then rejectif { [table keys -subtable "MyApp" -count] > 5} {clientside {reject}table delete -subtable "MyApp" "[IP::client_addr]:[TCP::client_port]"HSL::send $hsl "Dropped [IP::client_addr] – reading too slow"}}}TCP::notify responseTCP::releaseTCP::collect}when USER_RESPONSE {set rtimer 1}when CLIENT_CLOSED {table delete -subtable "MyApp" "[IP::client_addr]:[TCP::client_port]"}
文章评论