This projects will extract information about the dynamic callgraph logged by logcat during the execution of DroidXP benchmark.
To run this project, you just need to execute the following command:
python3 main.py > output.json
The program will output the file output.json
with the result of the extraction.
The log file provided by logcat must be stored at input/
folder. You should provide the execution log for the two versions of the app: benign and malign.
Besides, you should provide the names of the log files in the apps.csv
file in the following format:
<app_identifier>,<benign_logcat>,<malign_logcat>
This program will output a JSON file containing the following information:
- App
identifier
:benign
: The name of the log file of the benign version of the appmalign
: The name of the log file of the malign version of the appbenignGraphs
: The benign's sub-callgraphs filtered that containing the all traces that access a sensitive methodsmalignGraphs
: The malign's sub-callgraphs filtered that containing the all traces that access a sensitive methodsmethodsAccessedOnlyByMalign
: The sensitive methods accessed only the malign version of the app. This information is important to identify if malign version breaks the sandboxbenignGraphContainsMalignGraph
: Comparison between benign and malign's sub-callgraphshasDifferentTraces
: information about malign and benign has different traces
The file output.example.json contains an example of output.
We created the script generate-apps-csv.py
to help to generate the apps.csv
. Just add the files inside input/
folder and execute the following command:
python3 generate-apps-csv.py
We create the script generate-distances-csv.py
to help to generate a csv file with the relation between distances between entrypoints and sensitive methods based on the output.json file, which generated by the command shown on How to execute section. To use this script, just execute the following command:
python3 generate-distances-csv.py output.json
A output.csv
file will be created.