add flowdroid tests

This commit is contained in:
Jean-Marie Mineau 2025-02-07 14:37:54 +01:00
parent 0b92b87bbe
commit 9b4eccfc70
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
6 changed files with 24 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
demo_env.sh

1
frida/.gitignore vendored
View file

@ -1,3 +1,4 @@
__pycache__ __pycache__
dist
theseus_frida/StackConsumer.dex.b64 theseus_frida/StackConsumer.dex.b64
consumer/build consumer/build

View file

@ -21,3 +21,8 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts] [tool.poetry.scripts]
collect-reflection-data = 'theseus_frida.__init__:main' collect-reflection-data = 'theseus_frida.__init__:main'
[tool.poetry]
include = [
{ path = "theseus_frida/hook.js", format = ["sdist", "wheel"] },
{ path = "theseus_frida/StackConsumer.dex.b64", format = ["sdist", "wheel"] }
]

View file

@ -0,0 +1,3 @@
<com.example.theseus.Utils: java.lang.String source()> -> _SOURCE_
<com.example.theseus.Utils: java.lang.String source(java.lang.String)> -> _SOURCE_
<com.example.theseus.Utils: void sink(android.app.Activity,java.lang.String)> -> _SINK_

View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
SDK_TOOLS="${HOME}/Android/Sdk/"
VERSION='34.0.0'
VERSION_B=$(echo "${VERSION}" | sed 's/\..*//')
ANDROID_JAR="${SDK_TOOLS}/platforms/android-${VERSION_B}/android.jar"
FOLDER=$(dirname "$(realpath $0)")
FLOWDROID="${FOLDER}/soot-infoflow-cmd-jar-with-dependencies.jar"
SOURCE_SINK="${FOLDER}/source_sink.txt"
JAVA='/usr/lib/jvm/java-17-openjdk/bin/java'
"${JAVA}" -jar "${FLOWDROID}" -a "${1}" -p "${ANDROID_JAR}" -s "${SOURCE_SINK}"