-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added a boomerang query to find the points to information of the call site parameters. For each of the array parameters, its constants are found by traversing through the jimple method body. - Added a headless test for SSLParameters.
- Loading branch information
Showing
5 changed files
with
189 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>SSLMisuseExample</groupId> | ||
<artifactId>SSLMisuseExample</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>SSLMisuseExample</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.8.0</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
43 changes: 43 additions & 0 deletions
43
CryptoAnalysisTargets/SSLMisuseExample/src/main/java/crypto/SSLExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package crypto; | ||
import java.security.NoSuchAlgorithmException; | ||
|
||
import javax.crypto.BadPaddingException; | ||
import javax.crypto.IllegalBlockSizeException; | ||
import javax.crypto.NoSuchPaddingException; | ||
import javax.net.ssl.SSLParameters; | ||
|
||
public class SSLExample { | ||
|
||
public void NoMisuse() throws NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { | ||
String[] paramOne = {"TLSv1.1", "TLSv1.2"}; | ||
String[] paramTwo = {"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"}; | ||
SSLParameters params = new SSLParameters(); | ||
params.setCipherSuites(paramTwo); | ||
params.setProtocols(paramOne); | ||
} | ||
|
||
public void MisuseOne() throws NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { | ||
String[] paramOne = {"IPv4", "TLSv1.2"}; | ||
String[] paramTwo = {"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"}; | ||
SSLParameters params = new SSLParameters(); | ||
params.setCipherSuites(paramTwo); | ||
params.setProtocols(paramOne); | ||
} | ||
|
||
public void MisuseTwo() throws NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { | ||
String[] paramOne = {"TLSv1.1", "TLSv1.2"}; | ||
String[] paramTwo = {"TLS_ECDHE_ECDSA_WITH_AES_256_SHA_SHA384"}; | ||
SSLParameters params = new SSLParameters(); | ||
params.setCipherSuites(paramTwo); | ||
params.setProtocols(paramOne); | ||
} | ||
|
||
public void MisuseThree() throws NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { | ||
String[] paramOne = {"TLSv2.1", "TLSv1.2"}; | ||
String[] paramTwo = {"TL_ECDHE_ECDSA_WITH_AES_256_SHA_SHA384"}; | ||
SSLParameters params = new SSLParameters(); | ||
params.setCipherSuites(paramTwo); | ||
params.setProtocols(paramOne); | ||
} | ||
|
||
} |