Contactless Overflow Code Execution
Contactless Overflow Code Execution
OVERFLOW
Critical contactless vulnerabilities in
NFC readers used in point of sales and
ATMs.
ABOUT ME
• INTRODUCTION.
• IDTECH CASE.
• VULNERABLE DEVICES FROM OTHERS.
• IMPACT & WEAPONIZATION.
• ATM SCENARIO
Main MCU
http://index-of.es/Miscellanous/CONF%20SLIDES%20AND%20PAPER/us-15-Fillmore-Crash-Pay-How-To-Own-And-Clone-Contactless-Payment-Devices.pdf
https://www.openscdp.org/scripts/tutorial/emv/reademv.html
https://salmg.net/2017/09/12/intro-to-analyze-nfc-contactless-cards/
1. Locate memory address range for peripheral that receives the data.
2. Look for the bytes that the reader sends to the card:
2PAY.SYS.DDF01
Many NFC chips that supports emulation doesn’t support extended APDU.
With the ACR122u you can only send max of 0xFF bytes
We can send 0xFFFF (65.000) bytes of ARM instructions to modify the firmware
©2023 IOActive, Inc. All rights reserved.
VULNERABILITIES
This stack buffer overflow is present in 21 different functions (Kiosk III firmware).
• Attacker relies on when any SDK vulnerable API is called by User’s program to
successfully attack the HOST at any given time.
a2= s_device_type
DoIDGCMD_str ( ) sends the USB payload to the readers and gets the response.
Based on the arguments received, DoIDGCMD_str( ) will not read more than 1024 bytes from the device.
But, how big is the destination buffer (a5) ? Let’s go back to Device_setcurrentdevice ( )
HOST
Blog posts will cover some of the other ones with POCs and Demos.
Some of the most important worldwide ATM brands with contactless uses
Idtech readers:
NCR
WINCOR/DIEBOLD
FUJITSU
HYOSUNG
Track1/Track2
• Exploiting vulnerabilities in the SDK/Driver responsible for the NFC reader comms.
Thank you.