<!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>Gathering Malware Data through High-Interaction Honeypots</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Agentn</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>OKT srl</institution>
          ,
          <addr-line>Rende(CS)</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Calabria</institution>
          ,
          <addr-line>Rende(CS)</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The widespread and ever increasing number of services and devices which expose their interfaces to the Internet make the cyberspace a fertile ground for malware activities. Hence there is a strong demand for cybersecurity solutions ensuring their safe operation. Honeypots are networked computer systems purposely designed and crafted to mimic regular services, operating systems and devices with the goal of capturing and storing information about the interactions with attacking entities and we repute them a crucial technology in the study of cyber threats and attacks. We presents the main features of EMPHAsis, a data streaming analytics system based on high-interaction honeypots, which enables the collection and analysis of relevant data about intercepted malware.</p>
      </abstract>
      <kwd-group>
        <kwd>Honeypots</kwd>
        <kwd>Cybersecurity</kwd>
        <kwd>Data collection</kwd>
        <kwd>data streaming analytics</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The era of Internet of Things with billions of connected devices has created
an ever larger space for cyber attackers to exploit. In particular, there is a
widespread amount of automated bots scanning and probing the Internet to
search for vulnerable hosts. This has resulted in the need for fast and accurate
detection of possible system vulnerabilities and attackers by means of the
processing of the high-velocity, high-volume data from various sources to discover
anomalies and/or attack patterns as fast as possible to limit the vulnerability
of the systems and increase their resilience. Such data, generated in a real-time
data stream, need a big data streaming analysis [
        <xref ref-type="bibr" rid="ref13 ref9">13, 9</xref>
        ]: the output must be
generated with low-latency and any incoming data must be re ected in the newly
generated output within seconds. In other words, big data streaming analytics
Copyright © 2020 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0). This volume is published
and copyrighted by its editors. SEBD 2020, June 21-24, 2020, Villasimius, Italy.
tools must be able to identify new information, incrementally build models and
access whether the new incoming data deviate from model predictions.
      </p>
      <p>
        Even though many big data streaming analytics tools have been developed in
