HackControl_Android_Application_Report
HackControl_Android_Application_Report
H o@
PENETRATION TESTING
ac h
in
kC a
f
Report for:
on kc
Date:
tro on
c
l tro
l.o
This document contains confidential information about IT systems and network infrastructure of
the customer, as well as information about potential vulnerabilities and methods of their
exploitation. This confidential information is for internal use by the customer only and shall not be
rg
Table of Content 2
Introduction 3
Executive Summary 3
Team 4
H o@
Severity Definition 7
in
Summary of Findings 8
kC a
Key Findings 9
f
We thank _____________ for giving us the opportunity to conduct Security Assessment of their
mobile application and its backend API. This document outlines our methodology, limitations and
results of the security assessment.
Executive Summary
H o@
Hackcontrol (Consultant) was contracted by _________ (Customer) to conduct the penetration testing
of their mobile application.
ac h
This report presents the findings of the penetration testing of CLIENT`s mobile application conducted
in
The main subject of the penetration testing is ___________`s mobile systems & API.
f
- estimate their severity level (ease of use, impact on information systems, etc);
- modelling the “most likely” attack vector against the Customer’s Information System;
- proof of concept and exploitation of vulnerabilities;
- draw up a prioritized list of recommendations to address identified weaknesses.
tro on
According to our research, the mobile application is of high security rating for Customer and
c
Backend systems; Several high-level vulnerabilities have been detected, however it requires a
l tro
John Doe
Project Manager [email protected]
(CEH, ISO27001 LA)
kC a
f
on kc
tro on
c
l tro
l.o
rg
Scope of the Security Assessment
The following list of systems was in the scope of the Security Assessment.
# Name Description
1 __________v_0.9.2.apk
H o@
Security Assessment start and end dates were coordinated by email according to the following table.
ac h
in
kC a
f
on kc
tro on
c
l tro
l.o
rg
Methodology
- client-side injection;
in
- weak encryption;
kC a
- implicit trust of all certificates;
f
The level of criticality of each risk is determined based on the potential impact of loss from successful
exploitation as well as ease of exploitation, existence of exploits in public access and other factors.
Severity Description
attacker with full control of the affected systems, also may lead to
High significant data loss or downtime. There are exploits or PoC available
in public access.
ac h
access.
According to the following in-depth testing of the mobile application & API, those require
improvements.
High 3
Medium 3
H o@
Low 2
ac h
Info 5
in
kC a
Based on our understanding of the mobile application and backend API, as well as the nature of the
f
vulnerabilities discovered, their exploitability, and their potential impact, we have assessed the level
of risk for your organization to be Medium.
on kc
1 2 3 4 6 7 8 9
0 5 10
Three (3) high, three (3) medium, two (2) low and five (5) informational level vulnerabilities have
been found.
Despite the number of vulnerabilities and errors, there was no way to gain an unauthorized access or
steal and modify the sensitive information like database data at backend system. However, the number
of potential issues may increase during implementation of new functionality and its modification.
l.o
There were no prevention and blocking actions during the testing from the _________________’s
security team and systems. Also, no account blocking was provided during a malicious activity and
scanning process.
rg
We have not performed test money transfer between devices. Application is crashing when one of the
devices initiate a transfer and money is not sent. We have tested on 5 different devices and Android
versions.
Key Findings
In Android devices, rooting is the process of allowing smartphones, tablets and other devices to
attain privileged control (known as "root access") within Android's sub-system.
Rooting is often performed with the goal of overcoming limitations that carriers and hardware
H o@
manufacturers put on some devices. Thus, rooting gives the ability (or permission) to alter or
replace system applications and settings, run specialized apps that require administrator-level
ac h
permissions, or perform other operations that are otherwise inaccessible to a normal Android user.
On Android, rooting can also facilitate the complete removal and replacement of the device's
in
operating system, usually with a more recent release of its current operating system.
kC a
f
Rooted devices can be used to gain information about an application. The Settings app on Android
includes a screen called Developer options that allows configuring system behavior and debugging
application. For example, it can be used for enabling debugging over USB, capture a bug report,
enable visual feedback for taps and more.
on kc
tro on
Evidences
c
Steps to reproduce:
l tro
− Decompile application
− Search keywords for developer-mode and rootchecks class in source code
− Change associated strings and results of checks
− ReCompile application
− Sign application
l.o
rg
rg
l.o
l tro
tro on
on kc
c
kC a
ac h
H o@ f
in
rg
l.o
l tro
tro on
on kc
c
kC a
ac h
H o@ f
in
rg
l.o
l tro
tro on
on kc
c
kC a
ac h
H o@ f
in
rg
l.o
l tro
tro on
on kc
c
kC a
ac h
H o@ f
in
H o@
ac h
in
kC a
f
on kc
tro on
The application crashes, when money is transferred between two different accounts
Evidences
Steps to reproduce:
− Log in application
−
H o@
Enter into money transfer
− Get valet address with help QR-code
− Input data
ac h
kC a
f
Personal data can be stolen from application logs. Often Developers leave debugging information
publicly. So any application with READ_LOGS permission can access those logs and can gain
sensitive information through that.
Evidences
Perform pidcat
H o@
ac h
in
kC a
f
on kc
tro on
c
l tro
l.o
Android Application are delivered through an. apk file format which can be exploited by someone
to see all the code contained in it. Below are scenarios of reverse engineering an application:
- A hacker can analyze and determine which defensive measure are implemented in the app
and also find a way to bypass those mechanisms.
- Also a hacker can also insert the malicious code, recompile it and deliver to normal users.
- For example, gaming apps which have some features unlocked are widely downloaded by
youngster through insecure sources (sometimes through Google PlayStore as well). Most
H o@
of those modified apps contain malware and some contain advertising to gain profit from
those users. This can lead to code analysis.
ac h
Evidences
in
on kc
tro on
c
l tro
l.o
rg
H o@
ac h
in
kC a
f
on kc
tro on
c
l tro
l.o
rg
Binary protections prevent an adversary from modifying the underlying code or behavior to
disable or add additional functionality on behalf of the adversary. This is likely to occur if an
application stores, transmits, or processes personally identifiable information (PII) or other
sensitive information assets like passwords or credit cards. Code modification often takes the form
of repackaging or insertion of malware into existing mobile apps.
Evidences
H o@
kC a
f
on kc
tro on
c
l tro
l.o
rg
rg
l.o
l tro
tro on
on kc
c
kC a
ac h
H o@ f
in
H o@
ac h
in
kC a
f
Authorization header contains both email address and authentication token. It was discovered that
by sending existing and not existing email address it is possible to enumerate valid users because
of different responses. Before the token is checked, the application looks up if email address
belongs to a registered user. If the user is not registered, an error “User not found” occurs.
Evidences
H o@
- Check response from existing and not existing user during authorization
ac h
in
kC a
f
on kc
tro on
c
l tro
This flag allows anyone to backup your application data via adb. It allows users who have enabled
USB debugging to copy application data of the device.
Evidences
kC a
f
on kc
tro on
c
l tro
l.o
rg
H o@
ac h
in
kC a
f
on kc
tro on
c
l tro
l.o
rg
There was no Certificate and Public Key Pinning found during the mobile application test.
Absence of the mechanism makes it more convenient and faster to intercept and decrypt traffic
between an application and a server. Pinning is the process of associating a host with their
expected X509 certificate or public key. Once a certificate or public key is known or seen for a
host, the certificate or public key is associated or 'pinned' to the host.
Evidences
H o@
Steps to reproduce:
ac h
ublic_Key_Pinning
tro on
c
l tro
l.o
rg
Http without headers
#9 Description Type: Real
Unless directed otherwise, browsers may store a local cached copy of content received from web
servers. Some browsers, including Internet Explorer, cache
content accessed via HTTPS. If sensitive information in application responses is stored in the local
cache, then this may be retrieved by other users who have access to the same computer at a future
time.(Cache-control: nostore, Pragma: no-cache)
H o@
kC a
f
on kc
tro on
c
l tro
l.o
rg
Out of date library
#10 Description Type: Real
kC a
f
on kc
tro on
Recommendations
https://resources.infosecinstitute.com/randomnumber-generation-
l tro
java/
l.o
rg
Bugs in key word display
#11 Description Type: Real
kC a
f
on kc
tro on
c
l tro
l.o
rg
Export components
#12 Description Type: Real
A Service is found to be shared with other apps on the device therefore leaving it accessible to any
other application on the device. The presence of intent-filter indicates that the Service is explicitly
exported. A Broadcast Receiver is found to be shared with other apps on the device therefore
leaving it accessible to any other application on the device. It is protected by a permission which
is not defined in the analyzed application. As a result, the protection level of the permission should
be checked where it is defined. If it is set to normal or dangerous, a malicious application can
request and obtain the permission and interact with the component. If it is set to signature, only
H o@
applications signed with the same certificate can obtain the permission.
ac h
Evidences
in
kC a
f
on kc
tro on
c
l tro
l.o
rg
kC a
f
on kc
tro on
c
l tro
l.o
rg
Vulnerability in webview
#13 Description Type: Real
This vulnerability can lead for privilege escalation in Android < 4.2's WebView component that
arises when untrusted Javascript code is executed by a WebView that has one or more Interfaces
added to it. The untrusted Javascript code can call into the Java Reflection APIs exposed by the
Interface and execute arbitrary commands. Some distributions of the Android Browser app have
an addJavascriptInterface call tacked on, and thus are vulnerable to RCE. The Browser app in the
Google APIs 4.1.2 release of Android is known to be vulnerable. A secondary attack vector
involves the WebViews embedded inside a large number of Android applications. Ad integrations
H o@
are perhaps the worst offender here. If you can MITM the WebView's HTTP connection, or if you
can get a persistent XSS into the page displayed in the WebView, then you can inject the html/js
ac h
served by this module and get a shell. Note: Adding a .js to the URL will return plain javascript
(no HTML markup).
in
(https://www.rapid7.com/db/modules/exploit/android/browser/webview_addj avascriptinterface)
kC a
f
Evidences
$ grep -nr 'setAllowUniversalAccessFromFileURLs' java_source\
java_source\/com/facebook/react/views/webview/ReactWebViewManag er.java:227: public
on kc
void setAllowUniversalAccessFromFileURLs(WebView webView, boolean bl2) {
java_source\/com/facebook/react/views/webview/ReactWebViewManag er.java:228:
webView.getSettings().setAllowUniversalAccessFromFileURLs(bl2); $grep -nr
'setJavaScriptEnabled' java_source\
java_source\/com/facebook/react/views/webview/ReactWebViewManag er.java:242: public
tro on
java_source\ java_source\/com/facebook/react/views/webview/ReactWebViewManag
l tro
er.java:21: android.webkit.JavascriptInterface
java_source\/com/facebook/react/views/webview/ReactWebViewManag er.java:58: import
android.webkit.JavascriptInterface;
java_source\/com/facebook/react/views/webview/ReactWebViewManag er.java:420:
this.addJavascriptInterface((Object)new If(this, this), "__REACT_WEB_VIEW_BRIDGE");
java_source\/com/facebook/react/views/webview/ReactWebViewManag er.java:426:
this.removeJavascriptInterface("__REACT_WEB_VIEW_BRIDGE");
java_source\/com/facebook/react/views/webview/ReactWebViewManag er.java:447:
@JavascriptInterface
kC a
f
on kc
tro on
c
l tro
l.o
rg