56

Leave ATM Forever Alone

Embed Size (px)

Citation preview

Page 1: Leave ATM Forever Alone
Page 2: Leave ATM Forever Alone

Experts@PHD:~# WhoAmI

•Positive Hack Days Team

•Speakers at many IT events

•Pentesters of various systems

•Authors of multiple articles, researches, advisories

•CLUB-MATE addicts

Page 3: Leave ATM Forever Alone
Page 4: Leave ATM Forever Alone

Rob The Bank

Page 5: Leave ATM Forever Alone

BOOOoooring

Page 6: Leave ATM Forever Alone

Based On True Stories

Page 7: Leave ATM Forever Alone

Volume Of European ATM Crime

Page 8: Leave ATM Forever Alone

ATM Fraud Attacks Effects

'Unlimited' Withdrawals and Sensitive Data Theft with:

Black Box and Malware attacks (PINPAD Malware, Malware to jackpot dispenser, Malware through USB ports; also

criminals gain physical access to ATMs to load malware through USB devices)

Diagnostics tests

Safe lock code compromise

Database Theft

Skimming

Internal attack (employees)

Page 9: Leave ATM Forever Alone

Malware

• Skimer.A -2008• ……………………………………

• Backdoor.Ploutus – 2013-2014• Backdoor.Padpin – 2014

• Macau Malware – 2014• Backdoor.Tyupkin – 2014

• Trojan.Skimmer (new) – 2015

Subtotal = 16 < variants of malware

Page 10: Leave ATM Forever Alone

Black Box Attacks

•Directly control ATM

Page 11: Leave ATM Forever Alone

Hijacking ATM Control/Processing Host

•Carbanac – 2015

•MitM – 2015

Page 12: Leave ATM Forever Alone

“Average Bill”

Typical ATM contains 4 cassettes with ~2500 notes in each one.

(5+10+20+50)= US$ or € 212 500

(100+500+1000+5000)= ₽16 500 000

could be stolen from ATM during single incident.

Page 13: Leave ATM Forever Alone

Tyupkin: Around The World In 412 Days

Page 14: Leave ATM Forever Alone

How It Works: Tyupkin & So On

•Access

• Infection

•Control

•Theft

Page 15: Leave ATM Forever Alone

How It Works: XFS

Network communication

Windows-based application

Configuration information

Unit #1

Service provider #1

Unit #2 Unit #3

Service provider #2

Service provider #3

Unit #4

Service provider #4

Unit #5 Unit #6

Service provider #5

Service provider #6

XFS API

XFS SPI

XFS manager

COM USB

Customer/Service mode

Page 16: Leave ATM Forever Alone

How It Really Works: XFS Insecurity

Network communication

Windows-based application

Configuration information

Unit #1

Service provider #1

Unit #2 Unit #3

Service provider #2

Service provider #3

Unit #4

Service provider #4

Unit #5 Unit #6

Service provider #5

Service provider #6

XFS API

XFS SPI

XFS manager

COM USB

Customer/Service mode

Page 17: Leave ATM Forever Alone

XFS, Cash Dispenser Device

•Cash withdrawal without

authorization•Cassette and cash

control•Software safe

opening

Page 18: Leave ATM Forever Alone

XFS, Identification Card Device

•Read/write data•Insert/eject/retain

cards•EMV reader (one can

access payment history stored in

chip)

Page 19: Leave ATM Forever Alone

XFS, PIN Keypad Device

• Export of the key is not available

• Open mode and secure mode read data

(for stealing PIN: an ATM software sets “secure mode”

for entering PIN, and intruder changes it to “open mode” to

capture the PIN)

Page 20: Leave ATM Forever Alone

XFS Authentication

•Authentication? What authentication?

•Exclusive access to XFS manager/service provider?

Exists, but not intended to be used for security

Page 21: Leave ATM Forever Alone

XFS Authentication

•Authentication? What authentication?

•Exclusive access to XFS manager/service provider?

Exists, but not intended to be used for security

Page 22: Leave ATM Forever Alone

Hacker, Porter And The Chamber Of Secrets

Page 23: Leave ATM Forever Alone

Windows XP Still Alive

•Early 2014 – 95% of ATMs run on

Windows XP•Support killed

off in April•>9000

vulnerabilities

Page 24: Leave ATM Forever Alone

Demo: MS 07-068 Strikes Again

http://www.youtube.com/watch?v=Uxd0TRdE6sw

Page 25: Leave ATM Forever Alone

How It Works: Black Box Attacks

• Dispenser

• Card reader

• Encrypted PIN-pad

• Sensors

Page 26: Leave ATM Forever Alone

How It Works: Physical Interfaces COM/USB

Network communication

Windows-based application

Configuration information

Unit #1

Service provider #1

Unit #2 Unit #3

Service provider #2

Service provider #3

Unit #4

Service provider #4

Unit #5 Unit #6

Service provider #5

Service provider #6

XFS API

XFS SPI

XFS manager

COM USB

Customer/Service mode

Page 27: Leave ATM Forever Alone

