SlideShare a Scribd company logo
NFC
Naked Fried Chicken
Matteo Beccaro || Opposing Force
phdays 2016 – May 18, 2016
© Opposing Force. All right reserved.
Who ||
Matteo Beccaro
Founder || Chief Technology Officer at Opposing Force, the first
Italian company specialized in offensive physical security
Twitter: @_bughardy_
© Opposing Force. All right reserved.
Agenda ||
 NFC: What are we talking about?
 Transport system structure
 Our tool
 Pentesting methodology
 Attack Surface
 Analyzing the elements
 Vulnerabilities
 Case studies
© Opposing Force. All right reserved.
Agenda ||
 NFC: What are we talking about?
 Transport system structure
 Our tool
 Pentesting methodology
 Attack Surface
 Analyzing the elements
 Vulnerabilities
 Case studies
© Opposing Force. All right reserved.
NFC: What are we talking about?||
© Opposing Force. All right reserved.
What is NFC?
• NFC stands for Near Field Communication
• Frequency at 13.56 MHz
• 3-5 cm of range
• Widely used in:
– Access Control systems
– Ticketing
– Mobile phones
NFC: What are we talking about?||
© Opposing Force. All right reserved.
NFC most notorious families:
• MIFARE
– MIFARE Classic
– MIFARE Ultralight
– MIFARE DesFire
• HID iClass
• Calypso
• FeliCa
NFC: What are we talking about?||
© Opposing Force. All right reserved.
MIFARE Classic
• Memory storage device ( 1K or 4K )
• Strong access control mechanisms
– A key is required to access data sector
– Use of Crypto1 Crapto1 algorithm
– Broken…
– .. But widely used ( RFID Door token, transport ticket, etc )
NFC: What are we talking about?||
© Opposing Force. All right reserved.
MIFARE Ultralight
• Memory storage device ( 64 bytes )
• Basic security mechanism
– OTP ( One-Time-Programmable ) sector
– Lock bytes sector
– Mostly used for disposable tickets
– It has some more secure children:
NFC: What are we talking about?||
© Opposing Force. All right reserved.
MIFARE DesFire
• Advanced security mechanisms ( 3DES, AES, etc )
• File system structure
• 2KB, 4KB or 8KB memory size
• Several variant:
– DESFIRE, DESFIRE EV1 and DESFIRE EV2
NFC: What are we talking about?||
© Opposing Force. All right reserved.
HID iClass
• Same encryption and authentication keys are shared across
all HID iCLASS Standard Security installations.
• Keys are already been extracted
• Two variants:
– iClass Standard ( common )
– iClass High Secure ( less common )
Both broken
Agenda ||
 NFC: What are we talking about?
 Transport system structure
 Our tool
 Pentesting methodology
 Attack Surface
 Analyzing the elements
 Vulnerabilities
 Case studies
© Opposing Force. All right reserved.
Transport system structure||
© Opposing Force. All right reserved.
 Defining a transportation system:
 We need to create a common methodology
 We need to have tools
 We need to be able to use schemas to help our works
Transport system structure||
© Opposing Force. All right reserved.
 Defining a schema
Transport system structure||
© Opposing Force. All right reserved.
 Defining a schema
Local
Remot
e
Transport system structure||
© Opposing Force. All right reserved.
 More in details…
Transport system structure||
© Opposing Force. All right reserved.
 Token:
 Usually a NFC card
• MIFARE ULTRALIGHT
• MIFARE CLASSIC
• CALYPSO
 Can store:
• multiple rides or subscriptions
• timestamp of last stamping
• details of where it has been used
• other data
Transport system structure||
© Opposing Force. All right reserved.
 Token:
 MIFARE CLASSIC
• Just broken
 MIFARE ULTRALIGHT
• Lock attack
• Time attack
• Reply attack
 Calypso
• All documentation is under NDA
Transport system structure||
© Opposing Force. All right reserved.
 Reader|Controller:
 Can operate offline or online
 Can be wire or wireless connected to the controller
 Usually supports multiple standards
 Its purpose is to check if a ticket is valid and stamp it
 It can stores secrets and keys
Transport system structure||
© Opposing Force. All right reserved.
 Backend
 Sometimes known as “Cloud”
 It can perform several operations:
 Statistics
 OTA updates
 Fraud detection
 Fraud prevention