the past few years, their usage in the eld of cybersecurity is not immediate and
calls for new approaches as pointed out in [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The main issue is how to access in
real time to valuable data on possible attackers, typically log les and security
alerts generated by operating systems and applications across various hosts and
systems. A crucial point is to provide computer systems with software tools to
identify suspicious event log activity, such as repeated failed login attempts,
excessive CPU usage, large data transfers and immediate alert IT security analysts
when a possible Indicator of Compromise (IoC) is detected.
      </p>
      <p>
        It should be noted that the techniques and attack methods employed by
malwares are typically very simple, In fact, the most used attack method is often
brute-forcing login credentials of servers and, consequently, the most heavily
attacked services are Telnet, FTP and SSH services. There are many tools used
in computer security to catch such malicious actions and one e ective solution
involves the usage of honeypots. Honeypots [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] are decoy systems which aim
at emulating real services on the net in order to detect and attract malicious
agents. These emulated services are publicly displayed and their access is made
voluntarily simple to facilitate attackers' intrusions. This is done for example
by con guring accounts and services with weak credentials. After accessing the
service, all the activities of the malicious agents are subject to monitoring and
logging and become the object of study by specialists in the sector, in order
to be able to reconstruct with extreme precision the behavior of the attacker
and thus be able to prepare prevention measures to reduce the risk of future
attacks. Furthermore, it is possible to obtain valuable information concerning
the behavior of the attacker, the actions carried out on the target system and
the types of vulnerabilities exploited to complete the malevolent activity, which
can be subsequently shared with the academia and industry researchers.
      </p>
      <p>
        Here we present the main features of EMPHAsis, a distributed system
conceived to support malware detection by acting as a high-interaction
honeypot [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. The system is able to collect and disseminate information about new
threats that proliferate every day on the Internet by providing researchers with
fresh data that could help them to devise possible countermeasures against
malicious tra c. In addition to its detection, logging and monitoring capabilities,
EMPHAsis is capable to capture di erent malware binaries and to exploit
external services for analyze them.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>System Architecture</title>
      <p>While malware's actions may vary depending on the targeted system, there are
only few points of interest that need to be observed and analyzed: network
information, the commands executed, processes created, kernel drivers loaded
and the les created or modi ed by the malicious agent. Each attacker's action
is processed by EMPHAsis according to the functional architecture depicted
in Figure 1 discussed next. The system operates by constructing dynamically
Proxy</p>
      <p>Scheduler
virtual environments (sandboxes) to which all tra c generated by the attacker
is redirected out. Each environment is equipped with several specialized probes,
whose goal is to monitor in a completely transparent way to the malicious entity,
speci c critical events that occur in the attack scenario at hand. All the data
collected by the probes is eventually stored and indexed for subsequent use (e.g.,
in order to devise appropriate countermeasures) and possible disclosure.</p>
      <p>In more details, the EMPHAsis architecture consists of several modules each
of which is in charge of performing a speci c task. The core is the most
important module which plays the role of coordinating the operations between all
the other modules of the system. Furthermore, it provides a graphical
environment for managing the system, to help real-time monitoring and to visualize
the collected data. When a connection attempt reaches the system, the agent
module checks whether there is a con gured service to handle the request. If a
suitable service exists, a virtual trap environment is built and executed on the
y and all the attacker's tra c is then redirected out to it. The upper part of
Figure 2 shows the main steps performed by the agent module in response to
an attack. In more detail, as a preliminary step the proxy component noti es
a new connection arrival to the core module while collecting also information
about the geographical origin of the attack. Then, it continues by performing
payload detection and if a suitable service is found, the request is handled and
the scheduler component is allerted. The scheduler is the main responsible for
the virtual trap environment setup. After receiving an alert from the proxy, it
prepares and starts the sandbox and then injects one or more probes directly into
the isolated environment. These probes will monitor all the actions performed
by the attacker (or malware) inside the sandbox. In particular, in the lower part
of Figure 2 is shown an example of a speci c case where four probes are in place
and used for monitoring networking events, commands executed in the system
Proxy
Scheduler 1. Notifies connection
4. Attacker's traffic redirection
3. Probe injection
2. Virtual trap enviroment setup</p>
      <p>Sandbox</p>
      <p>Agent
NPertwoboerk PSrhoeblel PProrocbeess</p>
      <p>Network traffic Shell commands IPnrotecrecsespctiroenation
Interception Interception</p>
      <p>FileSystem
Probe
Filesystem changes</p>
      <p>Interception
Exposed service (e.g., SSH)</p>
      <p>Logged events are sent to the database</p>
      <p>
        Sandbox
shell, process creations, and changes to the lesystem. It should be noted that
the concrete implementation of these probes poses technical challenges. Indeed,
one needs to use speci c tools and instruments according to the type of operating
system used by the emulated guest machine. Our probes support a custom
32bit Linux kernel and we rely on QEMU-KVM to emulate this platform. Further
implementation details can be found in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. It is interesting to notice that our
implementation of the agent exploits a fake interactive session where attacker's
tra c is man-in-the-middle proxied. This is achieved by using a custom shell
implementation.
      </p>
      <p>
        The storage module comprehends one or more nodes in a redundant con
guration whose role is to o er all standard operations for storage and subsequent
consultation of the collected data. An attack can produce a signi cant amount
of information, which therefore needs to be properly cataloged and organized
for subsequent consultation. To this end, our system exploits appropriate
components for the storage and processing of such information, making it suitable
for the production of detailed reports and in characterizing the threats detected.
Additionally, the above processing can be customized by the user for the
speci c resources she is most interested in. In particular, an individual storage node
uses both a MongoDB NoSQL database [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and an Elasticsearch database [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
The MongoDB holds the users' credentials required to access the control and
the data analytic dashboard, stores the con guration (including custom kernel
images and the probes) which will be downloaded by the agent module during
the initialization phase of the sandboxes. and stores the captured malware
samples. The system will then send over all the security events described above to
the Elasticsearch database. Such events can be visualized by the built-in
dashboard (see section 3) which exploits a Kibana instance for advanced ltering
mechanisms.
      </p>
      <p>
        A key aspect in order to achieve e ective results (in terms of number of
malicious actions logged and malware instances intercepted) concerns the correct
positioning of the honeypots in the infrastructure to be protected. Thus, there
is signi cant motivation for studying the best possible locations where agent
modules (and honeypots in general) can be deployed in a network. Interestingly,
EMPHAsis agents can be deployed both behind or outside the perimeter of
the network, therefore allowing to detect also potential insider threats. In any
case, deploying honeypots in a production environment can be problematic since
it could expose the network to far greater risks than the threats from which
it is intended to be protected. Towards this end, it is essential to study and
analyze the way honeypots interact with the rest of the system before the actual
deployment. This could be done by using virtual simulation environments, such
as the one described in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] which allow to reproduce multiple operating systems
as well as networks in a realistic and controlled way.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Collected Data</title>
      <p>All of the security events collected through the probes are sent to the storage
module and stored in the Elasticsearch database allowing for fast real-time access
through the dashboard. More precisely, we construct a single index which is
shared by every probe of any agents running in the system. Figure 3 shows the
main panel of the dashboard which displays the information about the active
sandboxes, under the control of the core module, and the number of intercepted
attacks. The lower part of the panel reports some statistics about the last ve
days of operation: the percentage of sandboxes launched, grouped by their type,
and the top-10 IP addresses from where the majority of connections to the
sandboxes have been established.</p>
      <p>It is possible to inspect the details speci c to each sandbox and to access the
data collected by the active probes. Figure 4 shows a panel, for a given
sandbox, which is organized in more tabs each of which reports speci c information
according to the following categories: shell, network, lesystem and processes.</p>
      <p>For those sandboxes related to services based on interactive sessions, e.g. ssh
or ftp, the ow of messages exchanged (i.e. commands executed and responses)
between the attacking entity and the sandbox, is available in the shell logs tab
(the one active in the panel of Figure 4). Figure 4 depicts a scenario where the
attacker, once logged as the admin user, successfully attempted to download a
shell script from a remote host and then executed it inside the sandbox shell
environment.</p>
      <p>Figure 5 shows the network log tab, which allows to visualize the information
about the network events relevant to the service exposed by the sandbox. In the
speci c case reported in the gure, some ssh login attempts, part of a brute-force
attack directed to gain access as the root user, are visible.</p>
      <p>When a malware successfully gain access to a sandbox, from where it is
possible to modify the content of the local lesystem, e.g. from a ssh session,
such modi cations are tracked and the relevant events (i.e. lesystem related
system calls invocations) displayed in the lesystem log tab as shown in Figure 6.
Such events are grouped on the basis of the speci c path and ordered by the
timestamp of execution.</p>
      <p>In a similar way, the processes log tab displays the time intervals when
processes launched by a malware from inside the sandbox are executed.</p>
      <p>
        The EMPHAsis probes are able to capture and store in the system database
all the les dropped by an attacker (e.g. shell scripts, binary les, source code)
during a session. Before being stored, such les undergo a basic analysis by
resorting to the malware identi cation and classi cation services o ered by
Virustotal [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ] and those developed by Cythereal [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. In particular the Cythereal
MAGIC API [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] exploits a state-of-art machine-learning based malware
analysis system which is able to identify the belonging family of a malware even in
presence of sophisticated code obfuscation techniques.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusions and Future works</title>
      <p>
        We presented the main functionalities of EMPHAsis and it practical
applicability for malware capturing, analysis and prevention. EMPHAsis exploits
highinteraction honeypots and has a modular and extensible architecture making it
e ective and suitable for various practical deployment scenarios. Currently
EMPHAsis features the emulation of Linux based systems on top of which the great
majority of Internet exposed services are based on. Moreover, it can be easily
extended to support other unix-based systems. As a future work, we plan to
support also computer systems based on Microsoft Windows or on Apple macOS.
Another important direction of improvement is the integration of EMPHAsis
with more advanced data analysis tools speci cally tailored to cybersecurity
events, i.e. the so called security information and event management systems
(SIEM), like IBM QRadar [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] and ElasticSIEM [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], which has been recently
developed on top of Elasticsearch. We also plan to extend the interoperability of
EMPHAsis with other malware analysis tools, like for example cuckoo [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
sanbox, and to integrate in it virtual environment technologies for building more
realistic and complex decoy environments [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], e.g. honeynets, and thus increasing
the e ectiveness in capturing more sophisticated malware.
      </p>
      <p>Acknowledgments This research has been supported by the ISCOM - Italian
Ministry of Economic Development under agreement EMPHAsis (CUP B51G17000300006).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>1. Cuckoo. https://cuckoosandbox.org/.</mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <article-title>2. Cythereal, changing the rules of cyber engagement</article-title>
          . http://www.cythereal.com.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>3. Elasticsearch. https://www.elastic.co/products/elasticsearch.</mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>4. Mongodb. https://www.mongodb.com.</mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Pelin</given-names>
            <surname>Angin</surname>
          </string-name>
          ,
          <string-name>
            <surname>Bharat K. Bhargava</surname>
            , and
            <given-names>Rohit</given-names>
          </string-name>
          <string-name>
            <surname>Ranchal</surname>
          </string-name>
          .
          <article-title>Big data analytics for cyber security</article-title>
          .
          <source>Security and Communication Networks</source>
          ,
          <year>2019</year>
          :
          <volume>4109836</volume>
          :1{
          <issue>4109836</issue>
          :
          <fpage>2</fpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>Michele</given-names>
            <surname>Bombardieri</surname>
          </string-name>
          , Salvatore Castano, Fabrizio Curcio, Angelo Furfaro, and
          <string-name>
            <given-names>Helen D.</given-names>
            <surname>Karatza</surname>
          </string-name>
          .
          <article-title>Honeypot-powered malware reverse engineering</article-title>
          . In 2016 IEEE International Conference on Cloud Engineering Workshop, IC2E Workshops, Berlin, Germany, April 4-
          <issue>8</issue>
          ,
          <year>2016</year>
          , pages
          <fpage>65</fpage>
          {
          <fpage>69</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Angelo</given-names>
            <surname>Furfaro</surname>
          </string-name>
          , Luciano Argento, Andrea Parise, and Antonio Piccolo.
          <article-title>Using virtual environments for the assessment of cybersecurity issues in iot scenarios</article-title>
          .
          <source>Simulation Modelling Practice and Theory</source>
          ,
          <volume>73</volume>
          :
          <fpage>43</fpage>
          {
          <fpage>54</fpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>8. IBM. QRadar. https://www.ibm.com/security/security-intelligence/qradar.</mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Taiwo</given-names>
            <surname>Kolajo</surname>
          </string-name>
          , Olawande Daramola, and
          <string-name>
            <given-names>Ayodele</given-names>
            <surname>Adebiyi</surname>
          </string-name>
          .
          <article-title>Big data stream analysis: a systematic literature review</article-title>
          .
          <source>J. Big Data</source>
          ,
          <volume>6</volume>
          :
          <fpage>47</fpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>Mike</given-names>
            <surname>Paquette</surname>
          </string-name>
          .
          <article-title>Introducing Elastic SIEM</article-title>
          . https://www.elastic.co/blog/introducing-elastic-siem,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>Lance</given-names>
            <surname>Spitzner</surname>
          </string-name>
          .
          <article-title>The honeynet project: Trapping the hackers</article-title>
          .
          <source>IEEE Security &amp; Privacy</source>
          ,
          <volume>1</volume>
          (
          <issue>2</issue>
          ):
          <volume>15</volume>
          {
          <fpage>23</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>Lance</given-names>
            <surname>Spitzner</surname>
          </string-name>
          .
          <article-title>Honeypots: Catching the insider threat</article-title>
          .
          <source>In 19th Annual Computer Security Applications Conference (ACSAC</source>
          <year>2003</year>
          ),
          <fpage>8</fpage>
          -
          <issue>12</issue>
          <year>December 2003</year>
          ,
          <string-name>
            <given-names>Las</given-names>
            <surname>Vegas</surname>
          </string-name>
          ,
          <string-name>
            <surname>NV</surname>
          </string-name>
          , USA, pages
          <volume>170</volume>
          {
          <fpage>179</fpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Nicoleta</surname>
            <given-names>Tantalaki</given-names>
          </string-name>
          , Stavros Souravlas, Manos Roumeliotis, and
          <string-name>
            <given-names>Stefanos</given-names>
            <surname>Katsavounis</surname>
          </string-name>
          .
          <article-title>Linear scheduling of big data streams on multiprocessor sets in the cloud</article-title>
          . In Payam M. Barnaghi, Georg Gottlob, Yannis Manolopoulos, Theodoros Tzouramanis, and Athena Vakali, editors,
          <source>2019 IEEE/WIC/ACM International Conference on Web Intelligence</source>
          ,
          <string-name>
            <surname>WI</surname>
          </string-name>
          <year>2019</year>
          , Thessaloniki, Greece,
          <source>October 14-17</source>
          ,
          <year>2019</year>
          , pages
          <fpage>107</fpage>
          {
          <fpage>115</fpage>
          . ACM,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Virustotal</surname>
          </string-name>
          .
          <article-title>How it works</article-title>
          . https://support.virustotal.com/hc/enus/articles/115002126889-
          <string-name>
            <surname>How-</surname>
          </string-name>
          it-works.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>