Contents

SunnyStation (Malware Traffic Analysis)

Reference:

https://www.malware-traffic-analysis.net/2022/02/23/index.html


SCENARIO

LAN segment data:

1
2
3
4
5
6
LAN segment range:  172.16.0.0/24 (172.16.0.0 through 172.16.0.255)
Domain:  sunnystation.com
Domain controller:  172.16.0.52 - SUNNYSTATION-DC
File Server:  172.16.0.53 - SUNNYFILESERVER
LAN segment gateway:  172.16.0.1
LAN segment broadcast address:  172.16.0.255

Topology View: /images1/image-546.webp

We will start adding more to this topology as we investigate.

The aim of this incident response report

1
2
What hosts/user account names are active on this network?
What type of malware are they infected with?

  • RITA/ZEEK
  • BRIM
  • OSINT Tools (AlienVault, VT, HybridAnalysis, etc…)

We will use more tools as we go along, but for now, these are the tools I plan on using.

First thing first, Let’s go for the low-hanging fruits. We can first start looking at the alerts.

When we first open our pcap using the brim. We see that we got alerts of MALWARE FormBook. That is one of our goals completed (What type of malware are they infected with).

Let’s hone in on the alerts by using this query:

event_type=="alert" | sort -r ts

/images/image-551.webp

Let’s focus on the traffic that was flagged as MALWARE FormBook.

Query:

1
event_type=="alert" alert.signature=="ET MALWARE FormBook CnC Checkin (GET)" | sort -r ts

Now, the following information we’re looking for is where the traffic is from and where it is going.

1
2
event_type=="alert" alert.signature=="ET MALWARE FormBook CnC Checkin (GET)" 
| cut src_ip, src_port, dest_ip, dest_port | sort dest_ip -n
/images1/image-552.webp

From a glance, we can see that most of this traffic is from: 172.16.0.131.

Let’s get a list of only the destination.

/images1/image-553.webp

213.186.33.5, 198.185.159.144, 23.227.38.74, and 216.58.193.147 are the most important destinations.

Let the map get the hostname of each destination IP

Here’s the IP:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
216.172.184.77
216.58.193.147
213.186.33.5
209.17.116.163
198.185.159.144
198.54.117.215
198.54.117.210
194.9.94.85
184.168.99.26
173.231.37.114
154.206.65.249
120.55.51.124
104.21.89.147
104.16.12.194
72.167.191.69
66.235.200.112
66.29.145.216
23.227.38.74
3.130.253.23

Now, let’s go to our HTTP.log and only show results that match our destination IP

1
2
3
4
_path=="http" id.resp_h in [216.172.184.77, 216.58.193.147, 213.186.33.5, 209.17.116.163, 198.185.159.144,
 198.54.117.215, 198.54.117.210, 194.9.94.85, 184.168.99.26, 173.231.37.114, 154.206.65.249,
 120.55.51.124, 104.21.89.147, 104.16.12.194, 72.167.191.69, 66.235.200.112, 
 66.29.145.216, 23.227.38.74, 3.130.253.23]

This is what we get; as you can see, it only shows results that match the destination IP. Since this is an eyesore, we can filter it to show only the dest_ip and the host.

/images1/image-554.webp

Query:

1
2
3
4
_path=="http" id.resp_h in [216.172.184.77, 216.58.193.147, 213.186.33.5, 209.17.116.163,
 198.185.159.144, 198.54.117.215, 198.54.117.210, 194.9.94.85, 184.168.99.26, 173.231.37.114,
 154.206.65.249, 120.55.51.124, 104.21.89.147, 104.16.12.194, 72.167.191.69, 66.235.200.112,
 66.29.145.216, 23.227.38.74, 3.130.253.23] | cut id.resp_h, host
/images1/image-555.webp

Since some queries are repeated, we can sort them and count how many times it was searched.

/images1/image-556.webp

There we go. We got our domains. Next, We can use our OSINT tools to see if these domains are known to host malicious content.

