SlideShare a Scribd company logo
When Strong
Encryption, Isn’t
Philology, XOR, and Unintended Messages
Kurt Kincaid
kurt@kurtkincaid.com
@kurt_kincaid
THOTCON 0xA - 2019
The Situation
▪ NFC encryption from large vendor, broken to the
point that data can be decrypted without the
key
2
Today’s Roadmap
▪ Setting the Stage
▪ How did I find the problem?
▪ How did I prove it?
▪ Implications and further considerations
3
Level Setting
4
Stipulation #1
▪ I cannot reveal the name of the company
▪ I would love to
▪ So why don't you?
5
Stipulation #2
6
Crypto ≠ Cryptocurrency
Setting the Stage
▪ Philology background
▫ Language is fascinating
▫ How language works, how it evolves, how it conveys
messages and information
▫ Not only what is said, but how it is said
▪ Author of a broken encryption module
▫ Pay attention to the details
▫ I have an appreciation for sticking your foot in it
7
Unintended Messages
▪ Spy The Lie
▫ Philip Houston, Michael Floyd, Susan Carnicero
▫ Signs of deceptive behavior
▫ Refusal to answer, referral statements, attacking the
questioner, inappropriate level of concern, overly specific,
etc.
▪ Quick Examples
▫ “Perfectly plausible explanation”
▫ “Some of these changes…”
▪ Techniques useful in many situations8
The Whitepaper
▪ NFC encryption
▪ 21 pages
▪ Excellent design decisions, high security margin
▫ SHA512, AES256 in CTR mode, NIST SP 800-56A Single-
Step Key Derivation, etc.
▪ …and at the bottom of page 20…
▫ Unnecessarily long explanation on use of static Initialization
Vector (IV)
▫ Permitted per the NIST pub, but why the long explanation?
9
Line of Questioning
▪ Used IV issue as method for starting
conversation
▪ String of dismissive, condescending responses
▪ Kept redirecting conversation to NIST
compliance
▪ Finally, the culprit:
▫ "…we encrypt a non-incrementing counter…"
▪ TO BE CONTINUED
10
The Encryption (1)
▪ Plaintext is a JSON*
string
▪ AES
▫ Winner of NIST Advanced Encryption Standard competition in 2001
▫ Block cipher, uses 128 bit blocks
▫ Key sizes of 128, 192, or 256 bits
▪ Mode of Operation: algorithm for using block ciphers on data
larger than a single block
▪ Counter (CTR) Mode
▫ Passphrase encrypts the counter
▫ Encrypted counter is XOR'd with next byte of plaintext
▫ Counter is incremented* and process repeats
11
The Encryption (2) – XOR
▪ Formally "Exclusive Disjunction"
▪ Boolean "either A or B, but not both"
▫ 1 ⊕ 1 = 0
▫ 0 ⊕ 0 = 0
▫ 1 ⊕ 0 = 1
▫ 0 ⊕ 1 = 1
12
The Encryption (3) – XOR cont'd
• Example:
A = 0110
B = 1011
A ⊕ B = 1101
▪ Interesting Properties…
▫ Really fast
▫ A B = C; A C = B; B C = A⊕ ⊕ ⊕
▪ J = encrypted, non-incrementing counter
▪ P1 ⊕ J = C1 ; P2 ⊕ J = C2, etc.
13
The Encryption (4) – XOR cont'd
▪ Difference equation
▫ P1 ⊕ Pn = X
▫ C1 ⊕ Cn = X
▫ P1 ⊕ Pn = C1 ⊕ Cn
14
Breaking the Encryption
▪ Knowns:
▫ Complete ciphertext (C1…Cn)
▫ Plaintext is a JSON string
▫ {"userName":"kurt"}
▫ Counter is never incremented
▪ A little guesswork
▫ Our initial guess is first character is "{"
▫ {⊕ C1 = J
▫ Once we have J, we can decrypt the entire string
▫ C1 ⊕ J = P1 ; C2 ⊕ J = P2 ; Cn ⊕ J = Pn
15
End Result
▪ Might be able to get by with this on
unstructured data
▪ "Well, you clearly don't understand how this
works."
▪ Provided proof
▪ And in response…
Silence
16
Implications and Considerations
▪ Where else is this method being used?
▪ Was this ever fixed?
▪ What other broken implementations like this
have we blindly accepted?
▫ XOR everything with the number 74
▫ It's proprietary encryption. Ok, well, it's base 64 encoded.
But you can't read it!
17
Further Considerations
▪ Was this done intentionally?
▫ Refusal to answer
▫ Referral statements
▫ Attacking the questioner
▫ Inappropriate level of concern
▫ Overly specific
▪ If I was creating a backdoor…
18
Takeaways
▪ The initial red flag came from textual analysis,
not technical analysis
▪ Need to expand beyond raw technical skill
▪ People say what they think they can get away
with
▪ Need to look at what people write and say from
a different perspective
19
Contact info:
●
Kurt Kincaid
●
kurt@kurtkincaid.com
●
Twitter: @kurt_kincaid
20 Presentation template by SlidesCarnival

More Related Content

Similar to Thotcon 2019 - When Strong Encryption Isn't

Securing your Bitcoin wallet
Securing your Bitcoin walletSecuring your Bitcoin wallet
Securing your Bitcoin wallet
Ron Reiter
 
Cryptography - Overview
Cryptography - OverviewCryptography - Overview
Cryptography - Overview
Mohammed Adam
 
Blockchain Fundamentals
Blockchain FundamentalsBlockchain Fundamentals
Blockchain Fundamentals
Bruno Lowagie
 
Cybersecurity cyberlab3
Cybersecurity cyberlab3Cybersecurity cyberlab3
Cybersecurity cyberlab3
rayborg
 
3 Basics of Cryptography Basics of Cryptography
3 Basics of Cryptography  Basics of Cryptography3 Basics of Cryptography  Basics of Cryptography
3 Basics of Cryptography Basics of Cryptography
MohammedMorhafJaely
 
CISSP Week 18
CISSP Week 18CISSP Week 18
CISSP Week 18
jemtallon
 
Defcon Crypto Village - OPSEC Concerns in Using Crypto
Defcon Crypto Village - OPSEC Concerns in Using CryptoDefcon Crypto Village - OPSEC Concerns in Using Crypto
Defcon Crypto Village - OPSEC Concerns in Using Crypto
John Bambenek
 
Encryption basics
Encryption basicsEncryption basics
Encryption basics
Kevin OBrien
 
Intro to blockchain
Intro to blockchainIntro to blockchain
Intro to blockchain
Đoàn Thái Thiên Lộc
 
DEF CON 23 - Ryan Castellucci - cracking cryptocurrency brainwalletsll
DEF CON 23 - Ryan Castellucci - cracking cryptocurrency brainwalletsllDEF CON 23 - Ryan Castellucci - cracking cryptocurrency brainwalletsll
DEF CON 23 - Ryan Castellucci - cracking cryptocurrency brainwalletsll
Felipe Prado
 
Cryptography basics
Cryptography basicsCryptography basics
Cryptography basics
Shellmates
 
Random thoughts on IoT
Random thoughts on IoTRandom thoughts on IoT
Random thoughts on IoT
Mark Carney
 
Cryptography For The Average Developer - Sunshine PHP
Cryptography For The Average Developer - Sunshine PHPCryptography For The Average Developer - Sunshine PHP
Cryptography For The Average Developer - Sunshine PHP
Anthony Ferrara
 
Applied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphersApplied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphers
Vlad Garbuz
 
ET4045-2-cryptography-2
ET4045-2-cryptography-2ET4045-2-cryptography-2
ET4045-2-cryptography-2
Tutun Juhana
 

Similar to Thotcon 2019 - When Strong Encryption Isn't (15)

Securing your Bitcoin wallet
Securing your Bitcoin walletSecuring your Bitcoin wallet
Securing your Bitcoin wallet
 
Cryptography - Overview
Cryptography - OverviewCryptography - Overview
Cryptography - Overview
 
Blockchain Fundamentals
Blockchain FundamentalsBlockchain Fundamentals
Blockchain Fundamentals
 
Cybersecurity cyberlab3
Cybersecurity cyberlab3Cybersecurity cyberlab3
Cybersecurity cyberlab3
 
3 Basics of Cryptography Basics of Cryptography
3 Basics of Cryptography  Basics of Cryptography3 Basics of Cryptography  Basics of Cryptography
3 Basics of Cryptography Basics of Cryptography
 
CISSP Week 18
CISSP Week 18CISSP Week 18
CISSP Week 18
 
Defcon Crypto Village - OPSEC Concerns in Using Crypto
Defcon Crypto Village - OPSEC Concerns in Using CryptoDefcon Crypto Village - OPSEC Concerns in Using Crypto
Defcon Crypto Village - OPSEC Concerns in Using Crypto
 
Encryption basics
Encryption basicsEncryption basics
Encryption basics
 
Intro to blockchain
Intro to blockchainIntro to blockchain
Intro to blockchain
 
DEF CON 23 - Ryan Castellucci - cracking cryptocurrency brainwalletsll
DEF CON 23 - Ryan Castellucci - cracking cryptocurrency brainwalletsllDEF CON 23 - Ryan Castellucci - cracking cryptocurrency brainwalletsll
DEF CON 23 - Ryan Castellucci - cracking cryptocurrency brainwalletsll
 
Cryptography basics
Cryptography basicsCryptography basics
Cryptography basics
 
Random thoughts on IoT
Random thoughts on IoTRandom thoughts on IoT
Random thoughts on IoT
 
Cryptography For The Average Developer - Sunshine PHP
Cryptography For The Average Developer - Sunshine PHPCryptography For The Average Developer - Sunshine PHP
Cryptography For The Average Developer - Sunshine PHP
 
Applied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphersApplied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphers
 
ET4045-2-cryptography-2
ET4045-2-cryptography-2ET4045-2-cryptography-2
ET4045-2-cryptography-2
 

Recently uploaded

Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 

Recently uploaded (20)

Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 

Thotcon 2019 - When Strong Encryption Isn't

  • 1. When Strong Encryption, Isn’t Philology, XOR, and Unintended Messages Kurt Kincaid kurt@kurtkincaid.com @kurt_kincaid THOTCON 0xA - 2019
  • 2. The Situation ▪ NFC encryption from large vendor, broken to the point that data can be decrypted without the key 2
  • 3. Today’s Roadmap ▪ Setting the Stage ▪ How did I find the problem? ▪ How did I prove it? ▪ Implications and further considerations 3
  • 5. Stipulation #1 ▪ I cannot reveal the name of the company ▪ I would love to ▪ So why don't you? 5
  • 7. Setting the Stage ▪ Philology background ▫ Language is fascinating ▫ How language works, how it evolves, how it conveys messages and information ▫ Not only what is said, but how it is said ▪ Author of a broken encryption module ▫ Pay attention to the details ▫ I have an appreciation for sticking your foot in it 7
  • 8. Unintended Messages ▪ Spy The Lie ▫ Philip Houston, Michael Floyd, Susan Carnicero ▫ Signs of deceptive behavior ▫ Refusal to answer, referral statements, attacking the questioner, inappropriate level of concern, overly specific, etc. ▪ Quick Examples ▫ “Perfectly plausible explanation” ▫ “Some of these changes…” ▪ Techniques useful in many situations8
  • 9. The Whitepaper ▪ NFC encryption ▪ 21 pages ▪ Excellent design decisions, high security margin ▫ SHA512, AES256 in CTR mode, NIST SP 800-56A Single- Step Key Derivation, etc. ▪ …and at the bottom of page 20… ▫ Unnecessarily long explanation on use of static Initialization Vector (IV) ▫ Permitted per the NIST pub, but why the long explanation? 9
  • 10. Line of Questioning ▪ Used IV issue as method for starting conversation ▪ String of dismissive, condescending responses ▪ Kept redirecting conversation to NIST compliance ▪ Finally, the culprit: ▫ "…we encrypt a non-incrementing counter…" ▪ TO BE CONTINUED 10
  • 11. The Encryption (1) ▪ Plaintext is a JSON* string ▪ AES ▫ Winner of NIST Advanced Encryption Standard competition in 2001 ▫ Block cipher, uses 128 bit blocks ▫ Key sizes of 128, 192, or 256 bits ▪ Mode of Operation: algorithm for using block ciphers on data larger than a single block ▪ Counter (CTR) Mode ▫ Passphrase encrypts the counter ▫ Encrypted counter is XOR'd with next byte of plaintext ▫ Counter is incremented* and process repeats 11
  • 12. The Encryption (2) – XOR ▪ Formally "Exclusive Disjunction" ▪ Boolean "either A or B, but not both" ▫ 1 ⊕ 1 = 0 ▫ 0 ⊕ 0 = 0 ▫ 1 ⊕ 0 = 1 ▫ 0 ⊕ 1 = 1 12
  • 13. The Encryption (3) – XOR cont'd • Example: A = 0110 B = 1011 A ⊕ B = 1101 ▪ Interesting Properties… ▫ Really fast ▫ A B = C; A C = B; B C = A⊕ ⊕ ⊕ ▪ J = encrypted, non-incrementing counter ▪ P1 ⊕ J = C1 ; P2 ⊕ J = C2, etc. 13
  • 14. The Encryption (4) – XOR cont'd ▪ Difference equation ▫ P1 ⊕ Pn = X ▫ C1 ⊕ Cn = X ▫ P1 ⊕ Pn = C1 ⊕ Cn 14
  • 15. Breaking the Encryption ▪ Knowns: ▫ Complete ciphertext (C1…Cn) ▫ Plaintext is a JSON string ▫ {"userName":"kurt"} ▫ Counter is never incremented ▪ A little guesswork ▫ Our initial guess is first character is "{" ▫ {⊕ C1 = J ▫ Once we have J, we can decrypt the entire string ▫ C1 ⊕ J = P1 ; C2 ⊕ J = P2 ; Cn ⊕ J = Pn 15
  • 16. End Result ▪ Might be able to get by with this on unstructured data ▪ "Well, you clearly don't understand how this works." ▪ Provided proof ▪ And in response… Silence 16
  • 17. Implications and Considerations ▪ Where else is this method being used? ▪ Was this ever fixed? ▪ What other broken implementations like this have we blindly accepted? ▫ XOR everything with the number 74 ▫ It's proprietary encryption. Ok, well, it's base 64 encoded. But you can't read it! 17
  • 18. Further Considerations ▪ Was this done intentionally? ▫ Refusal to answer ▫ Referral statements ▫ Attacking the questioner ▫ Inappropriate level of concern ▫ Overly specific ▪ If I was creating a backdoor… 18
  • 19. Takeaways ▪ The initial red flag came from textual analysis, not technical analysis ▪ Need to expand beyond raw technical skill ▪ People say what they think they can get away with ▪ Need to look at what people write and say from a different perspective 19
  • 20. Contact info: ● Kurt Kincaid ● kurt@kurtkincaid.com ● Twitter: @kurt_kincaid 20 Presentation template by SlidesCarnival