Skip to content

Commit 782f4bc

Browse files
Fixing shared .qhelp issue (renaming to .qhelp.inc)& addressing a fix
1 parent 710ca21 commit 782f4bc

8 files changed

+10
-19
lines changed

csharp/ql/src/experimental/Security Features/campaign/Solorigate/ModifiedFnvFunctionDetection.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<p>This query detects FNV-like hash calculations where there is an additional XOR (with any static value) after the hash calculation loop.</p>
88
</overview>
99

10-
<include src="Solorigate.qhelp" />
10+
<include src="Solorigate.qhelp.inc" />
1111

1212
</qhelp>

csharp/ql/src/experimental/Security Features/campaign/Solorigate/NumberOfKnownCommandsAboveThreshold.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<p>By themselves, the names of these enumeration constants are not malicious, so the query only detects enumerations that includes at least 10 of the 18 Solorigate commands.</p>
88
</overview>
99

10-
<include src="Solorigate.qhelp" />
10+
<include src="Solorigate.qhelp.inc" />
1111

1212
</qhelp>

csharp/ql/src/experimental/Security Features/campaign/Solorigate/NumberOfKnownHashesAboveThreshold.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<p>Please notice that by themselves these literals are not malign, but several of the values together would be less likely to be coincidental.</p>
99
</overview>
1010

11-
<include src="Solorigate.qhelp" />
11+
<include src="Solorigate.qhelp.inc" />
1212

1313
</qhelp>

csharp/ql/src/experimental/Security Features/campaign/Solorigate/NumberOfKnownLiteralsAboveThreshold.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<p>Please notice that by themselves these literals are not malign.</p>
99
</overview>
1010

11-
<include src="Solorigate.qhelp" />
11+
<include src="Solorigate.qhelp.inc" />
1212

1313
</qhelp>

csharp/ql/src/experimental/Security Features/campaign/Solorigate/NumberOfKnownMethodNamesAboveThreshold.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<p>Please notice that by themselves these method names are not malign.</p>
99
</overview>
1010

11-
<include src="Solorigate.qhelp" />
11+
<include src="Solorigate.qhelp.inc" />
1212

1313
</qhelp>

csharp/ql/src/experimental/Security Features/campaign/Solorigate/SwallowEverythingExceptionHandler.qhelp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
<p>This query detects all generic exception empty catch blocks, but it is strongly suggested that the results for cs/catch-of-all-exceptions also be reviewed in the event that a malicious swallow everything exception handler was not empty</p>
88
</overview>
99

10-
<include src="Solorigate.qhelp" />
10+
<include src="Solorigate.qhelp.inc" />
1111

1212
</qhelp>

csharp/ql/src/experimental/code/csharp/Cryptography/NonCryptographicHashes.qll

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,10 @@ predicate isCallableAPotentialNonCryptographicHashFunction(Callable callable, Pa
7474
exists(Variable v, Expr op1, Expr op2, LoopStmt loop |
7575
maybeANonCryptogrphicHash(callable, v, op1, op2, loop) and
7676
callable.getAParameter() = param and
77-
(
78-
param.getAnAccess() = op1.(Operation).getAnOperand().getAChild*()
79-
or
80-
param.getAnAccess() = op2.(Operation).getAnOperand().getAChild*()
81-
or
82-
exists(Node source, Node sink |
83-
(
84-
sink.asExpr() = op1.(Operation).getAChild*() or
85-
sink.asExpr() = op2.(Operation).getAChild*()
86-
) and
87-
source.asExpr() = param.getAnAccess() and
88-
DataFlow::localFlow(source, sink)
89-
)
77+
exists(ParameterNode p, ExprNode n |
78+
p.getParameter() = param and
79+
localFlow(p, n) and
80+
n.getExpr() in [op1.(Operation).getAChild*(), op2.(Operation).getAChild*()]
9081
)
9182
)
9283
}

0 commit comments

Comments
 (0)