How to add security tests to REST requests with JSON content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2013
05:25 AM
08-19-2013
05:25 AM
How to add security tests to REST requests with JSON content
Ok, let me explain my problem:
I have REST request with few parameters, POST method, service accept only JSON content, so I changed Media Type to application/json and put values to the request body by this way:
Everything works fine (functional tests), but...
...when I trying add security tests: I choose my request in SecurityTest window > Add SecurityScan > SQL Injection > Adds a parameter > choosing param1 from the list > etc
And when I running that tests I getting informations like that one:
But when looking on the request body in Message Viewer window, it seems I still sending default values, not SQL Injections:
And when I looking to my server logs I really getting standard requests.
So, the question is: why SoapUI doesn't overwrites this parameters? Bug on your side, or I do something wrong? Maybe because you not support natively JSON in requests and I must create request circuitous way?
Thank you for any help,
Regards!
I have REST request with few parameters, POST method, service accept only JSON content, so I changed Media Type to application/json and put values to the request body by this way:
{
"param1" : "${param1}"
"param2" : "${param2}"
}
Everything works fine (functional tests), but...
...when I trying add security tests: I choose my request in SecurityTest window > Add SecurityScan > SQL Injection > Adds a parameter > choosing param1 from the list > etc
And when I running that tests I getting informations like that one:
[SQL Injection] Request 1 - OK - [param1=' or '1'='1]: took 17 ms
But when looking on the request body in Message Viewer window, it seems I still sending default values, not SQL Injections:
{
"param1" : "value1"
"param2" : "value2"
}
And when I looking to my server logs I really getting standard requests.
So, the question is: why SoapUI doesn't overwrites this parameters? Bug on your side, or I do something wrong? Maybe because you not support natively JSON in requests and I must create request circuitous way?
Thank you for any help,
Regards!
9 REPLIES 9
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2013
07:41 AM
08-19-2013
07:41 AM
Have you noticed request, responses in soapui log files? Are you sure that always sending the default values?
Regards,
Rao.
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2013
08:13 AM
08-19-2013
08:13 AM
Yes, I'm sure, I checked it directly in server logs.
When I do the same for more "static" properties (directly placed in request body, like authorization header) everything works fine (they are replaced by SQL Injection strings), problem occurs only for parameters that I put in the request by editor under the table of parameters.
When I do the same for more "static" properties (directly placed in request body, like authorization header) everything works fine (they are replaced by SQL Injection strings), problem occurs only for parameters that I put in the request by editor under the table of parameters.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2013
11:06 AM
08-19-2013
11:06 AM
Ok about the server logs.
You might notice that i was referring to soapui logs. Also is it possible to check the Raw request it is sending?
Is it possible to show the screen shot how parameter values are being set for the test?
Regards,
Rao.
You might notice that i was referring to soapui logs. Also is it possible to check the Raw request it is sending?
Is it possible to show the screen shot how parameter values are being set for the test?
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2013
11:31 PM
08-19-2013
11:31 PM
Ok, here you can see how I set parameter values:
Here is my SecurityScan configuration:
Screen from Security log after running tests:
And Raw request, as you can see "exter*" property still have default value:
And quick look on Properties > SecurityChangedParameters - he think he do everything right:
Here is my SecurityScan configuration:
Screen from Security log after running tests:
And Raw request, as you can see "exter*" property still have default value:
And quick look on Properties > SecurityChangedParameters - he think he do everything right:
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2013
11:36 PM
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2014
06:09 AM
06-30-2014
06:09 AM
Is this probelm got resolved??? even i am facing same issue?? Please respond asap?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2014
06:43 AM
06-30-2014
06:43 AM
what is the outcome of this post??? i am also facing same problem???
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2016
04:23 AM
04-21-2016
04:23 AM
Any Update on this? Facing similar problem with ReadyAPI 1.5 version
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2017
04:48 AM
05-07-2017
04:48 AM
Any update for this??
