modern malware techniques for attacking rbs systems in...

54
Modern malware techniques for attacking RBS systems in Russia Aleksandr Matrosov Eugene Rodionov

Upload: others

Post on 09-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Modern malware techniques for attacking RBS systems in Russia

Aleksandr Matrosov

Eugene Rodionov

Page 2: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Who we are?

Malware researchers at ESET

- complex threats analysis

- development of cleaning tools

- tracking new malware techniques

- investigation of cybercrime groups

http://www.joineset.com/

Page 3: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Agenda

o Cybercrime trends in RBS

o Most prevalent threats and incidents

Win32/Shiz

Win32/Hodprot

Win32/Sheldor

Win32/RDPdoor

Win32/Carberp

o Carberp cybercrime group revenue

Page 4: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Overview

2010/11: years of attacks on Russian banks • number of incidents has more than doubled compared to 2010*

Over 92%* of incidents involve banking trojans

Malware tailored to Russian banks and payment

systems

However! • Can (and IS) used in other countries as well

*research report "The Russian cybercrime market in 2010: status and trends” http://www.group-ib.ru/wp-content/uploads/2011/04/Group-IB_Report_Russian-cybercrime-market_2010_eng.pdf

Page 5: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia
Page 6: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Interesting facts about Russian bank fraud

These guys are still free!

Page 7: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia
Page 8: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Evolution of RBS trojans

o RBS Trojans 2009-2010:

Win32/Shiz (2009)

Win32/Carberp

Win32/Hodprot

Win32/Sheldor

Win32/RDPdoor

o RBS Trojans 2011:

Multiple updates

Growing incidents numbers

….

Win32/Carberp with Bootkit

Page 9: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Cybercrime landscape (2010)

Page 10: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Cybercrime landscape (2011)

Page 11: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Cybercrime landscape (2011)

Page 12: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia
Page 13: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Spy.Shiz

Page 14: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Spy.Shiz detection statistics by month Cloud data from Live Grid

August 2009 – November 2011

Page 15: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Spy.Shiz detection statistics by country Cloud data from Live Grid

Page 16: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Spy.Shiz: stealing money

Page 17: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia
Page 18: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Hodprot

Page 19: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

July 2010 – November 2011

Win32/Hodprot detection statistics by month Cloud data from Live Grid

Page 20: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Hodprot detection statistics by country Cloud data from Live Grid

Page 21: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Hodprot: antiforensics

Main module

Original sfcfiles.dll Kernel - driver image

Loader code

C&C URLs

Page 22: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Hodprot: injecting payload

Browser Address Space

sfc.sys

Setupapi.dll

Payload

System Registry

User-mode

Kernel-mode

Winlogon Address Space

sfcfiles.dll

UpdatePayload

Inject Payload

Assemble Payload

Inject PayloadAssemble PayloadInstall & Load

Driver

Page 23: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Hodprot: C&C protocol

Win32/Hodprot C&C Server

Send request (bot ID, integer)

Reply with updated modules and image to

execute

Handle Request

Update the bot’s modules, run downloaded

exeutableSend Status Information

Page 24: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Sheldor & Win32/RDPdoor

Page 25: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Sheldor and TeamViewer in action

infected

computer

TeamViewer

cloud

Win32/Sheldor

C&C GET

/getinfo.php?id=414%20034%20883&pwd

=6655&stat=1

1 2

3

4

1. Request cloud ID

2. Set cloud ID

3. Send ID to C&C

4. Malicious connection

Page 26: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Under the hood: DLL hooking

TV.dll

(proxy DLL)

TeamViewer.exe

TS.dll

(original TS.dll)

Page 27: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Malicious DLL call graph

Page 28: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Malicious DLL decompilation

Load original TS.dll

Hook functions

Functions for calling

from original TS.dll

C&C URL

Page 29: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Sheldor C&C panel

Page 30: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/RDPdoor installation

