SlideShare una empresa de Scribd logo
1 de 38
Descargar para leer sin conexión
Presentation Time:
This presentation should take around 45min.
Contributors:
Radu Alexandru Basaraba – rbasaraba@bitdefender.com
Alexandru Lazar – allazar@bitdefender.com
Bitdefender Labs – labs@bitdefender.com
Next-gen IoT botnets #3 - Moar Ownage
Host:
Alex “Jay” Balan – Chief Security Researcher
abalan@bitdefender.com | @jaymzu
Honey? You know the cloud?
Presentation Time:
This presentation should take around 45min.
Contributors:
Radu Alexandru Basaraba – rbasaraba@bitdefender.com
Alexandru Lazar – allazar@bitdefender.com
Bitdefender Labs – labs@bitdefender.com
Next-gen IoT botnets #3 - Moar Ownage
Host:
Alex “Jay” Balan – Chief Security Researcher
abalan@bitdefender.com | @jaymzu
Honey? You know the cloud?
FUUUUUUUUUUUCK!!!!!
IoT = Hardware + OS + app + cloud
HW
RedHat 6.2
wu-ftpd
HW
Windows
IIS5.0
HW
Windows
RDP
HW
whatever
Joomla
HW
Busybox
app
IoTs are just websites running on Linux but with a
significantly bigger attack surface due to mobile
apps & cloud
IoT hacking. What to look for
6
• Software
• Telnet (it’s still a thing in 2019. I know…)
• Mobile app – device communication
• Command injection
• Directory traversal / Local file inclusion
• Buffer overflows (99% of all IoTs have binaries compiled without PIE -> no ASLR -> RCE)
• Worth mentioning – A LOT of different vendors share the same code
• Backdoors, credential reuse, private key reuse
• Cloud chatter.
• How does the mobile app talk to the cloud?
• How does the cloud talk to the device?
IoT hacking. What to look for
7
• Hardware
• JTAG (ulator)
• Serial interfaces
• Boot hijack
Boot hijack (cont)
8
Traditional IoT botnets
Current and upcoming IoT implementations
• Not directly accessible from the internet
• More efficient management
• Modular architecture. Components provided
by 3rd parties
• Unique 32bit Device_ID identifies each
managed device
• Communication and commands are sent by
using Device_ID
• Decent usage of encryption
• This is a very very generic description but
applies to 90% of cloud implementations for
IoT
BLEMCN5YPUYTW595111A
However, not all cloud implementations are that great
That cloud looks
like a giraffe
That one looks like
a mushroom
Ref: http://explosm.net/shorts/347/cloud-watching
• In 99,99% of the cases there’s no
actual authentication implemented.
• Device_ID is considered unpredictable
and serves as auth
• Some vendors implement additional
symmetric keys, unique per device.
Thumbs up!
• Some vendors implementa additional
functionality, quite often breaking
what should be decent security
• E.g. Amazon S3, MQTT, client_id,
etc
However, not all cloud implementations are that great
A few words on S3 buckets
• S3 in many cases relies on “/this/is/the/path/to/the/file/you/want.mp4”.
The path is generated by whatever device or app uploads the file and
relayed to whoever needs to access it.
• You can’t “ls /this/is/the/path/to/the/file/you/*” to see what other files
are there
• Did I say “you can’t?”. I meant you shouldn’t be able to
• We’ve seen an alarming number of vendors allowing the equivalent of a
recursive “ls –R /this/”
A few words on MQTT
• Easiest analogy – torrent
• The device registers to something like /vendor/device_id/topic where
topic = types of events (online, offline, etc)
• The management app is told “you can tap into /vendor/device_id/topic”
to receive events and interact with the device
• Security countermeasures prevent attackers from tapping into
/vendor/another_device_id/topic
• …when implemented properly
• I’ve been told that you can sometimes register to /vendor/ and get
swarmed with all the device_ids and their statuses
An example targeted attack scenario, completely
hypothetical. Objective: hack Irene’s baby monitor!
• Register to /vendor/ on MQTT. Have a script harvest all registered
device_ids
• Another script, emulating the legitimate mobile app pulls the configs
(what you see in the app settings) for each device_id. You’ll have the e-
mail for sure and stuff like name, location, etc
• When you see Irene’s e-mail popping up. You’ll have her device_id and
you will be able to use that to gain access to the device without any other
form of auth or list and download her files stored in S3
• Of course, this is a purely hypothetical scenario J
Our first (published) paper on cloud exploitation to hack IoTs
• Edimax smart power outlet
• Unauthenticated RCE
• Unauthenticated remote control (on/off)
• Obfuscation instead of encryption
• $Device_ID == MAC address ;)
Guardzilla – Smart
Security Camera
17
Mobile app behavior
• API endpoint at https://apps.guardzilla.com
• After the first auth/account registration the app receives a 6 digits
long UID (ours is 408311. Have phun!)
• Can’t be changed
• Incremented by 1 for each new account J
Mobile app behavior
• UserID and Password are hardcoded
• POST requests sent to the cloud are encrypted with AES256 CBC
mode
• Encryption key and IV hardcoded in the app
• How about that UID? Awesome stuff, right? J
• It’s actually a “client_id” they added for enhanced usability (more devices per
user, for example)
uid+UserID+Password+key+IV=
We only really just need the uid, since all the others are static
uid+UserID+Password+key+IV=
Useful information: device id (UID) and password
Worth mentioning that you can change that password (and
some do) but it’ll be useless
Account takeover
• Full account takeover by changing e-mail and pass to arbitrary values
• E-mail doesn’t have to be valid since no confirmation e-mail is sent
• The old credentials will be invalidated
Access to audio/video feed – the hard way
• Just for the hell of it we wrote a client that emulates the app and
pipes the video feed to vlc
• Takes device ID and password as parameters
Access to audio/video feed – the easy way
• “sendinvite” API – requires uid and d_uid (obtained earlier)
• Can be used to forge an invitation to view a specific camera
• The owner is unaware that somebody else has access to the camera
You promised next-gen botnets!
Buffer overflow in the cloud agent
• Kalay Platform (https://www.tutk.com/) used for cloud
communication
• A combination of P2P and relay servers used to bypass NAT
restrictions
• main.v5.1.4.exe handles a number of services, including cloud
communication
• Upon inspection, we identified a function vulnerable to out of bound
writes: TK_set_deviceModel_req_handle
• A specially crafted buffer sent over the cloud communication gets us RCE
We overflow v28, then v29 and reach the
return address below the stack frame
And call system
Calling system. Is anybody home?
Gadget address used to call
system
Type of command that corresponds to
the TK_set_deviceModel_req_handle
function
The function that
sends the command
through the cloud
• The main binary will crash after the command is executed and the camera will restart. To achieve persistence
we’ll append the commands to the camera’s startup script @ /mnt/mtd/startapp
• Tested against GZ251W, firmware version 0.5.1.4. Other models may be affected
More RCE: command injection
• GZ180 supports remote upgrade
• The function takes 2 parameters: firmware version and download
location
• The firmware version will be concatenated to tar as an argument and
then executed through the system command
• The download location needs to be accessible (not valid)
• Camera firmware will remain unaffected since there’s no valid
upgrade and its workflow will continue uninterrupted but it won’t
accept another upgrade command until reboot
• Requires Device UID and password (obtained before)
More RCE: command injection
Demo
Recorded demos ;)
Bonus AWS bucket access
• The camera records short videos when the motion detection system
is triggered and the camera is armed
• Recordings are uploaded to an AWS bucket named motion-detection
• One key pair is used for all cameras: AWSAccessKeyId and
SecretAccessKey, retrievable from the device firmware
• => full read/write access to the AWS bucket
• + directory index
To sum up
• Based on the initial UID an attacker can receive full info, including
device ID for all the cameras associated with that account
• The initial UID is fully predictable
• Full account takeover
• Invites -> snooping without the owner’s knowledge
• “just view the stream”
• Multiple RCE
Takeaways
• IoT is a huge attack surface and is growing insanely fast
• Leverage cloud communication to bypass NAT
• Vendors need to
• Pentest their product periodically. Thoroughly
• Run bug bounty programs
• Have proper and unattended update mechanisms
• It’s still trivial to find RCEs in IoT and it seems this won’t change any
time soon. More of the security research community needs to focus
on this
(dis)honorable mention
• So far, we published only a fraction of our research, due to potential
legal issues
• It’s easier to go after a relatively big company than an independent
researcher
• This is easy stuff. If you’re an independent researcher you can do A
LOT more to expose and get these types of vulns fixed. And you
should.
• We’ll be happy to help. Feel free to reach out.
Q/A
abalan@bitdefender.com | @jaymzu
Using cloud implementations to hack IoT - Alex 'Jay' Balan

Más contenido relacionado

Más de NoNameCon

Oksana Safronova - Will you detect it or not? How to check if security team i...
Oksana Safronova - Will you detect it or not? How to check if security team i...Oksana Safronova - Will you detect it or not? How to check if security team i...
Oksana Safronova - Will you detect it or not? How to check if security team i...NoNameCon
 
Bert Heitink - 10 major steps for Cybersecurity
Bert Heitink - 10 major steps for CybersecurityBert Heitink - 10 major steps for Cybersecurity
Bert Heitink - 10 major steps for CybersecurityNoNameCon
 
Ievgen Kulyk - Advanced reverse engineering techniques in unpacking
Ievgen Kulyk - Advanced reverse engineering techniques in unpackingIevgen Kulyk - Advanced reverse engineering techniques in unpacking
Ievgen Kulyk - Advanced reverse engineering techniques in unpackingNoNameCon
 
Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...
Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...
Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...NoNameCon
 
Pavlo Zhavoronkov - What is autumn like in prison camps?
Pavlo Zhavoronkov - What is autumn like in prison camps?Pavlo Zhavoronkov - What is autumn like in prison camps?
Pavlo Zhavoronkov - What is autumn like in prison camps?NoNameCon
 
Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!
Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!
Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!NoNameCon
 
Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...
Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...
Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...NoNameCon
 
Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...
Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...
Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...NoNameCon
 
Alexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameCon
Alexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameConAlexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameCon
Alexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameConNoNameCon
 
Stas Kolenkin & Taras Bobalo - CloudFlare Recon Workshop
Stas Kolenkin & Taras Bobalo - CloudFlare Recon WorkshopStas Kolenkin & Taras Bobalo - CloudFlare Recon Workshop
Stas Kolenkin & Taras Bobalo - CloudFlare Recon WorkshopNoNameCon
 
Serhii Korolenko - Passing Security By
Serhii Korolenko - Passing Security BySerhii Korolenko - Passing Security By
Serhii Korolenko - Passing Security ByNoNameCon
 
Serhii Aleynikov - Remote Forensics of a Linux Server Without Physical Access
Serhii Aleynikov - Remote Forensics of a Linux Server Without Physical AccessSerhii Aleynikov - Remote Forensics of a Linux Server Without Physical Access
Serhii Aleynikov - Remote Forensics of a Linux Server Without Physical AccessNoNameCon
 
Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...
Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...
Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...NoNameCon
 
Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...
Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...
Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...NoNameCon
 
Lukas Apa - Hacking Robots Before SkyNet
Lukas Apa - Hacking Robots Before SkyNet Lukas Apa - Hacking Robots Before SkyNet
Lukas Apa - Hacking Robots Before SkyNet NoNameCon
 
Eugene Kulik & Pavel Kryvko - Executable Code Protection in ARM Systems
Eugene Kulik & Pavel Kryvko - Executable Code Protection in ARM SystemsEugene Kulik & Pavel Kryvko - Executable Code Protection in ARM Systems
Eugene Kulik & Pavel Kryvko - Executable Code Protection in ARM SystemsNoNameCon
 
Jeremiah O'Connor & David Maynor - Chasing the Crypto Workshop: Tracking Fina...
Jeremiah O'Connor & David Maynor - Chasing the Crypto Workshop: Tracking Fina...Jeremiah O'Connor & David Maynor - Chasing the Crypto Workshop: Tracking Fina...
Jeremiah O'Connor & David Maynor - Chasing the Crypto Workshop: Tracking Fina...NoNameCon
 
Igor Andriushchenko - Tips and tricks for the efficient white-box security au...
Igor	Andriushchenko - Tips and tricks for the efficient white-box security au...Igor	Andriushchenko - Tips and tricks for the efficient white-box security au...
Igor Andriushchenko - Tips and tricks for the efficient white-box security au...NoNameCon
 
Bert Heitink - Technical Insights for the SOC as Technical Centre for IT Secu...
Bert Heitink - Technical Insights for the SOC as Technical Centre for IT Secu...Bert Heitink - Technical Insights for the SOC as Technical Centre for IT Secu...
Bert Heitink - Technical Insights for the SOC as Technical Centre for IT Secu...NoNameCon
 

Más de NoNameCon (19)

Oksana Safronova - Will you detect it or not? How to check if security team i...
Oksana Safronova - Will you detect it or not? How to check if security team i...Oksana Safronova - Will you detect it or not? How to check if security team i...
Oksana Safronova - Will you detect it or not? How to check if security team i...
 
Bert Heitink - 10 major steps for Cybersecurity
Bert Heitink - 10 major steps for CybersecurityBert Heitink - 10 major steps for Cybersecurity
Bert Heitink - 10 major steps for Cybersecurity
 
Ievgen Kulyk - Advanced reverse engineering techniques in unpacking
Ievgen Kulyk - Advanced reverse engineering techniques in unpackingIevgen Kulyk - Advanced reverse engineering techniques in unpacking
Ievgen Kulyk - Advanced reverse engineering techniques in unpacking
 
Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...
Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...
Stanislav Kolenkin & Igor Khoroshchenko - Knock Knock: Security threats with ...
 
Pavlo Zhavoronkov - What is autumn like in prison camps?
Pavlo Zhavoronkov - What is autumn like in prison camps?Pavlo Zhavoronkov - What is autumn like in prison camps?
Pavlo Zhavoronkov - What is autumn like in prison camps?
 
Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!
Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!
Alexander Olenyev & Andrey Voloshin - Car Hacking: Yes, You can do that!
 
Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...
Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...
Kostiantyn Korsun - State Cybersecurity vs. Cybersecurity of the State. #FRD ...
 
Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...
Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...
Eugene Pilyankevich - Getting Secure Against Challenges Or Getting Security C...
 
Alexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameCon
Alexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameConAlexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameCon
Alexander Olenyev & Andrey Voloshin - Car Hacking 101 by NoNameCon
 
Stas Kolenkin & Taras Bobalo - CloudFlare Recon Workshop
Stas Kolenkin & Taras Bobalo - CloudFlare Recon WorkshopStas Kolenkin & Taras Bobalo - CloudFlare Recon Workshop
Stas Kolenkin & Taras Bobalo - CloudFlare Recon Workshop
 
Serhii Korolenko - Passing Security By
Serhii Korolenko - Passing Security BySerhii Korolenko - Passing Security By
Serhii Korolenko - Passing Security By
 
Serhii Aleynikov - Remote Forensics of a Linux Server Without Physical Access
Serhii Aleynikov - Remote Forensics of a Linux Server Without Physical AccessSerhii Aleynikov - Remote Forensics of a Linux Server Without Physical Access
Serhii Aleynikov - Remote Forensics of a Linux Server Without Physical Access
 
Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...
Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...
Oleg Bondarenko - Threat Intelligence particularities world-wide. Real life u...
 
Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...
Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...
Nazar Tymoshyk et al - Night in Defense Workshop: Hunting for a needle in a h...
 
Lukas Apa - Hacking Robots Before SkyNet
Lukas Apa - Hacking Robots Before SkyNet Lukas Apa - Hacking Robots Before SkyNet
Lukas Apa - Hacking Robots Before SkyNet
 
Eugene Kulik & Pavel Kryvko - Executable Code Protection in ARM Systems
Eugene Kulik & Pavel Kryvko - Executable Code Protection in ARM SystemsEugene Kulik & Pavel Kryvko - Executable Code Protection in ARM Systems
Eugene Kulik & Pavel Kryvko - Executable Code Protection in ARM Systems
 
Jeremiah O'Connor & David Maynor - Chasing the Crypto Workshop: Tracking Fina...
Jeremiah O'Connor & David Maynor - Chasing the Crypto Workshop: Tracking Fina...Jeremiah O'Connor & David Maynor - Chasing the Crypto Workshop: Tracking Fina...
Jeremiah O'Connor & David Maynor - Chasing the Crypto Workshop: Tracking Fina...
 
Igor Andriushchenko - Tips and tricks for the efficient white-box security au...
Igor	Andriushchenko - Tips and tricks for the efficient white-box security au...Igor	Andriushchenko - Tips and tricks for the efficient white-box security au...
Igor Andriushchenko - Tips and tricks for the efficient white-box security au...
 
Bert Heitink - Technical Insights for the SOC as Technical Centre for IT Secu...
Bert Heitink - Technical Insights for the SOC as Technical Centre for IT Secu...Bert Heitink - Technical Insights for the SOC as Technical Centre for IT Secu...
Bert Heitink - Technical Insights for the SOC as Technical Centre for IT Secu...
 

Último

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Último (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Using cloud implementations to hack IoT - Alex 'Jay' Balan

  • 1. Presentation Time: This presentation should take around 45min. Contributors: Radu Alexandru Basaraba – rbasaraba@bitdefender.com Alexandru Lazar – allazar@bitdefender.com Bitdefender Labs – labs@bitdefender.com Next-gen IoT botnets #3 - Moar Ownage Host: Alex “Jay” Balan – Chief Security Researcher abalan@bitdefender.com | @jaymzu Honey? You know the cloud?
  • 2. Presentation Time: This presentation should take around 45min. Contributors: Radu Alexandru Basaraba – rbasaraba@bitdefender.com Alexandru Lazar – allazar@bitdefender.com Bitdefender Labs – labs@bitdefender.com Next-gen IoT botnets #3 - Moar Ownage Host: Alex “Jay” Balan – Chief Security Researcher abalan@bitdefender.com | @jaymzu Honey? You know the cloud? FUUUUUUUUUUUCK!!!!!
  • 3. IoT = Hardware + OS + app + cloud HW RedHat 6.2 wu-ftpd HW Windows IIS5.0 HW Windows RDP HW whatever Joomla HW Busybox app
  • 4. IoTs are just websites running on Linux but with a significantly bigger attack surface due to mobile apps & cloud
  • 5. IoT hacking. What to look for 6 • Software • Telnet (it’s still a thing in 2019. I know…) • Mobile app – device communication • Command injection • Directory traversal / Local file inclusion • Buffer overflows (99% of all IoTs have binaries compiled without PIE -> no ASLR -> RCE) • Worth mentioning – A LOT of different vendors share the same code • Backdoors, credential reuse, private key reuse • Cloud chatter. • How does the mobile app talk to the cloud? • How does the cloud talk to the device?
  • 6. IoT hacking. What to look for 7 • Hardware • JTAG (ulator) • Serial interfaces • Boot hijack
  • 9. Current and upcoming IoT implementations • Not directly accessible from the internet • More efficient management • Modular architecture. Components provided by 3rd parties • Unique 32bit Device_ID identifies each managed device • Communication and commands are sent by using Device_ID • Decent usage of encryption • This is a very very generic description but applies to 90% of cloud implementations for IoT BLEMCN5YPUYTW595111A
  • 10. However, not all cloud implementations are that great That cloud looks like a giraffe That one looks like a mushroom Ref: http://explosm.net/shorts/347/cloud-watching
  • 11. • In 99,99% of the cases there’s no actual authentication implemented. • Device_ID is considered unpredictable and serves as auth • Some vendors implement additional symmetric keys, unique per device. Thumbs up! • Some vendors implementa additional functionality, quite often breaking what should be decent security • E.g. Amazon S3, MQTT, client_id, etc However, not all cloud implementations are that great
  • 12. A few words on S3 buckets • S3 in many cases relies on “/this/is/the/path/to/the/file/you/want.mp4”. The path is generated by whatever device or app uploads the file and relayed to whoever needs to access it. • You can’t “ls /this/is/the/path/to/the/file/you/*” to see what other files are there • Did I say “you can’t?”. I meant you shouldn’t be able to • We’ve seen an alarming number of vendors allowing the equivalent of a recursive “ls –R /this/”
  • 13. A few words on MQTT • Easiest analogy – torrent • The device registers to something like /vendor/device_id/topic where topic = types of events (online, offline, etc) • The management app is told “you can tap into /vendor/device_id/topic” to receive events and interact with the device • Security countermeasures prevent attackers from tapping into /vendor/another_device_id/topic • …when implemented properly • I’ve been told that you can sometimes register to /vendor/ and get swarmed with all the device_ids and their statuses
  • 14. An example targeted attack scenario, completely hypothetical. Objective: hack Irene’s baby monitor! • Register to /vendor/ on MQTT. Have a script harvest all registered device_ids • Another script, emulating the legitimate mobile app pulls the configs (what you see in the app settings) for each device_id. You’ll have the e- mail for sure and stuff like name, location, etc • When you see Irene’s e-mail popping up. You’ll have her device_id and you will be able to use that to gain access to the device without any other form of auth or list and download her files stored in S3 • Of course, this is a purely hypothetical scenario J
  • 15. Our first (published) paper on cloud exploitation to hack IoTs • Edimax smart power outlet • Unauthenticated RCE • Unauthenticated remote control (on/off) • Obfuscation instead of encryption • $Device_ID == MAC address ;)
  • 17. Mobile app behavior • API endpoint at https://apps.guardzilla.com • After the first auth/account registration the app receives a 6 digits long UID (ours is 408311. Have phun!) • Can’t be changed • Incremented by 1 for each new account J
  • 18. Mobile app behavior • UserID and Password are hardcoded • POST requests sent to the cloud are encrypted with AES256 CBC mode • Encryption key and IV hardcoded in the app • How about that UID? Awesome stuff, right? J • It’s actually a “client_id” they added for enhanced usability (more devices per user, for example)
  • 19. uid+UserID+Password+key+IV= We only really just need the uid, since all the others are static
  • 20. uid+UserID+Password+key+IV= Useful information: device id (UID) and password Worth mentioning that you can change that password (and some do) but it’ll be useless
  • 21. Account takeover • Full account takeover by changing e-mail and pass to arbitrary values • E-mail doesn’t have to be valid since no confirmation e-mail is sent • The old credentials will be invalidated
  • 22. Access to audio/video feed – the hard way • Just for the hell of it we wrote a client that emulates the app and pipes the video feed to vlc • Takes device ID and password as parameters
  • 23. Access to audio/video feed – the easy way • “sendinvite” API – requires uid and d_uid (obtained earlier) • Can be used to forge an invitation to view a specific camera • The owner is unaware that somebody else has access to the camera
  • 25. Buffer overflow in the cloud agent • Kalay Platform (https://www.tutk.com/) used for cloud communication • A combination of P2P and relay servers used to bypass NAT restrictions • main.v5.1.4.exe handles a number of services, including cloud communication • Upon inspection, we identified a function vulnerable to out of bound writes: TK_set_deviceModel_req_handle • A specially crafted buffer sent over the cloud communication gets us RCE
  • 26. We overflow v28, then v29 and reach the return address below the stack frame And call system
  • 27. Calling system. Is anybody home? Gadget address used to call system Type of command that corresponds to the TK_set_deviceModel_req_handle function The function that sends the command through the cloud • The main binary will crash after the command is executed and the camera will restart. To achieve persistence we’ll append the commands to the camera’s startup script @ /mnt/mtd/startapp • Tested against GZ251W, firmware version 0.5.1.4. Other models may be affected
  • 28. More RCE: command injection • GZ180 supports remote upgrade • The function takes 2 parameters: firmware version and download location • The firmware version will be concatenated to tar as an argument and then executed through the system command • The download location needs to be accessible (not valid) • Camera firmware will remain unaffected since there’s no valid upgrade and its workflow will continue uninterrupted but it won’t accept another upgrade command until reboot • Requires Device UID and password (obtained before)
  • 29. More RCE: command injection
  • 30. Demo
  • 31.
  • 33. Bonus AWS bucket access • The camera records short videos when the motion detection system is triggered and the camera is armed • Recordings are uploaded to an AWS bucket named motion-detection • One key pair is used for all cameras: AWSAccessKeyId and SecretAccessKey, retrievable from the device firmware • => full read/write access to the AWS bucket • + directory index
  • 34. To sum up • Based on the initial UID an attacker can receive full info, including device ID for all the cameras associated with that account • The initial UID is fully predictable • Full account takeover • Invites -> snooping without the owner’s knowledge • “just view the stream” • Multiple RCE
  • 35. Takeaways • IoT is a huge attack surface and is growing insanely fast • Leverage cloud communication to bypass NAT • Vendors need to • Pentest their product periodically. Thoroughly • Run bug bounty programs • Have proper and unattended update mechanisms • It’s still trivial to find RCEs in IoT and it seems this won’t change any time soon. More of the security research community needs to focus on this
  • 36. (dis)honorable mention • So far, we published only a fraction of our research, due to potential legal issues • It’s easier to go after a relatively big company than an independent researcher • This is easy stuff. If you’re an independent researcher you can do A LOT more to expose and get these types of vulns fixed. And you should. • We’ll be happy to help. Feel free to reach out.