SlideShare uma empresa Scribd logo
1 de 49
Baixar para ler offline
BadBarcode: How to hack a
starship with a piece of paper
Hyperchem Ma
Tencent’s Xuanwu Lab
http://xlab.tencent.com @XuanwuLab
Who am I ?
Security Researcher @
– Embedded Device Security
– Firmware Reverse-Engineering
– Big Fan of IoT
Wait, hack a starship?
4
About Barcode
Though often be ignored, barcode is
the most ancient technology of IoT.
What is barcode?
•  Barcode is an optical machine-readable
representation of data relating to the object
to which it is attached;
•  Originally barcodes(1D) systematically
represented data by varying the widths and
spacings of parallel lines.
Barcode Symbology
•  Every barcode includes:
– Quiet Zone: Blank margin, No Information, Tell where
barcode starts and stops;
– Start character(s): Special pattern for barcode starts;
– Data: Includes Numeric, Alpha-Numeric, Full ASCII
chars depending on different barcode protocols;
– Stop character(s): Special pattern for barcode ends.
•  Some barcode have checksum bits/character(s)
Barcode Scanners
Scanner Inside
How Barcode Scanner Work
Capturing Decoding Transferring
RS232
PS/2
USB HID
…
Code 39
Code 128
QR Code
…
LED
Laser
CCD
CMOS
…
Protocols
Code 128
•  Full ASCII Encode Ability, Effictive and
High-Density
•  4 Function Codes Availiable For Manufacture
•  Three Character Sets: CodeA,CodeB,CodeC
– Unprintable ASCII can be encoded by CodeA
– CodeC encodes only two-digit numbers
– CharSets are chosen automatically
– Encoder can hybridize three code sets
In addition to supporting standard protocols,
many manufacturers also typically implement
some of their unique features in scanners.
Scanner Manufactures
•  Symbol (Zebra)
•  HoneyWell
•  TaoTronics
•  ESky
•  ACCESS IS
•  UNITECH
•  AIBO
•  Newland
•  Copycat products
Barcode Scanner Is Everywhere
Previous Work on Barcodes Security
“Toying with Barcodes”, Phenoelit, 24C3
•  Barcode driven buffer overflow
•  Barcode driven format string
•  Barcode driven SQL injection
•  Barcode driven XSS
Other Scenarios
•  Predict and recreate barcodes
•  Duplicate barcodes
•  Phishing attacks by QR code
However, most of previous research
focused on the application that do not
properly process data from barcodes
Our Research:BadBarcode
What is BadBarcode?
•  Many barcode scanners are keyboard emulation device
•  Some barcode protocols, like Code 128, supports
ASCII control characters
•  Almost every barcode scanner support Code 128
•  Almost every barcode scanner has its own additional
keyboard emulation features
So, is it possible to open a shell and “type”
commands by barcodes like a keyboard?
ASCII Table
Hex ASCII Scan code Hex ASCII Scan code Hex ASCII Scan code
00 NUL CTRL+2 0B VT CTRL+K 16 SYN CTRL+V
01 SOH CTRL+A 0C FF CTRL+L 17 TB CTRL+W
02 STX CTRL+B 0D CR CTRL+M 18 CAN CTRL+X
03 ETX CTRL+C 0E SO CTRL+N 19 EM CTRL+Y
04 EOT CTRL+D 0F SI CTRL+O 1A SUB CTRL+Z
05 ENQ CTRL+E 10 DLE CTRL+P 1B ESC CTRL+[
06 ACK CTRL+F 11 DC1 CTRL+Q 1C FS CTRL+
07 BEL CTRL+G 12 DC2 CTRL+R 1D GS CTRL+]
08 BS CTRL+H 13 DC3 CTRL+S 1E RS CTRL+6
09 HT CTRL+I 14 DC4 CTRL+T 1F US CTRL+-
0A LF CTRL+J 15 NAK CTRL+U 7F DEL *
ASCII Control Characters
•  Combination key, like "Ctrl+ ", is mapped to a
single ASCII code
•  Encode these chars with Code 128 ,scan it with
scanner, and finally a combination key was
sent to computer
•  No Win keys, Alt keys, or other function keys
support
•  Though only “Ctrl+*” keys can be sent, it still poses
threat to kiosks! WHY?
Dialog Attack
•  Common Hotkeys are registered by many
programs, like: CTRL+O, CTRL+P
•  Hotkeys can launch common dialogs, like
OpenFile, SaveFile, PrintDialog and etc
•  These dialogs offer us opportunity to
browse file system, launch browsers and
execute program
•  And the most essential thing is "Besides
barcode scanner, touch screen is often available
as input device in kiosks."
Demo 1: Dialog Attack
What about Win+R?
If there is no touch screen, is it
possible to make a blind attack?
ADF(Advanced Data Formatting)
•  Symbol Technologies Invent this
•  Scanned data can be edited to suit particular
requirements before transmitted to host device
•  Specified Key can be sent to computer
•  Set up ONLY by scanning barcodes!
ADF
Actions Examples
Send data Send all or part of data
Setup fields Move cursor
Modify data Remove spaces and others
Data padding Pad data with space or zero
Beep Beep 1,2,3 times
Send Keystrokes Send ctrl+, alt+,shft+ etc keys.
Send GUI Keys Send GUI+ keys.
Send Right Control Send right contrl stroke.
Demo 2: ADF Attack
Unfortunately, not all scanners support
read barcodes from LCD/LED screen.
Can this attack be cooler ?
Can we do it automatically?
What about making an android APP?
Though scanners which read barcodes from
LCD/LED screen exist, many of them read
barcodes from materials which can absorb
and reflect light of certain wavelength.
However, LCD/LED screen display images
by modulating backlight rather absorbing
and reflecting lights, which means total black
for barcode scanners.
Display Technology
•  CRT
•  LCD
•  OLED
•  Electronic Paper
The answer is Kindle
•  Kindle use E-ink technology
•  It display words and images based on absorb
and reflect light, just like a paper
•  High Resolution, Up to 300 PPI
•  Programmable, of course after Jailbreak.
Kindle is perfect BadBarcode tool !
Demo 3: Fully-automated ADF Attack
Can we execute a command
by only one single barcode?
Yes, for some products, it is possible
But, the product in the next demo is widely
used in many really serious places, like
airports, so we would not disclose details
this time
Let’s just see the demo
Demo 4: A Piece of Paper Attack
Summary
BadBarcode is not a vulnerability of a certain product. It’s
even difficult to say that BadBarcode is the problem of
scanners or host systems.
So when we discovered BadBarcode, we even do not
know which manufacturer should be reported.
Although our demos is based on Windows, but in fact it
can attack any system as long as there is appropriate
hotkey.
Summary
•  BadBarcode is really a serious problem
•  Host system using keyboard emulation barcode scanner is
potentially vulnerable
•  Kiosks with touch screen and barcode scanner are easy to be
compromised
•  Barcode scanner that support ADF or some special keyboard
emulation features can be utilized to achieve automatic and
advanced attack
•  Other device via keyboard emulation connection might
suffer from the same problem
•  Keyboard Wedge RFID/NFC Reader ?
Security Suggestions
•  For barcode scanner manufactures
– Do NOT enable ADF or other additional features by
default
– Do NOT transmit ASCII control characters to host
device by default
•  For host system manufactures
– Do NOT use keyboard emulation barcode scanner as
far as possible
– Do NOT implement hotkeys in application, and
disable system hotkeys
Acknowledgement
•  My leader : tombkeeper
•  All team members in Xuanwu Lab
Q&A

