Skip to content

Commit 76122f7

Browse files
committed
ascanrules: SQLi Hypersonic rename scan rule (all timing based)
Signed-off-by: kingthorin <[email protected]>
1 parent 8afbdb0 commit 76122f7

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

addOns/ascanrules/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
77
### Changed
88
- Maintenance changes.
99
- Depends on an updated version of the Common Library add-on.
10+
- The SQL Injection - Hypersonic scan rule and alerts have been renamed to clarify that they're time based (Issue 7341).
1011

1112
### Added
1213
- Rules (as applicable) have been tagged in relation to HIPAA and PCI DSS.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/**
4747
* TODO: maybe implement a more specific UNION based check for Hypersonic (with table names)
4848
*
49-
* <p>The SqlInjectionHypersonicScanRule identifies Hypersonic specific SQL Injection
49+
* <p>The SqlInjectionHypersonicTimingScanRule identifies Hypersonic specific SQL Injection
5050
* vulnerabilities using Hypersonic specific syntax. If it doesn't use Hypersonic specific syntax,
5151
* it belongs in the generic SQLInjection class! Note the ordering of checks, for efficiency is : 1)
5252
* Error based (N/A) 2) Boolean Based (N/A - uses standard syntax) 3) UNION based (TODO) 4) Stacked
@@ -68,7 +68,7 @@
6868
*
6969
* @author 70pointer
7070
*/
71-
public class SqlInjectionHypersonicScanRule extends AbstractAppParamPlugin
71+
public class SqlInjectionHypersonicTimingScanRule extends AbstractAppParamPlugin
7272
implements CommonActiveScanRuleInfo {
7373

7474
/** Hypersonic one-line comment */
@@ -212,7 +212,8 @@ public class SqlInjectionHypersonicScanRule extends AbstractAppParamPlugin
212212
}
213213

214214
/** for logging. */
215-
private static final Logger LOGGER = LogManager.getLogger(SqlInjectionHypersonicScanRule.class);
215+
private static final Logger LOGGER =
216+
LogManager.getLogger(SqlInjectionHypersonicTimingScanRule.class);
216217

217218
/** The number of seconds used in time-based attacks (i.e. sleep commands). */
218219
private int timeSleepSeconds = DEFAULT_SLEEP_TIME;

addOns/ascanrules/src/main/javahelp/org/zaproxy/zap/extension/ascanrules/resources/help/contents/ascanrules.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ <H2 id="id-40020">SQL Injection - Hypersonic (Time Based)</H2>
361361
<br>
362362
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.
363363
<p>
364-
Latest code: <a href="https://github.com/zaproxy/zap-extensions/blob/main/addOns/ascanrules/src/main/java/org/zaproxy/zap/extension/ascanrules/SqlInjectionHypersonicScanRule.java">SqlInjectionHypersonicScanRule.java</a>
364+
Latest code: <a href="https://github.com/zaproxy/zap-extensions/blob/main/addOns/ascanrules/src/main/java/org/zaproxy/zap/extension/ascanrules/SqlInjectionHypersonicTimingScanRule.java">SqlInjectionHypersonicScanRule.java</a>
365365
<br>
366366
Alert ID: <a href="https://www.zaproxy.org/docs/alerts/40020/">40020</a>.
367367

addOns/ascanrules/src/main/resources/org/zaproxy/zap/extension/ascanrules/resources/Messages.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ ascanrules.sqlinjection.alert.unionbased.extrainfo = RDBMS [{0}] likely, given U
180180
ascanrules.sqlinjection.authbypass.desc = SQL injection may be possible on a login page, potentially allowing the application's authentication mechanism to be bypassed
181181
ascanrules.sqlinjection.authbypass.name = SQL Injection - Authentication Bypass
182182
ascanrules.sqlinjection.desc = SQL injection may be possible.
183-
ascanrules.sqlinjection.hypersonic.name = SQL Injection - Hypersonic SQL
183+
ascanrules.sqlinjection.hypersonic.name = SQL Injection - Hypersonic SQL (Time Based)
184184
ascanrules.sqlinjection.mssql.alert.timebased.extrainfo = The query time is controllable using parameter value [{0}], which caused the request to take [{1}] milliseconds, when the original unmodified query with value [{2}] took [{3}] milliseconds.
185185
ascanrules.sqlinjection.mssql.name = SQL Injection - MsSQL
186186
ascanrules.sqlinjection.mysql.name = SQL Injection - MySQL
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
import org.zaproxy.zap.model.TechSet;
3939
import org.zaproxy.zap.testutils.NanoServerHandler;
4040

41-
/** Unit test for {@link SqlInjectionHypersonicScanRule}. */
42-
class SqlInjectionHypersonicScanRuleUnitTest
43-
extends ActiveScannerTest<SqlInjectionHypersonicScanRule> {
41+
/** Unit test for {@link SqlInjectionHypersonicTimingScanRule}. */
42+
class SqlInjectionHypersonicTimingScanRuleUnitTest
43+
extends ActiveScannerTest<SqlInjectionHypersonicTimingScanRule> {
4444

4545
@Override
46-
protected SqlInjectionHypersonicScanRule createScanner() {
47-
return new SqlInjectionHypersonicScanRule();
46+
protected SqlInjectionHypersonicTimingScanRule createScanner() {
47+
return new SqlInjectionHypersonicTimingScanRule();
4848
}
4949

5050
@Test

0 commit comments

Comments
 (0)