<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Towards an authorization framework for app security checking</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Joseph Hallett</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>David Aspinall ?</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Edinburgh</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Apps don't come with any guarantees that they are not malicious. This paper introduces a PhD project designing the authorization framework used for App Guarden. App Guarden is a new project that uses a exible assurance framework based on distribution of evidence, attestation and checking algorithms to make explicit why an app isn't dangerous and to allow users to describe how they want apps on their devices to behave. We use the SecPAL policy language to implement a device policy and give a brief example of a policy being used. Finally we use SecPAL to describe some of the di erences between current app markets.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>App stores allow users to buy and install software on their devices with a
minimum of fuss. Users trust the app stores not to supply them with malware but
sometimes this trust is misplaced. A survey of the various di erent Android
markets revealed some malware in all of them|including Google's own Play
Store [13]. Malware on mobile platforms typically steals user information and
monetises itself by sending premium rate text messages [10]. Sometimes malware
on mobile platforms isn't intentional: developers are not security specialists and
sometimes make poor security decisions such as signing apps with the same
key [2] which can lead to permission escalation on Android or by requesting
excessive permissions [7].</p>
      <p>Both Google and Apple (who operate the two biggest app markets) check
apps submitted to them for malicious code, however neither states exactly what
they check for. There is expectation amongst users that these markets check for
and are free from malware, but this trust is misplaced [6]. Attempts to reverse
engineer the checking procedures for Google's store suggest that they incorporate
static and dynamic analysis as well as manual checking by a human being [9].
They o er no guarantees however that any check was actually run.</p>
      <p>Digital evidence [11] can be used to con rm the results from static analyses;
it is similar to older techniques [8] and allows us to split the inferring of a static
analysis result (which may be computationally expensive) from the checking the
evidence (which should be e cient). This allows us to verify the results of static
analyses for security properties without having to fully run the analysis.
? With thanks to Martin Hofmann and Andy Gordon for their time and advice.</p>
      <p>Static analysis checks used to create digital evidence could include taint
analysis tools to check where sensitive information is being leaked between apps [5],
or a security proof based on the architecture of the machine [3].</p>
      <p>The App Guarden project aims to use digital evidence to provide apps with
guarantees that the app cannot act maliciously. This will allow us to make
explicit the checks made on an app. With explicit checks users will be able to
write policies which describe what kinds of apps they will allow on their devices,
and what level of trust they require in these checks for an app to be considered
installable. We aim to create an enhanced app store that uses inference services,
and assurance logics on a modi ed Android to increase trust in devices.</p>
      <p>Figure 1 shows an App Guarden store. It provides apps with evidence
generated by an inference service. Devices can check the evidence using a trusted
checking service, or rely on their trust that the store believed the app to be safe.
The SecPAL Engine on the phone is used to check the assertions made by the
store and the checker service and enforce a device policy.</p>
      <p>App Guarden</p>
      <p>Store
Apps</p>
      <p>Evidence
Trusts</p>
      <p>Supplies
App Guarden</p>
      <p>Phone
SecPAL
Engine</p>
      <p>Apps</p>
      <p>Generates</p>
      <p>Trusts
Checks</p>
      <p>Inference