Mais conteúdo relacionado

Mais procurados

Poljoprivreda Srbije
Poljoprivreda SrbijePoljoprivreda Srbije
Poljoprivreda Srbije
Dragan Bjelic
 
Application development for the internet of things
Application development for the internet of thingsApplication development for the internet of things
Application development for the internet of things
Pankesh Patel
 
индустрија србије
индустрија србије индустрија србије
индустрија србије
Tatjana Cakic
 

Mais procurados (20)

Industry 4.0 and Internet of Things (IoT)- The Emerging Marketing Trends
Industry 4.0 and Internet of Things (IoT)- The Emerging Marketing TrendsIndustry 4.0 and Internet of Things (IoT)- The Emerging Marketing Trends
Industry 4.0 and Internet of Things (IoT)- The Emerging Marketing Trends
 
Unutrasnja struktura, funkcije i veze grada sa okolnim prostorom
Unutrasnja struktura, funkcije i veze grada sa okolnim prostoromUnutrasnja struktura, funkcije i veze grada sa okolnim prostorom
Unutrasnja struktura, funkcije i veze grada sa okolnim prostorom
 
Насеља
НасељаНасеља
Насеља
 
Indonezija Tanja Gagić
Indonezija Tanja GagićIndonezija Tanja Gagić
Indonezija Tanja Gagić
 
