Skip to content

Commit 0bcdb91

Browse files
committed
Improve qhelp for broken crypto algo queries
Previously it focussed too much on the risk of data being decrypted, and didn't explain why using weak algorithms is a problem in other contexts.
1 parent 2a1c9d8 commit 0bcdb91

File tree

6 files changed

+116
-38
lines changed

6 files changed

+116
-38
lines changed

cpp/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.qhelp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6-
<p>Using broken or weak cryptographic algorithms can leave data vulnerable to being decrypted.</p>
7-
8-
<p>Many cryptographic algorithms provided by cryptography libraries are known to be weak, or
9-
flawed. Using such an algorithm means that an attacker may be able to easily decrypt the encrypted
10-
data.</p>
6+
<p>Using broken or weak cryptographic algorithms may compromise security guarantees such as confidentiality, integrity, and authenticity.</p>
7+
8+
<p>Many cryptographic algorithms are known to be weak or flawed. The security guarantees of a system often rely on the underlying cryptography, so using a weak algorithm can have severe consequences. For example:
9+
</p>
10+
<ul>
11+
<li>If a weak encryption algorithm is used, an attacker may be able to decrypt sensitive data.</li>
12+
<li>If a weak hashing algorithm is used to protect data integrity, an attacker may be able to craft a malicious input that has the same hash as a benign one.</li>
13+
<li>If a weak algorithm is used for digital signatures, an attacker may be able to forge signatures and impersonate legitimate users.</li>
14+
</ul>
1115

1216
</overview>
1317
<recommendation>

java/ql/src/Security/CWE/CWE-327/BrokenCryptoAlgorithm.qhelp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6-
<p>Using broken or weak cryptographic algorithms can leave data vulnerable to being decrypted.</p>
7-
8-
<p>Many cryptographic algorithms provided by cryptography libraries are known to be weak, or
9-
flawed. Using such an algorithm means that an attacker may be able to easily decrypt the encrypted
10-
data.</p>
6+
<p>Using broken or weak cryptographic algorithms may compromise security guarantees such as confidentiality, integrity, and authenticity.</p>
7+
8+
<p>Many cryptographic algorithms are known to be weak or flawed. The security guarantees of a system often rely on the underlying cryptography, so using a weak algorithm can have severe consequences. For example:
9+
</p>
10+
<ul>
11+
<li>If a weak encryption algorithm is used, an attacker may be able to decrypt sensitive data.</li>
12+
<li>If a weak hashing algorithm is used to protect data integrity, an attacker may be able to craft a malicious input that has the same hash as a benign one.</li>
13+
<li>If a weak algorithm is used for digital signatures, an attacker may be able to forge signatures and impersonate legitimate users.</li>
14+
</ul>
1115

1216
</overview>
1317
<recommendation>

javascript/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.qhelp

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,34 @@
44
<qhelp>
55
<overview>
66
<p>
7-
Using broken or weak cryptographic algorithms can leave data
8-
vulnerable to being decrypted or forged by an attacker.
7+
Using broken or weak cryptographic algorithms may compromise
8+
security guarantees such as confidentiality, integrity, and
9+
authenticity.
910
</p>
1011

1112
<p>
12-
Many cryptographic algorithms provided by cryptography
13-
libraries are known to be weak, or flawed. Using such an
14-
algorithm means that encrypted or hashed data is less
15-
secure than it appears to be.
13+
Many cryptographic algorithms are known to be weak or flawed. The
14+
security guarantees of a system often rely on the underlying
15+
cryptography, so using a weak algorithm can have severe consequences.
16+
For example:
1617
</p>
1718

19+
<ul>
20+
<li>
21+
If a weak encryption algorithm is used, an attacker may be able to
22+
decrypt sensitive data.
23+
</li>
24+
<li>
25+
If a weak hashing algorithm is used to protect data integrity, an
26+
attacker may be able to craft a malicious input that has the same
27+
hash as a benign one.
28+
</li>
29+
<li>
30+
If a weak algorithm is used for digital signatures, an attacker may
31+
be able to forge signatures and impersonate legitimate users.
32+
</li>
33+
</ul>
34+
1835
</overview>
1936
<recommendation>
2037

python/ql/src/Security/CWE-327/BrokenCryptoAlgorithm.qhelp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,36 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6+
67
<p>
7-
Using broken or weak cryptographic algorithms can leave data
8-
vulnerable to being decrypted or forged by an attacker.
8+
Using broken or weak cryptographic algorithms may compromise
9+
security guarantees such as confidentiality, integrity, and
10+
authenticity.
911
</p>
1012

