a journey to protect points of sale - owasp...protect points of sale nir valtman, cissp w: . :...

81
A Journey To Protect Points Of Sale Nir Valtman, CISSP W : www.valtman.org . : @ValtmaNir

Upload: others

Post on 10-Oct-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

A Journey To Protect Points Of Sale

Nir Valtman, CISSP

W : www.valtman.org

. : @ValtmaNir

Page 2: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Introduction

2

Photo by Bill Fraser

Page 3: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

3

Page 4: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

03/09/2014 4

I’m an architect

Page 5: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

5

Page 6: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

6

Page 7: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

7

Zombies!!!

Page 8: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

8

Defacement

Page 9: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

9

AntiDef

OPEN SOURCE

Memory Scraper

Secure TDD

Page 10: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

10

Page 11: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Why Points Of Sale Targeted?

11

Page 12: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

12

Page 13: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

13

Page 14: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Deployment

14

Page 15: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

15

Page 16: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

16

Page 17: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

17

Page 18: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

18

Page 19: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Payment ApplicationPoint Of Sale

IS NOT

V

Page 20: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

20

RAMDB

POS Payment Processing

Host

PA Server

Store Payment Processor’s Data Center

PA Client

RAM

DB

Page 21: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

RAMDB

POS Payment Processing

Host

PA Server

Store Payment Processor’s Data Center

PA Client

RAM

DB

Rest Transit Memory

Where Are My Credit Cards?

Page 22: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Mobile App Presentation Server Application & Payment Server Payment Processor’s Data Center

Rest Transit Memory

Where Are My Credit Cards?

Page 23: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6
Page 24: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Mobile App Presentation Server Application & Payment Server Payment Processor’s Data Center

Token

Server

Credit

Cards

Page 25: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Retail

Environment

Assumptions

100% PCI Compliant

Page 26: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Retail

Environment

Assumptions

Page 27: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Retail

Environment

Assumptions

Page 28: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Retail

Environment

Assumptions

Notvulnerable

Page 29: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Retail

Environment

Assumptions

Page 30: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Retail

Environment

Assumptions

Cashier ≠ hacker

Page 31: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Retail

Environment

Assumptions

Big Brother

Page 32: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

RATs

Page 33: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

RemoteAdministrationTools

Page 34: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Routing

Page 35: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6
Page 36: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Threats

37

Page 37: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

38

READ&WRITE

Page 38: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

39

I AM BOB

ME TOO

Page 39: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Payment Stages - Authorization

40

PA

Processor

IssuerGateway

Acquirer

Route Track1/2 Transmit Track1/2

POI

Transmit Track1/2

Difficult

Exploitation

Page 40: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Payment Stages - Authorization

41

Page 41: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Payment Stages - Settlement

42Processor

IssuerGateway

Acquirer

Transmit SettlementStore & Send PANs

PA Server

Credit Merchant’s Account

Difficult

Exploitation

Page 42: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Payment Stages - Settlement

43

Page 43: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

44

Memory Scraping

Demo by Idan Geula

http://securitytools.github.io/MemoryScraper/

Page 44: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

45

Page 45: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

46

Page 46: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

47

Page 47: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

OfflineOnline VS

Page 48: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Bypassed Solutions

49

Page 49: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

50

SecureString Class

Demo

Page 50: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

51

Next NextNextNext Next Generation Firewall

Page 51: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

52

ANTI

*

Page 52: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

53

Page 53: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

54

Whitelist

MD5 SHA256

Page 54: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Correct Solutions

55

Page 55: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

56

Cyber

Intelligence

Page 56: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

57

I have access to POS terminals in the US,

what is the best malware I should use?

Page 57: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

58

You need to infect the firmware of the terminal.

By doing that, you can get full track 1 + 2,

but the PIN will be hashed.

Page 58: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

59

Selling malicious firmware for Verifone’s POS terminals.

Leaks dumps + PINs through GPRS.

Price: Only 700$

Page 59: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

60

Business Development Offer

Owner of a fake POS sells his terminal.

Price: 50% from revenue sharing.

Page 60: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

61

RFI: Change terminal configuration to require PIN for all cards.

Cause: Get only 101 data, but wants PINs

Proposed Solution:

Thermal Imager

Page 61: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

62

Sandbox

Page 62: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

63

Network-based

Anomaly Detection

Page 63: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

64

Operating System

Anomaly Detection

Page 64: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

65

Runtime Obfuscation

Page 65: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Not only products required

66

Page 66: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

67

Page 67: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

68

Performance Security

Page 68: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

69

Assembly Signing

Page 69: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

70

Assembly Obfuscation

Page 70: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

PROCESS ISOLATION

Page 71: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

What Next

72

?

? ?

?

??

?

?

??

??

? ?

?

Page 72: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

What Would You Steal?

BIP BIP

Page 73: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

74

Memory

Scraping

Page 74: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

75

Memory

Scraping

Cashier = hacker

Page 75: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

76

Memory

Scraping

Page 76: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Summary

77

Page 77: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

78

Memory

Scraping

Security by Obscurity

Page 78: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

79

Memory

Scraping

Simple Exploitation

Page 79: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

80

Memory

Scraping

Hard to Protect

Page 80: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

81

Memory

Scraping

You’re Insured

Page 81: A Journey To Protect Points Of Sale - OWASP...Protect Points Of Sale Nir Valtman, CISSP W: . : @ValtmaNir Introduction 2 Photo by Bill Fraser 3 03/09/2014 4 I’m an architect 5 6

Nir Valtman

W : www.valtman.org

. : @ValtmaNir