Blueprint for the Industrial Internet: The Architecture
Blueprint for the Industrial Internet: The ArchitectureBlueprint for the Industrial Internet: The Architecture
Blueprint for the Industrial Internet: The Architecture
 
Naselja Tanja Gagić
Naselja Tanja GagićNaselja Tanja Gagić
Naselja Tanja Gagić
 
Mern stack developement
Mern stack developementMern stack developement
Mern stack developement
 
Razvoj i znacaj poljoprivrede Srbije
Razvoj i znacaj poljoprivrede SrbijeRazvoj i znacaj poljoprivrede Srbije
Razvoj i znacaj poljoprivrede Srbije
 
Struktura stanovnistva Tanja Gagić
Struktura stanovnistva Tanja GagićStruktura stanovnistva Tanja Gagić
Struktura stanovnistva Tanja Gagić
 
Poljoprivreda Srbije
Poljoprivreda SrbijePoljoprivreda Srbije
Poljoprivreda Srbije
 
Istočna Azija Tanja Gagić
Istočna Azija Tanja GagićIstočna Azija Tanja Gagić
Istočna Azija Tanja Gagić
 
Пољопривреда основне одлике
Пољопривреда  основне одликеПољопривреда  основне одлике
Пољопривреда основне одлике
 
Енергетика
ЕнергетикаЕнергетика
Енергетика
 
Privreda osnovne karakteristike i podela
Privreda osnovne karakteristike i podelaPrivreda osnovne karakteristike i podela
Privreda osnovne karakteristike i podela
 
Application development for the internet of things
Application development for the internet of thingsApplication development for the internet of things
Application development for the internet of things
 
Internet of Things
Internet of ThingsInternet of Things
Internet of Things
 
индустрија србије
индустрија србије индустрија србије
индустрија србије
 
Republika Slovenija Tanja Notaroš Gagić
Republika Slovenija Tanja Notaroš GagićRepublika Slovenija Tanja Notaroš Gagić
Republika Slovenija Tanja Notaroš Gagić
 
Rudarstvo i energetika u svetu i Srbiji
Rudarstvo i energetika u svetu i SrbijiRudarstvo i energetika u svetu i Srbiji
Rudarstvo i energetika u svetu i Srbiji
 
Introdução a linguagem de programação Lua
Introdução a linguagem de programação LuaIntrodução a linguagem de programação Lua
Introdução a linguagem de programação Lua
 

Destaque

Guang gong escalate privilege by vulnerabilities in android system services ...
Guang gong  escalate privilege by vulnerabilities in android system services ...Guang gong  escalate privilege by vulnerabilities in android system services ...
Guang gong escalate privilege by vulnerabilities in android system services ...
PacSecJP
 
Marc schoenefeld grandma‘s old handbag_draft2_ja
Marc schoenefeld grandma‘s old handbag_draft2_jaMarc schoenefeld grandma‘s old handbag_draft2_ja
Marc schoenefeld grandma‘s old handbag_draft2_ja
PacSecJP
 
Andersson hacking ds_mx_with_sdr_pac_sec_2016_japanese
Andersson hacking ds_mx_with_sdr_pac_sec_2016_japaneseAndersson hacking ds_mx_with_sdr_pac_sec_2016_japanese
Andersson hacking ds_mx_with_sdr_pac_sec_2016_japanese
PacSecJP
 
Martin Zeiser, Universal Pwn n Play - pacsec -final
Martin Zeiser, Universal Pwn n Play - pacsec -finalMartin Zeiser, Universal Pwn n Play - pacsec -final
Martin Zeiser, Universal Pwn n Play - pacsec -final
PacSecJP
 
