SlideShare una empresa de Scribd logo
1 de 46
TEST
LIKE A
HACKER
AUTOMOTIVE CYBERSECURITY
MARCH 2023
FORALLSECURE.COM
ATTACKS & TECHNIQUES
ASYMMETRIES OF DEFENSE
OFFENSIVE SECURITY IN CI / CD
QUESTIONS
HANDS-ON (OPTIONAL)
01
02
03
04
05
What we're
covering
today
Introductions
Thanassis Avgerinos
CO-FOUNDER, VP ENGINEERING
FORALLSECURE
THANASSIS@FORALLSECURE.COM
Mayhem, by ForAllSecure, is a developer-first security testing
solution. Built by professional hackers, it automatically generates
thousands of tests to identify defects in your apps and APIs.
Josh Thorngren
VP DEVELOPER ADVOCACY, MARKETING
FORALLSECURE
JOSH@FORALLSECURE.COM
Introductions ☐Role
☐Company
☐Challenges
☐Goals
Application security is
critical for automotive safety
Nineteen vulnerabilities
that give attackers control
over engine, locks, and
more
2020, MERCEDES BENZ
Zero-click exploit gives
control over infotainment
and acceleration settings
2021, TESLA
Authentication bypass
allows access to location
and driver details
2016, NISSAN
Good work here (thanks ASRG!)
but still another layer of
complexity and friction
ADD IN NEW ISOS ON TOP
03
Infotainment, navigation,
subscription-based vehicle
features - constant need for
innovation
PUSH FOR NEW FEATURES
02
Multiple systems, layers, and
vendors - securing them and
enforcing this across poor
network conditions
DISTRIBUTED SYSTEMS ARE TOUGH
01
Automotive cybersecurity gets harder every day
Questions ☐How do you test today?
☐How do you prioritize fixes?
☐Where in the SDLC does this
happen?
KNOWN UNKNOWN
PATTERN MATCHING
BEHAVIOR
SCA
SAST
DAS
T
IAST
PE
N
FUZZ
SBO
M
Application security
landscape for defenders
HOW TO HACK A TESLA
TBONE Demonstrated First at CanSecWest
DJI Mavic 2 drone hacking a Tesla Model X (or Model 3/S)
How did they do this?
Ralf-Philipp Weinmann
Kunnamon
Benedikt Schmotzle
Comsecuris
NO CREDENTIALS THOUGH
NVM, WPA2-PSK CREDENTIALS
HARDCODED AND AVAILABLE IN THE
FIRMWARE
ACTUALLY, I CAN JUST COPY FROM TWITTER
Step #1: Connect to Tesla’s “service WiFi”
Step 2: Map the Attack Surface and Breach Perimeter
Checked for daemons processing network inputs - found ConnMan
• ConnMan is a lightweight network manager for embedded Linux
• Version 1.37 (latest at the time) with no active vulns
Dead end? Nope! Let's attack it with fuzz testing!
It crashes in seconds….that's a zero day!
How hard is it to find a zero-day in
ConnMan?
Let’s find out!
char *uncompress(int16_t field_count, char *start, char *end,
char *ptr, char *uncompressed, int uncomp_len,
char **uncompressed_ptr) {
char *uptr = *uncompressed_ptr; /* position in result buffer */
debug("count %d ptr %p end %p uptr %p", field_count, ptr, end, uptr);
while (field_count-- > 0 && ptr < end) {
int dlen; /* data field length */
int ulen; /* uncompress length */
int pos; /* position in compressed string */
char name[NS_MAXLABEL]; /* tmp label */
uint16_t dns_type, dns_class;
int comp_pos;
if (!convert_label(start, end, ptr, name, NS_MAXLABEL,
&pos, &comp_pos))
goto out;
ulen = strlen(name);
strncpy(uptr, name, uncomp_len - (uptr - uncompressed));
Step #3:
Map back to
the code
Step #4: Create a Weaponized Exploit
Standard workflow in the technical report
although MCU escalation redacted
Meet Ryan
● One of our hackers-in-residence
● Has won Defcon CTF the top hacking competition
in the world 5+ times with PPP
● Their team develops ~50 weaponized exploits in under
48 hours when in crunch mode
My Interactions with Ryan
Hey Ryan, we got a crasher on bosch/atftpd - can you build a PoC?
ok, with ASLR/PIE/Canaries?
yes
... 2h later ...
pushed under atftpd/poc/exploit.py
Awesome, thank you!
Summarizing the TBONE Tesla Hack
● 4 steps: (1) access, (2) attack surface identification and breach, (3) root cause analysis
and (4) weaponization/escalation
● Demonstrates common patterns found in automotive:
○ Security spans across multiple layers (network, application, MCU/subsystems)
○ System includes multiple software components not owned by the manufacturer
○ Open-Source Components are part of the stack and affect analysis
○ Barrier of entry matters (copying creds from twitter vs breaking crypto keys, finding
zero-days in seconds vs fuzzing for hours with no findings)
More Ryan Facts
● Finds and writes exploits for previously
unseen software composed of millions of
lines of code within hours
● Likes low-effort - "lazy" - solutions
How does he do this?
ASYMMETRIES
THE ATTACKERS' ADVANTAGE
Attackers need one weakness;
defenders must protect all paths
CYBERSECURITY ASYMMETRY #1
THERE ARE
570 DEVELOPERS
CYBERSECURITY ASYMMETRY #2
FOR EVERY
CYBERSECURITY
Build > Test > Secure
PROFESSIONAL
MONDAY
Costly Incident Response
Pushing vendors for
patches, triaging impact,
containing breaches
WEDNESDAY
TUESDAY
CYBERSECURITY ASYMMETRY #3
Defenders can't stay ahead of attackers
Attacker finds 0-day
Fuzz tests, reverse
engineers - now an
exploit is out in the wild
You do everything right
Clean SBOM, audit, third
party pen testing - and a
successful release!
Defender process today is reactive!
Question ☐How do these impact you?
KNOWN UNKNOWN
PATTERN MATCHING
BEHAVIOR
SCA
SAST
DAST
IAST
PE
N
FUZZ
SBO
M
Attackers have a much
simpler landscape
Introduce proactive practices to
find flaws before attackers do
DEFENSE IS REACTIVE
03
Introduce automation (scale)
and continue to shift left (turn
developers to Defenders)
DEVELOPERS OUTNUMBER SECURITY
02
Not a lot - this is just a basic
security principle.
ATTACKERS ONLY NEED ONE WEAKNESS
01
What can defenders do?
OFFENSIVE APPSEC
IN YOUR CI/CD
Automotive Development
Create
Model
Generated
Code
Link External
Code
System
Hardware in
the Loop
Test Model
Software in
the Loop
Test in CI Test on
HW
Test complete
vehicle
Opportunity: provide automatic security
feedback solutions (proactive and reactive) for
the development team and make it a build gate
Automation is key: team velocity and responsiveness defined by iteration speed
Write
Requirements
Automotive Development
Create
Model
Generated
Code
Link External
Code
System
Hardware in
the Loop
Software in
the Loop
Opportunity: provide automatic security
feedback solutions (proactive and reactive) for
the development team and make it a build gate
Write
Requirements
Gotcha #1: Findings should be actionable / verifiable or you get developer frustration
Example SCA Report #1: CVE-2021-26675
• A stack-based buffer overflow in dnsproxy in ConnMan before 1.39 could be used by
network adjacent attackers to execute code.
Hmm, we have vendored ConnMan with
local mods, are we really affected? How
can I know? Can I backport changes?
Example SCA Report #1: CVE-2021-26675
• A timing side-channel in the handling of RSA ClientKeyExchange messages was discovered
in GnuTLS. This side-channel can be sufficient to recover the key encrypted in the RSA
ciphertext across a network in a Bleichenbacher style attack. To achieve a successful
decryption the attacker would need to send a large amount of specially crafted messages to
the vulnerable server. By recovering the secret from the ClientKeyExchange message, the
attacker would be able to decrypt the application data exchanged over that connection.
Well ... I guess the pipeline's blocked ...
Time to catch up on my netflix shows
Automotive Development
Create
Model
Generated
Code
Link External
Code
System
Hardware in
the Loop
Software in
the Loop
Opportunity: provide automatic security
feedback solutions (proactive and reactive) for
the development team and make it a build gate
Write
Requirements
Gotcha #2: Findings should be trusted - no false positives
Example SAST Report
Library X that you are linking against and was provided by a vendor has an unacceptable use of
the unsafe function strcpy.
Do I modify the vendored library? But I
am not even using the function that's
calling strcpy. Is this even relevant?
OPPORTUNITY #1
DEVELOPER-ACTIONABLE REPORTS
Example Mayhem Report
https://github.com/ForAllSecure/mapi-action-examples/pull/2
OPPORTUNITY #2
PROVIDE VALUE TO DEVELOPERS
Example Mayhem Report
https://github.com/ForAllSecure/mcode-action-examples/pull/3
Use automatically
generated test cases to
meet your coverage
requirements + save
human hours!
42
Design and
Definition
Stage
Write Code
Security
ISO 21434
Safety
ISO 26262
6-9: Software unit testing
Replace existing basic test generation
with Mayhem’s intelligent algorithms
6-10: Software Integration &
Verification
Mayhem helps build code coverage
security and editable coverage tests
V MODEL
10/11: Security Hardening
Verify every release has ASLR, DEP,
and other code hardening enabled
10: Security Testing
Satisfy adversarial testing
requirement with automated,
advanced fuzzing and testing.
11: Production Validation
Mayhem for API checks deployed
APIs in addition to CI/CD integration
Automation to Meet ISO Development Standards
WHAT DOES THE
PIPELINE LOOK LIKE?
Integrates into software-in-
the-loop build and tests
using docker
Downstream hardware-in-
the-loop tests can use
results if needed
Findings are actionable -
runnable test cases
Test cases are vendor-neutral files which
can be replayed in existing test and
coverage runners
THANK YOU
Get in touch with us
THANASSIS@FORALLSECURE.COM
JOSH@FORALLSECURE.COM
Learn more
FORALLSECURE.COM
Or stick around…
WE CAN HELP YOU GET STARTED NOW…
Hands-on:
testing like a
hacker

Más contenido relacionado

La actualidad más candente

Roles and responsibilities of a CISO
Roles and responsibilities of a CISORoles and responsibilities of a CISO
Roles and responsibilities of a CISOEC-Council
 
WHY SOC Services needed?
WHY SOC Services needed?WHY SOC Services needed?
WHY SOC Services needed?manoharparakh
 
Cyber Attack Methodologies
Cyber Attack MethodologiesCyber Attack Methodologies
Cyber Attack MethodologiesGeeks Anonymes
 
Adversary Emulation and Its Importance for Improving Security Posture in Orga...
Adversary Emulation and Its Importance for Improving Security Posture in Orga...Adversary Emulation and Its Importance for Improving Security Posture in Orga...
Adversary Emulation and Its Importance for Improving Security Posture in Orga...Digit Oktavianto
 
Threat Hunting - Moving from the ad hoc to the formal
Threat Hunting - Moving from the ad hoc to the formalThreat Hunting - Moving from the ad hoc to the formal
Threat Hunting - Moving from the ad hoc to the formalPriyanka Aash
 
Complete Endpoint protection
Complete Endpoint protectionComplete Endpoint protection
Complete Endpoint protectionxband
 
SOC presentation- Building a Security Operations Center
SOC presentation- Building a Security Operations CenterSOC presentation- Building a Security Operations Center
SOC presentation- Building a Security Operations CenterMichael Nickle
 
Physical Security Assessments
Physical Security AssessmentsPhysical Security Assessments
Physical Security AssessmentsTom Eston
 
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture Embitel Technologies (I) PVT LTD
 
TARA- Automotive Cybersecurity.pptx
TARA- Automotive Cybersecurity.pptxTARA- Automotive Cybersecurity.pptx
TARA- Automotive Cybersecurity.pptxShriya Rai
 
Automotive Security (Connected Vehicle Security Issues)
Automotive Security (Connected Vehicle Security Issues)Automotive Security (Connected Vehicle Security Issues)
Automotive Security (Connected Vehicle Security Issues)Priyanka Aash
 
Security operation center (SOC)
Security operation center (SOC)Security operation center (SOC)
Security operation center (SOC)Ahmed Ayman
 
ECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
ECU Flashing: Flash Bootloaders that Facilitate ECU ReprogrammingECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
ECU Flashing: Flash Bootloaders that Facilitate ECU ReprogrammingEmbitel Technologies (I) PVT LTD
 
The Cyber Attack Lifecycle
The Cyber Attack LifecycleThe Cyber Attack Lifecycle
The Cyber Attack LifecycleCybereason
 
Cybersecurity Career Paths | Skills Required in Cybersecurity Career | Learn ...
Cybersecurity Career Paths | Skills Required in Cybersecurity Career | Learn ...Cybersecurity Career Paths | Skills Required in Cybersecurity Career | Learn ...
Cybersecurity Career Paths | Skills Required in Cybersecurity Career | Learn ...Edureka!
 

La actualidad más candente (20)

Roles and responsibilities of a CISO
Roles and responsibilities of a CISORoles and responsibilities of a CISO
Roles and responsibilities of a CISO
 
Windows Hacking
Windows HackingWindows Hacking
Windows Hacking
 
WHY SOC Services needed?
WHY SOC Services needed?WHY SOC Services needed?
WHY SOC Services needed?
 
Red team Engagement
Red team EngagementRed team Engagement
Red team Engagement
 
Cyber Attack Methodologies
Cyber Attack MethodologiesCyber Attack Methodologies
Cyber Attack Methodologies
 
Adversary Emulation and Its Importance for Improving Security Posture in Orga...
Adversary Emulation and Its Importance for Improving Security Posture in Orga...Adversary Emulation and Its Importance for Improving Security Posture in Orga...
Adversary Emulation and Its Importance for Improving Security Posture in Orga...
 
Threat Hunting - Moving from the ad hoc to the formal
Threat Hunting - Moving from the ad hoc to the formalThreat Hunting - Moving from the ad hoc to the formal
Threat Hunting - Moving from the ad hoc to the formal
 
Complete Endpoint protection
Complete Endpoint protectionComplete Endpoint protection
Complete Endpoint protection
 
Sandboxing
SandboxingSandboxing
Sandboxing
 
SOC presentation- Building a Security Operations Center
SOC presentation- Building a Security Operations CenterSOC presentation- Building a Security Operations Center
SOC presentation- Building a Security Operations Center
 
VANET, Security and Trust
VANET, Security and TrustVANET, Security and Trust
VANET, Security and Trust
 
NIST Cybersecurity Framework 101
NIST Cybersecurity Framework 101  NIST Cybersecurity Framework 101
NIST Cybersecurity Framework 101
 
Physical Security Assessments
Physical Security AssessmentsPhysical Security Assessments
Physical Security Assessments
 
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
 
TARA- Automotive Cybersecurity.pptx
TARA- Automotive Cybersecurity.pptxTARA- Automotive Cybersecurity.pptx
TARA- Automotive Cybersecurity.pptx
 
Automotive Security (Connected Vehicle Security Issues)
Automotive Security (Connected Vehicle Security Issues)Automotive Security (Connected Vehicle Security Issues)
Automotive Security (Connected Vehicle Security Issues)
 
Security operation center (SOC)
Security operation center (SOC)Security operation center (SOC)
Security operation center (SOC)
 
ECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
ECU Flashing: Flash Bootloaders that Facilitate ECU ReprogrammingECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
ECU Flashing: Flash Bootloaders that Facilitate ECU Reprogramming
 
The Cyber Attack Lifecycle
The Cyber Attack LifecycleThe Cyber Attack Lifecycle
The Cyber Attack Lifecycle
 
Cybersecurity Career Paths | Skills Required in Cybersecurity Career | Learn ...
Cybersecurity Career Paths | Skills Required in Cybersecurity Career | Learn ...Cybersecurity Career Paths | Skills Required in Cybersecurity Career | Learn ...
Cybersecurity Career Paths | Skills Required in Cybersecurity Career | Learn ...
 

Similar a Automotive Cybersecurity: Test Like a Hacker

theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdftheVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdfGabriel Mathenge
 
Cyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz AcademyCyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz Academyamallblitz0
 
Cyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz AcademyCyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz Academyananthakrishnansblit
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityIOSR Journals
 
Sp Security 101 Primer 2 1
Sp Security 101 Primer 2 1Sp Security 101 Primer 2 1
Sp Security 101 Primer 2 1Barry Greene
 
Code instrumentation
Code instrumentationCode instrumentation
Code instrumentationMennan Tekbir
 
Proving the Security of Low-Level Software Components & TEEs
Proving the Security of Low-Level Software Components & TEEsProving the Security of Low-Level Software Components & TEEs
Proving the Security of Low-Level Software Components & TEEsAshley Zupkus
 
Cyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz AcademyCyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz Academyamallblitz0
 
Cyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz AcademyCyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz Academyananthakrishnansblit
 
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1  Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1 securityxploded
 
IRJET- Development of Uncrackable Software
IRJET- Development of Uncrackable SoftwareIRJET- Development of Uncrackable Software
IRJET- Development of Uncrackable SoftwareIRJET Journal
 
So You Want a Job in Cybersecurity
So You Want a Job in CybersecuritySo You Want a Job in Cybersecurity
So You Want a Job in CybersecurityTeri Radichel
 
Usable Security for Developers: A Nightmare
Usable Security for Developers: A NightmareUsable Security for Developers: A Nightmare
Usable Security for Developers: A NightmareAchim D. Brucker
 
AktaionPPTv5_JZedits
AktaionPPTv5_JZeditsAktaionPPTv5_JZedits
AktaionPPTv5_JZeditsRod Soto
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileOleg Gryb
 
Network Vulnerabilities And Cyber Kill Chain Essay
Network Vulnerabilities And Cyber Kill Chain EssayNetwork Vulnerabilities And Cyber Kill Chain Essay
Network Vulnerabilities And Cyber Kill Chain EssayKaren Oliver
 
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptxSecure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptxlior mazor
 
Verification of Security for Untrusted Third Party IP Cores
Verification of  Security for Untrusted Third Party IP CoresVerification of  Security for Untrusted Third Party IP Cores
Verification of Security for Untrusted Third Party IP CoresIRJET Journal
 
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3IJERA Editor
 

Similar a Automotive Cybersecurity: Test Like a Hacker (20)

theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdftheVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
 
Cyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz AcademyCyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz Academy
 
Cyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz AcademyCyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz Academy
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
 
Sp Security 101 Primer 2 1
Sp Security 101 Primer 2 1Sp Security 101 Primer 2 1
Sp Security 101 Primer 2 1
 
Code instrumentation
Code instrumentationCode instrumentation
Code instrumentation
 
Proving the Security of Low-Level Software Components & TEEs
Proving the Security of Low-Level Software Components & TEEsProving the Security of Low-Level Software Components & TEEs
Proving the Security of Low-Level Software Components & TEEs
 
Cyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz AcademyCyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz Academy
 
Cyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz AcademyCyber security course in kerala | C|PENT | Blitz Academy
Cyber security course in kerala | C|PENT | Blitz Academy
 
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1  Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
 
IRJET- Development of Uncrackable Software
IRJET- Development of Uncrackable SoftwareIRJET- Development of Uncrackable Software
IRJET- Development of Uncrackable Software
 
So You Want a Job in Cybersecurity
So You Want a Job in CybersecuritySo You Want a Job in Cybersecurity
So You Want a Job in Cybersecurity
 
cybersecurity-careers.pdf
cybersecurity-careers.pdfcybersecurity-careers.pdf
cybersecurity-careers.pdf
 
Usable Security for Developers: A Nightmare
Usable Security for Developers: A NightmareUsable Security for Developers: A Nightmare
Usable Security for Developers: A Nightmare
 
AktaionPPTv5_JZedits
AktaionPPTv5_JZeditsAktaionPPTv5_JZedits
AktaionPPTv5_JZedits
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security Agile
 
Network Vulnerabilities And Cyber Kill Chain Essay
Network Vulnerabilities And Cyber Kill Chain EssayNetwork Vulnerabilities And Cyber Kill Chain Essay
Network Vulnerabilities And Cyber Kill Chain Essay
 
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptxSecure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
Secure Your DevOps Pipeline Best Practices Meetup 08022024.pptx
 
Verification of Security for Untrusted Third Party IP Cores
Verification of  Security for Untrusted Third Party IP CoresVerification of  Security for Untrusted Third Party IP Cores
Verification of Security for Untrusted Third Party IP Cores
 
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
Exploring the Social Engineering Toolkit (Set) Using Backtrack 5R3
 

Último

8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 

Último (20)

8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 

Automotive Cybersecurity: Test Like a Hacker

  • 2. ATTACKS & TECHNIQUES ASYMMETRIES OF DEFENSE OFFENSIVE SECURITY IN CI / CD QUESTIONS HANDS-ON (OPTIONAL) 01 02 03 04 05 What we're covering today
  • 3. Introductions Thanassis Avgerinos CO-FOUNDER, VP ENGINEERING FORALLSECURE THANASSIS@FORALLSECURE.COM Mayhem, by ForAllSecure, is a developer-first security testing solution. Built by professional hackers, it automatically generates thousands of tests to identify defects in your apps and APIs. Josh Thorngren VP DEVELOPER ADVOCACY, MARKETING FORALLSECURE JOSH@FORALLSECURE.COM
  • 5. Application security is critical for automotive safety
  • 6. Nineteen vulnerabilities that give attackers control over engine, locks, and more 2020, MERCEDES BENZ
  • 7. Zero-click exploit gives control over infotainment and acceleration settings 2021, TESLA
  • 8. Authentication bypass allows access to location and driver details 2016, NISSAN
  • 9. Good work here (thanks ASRG!) but still another layer of complexity and friction ADD IN NEW ISOS ON TOP 03 Infotainment, navigation, subscription-based vehicle features - constant need for innovation PUSH FOR NEW FEATURES 02 Multiple systems, layers, and vendors - securing them and enforcing this across poor network conditions DISTRIBUTED SYSTEMS ARE TOUGH 01 Automotive cybersecurity gets harder every day
  • 10. Questions ☐How do you test today? ☐How do you prioritize fixes? ☐Where in the SDLC does this happen?
  • 12. HOW TO HACK A TESLA
  • 13.
  • 14. TBONE Demonstrated First at CanSecWest DJI Mavic 2 drone hacking a Tesla Model X (or Model 3/S) How did they do this? Ralf-Philipp Weinmann Kunnamon Benedikt Schmotzle Comsecuris
  • 15. NO CREDENTIALS THOUGH NVM, WPA2-PSK CREDENTIALS HARDCODED AND AVAILABLE IN THE FIRMWARE ACTUALLY, I CAN JUST COPY FROM TWITTER Step #1: Connect to Tesla’s “service WiFi”
  • 16. Step 2: Map the Attack Surface and Breach Perimeter Checked for daemons processing network inputs - found ConnMan • ConnMan is a lightweight network manager for embedded Linux • Version 1.37 (latest at the time) with no active vulns Dead end? Nope! Let's attack it with fuzz testing! It crashes in seconds….that's a zero day!
  • 17. How hard is it to find a zero-day in ConnMan? Let’s find out!
  • 18. char *uncompress(int16_t field_count, char *start, char *end, char *ptr, char *uncompressed, int uncomp_len, char **uncompressed_ptr) { char *uptr = *uncompressed_ptr; /* position in result buffer */ debug("count %d ptr %p end %p uptr %p", field_count, ptr, end, uptr); while (field_count-- > 0 && ptr < end) { int dlen; /* data field length */ int ulen; /* uncompress length */ int pos; /* position in compressed string */ char name[NS_MAXLABEL]; /* tmp label */ uint16_t dns_type, dns_class; int comp_pos; if (!convert_label(start, end, ptr, name, NS_MAXLABEL, &pos, &comp_pos)) goto out; ulen = strlen(name); strncpy(uptr, name, uncomp_len - (uptr - uncompressed)); Step #3: Map back to the code
  • 19. Step #4: Create a Weaponized Exploit Standard workflow in the technical report although MCU escalation redacted
  • 20. Meet Ryan ● One of our hackers-in-residence ● Has won Defcon CTF the top hacking competition in the world 5+ times with PPP ● Their team develops ~50 weaponized exploits in under 48 hours when in crunch mode
  • 21. My Interactions with Ryan Hey Ryan, we got a crasher on bosch/atftpd - can you build a PoC? ok, with ASLR/PIE/Canaries? yes ... 2h later ... pushed under atftpd/poc/exploit.py Awesome, thank you!
  • 22. Summarizing the TBONE Tesla Hack ● 4 steps: (1) access, (2) attack surface identification and breach, (3) root cause analysis and (4) weaponization/escalation ● Demonstrates common patterns found in automotive: ○ Security spans across multiple layers (network, application, MCU/subsystems) ○ System includes multiple software components not owned by the manufacturer ○ Open-Source Components are part of the stack and affect analysis ○ Barrier of entry matters (copying creds from twitter vs breaking crypto keys, finding zero-days in seconds vs fuzzing for hours with no findings)
  • 23. More Ryan Facts ● Finds and writes exploits for previously unseen software composed of millions of lines of code within hours ● Likes low-effort - "lazy" - solutions How does he do this?
  • 25. Attackers need one weakness; defenders must protect all paths CYBERSECURITY ASYMMETRY #1
  • 26. THERE ARE 570 DEVELOPERS CYBERSECURITY ASYMMETRY #2 FOR EVERY CYBERSECURITY Build > Test > Secure PROFESSIONAL
  • 27. MONDAY Costly Incident Response Pushing vendors for patches, triaging impact, containing breaches WEDNESDAY TUESDAY CYBERSECURITY ASYMMETRY #3 Defenders can't stay ahead of attackers Attacker finds 0-day Fuzz tests, reverse engineers - now an exploit is out in the wild You do everything right Clean SBOM, audit, third party pen testing - and a successful release! Defender process today is reactive!
  • 28. Question ☐How do these impact you?
  • 30. Introduce proactive practices to find flaws before attackers do DEFENSE IS REACTIVE 03 Introduce automation (scale) and continue to shift left (turn developers to Defenders) DEVELOPERS OUTNUMBER SECURITY 02 Not a lot - this is just a basic security principle. ATTACKERS ONLY NEED ONE WEAKNESS 01 What can defenders do?
  • 32. Automotive Development Create Model Generated Code Link External Code System Hardware in the Loop Test Model Software in the Loop Test in CI Test on HW Test complete vehicle Opportunity: provide automatic security feedback solutions (proactive and reactive) for the development team and make it a build gate Automation is key: team velocity and responsiveness defined by iteration speed Write Requirements
  • 33. Automotive Development Create Model Generated Code Link External Code System Hardware in the Loop Software in the Loop Opportunity: provide automatic security feedback solutions (proactive and reactive) for the development team and make it a build gate Write Requirements Gotcha #1: Findings should be actionable / verifiable or you get developer frustration
  • 34. Example SCA Report #1: CVE-2021-26675 • A stack-based buffer overflow in dnsproxy in ConnMan before 1.39 could be used by network adjacent attackers to execute code. Hmm, we have vendored ConnMan with local mods, are we really affected? How can I know? Can I backport changes?
  • 35. Example SCA Report #1: CVE-2021-26675 • A timing side-channel in the handling of RSA ClientKeyExchange messages was discovered in GnuTLS. This side-channel can be sufficient to recover the key encrypted in the RSA ciphertext across a network in a Bleichenbacher style attack. To achieve a successful decryption the attacker would need to send a large amount of specially crafted messages to the vulnerable server. By recovering the secret from the ClientKeyExchange message, the attacker would be able to decrypt the application data exchanged over that connection. Well ... I guess the pipeline's blocked ... Time to catch up on my netflix shows
  • 36. Automotive Development Create Model Generated Code Link External Code System Hardware in the Loop Software in the Loop Opportunity: provide automatic security feedback solutions (proactive and reactive) for the development team and make it a build gate Write Requirements Gotcha #2: Findings should be trusted - no false positives
  • 37. Example SAST Report Library X that you are linking against and was provided by a vendor has an unacceptable use of the unsafe function strcpy. Do I modify the vendored library? But I am not even using the function that's calling strcpy. Is this even relevant?
  • 41. Example Mayhem Report https://github.com/ForAllSecure/mcode-action-examples/pull/3 Use automatically generated test cases to meet your coverage requirements + save human hours!
  • 42. 42 Design and Definition Stage Write Code Security ISO 21434 Safety ISO 26262 6-9: Software unit testing Replace existing basic test generation with Mayhem’s intelligent algorithms 6-10: Software Integration & Verification Mayhem helps build code coverage security and editable coverage tests V MODEL 10/11: Security Hardening Verify every release has ASLR, DEP, and other code hardening enabled 10: Security Testing Satisfy adversarial testing requirement with automated, advanced fuzzing and testing. 11: Production Validation Mayhem for API checks deployed APIs in addition to CI/CD integration Automation to Meet ISO Development Standards
  • 44. Integrates into software-in- the-loop build and tests using docker Downstream hardware-in- the-loop tests can use results if needed Findings are actionable - runnable test cases Test cases are vendor-neutral files which can be replayed in existing test and coverage runners
  • 45. THANK YOU Get in touch with us THANASSIS@FORALLSECURE.COM JOSH@FORALLSECURE.COM Learn more FORALLSECURE.COM Or stick around… WE CAN HELP YOU GET STARTED NOW…

Notas del editor

  1. We can try to reproduce their steps ourselves and it will get fairly technical. Could walk through all the details, but this is mostly if you are interested in exploitation research. At this point, as Defenders we already validated the finding and understand impact. However, it is important to understand the attacker mindset and also capabilities.
  2. Mayhem plugs into your existing development process where-ever you are doing software tests already. In cyber-physical systems this is typically in the software in the loop testing process (SIL). The advantage of plugging in is that all your existing processes, including tracing results back to requirements, don’t need to change. Mayhem outputs the equivalent of a new test case, either for new code coverage or an actual exploit.
  3. Mayhem plugs into your existing development process where-ever you are doing software tests already. In cyber-physical systems this is typically in the software in the loop testing process (SIL). The advantage of plugging in is that all your existing processes, including tracing results back to requirements, don’t need to change. Mayhem outputs the equivalent of a new test case, either for new code coverage or an actual exploit.
  4. Mayhem plugs into your existing development process where-ever you are doing software tests already. In cyber-physical systems this is typically in the software in the loop testing process (SIL). The advantage of plugging in is that all your existing processes, including tracing results back to requirements, don’t need to change. Mayhem outputs the equivalent of a new test case, either for new code coverage or an actual exploit.
  5. multiply that by a 1000 and you get an idea