Potential SQL injection attack by brute-force querying the rest api

Hi ,

(reedited after more testing)

In v8.1 we're querying the rest api server as shown:

POST /AppServer/api/entities/Person?limit=15&displaycolumns=CCC_NIF;CentralAccount

Content-Type: application/json

{ "where": "CentralAccount like '%usuario%'"}
but the AppServer is considering this a potential sql injection attack and adds a time penalty to every sucesive query, thus making the access nearly impossible:
"2019-12-16 09:49:49.8124 WARN (ObjectLog c3b242f1-8b87-4e2b-ac2b-8671daa05e48) : Potential SQL injection attack, adding time penalty of 00:00:02.0940000, WHERE clause: CentralAccount like '%usuario%'"
At first I thought it was related to a complex where query, but this one couldnt be simpler. If I remove the "like" operator then it works just fine. I dont know if this is a response sent from the sqlserver or the Appserver. Could I turn off this checking?
Thanks!
Parents Reply Children
  • Hi Markus, 

    Thanks for replying.

    On the first request, but I cannot tell when it started. I got a SR from our Development dept. with the headsup.

    I've tried also in version 8.1.1 and it happens as well.

    This "POST" query: "">iam-desarrollo.eprinsa.org/.../Person

    with the following "where" clauses :

    1. "where": "CentralAccount = 'juancar'" , does not trigger the error
    2. "where": "CentralAccount like 'juancar'" , triggers the injection alarm and starts delaying answers 

    With my Rest client, I start sending example 1 requests and it works just fine, results ok. Then I start sending example 2 requests and the injection procedure begins. Right away I switch back to example 1 and the problem is gone, no time penalties. So it seems the like operator is not wanted.  

    At first I thought it could be related to a recent SR that I raised for defect 31881 in 8.1, but as it also happens in 8.1.1 and the dll's have been upgraded too I've discarded that thought.

    Regards!

  • We are living in a world where we must protect our system against SQL injection attacks and an API endpoint like the REST API is one of those areas. The protection itself is of course updated between the versions of One Identity Manager if new threads arise. So it might be, that you are affected by one of those protection mechanisms.

    I kindly suggest that you are contacting support to work with you solving your issue. I do know that we had some adaptions made post 8.1.1 that may help you in your current situation.