Gang gong, escalate privilege by vulnerabilities in android system services
Gang gong, escalate privilege by vulnerabilities in android system servicesGang gong, escalate privilege by vulnerabilities in android system services
Gang gong, escalate privilege by vulnerabilities in android system services
PacSecJP
 
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
 
Qinghao vulnerabilities mining technology of cloud and virtualization platfo...
Qinghao  vulnerabilities mining technology of cloud and virtualization platfo...Qinghao  vulnerabilities mining technology of cloud and virtualization platfo...
Qinghao vulnerabilities mining technology of cloud and virtualization platfo...
PacSecJP
 
Stuart attacking http2 implementations truefinal-jp
Stuart  attacking http2 implementations truefinal-jpStuart  attacking http2 implementations truefinal-jp
Stuart attacking http2 implementations truefinal-jp
PacSecJP
 

Destaque (20)

Adam Laurie, Blue Toot -pacsec-2015
Adam Laurie, Blue Toot -pacsec-2015Adam Laurie, Blue Toot -pacsec-2015
Adam Laurie, Blue Toot -pacsec-2015
 
Guang gong escalate privilege by vulnerabilities in android system services ...
Guang gong  escalate privilege by vulnerabilities in android system services ...Guang gong  escalate privilege by vulnerabilities in android system services ...
Guang gong escalate privilege by vulnerabilities in android system services ...
 
Mickey pac sec2016_final_ja
Mickey pac sec2016_final_jaMickey pac sec2016_final_ja
Mickey pac sec2016_final_ja
 
Marc schoenefeld grandma‘s old handbag_draft2_ja
Marc schoenefeld grandma‘s old handbag_draft2_jaMarc schoenefeld grandma‘s old handbag_draft2_ja
Marc schoenefeld grandma‘s old handbag_draft2_ja
 
James Forshaw, elevator action
James Forshaw, elevator actionJames Forshaw, elevator action
James Forshaw, elevator action
 
Richard Johnson, high performance fuzzing
Richard Johnson, high performance fuzzingRichard Johnson, high performance fuzzing
Richard Johnson, high performance fuzzing
 
Richard high performance fuzzing ja
Richard  high performance fuzzing jaRichard  high performance fuzzing ja
Richard high performance fuzzing ja
 
James Windows10 elevator action final-jp
James Windows10 elevator action final-jpJames Windows10 elevator action final-jp
James Windows10 elevator action final-jp
 
Filippo, Plain simple reality of entropy
Filippo, Plain simple reality of  entropyFilippo, Plain simple reality of  entropy
Filippo, Plain simple reality of entropy
 
Georgi Geshev, warranty void if label removed
Georgi Geshev,   warranty void if label removedGeorgi Geshev,   warranty void if label removed
Georgi Geshev, warranty void if label removed
 
Andersson hacking ds_mx_with_sdr_pac_sec_2016_japanese
Andersson hacking ds_mx_with_sdr_pac_sec_2016_japaneseAndersson hacking ds_mx_with_sdr_pac_sec_2016_japanese
Andersson hacking ds_mx_with_sdr_pac_sec_2016_japanese
 
Martin Zeiser, Universal Pwn n Play - pacsec -final
Martin Zeiser, Universal Pwn n Play - pacsec -finalMartin Zeiser, Universal Pwn n Play - pacsec -final
Martin Zeiser, Universal Pwn n Play - pacsec -final
 
Martin UPnP - pacsec -final-ja
Martin UPnP - pacsec -final-jaMartin UPnP - pacsec -final-ja
Martin UPnP - pacsec -final-ja
 
Gang gong, escalate privilege by vulnerabilities in android system services
Gang gong, escalate privilege by vulnerabilities in android system servicesGang gong, escalate privilege by vulnerabilities in android system services
Gang gong, escalate privilege by vulnerabilities in android system services
 
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
 
Qinghao vulnerabilities mining technology of cloud and virtualization platfo...
Qinghao  vulnerabilities mining technology of cloud and virtualization platfo...Qinghao  vulnerabilities mining technology of cloud and virtualization platfo...
Qinghao vulnerabilities mining technology of cloud and virtualization platfo...
 