Service
Checker</p>
      <p>Service
{ Show how an authorization logic can specify a policy for how a device
behaves. This will use ideas such as proof checking and inference, and show
how trust can be distributed between principals.
{ Show how to use the logic to specify a device policy. We will use digital
evidence, and assertions between trusted principals and show how the trust
relationships can be propagated between devices. We show how we can use
these statements to build con dence that an app is secure.
{ Describe the di erences between current app markets using the logic and
show how they manage access to special resources (such as the address book
or a user's photos). This will allow us to compare App Guarden to other
systems and allow comparison between other di erent schemes.
{ Put the logic in a real device and app store and see how the system behaves
with real malware and how they interact with device policies. We will look
for ways to attack devices with our framework and explore it's limitations.
3</p>
    </sec>
    <sec id="sec-2">
      <title>SecPAL and App Guarden</title>
      <p>Suppose a user has a mobile device. They might wish that:
\No app installed on my phone will send my location to an advertiser,
and I wont install anything that Google says is malware."</p>
      <p>
        We call this their device policy. It says what the user will allow on their
device for an app to be installable. To formally write the device policies we use
the SecPAL authorization language [4]. The device policy is show in (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ). SecPAL
is designed for distributed access control decisions. It was designed to be human
readable which makes it ideal for our application as we would like users to be
able to understand (if perhaps not write) their own device policies. Another
advantage is that it lets us separate the constraint solving (the digital evidence
checking) from the authorization logic. This means there is no restriction on
having the digital evidence be in the same format and logic as the assurance
framework (as is the case with other authorization logics such as BLF [12]); this
increases our exibility for implementation as we can re-purpose existing logic
solvers.
      </p>
      <p>
        SecPAL is designed to be extensible. Authorization statements take the form
of assertions made by principals. Statements can include predicates which are
de ned by the SecPAL program, as well as constraints (as seen in (
        <xref ref-type="bibr" rid="ref9">9</xref>
        )) that can
be checked as sub-procedures for the main query engine. We add the following
statements:
eevidence shows eapp meets epolicy
eapp meets epolicy
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
      </p>
      <p>
        The shows . . . meets predicate in (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) tells us that some evidence could be
checked to show that an app satis es a security policy; an example of which can
be seen in (
        <xref ref-type="bibr" rid="ref9">9</xref>
        ) bellow (and which also uses a constraint). The plain meets in (
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
is an assertion that an app meets a policy whilst o ering no actual evidence that
the app is secure. The shows statement is stronger than the meets statement
as anyone who says that some evidence shows an app meets a policy suggests
they would also say the app meets policy. We can write this in SecPAL with the
assertion: \Phone says app meets policy if evidence shows app meets policy."
      </p>
      <p>We also add an is installable statement to indicate an app is installable on a
device and a requires statement to say an app needs a permission to run.</p>
      <p>
        SecPAL allows for attestation of said statements with the can say statement:
these come with a delegation depth. A delegation depth of zero (as shown in (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ))
means the statement must be spoken by the principal and given to us directly in
the assertion context. A delegation depth of in nity (as in (
        <xref ref-type="bibr" rid="ref6">6</xref>
        )) means that the
statement might not be given to us directly but rather inferred from a statement
by di erent principal but with several can say phrases linking it back to the
required principal.
      </p>
      <p>To evaluate the device policy and decide whether a speci c app is installable
SecPAL requires a set of assertions called the assertion-context. An example
assertion-context and the proof, using two of SecPAL's evaluation rules from the
original paper [4]. To illustrate a usage of SecPAL we give an example where a
user wishes to decide whether an app Game can be installed. To do this we use
the assertion context bellow:</p>
      <p>AC := f
Phone says app is installable
if app meets NotMalware;</p>
      <p>app meets NoInfoLeaks:
anyone says app meets policy if evidence shows app meets policy:
Phone says NILInferer can say0 app meets NoInfoLeaks:
Phone says Google can say1 app meets NotMalware:</p>
      <p>Google says AVChecker can say0 app meets NotMalware:
AVChecker says Game meets NotMalware:
NILInferer says Evidence shows Game meets NoInfoLeaks</p>
      <p>
        if LocalNILCheck(Evidence; Game) = true:
g
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        )
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
(
        <xref ref-type="bibr" rid="ref6">6</xref>
        )
(
        <xref ref-type="bibr" rid="ref7">7</xref>
        )
(
        <xref ref-type="bibr" rid="ref8">8</xref>
        )
(
        <xref ref-type="bibr" rid="ref9">9</xref>
        )
      </p>
      <p>
        We evaluate it using the SecPAL rules shown in the cond (
        <xref ref-type="bibr" rid="ref10">10</xref>
        ) and can
say (
        <xref ref-type="bibr" rid="ref11">11</xref>
        ) rules. The cond rule is SecPAL's equivalent to the modus ponens rule.
Whereas can say is similar to speaks for relationships [1]: if a rst principal
says a second principal can say something and the second does say it then the
rst says it too. AC represents the assertion context, D is the current delegation
level. From these rules and the assertion context we can prove an assertion that
\Phone says Game is installable."
fA says fact if fact1; : : : ; factn; cg [ AC; D j= A says fact1; : : : ; factn
j= c
vars(fact) = ; cond
fA says fact if fact1; : : : factn; cg [ AC; D j= A says fact
(
        <xref ref-type="bibr" rid="ref10">10</xref>
        )
AC; 1 j= A says B can sayD fact AC; D j= B says fact
      </p>
      <p>AC; 1 j= A says fact
can say</p>
    </sec>
    <sec id="sec-3">
      <title>Comparing di erent devices</title>
      <p>We can use the SecPAL language to describe the di erences between various
app markets and devices. The two most popular operating systems are Google's
Android, and Apple's iOS. Apple's o ering is usually considered to be the more
restrictive system as it doesn't allow the use of alternate market places, whereas
an Android user can choose to relax the restrictions and install from anywhere.</p>
      <p>
        For example on iOS an app is only installable on an iPhone if Apple has said
the app can be installed (
        <xref ref-type="bibr" rid="ref12">12</xref>
        ). In contrast on Android any app can be installed
if the user says so (14). The user also trusts any app available on Google's Play
Store (15), but the zero delegation-depth means that the user will only believe
the app is installable if Google provides the assertion directly whereas the user
in (14) is free to delegate the decision because of the in nite delegation depth.
      </p>
      <p>iPhone says Apple can say1 app is installable:
AndroidPhone says AndroidUser can say1 app is installable:</p>
      <p>AndroidUser says Google can say0 app is installable:</p>
      <p>
        Similarly comparisons can be made when apps try to access resources. When
accessing components like the address book or photos; on iOS this is only allowed
when the user has explicitly okayed it. Other operating systems such as
Windows Mobile also follow this pattern. On Android, however, an app can access
any resource it declared itself as requiring it when it was installed.
(
        <xref ref-type="bibr" rid="ref12">12</xref>
        )
(
        <xref ref-type="bibr" rid="ref13">13</xref>
        )
(14)
(15)
(16)
(17)
(18)
iPhone says User can say0 app can access resource:
AndroidPhone says app can access resource
if app is installable;
      </p>
      <p>app requires resource:</p>
      <p>This is a brief comparison of the implicit device policies in current markets. It
shows however that SecPAL is capable of describing the various di erence. This
could be extended in future to allow proper comparisons of di erent markets.
5</p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion and future directions</title>
      <p>We have given a brief introduction to App Guarden and the SecPAL language
used to describe policies. Using the SecPAL language we described some of the
di erences between current systems. The PhD work here is at an early stage.
Next steps will include porting the SecPAL language to Android and using it to
nd what kinds of device policies are most e ective at stopping dangerous apps,
without overly inconveniencing the user. From here we will build an enhanced
app market with its own set of policies where apps come with digital evidence
to allow users to trust apps further.</p>
      <p>Mobile devices are a growing target for malware, and with app stores
appearing in conventional computers the di erences between mobile and traditional
computing environments are blurring. The App Guarden will help give users
greater assurance their software is secure; and provide a new security
mechanism to compliment access control and anti-malware techniques.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>M.</given-names>
            <surname>Abadi</surname>
          </string-name>
          .
          <article-title>Logic in access control</article-title>
          .
          <source>18th Annual IEEE Symposium on Logic in Computer Science</source>
          , pages
          <volume>228</volume>
          {
          <fpage>233</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>D.</given-names>
            <surname>Barrera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Clark</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>McCarney</surname>
          </string-name>
          ,
          <string-name>
            <surname>and P.C. van Oorschot. Understanding</surname>
          </string-name>
          <article-title>and improving app installation security mechanisms through empirical analysis of android</article-title>
          .
          <source>In Security and Privacy in Smartphones and Mobile Devices</source>
          , pages
          <volume>81</volume>
          {
          <fpage>12</fpage>
          , New York, New York, USA,
          <year>2012</year>
          . ACM Press.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>G.</given-names>
            <surname>Barthe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Beringer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Cregut</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Gregoire</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hofmann</surname>
          </string-name>
          , P. Muller, E. Poll, G. Puebla,
          <string-name>
            <surname>I. Stark</surname>
          </string-name>
          , and E.ric Vetillard. MOBIUS: Mobility, Ubiquity, Security.
          <source>Trustworthy Global Computing</source>
          ,
          <volume>4661</volume>
          (Chapter 2):
          <volume>10</volume>
          {
          <fpage>29</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>M.Y.</given-names>
            <surname>Becker</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Fournet</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.D.</given-names>
            <surname>Gordon</surname>
          </string-name>
          .
          <article-title>SecPAL: Design and semantics of a decentralized authorization language</article-title>
          .
          <source>Technical report, Microsoft Research</source>
          ,
          <year>2006</year>
          . MSR-TR-2006-120.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>W.</given-names>
            <surname>Enck</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Gilbert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.G.</given-names>
            <surname>Chun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.P.</given-names>
            <surname>Cox</surname>
          </string-name>
          , and
          <string-name>
            <surname>J. Jung.</surname>
          </string-name>
          <article-title>TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones</article-title>
          .
          <source>OSDI</source>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>W.</given-names>
            <surname>Enck</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>McDaniel. Not So Great Expectations</surname>
          </string-name>
          .
          <source>Secure Systems</source>
          , pages
          <fpage>1</fpage>
          <lpage>{</lpage>
          3,
          <string-name>
            <surname>September</surname>
          </string-name>
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>A.P.</given-names>
            <surname>Felt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Chin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Hanna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Song</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Wagner</surname>
          </string-name>
          . Android permissions demysti ed.
          <source>Computer and Communications Security</source>
          , pages
          <volume>627</volume>
          {
          <fpage>638</fpage>
          ,
          <year>October 2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>G.C.</given-names>
            <surname>Necula</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Lee. Proof-Carrying Code</surname>
          </string-name>
          .
          <source>Technical report</source>
          , Carnegie Mellon University,
          <year>January 1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>J.</given-names>
            <surname>Oberheide</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Miller</surname>
          </string-name>
          .
          <article-title>Dissecting the android bouncer</article-title>
          .
          <source>SummerCon</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>A. Porter Felt</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Finifter</surname>
            , E. Chin, and
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Hanna</surname>
          </string-name>
          .
          <article-title>A survey of mobile malware in the wild</article-title>
          .
          <source>Proceedings of the 1st Workshop on Security and Privacy in Smartphones and Mobile Devices, CCS-SPSM11</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. I. Stark. Reasons to Believe:
          <article-title>Digital Evidence to Guarantee Trustworthy Mobile Code</article-title>
          .
          <source>In The European FET Conference</source>
          , pages
          <volume>1</volume>
          {
          <fpage>17</fpage>
          ,
          <year>September 2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>N.</given-names>
            <surname>Whitehead</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Abadi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Necula</surname>
          </string-name>
          .
          <article-title>By reason and authority: a system for authorization of proof-carrying code</article-title>
          .
          <source>In Computer Security Foundations Workshop</source>
          ,
          <year>2004</year>
          .
          <source>Proceedings. 17th IEEE</source>
          , pages
          <volume>236</volume>
          {
          <fpage>250</fpage>
          . IEEE,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Zhou</surname>
          </string-name>
          , and
          <string-name>
            <given-names>X.</given-names>
            <surname>Jiang</surname>
          </string-name>
          .
          <article-title>Hey, you, get o of my market: Detecting malicious apps in o cial and alternative android markets</article-title>
          .
          <source>Proceedings of the 19th Annual Symposium on Network and Distributed System Security</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>