Forum Discussion

Kenta_Ogasawara's avatar
Kenta_Ogasawara
Icon for Nimbostratus rankNimbostratus
Jul 20, 2015

String sanitization in LTM

Hello,

 

I'm using BIG-IP LTM v11.5.1 now.

 

I want to sanitize the string that is included in the request from client.

 

(e.g. "<" -> "<", ">" -> ">"...)

 

Q.Please tell me if you know how to realize this.

 

(Can I realize it using iRule?)

 

Best regards,

 

Kenta

 

2 Replies

  • I agree that it can get challenging, but definitely not impossible.

    when HTTP_REQUEST {
        HTTP::uri [string map {"<" "<" ">" ">"} [HTTP::uri]]
    }
    

    The [string map ] function here replaces the special characters in the HTTP uri. You can extend this to include more characters and HTTP header and payload data. If you're worried about attacks though, you'd be far better off enabling a web application firewall like ASM.