Hyperchem bad barcode final_ja
Hyperchem  bad barcode final_jaHyperchem  bad barcode final_ja
Hyperchem bad barcode final_ja
 
Mickey, threats inside your platform final
Mickey,  threats inside your platform finalMickey,  threats inside your platform final
Mickey, threats inside your platform final
 
Adam blue toot pacsec-2015-jp
Adam blue toot pacsec-2015-jpAdam blue toot pacsec-2015-jp
Adam blue toot pacsec-2015-jp
 
Stuart attacking http2 implementations truefinal-jp
Stuart  attacking http2 implementations truefinal-jpStuart  attacking http2 implementations truefinal-jp
Stuart attacking http2 implementations truefinal-jp
 

Semelhante a Hyperchem Ma, badbarcode en_1109_nocomment-final

Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
Rayees CK
 
Breaking Smart Speakers: We are Listening to You.
Breaking Smart Speakers: We are Listening to You.Breaking Smart Speakers: We are Listening to You.
Breaking Smart Speakers: We are Listening to You.
Priyanka Aash
 

Semelhante a Hyperchem Ma, badbarcode en_1109_nocomment-final (20)

Workshop 2016 Genebank IT - Print Barcode
Workshop 2016 Genebank IT - Print BarcodeWorkshop 2016 Genebank IT - Print Barcode
Workshop 2016 Genebank IT - Print Barcode
 
Feasibility of Security in Micro-Controllers
Feasibility of Security in Micro-ControllersFeasibility of Security in Micro-Controllers
Feasibility of Security in Micro-Controllers
 
HITBSecConf 2016-Create Your Own Bad Usb
HITBSecConf 2016-Create Your Own Bad UsbHITBSecConf 2016-Create Your Own Bad Usb
HITBSecConf 2016-Create Your Own Bad Usb
 
Barcode technology
Barcode technologyBarcode technology
Barcode technology
 
Barcode Decoder
Barcode DecoderBarcode Decoder
Barcode Decoder
 
IDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki ChidaIDA Vulnerabilities and Bug Bounty  by Masaaki Chida
IDA Vulnerabilities and Bug Bounty  by Masaaki Chida
 
Integrated development environment
Integrated development environmentIntegrated development environment
Integrated development environment
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
 
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
 
IOT Exploitation
IOT Exploitation	IOT Exploitation
IOT Exploitation
 
Reversing Mobile - Swiss Cyber Storm 2011, Switzerland
Reversing Mobile - Swiss Cyber Storm 2011, SwitzerlandReversing Mobile - Swiss Cyber Storm 2011, Switzerland
Reversing Mobile - Swiss Cyber Storm 2011, Switzerland
 
Tools Of The Hardware Hacking Trade Final
Tools Of The Hardware Hacking Trade FinalTools Of The Hardware Hacking Trade Final
Tools Of The Hardware Hacking Trade Final
 
Is Rust Programming ready for embedded development?
Is Rust Programming ready for embedded development?Is Rust Programming ready for embedded development?
Is Rust Programming ready for embedded development?
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
 
Breaking Smart Speakers: We are Listening to You.
Breaking Smart Speakers: We are Listening to You.Breaking Smart Speakers: We are Listening to You.
Breaking Smart Speakers: We are Listening to You.
 
.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT Fight2015 02 28 DotNetSpain IoT Fight
2015 02 28 DotNetSpain IoT Fight
 
Testing curl for security
Testing curl for securityTesting curl for security
Testing curl for security
 

Mais de PacSecJP

Kavya racharla ndh-naropanth_fin_jp-final
Kavya racharla ndh-naropanth_fin_jp-finalKavya racharla ndh-naropanth_fin_jp-final
Kavya racharla ndh-naropanth_fin_jp-final
PacSecJP
 
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
PacSecJP
 
Ryder robertson pac-sec skeleton 2017_jp
Ryder robertson pac-sec skeleton 2017_jpRyder robertson pac-sec skeleton 2017_jp
Ryder robertson pac-sec skeleton 2017_jp
PacSecJP
 
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-jYuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
PacSecJP
 
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_finalYuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
PacSecJP
 
