The software is written in a way which allows you to add security tests as "plugins".
Each test has to be placed in the appropriate folder:
- Android:
/android/tests
- iOS:
/ios/tests
This is the template of a plugin for android
def run_tests(apk, pipes, utils, rzhelper, android_utils):
for rz in pipes:
pass
def name_test():
return "My Test Name"
The apk
python object contains the following data:
apk.apktool
Temp folder where the apktool has unpacked the app (contains the*.smali
)apk.unzip
Temp folder where the unzip has unpacked the app (contains the*.dex
)apk.binary
BinDetails objectapk.extra
Extra objectapk.issues
Issues objectapk.logger
WebLogger objectapk.permis
Permissions objectapk.srccode
SourceCode objectapk.strings
Strings object
This is the template of a plugin for android
## fufluns - Copyright 2019-2021 - deroad
def run_tests(ipa, pipe, utils, rzhelper):
pass
def name_test():
return "My Test Name"
The ipa
python object contains the following data:
ipa.directory
Temp folder where the unzip has unpacked the appipa.binary
BinDetails objectipa.extra
Extra objectipa.issues
Issues objectipa.logger
WebLogger objectipa.permis
Permissions objectipa.srccode
SourceCode objectipa.strings
Strings object
The easiest way to create a test is to use the method test
available in utils
.
utils.test(ipa_or_apk, boolean_value, detail, description, severity)
where:
ipa_or_apk
(object) is theipa
orapk
objectboolean_value
(bool) if the test has failed (i.e.False
) the detail, descr and severity will be added to the list of the security issues.detail
(string) shortly describes the security issuedescription
(string) is the full description of the issue.severity
(float) is the CVSS score of the vulnerability; you can use the CVSS calculator.