File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ id : use-of-rc4-java
2
+ language : java
3
+ severity : warning
4
+ message : >-
5
+ 'Use of RC4 was detected. RC4 is vulnerable to several attacks,
6
+ including stream cipher attacks and bit flipping attacks. Instead, use a
7
+ strong, secure cipher: Cipher.getInstance("AES/CBC/PKCS7PADDING"). See
8
+ https://owasp.org/www-community/Using_the_Java_Cryptographic_Extensions
9
+ for more information.'
10
+ note : >-
11
+ [CWE-327] Use of a Broken or Risky Cryptographic Algorithm
12
+ [REFERENCES]
13
+ - https://owasp.org/Top10/A02_2021-Cryptographic_Failures
14
+ - https://googleprojectzero.blogspot.com/2022/10/rc4-is-still-considered-harmful.html
15
+ rule :
16
+ pattern : $CIPHER.getInstance("RC4")
Original file line number Diff line number Diff line change
1
+ id : use-of-rc4-java
2
+ snapshots :
3
+ ? |
4
+ Cipher.getInstance("RC4");
5
+ : labels :
6
+ - source : Cipher.getInstance("RC4")
7
+ style : primary
8
+ start : 0
9
+ end : 25
10
+ ? |
11
+ useCipher(Cipher.getInstance("RC4"));
12
+ : labels :
13
+ - source : Cipher.getInstance("RC4")
14
+ style : primary
15
+ start : 10
16
+ end : 35
Original file line number Diff line number Diff line change
1
+ id : use-of-rc4-java
2
+ valid :
3
+ - |
4
+ Cipher.getInstance("AES/CBC/PKCS7PADDING");
5
+ invalid :
6
+ - |
7
+ Cipher.getInstance("RC4");
8
+ - |
9
+ useCipher(Cipher.getInstance("RC4"));
You can’t perform that action at this time.
0 commit comments