Rouault imbert view_alpc_rpc_pacsec_jp
Rouault imbert view_alpc_rpc_pacsec_jpRouault imbert view_alpc_rpc_pacsec_jp
Rouault imbert view_alpc_rpc_pacsec_jp
PacSecJP
 
Rouault imbert alpc_rpc_pacsec
Rouault imbert alpc_rpc_pacsecRouault imbert alpc_rpc_pacsec
Rouault imbert alpc_rpc_pacsec
PacSecJP
 
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
PacSecJP
 
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
PacSecJP
 
Yunusov babin 7sins-pres_atm_v4(2)_jp
Yunusov babin 7sins-pres_atm_v4(2)_jpYunusov babin 7sins-pres_atm_v4(2)_jp
Yunusov babin 7sins-pres_atm_v4(2)_jp
PacSecJP
 
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
 
Shusei tomonaga pac_sec_20171026_jp
Shusei tomonaga pac_sec_20171026_jpShusei tomonaga pac_sec_20171026_jp
Shusei tomonaga pac_sec_20171026_jp
PacSecJP
 
Shusei tomonaga pac_sec_20171026
Shusei tomonaga pac_sec_20171026Shusei tomonaga pac_sec_20171026
Shusei tomonaga pac_sec_20171026
PacSecJP
 
Kavya racharla ndh-naropanth_fin
Kavya racharla ndh-naropanth_finKavya racharla ndh-naropanth_fin
Kavya racharla ndh-naropanth_fin
PacSecJP
 
Lucas apa pacsec_slides_jp-final
Lucas apa pacsec_slides_jp-finalLucas apa pacsec_slides_jp-final
Lucas apa pacsec_slides_jp-final
PacSecJP
 

Mais de PacSecJP (20)

Kavya racharla ndh-naropanth_fin_jp-final
Kavya racharla ndh-naropanth_fin_jp-finalKavya racharla ndh-naropanth_fin_jp-final
Kavya racharla ndh-naropanth_fin_jp-final
 
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
Ryder robertson security-considerations_in_the_supply_chain_2017.11.02
 
Ryder robertson pac-sec skeleton 2017_jp
Ryder robertson pac-sec skeleton 2017_jpRyder robertson pac-sec skeleton 2017_jp
Ryder robertson pac-sec skeleton 2017_jp
 
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-jYuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final-j
 
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_finalYuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
Yuki chen from_out_of_memory_to_remote_code_execution_pac_sec2017_final
 
Rouault imbert view_alpc_rpc_pacsec_jp
Rouault imbert view_alpc_rpc_pacsec_jpRouault imbert view_alpc_rpc_pacsec_jp
Rouault imbert view_alpc_rpc_pacsec_jp
 
Rouault imbert alpc_rpc_pacsec
Rouault imbert alpc_rpc_pacsecRouault imbert alpc_rpc_pacsec
Rouault imbert alpc_rpc_pacsec
 
Di shen pacsec_jp-final
Di shen pacsec_jp-finalDi shen pacsec_jp-final
Di shen pacsec_jp-final
 
Di shen pacsec_final
Di shen pacsec_finalDi shen pacsec_final
Di shen pacsec_final
 
Anıl kurmuş pacsec3-ja
Anıl kurmuş pacsec3-jaAnıl kurmuş pacsec3-ja
Anıl kurmuş pacsec3-ja
 
Anıl kurmuş pacsec3
Anıl kurmuş pacsec3Anıl kurmuş pacsec3
Anıl kurmuş pacsec3
 
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
 
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
Ahn pacsec2017 key-recovery_attacks_against_commercial_white-box_cryptography...
 
Yunusov babin 7sins-pres_atm_v4(2)_jp
Yunusov babin 7sins-pres_atm_v4(2)_jpYunusov babin 7sins-pres_atm_v4(2)_jp
Yunusov babin 7sins-pres_atm_v4(2)_jp
 
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
 
Shusei tomonaga pac_sec_20171026_jp
Shusei tomonaga pac_sec_20171026_jpShusei tomonaga pac_sec_20171026_jp
Shusei tomonaga pac_sec_20171026_jp
 
