You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: addOns/ascanrules/src/main/java/org/zaproxy/zap/extension/ascanrules/SqlInjectionPostgreSqlTimingScanRule.java
+8-24Lines changed: 8 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -42,11 +42,11 @@
42
42
importorg.zaproxy.zap.model.TechSet;
43
43
44
44
/**
45
-
* The SqlInjectionPostgreScanRule identifies Postgresql specific SQL Injection vulnerabilities
46
-
* using Postgresql specific syntax. If it doesn't use Postgresql specific syntax, it belongs in the
47
-
* generic SQLInjection class! Note the ordering of checks, for efficiency is : 1) Error based (N/A)
48
-
* 2) Boolean Based (N/A - uses standard syntax) 3) UNION based (N/A - uses standard syntax) 4)
49
-
* Stacked (N/A - uses standard syntax) 5) Blind/Time Based (Yes)
45
+
* This scan rule identifies Postgresql specific SQL Injection vulnerabilities using Postgresql
46
+
* specific syntax. If it doesn't use Postgresql specific syntax, it belongs in the generic
47
+
* SQLInjection class! Note the ordering of checks, for efficiency is : 1) Error based (N/A) 2)
48
+
* Boolean Based (N/A - uses standard syntax) 3) UNION based (N/A - uses standard syntax) 4) Stacked
49
+
* (N/A - uses standard syntax) 5) Blind/Time Based (Yes)
50
50
*
51
51
* <p>See the following for some great specific tricks which could be integrated here
Copy file name to clipboardExpand all lines: addOns/ascanrules/src/main/javahelp/org/zaproxy/zap/extension/ascanrules/resources/help/contents/ascanrules.html
Post 2.5.0 you can change the length of time used for the attack by changing the <code>rules.common.sleep</code> parameter via the Options 'Rule configuration' panel.
ascanrules.sqlinjection.soln = Do not trust client side input, even if there is client side validation in place.\nIn general, type check all data on the server side.\nIf the application uses JDBC, use PreparedStatement or CallableStatement, with parameters passed by '?'\nIf the application uses ASP, use ADO Command Objects with strong type checking and parameterized queries.\nIf database Stored Procedures can be used, use them.\nDo *not* concatenate strings into queries in the stored procedure, or use 'exec', 'exec immediate', or equivalent functionality!\nDo not create dynamic SQL queries using simple string concatenation.\nEscape all data received from the client.\nApply an 'allow list' of allowed characters, or a 'deny list' of disallowed characters in user input.\nApply the principle of least privilege by using the least privileged database user possible.\nIn particular, avoid using the 'sa' or 'db-owner' database users. This does not eliminate SQL injection, but minimizes its impact.\nGrant the minimum database access that is necessary for the application.
192
192
ascanrules.sqlinjection.sqlite.alert.errorbased.extrainfo = The following known SQLite error message was provoked: [{0}].
Copy file name to clipboardExpand all lines: addOns/ascanrules/src/test/java/org/zaproxy/zap/extension/ascanrules/SqlInjectionPostgreSqlTimingScanRuleUnitTest.java
0 commit comments