How It Really Works: COM/USB Insecurity

Network communication

Windows-based application

Configuration information

Unit #1

Service provider #1

Unit #2 Unit #3

Service provider #2

Service provider #3

Unit #4

Service provider #4

Unit #5 Unit #6

Service provider #5

Service provider #6

XFS API

XFS SPI

XFS manager

COM USB

Customer/Service mode

Page 28: Leave ATM Forever Alone

DinosauRS232

•Standard interface

•No specific drivers

•No authorization

•Insecure proprietary protocols (just sniff and replay)

Page 29: Leave ATM Forever Alone

Difficulties

•Protocols bloat

•Specific method of integrity control

•Short timeouts

•Endless polling

•New firmware version = new protocol

Page 30: Leave ATM Forever Alone

Typical serial protocol

•No good tools for analysis

•No flow control

•No host loss detection

•Packets• Fixed size

• Start/stop bytes• Length prefix + data

Page 31: Leave ATM Forever Alone

Advantages Of COM/USB

•Direct device control•Execution of undocumented

functions •Intercept unmasked sensitive data

Page 32: Leave ATM Forever Alone

Really Big Sale

Page 33: Leave ATM Forever Alone

Really Big Fail

Page 34: Leave ATM Forever Alone

Advantages Of COM/USB

•Possibility of producing hardware sniffer, which can’t

be detected by visual examination

Page 35: Leave ATM Forever Alone

Card Reader/ Writer/ Skimmer

Sensitive data disclosure, e.g. track data in plaintext,

is possible with reading command sending to COM/USB

port directly. This attack is possible with ATM's computer or with any external device,

which is connected to the card reader's COM/USB port.

Page 36: Leave ATM Forever Alone

What Big Vendors Think

The vulnerabilities are essentially normal specifications of the card readers and not unexpected. As long as the ATM is running within normal parameters, these

problems cannot possibly occur.(c)

However this vulnerability is inherent in the USB technology and is expected be

mitigated by the use of appropriate physical controls on access to the ATM

top box.(c)

Page 37: Leave ATM Forever Alone

Top Lock For The Top Box

Page 38: Leave ATM Forever Alone

Unlockpickable

Page 39: Leave ATM Forever Alone

Locks is not about security

Page 40: Leave ATM Forever Alone

How It Really Works: ATM Cabinet Locks

Page 41: Leave ATM Forever Alone

ATM is locked

Page 42: Leave ATM Forever Alone

Demo: Unlockpickable?

http://www.youtube.com/watch?v=KijIzHUtLjU

Page 43: Leave ATM Forever Alone

Secure Your ATMs

Page 44: Leave ATM Forever Alone

Advantages Of COM/USB

•Direct device control• Command execution mitigating all host-

based checks, e.g. cash withdrawal without notes counter checks

• 02 30 / 10 03 – start-stop sentinels

• XX XX– op-code

• XX – Unknown

• 01 01 … – data

• 42 – CRC8

0230

XX XX

XX

01 0102 00 03 00 04 00 05 00 06 00

1003

42

Page 45: Leave ATM Forever Alone

Quick Cash And Full Control

Control cash dispenser module by unauthorized application

or user. An attacker has possibility to control cash dispenser by sending command

to COM/USB port directly, including dispensing and presenting commands. This

attack is possible with ATM's computer or with any external device, which is connected to the dispenser's COM/USB port.

Page 46: Leave ATM Forever Alone

Demo: iCash

http://www.youtube.com/watch?v=ksEmXuV324I

Page 47: Leave ATM Forever Alone

What Big Vendors Think

“We regret informing you that we had decided to stop producing this model more than 3 years ago and warranties for our distributors been expired.”

Page 48: Leave ATM Forever Alone

What About Cryptography

Dispenser “Half” Security Level:

Any use of cryptography – is NOT equal to good use of

cryptography

Page 49: Leave ATM Forever Alone

Achievement Unlocked

Dispenser High Security Level:

Dispenser Upgrade Pack is released and available from

the vendor_name download center, and it will be

included as standard in the next release of XFS.(c)

Page 50: Leave ATM Forever Alone

We Had Two Libs Of Python, 35 USD, Power Bank And Wi-Fi Dongle

Page 51: Leave ATM Forever Alone

Cheap-and-Pi

•Minimal price

•Small

•Capable of using multiple interfaces

Page 52: Leave ATM Forever Alone

ATMs In Internet

Page 53: Leave ATM Forever Alone

No More SSL

•OpenSSL in ATM/POS software

•Misconfiguration

•PCI/PA DSS v.3.1

SSL >> TLS

Page 54: Leave ATM Forever Alone

Conclusions

• Service zone is important

• Current methods of protection is not enough

• Using execution prevention software without OS patches – is

wrong

Page 55: Leave ATM Forever Alone

Proposals

• Implement mutual authentication both for ATM computer and it’s devices

• Make peer review of XFS standard/communication protocols

• Service zone is as important as safe

• Trust environment is not about ATMs

• Implement regular security assessments and pentest of ATMs

Page 56: Leave ATM Forever Alone