Android Module¶
This section shows the docs for all the methods that are available inthe GlorifiedAndroid class. This class extends various other others. Refer to those for complete documentation.
GlorifiedAndroid class¶
-
class
glorifiedgrep.
GlorifiedAndroid
(apk_path: str = None, output_dir: str = None, project_dir: str = None, rg_path: str = 'rg', jadx_path: str = 'jadx', clean_dir: bool = False)¶ Main class that is instantiated when using GlorifiedAndroid.
-
__init__
(apk_path: str = None, output_dir: str = None, project_dir: str = None, rg_path: str = 'rg', jadx_path: str = 'jadx', clean_dir: bool = False)¶ The init method for the whole GlorifiedAndroid module. This is interted throughout
Parameters: - apk_path (str) – Path to the APK
- output_dir (str) – Output dir for decompilation and unzipping, defaults to /tmp/glorified_android
- project_dir (str) – Project directory used for already decompiled and processed apks, defaults to None
- rg_path (str) – path to ripgrep. Defaults to looking for it in path
- jadx_path (str) – path to jadx. Defaults to looking for it in path
- clean_dir (bool) – delete the output directory before processing
Raises: - NotValidPythonVersion – Raises if python version 3 is not used
- DifferentAPKExists – Raises if decompiled APK is different than what is already decompiled
- DependentBinaryMissing – Raises if ripgrep, or jadx is not found
>>> # The default output directory is temp/GlorifiedAndroid folder. This can be >>> # overriden using output_dir='some/path' >>> a = GlorifiedAndroid('/path/to/apk', output_dir='/out/dir')
Typically, the prefix for the file path is removed when processing filepaths in the various code analysis classes. This can be adjusted using
>>> a.remove_dir_prefix = ''
If ripgrep or jadx is not in path, analysis will not be complete. To pass a user defined path for either jadx or rg, the GlorifiedAndroid class can be instantiated as follows.
>>> a = GlorifiedAndroid('/path/to/apk', jadx_path='path/to/jadx', rg_path='/path/to/rg')
-
all_cert_analysis
()¶ Property runs all available checks in _CertAnalysis
Returns: Dictionary of all cert analysis Return type: dict >>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.all_manifest_analysis()
-
all_file_analysis
()¶ Property runs all available checks in _FileAnalysis
Returns: Dictionary of all analysis Return type: dict >>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.all_file_analysis()
-
all_manifest_analysis
() → dict¶ Property runs all available checks in _ManifestAnalysis
Returns: Dictionary of all analysis Return type: dict
-
all_other_analysis
()¶ Property runs all available checks in _OtherAnalysis
Returns: Dictionary of all other analysis Return type: dict >>> a = GlorifiedAndroid('/path/to/apk') >>> a.all_other_analysis()
-
all_owasp_analysis
()¶ Property runs all available checks in _OwaspMasvs
Returns: Dictionary of all other analysis Return type: dict >>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.all_owasp_analysis()
-
cert_bits
() → int¶ Certificate bit
Returns: Certificate bits Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_bits()
-
cert_certificate
() → glorifiedgrep.out.GreppedOut¶ Returns a PEM encoded certificate
Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_certificate()
-
cert_digest
() → dict¶ Returns the digest hash in md5. sha1 and sha256
Returns: Dictionary of hashes Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_digest()
-
cert_issuer
() → glorifiedgrep.out.GreppedOut¶ The entity that verified the information and signed the certificate
Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_issuer()
-
cert_public_key
() → glorifiedgrep.out.GreppedOut¶ Get the public key from CERT.RSA
Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_public_key()
-
cert_serial_number
() → int¶ Used to uniquely identify the certificate within a CA’s systems. In particular this is used to track revocation information
Returns: Certificate serial number Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_serial_number()
-
cert_signature_algorithm
() → str¶ The algorithm used to sign the public key certificate
Returns: Algorithm used to create the certificate Return type: str Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_signature_algorithm()
-
cert_subject
() → list¶ The entity a certificate belongs to: a machine, an individual, or an organization.
Returns: Dict of certificate subjects CN, O, C, ST, L, OU, Cn Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_subject()
-
cert_valid_dates
() → dict¶ The that the certificate is valid before, after and if expired
Returns: Dict of dates and if exipred Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_valid_dates()
-
cert_version
() → int¶ The certificate version number
Returns: Version number of the certificate Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.cert_version()
-
code_accessibility_service
(show_code: bool = False) → GreppedOut¶ Identifies if the application uses AccessibilityService and its various classes. It also looks for the accessibilityEvent method. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_accessibility_service()
-
code_add_javascriptinterface
(show_code: bool = False) → GreppedOut¶ Leads to vulnerabilities in android version jellybean and below | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_add_javascriptinterface()
-
code_android_contacts_content_provider
(show_code: bool = False) → GreppedOut¶ Idicates imports, or any other place where the ContactsContract class and its providors are being used. This typically indicates that the app can read various contact information from the phones contact list. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_android_contacts_content_provider()
-
code_apache_http_get_request
(show_code: bool = False) → GreppedOut¶ Detects the HttpGet method from the apache library. This is generally used to make GET requests. | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_apache_http_get_request()
-
code_apache_http_other_request_methods
(show_code: bool = False) → GreppedOut¶ Detects the HttpPut, HttpDelete, HttpHead, HttpTrace and HttpOptions methods from the apache library. | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_apache_http_post_request()
-
code_apache_http_post_request
(show_code: bool = False) → GreppedOut¶ Detects the HttpPost method from the apache library. This is generally used to make GET requests. | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_apache_http_post_request()
-
code_api_builder
(show_code: bool = False) → GreppedOut¶ This method makes a best effort to detect api string builders within the decompiled Java code.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_api_builder()
-
code_apk_files
(show_code: bool = False) → GreppedOut¶ This method will identify if calls to apk files are hardcoded.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_apk_files()
-
code_aws_query
(show_code: bool = False) → GreppedOut¶ This method will identify where AWS queries are being made. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_aws_query()
-
code_base64_decode
(show_code: bool = False) → GreppedOut¶ This method will identify base64 decode operations.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_base64_decode()
-
code_base64_encode
(show_code: bool = False) → GreppedOut¶ This method will identify base64 encode operations.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_base64_encode()
-
code_boot_completed_persistance
(show_code: bool = False) → GreppedOut¶ Identifies if the application uses BOOT_COMPLETED action which is typically used to start a service or a receiver on reboot. This indicates persistance. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_boot_completed_persistance()
-
code_broadcast_messages
(show_code: bool = False) → GreppedOut¶ This method will identify what broadcast messages are being sent in the decompiled code. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_broadcast_messages()
-
code_broadcast_send
(show_code: bool = False) → GreppedOut¶ This method will identify code that indicates broadcast messages being sent.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_broadcast_send()
-
code_browser_db_access
(show_code: bool = False) → GreppedOut¶ Identifies code that accesses the browser db. This db usually includes browsing history. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_browser_db_access()
-
code_byte_constants
(show_code: bool = False) → GreppedOut¶ This method will create a dictionary of hardcoded byte constants.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_byte_constants()
-
code_call_log
(show_code: bool = False) → GreppedOut¶ Identifies code that retreives call logs. May be possible malware behaviour. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_call_log()
-
code_camera_access
(show_code: bool = False) → GreppedOut¶ Identifies code that accesses the camera and picture taking functionality. | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_camera_access()
-
code_cipher_instance
(show_code: bool = False) → GreppedOut¶ Find all instances of Cipher.getInstance in the decompiled source. class provides the functionality of a cryptographic cipher for encryption and decryption. It forms the core of the Java Cryptographic Extension (JCE) framework. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_cipher_instance()
-
code_class_extends
(show_code: bool = False) → GreppedOut¶ This method looks for any classes that are extending another class.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_class_extends()
-
code_class_init
(class_name: str, show_code: bool = False) → glorifiedgrep.out.GreppedOut¶ This method will first identify import statemants from the provided
class_name
and then look for all new instances ofnew class_name
.class_name
can either be a class like Date, or a package name like java.utils.DateParameters: - class_name (str) – A valid class name. Can be either name; i.e. Date, or package name i.e java.utils.Date.
- show_code (bool, optional) – Show the full matched line, by default False, by default False
Returns: GreppedOut object
Return type: Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_class_init()
-
code_clipboard_manager
(show_code: bool = False) → GreppedOut¶ This method will identify where valies are being set or read from the clipboard. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_clipboard_manager()
-
code_command_exec
(show_code: bool = False) → GreppedOut¶ Find all commands executed in shell using /bin/sh or .exec() in the decompiled source
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_command_exec()
This method will identify where cookies are being set. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_cookies()
-
code_create_new_file
(show_code: bool = False) → GreppedOut¶ Identifies code that creates new files in the android system. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_create_new_file()
-
code_create_sockets
(show_code: bool = False) → GreppedOut¶ An InetSocketAddress is a special SocketAddress designed to represent the standard TCP Protocol address, so it thus has methods to set/query the host name, IP address, and Socket of the remote side of the connection (or, in fact the local side too) | Reference Android SDK | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_create_sockets()
-
code_create_tempfile
(show_code: bool = False) → GreppedOut¶ Find all code which is using Java createTempFile | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_create_tempfile()
-
code_database_interaction
(show_code: bool = False) → GreppedOut¶ Identifies code that is reading database files. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_database_interaction()
-
code_database_query
(show_code: bool = False) → GreppedOut¶ Identifies code that queries any database on the device. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_database_query()
-
code_debuggable_check
(show_code: bool = False) → GreppedOut¶ This method looks for code what will check if the app is debuggable at run time. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_debuggable_check()
-
code_debugger_check
(show_code: bool = False) → GreppedOut¶ This method looks for usage of isDebuggerConnected in the decompiled code. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_debugger_check()
-
code_deserialization
(show_code: bool = False) → GreppedOut¶ ObjectInputSteam when used with ‘readObject’ ‘readObjectNodData’ ‘readResolve’ ‘readExternal’ will likely result in a Deserialization vulnerability | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_deserialization()
-
code_device_id
(show_code: bool = False) → GreppedOut¶ This method will identify where device id is being obtained. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_device_id()
-
code_device_serial_number
(show_code: bool = False) → GreppedOut¶ This method looks for Build.SERIAL which can sometimes be used in addition with other things to build unique tokens. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_device_serial_number()
-
code_download_manager
(show_code: bool = False) → GreppedOut¶ Identifies if the application uses the DownloadManager class to download files from onlines services. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_download_manager()
-
code_dynamic_dexclassloader
(show_code: bool = False) → GreppedOut¶ Find all instances of DexClassLoader in the decompiled source. This can be used to execute code not installed as part of an application. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_dynamic_dexclassloader()
-
code_dynamic_other_classloader
(show_code: bool = False) → GreppedOut¶ Find all instances of BaseDexClassLoader, SecureClassLoader, DelegateLastClassLoader, DexClassLoader, InMemoryDexClassLoader, PathClassLoader, URLClassLoader, Classloader in the decompiled source. This can be used to execute code not installed as part of an application. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_dynamic_other_classloader()
-
code_exif_data
(show_code: bool = False) → glorifiedgrep.out.GreppedOut¶ Detects if the ExifInterface class is imported and then instantiated. This class is typically used to either set or get meta data from images | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_exif_data()
-
code_external_file_access
(show_code: bool = False) → GreppedOut¶ This method will identify where external files are being used. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_external_file_access()
-
code_file_observer
(show_code: bool = False) → GreppedOut¶ Find all instances of the FileObserver class being used. This class is used to check for file access or change and fire and event. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_file_observer()
-
code_file_read
(show_code: bool = False) → GreppedOut¶ This method looks for FileInputStream within the decompiled Java code which would indicate which files the app is reading. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_file_read()
-
code_file_write
(show_code: bool = False) → GreppedOut¶ This method looks for getByes() method which can indicate files being written by the app. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_write_file()
-
code_find_intents
(show_code: bool = False) → GreppedOut¶ This method will identify intent builders.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_find_intents()
-
code_firebase_imports
(show_code: bool = False) → GreppedOut¶ Identifies if he MediaStore class or some of its common subclasses are being used by the app. These classes are used to get media file metadata from both internal and external storage. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_firebase_imports()
-
code_get_environment_var
(show_code: bool = False) → GreppedOut¶ This method looks for usage of getenv in the decompiled code. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_get_environment_var()
-
code_google_api_keys
(show_code: bool = False) → GreppedOut¶ Searches for Firebase or Google services API keys. It is likely that an app that uses Firebase will have keys in their sources, but these keys should be checked for what kind of access they allow.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_google_api_keys()
-
code_gps_location
(show_code: bool = False) → GreppedOut¶ This method will identify where GPS locations are being used.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_gps_location()
-
code_hashing_algorithms
(show_code: bool = False) → GreppedOut¶ This method will identify hashing algorithms being used.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_hashing_algorithms()
-
code_hashing_custom
(show_code: bool = False) → GreppedOut¶ This method will identify custom hashing algorithms being used. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_hashing_custom()
-
code_http_request_methods
(show_code: bool = False) → GreppedOut¶ This method will identify what HTTP request methods are being used. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_http_request_methods()
-
code_imports
(class_name: str) → list¶ Returns an array of filepaths where a import statement matched the class_name. It does use a word boundary to get more of an exact match
Parameters: class_name (str) – Name of the absolute or relative class Returns: List of file paths where a match has been found Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_imports()
-
code_intent_filters
(show_code: bool = False) → GreppedOut¶ This identifies all the different types of intent filters
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_intent_filters()
-
code_intent_parameters
(show_code: bool = False) → GreppedOut¶ This method will identify usage of the getStringExtra which is used to create parameters for intents. | Reference Android SDK | Reference OWASP
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_intent_parameters()
-
code_invisible_elements
(show_code: bool = False) → GreppedOut¶ Identifies code will set the visibility of an element to invisible. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_invisible_elements()
-
code_jar_urlconnection
(show_code: bool = False) → GreppedOut¶ Identifies code that is using the JarURLConnection API. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_jar_urlconnection()
-
code_js_read_file
(show_code: bool = False) → GreppedOut¶ Gets or Sets whether JavaScript running in the context of a file scheme URL can access content from other file scheme URLs. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_js_read_file()
-
code_key_generator
(show_code: bool = False) → GreppedOut¶ Find all instances of KeyGenerator and its methods in the decompiled source. This class provides the functionality of a secret (symmetric) key generator | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_key_generator()
-
code_keystore_files
(show_code: bool = False) → GreppedOut¶ This method will identify where Bouncy castle bks or jks files are being used.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_keystore_files()
-
code_load_native_library
(show_code: bool = False) → GreppedOut¶ This method identifies where native libaries and loaded in the decompiled code. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_load_native_library()
-
code_location
(show_code: bool = False) → GreppedOut¶ Identifies code that receives location information. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_location()
-
code_location_manager
(show_code: bool = False) → GreppedOut¶ Identifies code that receives updated location information. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_location_manager()
-
code_logging
(show_code: bool = False) → GreppedOut¶ This method looks for the usage of Log class from Android SDK. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_logging()
-
code_make_http_request
(show_code: bool = False) → GreppedOut¶ This method will identify when a HTTP connection is being made in the decompiled code. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_make_http_request()
-
code_make_https_request
(show_code: bool = False) → GreppedOut¶ This method will identify when a HTTPS connection is being made in the decompiled code. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_make_http_request()
-
code_mediastore
(show_code: bool = False) → GreppedOut¶ Identifies if he MediaStore class or some of its common subclasses are being used by the app. These classes are used to get media file metadata from both internal and external storage. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_mediastore()
-
code_notification_access
(show_code: bool = False) → GreppedOut¶ Identifies code that can access notifications. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_notification_access()
-
code_notification_manager
(show_code: bool = False) → GreppedOut¶ Identifies code that controls notifications. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_notification_manager()
-
code_null_cipher
(show_code: bool = False) → GreppedOut¶ This method will identify nullciphers are being used. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_null_cipher()
-
code_object_deserialization
(show_code: bool = False) → GreppedOut¶ This method will identify where cookies are being set. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_object_deserialization()
-
code_package_installed
(show_code: bool = False) → GreppedOut¶ Detects the usage of the getInstalledPackages method from the PackageManager class. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_apache_http_post_request()
-
code_parse_uri
(show_code: bool = False) → GreppedOut¶ Identifies code that is parsing a URI. This could be related to web urls, or content provider urls. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_parse_uri()
-
code_password_finder
(show_code: bool = False) → GreppedOut¶ This method will identify possible passwords in the code.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_password_finder()
-
code_phone_sensors
(show_code: bool = False) → GreppedOut¶ Identifies code that initiates various sensors available by Android. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_phone_sensors()
-
code_rabbit_amqp
(show_code: bool = False) → GreppedOut¶ Checks if Rabbit amqp imports are present
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_rabbit_amqp()
-
code_read_sms_messages
(show_code: bool = False) → GreppedOut¶ Searches for SmsMessage class which is typically used to read SMS messages send to a device. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_read_sms_messages()
-
code_reflection
(show_code: bool = False) → GreppedOut¶ Identifies code that allows reflections in Java. This is a finding. Refer to the references for the risk and usage of reflections. | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_reflection()
-
code_regex_matcher
(show_code: bool = False) → GreppedOut¶ Identifies code that is processing regex. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_regex_matcher()
-
code_regex_pattern
(show_code: bool = False) → GreppedOut¶ Identifies code that compiles regex patterns. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_regex_pattern()
-
code_root_access
(show_code: bool = False) → GreppedOut¶ Identifies code that indicates if the app requests su access.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_root_access()
-
code_screenshots
(show_code: bool = False) → GreppedOut¶ Identifies usage of Bitmap and BitmapFactory classes. Although these are for bitmap compression and manipulation, they are often used to take screenshots. | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_screenshots()
-
code_sdcard
(show_code: bool = False) → GreppedOut¶ This method will identify strings matching sdcard usage.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_sdcard()
-
code_search
(regex: str, rg_options: str = '', show_code: bool = False) → GreppedOut¶ Run any checks against the decompiled code. The regex should be in raw string format
Parameters: - regex (str) – Regex pattern
- rg_options (str) – ripgrep options, space seperated string, defaults to ‘’
- show_code (bool, optional) – Show the full matched line, by default False
Returns: GreppedOut object
Return type: Examples
-
code_send_sms_text
(show_code: bool = False) → GreppedOut¶ Identifies code can send SMS/Text messages. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_send_sms_text()
-
code_services
(show_code: bool = False) → GreppedOut¶ This method will identify what services are being started or being bound to. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_services()
This method discovers SharePreference and getSharePreference from the decompiled code. Interface for accessing and modifying preference data returned by Context.getSharedPreferences within the decompiled Java code. | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_shared_preferences()
-
code_sim_information
(show_code: bool = False) → GreppedOut¶ This method will identify where device sim card information is being obtained. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_sim_information()
-
code_sql_injection_points
(show_code: bool = False) → GreppedOut¶ This method looks for execquery. If user input is used in this query, this will lead to SQL injection. | Reference | Reference | Reference | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_sql_injection_points()
-
code_sql_injection_user_input
(show_code=False)¶ Find places in code where a variable is being concatanated with a SQL statement
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: - GreppedOut – GreppedOut object
- Examples
- ——– (rtype: dict)
- >>> from glorifiedgrep import GlorifiedAndroid
- >>> a = GlorifiedAndroid(‘/path/to/apk’)
- >>> a.code_sql_inection_points()
-
code_sql_java_implementation
(show_code: bool = False) → GreppedOut¶ This method looks for any other SQL queries that are implemented in Java. This searches for .query, .insert, .update and .delete methods. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_sql_java_implementation()
-
code_sql_query_other
(show_code: bool = False) → GreppedOut¶ This method looks for any other SQL queries like INSERT, DROP etc in the decompiled code. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_sql_query_other()
-
code_sql_select_raw_query
(show_code: bool = False) → GreppedOut¶ This method looks for any SELECT queries in the decompiled code.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_sql_select_raw_query()
-
code_sqlcipher_password
(show_code: bool = False) → GreppedOut¶ This getWritableDatabase and the getReadableDatabase methods from sqlcipher classes (3rd party) takes the db password as their argument. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_sqlcipher_password()
-
code_sqlite_operations
(show_code: bool = False) → GreppedOut¶ This getWritableDatabase and the getReadableDatabase methods db instances for sqlite opertations. These calls can be followed to check what data is being entered in the database. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_sqlite_operations()
-
code_ssl_connections
(show_code: bool = False) → GreppedOut¶ This method will identify if SSL is being used by the application. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_ssl_connections()
-
code_stack_trace
(show_code: bool = False) → GreppedOut¶ This method will identify where AWS queries are being made. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_stack_trace()
-
code_static_iv
(show_code: bool = False) → GreppedOut¶ This method will identify static IV’s. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_static_iv()
-
code_string_constants
(show_code: bool = False) → GreppedOut¶ This method will create a dictionary of hardcoded string constants.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_string_constants()
-
code_stub_packed
(show_code: bool = False) → GreppedOut¶ This method looks for indication that the application is packed.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_stub_packed()
-
code_system_file_exists
(show_code: bool = False) → GreppedOut¶ Detects if the exists method from the File class is being called. This method is typically used to check if the path in the class constructor exists in the system. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_apache_http_post_request()
-
code_system_service
(show_code: bool = False) → GreppedOut¶ This method will identify systemservices being called. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_system_service()
-
code_tcp_sockets
(show_code: bool = False) → GreppedOut¶ This method will identify TCP sockets being opened by the decompiled code. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_tcp_sockets()
-
code_trust_all_ssl
(show_code: bool = False) → GreppedOut¶ Identifies code that willl allow all SSL connections to succeed without verifying the hostname. This is a finding. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_trust_all_ssl()
-
code_udp_sockets
(show_code: bool = False) → GreppedOut¶ This method will identify UDP sockets being opened by the decompiled code. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_udp_sockets()
-
code_weak_hashing
(show_code: bool = False) → GreppedOut¶ This method will identify where weak hashing algorithems such as MD5, MD4, SHA1 or any RC hashes are used. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_weak_hashing()
-
code_websocket_usage
(show_code: bool = False) → GreppedOut¶ Detects common Websockets init classes. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_websocket_usage()
-
code_webview_content_access
(show_code: bool = False) → GreppedOut¶ This method looks for any webview implementations where the webview has can access data from a content provider. | Reference Android SDK | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_webview_content_access()
-
code_webview_database
(show_code: bool = False) → GreppedOut¶ This allows developers to determine whether any WebView used in the application has stored any of the following types of browsing data and to clear any such stored data for all WebViews in the application. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_webview_database()
-
code_webview_debug_enabled
(show_code: bool = False) → GreppedOut¶ This method looks to see if debug is enabled in webview. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_webview_debug_enabled()
-
code_webview_file_access
(show_code: bool = False) → GreppedOut¶ This method looks for any webview implementations where the webview has file access. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_webview_file_access()
-
code_webview_get_request
(show_code: bool = False) → GreppedOut¶ This method will identify webview get requests. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_webview_get_request()
-
code_webview_js_enabled
(show_code: bool = False) → GreppedOut¶ This method looks for any webview implementations where JavaScript is enabled. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_webview_js_enabled()
-
code_webview_post_request
(show_code: bool = False) → GreppedOut¶ This method will identify webview get requests. | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_webview_post_request()
-
code_xml_processor
(show_code: bool = False) → GreppedOut¶ This method will identify possible weaknesses in XML parsing and creation. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_xml_processor()
-
code_xor_encryption
(show_code: bool = False) → GreppedOut¶ This method looks for XOR encryption operation within the decompiled code.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_xor_encryption()
-
code_xpath
(show_code: bool = False) → GreppedOut¶ This method will identify if SSL is being used by the application. | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.code_xpath()
-
classmethod
exodus_trackers
(trackers)¶ Use this method to override the build in _TRACKERS constant with the response body from the exodus api. This is not recommended because some of the detection regex’s from exodus are not valid. Example ‘CrowdTangle’: ‘.’ The Exodus api url is https://reports.exodus-privacy.eu.org/api/trackers
Parameters: trackers (str) – the json response body from the exodus api. Examples
>>> import requests >>> from glorifiedgrep.android.modules.constants import _Trackers >>> res = requests.get('https://reports.exodus-privacy.eu.org/api/trackers').text >>> _Trackers().exodus_trackers(res)
-
file_activities_handling_passwords
() → list¶ This method enumerates the xml files found in sources/res/layout/ and looks for the textPassword value to see which activities handle passwords.
Returns: Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_activities_handling_passwords()
-
file_database_file_paths
() → list¶ This method enumerates for sqlite database files, and returns a list of their paths
Returns: a list of database file paths Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_database_file_paths()
-
file_get_file_types
(describe: bool = False, exclude: list = ['']) → dict¶ Returns the magic values of all files found after unzipping the APK. Keys are sorted by mime values of the files
Parameters: - describe (bool, optional) – Get full description of file. Defaults to False
- exclude (list, optional) – Exclude the file extensions in an array. Defaults to None
Returns: Dictionary of all files and their magic headers
Return type: dict
Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/file') >>> a.file_get_file_types(exclude=['xml', 'png'])
-
file_get_java_classes
() → list¶ Returns a list of found JAVA classes
Returns: JAVA classes Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_get_java_classes()
-
file_hash_of_apk
() → dict¶ Generates the MD5, SHA1 and SHA256 hashes of the APK.
Returns: Returns dict containing MD5, SHA1 and SHA256 hash of APK. Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.file_hash_of_apk()
-
file_html_files
() → list¶ Returns a list of found html files
Returns: Array of HTML files Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_html_files()files
-
file_interesting
() → list¶ Returns a list of found bks keystore files
Returns: Array of interesting filetypes Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_interesting()
-
file_jar_files
() → list¶ Returns a list of found jar files
Returns: Array of JAR files Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_jar_files()files
-
file_js_files
() → list¶ Returns a list of found js files
Returns: Array of JS files Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_js_files()files
-
file_kivy_app
() → bool¶ This method checks to see if the app is a Kivy compiled application. Kivy is a python framework for application development
Returns: True if kivy app, else False Return type: bool Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_kivy_app()
-
file_native_code
() → list¶ Returns a string of available native code compitability if present
Returns: List of native code presence Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.file_native_code()
-
file_other_langs
() → dict¶ Checks to see if any other frameworks is being used in this app
Returns: Dict of other android development frameworks Return type: dict Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_other_langs()
-
file_react_app
() → bool¶ This method checks to see if the app is developed using the Facebook React framework
Returns: True if React app, else False Return type: bool Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_react_app()
-
file_res_strings
() → list¶ This method looks enumerates the strings found in sources/res/values/strings.xml.
Returns: Array of found strings Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_res_strings()
-
file_resource_xml
() → list¶ Returns a list of found xml files from the resources directory. These files usually contains configuration options and may contain secrets.
Returns: Array of resource xml files Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_resource_xml()files
This method enumerates for shared objects, and returns a list of their paths
Returns: a list of database file paths Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_shared_libs_file_paths()
-
file_xml_files
() → list¶ Returns a list of found xml files
Returns: Array of XML files Return type: list Examples
>>> a = GlorifiedAndroid('/path/to/apk') >>> a.file_xml_files()files
-
manifest_activities
() → list¶ Returns a list of all activities and all related attributes | Reference | Reference
Returns: An array of all the activities from the manifest Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_activities()
-
manifest_activity_alias
() → list¶ Returns a list of all activity-alias and all related attributes | Reference
Returns: A list of aliased activies Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_activity_alias()
-
manifest_allow_backup
() → bool¶ Returns true if the allow backup flag is set for the APK | Reference
Returns: Returns true if backup is allowed. Else False Return type: bool Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_allow_backup()
-
manifest_android_version
() → dict¶ Returns the version number matching for min and target sdk.
Returns: Android versions based on min and target sdk Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_android_version()
-
manifest_application_node
() → dict¶ Returns a dictionary of all values that are found in the application node | Reference
Returns: A dictionary of the application node from the manifest Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_application_node()
-
manifest_bind_permissions
() → list¶ Returns a list of permissions that have the BIND property. This allows this permission scope to be executed with the scope of the system
- list
- List of BIND permissions
Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_bind_permissions()
-
manifest_custom_permission
() → list¶ Parses the manifest for permissions and returns a dict of only custom permissions. | Referene
Returns: Custom permissions Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_custom_permission()
-
manifest_dangerous_permission
() → list¶ Parses the manifest for permissions and returns a dict of only dangerous permissions | Reference Android SDK | Referene
Returns: Dangerous permissions Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_dangerous_permission()
-
manifest_debuggable
() → bool¶ Returns true if the debuggable flag is set for the APK | Reference | Reference | Reference
Returns: Returns True if debuggable, else False Return type: bool Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_debuggable()
-
manifest_exported_providers
() → list¶ Returns a list of all providers and all related attributes | Reference | Reference OWASP
Returns: a list of exported provider nodes from the manifest Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_exported_providers()
-
manifest_intent_uri_filter
() → list¶ Parses the manifest for permissions and returns a dict of only dangerous permissions | Referene
Returns: Intent filter uri’s Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_intent_uri_filter()
-
manifest_main_activity
() → dict¶ Returns the main launchable activity as a dict
Returns: Main activity and its attributes Return type: dict Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_main_activity()
-
manifest_meta_data
() → list¶ Returns the contents inside meta-data nodes | Reference
Returns: a list of meta-data nodes Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_meta_data()
-
manifest_min_sdk
() → int¶ Returns the minimum SDK from the APK | Reference
Returns: Min SDK Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_min_sdk()
-
manifest_package_name
() → str¶ Returns the package name of the APK | Reference
Returns: Package name as a string Return type: str Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_package_name()
-
manifest_permission
(merged: bool = True) → list¶ Returns a list of application permission and their attributes | Reference
Parameters: merged (bool) – Merge the two permisison types into one list. Defaults to True Returns: Permissions and their attributes Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_permission()
-
manifest_platform_build_version_code
() → int¶ Returns the platform build version code from the APK
Returns: Platform version code Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_platform_build_version_code()
-
manifest_platform_build_version_name
() → str¶ Returns the platform build version name from the APK
Returns: Platform version name Return type: str Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_platform_build_version_name()
-
manifest_providers
() → list¶ Returns a list of all providers and all related attributes | Reference | Reference
Returns: a list of registered providers in the manifest Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_providers()
-
manifest_receivers
() → list¶ Returns a list of all receivers and all related attributes | Reference
Returns: a list receivers registered in the manifest Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_receivers()
-
manifest_secrets
() → list¶ Find all secrets hidden in AndroidManifest.xml like tokens, keys etc.
Returns: a list of common secrets hardcoded in the manifest. Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAnroid('/path/to/apk') >>> a.manifest_secrets()
-
manifest_services
() → list¶ Returns a list of all services and all related attributes | Reference
Returns: a list of registered services in the manifest Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_services()
-
manifest_signature_permission
() → list¶ Parses the manifest for permissions and returns a dict of only signature permissions | Reference Android SDK | Referene
Returns: Signature permissions Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_signature_permission()
-
manifest_target_sdk
() → int¶ Returns the target SDK from the APK | Reference
Returns: Target SDK number Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_target_sdk()
-
manifest_uses_configuration
() → list¶ Returns the uses-configuration and all attributes from the APK | Reference
Returns: uses configuration. Returns None if none found Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.uses_configuration()
-
manifest_uses_feature
() → list¶ Returns a list of all uses-feature node. uses-feature is normally used to elaborate on permissions. | Reference
Returns: Attributes of found uses-feature nodes Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_uses_feature()
-
manifest_uses_library
() → list¶ Returns the uses-library and all attributes from the APK | Reference
Returns: uses library Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_uses_library()
-
manifest_uses_permission
(merged: bool = True) → list¶ Returns a list of application permission and their attributes. This is the main way stating permissions in AndroidManifest.xml file | Reference
Parameters: merged (bool, optional) – Merge the two permisison types into one list defaults to True Returns: Permissions and their attributes Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_uses_permissions()
-
manifest_version_code
() → int¶ Returns the version code from the APK | Reference
Returns: Version code. None if not found Return type: int Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_version_code()
-
manifest_version_name
() → str¶ Returns the version name from the APK | Reference
Returns: Version name from the manifest. None if not found Return type: str Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk) >>> a.manifest_version_name()
-
other_ad_networks
(show_code=False) → GreppedOut¶ Show imports of the popular android ad networks. | Reference | Reference
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_ad_networks()
-
other_all_urls
(show_code=False) → GreppedOut¶ Find all urls in the decompiled source
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_all_urls()
-
other_aws_keys
(show_code=False) → GreppedOut¶ Find all AWS keys in the decompiled source
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_aws_keys()
-
other_content_urlhandler
(show_code=False) → GreppedOut¶ Find all
content://
urls in the decompiled sourceParameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_content_urlhandler()
-
other_email_addresses
(show_code=False) → GreppedOut¶ Find email addresses in the decompiled source
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_email_addresses()
-
other_file_urlhandler
(show_code=False) → GreppedOut¶ Find all
file://
urls in the decompiled sourceParameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_file_urlhandler()
-
other_find_trackers_ads
() → list¶ Find trackers included in the app. Currently it looks for 135 trackers.
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: List of matched trackers Return type: list Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_find_trackers_ads()
-
other_github_token
(show_code=False) → GreppedOut¶ Find all Github tokens in the decompiled source
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_github_token()
-
other_google_ads_import
(show_code=False) → GreppedOut¶ Find imports relevant to Google ads
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_google_ads_import()
-
other_http_urls
(show_code=False) → GreppedOut¶ Find HTTP urls in the decompiled source
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_http_urls()
-
other_ip_address
(show_code=False) → GreppedOut¶ Find IP addresses in the decompiled source
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_ip_address()
-
other_password_in_url
(show_code=False) → GreppedOut¶ Find all passwords in urls. Usually used for basic authentication
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_password_in_url()
-
other_secret_keys
(show_code=False) → GreppedOut¶ Find all urls in the decompiled source
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_secret_keys()
-
other_unicode_chars
(script: str = 'Hangul', show_code=False)¶ Find unicode characters representing differnt character sets from different languages in the decompiled apk. Supports both Unicode Scripes and Unicode Blocks. See the reference for supported ranges. | Reference
Parameters: - script (string, default Hangul) – Any supported Unicode Script or Unicode Blocks. Ex:
Han
for Chinese characters. - show_code (bool, optional) – Show the full matched line, by default False
Returns: GreppedOut object
Return type: Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_chinese_chars()
- script (string, default Hangul) – Any supported Unicode Script or Unicode Blocks. Ex:
-
other_websocket_urlhandler
(show_code=False) → GreppedOut¶ Find all
ws://
orwss://
urls in the decompiled sourceParameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.other_websocket_urlhandler()
-
owasp_cloud_backup
(show_code=False) → GreppedOut¶ Locate usage of BackupAgent and its variations in the decompiled code | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_cloud_backup()
-
owasp_code_check_permission
(show_code=False) → GreppedOut¶ Locate common exceptions thrown by RuntimeException from decompiled code. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_code_check_permission()
-
owasp_crypto_imports
(show_code=False) → GreppedOut¶ Locate uses of the Java cryptographic imports in decompiled code | Reference | Reference | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_crypto_imports()
-
owasp_crypto_primitives
(show_code=False) → GreppedOut¶ Locate uses of the cryptographic primitives of the most frequently used classes and interfaces in decompiled code | Reference | Reference | Reference CWE
Parameters: - show_code (bool, optional) –
- show_code – See the full line of code, defaults to False
Returns: name, line number and match
Return type: dict
Returns: GreppedOut object
Return type: Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_crypto_primitives()
-
owasp_debug_code
(show_code=False) → GreppedOut¶ Locate StrictMode code in the decompiled code. This will indicate if dev checks are left behind in the app. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_debug_code()
-
owasp_encrypted_sql_db
(show_code=False) → GreppedOut¶ Locate usage of getWritableDatabase if a paramter is passed to this method. This could indicate hardcoded passwords. | Reference | Reference | Reference Android SDK | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_external_storage()
-
owasp_external_cache_dir
(show_code=False) → GreppedOut¶ Locate usage of getExternalCacheDir method usage. If the app is using the external cache dir. | Reference | Reference | Reference Android SDK | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_external_cache_dir()
-
owasp_external_storage
(show_code=False) → GreppedOut¶ Locate usage of getExternal method usage. This indicates sections of code where the external storage of the Android device is being interacted with. | Reference | Reference | Reference Android SDK | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_external_storage()
-
owasp_get_secret_keys
(show_code=False) → GreppedOut¶ Locate usage of getSecretKey and getPrivateKey methods. | Reference | Reference | Reference Android SDK | Reference Android SDK | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_get_secret_keys()
-
owasp_hardcoded_keys
(show_code=False) → GreppedOut¶ Locate hardcoded encryption keys and bytes used by SecretKeySpec. The decompiled code should be inspected to find hardcoded keys. | Reference | Reference | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_hardcoded_keys()
-
owasp_insecure_fingerprint_auth
(show_code=False) → GreppedOut¶ Locate insecure .authenticate public method where the first parameter is null. This results in purely event driven authentication and is not secure. | Reference | Reference | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_insecure_fingerprint_auth()
-
owasp_insecure_random
(show_code=False) → GreppedOut¶ Locate uses of the weak Ranom Java class. SecureRandom should be used instead | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_insecure_random()
-
owasp_intent_parameter
(show_code=False) → GreppedOut¶ Locate common exceptions thrown by RuntimeException from decompiled code. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_intent_parameter()
-
owasp_keychain_password
(show_code=False) → GreppedOut¶ Locate usage of store(OutputStream… to check for hardcoded passwords for keychains. | Reference | Reference | Reference Android SDK | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_keychain_password()
-
owasp_keystore_cert_pinning
(show_code=False) → GreppedOut¶ Locate keystore ssl pinning in decompiled code. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_keystore_cert_pinning()
-
owasp_properly_signed
(show_code=False) → GreppedOut¶ Returns the command that can be used to check if an app is properly signed. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_properly_signed()
-
owasp_runtime_exception_handling
(show_code=False) → GreppedOut¶ Locate common exceptions thrown by RuntimeException from decompiled code. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_runtime_exception_handling()
-
owasp_ssl_no_hostname_verification
(show_code=False) → GreppedOut¶ Locate usage of onReceivedSslError which amy indicate cases where SSL errors are being ingored by the application. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_ssl_no_hostname_verification()
-
owasp_webview_cert_pinning
(show_code=False) → GreppedOut¶ Locate SSL cert pinning in webviews. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_webview_cert_pinning()
-
owasp_webview_loadurl
(show_code=False) → GreppedOut¶ Locate where webviews are loading content from. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_webview_loadurl()
-
owasp_webview_native_function
(show_code=False) → GreppedOut¶ Identify addJavascriptInterface which will allow JS to access native Java functions. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_webview_native_function()
-
owasp_webview_ssl_ignore
(show_code=False) → GreppedOut¶ Locate usage of onReceivedSslError which amy indicate cases where SSL errors are being ingored by the application. | Reference | Reference | Reference Android SDK
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_webview_ssl_ignore()
-
owasp_world_read_write_files
(show_code=False) → GreppedOut¶ Locate if shared preferences are world readable or world writeable | Reference | Reference | Reference CWE
Parameters: show_code (bool, optional) – Show the full matched line, by default False Returns: GreppedOut object Return type: GreppedOut Examples
>>> from glorifiedgrep import GlorifiedAndroid >>> a = GlorifiedAndroid('/path/to/apk') >>> a.owasp_world_read_write_files()
-
search_methods
(regex: str) → list¶ Search methods available through the GlorifiedAndroid class. This does not search for methods in any classes from the utils module.
Parameters: regex (str) – regex to search for Returns: List of matching methods Return type: list >>> GlorifiedAndroid(apk).search_methods('intent')
-