<!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>Pre-Deployment Security Assessment for Cloud Services through Semantic Reasoning (Extended Abstract)???</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Claudia Cauli</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Meng Li</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nir Piterman</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oksana Tkachuk</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Amazon Web Services</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Gothenburg</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Over the past ten years, the adoption of cloud services has grown rapidly, leading to the introduction of automated deployment tools to address the scale and complexity of the infrastructure that companies and users deploy. The practice of con guring, deploying, and updating systems resources from source code les is known as Infrastructure as Code (IaC) [17]. In addition to instructions relevant for resource creation, dependencies, and updates, IaC con guration les contain information about settings, data ow, and access control. Without the aid of automation, ensuring the security of such deployments becomes more and more challenging. In this study, we focus on the rst IaC tool ever introduced: Amazon Web Services' CloudFormation. In particular, we investigate the application of description logics to the formalization and reasoning over IaC deployments. We are interested in three aspects: (i) whether proposed cloud IaC con gurations comply with security best practices, (ii) how to aid users in building more secure infrastructure before deploying it, and (iii) to what extent formal automated techniques can support manual pre-deployment security reviews. We provide a framework to encode IaC into description logic, and investigate its e ectiveness in answering con guration queries and reasoning about data ow, trust boundaries, and potential issues within the system. Speci cally, we test DLs reasoning capabilities to infer new facts about underspeci ed resources (such as those not included in a given deployment but used by it) and leverage DLs open-world assumption to perform veri cation and refutation, depending on the property being checked. We formalize additional security knowledge that allows for checking system-level semantic properties; i.e., properties that consider the nature of the cloud environment and more complex reachability over an inferred graph representation of the infrastructure. Formalizing and Encoding Infrastructure as Code According to the IaC paradigm, resources are deployed on the cloud by writing one or more JSON-formatted con guration les, by which users con gure settings and communication of the desired instances. Con guration les must validate against the resource speci cations [10], which are les prescribing resource properties and their allowed values.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In this study, we formalized both con guration les and resource speci cations,
and encoded these into assertional and terminological knowledge, respectively.
Checking Compliance to Security Requirements We query the resulting models
with properties related to the security posture of the infrastructure being
deployed. Properties are grouped into three categories: security issues, mitigations,
and global protections, which we view in analogy to must and may speci cations,
which one would use to express that an issue may be present (vs. must be
absent) or that a protection must be in place (vs. may be missing). Di erent query
structure and pass/fail logic characterize each property type. We implement
the encoding and the security properties veri cation procedures in a
publiclyavailable tool, CloudFORMAL [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], and report on our ndings. When applying
the developed toolchain to publicly available deployment les, we nd
numerous violations of widely-recognized security best practices, which suggests that
streamlining the methodologies developed for this case study would be bene cial.
Semantic Reasoning for Data ow Analysis By extending the models with data
owspeci c knowledge, we use more comprehensive semantic reasoning to further
support security analyses. We manually craft two proof-of-concept ontologies of
terms related to cloud security. These formalize several common cloud terms,
such as account, deployment, authenticated and unauthenticated users; generic
data ow terms, such as storage, process, nodes, and ows of di erent kind; and
service-speci c data ow terms. By adding these on top of the underlying IaC
formal speci cation, we can reason about the higher-level business logic and
reachability of the infrastructure, and we can abstract it and visualize it in a
more convenient way. This is where the full inference power of description logics
comes into play.
      </p>
      <p>
        To the best of our knowledge, no formal automated technique currently exists to
verify cloud deployments during the design phase. Formal reasoning techniques
have been successfully applied to di erent aspects of the cloud, e.g. networks
and access policies [
        <xref ref-type="bibr" rid="ref1 ref11 ref2 ref3">11,3,1,2</xref>
        ]. Non-formal tools exist that recommend and run
checks against already deployed resources [
        <xref ref-type="bibr" rid="ref20 ref8">20,8</xref>
        ], or scan IaC templates [
        <xref ref-type="bibr" rid="ref21 ref6 ref7">7,6,21</xref>
        ] for