infected

computer

Win32/RDPdoor

C&C

1

2

run dropper and send system information

authentication on C&C and provide Thinsoft BeTwin for installation

3 send status information

Page 31: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Stealing authentication data

1. Install GINA extension DLL

2. Display fake logon screen

3. Capture user name &

password

4. Send to C&C

Page 32: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Carberp

Page 33: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

January 2010 – November 2011

Win32/Carberp detections over time in Russia Cloud data from Live Grid

Page 34: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Carberp detection statistics by country Cloud data from Live Grid

Page 35: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Self-protecting Functionality

Bypassing AV-emulators many calls of rare WinAPI functions

Code injection method ZwQueueApcThread()

ZwResumeThread()

Unhooking method checking first bytes of API function

body and deleting hooks

Command and string encryption custom encryption algorithm

Bot authentication on C&C file with authentication data stored on

infected PC

Network communication encryption base64( RC2(data) )

API function calls obfuscation custom hash algorithm

Detection of AV hooks comparison of the first original bytes

Bypassing static AV signatures appending random junk bytes to

dropped files

Hiding in the system hooking system functions

bootkit infector (September 2011)

Page 36: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Carberp going deeper since September 2011

Page 37: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia
Page 38: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Carberp going deeper since September 2011

Load MBR

Load VBR

Load bootmgr

Load winload.exe or winresume.exe

real mode

real mode/protected mode

Load kernel and boot

start drivers

real mode/protected mode

Load bootstrap

code

real mode/protected mode

real mode

Target of Rovnix & Carberp

Page 39: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

MBR VBR Bootstrap Code File System Data

VBRMalicious

CodeFile System Data

Bootstrap Code

MBR

NTFS bootstrap code(15 sectors)

Before Infecting

After Infecting

Malicious Unsigned

Driver

CompressedData

o Carberp overwrites bootstrap code of the active

partition

o The malicious driver is written either: before active partition, in case there is enough space

in the end of the hard drive, otherwise

Carberp: Infected Partition Layout

Page 40: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia
Page 41: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Interesting strings and investigation

Page 42: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia
Page 43: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Carberp: money stealing methods

Stealing techniques Functionality

Web-injects/Autoloads

(IE, FF, Chrome, Opera)

inserting the specified JS-code into HTML

returned by the online banking site

Backconnect backdoor

(RDP/VNC)

loading on request special binary module

(RDPdoor, custom VNC client)

Keylogger (based on WinAPI) recording keyboard events into logfile

ScreenSpy (based on WinAPI) saving screenshots into logfile

Grabbers (Form, FTP, Pass) loading on request special binary module

Custom plugins for RBS binary modules for specified RBS (sber.plug)

Page 44: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Win32/Carberp botnet control panel

Page 45: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

C&C with stolen data

Page 46: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Cab-files with stolen data

Page 47: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Stolen data: BS-Client IB system

Page 48: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Stolen data: CyberPlat payment system

Page 49: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Stolen data: iBank IB system

Page 50: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Stolen data: SberBank IB

Page 51: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Stolen data: UkrSibBank IB

Page 52: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

References

“Cybercrime in Russia: Trends and issues”

http://go.eset.com/us/resources/white-papers/CARO_2011.pdf

“Evolution of Win32/Carberp: going deeper”

http://blog.eset.com/2011/11/21/evolution-of-win32carberp-going-deeper

“Hodprot: Hot to Bot”

http://go.eset.com/us/resources/white-papers/Hodprot-Report.pdf

Follow ESET Threat Blog http://blog.eset.com

Page 53: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Questions

Page 54: Modern malware techniques for attacking RBS systems in Russia2011.zeronights.org/files/alexandermatrosoveugene... · Modern malware techniques for attacking RBS systems in Russia

Thank you for your attention ;)

Aleksandr Matrosov [email protected]

@matrosov

Eugene Rodionov [email protected]

@vxradius