SQL Injection Scan

About

The SQL Injection scan checks how your service handles incorrect or malicious SQL statements.

Typically, attackers try to use SQL injections in order to expose flaws in the web service security or obtain sensitive data. The SQL Injection scan simulates such requests, ensuring your server does not reveal any information that may be useful for further attacks.

If the scan does not reveal any information about possible vulnerabilities, it passes successfully.

If the scan has Failed, that may indicate your service is vulnerable to SQL attacks or cannot handle the authorization routines correctly.

Requirements

This scan is applicable to all types of test steps or requests.

How it works

The SQL Injection scan tries to attack the web service by replacing the original parameters of a test step with a malicious string, which exposes potential flaws in that service. The scan injects potentially harmful values to both XML elements and JSON fields.

This scan uses assertions to validate each response and check if it includes any information about potential vulnerabilities.

If a response passes all assertions, PASS will be logged for that response. If any assertion fails, FAIL will be logged.

Important

If you have not applied any assertions to the scan, Unknown will be logged for the response.

Assertions

  • Default Assertion

    Sensitive Information Exposure – Verifies that your server does not reveal any information that is useful for attacks (such as stack traces if the server crashes).

  • Recommended Assertion

    Valid HTTP Status Codes – Verifies that the request does not return a 5xx status code (a server error).

Parameters

The SQL Injection scan inserts values into the message parameters of your SOAP or REST requests.

ReadyAPI: Configuring the SQL Injection scan

Normally, parameters are extracted automatically when you create the scan. If there are no parameters present, ReadyAPI will not run the SQL Injection scan. See Parameters for more information.

Use the following options to configure the scan Strategy:

Option

Description

Select Strategy

One by One – Select to use requests one by one (may take some time).

All At Once – Select to use all requests at once.

Request Delay (ms)

Set a pause between requests during the scan in milliseconds.

Apply to Failed Test Steps

Select to run the scan even if the target test step fails.

Run only once

Select to run the scan only once for each test step, even if ReadyAPI runs that step several times for a test case.

On the Advanced panel, define values which the scan will insert into parameters.

ReadyAPI: SQL Injection scan advanced options

To...

Do the following...

Add one or more strings

Click add.pngand enter a list of strings in the Import Strings dialog. Click OK.

Each line will appear as a separate string.

Replace all strings

Click add.pngand enter a new list of strings in the Import Strings dialog.

Select Remove existing injection strings and click OK.

Each line will appear as a separate string and all previous strings will be removed.

Edit a string

Select the line you want to edit and click edit.png. Specify the new value and click OK.

Delete a string

Select the line you want to delete and click remove.png. Confirm your choice.

See Also

Publication date: