Forum Discussion

P_Casoria_18761's avatar
P_Casoria_18761
Icon for Nimbostratus rankNimbostratus
Feb 16, 2015

ASM module - efficacy testing

Hello everyone, I've deployed an F5 BIG-IP 2000s with LTM and ASM inside my architecture and I need to test the efficacy of Web Application Firewall (ASM module).

 

I've deployed "WebGoat" application and load-balanced all the traffic to it. The ASM policy was enabled and in blocking mode (staging not enabled). Then I used "Imperva WAF Testing Framework" to test the efficacy of the module.

 

RESULT: The traffic was logged, but no request was blocked.

 

How can I solve this? How can I really test the efficacy of my WAF configuration?

 

Thank you in advance.

 

8 Replies

  • Although your policy is in the blocking mode, you've probably not enforced proper blocking settings.

     

     

    Application Security -> Blocking -> Settings

     

    1) Make sure the "Current edited policy" is relevant

     

    2) Check the "block" tickbox where necessary. You probably have only "learn" and "alarm" tickboxes selected.

     

     

    Use the "event logs" and "manual traffic learning" sections to find out the violation types of the requests which were not blocked.

     

  • shaggy's avatar
    shaggy
    Icon for Nimbostratus rankNimbostratus

    Verify that your ASM policy elements (parameters/attack signatures/URLs/etc.) are enforced and not in "staging".

     

  • Check to see which entity (file types, urls, parameters) learning mode is in effect Application Security>Policy Building>Settings: Explicit Entities Learning.

     

    If they are set to "Never, wildcard only" then all entity types are allowed by default due to the wildcards on the entities list. ASM will block a request only if it violates file type length limits set on the wildcard (to use file types example).

     

    Check blocking settings as Hannes recommended.

     

    Ensure relevant attack signatures are assigned to the security policy.

     

  • I think that I've solved the problem.

     

    But I noticed that the ASM only blocks signatures contained in the URL (GET request) and not in packet payload (POST request). I'm actually only monitoring HTTP traffic.

     

    Is there a way to solve this issue?

     

    Thank you in advance.

     

  • By default attack signatures apply to the entire content of a request. The http method does not matter. What is in the content of the post that you expected would be blocked? Does the post appear in the ASM request log?

     

    Also additional information would be useful:

     

    What version are you running?

     

    How was the security policy created: manual? template? automatically?

     

    Is the local traffic policy routing all requests through the security policy?

     

    Which signature sets are assigned in the security policy?

     

  • If the logging profile on the virtual server is set to "log illegal requests only" switch it to "log all requests" and generate traffic to confirm that the ASM security policy is in fact seeing the post. If the post is logged examine the request. Are there any violations? Depending on the state of the security policy configuration it is possible for a request to violate the security policy but not get blocked by ASM.

     

  • Yes that could be the issue. By default most metacharacters like % are disallowed in parameter values in security policies. You should check the Blocking Settings list and enable alarm/block for "illegal metacharacter in value". The metacharacter settings can also be overridden on a individual parameter basis so you might want to check the parameters list and examine the settings of the parameters in question.

     

  • Unfortunately the problem is still there. I tried intercepting the request with OWASP ZAP and removing the escaping from payload. I also set all "Appication Security>Blocking>Settings" with block option. The request is not blocked at all and listed as "Informationl". Do you know any solutions? Thanks in advance.