SlideShare ist ein Scribd-Unternehmen logo
1 von 43
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

Weitere ähnliche Inhalte

Was ist angesagt?

Yunusov babin 7 sins pres atm v2
Yunusov babin 7 sins pres atm v2Yunusov babin 7 sins pres atm v2
Yunusov babin 7 sins pres atm v2
PacSecJP
 
[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...
[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...
[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...
CODE BLUE
 
Kochetova+osipv atm how_to_make_the_fraud__final
Kochetova+osipv atm how_to_make_the_fraud__finalKochetova+osipv atm how_to_make_the_fraud__final
Kochetova+osipv atm how_to_make_the_fraud__final
PacSecJP
 
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE
 
Pki 201 Key Management
Pki 201 Key ManagementPki 201 Key Management
Pki 201 Key Management
NCC Group
 
Hardware Security Training By TONEX
Hardware Security Training By TONEXHardware Security Training By TONEX
Hardware Security Training By TONEX
Bryan Len
 

Was ist angesagt? (20)

Attacking Embedded Devices (No Axe Required)
Attacking Embedded Devices (No Axe Required)Attacking Embedded Devices (No Axe Required)
Attacking Embedded Devices (No Axe Required)
 
KazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
KazHackStan Doing The IoT Penetration Testing - Yogesh OjhaKazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
KazHackStan Doing The IoT Penetration Testing - Yogesh Ojha
 
Electronic Access Control Security / Безопасность электронных систем контроля...
Electronic Access Control Security / Безопасность электронных систем контроля...Electronic Access Control Security / Безопасность электронных систем контроля...
Electronic Access Control Security / Безопасность электронных систем контроля...
 
Why is it so hard to make secure chips?
Why is it so hard to make secure chips?Why is it so hard to make secure chips?
Why is it so hard to make secure chips?
 
Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015Physical Penetration Testing - RootedCON 2015
Physical Penetration Testing - RootedCON 2015
 
Yunusov babin 7 sins pres atm v2
Yunusov babin 7 sins pres atm v2Yunusov babin 7 sins pres atm v2
Yunusov babin 7 sins pres atm v2
 
Beginner’s Guide on How to Start Exploring IoT Security 1st Session
Beginner’s Guide on How to Start Exploring IoT Security 1st SessionBeginner’s Guide on How to Start Exploring IoT Security 1st Session
Beginner’s Guide on How to Start Exploring IoT Security 1st Session
 
[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...
[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...
[CB16] ATMS how to break them to stop the fraud. by Olga Kochetova & Alexey O...
 
How to secure HCE
How to secure HCEHow to secure HCE
How to secure HCE
 
Kochetova+osipv atm how_to_make_the_fraud__final
Kochetova+osipv atm how_to_make_the_fraud__finalKochetova+osipv atm how_to_make_the_fraud__final
Kochetova+osipv atm how_to_make_the_fraud__final
 
Defcon 22-weston-hecker-burner-phone-ddos
Defcon 22-weston-hecker-burner-phone-ddosDefcon 22-weston-hecker-burner-phone-ddos
Defcon 22-weston-hecker-burner-phone-ddos
 
Firmware analysis 101
Firmware analysis 101Firmware analysis 101
Firmware analysis 101
 
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
CODE BLUE 2014 : DeviceDisEnabler : A hypervisor which hides devices to prote...
 
Making and breaking security in embedded devices
Making and breaking security in embedded devicesMaking and breaking security in embedded devices
Making and breaking security in embedded devices
 
Efficient Reverse Engineering of Automotive Firmware
Efficient Reverse Engineering of Automotive FirmwareEfficient Reverse Engineering of Automotive Firmware
Efficient Reverse Engineering of Automotive Firmware
 
640-554 IT Certification and Career Paths
640-554 IT Certification and Career Paths640-554 IT Certification and Career Paths
640-554 IT Certification and Career Paths
 
How to secure electronic passports
How to secure electronic passportsHow to secure electronic passports
How to secure electronic passports
 
BOSNOG NAC stack 2018
BOSNOG NAC stack 2018BOSNOG NAC stack 2018
BOSNOG NAC stack 2018
 
Pki 201 Key Management
Pki 201 Key ManagementPki 201 Key Management
Pki 201 Key Management
 
Hardware Security Training By TONEX
Hardware Security Training By TONEXHardware Security Training By TONEX
Hardware Security Training By TONEX
 

Andere mochten auch

Andere mochten auch (20)

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

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

Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017
Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017
Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017
MLconf
 
[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by Vi...
[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by  Vi...[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by  Vi...
[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by Vi...
CODE BLUE
 

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

NFC: Naked Fried Chicken (PHDays VI)
NFC: Naked Fried Chicken (PHDays VI)NFC: Naked Fried Chicken (PHDays VI)
NFC: Naked Fried Chicken (PHDays VI)
 
Electronic Access Control Security
Electronic Access Control SecurityElectronic Access Control Security
Electronic Access Control Security
 
Securing Internet of Things
Securing Internet of ThingsSecuring Internet of Things
Securing Internet of Things
 
Intercept product
Intercept productIntercept product
Intercept product
 
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
 
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
Detection of Idle Stealth Port Scan Attack in Network Intrusion Detection Sys...
 
Module 7 (sniffers)
Module 7 (sniffers)Module 7 (sniffers)
Module 7 (sniffers)
 
Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017
Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017
Ashrith Barthur, Security Scientist, H2o.ai, at MLconf 2017
 
50120140501013
5012014050101350120140501013
50120140501013
 
Internet of things security "Hardware Security"
Internet of things security "Hardware Security"Internet of things security "Hardware Security"
Internet of things security "Hardware Security"
 
Cyber security
Cyber securityCyber security
Cyber security
 
Lessons Learned Fighting Modern Cyberthreats in Critical ICS Networks
Lessons Learned Fighting Modern Cyberthreats in Critical ICS NetworksLessons Learned Fighting Modern Cyberthreats in Critical ICS Networks
Lessons Learned Fighting Modern Cyberthreats in Critical ICS Networks
 
Webinar on identifying, preventing and securing against the unidentifiable at...
Webinar on identifying, preventing and securing against the unidentifiable at...Webinar on identifying, preventing and securing against the unidentifiable at...
Webinar on identifying, preventing and securing against the unidentifiable at...
 
Cyber warfare introduction
Cyber warfare introductionCyber warfare introduction
Cyber warfare introduction
 
Domain 7 of CEH Mobile Platform, IoT, and OT Hacking.pptx
Domain 7 of CEH Mobile Platform, IoT, and OT Hacking.pptxDomain 7 of CEH Mobile Platform, IoT, and OT Hacking.pptx
Domain 7 of CEH Mobile Platform, IoT, and OT Hacking.pptx
 
DSS ITSEC Conference 2012 - Forescout NAC #1
DSS ITSEC Conference 2012 - Forescout NAC #1DSS ITSEC Conference 2012 - Forescout NAC #1
DSS ITSEC Conference 2012 - Forescout NAC #1
 
[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by Vi...
[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by  Vi...[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by  Vi...
[cb22] Red light in the factory - From 0 to 100 OT adversary emulation by Vi...
 
Security for automation in Internet of Things by using one time password
Security for automation in Internet of Things by using one time passwordSecurity for automation in Internet of Things by using one time password
Security for automation in Internet of Things by using one time password
 
Metasploit
MetasploitMetasploit
Metasploit
 
Ryan Wilson - ryanwilson.com - IoT Security
Ryan Wilson - ryanwilson.com -  IoT SecurityRyan Wilson - ryanwilson.com -  IoT Security
Ryan Wilson - ryanwilson.com - IoT Security
 

Mehr von Positive Hack Days

Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
Positive Hack Days
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
Positive Hack Days
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Positive Hack Days
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
Positive Hack Days
 

Mehr von Positive Hack Days (20)

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

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

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 | engage@opposingforce.it © Opposing Force. All right reserved.
  • 43. Q&A Time!Opposing Force - challenging your security - @_opposingforce © Opposing Force. All right reserved. https://www.opposingforce.it | engage@opposingforce.it