4. DR BACA SYSTEM
Figure 2 illustrates DR BACA’s architecture on a high
level. The application layer consists of third-party applications
that are installed on the mobile device. As shown in
the legend, the full arrows show the execution flow when
a permission or execution request occurs. The dotted lines
on the other hand explain how information flows inside the
system. The following subsections focus on different components
and explain them in more detail. In particular,
we discuss how shareable rules can be implemented through
NFC technology.
!
"
#!
$
Figure 2: DR BACA architecture
4.1 Permission/Execution Checker
This component consists of hooks in the Android framework
which allow the DR BACA system to make allow or
deny decisions for both permission and application execution
requests. The major difference between an execution
request and a permission request is that the permission request
first consults the Android reference monitor, whereas
an execution request immediately invokes DR BACA’s Permission
& Execution Checker. If Android rejects a permission
request, DR BACA is not consulted and the request is
immediately rejected. Otherwise, DR BACA follows steps
shown in Figure 3.
Figure 3: Execution/Permission request flowchart
DR BACA first checks if a user is currently logged in, since
an access decision requires a user to be present. If this is not
the case, DR BACA reads a default role, which can contain
any number of rules defined by the administrator. A useful
302
rule for the default role may be to only allow essential system
applications to start. Additionally, a rule that prohibits the
execution of dangerous activities such as SEND SMS can
further improve the security provided by the default role. If
a user is logged in, DR BACA retrieves all applicable rules
for the given user by consulting all of the current user’s roles.
An applicable rule is any rule that involves the requested
application and permission and is owned by the current user
based on his/her role(s). If no such rule is found, the request
is granted. If at least one applicable rule is found, DR BACA
will grant the request if and only if one of the rules explicitly
or implicitly allows the request. As an example, the rule in
Listing 1 explicitly allows the INTERNET permission for
the browser application.
{ "permissions": ["INTERNET"],
"apps": ["BROWSER"],
"rulename": "INET_ALLOWED" }
Listing 1: Allow INTERNET for Browser #1
The rule shown in Listing 2 implicitly allows the INTERNET
permission for the browser application outside of of-
fice hours. Assuming that WORKHOUR is defined as 9am
- 5pm, this rule will implicitly allow the INTERNET permission
for the browser application from 5pm - 8.59am.
As mentioned in the DR BACA model section, an explicitly
granted rule supersedes an implicitly granted rule.
{ "permissions": ["INTERNET"],
"apps": ["BROWSER"],
"rulename": "INET_DENIED",
"contexts": ["WORKHOUR"],
"allowed": false }
Listing 2: Allow INTERNET for Browser #2
4.2 User Manager
DR BACA offers multi-user capabilities through the User
Manager, which allows different users to log into the same
mobile device. Users will have different permissions, based
on DR BACA’s Security Policy. DR BACA assures that no
security sensitive information remains running between different
user logins. For example, if a permission request was
granted for an application, the permission will be revoked
once that user logs out.
On the other hand, DR BACA also allows a single user
to log into different devices, as long as they are part of the
same overall security policy.
4.3 Context Monitor
If a rule is associated with some context, the Context Monitor
will be consulted to check if the context is currently
fulfilled or not. Currently, the Context Monitor can check
the current location, time and day. Additional contexts have
been considered, for example, to further mitigate permission
re-delegation attacks, the chain of applications requesting
a given permission could be implemented as an additional
context. By using context-aware security rules, the Context
Monitor component enables DR BACA to provide dynamic
role-based access control (RBAC) for Android devices.
4.4 Rule sharing Agent
As part of the DR BACA Android application (see DR
BACA System App in Figure 2), the Rule Sharing Agent
enhances DR BACA’s access controls with dynamic RBAC
capabilities through the use of Near Field Communication
(NFC) technology. Android has been supporting NFC since
version 2.3 (Gingerbread). NFC allows for radio communication
between NFC enabled devices. NFC tags can store
small amounts of data, normally around one to four kilobytes.
Once an NFC-enabled device moves into the proximity
of an NFC tag, the tag draws power from the device
through magnetic induction. This allows the tag to communicate
with the device. NFC tags can be rewritten several
thousand times or they can be configured to be read-only.
DR BACA utilizes NFC in two ways: sharing rules between
two devices and between an NFC tag and a device.
Through this technology, DR BACA currently provides dynamic,
non-transitive rule delegation.
Device→Device: In this mode, a set of rules can temporarily
be shared between NFC-enabled DR BACA devices.
The user initiating the process can select a subset of the
shareable rules he/she currently owns and initiate the sharing
process by moving his/her mobile device close to the
receiving mobile device. The data transferred between the
two devices contains the following:
• Rule name(s) contains the name of the rule(s) that
should temporarily be shared.
• Role name(s) contains the role(s) that are required
in order to use this shareable rule.
• Duration indicates how long the rule(s) are to be
shared.
Since we do not protect the data transferred between two
mobile devices, we need to assure that this transfer cannot
be forged by a malicious user. This can be achieved by
only allowing this form of communication between two instances
(one on each device) of the Rule sharing Agent. In
DR BACA, this application is a system application which
cannot be removed or overwritten by an unprivileged user.
Every application running on Android has to be digitally
signed, preventing malicious users from forging this application.
Digitally signed applications are further explained at
[13]. The rule sharing agent on the receiving device will first
verify the other agent’s certificate before adding the temporarily
shared rules to the current user. If the certificate
verification fails, no rules will be shared.
Tag→Device: Similar to the Device→Device mechanism,
one can use the Tag→Device mechanism to temporarily share
rule(s) via NFC. This works by moving the mobile device
close to a NFC tag which will then initiate the communication.
In addition to the information (rules, roles and duration
time) sent during a Device→Device transaction, the
following information is additionally transferred:
• TagID is a unique ID consisting of 8 hexadecimal digits
(i.e. 1280CDB6) which is imprinted into the hardware
by the tag manufacturer;
• Digital signature, which protects the integrity of the
TagID, rule name(s) and duration.
Before any rule is shared, DR BACA verifies that the user
on the receiving device is associated with at least one of
303
the roles required to share the rule. This applies to both
the Device→Device and the Tag→Device mechanism. This
check minimizes the risk of privileged users sharing rules
with inappropriate third parties. For example, a rule may
only be transferred to other employees but not to patients.
A patient will then not be able to make use of that rule,
even if a doctor tries to share it.
For the Tag→Device mechanism, DR BACA will also verify
the digital signature which covers all data on the tag.
Using a digital signature provides integrity protection and
prevents tags from being maliciously forged. If any of the
information on the tag is modified after the fact, the digital
signature verification will fail and the rule(s) will not
be granted. Furthermore, if a malicious user tries to simply
copy the entire information onto a new tag, the signature on
the new tag would not pass verification because the TagID
is different. Only the owner of the private key (i.e. the IT
department of a company) used to create the digital signature
will be able to create NFC tags that are accepted by
DR BACA.
4.5 Policy Configurator
The Policy Configurator is part of the DR BACA Android
application and allows users or administrators to configure
DR BACA. This application can either receive policy information
from an external server (see next subsection) or
define them locally. The application can be protected, in
order to prevent normal users from changing the DR BACA
security policy.
4.6 Configuration Server
DR BACA comes with a stand-alone Configuration Server
offering a simple-to-use user interface through which an administrator
can create and alter the security policy. This
policy can then be retrieved by any DR BACA-enabled mobile
device through the Policy Provider on the server. While
optional, the Configuration Server offers scalability in environments
with dozens or hundreds of mobile devices