1113
<p>
12-
Many cryptographic algorithms provided by cryptography
13-
libraries are known to be weak, or flawed. Using such an
14-
algorithm means that encrypted or hashed data is less
15-
secure than it appears to be.
14+
Many cryptographic algorithms are known to be weak or flawed. The
15+
security guarantees of a system often rely on the underlying
16+
cryptography, so using a weak algorithm can have severe consequences.
17+
For example:
1618
</p>
1719

20+
<ul>
21+
<li>
22+
If a weak encryption algorithm is used, an attacker may be able to
23+
decrypt sensitive data.
24+
</li>
25+
<li>
26+
If a weak hashing algorithm is used to protect data integrity, an
27+
attacker may be able to craft a malicious input that has the same
28+
hash as a benign one.
29+
</li>
30+
<li>
31+
If a weak algorithm is used for digital signatures, an attacker may
32+
be able to forge signatures and impersonate legitimate users.
33+
</li>
34+
</ul>
35+
1836
<p>
1937
This query alerts on any use of a weak cryptographic algorithm that is
2038
not a hashing algorithm. Use of broken or weak cryptographic hash

ruby/ql/src/queries/security/cwe-327/BrokenCryptoAlgorithm.qhelp

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,33 @@
44
<qhelp>
55
<overview>
66
<p>
7-
Using broken or weak cryptographic algorithms can leave data
8-
vulnerable to being decrypted or forged by an attacker.
7+
Using broken or weak cryptographic algorithms may compromise
8+
security guarantees such as confidentiality, integrity, and
9+
authenticity.
910
</p>
11+
1012
<p>
11-
Many cryptographic algorithms provided by cryptography
12-
libraries are known to be weak, or flawed. Using such an
13-
algorithm means that encrypted or hashed data is less
14-
secure than it appears to be.
13+
Many cryptographic algorithms are known to be weak or flawed. The
14+
security guarantees of a system often rely on the underlying
15+
cryptography, so using a weak algorithm can have severe consequences.
16+
For example:
1517
</p>
18+
19+
<ul>
20+
<li>
21+
If a weak encryption algorithm is used, an attacker may be able to
22+
decrypt sensitive data.
23+
</li>
24+
<li>
25+
If a weak hashing algorithm is used to protect data integrity, an
26+
attacker may be able to craft a malicious input that has the same
27+
hash as a benign one.
28+
</li>
29+
<li>
30+
If a weak algorithm is used for digital signatures, an attacker may
31+
be able to forge signatures and impersonate legitimate users.
32+
</li>
33+
</ul>
1634
<p>
1735
This query alerts on any use of a weak cryptographic algorithm that is
1836
not a hashing algorithm. Use of broken or weak cryptographic hash

rust/ql/src/queries/security/CWE-327/BrokenCryptoAlgorithm.qhelp

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,34 @@
33
"qhelp.dtd">
44
<qhelp>
55
<overview>
6-
<p>
7-
Using broken or weak cryptographic algorithms can leave data
8-
vulnerable to being decrypted or forged by an attacker.
9-
</p>
6+
<p>
7+
Using broken or weak cryptographic algorithms may compromise
8+
security guarantees such as confidentiality, integrity, and
9+
authenticity.
10+
</p>
1011

11-
<p>
12-
Many cryptographic algorithms provided by cryptography
13-
libraries are known to be weak, or flawed. Using such an
14-
algorithm means that encrypted or hashed data is less
15-
secure than it appears to be.
16-
</p>
12+
<p>
13+
Many cryptographic algorithms are known to be weak or flawed. The
14+
security guarantees of a system often rely on the underlying
15+
cryptography, so using a weak algorithm can have severe consequences.
16+
For example:
17+
</p>
18+
19+
<ul>
20+
<li>
21+
If a weak encryption algorithm is used, an attacker may be able to
22+
decrypt sensitive data.
23+
</li>
24+
<li>
25+
If a weak hashing algorithm is used to protect data integrity, an
26+
attacker may be able to craft a malicious input that has the same
27+
hash as a benign one.
28+
</li>
29+
<li>
30+
If a weak algorithm is used for digital signatures, an attacker may
31+
be able to forge signatures and impersonate legitimate users.
32+
</li>
33+
</ul>
1734

1835
<p>
1936
This query alerts on any use of a weak cryptographic algorithm that is

0 commit comments

Comments
 (0)