<!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>Domain-Specific Languages for Digital Forensics</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Centrum Wiskunde</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>Due to strict deadlines, custom requirements for nearly every case and the scale of digital forensic investigations, forensic software needs to be extremely flexible. There is a clear separation between different types of knowledge in the domain, making domain-specific languages (DSLs) a possible solution for these applications. To determine their effectiveness, DSL-based systems must be implemented and compared to the original systems. Furthermore, existing systems must be migrated to these DSL-based systems to preserve the knowledge that has been encoded in them over the years. Finally, a cost analysis must be made to determine whether these DSL-based systems are a good investment.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Digital forensic investigations are nearly exclusively performed using software, but
high pressure in the form of strict deadlines combined with case-specific requirements
severely complicates its use. The problems associated with constantly changing
software are well-known [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. This research attempts to address this problem by
introducing and migrating to DSL-based systems.
      </p>
      <p>
        The use of software in digital forensics is the result of constantly increasing storage
device sizes (a gigabyte halves in price every fourteen months [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]), increasing
connectivity (the amount of households having a broadband connection has more than doubled
in the past five years [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]) and the pervasiveness of digital devices (currently there are
more active mobile phones in The Netherlands than there are citizens [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]).
      </p>
      <p>This explosion in connectivity and storage capacity has many advantages, but also
drawbacks, one of them being the increased use of these capabilities by criminals. This
in turn has caused both the amount and scale of digital forensic investigations to
explode. Extensive automation appears to be the only feasible approach to deal with these
increases, as manual inspection of even a single gigabyte for possible evidence could
take years to complete.</p>
      <p>Some things haven’t changed however, including legal requirements around
(precharge) detainment of suspects. This means that forensic investigations nearly always
have very strict deadlines. Additionally, the variety of devices, applications and
communication channels ensures that digital forensic investigations typically require custom
tools.</p>
      <p>Application-specific knowledge, in the form of communication protocols, storage
device layouts and embedded systems implementation details are often case-specific
while the software used to recover data are tools implementing general algorithms.
The algorithms rarely have to change (although new ones regularly emerge), but the
specifications they are working with constantly change.</p>
      <p>Solutions exist that employ methods of software reuse and abstraction to reduce
modification time, but in practice it turns out that these still require software engineers
to actually make the changes. In a situation where a large amount of changes to software
must be made within a couple of days, the process of transferring knowledge to software
engineers who then make the actual changes is time-consuming, error-prone and hard
to trace.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Brief Overview of Related Work</title>
      <p>
        Extensible digital forensic applications exist, such as TULP2G [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for analyzing
embedded devices and ReviveIt [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] and Scalpel [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] for recovering lost and hidden files
from storage devices. They all have similar limitations however in that they tangle
implementation of application-specific knowledge (e.g. file formats and memory
layouts) and recovery algorithms. In TULP2G, the application-specific knowledge in the
form of communication protocols must be defined in an imperative language along with
the recovery algorithms. Both ReviveIt and Scalpel use an external notation to specify
application-specific knowledge in the form of file format specifications, but their
notation is heavily based on the actual recovery algorithms used, making it difficult to
develop new algorithms without changing the search patterns.
      </p>
      <p>
        There is a lot of research in interpreting structured data. Parsing techniques [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
using grammar formalisms such as ANTLR [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] and SDF2 [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] are targeted at textual
programming languages however and lack features to support complex data
dependencies between elements in a protocol, file format or memory structure. Data-dependent
grammars extend traditional parsing technology to allow the definition of such
dependencies [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. These grammars are used to derive parsers for Data Description Languages
(DDLs) [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. PADS/ML [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], DataScript [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and Zebu [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] are all examples of a such
DDLs. These DDLs are typically positioned as productivity-enhancing tools for
programmers, making them less suitable for use in forensic investigations where users are
often reverse engineering data structures instead of developing them from scratch.
      </p>
      <p>
        There is extensive work in the area of developing DSLs [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], however
some open questions remain such as how to use knowledge from existing systems in
their design.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Proposed Solution</title>
      <p>Our proposed solution is to develop one or more DSLs to meet the challenges posed by
digital forensics. Model-driven engineering in general and DSLs in particular may be a
good fit for digital forensic software.
3.1</p>
      <sec id="sec-3-1">
        <title>General Approach</title>
        <p>An analysis of both literature and practice shows that digital forensic investigations
often have multiple concerns that may be valuable in applying a model-driven approach:
Application-specific knowledge Information that is application-specific refers to
knowledge about devices, formats and protocols that are specific to a certain brand,
type, standard or version of something. For example, when analyzing
communication streams, this includes the protocols and compression and encryption methods.
When analyzing a digital storage device (e.g., a hard drive), this includes the disk
layout, file systems and file formats. When analyzing an embedded system (e.g., a
mobile phone), this includes the memory layout.</p>
        <p>Recovery algorithms Methods that belong to this category are techniques that take
application-specific knowledge and use algorithms to recover data from the actual
stream, storage or embedded device. They are often specific for a certain area of
digital forensics, such as reassembly and identification algorithms for recovering
deleted or hidden files from a confiscated hard drive. Although specific for a certain
area, they are independent of specific changes to a format or version.</p>
        <p>The proposed solution to increase usability and modifiability is to create one or
several DSLs for forensic investigators. This will allow them to express application-specific
knowledge that they obtain during their investigations in a language that is
appropriate to them and abstract away all implementation details such as recovery algorithms.
These in turn will be implemented in general-purpose languages and be maintained by
software engineers.</p>
        <p>However, to be able to do this several research questions must be addressed, such
as:
1. How can qualities such as flexibility and adaptability be compared between an
existing system and a DSL-based system?
2. How can the difference in development and maintenance costs between an existing
system and a DSL-based system be measured?
3. How should the form of a DSL be determined?
4. How can the knowledge encoded in an existing system be used in the design of a</p>
        <p>DSL?
5. How can a DSL be developed so that it can be maintained by general developers?
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Example Application</title>
        <p>An example application of the general approach discussed is a file carver. File carving
is the process of recovering deleted or damaged files from data storage devices (e.g.
hard drives). The implementation of file systems allows deleted files to often be
recoverable, although the contents of these files may be spread out across different sections
of a device. To undo this so-called fragmentation, file carving algorithms use
heuristics, operating system implementation details and file format recognizers to attempt to
recover complete files.</p>
        <p>If these recognizers are implemented using a general-purpose language, their method
of recognizing file types is typically hard-coded in each instance. Furthermore, they
may become tangled with the implementation of the recovery algorithms. A result is
that changing a recovery algorithm or adding a new file format requires a significant
software engineering effort.</p>
        <p>However, using a data description language to define file formats along with a code
generator to transform these declarative descriptions into recognizer implementations
may reduce the required effort significantly. Furthermore, separating definition of file
formats from the implementation of recovery algorithms may make it easier to modify
or add new algorithms afterwards. Finally, a code generator may perform additional
optimizations that would be difficult to perform manually (such as take several file
format definitions and generate a single recognizer, improving scalability by reducing
reads).
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Research Method</title>
      <p>To validate our hypothesis and answer the research questions, the following steps will
be undertaken:
DSL Development Experiments will be performed by implementing one or several
DSLs in the digital forensic domain. This will require experiments in the area of
domain analysis as well.</p>
      <p>DSL Validation The implemented DSL-based systems will be validated by comparing
them in general use to existing digital forensic software, to determine whether the
approach is viable in areas such as functionality, runtime performance and
flexibility.</p>
      <p>Automated Analysis Several techniques will be employed to aid DSL development:
– Automated model extraction to assist DSL design.
– Automated comparison between the existing systems and the DSL-based
systems, to find implementation differences and preserve knowledge.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>To keep up with the size of storage devices, speeds of network connections and amount
of digital devices in use, digital forensic investigations rely heavily on custom software
applications to perform large parts of analyses. However, the continuous introduction of
new consumer applications and devices requires forensic software to be exceptionally
flexible and adaptable.</p>
      <p>To realize these requirements, using domain-specific languages to raise the level
of abstraction and separate different concerns in the domain may be a viable approach.
However, this requires analysis, design and implementation of systems employing these
techniques as well as evaluation to compare existing systems to these alternative
solutions.</p>
      <p>This research will perform these steps by implementing one or several DSL-based
systems, comparing them to existing systems to determine their relative performance
and employ automated analysis techniques to aid in the design and preserve knowledge.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Back</surname>
          </string-name>
          , G.:
          <article-title>DataScript-a specification and scripting language for binary data</article-title>
          .
          <source>In: Proceedings of the 1st ACM SIGPLAN/SIGSOFT conference on Generative Programming and Component Engineering (GPCE'02)</source>
          . LNCS, vol.
          <volume>2487</volume>
          , pp.
          <fpage>66</fpage>
          -
          <lpage>77</lpage>
          . Springer (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2. van den Bos, J., van der Knijff, R.:
          <article-title>An Open Source Forensic Software Framework for Acquiring and Decoding Data Stored in Electronic Devices</article-title>
          .
          <source>International Journal of Digital Evidence</source>
          <volume>4</volume>
          (
          <issue>2</issue>
          ) (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Burgy</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reveillere</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lawall</surname>
            ,
            <given-names>J.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Muller</surname>
          </string-name>
          , G.:
          <article-title>A language-based approach for improving the robustness of network application protocol implementations</article-title>
          .
          <source>In: Proceedings of the 26th IEEE International Symposium on Reliable Distributed Systems (SRDS'07)</source>
          . pp.
          <fpage>149</fpage>
          -
          <lpage>160</lpage>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Centraal</given-names>
            <surname>Bureau voor de Statistiek: De Digitale Economie. CBS</surname>
          </string-name>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. van Deursen,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Klint</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Visser</surname>
          </string-name>
          , J.:
          <string-name>
            <surname>Domain-Specific Languages</surname>
          </string-name>
          :
          <article-title>An Annotated Bibliography</article-title>
          .
          <source>SIGPLAN Notices</source>
          <volume>35</volume>
          (
          <issue>6</issue>
          ),
          <fpage>26</fpage>
          -
          <lpage>36</lpage>
          (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Fisher,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Mandelbaum</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Walker</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          :
          <article-title>The Next 700 Data Description Languages</article-title>
          .
          <source>Journal of the ACM</source>
          <volume>57</volume>
          (
          <issue>2</issue>
          ),
          <fpage>1</fpage>
          -
          <lpage>51</lpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Grune</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jacobs</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Parsing Techniques-A Practical Guide</article-title>
          . Springer (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Jim</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mandelbaum</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Walker</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Semantics and Algorithms for Data-Dependent Grammars</article-title>
          .
          <source>In: Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'10)</source>
          . pp.
          <fpage>417</fpage>
          -
          <lpage>430</lpage>
          . ACM (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Kelly</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tolvanen</surname>
            ,
            <given-names>J.P.</given-names>
          </string-name>
          :
          <string-name>
            <surname>Domain-Specific</surname>
            <given-names>Modeling</given-names>
          </string-name>
          :
          <article-title>Enabling Full Code Generation</article-title>
          . WileyIEEE Computer Society Press (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Komorowski</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A History of Storage Cost (</article-title>
          <year>2009</year>
          ), http://www.mkomo.com/ cost-per-gigabyte
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Lehman</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Programs, life cycles, and laws of software evolution</article-title>
          .
          <source>Proceedings of the IEEE</source>
          <volume>68</volume>
          (
          <issue>9</issue>
          ),
          <fpage>1060</fpage>
          -
          <lpage>1076</lpage>
          (
          <year>1980</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Mandelbaum</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fisher</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Walker</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fernandez</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gleyzer</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>PADS/ML: A Functional Data Description Language</article-title>
          .
          <source>In: Proceedings of the 34th Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL'07)</source>
          . pp.
          <fpage>77</fpage>
          -
          <lpage>83</lpage>
          . ACM (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Mernik</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heering</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sloane</surname>
            ,
            <given-names>A.M.</given-names>
          </string-name>
          :
          <article-title>When and How to Develop Domain-Specific Languages</article-title>
          .
          <source>ACM Comput. Surv</source>
          .
          <volume>37</volume>
          (
          <issue>4</issue>
          ),
          <fpage>316</fpage>
          -
          <lpage>344</lpage>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Metz</surname>
          </string-name>
          , J.:
          <source>ReviveIt</source>
          <year>2007</year>
          , http://sourceforge.net/projects/revit/
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Parr</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>The Definitive ANTLR Reference: Building Domain-Specific Languages</article-title>
          . Pragmatic
          <string-name>
            <surname>Bookshelf</surname>
          </string-name>
          (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16. Richard, III,
          <string-name>
            <given-names>G.G.</given-names>
            ,
            <surname>Roussev</surname>
          </string-name>
          ,
          <string-name>
            <surname>V.</surname>
          </string-name>
          :
          <article-title>Scalpel: A Frugal, High Performance File Carver</article-title>
          .
          <source>In: Refereed Proceedings of the 5th Annual Digital Forensic Research Workshop (DFRWS'05)</source>
          (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Spinellis</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Notable design patterns for domain-specific languages</article-title>
          .
          <source>Journal of Systems and Software</source>
          <volume>56</volume>
          (
          <issue>1</issue>
          ),
          <fpage>91</fpage>
          -
          <lpage>99</lpage>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Visser</surname>
          </string-name>
          , E.:
          <article-title>Syntax Definition for Language Prototyping</article-title>
          .
          <source>Ph.D. thesis</source>
          , University of Amsterdam (
          <year>1997</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>