Agenda ||
 NFC: What are we talking about?
 Transport system structure
 Our tool(s)
 Pentesting methodology
 Attack Surface
 Analyzing the elements
 Vulnerabilities
 Case studies
© Opposing Force. All right reserved.
Our tool(s)||
© Opposing Force. All right reserved.
 What tools we can use:
 HydraNFC
 Proxmark3
 ChameleonMini
 NFCulT
Our tool(s)||
© Opposing Force. All right reserved.
HydraNFC ( ~ 90 € )
• Use Texas Instrument TRF7970A NFC chipset ( 13.56MHz only
)
• MIFARE 1k and 14443A UID emulation
• ISO 14443A sniffing ( also autonomous mode )
• 2 different raw modes
• Still in development ( @hydrabus )
• More info at http://hydrabus.com/hydranfc-1-0-
specifications/
Our tool(s)||
© Opposing Force. All right reserved.
Proxmark3 ( ~ 200 € )
• HF e LF capabilities
• Big community
• Supports almost all known RFID tags
• Supports sniffing
• Supports emulation
• More info at http://proxmark.org/forum/index.php
Our tool(s)||
© Opposing Force. All right reserved.
ChameleonMini ( ~ 100 € )
• HF ( 13.56MHz ) only
• Almost same capabilities of HydraNFC
• Different chipset
• Firmware available only for the old revision at the moment
• More info at http://kasper-oswald.de/gb/chameleonmini/
Our tool(s)||
© Opposing Force. All right reserved.
NFCulT ( ~ 0 € )
• Mobile application for NFC-enabled Android smartphones
• Its aim is to provide quick help during assessment of ticketing
systems
• Implements Lock, Time and Reply attacks
• It has a custom edit mode to edit bit by bit the ticket data
• Supports MIFARE ULTRALIGHT and planned support for
CLASSIC
Our tool(s)||
© Opposing Force. All right reserved.
NFCulT
• Lock Attack
• Set the OTP page in Read-Only mode
• Operation irreversible
• If the reader does not check if it can write
the OTP sector: free rides
Our tool(s)||
© Opposing Force. All right reserved.
NFCulT
• Time Attack
• If you find and decode the timestamp
you can stamp the ticket by yourself.
• Again, free rides
Our tool(s)||
© Opposing Force. All right reserved.
NFCulT
• Reply Attack
• Use of UID magic ticket ( ~ 15 € )
• Can bypass all offline anti fraud prevention
mechanisms
• Guess what? Free rides
Our tool(s)||
© Opposing Force. All right reserved.
NFCulT
• Custom edit
• Useful for understanding the architecture
of the data saved on the ticket ( e.g. for
finding the correct timestamp )
• You can quickly transform from hex to bin
and viceversa
• You can edit bit by bit the data and write
back on the ticket
Agenda ||
 NFC: What are we talking about?
 Transport system structure
 Our tool(s)
 Pentesting methodology
 Attack Surface
 Analyzing the elements
 Vulnerabilities
 Case studies
© Opposing Force. All right reserved.
Pentesting methodology||
© Opposing Force. All right reserved.
What are we looking for?
Pentesting methodology||
© Opposing Force. All right reserved.
Stamping machine
Attack Surface Attacks to Perform Impact
NFC Interface Analyze the stamping
mechanisms
Free tickets
Hardware board Analyze the exposed interface (
JTAG, UART, etc )
Firmware / secrets dumping
GSM/GPRS/Eth Interface Is MITM possible?
Intercepting the data
Intercepting secrets / sensitive
data
Pentesting methodology||
© Opposing Force. All right reserved.
Vending machine
Attack Surface Attacks to Perform Impact
NFC Interface Analyze the recharging
mechanisms
Free tickets, for everyone
Hardware board Analyze the exposed interface (
JTAG, UART, etc )
Firmware / secrets dumping
GSM/GPRS/Eth Interface Is MITM possible?
Intercepting the data
Intercepting secrets / sensitive
data
( e.g. credit card details, etc )
Computer Application Analyzing network services
exposed
Complete control of the machine
Pentesting methodology||
© Opposing Force. All right reserved.
The backend
Attack Surface Attacks to Perform Impact
Web application(s) Web app pentesting Various
Network services Network pentesting Various
Physical location Try to get physical access to the
servers
Pwned
Agenda ||
 NFC: What are we talking about?
 Transport system structure
 Our tool(s)
 Pentesting methodology
 Attack Surface
 Analyzing the elements
 Vulnerabilities
 Case studies
