mirror of
https://github.com/MobSF/Mobile-Security-Framework-MobSF.git
synced 2026-10-12 02:06:59 +00:00
HOTFIX: Bugfixes (#1618)
* Fixes #1595 #1582 * update version * version bump * Fix install verification bug for dynamic analysis Fix install verification bug for dynamic analysis in Android 6.0
This commit is contained in:
@@ -96,18 +96,23 @@ class Environment:
|
||||
return False
|
||||
return True
|
||||
|
||||
def is_package_installed(self, package):
|
||||
def is_package_installed(self, package, extra):
|
||||
"""Check if package is installed."""
|
||||
success = '\nSuccess' in extra
|
||||
out = self.adb_command(['pm', 'list', 'packages'], True)
|
||||
pkg = f'{package}'.encode('utf-8')
|
||||
if pkg + b'\n' in out or pkg + b'\r\n' in out:
|
||||
# Windows uses \r\n
|
||||
pkg_fmts = [pkg + b'\n', pkg + b'\r\n', pkg + b'\r\r\n']
|
||||
if any(pkg in out for pkg in pkg_fmts):
|
||||
# Windows uses \r\n and \r\r\n
|
||||
return True
|
||||
if success:
|
||||
# Fallback check
|
||||
return True
|
||||
return False
|
||||
|
||||
def install_apk(self, apk_path, package):
|
||||
"""Install APK and Verify Installation."""
|
||||
if self.is_package_installed(package):
|
||||
if self.is_package_installed(package, ''):
|
||||
logger.info('Removing existing installation')
|
||||
# Remove existing installation'
|
||||
self.adb_command(['uninstall', package], False, True)
|
||||
@@ -131,7 +136,7 @@ class Environment:
|
||||
return False, 'adb install failed'
|
||||
out = out.decode('utf-8', 'ignore')
|
||||
# Verify Installation
|
||||
return self.is_package_installed(package), out
|
||||
return self.is_package_installed(package, out), out
|
||||
|
||||
def adb_command(self, cmd_list, shell=False, silent=False):
|
||||
"""ADB Command wrapper."""
|
||||
|
||||
+6
-6
@@ -21,14 +21,14 @@ logger = logging.getLogger(__name__)
|
||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
||||
MOBSF_VER = 'v3.1.9 Beta'
|
||||
MOBSF_VER = 'v3.2.0 Beta'
|
||||
|
||||
BANNER = """
|
||||
__ __ _ ____ _____ _____ _
|
||||
| \/ | ___ | |__/ ___|| ___|_ _|___ / / |
|
||||
| |\/| |/ _ \| '_ \___ \| |_ \ \ / / |_ \ | |
|
||||
| | | | (_) | |_) |__) | _| \ V / ___) || |
|
||||
|_| |_|\___/|_.__/____/|_| \_/ |____(_)_|
|
||||
__ __ _ ____ _____ _____ ____
|
||||
| \/ | ___ | |__/ ___|| ___| |___ / |___ \
|
||||
| |\/| |/ _ \| '_ \___ \| |_ |_ \ __) |
|
||||
| | | | (_) | |_) |__) | _| ___) | / __/
|
||||
|_| |_|\___/|_.__/____/|_| |____(_)_____|
|
||||
""" # noqa: W291
|
||||
# ASCII Font: Standard
|
||||
# ==============================================
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Mobile Security Framework (MobSF)
|
||||
Version: v3.1 beta
|
||||
Version: v3.2 beta
|
||||

|
||||
|
||||
Mobile Security Framework (MobSF) is an automated, all-in-one mobile application (Android/iOS/Windows) pen-testing, malware analysis and security assessment framework capable of performing static and dynamic analysis. MobSF support mobile app binaries (APK, IPA & APPX) along with zipped source code and provides REST APIs for seamless integration with your CI/CD or DevSecOps pipeline.The Dynamic Analyzer helps you to perform runtime security assessment and interactive instrumented testing.
|
||||
|
||||
@@ -157,12 +157,14 @@ class Checksec:
|
||||
'set RUNPATH is if it is linked to private shared '
|
||||
'libraries in the same package. Remove the compiler '
|
||||
'option --enable-new-dtags,-rpath to remove RUNPATH.')
|
||||
rnp = runpath.runpath
|
||||
else:
|
||||
severity = 'info'
|
||||
desc = (
|
||||
'The shared object does not have RUNPATH set.')
|
||||
rnp = runpath
|
||||
elf_dict['runpath'] = {
|
||||
'runpath': runpath,
|
||||
'runpath': rnp,
|
||||
'severity': severity,
|
||||
'description': desc,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user