Here are some OSINT tools we can use:

Reference: https://www.activecountermeasures.com/hunt-training/

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
https://www.abuseipdb.com/check/<IP Address>
https://otx.alienvault.com/indicator/ip/<IP Address>
https://search.censys.io/hosts/<IP Address>
https://dns.google/query?name=<IP Address>
https://www.google.com/search?q=<IP Address>
https://www.onyphe.io/search/?query=<IP Address>
https://securitytrails.com/list/ip/<IP Address>
https://www.shodan.io/host/<IP Address>
https://www.virustotal.com/gui/ip-address/<IP
Address>/relations

Since most of these OSINT tools require IP… I think it helps that I provide them to you. /images1/image-560.webp

I will be checking www.seo-python.com. /images1/image-559.webp /images1/image-557.webp /images1/image-562.webp

391 / 781? Wow, that’s bad, and Anti-Virus Detection is picking up so many viruses that use this domain. Let’s try another OSINT site, even though we already know the outcome. /images1/image-563.webp /images1/image-564.webp

Hosting a lot of malicious .exe /images1/image-565.webp

We can conclude that seo.python.com is malicious. We will repeat these searches for all of the domains.

For the sake of the length of this blog, I will not show you the whole process. However, I will show you the final verdict of each domain that we listed.

Additionally, one thing I want to point out is an IOC (Indicator of Compromise of Formbook). The IOC of the formbook is URI syntax: /…./ /images1/image-566.webp

In our case, it: is /uar3/. However, there is a variety of Formbook. Each with its own different URI. For example: In this youtube video, the creator of this video ran into a formbook that was using /e8bw/ similar to what we have.

Alright, let’s investigate the rest of the domain.


Valuating Domain:

www[.]keysine[.]com

IP: 3.130.253.23

AbuseIPDB: Bad
/images1/image.webp

AlienVault: Bad /images1/image-1.webp

Censys:
/images1/image-2.webp

We can ask ourselves whether we have any business in Ohio Columbus. If not, then… our connection should not be going over there.

VirusTotal: Bad

Even though the domain is clean /images1/image-4.webp

It is still communicating with these malware files… /images1/image-3.webp

Verdict: Bad


www[.]db-propertygroup[.]com

www[.]katchybugonsale[.]com

IP: 23.227.38.74

AbuseIPDB:
/images1/image-5.webp

AlienVault:
/images1/image-6.webp

VirusTotal:
/images1/image-7.webp /images1/image-8.webp

Verdict: Bad


www[.]ban-click[.]com

IP: 66.29.145.216
/images1/image-9.webp

AbuseIPDB: Normal
/images1/image-10.webp

Alienvault: Bad /images1/image-11.webp

We can see the associated URL link to this domain. /images1/image-12.webp

For example:

hxxp[://]www[.]ban-click[.]com/nazb/?z6A0I=GTUU6TSGNU9V68PuMJrIjgmnZDXjjER6xZVFHsTzArWrQNdiz7pIihV6Ed0WlMWJRzk=&pZ=ht80axMpghz was flagged. So it is essential to analyze the other URL that it is associated with. /images1/image-13.webp

VirusTotal: Bad /images1/image-14.webp /images1/image-15.webp /images1/image-16.webp Verdict: Bad


www[.]riskprotek[.]com

IP: 66.235.200.112

AbuseIPDB:
/images1/image-17.webp

AlienVault: Bad /images1/image-18.webp images1/image-19.webp /images1/image-21.webp

VirusTotal: Bad /images1/image-23.webp /images1/image-22.webp

Verdict: Bad


www[.]privilegetroissecurity[.]com

IP: 72.167.191.69

AbuseIPDB: Bad
/images1/image-24.webp

It’s essential to see what the reporter says in the comment to ensure it is a valid response. /images1/image-25.webp

Alienvault: Bad /images1/image-26.webp

/images1/image-27.webp

VirusTotal: Bad
/images1/image-28.webp

/images1/image-29.webp

Verdict: Bad


www[.]theperfecttrainer[.]com

IP: 104.16.12.194

AbuseIPDB: Bad
/images1/image-30.webp

AlienVault: Bad /images1/image-31.webp

VirusTotal: Bad /images1/image-32.webp

/images1/image-33.webp

Verdict: Bad


www[.]hydrocheats[.]com

IP: 104.21.89.147

AbuseIPDB: Normal
/images1/image-34.webp

AlienVault: Normal /images1/image-35.webp /images1/image-36.webp /images1/image-37.webp

After looking at the DNS and URLs, I don’t see anything suspicious.

VirusTotal: Bad /images1/image-38.webp

Verdict: Bad


www[.]nt-renewable[.]com

IP: 120.55.51.124

AbuseIPDB: Normal (But suspicious if we don’t have any business in china) /images1/image-39.webp

AlienVault: Bad /images1/image-41.webp /images1/image-40.webp

VirusTotal: Bad /images1/image-42.webp

Verdict: Bad


www[.]czzhudi[.]com

IP: 154.206.65.249

AbuseIPDB: Normal
/images1/image-43.webp

AlienVault: Normal /images1/image-44.webp

VirusTotal: Bad /images1/image-45.webp

Verdict: Bad


www[.]chinadqwx[.]com

IP: 173.231.37.114

AbuseIPDB: Normal
/images1/image-46.webp

AlienVault: Normal /images1/image-47.webp

VirusTotal: Bad
/images1/image-49.webp /images1/image-48.webp

Verdict: Bad


www[.]awridahmed[.]com

IP: 184.168.99.26

AbuseIPDB: Bad
/images1/image-50.webp

/images1/image-51.webp

Alienvault: Bad /images1/image-52.webp

Virustotal: Bad /images1/image-53.webp

Verdict: Bad


www[.]hentainftxxx[.]com

IP: 194.9.94.85

AbuseIPDB: Normal
/images1/image-54.webp

AlienVault: Bad /images1/image-55.webp /images1/image-56.webp

VirusTotal: Bad /images1/image-57.webp

Verdict: Bad


www[.]moonshot[.]properties

IP: 198.54.117.210

AbuseIPDB:
/images1/image-58.webp

AlienVault: Bad /images1/image-59.webp

VirusTotal: Bad /images1/image-60.webp

Verdict: Bad


www[.]campdiscount[.]info

IP: 198.54.117.215

AbuseIPDB: Bad
https://www.abuseipdb.com/check/198.54.117.215

AlienVault: Bad
https://otx.alienvault.com/indicator/ip/198.54.117.215

VirusTotal: Bad
https://www.virustotal.com/gui/ip-address/198.54.117.215

Verdict: Bad


www[.]jogoreviravolta[.]com

IP: 198.185.159.144

AbuseIPDB: Normal\

https://www.abuseipdb.com/check/198.185.159.144

Alienvault: Bad
https://otx.alienvault.com/indicator/ip/198.185.159.144

Virustotal: Bad
https://www.virustotal.com/gui/ip-address/198.185.159.144

Verdict: Bad


www[.]mystore[.]guide

IP: 209.17.116.163

AbuseIPDB: Bad
https://www.abuseipdb.com/check/209.17.116.163

AlienVault: Bad
https://otx.alienvault.com/indicator/ip/209.17.116.163

VirusTotal: Bad
https://www.virustotal.com/gui/ip-address/209.17.116.163

Verdict: Bad


www[.]xn–pckwb0cye6947ajzku8opzi[.]com

IP address: 142.251.40.147

AbuseIPDB: Normal

https://www.abuseipdb.com/check/142.251.40.147

AlienVault: Normal
https://otx.alienvault.com/indicator/ip/142.251.40.147

VirusTotal: Normal
https://www.virustotal.com/gui/ip-address/142.251.40.147

Verdict: Normal

www[.]elsiepupz[.]com

IP address: 216.58.193.147

AbuseIPDB: Normal
https://www.abuseipdb.com/check/216.58.193.147

AlienVault: Normal
https://otx.alienvault.com/indicator/ip/216.58.193.147

VirusTotal: Bad
https://www.virustotal.com/gui/ip-address/216.58.193.147

Verdict: Bad


www[.]globalsovereignbank[.]com

IP: 216.172.184.77

AbuseIPDB:
https://www.abuseipdb.com/check/216.172.184.77

Alienvault: Normal
https://otx.alienvault.com/indicator/ip/216.172.184.77

VirusTotal: Bad
https://www.virustotal.com/gui/ip-address/216.172.184.77

Verdict: Bad


Here is the list of malicious domains:

1. www[.]seo-python[.]com

2. www[.]keysine[.]com

3. www[.]db-propertygroup[.]com

4. www[.]katchybugonsale[.]com

5. www[.]ban-click[.]com

6. www[.]riskprotek[.]com

7. www[.]privilegetroissecurity[.]com

8. www[.]theperfecttrainer[.]com

9. www[.]hydrocheats[.]com

10. www[.]nt-renewable[.]com

11. www[.]czzhudi[.]com

12. www[.]chinadqwx[.]com

13. www[.]awridahmed[.]com

14. www[.]hentainftxxx[.]com

15. www[.]moonshot[.]properties

16. www[.]campdiscount[.]info

17. www[.]jogoreviravolta[.]com

18. www[.]mystore[.]guide

19. www[.]xn–pckwb0cye6947ajzku8opzi[.]com

20. www[.]elsiepupz[.]com

21. www[.]globalsovereignbank[.]com


Let’s find out what computer was infected.

Previously, we saw that most of the traffic came from 172.16.0.131. So what we can do is use the DHCP traffic to find the hostname.

Query: _path=="dhcp" /images/image-78.webp

So now we know that the hostname of 172.16.0.131 is DESKTOP-VD15107, and we got the mac address of that computer.

We can also look into the “NTLM” log to see who logs in using that desktop. We can also see that the user: tricia.becker is logged in on 2022-02-23T18:23:18 (6 pm), which would be 1 pm est. /images/image-79.webp


Let’s see if we can find the file that hosted the malware

To do this: We shall move to Wireshark.

This is the display filter we’re going to use:

1
2
3
4
(((http.request or tls.handshake.type eq 1) and !(ssdp))) && ip.dst in 
{216.172.184.77, 216.58.193.147, 213.186.33.5, 209.17.116.163, 198.185.159.144, 198.54.117.215, 
198.54.117.210, 194.9.94.85, 184.168.99.26, 173.231.37.114, 154.206.65.249, 120.55.51.124, 
104.21.89.147, 104.16.12.194, 72.167.191.69, 66.235.200.112, 66.29.145.216, 23.227.38.74, 3.130.253.23}

What this filter does is only show me only the malicious domain that I listed. /images/image-80.webp

As we mentioned earlier, /uar3/ is a sign of the formbook. When we follow one of this malicious traffic, we get little information on the client side (red). Usually, that is a bad sign. /images/image-81.webp /images/image-82.webp

Furthermore, if we’re curious about what non-malicious traffic looks like, we can use this query:

(((http.request or tls.handshake.type eq 1) and !(ssdp))) && !(ip.dst in {216.172.184.77, 216.58.193.147, 213.186.33.5, 209.17.116.163, 198.185.159.144, 198.54.117.215, 198.54.117.210, 194.9.94.85, 184.168.99.26, 173.231.37.114, 154.206.65.249, 120.55.51.124, 104.21.89.147, 104.16.12.194, 72.167.191.69, 66.235.200.112, 66.29.145.216, 23.227.38.74, 3.130.253.23})

What this filter does  is it gives you the domains that are NOT the following IP: /images/image-83.webp

This is what regular traffic looks like: /images/image-84.webp

In the image, this is windows update traffic.

Compared to the Malicious Domain: /images/image-81.webp

We got little information.

That’s nice, but what about finding malicious content downloaded to the desktop?

We can find that by going to file -> Export Object -> HTTP

We get a massive list of files and picture that was downloaded and transferred.

/images/image-85.webp

Suppose we were to go to one of these hostnames containing content-type: text/html. We would see something similar.

/images/image-86.webp

What was interesting is one of the malicious domains contained different languages of access denied

/images/image-87.webp

What is most interesting is that we have two unique files. One picture and one download application. Last time I check, people don’t name their files as long random text.

/images/image-88.webp

Let’s save it on our desktop and see what happens.

💡 Please note: When I’m opening these files, I’m doing it on my virtual machines, which are isolated from my network. Please be careful!

Before we start, let’s download some essential malware analysis tools.

1
sudo apt install binutils

Allow us to use strings. The strings allowed us to read text inside an application without executing it.

The next thing we want to install is a hex editor. This allows us to see if an image file is a .exe file by looking at the hex header. We are spotting for 4D 5A

sudo apt install hexyl

First installed, you have something like this: /images/image-90.webp

We can look up the file signature of .xlsx and compare it to what we have. /images/image-91.webp

Look like it is a .xlsx

Anyways, back to the actual program. We will download the two unique items we found and do some analysis. Make sure to change your network adapter to host only. /images/image-93.webp

As we can see, the first row is all 0. This means that the picture is corrupt /images/image-94.webp

As we can see, our windows executable is a .exe file (4d 5a) /images/image-95.webp

Let’s run it and see what happens; I have a fresh copy just in case things go wrong. /images/image-96.webp

Well… Nothing happens. Let’s take the md5 hash of the exe before we reset to a new copy.

57595f82e73bed372c669e907d4db642

Wow, what an insane find. It looks like the malware is Emotet. You can read more information about Emotet here.

Here you can find a link to the dynamic analysis of the malware: https://app.any.run/tasks/4575f9ce-72c0-485f-ba37-a8ac43e5f458/

https://any.run/report/14b57211308ac8ad2a63c965783d9ba1c2d1930d0cafd884374d143a481f9bf3/4575f9ce-72c0-485f-ba37-a8ac43e5f458

When the virus was first executed, It created a process name “rundll32.exe” and created a subprocess called “regsvr32.exe”

Then anyRun provides us with a list of potential C2 channels.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
C2 (45)
135.148.121.246:8080
213.190.4.223:7080
175.107.196.192:80
46.55.222.11:443
153.126.203.229:8080
138.185.72.26:8080
45.118.135.203:7080
107.182.225.142:8080
195.154.133.20:443
79.172.212.216:8080
129.232.188.93:443
50.30.40.196:8080
131.100.24.231:80
58.227.42.236:80
216.158.226.206:443
45.118.115.99:8080
51.254.140.238:7080
173.212.193.249:8080
110.232.117.186:8080
81.0.236.90:443
158.69.222.101:443
103.75.201.2:443
185.157.82.211:8080
176.104.106.96:8080
82.165.152.127:8080
156.67.219.84:7080
212.237.17.99:8080
178.128.83.165:80
162.243.175.63:443
45.142.114.231:8080
103.134.85.85:80
178.79.147.66:8080
31.24.158.56:8080
103.75.201.4:443
217.182.143.207:443
159.8.59.82:8080
164.68.99.3:8080
209.126.98.206:8080
207.38.84.195:8080
119.235.255.201:8080
212.24.98.99:8080
212.237.56.116:7080
50.116.54.215:443
45.176.232.124:443
203.114.109.124:443

It is a long list, but we can find an easier way to find the C2 channel using RITA and Zeek. But it will help to cross-reference this list later on.


Finding the C2 Channel

So what is a C2 Channel?

  • It is a centralized base that hackers use to relay commands to beacons and a way to gather information in one place.

Then what is a beacon?

  • You can think of a beacon as a minion in part of a botnet. It will send a signal to the C2 channel asking if it has a command ready to execute, and it will check every x amount - depending on the hacker set it to.

So how do we detect beacons?

  • One: by looking for long connections
  • Two: Based on how often it checks back to base
  • Three: Session size analysis - After a command is executed ->, information is retrieved (Increase in size). Then if you see a small packet size after the command is executed, you can treat it as additional command being executed.
/images1/image-98.webp

Source: https://www.activecountermeasures.com/hunt-training/

Now, let’s find a potential c2 channel using RITA.

Here I only have my pcap file of the malicious traffic. What I’m going to do is let zeek ingest this pcap file. /images1/image-99.webp /images1/image-100.webp

Then use all these to create a Rita database. /images1/image-101.webp

Now we’re ready to find some c2 channels.

Let’s start by finding the long connections. /images1/image-102.webp

From the chart, the longest connection was made to:

  • 204.79.197.200
  • 13.107.4.254
  • 204.79.197.254

Another helpful feature that RITA has is to print blocklisted IPs that received connections (These could be well-known IPs that C2 uses)
/images1/image-103.webp

If we look up: 139.196.72.155, We can see what the C2 is.
https://www.virustotal.com/gui/ip-address/139.196.72.155/relations

According to VT, it emotet which explains the executable we found earlier:

57595f82e73bed372c669e907d4db642

/images1/image-104.webp
Emotet Traffic

Earlier, we said that our victim’s computer was 172.16.0.131. Now we have to add 172.16.0.170 to the list. Let’s find more information about this IP in our network by going to the DHCP log.

MAC address: 00:12:f0:64:d1:d9

Hostname: DESKTOP-W5TFTQY

IP: 172.16.0.170

Now, let’s find the beacons communicating to the C2 server using one of the following commands:

  • show-beacons-proxy
  • show-beacons-sni
  • show-beacons /images1/image-105.webp

The score is 0.55, which is 55%, a deficient score when determining for beacons. Not only that, the 135.148.121.246 is not even on the list for long connections. So chances of this IP being a C2 server are low.


Conclusion

The goal of  incident response:

1
2
1. What hosts/user account names are active on this network?
2. What type of malware are they infected with?
  1. List of hosts/user account to isolate:
  • 172.16.0.170, Hostname: DESKTOP-W5TFTQY
  • 172.16.0.131, Hostname: DESKTOP-VD15107
  • 172.16.0.149, Hostname: DESKTOP-KPQ9FDB

2. What type of malware are they infected with?

  • Emotet, Formbook

IOC (Indicator of Compromise):

  1. HTTP traffic of /uar3/
  2. zbBYgukXYxzAF2hZc.exe
  3. Suricata Alerts of Formbook
  4. Connection to Emotet C2 server

Malicious Domain:

1. www[.]seo-python[.]com

2. www[.]keysine[.]com

3. www[.]db-propertygroup[.]com

4. www[.]katchybugonsale[.]com

5. www[.]ban-click[.]com

6. www[.]riskprotek[.]com

7. www[.]privilegetroissecurity[.]com

8. www[.]theperfecttrainer[.]com

9. www[.]hydrocheats[.]com

10. www[.]nt-renewable[.]com

11. www[.]czzhudi[.]com

12. www[.]chinadqwx[.]com

13. www[.]awridahmed[.]com

14. www[.]hentainftxxx[.]com

15. www[.]moonshot[.]properties

16. www[.]campdiscount[.]info

17. www[.]jogoreviravolta[.]com

18. www[.]mystore[.]guide

19. www[.]xn–pckwb0cye6947ajzku8opzi[.]com

20. www[.]elsiepupz[.]com

21. www[.]globalsovereignbank[.]com

C2 control:

  • 139.196.72.155