Threat Modeling against Payment systems Dr. Grigorios Fragkos H e a - - PowerPoint PPT Presentation

threat modeling against payment systems
SMART_READER_LITE
LIVE PREVIEW

Threat Modeling against Payment systems Dr. Grigorios Fragkos H e a - - PowerPoint PPT Presentation

Threat Modeling against Payment systems Dr. Grigorios Fragkos H e a d o f O fg e n s i v e C y b e r S e c u r i t y a t i n v i n s e c (@invinsec) @drgfragkos Agenda T h r e a t M o d e l i n g H i g h l i g h t s Point of Sale (#POS)


slide-1
SLIDE 1

Head of Ofgensive CyberSecurity at invinsec (@invinsec) @drgfragkos

  • Dr. Grigorios Fragkos

Threat Modeling against Payment systems

slide-2
SLIDE 2

Agenda

  • Threat Modeling Highlights
  • Point of Sale (#POS)
  • Point of Interactjon (#POI)
  • Locked and Unlocked POI devices
  • Tricks with POI
  • Tricks with Virtual Terminals
  • The outcome of a Threat Modeling exercise
slide-3
SLIDE 3

Threat Modeling

  • A process by which potentjal threats can be identjfjed, enumerated,

and prioritjzed – all from a hypothetjcal atuacker’s point of view.

– The purpose of threat modeling is to provide defenders with a systematjc

analysis of the probable atuacker’s profjle; meaning, the most likely atuack vectors, and the assets most desired by an atuacker.

– Threat modeling answers the questjons “Where are the high-value assets?”

“Where am I most vulnerable to atuack?” “What are the most relevant threats?” “Is there an atuack vector that might go unnotjced?”

slide-4
SLIDE 4

Multjple approaches to threat modeling

  • OWASP : www.owasp.org/index.php/Threat_Risk_Modeling
  • SAFECode : www.safecode.org (non-profjt)

– Sofuware Assurance Forum for Excellence in Code

  • Sofuware centric threat modeling
  • Security centric threat modeling
  • Asset or risk centric threat modeling
slide-5
SLIDE 5

Approaching Threat Modeling

  • STRIDE stands for:

– Spoofjng – Tampering – Repudiatjon – Informatjon disclosure – Denial of service – Elevatjon of privilege

slide-6
SLIDE 6

Approaching Threat Modeling

  • DREAD stands for:

– Damage – Reproducibility – Exploitability – Afgected users – Discoverability

slide-7
SLIDE 7

Keep in mind..

Performing threat modeling provides a far greater return than spending £££s for fraud control for a system that has negligible fraud risk. Make threat risk modeling an early priority in your applicatjon design process. #threatmodeling

slide-8
SLIDE 8

POI Devices

  • You have likely used a Point of Interactjon (Chip & PIN device)

– Remember your PIN; you need it for transactjons – Keep your PIN safe; so no one can use your card

slide-9
SLIDE 9

Assumptjons

  • ..from your side:

– I will not mentjon POI manufacturers – I will not tell you which OS vendor(s)

slide-10
SLIDE 10

Assumptjons

  • ..from my side:

– You will behave afuer the presentatjon! – If you decide to fmy to #LasVegas (afuer having seen all these tricks), you promise to take me with you (and pay for my plane tjcket). – Seriously! ;)

slide-11
SLIDE 11

Keep in mind..

It is gettjng easier by the day for fraudsters and cyber criminals to get their hands on “live” payment systems. #atuackwaitjngtohappen

slide-12
SLIDE 12

Locked and Unlocked POI devices

  • There are 2 types of POI devices (terminals); the ones which

are Locked and the ones that are Unlocked.

– The Unlocked ones, have no open ports. – The Locked ones, have 1 open port

  • The locked POI is controlled by an Electronic Cash Register (ECR or

ePOS), which is responsible for unlocking the device, opening a new receipt and acceptjng a transactjon.

– Locked POI devices can be found unatuended! – Locked POI devices, can be unlocked in 7 to 10 sec.

slide-13
SLIDE 13

Gettjng to know the rules

  • Untjl recently it was so much easier..

– Successful transactjons were sent every 24 hours. – Clearing the transactjons cache used to be a few clicks away.

  • Since last year onwards..

– Successful transactjons are sent back in “real-tjme“ – Clearing the transactjons cache is now protected by a “secure code” (like a PIN, that only few people know)

slide-14
SLIDE 14

Ways to never actually pay for a transactjon..

  • Bypass restrictjons

– Get access in the internal network, send commands to the POI: Close Receipt, Open New Receipt with new Amount, Complete Payment – Pay as normal but instead of trying to clear the cache, remove the OS completely, with a quick key combinatjon.

slide-15
SLIDE 15

How to..

  • Delete the OS

– Afuer Reset, when a specifjc string appears on the screen – [Key 1] > [Key 2] > [Key 3] > [Key 4] – Terminal resets and displays boot screen – Everything is deleted – Keeps BIOS, Hardware confjguratjon fjle, Ethernet confjguratjon fjle

slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18

How to pay with someone else’s card..

  • Because you don’t know the PIN:

– While in payment state, press [Key] > [Key] – It prints a receipt which you need to sign instead

(PIN is not used)

– The message on the screen says that the

transactjon is accepted and prompts the user with “Remember Signature”. #SignatureMode

– If you hit Green, the message will go away and the

customer copy will start printjng

slide-19
SLIDE 19

How to pay with someone else’s card..

  • Because you don’t know the PIN and you don’t want to sign

the retailer’s copy either:

– Enter the Card upside down. – POI thinks the Chip is not working and asks you to swipe the card instead. – Should raise a fallback alert to the card issuer. – Swipe the card and transactjon is complete.

slide-20
SLIDE 20

How to pay with someone else’s card..

  • By “blocking” the wireless communicatjon:
  • Wait for 2 tries and press [Key] for manual
  • Tells you to contact the bank to give you the

“proceed” code.

– If == AMEX, enter any 2 digits. – If != AMEX enter a number that validates

the Luhn algorithm.

  • Maybe clear the OS afuer the payment is

accepted? ;)

slide-21
SLIDE 21

How to get paid instead of paying..

  • Find an unatuended locked POS:
  • Unlock the POS using a key combinatjon.
  • Enter your card and request a #refund to be send to your

account.

– Enter your card but this tjme request a refund to be send to your account, “marked” as winnings from gambling!?!

slide-22
SLIDE 22

How to get a signifjcant discount..

  • During a normal payment, when the POI is unlocked:

– Pull your card out (just 2 mm). – Wait 6 seconds! – Press: MENU > [key] > Enter the amount you want to pay > OK > [Push Card In] > [key] – Give the POS back to the merchant – Smile! :D

slide-23
SLIDE 23

The Cuckoo example..

  • Assuming you are an existjng merchant:

– Instead of tampering with the POI and risk gettjng caught, replace the target POI with one of your own. (#ConArtjst skills highly recommended) #WhiteCollar – No one checks the serial numbers at the back of the POS before every single transactjon. ;)

slide-24
SLIDE 24

POS & Contactless

  • All of the above apply, plus..

– No need for PIN – If you are prompted for a PIN use any of the previous methods – You can charge a card more than once using difgerent contactless POS

devices only milliseconds afuer each transactjon!

– Do not have two POS devices trying to read the same card at the same tjme. – #Contactless have a £30 limit per transactjon (not in all countries). There are

consideratjons to remove the limit in the near future.

– More work to be done…

slide-25
SLIDE 25

Now that you know all that, we need Card Info

How may people take pictures and put their card informatjon online? #creditcard, #debitcard, #cvv

slide-26
SLIDE 26

If you want to go shopping..

slide-27
SLIDE 27

We need Cards..

slide-28
SLIDE 28

We need Cards..

slide-29
SLIDE 29

We need more Cards..

slide-30
SLIDE 30

We need more Cards..

slide-31
SLIDE 31

We need a few more Cards..

slide-32
SLIDE 32

We need a few more Cards..

slide-33
SLIDE 33

My precious..

slide-34
SLIDE 34

My precious..

slide-35
SLIDE 35

Regeneratjng the hidden digits..

slide-36
SLIDE 36

McDumpals

slide-37
SLIDE 37

Moving to Virtual Terminals..

Writjng a memory scraping POS malware? Do they have to? ..once they get to know the system(s)? #POSmalware

slide-38
SLIDE 38

Virtual Terminals

  • Sofuware applicatjons.

– Provided by the Payment eco system, such as the Acquirer, Payment

Service providers, and more.

– VT can work without a POI connected to it. – Difgerence between ECR (ePOS) and VT; The ECR doesn't work

without a POI.

– You can key-in the card details on a VT – VT sofuware needs to be PA-DSS compliant (according to PCI), while

the ECR is only being checked if it stores CHD (!)

slide-39
SLIDE 39

Penetratjon Testjng for PA-DSS

  • The main objectjve is to identjfy if it is possible to get your

hands on the CHD.

– SQLi or any other types of injectjons – Bufger Overfmows – Cryptographic storage – Insecure Communicatjons – Improper Error Handling

slide-40
SLIDE 40

Threat Modeling

  • Assessing the logic of the VT and look into the payment

process from a malicious “merchant's” perspectjve.

– A repeatable process to fjnd and address all threats to your product. – The earlier you can start the betuer, with more tjme to plan and fjx. – Must identjfy the problems when there is stjll tjme to fjx them

(before the ship day).

– Third-Party Components & S/W Development Life Cycle (SDLC). – End Goal: Deliver more secure products.

slide-41
SLIDE 41

At a fjrst glance..

  • Possible to modify the confjguratjon fjles

– One of the easiest tricks to demonstrate this was to change appears

  • n the POI screen.
slide-42
SLIDE 42

At a fjrst glance..

  • Possible to modify the confjguratjon fjles

– By the way, these new types of POI devices are interestjng. They can

communicate with the VT via Bluetooth if needed, while being powered over USB.

slide-43
SLIDE 43

At a fjrst glance..

  • Possible to modify the confjguratjon fjles

– Each device comes with a difgerent pairing key.

slide-44
SLIDE 44

VT identjfjers

  • How do they distjnguish between merchants?
  • Each VT has “identjfjers”.
  • Based on the “identjfjers”, payments are setuled against the

correct merchant.

  • Editjng however the “identjfjers” in the confjguratjon fjles

messes with the encryptjon key, thus the encrypted header is not valid when a payment needs to be sent, and the transactjon cannot be completed.

slide-45
SLIDE 45

Antjcipatjng shifus in fraudulent actjvity..

An alternatjve scenario to POS malware.. #POSmalware

slide-46
SLIDE 46

Thinking outside-of-the-box

  • Internet shoppers are expected to spend £748m on Boxing Day

(£519,000 a minute)

  • So, what you will need:

– A valid Merchant ID – First year programming skills – Know how to cover your tracks – Think outside-the-box, focus on the money, not the card numbers! – Have atuended this presentatjon!

slide-47
SLIDE 47

Thinking outside-of-the-box

slide-48
SLIDE 48

Thinking outside-of-the-box

  • Last but not least:

– Have atuended this presentatjon!

slide-49
SLIDE 49

Gettjng the job done

  • You could create & spread malware that can:

– Change the “identjfjers” on every VT – Delete the encrypted header fjle – Reboot the VT applicatjon

  • Covering your tracks by:

– Change the “identjfjers” to what it was. – Delete the encrypted header fjle – Clean the LOG fjle & Reboot the VT applicatjon

slide-50
SLIDE 50

Delivery method

  • Spread undetectable malware:

– Much easier than one might think. – Actjvate it on.. Boxing Day / Black Friday? – Simply wait for the money to be setuled to your bank account.

slide-51
SLIDE 51

Bonus Round

  • If the VT is writuen in JAVA
  • Get the POS into asking you to Key-in the card:

– Enter Card Number as normal – Add 70 years to your expiratjon date

  • Alter the VT date by adding 70 years:

– Perform any transactjon you like

slide-52
SLIDE 52

Conclusions

  • Security is an ongoing process and the Payment Card Industry

enforces compliant for a good reason.

  • Cybercriminals are not betuer than YOU.
  • It is easier to break things than fjx stufg; it needs a security mindset to

keep things secure.

  • Cybercrime pays untjl you get caught.
  • If you break the law, you are going to get caught!
  • Technology is changing fast & won’t be long before you get caught.
slide-53
SLIDE 53

One last set of tjps..

– Educate merchants not to leave the POI unatuended at any tjme. – To stay ahead of cybercriminals consider such scenarios & ensure you

antjcipate / can recognize, such fraudulent actjvity in real-tjme.

– Consider threat modeling exercises. – If you demagnetjze your mag-stripe, you cannot withdraw cash. – You may remove the CVV from your card, if you memorize it. – Don't put a photo of your card online! – Use RFID block: sleeves, wallets, cards.

slide-54
SLIDE 54

Time for Questjons!

Thank you for your atuentjon #LetsGoShopping

@drgfragkos