Shusei tomonaga pac_sec_20171026
Shusei tomonaga pac_sec_20171026Shusei tomonaga pac_sec_20171026
Shusei tomonaga pac_sec_20171026
 
Kavya racharla ndh-naropanth_fin
Kavya racharla ndh-naropanth_finKavya racharla ndh-naropanth_fin
Kavya racharla ndh-naropanth_fin
 
Lucas apa pacsec_slides_jp-final
Lucas apa pacsec_slides_jp-finalLucas apa pacsec_slides_jp-final
Lucas apa pacsec_slides_jp-final
 
Lucas apa pacsec slides
Lucas apa pacsec slidesLucas apa pacsec slides
Lucas apa pacsec slides
 

Último

Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
nirzagarg
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Chandigarh Call girls 9053900678 Call girls in Chandigarh
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
 

Último (20)

Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 

Hyperchem Ma, badbarcode en_1109_nocomment-final

  • 1. BadBarcode: How to hack a starship with a piece of paper Hyperchem Ma Tencent’s Xuanwu Lab http://xlab.tencent.com @XuanwuLab
  • 2. Who am I ? Security Researcher @ – Embedded Device Security – Firmware Reverse-Engineering – Big Fan of IoT
  • 3. Wait, hack a starship?
  • 4. 4
  • 5.
  • 6.
  • 8. Though often be ignored, barcode is the most ancient technology of IoT.
  • 9. What is barcode? •  Barcode is an optical machine-readable representation of data relating to the object to which it is attached; •  Originally barcodes(1D) systematically represented data by varying the widths and spacings of parallel lines.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14. Barcode Symbology •  Every barcode includes: – Quiet Zone: Blank margin, No Information, Tell where barcode starts and stops; – Start character(s): Special pattern for barcode starts; – Data: Includes Numeric, Alpha-Numeric, Full ASCII chars depending on different barcode protocols; – Stop character(s): Special pattern for barcode ends. •  Some barcode have checksum bits/character(s)
  • 17. How Barcode Scanner Work Capturing Decoding Transferring RS232 PS/2 USB HID … Code 39 Code 128 QR Code … LED Laser CCD CMOS …
  • 19. Code 128 •  Full ASCII Encode Ability, Effictive and High-Density •  4 Function Codes Availiable For Manufacture •  Three Character Sets: CodeA,CodeB,CodeC – Unprintable ASCII can be encoded by CodeA – CodeC encodes only two-digit numbers – CharSets are chosen automatically – Encoder can hybridize three code sets
  • 20. In addition to supporting standard protocols, many manufacturers also typically implement some of their unique features in scanners.
  • 21. Scanner Manufactures •  Symbol (Zebra) •  HoneyWell •  TaoTronics •  ESky •  ACCESS IS •  UNITECH •  AIBO •  Newland •  Copycat products
  • 22. Barcode Scanner Is Everywhere
  • 23.
  • 24. Previous Work on Barcodes Security
  • 25. “Toying with Barcodes”, Phenoelit, 24C3 •  Barcode driven buffer overflow •  Barcode driven format string •  Barcode driven SQL injection •  Barcode driven XSS
  • 26. Other Scenarios •  Predict and recreate barcodes •  Duplicate barcodes •  Phishing attacks by QR code However, most of previous research focused on the application that do not properly process data from barcodes
  • 28. What is BadBarcode? •  Many barcode scanners are keyboard emulation device •  Some barcode protocols, like Code 128, supports ASCII control characters •  Almost every barcode scanner support Code 128 •  Almost every barcode scanner has its own additional keyboard emulation features So, is it possible to open a shell and “type” commands by barcodes like a keyboard?
  • 29. ASCII Table Hex ASCII Scan code Hex ASCII Scan code Hex ASCII Scan code 00 NUL CTRL+2 0B VT CTRL+K 16 SYN CTRL+V 01 SOH CTRL+A 0C FF CTRL+L 17 TB CTRL+W 02 STX CTRL+B 0D CR CTRL+M 18 CAN CTRL+X 03 ETX CTRL+C 0E SO CTRL+N 19 EM CTRL+Y 04 EOT CTRL+D 0F SI CTRL+O 1A SUB CTRL+Z 05 ENQ CTRL+E 10 DLE CTRL+P 1B ESC CTRL+[ 06 ACK CTRL+F 11 DC1 CTRL+Q 1C FS CTRL+ 07 BEL CTRL+G 12 DC2 CTRL+R 1D GS CTRL+] 08 BS CTRL+H 13 DC3 CTRL+S 1E RS CTRL+6 09 HT CTRL+I 14 DC4 CTRL+T 1F US CTRL+- 0A LF CTRL+J 15 NAK CTRL+U 7F DEL *
  • 30. ASCII Control Characters •  Combination key, like "Ctrl+ ", is mapped to a single ASCII code •  Encode these chars with Code 128 ,scan it with scanner, and finally a combination key was sent to computer •  No Win keys, Alt keys, or other function keys support •  Though only “Ctrl+*” keys can be sent, it still poses threat to kiosks! WHY?
  • 31. Dialog Attack •  Common Hotkeys are registered by many programs, like: CTRL+O, CTRL+P •  Hotkeys can launch common dialogs, like OpenFile, SaveFile, PrintDialog and etc •  These dialogs offer us opportunity to browse file system, launch browsers and execute program •  And the most essential thing is "Besides barcode scanner, touch screen is often available as input device in kiosks."
  • 32. Demo 1: Dialog Attack
  • 33. What about Win+R? If there is no touch screen, is it possible to make a blind attack?
  • 34. ADF(Advanced Data Formatting) •  Symbol Technologies Invent this •  Scanned data can be edited to suit particular requirements before transmitted to host device •  Specified Key can be sent to computer •  Set up ONLY by scanning barcodes!
  • 35. ADF Actions Examples Send data Send all or part of data Setup fields Move cursor Modify data Remove spaces and others Data padding Pad data with space or zero Beep Beep 1,2,3 times Send Keystrokes Send ctrl+, alt+,shft+ etc keys. Send GUI Keys Send GUI+ keys. Send Right Control Send right contrl stroke.
  • 36. Demo 2: ADF Attack
  • 37. Unfortunately, not all scanners support read barcodes from LCD/LED screen. Can this attack be cooler ? Can we do it automatically? What about making an android APP?
  • 38. Though scanners which read barcodes from LCD/LED screen exist, many of them read barcodes from materials which can absorb and reflect light of certain wavelength. However, LCD/LED screen display images by modulating backlight rather absorbing and reflecting lights, which means total black for barcode scanners.
  • 39. Display Technology •  CRT •  LCD •  OLED •  Electronic Paper
  • 40. The answer is Kindle •  Kindle use E-ink technology •  It display words and images based on absorb and reflect light, just like a paper •  High Resolution, Up to 300 PPI •  Programmable, of course after Jailbreak. Kindle is perfect BadBarcode tool !
  • 42. Can we execute a command by only one single barcode? Yes, for some products, it is possible
  • 43. But, the product in the next demo is widely used in many really serious places, like airports, so we would not disclose details this time Let’s just see the demo
  • 44. Demo 4: A Piece of Paper Attack
  • 45. Summary BadBarcode is not a vulnerability of a certain product. It’s even difficult to say that BadBarcode is the problem of scanners or host systems. So when we discovered BadBarcode, we even do not know which manufacturer should be reported. Although our demos is based on Windows, but in fact it can attack any system as long as there is appropriate hotkey.
  • 46. Summary •  BadBarcode is really a serious problem •  Host system using keyboard emulation barcode scanner is potentially vulnerable •  Kiosks with touch screen and barcode scanner are easy to be compromised •  Barcode scanner that support ADF or some special keyboard emulation features can be utilized to achieve automatic and advanced attack •  Other device via keyboard emulation connection might suffer from the same problem •  Keyboard Wedge RFID/NFC Reader ?
  • 47. Security Suggestions •  For barcode scanner manufactures – Do NOT enable ADF or other additional features by default – Do NOT transmit ASCII control characters to host device by default •  For host system manufactures – Do NOT use keyboard emulation barcode scanner as far as possible – Do NOT implement hotkeys in application, and disable system hotkeys
  • 48. Acknowledgement •  My leader : tombkeeper •  All team members in Xuanwu Lab
  • 49. Q&A