Moved Cpp into sub directory 'cryptography' instead of crypto. Added python models, inventory, and example alerts.

This commit is contained in:
Benjamin Rodes
2023-09-15 12:12:01 -04:00
committed by Josh Brown
parent 7560db66fa
commit 50db4fd63e
73 changed files with 2763 additions and 44 deletions

View File

@@ -1,5 +0,0 @@
import experimental.crypto.CryptoArtifact
import experimental.crypto.CryptoAlgorithmNames
import experimental.crypto.modules.OpenSSL as OpenSSL

View File

@@ -0,0 +1,5 @@
import experimental.cryptography.CryptoArtifact
import experimental.cryptography.CryptoAlgorithmNames
import experimental.cryptography.modules.OpenSSL as OpenSSL

View File

@@ -1,5 +1,5 @@
import cpp
private import experimental.crypto.CryptoAlgorithmNames
private import experimental.cryptography.CryptoAlgorithmNames
import semmle.code.cpp.ir.dataflow.TaintTracking

View File

@@ -1,11 +1,11 @@
import cpp
import experimental.crypto.CryptoAlgorithmNames
import experimental.crypto.CryptoArtifact
import experimental.crypto.utils.OpenSSL.CryptoFunction
import experimental.crypto.utils.OpenSSL.AlgorithmSink
import experimental.crypto.utils.OpenSSL.PassthroughFunction
import experimental.crypto.utils.OpenSSL.CryptoAlgorithm
import experimental.crypto.CryptoArtifact
import experimental.cryptography.CryptoAlgorithmNames
import experimental.cryptography.CryptoArtifact
import experimental.cryptography.utils.OpenSSL.CryptoFunction
import experimental.cryptography.utils.OpenSSL.AlgorithmSink
import experimental.cryptography.utils.OpenSSL.PassthroughFunction
import experimental.cryptography.utils.OpenSSL.CryptoAlgorithm
import experimental.cryptography.CryptoArtifact
// import semmle.code.cpp.ir.dataflow.TaintTracking
import semmle.code.cpp.ir.dataflow.DataFlow

View File

@@ -7,8 +7,8 @@
//TODO: enforce a hierarchy of AlgorithmSinkArgument, e.g., so I can get all Asymmetric SinkArguments that includes all the strictly RSA etc.
import cpp
import experimental.crypto.utils.OpenSSL.LibraryFunction
import experimental.crypto.CryptoAlgorithmNames
import experimental.cryptography.utils.OpenSSL.LibraryFunction
import experimental.cryptography.CryptoAlgorithmNames
predicate isAlgorithmSink(AlgorithmSinkArgument arg, string algType){
arg.algType() = algType

View File

@@ -1,5 +1,5 @@
import cpp
import experimental.crypto.CryptoAlgorithmNames
import experimental.cryptography.CryptoAlgorithmNames
predicate isValidAlgorithmLiteral(Literal e){
exists(getPossibleNidFromLiteral(e)) or e instanceof StringLiteral

View File

@@ -1,6 +1,6 @@
import cpp
import experimental.crypto.utils.OpenSSL.LibraryFunction
import experimental.crypto.CryptoAlgorithmNames
import experimental.cryptography.utils.OpenSSL.LibraryFunction
import experimental.cryptography.CryptoAlgorithmNames
predicate inferredOpenSSLCryptoFunctionCall(Call c , string normalized, string algType){
inferredOpenSSLCryptoFunction(c.getTarget(), normalized, algType)

View File

@@ -5,8 +5,8 @@
*/
import cpp
import experimental.crypto.CryptoAlgorithmNames
import experimental.crypto.utils.OpenSSL.CryptoFunction
import experimental.cryptography.CryptoAlgorithmNames
import experimental.cryptography.utils.OpenSSL.CryptoFunction
private string basicNormalizeFunctionName(Function f, string algType) {

View File

@@ -1,5 +1,5 @@
import cpp
import experimental.crypto.utils.OpenSSL.LibraryFunction
import experimental.cryptography.utils.OpenSSL.LibraryFunction
import semmle.code.cpp.ir.dataflow.DataFlow