Forum Discussion

karthicksankark's avatar
karthicksankark
Icon for Altostratus rankAltostratus
Jun 08, 2023

No Learning Suggestions But could see Violations in the event logs

Hi All, 

In our environment we are in process of implementing the ASM policies. For few Policies we are not seeing any learning suggestions. But there are legal and illegal requests but no learning suggestios. 

The learning mode is automatic and learning speed is medium. I double checked that all violations are enabled for learn in learning and blocking settings. 

The Enforcement Readiness Period is 7 days. After 7 days ony I started looking into the learning suggestions will that be a cause. if so how can i see the current suggestions. 

Thanks in Advance!

 

 

  • Hi karthicksankark , 

    >>> your Q : The Enforcement Readiness Period is 7 days. After 7 days ony I started looking into the learning suggestions will that be a cause. if so how can i see the current suggestions. ? 

    Answer : No , you should see suggestions, and let me explain. 

    First what is the Learning mode that you're using in each Entity ( Entity means >> File types , parameters , URLs ) Learn mode contains ( Never ( Wildcard only ) , selective , Always , and Compact ). 

    If you want to learn everything in your AWAF , you need to modify it to Always , to see suggestion from each request. and make sure you enable ( Learn Check box ) for each entity.

    Also Make sure to enable learn check box in ( Evasion Technique , http compliance and attack signatures ) 

    Till here I answered your Questions of how to get suggestions. 

    For more info about learning modes , Refer to this Article : 
    https://techdocs.f5.com/en-us/bigip-14-1-0/big-ip-asm-implementations-14-1-0/refining-security-policies-with-learning.html
    Specially this part : 


    Also Listen to this Video : 
    https://www.youtube.com/watch?v=6Qi6kX6iyJ0

    After that let me know , if you need anything. 

    I hope that helps you , GoodLuck 🙂 

  • I personally dont like the automatic learning modes due to the fact that if a hacker or someone meaning to do harm to your system all they need to do if generate enough traffic from different IP addressses and it will automatically be added to your policy.  have you checked if alarm and learn are both checked since I have seen learning suggestions not pop when the alarm is not set ? also if you have told ASM in the past to forget about the event it will not show back up. 

    • karthicksankark's avatar
      karthicksankark
      Icon for Altostratus rankAltostratus

      Hi Thanks for the heads up on the risk in the automatic learning mode. Will opt for manual learning mode. 

      I double checked the entities that have both learn and alarm enabled. 

      In the logging I have used log illegal requests profile. 

       

      Thanks,

      Karthick 

    • Roman_Rudy's avatar
      Roman_Rudy
      Icon for Nimbostratus rankNimbostratus

      Hi Jim! This post caught my attention because I have been struggling something that may be similar. I recently configured several new AWAF policies – all initially with the exact same attributes - just assigned to different virtual servers. For most, I am seeing learning suggestions as expected. But for one of these, even though there is lots of traffic being logged remotely and showing up in the local events log – with lots of alerted violations, I’m seeing no learning suggestions. The thing that is unusual about this particular policy is that the site is permitted for only a restricted list of users, and so far, all of the logged traffic has originated from a single IP. I noticed in your response above, the phrase: “all they need to do if generate enough traffic from different IP addresses”. Now I’m wondering if this is a clue to my problem. Am I correct to infer that traffic must arrive from multiple sources in order to be “learned”?

       

  • Hi karthicksankark , 

    >>> your Q : The Enforcement Readiness Period is 7 days. After 7 days ony I started looking into the learning suggestions will that be a cause. if so how can i see the current suggestions. ? 

    Answer : No , you should see suggestions, and let me explain. 

    First what is the Learning mode that you're using in each Entity ( Entity means >> File types , parameters , URLs ) Learn mode contains ( Never ( Wildcard only ) , selective , Always , and Compact ). 

    If you want to learn everything in your AWAF , you need to modify it to Always , to see suggestion from each request. and make sure you enable ( Learn Check box ) for each entity.

    Also Make sure to enable learn check box in ( Evasion Technique , http compliance and attack signatures ) 

    Till here I answered your Questions of how to get suggestions. 

    For more info about learning modes , Refer to this Article : 
    https://techdocs.f5.com/en-us/bigip-14-1-0/big-ip-asm-implementations-14-1-0/refining-security-policies-with-learning.html
    Specially this part : 


    Also Listen to this Video : 
    https://www.youtube.com/watch?v=6Qi6kX6iyJ0

    After that let me know , if you need anything. 

    I hope that helps you , GoodLuck 🙂 

    • karthicksankark's avatar
      karthicksankark
      Icon for Altostratus rankAltostratus

      Thanks Mohamed for the detailed information. 

      I afraid to set the learning mode to always. Will it impact on ASM performance ? If not I can make the changed and observe. 

      Thanks, 

      Karthick Sankar

       

      • Mohamed_Ahmed_Kansoh's avatar
        Mohamed_Ahmed_Kansoh
        Icon for MVP rankMVP

        It's not really that impact, 

        Let we try another thing, 

        First >>> Learning suggestions >> will appear with some samples of traffic that violate the setting of            ( HTTP Compliance , Evaison Technique and attack signatures ) and Wildcard setting of ( File types , Parameters , URL ). 
        So you sould see learning suggestions , it appears with high number if your change the Learn mode to always that's right. 

        Second >>> Tell me about the Violations that appear to you without learning suggestions , could you please to send the violation name. 
        But again any request violates the ASM policy and blocking settings should appear in suggestions but with some samples of that request not only one sample of it. 

        Third >>> make sure that you haven't selected Compact method in learning mode , make sure it's ( Never , Always or selective ).. 


        Try that and tell me.

  • Hello,

    since you are using automatic learning mode, that's means when F5 generates a learning suggestion and its score reaches 100%, F5 will automatically accept this suggestion without waiting for your interception. you can check the policy history to check the changes that are made.

    Also, there are some violations that are triggered as illegal requests in the event logs but F5 doesn't generate suggestions for them, you can check the below link for this point:

    https://my.f5.com/manage/s/article/K17191923

    last point, inside the policy building settings (learning and blocking settings), you can change the mode to advanced for "policy building process" and expand the options section. you will find " HTTP Response Status Codes used to learn traffic" and the default values are 1xx 2xx and 3xx. which means F5 will learn and generate a suggestion for these responses only. you can check the response code for the requests in the event logs, and add response codes in this box accordingly to see the suggestions.

     

    Thanks,

    Salah

    • karthicksankark's avatar
      karthicksankark
      Icon for Altostratus rankAltostratus

      Hi Salah, 

      Thanks for the information. Yes, I changed the learning mode to Manual and verified the suggestions that are waiting for my action to accept, delete or ignore. 

      Thanks Again, 

      Karthick