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.apktoolTemp folder where the apktool has unpacked the app (contains the*.smali)apk.unzipTemp folder where the unzip has unpacked the app (contains the*.dex)apk.binaryBinDetails objectapk.extraExtra objectapk.issuesIssues objectapk.loggerWebLogger objectapk.permisPermissions objectapk.srccodeSourceCode objectapk.stringsStrings 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.directoryTemp folder where the unzip has unpacked the appipa.binaryBinDetails objectipa.extraExtra objectipa.issuesIssues objectipa.loggerWebLogger objectipa.permisPermissions objectipa.srccodeSourceCode objectipa.stringsStrings 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 theipaorapkobjectboolean_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.