© Opposing Force. All right reserved.
Case studies ||
© Opposing Force. All right reserved.
A MIFARE ULTRALIGHT ticketing system
Case studies ||
© Opposing Force. All right reserved.
A MIFARE ULTRALIGHT ticketing system
Case studies ||
© Opposing Force. All right reserved.
A MIFARE ULTRALIGHT ticketing system
Lock bit for the OTP sector
is not checked by the
stamping machine
Absence of a UID blacklist
in the backend
Timestamp are not
encrypted nor signed
Case studies ||
© Opposing Force. All right reserved.
A MIFARE CLASSIC door lock
Case studies ||
© Opposing Force. All right reserved.
A MIFARE CLASSIC door lock
Case studies ||
© Opposing Force. All right reserved.
A MIFARE hotel door lock
Card’s UID
Room number:
int(0x17ea, 16) =
6122
ThanksOpposing Force - challenging your security - @_opposingforce
https://www.opposingforce.it | engage@opposingforce.it
© Opposing Force. All right reserved.
Q&A Time!Opposing Force - challenging your security - @_opposingforce
© Opposing Force. All right reserved.
https://www.opposingforce.it | engage@opposingforce.it

More Related Content

PDF
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
Positive Hack Days
 
PPTX
Fingerprinting and Attacking a Healthcare Infrastructure
Positive Hack Days
 
PPTX
Exploiting Redundancy Properties of Malicious Infrastructure for Incident Det...
Positive Hack Days
 
PDF
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
PacSecJP
 
PDF
Kavya racharla ndh-naropanth_fin
PacSecJP
 
PDF
Track 5 session 2 - st dev con 2016 - security iot best practices
ST_World
 
PPTX
Practical Security Assessments of IoT Devices and Systems
Ollie Whitehouse
 
PDF
Defcon 22-tim-mcguffin-one-man-shop
Priyanka Aash
 
Privacy and Security in the Internet of Things / Конфиденциальность и безопас...
Positive Hack Days
 
Fingerprinting and Attacking a Healthcare Infrastructure
Positive Hack Days
 
Exploiting Redundancy Properties of Malicious Infrastructure for Incident Det...
Positive Hack Days
 
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
PacSecJP
 
Kavya racharla ndh-naropanth_fin
PacSecJP
 
Track 5 session 2 - st dev con 2016 - security iot best practices
ST_World
 
Practical Security Assessments of IoT Devices and Systems
Ollie Whitehouse
 
Defcon 22-tim-mcguffin-one-man-shop
Priyanka Aash
 

What's hot (20)

PPT
Attacking Embedded Devices (No Axe Required)
Security Weekly
 
PDF
KazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
Yogesh Ojha
 
PDF
Electronic Access Control Security / Безопасность электронных систем контроля...
Positive Hack Days
 
PDF
Why is it so hard to make secure chips?
Riscure
 
PDF
Physical Penetration Testing - RootedCON 2015
Hykeos
 
PDF
Yunusov babin 7 sins pres atm v2
PacSecJP
 
PDF
Beginner’s Guide on How to Start Exploring IoT Security 1st Session
veerababu penugonda(Mr-IoT)
 
