# Block specific parameter value

**URL:** <https://community.f5.com/t/block-specific-parameter-value/69281>\
**Category:** Technical Forums\
**Tags:** waf, security\
**Created:** [February 22, 2022, 7:13pm UTC](https://community.f5.com/t/block-specific-parameter-value/69281 "2022-02-22T19:13:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AHMADAD](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@AHMADAD](https://community.f5.com/u/AHMADAD)\
**Post date:** [February 22, 2022, 7:13pm UTC](https://community.f5.com/t/block-specific-parameter-value/69281/1 "2022-02-22T19:13:10Z")

</div>

Hello All,

I am working on WAF policy where i need to allow any query paramter vlaue but block ones with sites or hostnames, example below.

BLOCK : [https://hostname/index.html?para1=https://example.com](https://hostname/index.html?para1=https://example.com)

ALLOW: [https://hostname/index.html?para1=name1.html](https://hostname/index.html?para1=name1.html)

I dont have the option to use static parameter type because of the nature of the web app, can someone share ideas or best approch ?

---

<div class="post-metadata">

**Author:** ![Daniel\_Wolf](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/daniel_wolf/32/1119_2.png) [@Daniel\_Wolf](https://community.f5.com/u/Daniel_Wolf)\
**Post date:** [February 25, 2022, 5:31pm UTC](https://community.f5.com/t/block-specific-parameter-value/69281/2 "2022-02-25T17:31:35Z")

</div>

Hi&nbsp; @AHMADAD ,

you say that you want to prevent sites and hostnames as parameter value. But in my opinion this is a site:

_ALLOW:&nbsp;[https://hostname/index.html?para1=name1.html](https://hostname/index.html?para1=name1.html)_

Or do you consider this a page and pages are allowed?

Could you explain what you are trying to protect or prevent with this?&nbsp; Are you trying to protect yourself from CSRF? There is a solution for this:&nbsp;[K11930: Overview of the BIG-IP ASM CSRF protection feature](https://support.f5.com/csp/article/K11930).

However, in my opinion this rather sounds like something that should be solved at the level of the application and not in a WAF.

KR  
Daniel

---

<div class="post-metadata">

**Author:** ![Ismael\_Goncalves](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/ismael_goncalves/32/12650_2.png) [@Ismael\_Goncalves](https://community.f5.com/u/Ismael_Goncalves)\
**Post date:** [February 26, 2022, 1:12am UTC](https://community.f5.com/t/block-specific-parameter-value/69281/3 "2022-02-26T01:12:20Z")

</div>

Hi&nbsp; @AHMADAD ,

It seems you are trying to protect against a SSRF attack. We would need to know more on the what kind of input should be allowed in this parameter, but I antecipate a couple of options that could help you mitigating the problem:

1) Configure SSRF signatures on the parameters to prevent common SSRF targets (this might not cover all the attack scenarios)  
2) Disable meta character “/” and “.” in case they are not expected (as well as other meta-characters) for the parameter  
3) Configure minum/maximum lenght of the parameter  
4) Configure the parameter with a Regular Expression representing the data you are expecting&nbsp;  
5) Configure an Enum list in the param with expected values (this is completely static)  
6) If you are on BIG-IP 16.1.x verify if the SSRF protection could help with your scenario:&nbsp;[https://techdocs.f5.com/en-us/bigip-16-1-0/big-ip-asm-implementations/mitigating-ssrf.html](https://techdocs.f5.com/en-us/bigip-16-1-0/big-ip-asm-implementations/mitigating-ssrf.html)&nbsp;and here&nbsp;[https://support.f5.com/csp/article/K86285140](https://support.f5.com/csp/article/K86285140)

My 2 cents.

---

<div class="post-metadata">

**Author:** ![AHMADAD](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@AHMADAD](https://community.f5.com/u/AHMADAD)\
**Post date:** [March 7, 2022, 4:17pm UTC](https://community.f5.com/t/block-specific-parameter-value/69281/4 "2022-03-07T16:17:55Z")

</div>

Hi Daniel,

Thank you for your response.

Exactly, i considered&nbsp;this a page and its allowed but i don’t&nbsp;want users to insert sites in parameter values, i 100% agree with you that this is something should be resolved at application side but was trying to help in my end as workaround 😉

Thanks for sharing the CSRF link, we don’t&nbsp;want to apply this solution as we have not tested it for this specific application and it may has negative side effects

---

<div class="post-metadata">

**Author:** ![AHMADAD](https://avatars.discourse-cdn.com/v4/letter/a/8e7dd6/32.png) [@AHMADAD](https://community.f5.com/u/AHMADAD)\
**Post date:** [March 7, 2022, 4:31pm UTC](https://community.f5.com/t/block-specific-parameter-value/69281/5 "2022-03-07T16:31:27Z")

</div>

Hi&nbsp; @Ismael_Goncalves

Thanks a lot&nbsp;for the helpful options,&nbsp; i will definitely consider&nbsp;options 1,2 and 6.