syntactical patterns violating security best practices. Large-scale con guration
problems have been tackled with description logic before [
        <xref ref-type="bibr" rid="ref15 ref16">15,16</xref>
        ]. Semantic-based
approaches, even DL-based, are being used to do conceptual modeling of security
engineers' expertise with the provable and explainable inference capabilities of
logics (see, e.g., the OWASP \Ontology-driven Threat Modeling" project [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]).
We took advantage of DL's open-world assumption to implement, in our
properties encoding, veri cation and falsi cation. An alternative approach would be
to use 3-valued models with labels on states and transitions and apply model
checking [
        <xref ref-type="bibr" rid="ref4 ref5">4,5</xref>
        ]. However, expressive branching-time logics [
        <xref ref-type="bibr" rid="ref14 ref19">14,19</xref>
        ] have not been
studied in the context of 3-valued models and we are also not aware of tool
support at the level available for DLs (cf. [
        <xref ref-type="bibr" rid="ref12 ref13">12,13</xref>
        ]).
      </p>
      <p>All the results in this study can be generalized to other existing IaC
frameworks. We plan to continue researching for an even better- tting description logic
Security Assessment for Cloud Services through Semantic Reasoning
formalism, query language, three-valued semantics, and decision procedures for
veri cation and falsi cation of properties relevant to security analyses, such as
data ows, trust boundaries, and threat modeling.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Backes</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bayless</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cook</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dodge</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gacek</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>A.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kahsai</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kocik</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kotelnikov</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kukovec</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McLaughlin</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reed</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rungta</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sizemore</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stalzer</surname>
            ,
            <given-names>M.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Srinivasan</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Subotic</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Varming</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Whaley</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Reachability analysis for aws-based networks</article-title>
          .
          <source>In: CAV (2). Lecture Notes in Computer Science</source>
          , vol.
          <volume>11562</volume>
          , pp.
          <volume>231</volume>
          {
          <fpage>241</fpage>
          . Springer (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Backes</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bolignano</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cook</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dodge</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gacek</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Luckow</surname>
            ,
            <given-names>K.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rungta</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tkachuk</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Varming</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Semantic-based automated reasoning for AWS access policies using SMT</article-title>
          . In: FMCAD. pp.
          <volume>1</volume>
          {
          <issue>9</issue>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Bouchenak</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chockler</surname>
            ,
            <given-names>G.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chockler</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gheorghe</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Santos</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shraer</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Verifying cloud services: present and future</article-title>
          .
          <source>Operating Systems Review</source>
          <volume>47</volume>
          (
          <issue>2</issue>
          ),
          <volume>6</volume>
          {
          <fpage>19</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bruns</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Godefroid</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Model checking partial state spaces with 3-valued temporal logics</article-title>
          .
          <source>In: CAV. Lecture Notes in Computer Science</source>
          , vol.
          <volume>1633</volume>
          , pp.
          <volume>274</volume>
          {
          <fpage>287</fpage>
          . Springer (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bruns</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Godefroid</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Model checking with multi-valued logics</article-title>
          .
          <source>In: ICALP. Lecture Notes in Computer Science</source>
          , vol.
          <volume>3142</volume>
          , pp.
          <volume>281</volume>
          {
          <fpage>293</fpage>
          . Springer (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>The AWS CloudFormation Linter</surname>
          </string-name>
          (
          <year>2020</year>
          ), https://github.com/ aws-cloudformation/cfn-python-lint,
          <source>Last accessed on 2020-10-15</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>The CFnNag Linting Tool</surname>
          </string-name>
          (
          <year>2020</year>
          ), https://github.com/stelligent/cfn_nag,
          <source>Last accessed on 2020-10-15</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Infrastructure</given-names>
            <surname>Security</surname>
          </string-name>
          , Compliance, and
          <string-name>
            <surname>Governance</surname>
          </string-name>
          (
          <year>2020</year>
          ), http://www. cloudconformity.com/,
          <source>Last accessed on 2020-08-04</source>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. CloudFORMAL: Prototype Implementation, http://github.com/claudiacauli/ CloudFORMAL, Last accessed on 2020-
          <volume>10</volume>
          -15
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Resource</surname>
          </string-name>
          <article-title>Speci cation (</article-title>
          <year>2020</year>
          ), https://docs.aws.amazon.com/ AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html,
          <source>Last accessed on 2020-08-13</source>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Cook</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Formal reasoning about the security of amazon web services</article-title>
          .
          <source>In: CAV (1). Lecture Notes in Computer Science</source>
          , vol.
          <volume>10981</volume>
          , pp.
          <volume>38</volume>
          {
          <fpage>47</fpage>
          . Springer (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>D'Ippolito</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fischbein</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chechik</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Uchitel</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>MTSA: the modal transition system analyser</article-title>
          .
          <source>In: ASE</source>
          . pp.
          <volume>475</volume>
          {
          <fpage>476</fpage>
          . IEEE Computer Society (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Gur</surname>
            <given-names>nkel</given-names>
          </string-name>
          , A.,
          <string-name>
            <surname>Wei</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chechik</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Yasm: A software model-checker for veri cation and refutation</article-title>
          .
          <source>In: CAV. Lecture Notes in Computer Science</source>
          , vol.
          <volume>4144</volume>
          , pp.
          <volume>170</volume>
          {
          <fpage>174</fpage>
          . Springer (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Kupferman</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Grumberg</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          :
          <article-title>Buy one, get one free!!!</article-title>
          <string-name>
            <given-names>J.</given-names>
            <surname>Log</surname>
          </string-name>
          . Comput.
          <volume>6</volume>
          (
          <issue>4</issue>
          ),
          <volume>523</volume>
          {
          <fpage>539</fpage>
          (
          <year>1996</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Resnick</surname>
            ,
            <given-names>L.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jr.</surname>
            ,
            <given-names>C.L.I.</given-names>
          </string-name>
          :
          <article-title>Description logic in practice: A CLASSIC application</article-title>
          .
          <source>In: IJCAI</source>
          . pp.
          <year>2045</year>
          {
          <year>2046</year>
          . Morgan Kaufmann (
          <year>1995</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>McGuinness</surname>
            ,
            <given-names>D.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wright</surname>
            ,
            <given-names>J.R.</given-names>
          </string-name>
          :
          <article-title>Conceptual modelling for con guration: A description logic-based approach</article-title>
          .
          <source>AI</source>
          EDAM
          <volume>12</volume>
          (
          <issue>4</issue>
          ),
          <volume>333</volume>
          {
          <fpage>344</fpage>
          (
          <year>1998</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Morris</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Infrastructure as code: managing servers in the cloud. "</article-title>
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          ,
          <source>Inc."</source>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>OWASP</surname>
          </string-name>
          Ontology-driven Threat Modeling, https://github.com/OWASP/OdTM, Last accessed on 2021-
          <volume>05</volume>
          -17
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Sattler</surname>
            ,
            <given-names>U.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vardi</surname>
          </string-name>
          , M.Y.:
          <article-title>The hybrid -calculus</article-title>
          .
          <source>In: IJCAR. Lecture Notes in Computer Science</source>
          , vol.
          <year>2083</year>
          , pp.
          <volume>76</volume>
          {
          <fpage>91</fpage>
          . Springer (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Multi-Cloud Security Auditing Tool</surname>
          </string-name>
          (
          <year>2020</year>
          ), http://github.com/nccgroup/ ScoutSuite, Last accessed on 2020-
          <volume>08</volume>
          -04
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <article-title>Static Analysis Security Scanner for Terraform (</article-title>
          <year>2020</year>
          ), https://tfsec.dev/,
          <source>Last accessed on 2021-05-10</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>