Top Banner
Classification: //SecureWorks/Confidential - Limited External Distribution: Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU
24

Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Oct 27, 2019

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

Fileless malwarebeyond a cursory glance

Alin PUNCIOIU

Lucian SARARU

Page 2: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Agenda

Overview

Trends

Modus Operandi

Case Study

2

Page 3: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Overview

Security Landscape

3

Threat Actors in 2017

Reactive Cyber Security Operations

Page 4: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Overview

Enterprise Security

4

Page 5: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Fileless malware

Google trends

5

Page 6: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Fileless malware

Investigation

6

In-depth analysisDiscover IoCsFind signatures for intrusion

detection systems

Assess DamageHow to measure and

contain the damage

Identify vulnerabilitiesExactly what happened

Determine

sophistication levelEnsure you’ve located all

infected machines and files

Page 7: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Modus operandi

Scorecard

7

Capture

events/activity

Malware analysisEndpoint forensics

Binary extraction

Incident

Response and

Security

Analytics

Page 8: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Modus operandi

Aiming

8

Stealth Privilege

escalation

Information

gathering Persistence

Page 9: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Modus operandi

Persistence

9

Windows Management Instrumentation

%System%\wbem\ repository

Windows registry/ service

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\[ ]

RUNDLL32.EXE <dll name>,<entry point> <optional arguments>

Powershell

powershell.exe -WindowStyle hidden -NoLogo -NonInteractive -ep bypass -nop

iex ([Text.Encoding]::ASCII.GetString([Convert]::FromBase64String((gp

‘HKCU:\Software\Classes\HNKINZHBHZCOBE’).ZUEMAUZYQQBL)));

Page 10: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Case study

10

Page 11: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Preparation

Snort rule

11

alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:“51234 VID51234

Cryptocurrency Stratum Mining Pool Login Detected";

flow:established,to_server; dsize:<300; content:"|7b 22|"; depth:2;

content:"|22|method|22|"; nocase; content:"|22|login|22|"; nocase;

distance:0; content:"|22|params|22|"; nocase; distance:0;

content:"|22|agent|22|"; distance:0; content:"|7d|"; distance:0;

pcre:"/^\x7b\x22.*\x7d$/"; metadata:ari-balanced drop, policy

balanced drop, ari-connectivity alert, policy connectivity alert,

ari-security drop, policy security drop, ruleset-release 316;

priority:3; rev:3; sid:1751654; classtype:unknown; )

Page 12: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Identification

Cryptocurrency Mining Pool Login Detected

12

XMRig is high performance

Monero (XMR) CPU miner,

with the official full

Windows support.

Page 13: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.

Technical investigation

1st glance

13

Page 14: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

1. Fetch the files:

NTUSER.DAT, USRCLASS.DAT, SECURITY,

SYSTEM, SOFTWARE.

2. Usage of the registry for persistence:

a) autorun;

b) PowerShell scripts;

c) DLL modules.

Technical investigation

In-depth analysis

Page 15: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:© SecureWorks, Inc.15

a) Autorun: HKCU\Software\Microsoft\Windows\CurrentVersion\Run

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -

WindowStyle hidden -NoLogo -NonInteractive -ep bypass -nop iex

([Text.Encoding]::ASCII.GetString([Convert]::FromBase64String((gp

'HKCU:\Software\Classes\HAZKSOSOTHSFA').VQGA)));

Technical investigation

In-depth analysis

Page 16: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

b. next stage script:

HKEY_CURRENT_USER\Software\Classes\[Random

String]

Key VQGA contains the base64 encoded script which has 35.456 characters.

Technical investigation

In-depth analysis

Page 17: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

Technical investigation

In-depth analysis

BASE64

ENCODED

SCRIPT

Page 18: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

c) encrypted DLL module

HKEY_CURRENT_USER\Software\Classes\[Random String]

Technical investigation

In-depth analysis

Page 19: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

Technical investigation