PPTX
[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...
CODE BLUE
 
PDF
How to secure HCE
Riscure
 
PDF
Kochetova+osipv atm how_to_make_the_fraud__final
PacSecJP
 
PDF
Defcon 22-weston-hecker-burner-phone-ddos
Priyanka Aash
 
PPTX
Firmware analysis 101
veerababu penugonda(Mr-IoT)
 
PDF
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE
 
PPTX
Making and breaking security in embedded devices
Yashin Mehaboobe
 
PDF
Efficient Reverse Engineering of Automotive Firmware
Riscure
 
PPTX
640-554 IT Certification and Career Paths
hibaehed
 
PDF
How to secure electronic passports
Riscure
 
PDF
BOSNOG NAC stack 2018
GENIANS, INC.
 
PDF
Pki 201 Key Management
NCC Group
 
PPTX
Hardware Security Training By TONEX
Bryan Len
 
Attacking Embedded Devices (No Axe Required)
Security Weekly
 
KazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
Yogesh Ojha
 
Electronic Access Control Security / Безопасность электронных систем контроля...
Positive Hack Days
 
Why is it so hard to make secure chips?
Riscure
 
Physical Penetration Testing - RootedCON 2015
Hykeos
 
Yunusov babin 7 sins pres atm v2
PacSecJP
 
Beginner’s Guide on How to Start Exploring IoT Security 1st Session
veerababu penugonda(Mr-IoT)
 
[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...
CODE BLUE
 
How to secure HCE
Riscure
 
Kochetova+osipv atm how_to_make_the_fraud__final
PacSecJP
 
Defcon 22-weston-hecker-burner-phone-ddos
Priyanka Aash
 
Firmware analysis 101
veerababu penugonda(Mr-IoT)
 
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE
 
Making and breaking security in embedded devices
Yashin Mehaboobe
 
Efficient Reverse Engineering of Automotive Firmware
Riscure
 
640-554 IT Certification and Career Paths
hibaehed
 
How to secure electronic passports
Riscure
 
BOSNOG NAC stack 2018
GENIANS, INC.
 
Pki 201 Key Management
NCC Group
 
Hardware Security Training By TONEX
Bryan Len
 
Ad

Viewers also liked (20)

PDF
Magic Box, или Как пришлось сломать банкоматы, чтобы их спасти
Positive Hack Days
 
PPT
Псевдобезопасность NFC-сервисов
Positive Hack Days
 
PPTX
Страх и ненависть в телеком-операторах
Positive Hack Days
 
PPTX
Мобильная связь небезопасна. Аргументы, подкрепленные фактами
Positive Hack Days
 
PDF
Строим ханипот и выявляем DDoS-атаки
Positive Hack Days
 
PPTX
Угадываем пароль за минуту
Positive Hack Days
 
PDF
Аспекты деятельности инсайдеров на предприятии
Positive Hack Days
 
PDF
Janitor to CISO in 360 Seconds: Exploiting Mechanical Privilege Escalation
Positive Hack Days
 
PPT
Восток — дело тонкое, или Уязвимости медицинского и индустриального ПО
Positive Hack Days
 
PPTX
Эксплуатируем неэксплуатируемые уязвимости SAP
Positive Hack Days
 
PDF
Перехват беспроводных гаджетов — от квадрокоптеров до мышек
Positive Hack Days
 
PDF
Боремся с читингом в онлайн-играх
Positive Hack Days
 
PPTX
Ковбой Энди, Рик Декард и другие охотники за наградой
Positive Hack Days
 
PDF
DNS как линия защиты/DNS as a Defense Vector
Positive Hack Days
 
PDF
Вирусы есть? А если найду?
Positive Hack Days
 
PDF
Использование KASan для автономного гипервизора
Positive Hack Days
 
PDF
Обратная разработка бинарных форматов с помощью Kaitai Struct
Positive Hack Days
 
PDF
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
Positive Hack Days
 
PDF
Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...
Positive Hack Days
 
PPTX
Application security? Firewall it!
Positive Hack Days
 
Magic Box, или Как пришлось сломать банкоматы, чтобы их спасти
Positive Hack Days
 
Псевдобезопасность NFC-сервисов
Positive Hack Days
 
Страх и ненависть в телеком-операторах
Positive Hack Days
 
Мобильная связь небезопасна. Аргументы, подкрепленные фактами
Positive Hack Days
 
Строим ханипот и выявляем DDoS-атаки
Positive Hack Days
 
Угадываем пароль за минуту
Positive Hack Days
 
Аспекты деятельности инсайдеров на предприятии
Positive Hack Days
 
Janitor to CISO in 360 Seconds: Exploiting Mechanical Privilege Escalation
Positive Hack Days
 
Восток — дело тонкое, или Уязвимости медицинского и индустриального ПО
Positive Hack Days
 
Эксплуатируем неэксплуатируемые уязвимости SAP
Positive Hack Days
 
Перехват беспроводных гаджетов — от квадрокоптеров до мышек
Positive Hack Days
 
Боремся с читингом в онлайн-играх
Positive Hack Days
 
Ковбой Энди, Рик Декард и другие охотники за наградой
Positive Hack Days
 
DNS как линия защиты/DNS as a Defense Vector
Positive Hack Days
 
Вирусы есть? А если найду?
Positive Hack Days
 
Использование KASan для автономного гипервизора
Positive Hack Days
 
Обратная разработка бинарных форматов с помощью Kaitai Struct
Positive Hack Days
 
john-devkit: 100 типов хешей спустя / john-devkit: 100 Hash Types Later
Positive Hack Days
 
Если нашлась одна ошибка — есть и другие. Один способ выявить «наследуемые» у...
Positive Hack Days
 
Application security? Firewall it!
Positive Hack Days
 
Ad

Similar to NFC: Naked Fried Chicken / Пентест NFC — вот что я люблю (20)

PDF
NFC: Naked Fried Chicken (PHDays VI)
Opposing Force S.r.l.
 
PDF
Electronic Access Control Security
Opposing Force S.r.l.
 
PPTX
Securing Internet of Things
Rishabh Sharma
 
PDF
Intercept product
David Pereira
 
PPT
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
skpatel91
 
PPT
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
skpatel91
 
PDF
Module 7 (sniffers)
Wail Hassan
 
PDF
Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017
MLconf
 
PDF
50120140501013
IAEME Publication
 
PPTX
Internet of things security "Hardware Security"
Ahmed Mohamed Mahmoud
 
PPTX
Cyber security
Aman Pradhan
 
PDF
Lessons Learned Fighting Modern Cyberthreats in Critical ICS Networks
Angeloluca Barba
 
PPTX
MITRE ATT&CK Fundamentals Webinar - Day 3.pptx
ssuser8b5015
 
PPTX
Webinar on identifying, preventing and securing against the unidentifiable at...
Intergence Ltd.
 
PPTX
Cyber warfare introduction
jagadeesh katla
 
PPTX
Domain 7 of CEH Mobile Platform, IoT, and OT Hacking.pptx
Infosectrain3
 
PDF
DSS ITSEC Conference 2012 - Forescout NAC #1
Andris Soroka
 
PDF
[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by Vi...
CODE BLUE
 
PDF
Security for automation in Internet of Things by using one time password
SHASHANK WANKHADE
 
PPTX
Metasploit
Parth Sahu
 
NFC: Naked Fried Chicken (PHDays VI)
Opposing Force S.r.l.
 
Electronic Access Control Security
Opposing Force S.r.l.
 
Securing Internet of Things
Rishabh Sharma
 
Intercept product
David Pereira
 
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
skpatel91
 
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
skpatel91
 
Module 7 (sniffers)
Wail Hassan
 
Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017
MLconf
 
50120140501013
IAEME Publication
 
Internet of things security "Hardware Security"
Ahmed Mohamed Mahmoud
 
Cyber security
Aman Pradhan
 
Lessons Learned Fighting Modern Cyberthreats in Critical ICS Networks
Angeloluca Barba
 
MITRE ATT&CK Fundamentals Webinar - Day 3.pptx
ssuser8b5015
 
Webinar on identifying, preventing and securing against the unidentifiable at...
Intergence Ltd.
 
Cyber warfare introduction
jagadeesh katla
 
Domain 7 of CEH Mobile Platform, IoT, and OT Hacking.pptx
Infosectrain3
 
DSS ITSEC Conference 2012 - Forescout NAC #1
Andris Soroka
 
[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by Vi...
CODE BLUE
 
Security for automation in Internet of Things by using one time password
SHASHANK WANKHADE
 
Metasploit
Parth Sahu
 

More from Positive Hack Days (20)

PPTX
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Positive Hack Days
 
PPTX
Как мы собираем проекты в выделенном окружении в Windows Docker
Positive Hack Days
 
PPTX
Типовая сборка и деплой продуктов в Positive Technologies
Positive Hack Days
 
PPTX
Аналитика в проектах: TFS + Qlik
Positive Hack Days
 
PPTX
Использование анализатора кода SonarQube
Positive Hack Days
 
PPTX
Развитие сообщества Open DevOps Community
Positive Hack Days
 
PPTX
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Positive Hack Days
 
PPTX
Автоматизация построения правил для Approof
Positive Hack Days
 
PDF
Мастер-класс «Трущобы Application Security»
Positive Hack Days
 
PDF
Формальные методы защиты приложений
Positive Hack Days
 
PDF
Эвристические методы защиты приложений
Positive Hack Days
 
PDF
Теоретические основы Application Security
Positive Hack Days
 
PPTX
От экспериментального программирования к промышленному: путь длиной в 10 лет
Positive Hack Days
 
PDF
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Positive Hack Days
 
PPTX
Требования по безопасности в архитектуре ПО
Positive Hack Days
 
PDF
Формальная верификация кода на языке Си
Positive Hack Days
 
PPTX
Механизмы предотвращения атак в ASP.NET Core
Positive Hack Days
 
PDF
SOC для КИИ: израильский опыт
Positive Hack Days
 
PDF
Honeywell Industrial Cyber Security Lab & Services Center
Positive Hack Days
 
PDF
Credential stuffing и брутфорс-атаки
Positive Hack Days
 
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Positive Hack Days
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Positive Hack Days
 
Типовая сборка и деплой продуктов в Positive Technologies
Positive Hack Days
 
Аналитика в проектах: TFS + Qlik
Positive Hack Days
 
Использование анализатора кода SonarQube
Positive Hack Days
 
Развитие сообщества Open DevOps Community
Positive Hack Days
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Positive Hack Days
 
Автоматизация построения правил для Approof
Positive Hack Days
 
Мастер-класс «Трущобы Application Security»
Positive Hack Days
 
Формальные методы защиты приложений
Positive Hack Days
 
Эвристические методы защиты приложений
Positive Hack Days
 
Теоретические основы Application Security
Positive Hack Days
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
Positive Hack Days
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Positive Hack Days
 
Требования по безопасности в архитектуре ПО
Positive Hack Days
 
Формальная верификация кода на языке Си
Positive Hack Days
 
Механизмы предотвращения атак в ASP.NET Core
Positive Hack Days
 
SOC для КИИ: израильский опыт
Positive Hack Days
 
Honeywell Industrial Cyber Security Lab & Services Center
Positive Hack Days
 
Credential stuffing и брутфорс-атаки
Positive Hack Days
 

Recently uploaded (20)

PDF
Software Development Company | KodekX
KodekX
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Software Development Company | KodekX
KodekX
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Software Development Methodologies in 2025
KodekX
 
Comunidade Salesforce São Paulo - Desmistificando o Omnistudio (Vlocity)
Francisco Vieira Júnior
 
Doc9.....................................
SofiaCollazos
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 

NFC: Naked Fried Chicken / Пентест NFC — вот что я люблю

  • 1. NFC Naked Fried Chicken Matteo Beccaro || Opposing Force phdays 2016 – May 18, 2016 © Opposing Force. All right reserved.
  • 2. Who || Matteo Beccaro Founder || Chief Technology Officer at Opposing Force, the first Italian company specialized in offensive physical security Twitter: @_bughardy_ © Opposing Force. All right reserved.
  • 3. Agenda ||  NFC: What are we talking about?  Transport system structure  Our tool  Pentesting methodology  Attack Surface  Analyzing the elements  Vulnerabilities  Case studies © Opposing Force. All right reserved.
  • 4. Agenda ||  NFC: What are we talking about?  Transport system structure  Our tool  Pentesting methodology  Attack Surface  Analyzing the elements  Vulnerabilities  Case studies © Opposing Force. All right reserved.
  • 5. NFC: What are we talking about?|| © Opposing Force. All right reserved. What is NFC? • NFC stands for Near Field Communication • Frequency at 13.56 MHz • 3-5 cm of range • Widely used in: – Access Control systems – Ticketing – Mobile phones
  • 6. NFC: What are we talking about?|| © Opposing Force. All right reserved. NFC most notorious families: • MIFARE – MIFARE Classic – MIFARE Ultralight – MIFARE DesFire • HID iClass • Calypso • FeliCa
  • 7. NFC: What are we talking about?|| © Opposing Force. All right reserved. MIFARE Classic • Memory storage device ( 1K or 4K ) • Strong access control mechanisms – A key is required to access data sector – Use of Crypto1 Crapto1 algorithm – Broken… – .. But widely used ( RFID Door token, transport ticket, etc )
  • 8. NFC: What are we talking about?|| © Opposing Force. All right reserved. MIFARE Ultralight • Memory storage device ( 64 bytes ) • Basic security mechanism – OTP ( One-Time-Programmable ) sector – Lock bytes sector – Mostly used for disposable tickets – It has some more secure children:
  • 9. NFC: What are we talking about?|| © Opposing Force. All right reserved. MIFARE DesFire • Advanced security mechanisms ( 3DES, AES, etc ) • File system structure • 2KB, 4KB or 8KB memory size • Several variant: – DESFIRE, DESFIRE EV1 and DESFIRE EV2
  • 10. NFC: What are we talking about?|| © Opposing Force. All right reserved. HID iClass • Same encryption and authentication keys are shared across all HID iCLASS Standard Security installations. • Keys are already been extracted • Two variants: – iClass Standard ( common ) – iClass High Secure ( less common ) Both broken
  • 11. Agenda ||  NFC: What are we talking about?  Transport system structure  Our tool  Pentesting methodology  Attack Surface  Analyzing the elements  Vulnerabilities  Case studies © Opposing Force. All right reserved.
  • 12. Transport system structure|| © Opposing Force. All right reserved.  Defining a transportation system:  We need to create a common methodology  We need to have tools  We need to be able to use schemas to help our works
  • 13. Transport system structure|| © Opposing Force. All right reserved.  Defining a schema
  • 14. Transport system structure|| © Opposing Force. All right reserved.  Defining a schema Local Remot e
  • 15. Transport system structure|| © Opposing Force. All right reserved.  More in details…
  • 16. Transport system structure|| © Opposing Force. All right reserved.  Token:  Usually a NFC card • MIFARE ULTRALIGHT • MIFARE CLASSIC • CALYPSO  Can store: • multiple rides or subscriptions • timestamp of last stamping • details of where it has been used • other data
  • 17. Transport system structure|| © Opposing Force. All right reserved.  Token:  MIFARE CLASSIC • Just broken  MIFARE ULTRALIGHT • Lock attack • Time attack • Reply attack  Calypso • All documentation is under NDA
  • 18. Transport system structure|| © Opposing Force. All right reserved.  Reader|Controller:  Can operate offline or online  Can be wire or wireless connected to the controller  Usually supports multiple standards  Its purpose is to check if a ticket is valid and stamp it  It can stores secrets and keys
  • 19. Transport system structure|| © Opposing Force. All right reserved.  Backend  Sometimes known as “Cloud”  It can perform several operations:  Statistics  OTA updates  Fraud detection  Fraud prevention
  • 20. Agenda ||  NFC: What are we talking about?  Transport system structure  Our tool(s)  Pentesting methodology  Attack Surface  Analyzing the elements  Vulnerabilities  Case studies © Opposing Force. All right reserved.
  • 21. Our tool(s)|| © Opposing Force. All right reserved.  What tools we can use:  HydraNFC  Proxmark3  ChameleonMini  NFCulT
  • 22. Our tool(s)|| © Opposing Force. All right reserved. HydraNFC ( ~ 90 € ) • Use Texas Instrument TRF7970A NFC chipset ( 13.56MHz only ) • MIFARE 1k and 14443A UID emulation • ISO 14443A sniffing ( also autonomous mode ) • 2 different raw modes • Still in development ( @hydrabus ) • More info at http://hydrabus.com/hydranfc-1-0- specifications/
  • 23. Our tool(s)|| © Opposing Force. All right reserved. Proxmark3 ( ~ 200 € ) • HF e LF capabilities • Big community • Supports almost all known RFID tags • Supports sniffing • Supports emulation • More info at http://proxmark.org/forum/index.php
  • 24. Our tool(s)|| © Opposing Force. All right reserved. ChameleonMini ( ~ 100 € ) • HF ( 13.56MHz ) only • Almost same capabilities of HydraNFC • Different chipset • Firmware available only for the old revision at the moment • More info at http://kasper-oswald.de/gb/chameleonmini/
  • 25. Our tool(s)|| © Opposing Force. All right reserved. NFCulT ( ~ 0 € ) • Mobile application for NFC-enabled Android smartphones • Its aim is to provide quick help during assessment of ticketing systems • Implements Lock, Time and Reply attacks • It has a custom edit mode to edit bit by bit the ticket data • Supports MIFARE ULTRALIGHT and planned support for CLASSIC
  • 26. Our tool(s)|| © Opposing Force. All right reserved. NFCulT • Lock Attack • Set the OTP page in Read-Only mode • Operation irreversible • If the reader does not check if it can write the OTP sector: free rides
  • 27. Our tool(s)|| © Opposing Force. All right reserved. NFCulT • Time Attack • If you find and decode the timestamp you can stamp the ticket by yourself. • Again, free rides
  • 28. Our tool(s)|| © Opposing Force. All right reserved. NFCulT • Reply Attack • Use of UID magic ticket ( ~ 15 € ) • Can bypass all offline anti fraud prevention mechanisms • Guess what? Free rides
  • 29. Our tool(s)|| © Opposing Force. All right reserved. NFCulT • Custom edit • Useful for understanding the architecture of the data saved on the ticket ( e.g. for finding the correct timestamp ) • You can quickly transform from hex to bin and viceversa • You can edit bit by bit the data and write back on the ticket
  • 30. Agenda ||  NFC: What are we talking about?  Transport system structure  Our tool(s)  Pentesting methodology  Attack Surface  Analyzing the elements  Vulnerabilities  Case studies © Opposing Force. All right reserved.
  • 31. Pentesting methodology|| © Opposing Force. All right reserved. What are we looking for?
  • 32. Pentesting methodology|| © Opposing Force. All right reserved. Stamping machine Attack Surface Attacks to Perform Impact NFC Interface Analyze the stamping mechanisms Free tickets Hardware board Analyze the exposed interface ( JTAG, UART, etc ) Firmware / secrets dumping GSM/GPRS/Eth Interface Is MITM possible? Intercepting the data Intercepting secrets / sensitive data
  • 33. Pentesting methodology|| © Opposing Force. All right reserved. Vending machine Attack Surface Attacks to Perform Impact NFC Interface Analyze the recharging mechanisms Free tickets, for everyone Hardware board Analyze the exposed interface ( JTAG, UART, etc ) Firmware / secrets dumping GSM/GPRS/Eth Interface Is MITM possible? Intercepting the data Intercepting secrets / sensitive data ( e.g. credit card details, etc ) Computer Application Analyzing network services exposed Complete control of the machine
  • 34. Pentesting methodology|| © Opposing Force. All right reserved. The backend Attack Surface Attacks to Perform Impact Web application(s) Web app pentesting Various Network services Network pentesting Various Physical location Try to get physical access to the servers Pwned
  • 35. Agenda ||  NFC: What are we talking about?  Transport system structure  Our tool(s)  Pentesting methodology  Attack Surface  Analyzing the elements  Vulnerabilities  Case studies © Opposing Force. All right reserved.
  • 36. Case studies || © Opposing Force. All right reserved. A MIFARE ULTRALIGHT ticketing system
  • 37. Case studies || © Opposing Force. All right reserved. A MIFARE ULTRALIGHT ticketing system
  • 38. Case studies || © Opposing Force. All right reserved. A MIFARE ULTRALIGHT ticketing system Lock bit for the OTP sector is not checked by the stamping machine Absence of a UID blacklist in the backend Timestamp are not encrypted nor signed
  • 39. Case studies || © Opposing Force. All right reserved. A MIFARE CLASSIC door lock
  • 40. Case studies || © Opposing Force. All right reserved. A MIFARE CLASSIC door lock
  • 41. Case studies || © Opposing Force. All right reserved. A MIFARE hotel door lock Card’s UID Room number: int(0x17ea, 16) = 6122
  • 42. ThanksOpposing Force - challenging your security - @_opposingforce https://www.opposingforce.it | [email protected] © Opposing Force. All right reserved.
  • 43. Q&A Time!Opposing Force - challenging your security - @_opposingforce © Opposing Force. All right reserved. https://www.opposingforce.it | [email protected]