In-depth analysis

Page 20: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

Technical investigation

In-depth analysis

Page 21: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

Soplifan.[ru], Diplicano.[ru].

The traffic is repeated every 9 minutes.

Technical investigation

In-depth analysis

Page 22: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

oplifan [.]ru, soplifan [.]ru, fiplicano [.]ru, diplicano [.]ru, aiplicano [.]ru, adygeya [.]ru, altai [.]ru, amur [.]ru, amursk [.]ru, arkhangelsk [.]ru, astrakhan [.]ru,

baikal [.]ru, bashkiria [.]ru, belgorod [.]ru, bir [.]ru, bryansk [.]ru, buryatia [.]ru, cbg [.]ru, chel [.]ru, chelyabinsk [.]ru, chita [.]ru, chukotka [.]ru, chuvashia [.]ru,

cmw [.]ru, dagestan [.]ru, dudinka [.]ru, e-burg [.]ru, fareast [.]ru, grozny [.]ru, irkutsk [.]ru, ivanovo [.]ru, izhevsk [.]ru, jamal [.]ru, jar [.]ru, joshkar-ola [.]ru,

kalmykia [.]ru, kaluga [.]ru, kamchatka [.]ru, karelia [.]ru, kazan [.]ru, kchr [.]ru, kemerovo [.]ru, ghabarovsk [.]ru, khakassia [.]ru, khv [.]ru, kirov [.]ru, kms [.]ru,

koenig [.]ru, komi [.]ru, kostroma [.]ru, krasnoyarsk [.]ru, kuban [.]ru, k-uralsk [.]ru, kurgan [.]ru, kursk [.]ru, kustanai [.]ru, kuzbass [.]ru, lipetsk [.]ru, magadan

[.]ru, magnitka [.]ru, mari [.]ru, mari-el [.]ru, marine [.]ru, mordovia [.]ru, mosreg [.]ru, msk [.]ru, murmansk [.]ru, mytis [.]ru, nakhodka [.]ru, nalchik [.]ru, nkz

[.]ru, nnov [.]ru, norilsk [.]ru, nov [.]ru, novosibirsk [.]ru, nsk [.]ru, omsk [.]ru, orenburg [.]ru, oryol [.]ru, oskol [.]ru, palana [.]ru, penza [.]ru, perm [.]ru, pskov

[.]ru, ptz [.]ru, pyatigorsk [.]ru, rubtsovsk [.]ru, ryazan [.]ru, sakhalin [.]ru, samara [.]ru, saratov [.]ru, simbirsk [.]ru, smolensk [.]ru, snz [.]ru, spb [.]ru, stavropol

[.]ru, stv [.]ru, surgut [.]ru, syzran [.]ru, tambov [.]ru, tatarstan [.]ru, tom [.]ru, tomsk [.]ru, tsaritsyn [.]ru, tsk [.]ru, tula [.]ru, tuva [.]ru, tver [.]ru, tyumen [.]ru,

udm [.]ru, udmautia [.]ru, ulan-ude [.]ru, vdonsk [.]ru, vladikavkaz [.]ru, vladimir [.]ru, vladivostok [.]ru, volgograd [.]ru, vologda [.]ru, voronezh [.]ru, vyatka

[.]ru, yakutia [.]ru, yamal [.]ru, yaroslavl [.]ru, yekaterinburg [.]ru, yuzhno-sakhalinsk [.]ru, zgrad [.]ru

Technical investigation

In-depth analysis

Captured 126 domains!

Page 23: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

Thank you!

Page 24: Fileless malware beyond a cursory glance - def.camp - Fileless... · Fileless malware beyond a cursory glance Alin PUNCIOIU Lucian SARARU. Title: Flowchart Example 04 Author: Secureworks

Classification: //SecureWorks/Confidential - Limited External Distribution:

Fileless malwarebeyond a cursory glance

Alin PUNCIOIU

Lucian SARARU