IoT Security: Backdooring a smart camera by creating a malicious firmware upgrade

  Рет қаралды 268,387

stacksmashing

stacksmashing

4 жыл бұрын

In this video we look at reverse engineering a basic firmware format of a commonly found IoT camera - and then creating a backdoored firmware that calls back to our command & control server and allows us to remotely control it!
Camera in the video: Wyze Cam v2
Scripts from the video: github.com/ghidraninja/wyze_s...
A lot more information on the hardware and software, as well as an awesome custom firmware can be found here: github.com/EliasKotlyar/Xiaom...

Пікірлер: 305
@moth.monster
@moth.monster 4 жыл бұрын
Remember kids. The S in IoT stands for security.
@woodie07
@woodie07 4 жыл бұрын
eri bUt ThErE iS nO s In IoT
@AndreasDelleske
@AndreasDelleske 4 жыл бұрын
eri and the R for reliability, M for maintenance, U for upgradeability.
@hernancoronel
@hernancoronel 4 жыл бұрын
Ok deploy my IOTs please! :-)
@dk14929
@dk14929 4 жыл бұрын
@@AndreasDelleske sounds like you'd prefer some RUM
@McDonnerbogen
@McDonnerbogen 4 жыл бұрын
Well when you flash your own firmware to add security vulnerables...
@4g3v
@4g3v 4 жыл бұрын
Take a look at the access log of your server :)
@stacksmashing
@stacksmashing 4 жыл бұрын
"GET /Awesome_video_dude_Keep_up_the_great_work Hah, love it! Thanks man!
@4g3v
@4g3v 4 жыл бұрын
@@stacksmashing awesome that the message got to you :) Really enjoyed the video. Hope you have some more planned ^^
@meh.7539
@meh.7539 4 жыл бұрын
/slow clap.
@sadface
@sadface 4 жыл бұрын
haha thats awesome
@coler154
@coler154 3 жыл бұрын
@xOr Vega sent a GET request to his server saying "/Awesome_video_dude_Keep_up_the_great_work"
@woodie07
@woodie07 4 жыл бұрын
The 19 dislikes are smart camera manufacturers
@fivethreeone2132
@fivethreeone2132 3 жыл бұрын
the 20 dislikes are fucking bots
@prakharmishra3000
@prakharmishra3000 3 жыл бұрын
@@fivethreeone2132 stop blaming everything on bots probably lol, maybe people tap on it by mistake. Happenes to me sometimes too.
@wishihadablog
@wishihadablog 3 жыл бұрын
The 75 people only like cat videos
@DerrickJolicoeur
@DerrickJolicoeur 4 жыл бұрын
This is EXACTLY what I was looking for when I bought this camera. I hate that the default firmware doesn't allow video streaming via the Wise app without an internet connection [via LAN]. So finally I have a means to circumvent their servers while still attaining live video footage. We don't need to see the baby-monitors when we're out of the house.
@williamwatkins6669
@williamwatkins6669 4 жыл бұрын
Through all the video I was like '' ok that's very theoretical, how would you install the firmware in real life's and the you gave the example at the last second and my blood turned cold 😱
@maddoggLP
@maddoggLP 4 жыл бұрын
same for me haha
@nolangelinas3566
@nolangelinas3566 2 жыл бұрын
@@mshthn It would be perfect for a semi-targettted attack on someone by simply selling them a camera on ebay. You could just set up an ebay account that sell compromised cameras and no one would figure it out unless you sell one to an IT guy.
@nastysdsi
@nastysdsi 4 жыл бұрын
So if you buy one of these used, you should flash the official firmware. Apart from that, not restricting firmware flashing is not a big deal, since flashing it requires physical access to the camera anyway, and having the ability to flash a custom firmware means one can make custom security updates after the camera is discontinued and no longer receives official updates.
@DerrickJolicoeur
@DerrickJolicoeur 4 жыл бұрын
And hope that a return doesn't get repacked as new
@robk5969
@robk5969 4 жыл бұрын
" not restricting firmware flashing is not a big deal" if this was the only way to install firmware, that might be true, BUT, it can also be upgraded remotely, without touching the camera. i dont know if that has any extra security or not.
@statinskill
@statinskill 4 жыл бұрын
It's a big deal because I can tamper with that camera and then sell it on ebay. Then as luck will have it that camera winds up somewhere important.
@thilotech3457
@thilotech3457 4 жыл бұрын
@@statinskill but then the app won't work anymore.
@motsgar
@motsgar 4 жыл бұрын
@@statinskill also because now it is in the local network, any other not so secure home device can be hacked
@rakeshchowdhury202
@rakeshchowdhury202 4 жыл бұрын
Exactly what I was searching for, a well detailed CCTV firmware reversing tutorial. Hey Ninja, I really like your work and your way of explanation, Please Upload more videos, please make it a bit frequent like 1v/month.
@INTJames
@INTJames 4 жыл бұрын
That was a lot easier than it should've been lol..
@nullpwn
@nullpwn 4 жыл бұрын
That was so easy to watch and learn, no extra and unnecessary steps, no stupids and distractive ads. simple and awesome iot exploit. Keep up the good work
@popcorny007
@popcorny007 4 жыл бұрын
Really fantastic video, well done. Your explanations and visuals are easy to follow, and we can all tell that you have a good understanding of what you're doing.
@matteog7579
@matteog7579 4 жыл бұрын
Awesome video! Exactly the type of hands-on example I love to see/learn from.
@jacobyoung6876
@jacobyoung6876 3 жыл бұрын
Wow this was really interesting to see a demonstration by someone willing to explain the thinking process along the way. This is very inspiring!
@AlmightyGauss
@AlmightyGauss 4 жыл бұрын
It's good to see this channel is still alive, I love your content! Thank you for sharing your knowledge, hope to see more updates in the future
@EnWeee
@EnWeee 4 жыл бұрын
Great to see you back. Hope you'll post more videos.
@EtienneLouw
@EtienneLouw 3 жыл бұрын
Found your channel watching the new Game and Watch hacks and enjoying the content library, this video was awesome to watch and might try to do this myself on my own Wyze cam.
@redpillcommando
@redpillcommando 4 жыл бұрын
Ghidra Ninja - It's been a while. I love your work and want to see more. Thanks of the video.
@AndrewMcOlash
@AndrewMcOlash 4 жыл бұрын
Great job on this! I actually have one of these hacked cameras to use a security cam (but keep it off of the wyze network). Crazy how simple it is to hack the firmware and can't wait to see more. Might be time for me to start hacking some of my IoT devices. Makes me a bit nervous of how vulnerable my network might be though!
@ashishpatel350
@ashishpatel350 4 жыл бұрын
I would back up your channel on another platform like Bitchute or library. KZbin has been deleting channels like yours.
@origamitaco
@origamitaco 2 жыл бұрын
I was able to get into a Faleemi outdoor camera with this exact same method (except they have an option to only update the rootfs so I only needed to repack the squash file with no UBoot header). Works like a charm, and with telnet/wget I can update my camera remotely with my custom firmware. Thank you so much for my first IoT hack! I was also able to get a UART terminal to it on the hardware side.
@user-oj7hf2qc9u
@user-oj7hf2qc9u 3 жыл бұрын
i just found your content yesterday, and I am HOOKED. Keep up the awesome work :)
@d1v1ne312
@d1v1ne312 4 жыл бұрын
I really liked the style of this video, because it was "just right" for the knowledge I have. You explained it very well and with not too much or too less informations. thx!
@cocosloan3748
@cocosloan3748 4 жыл бұрын
Yeah-the level of knowledge we have is much lower then we think we have!.Try explaining this to someone or to replicate it..You will need to watch this video 100 times over :)
@FunnyPantsTV124
@FunnyPantsTV124 2 жыл бұрын
I loved this video! i plan on picking up a camera to play around with myself! Im glad I'm not the only one who thought "what if it has been backdoored and returned to the wild" you're a legend man!
@mhmek7324
@mhmek7324 4 жыл бұрын
Really good video with good explanations! Love it dude! Keep up the good work!
@neilyoung6671
@neilyoung6671 3 жыл бұрын
A German Engineer. Nothing more to say :) Ah, wait. A German Reverse Engineer :)) Well done.
@theleopards4198
@theleopards4198 4 жыл бұрын
Amazing to see you back.Loved the video
@alexscarbro796
@alexscarbro796 3 жыл бұрын
What an fantastic video! Excellent content and perfect pace.
@patrickm9953
@patrickm9953 3 жыл бұрын
Great tutorial, lots of new utilities I have never heard of before
@chadiusmaximus9350
@chadiusmaximus9350 4 жыл бұрын
Awesome. I actually have one of these sitting around.
@erinkourelis7430
@erinkourelis7430 8 ай бұрын
We’ve only had the cameras up and running for a short time. kzbin.infoUgkxOXxsTZ3ptV_Pk0fFl8bNZvVqeoqBQFwe So far we love them! I got the outdoor mounting kit for them and they were easy to install. Once you download the app, it walks you through the very easy set up. The clarity, and range is awesome. I am thinking seriously about adding another camera or two to my 3 camera system. The price is lower than a lot of comparable systems.
@BroodPitt
@BroodPitt 4 жыл бұрын
Welcome Back! Finally a new video! 🙌
@BrandonHall916
@BrandonHall916 4 жыл бұрын
Such a great video! Very informational
@PyPylia
@PyPylia 4 жыл бұрын
Can we quickly laugh at how stupid their way of stopping telnetd is? Instead of uninstalling it and or removing it from the rcS file, instead, they just kill it (And not even stop the service, just use killall.)
@Acorn_Anomaly
@Acorn_Anomaly 3 жыл бұрын
Based on where the killall is from, I'm guessing the telnetd was a backup access point for testing. If the camera starts up, but can't load the camera app for some reason, it won't kill the telnet daemon, and they can log in to figure out what broke.
@ArnaudMEURET
@ArnaudMEURET 3 жыл бұрын
@@Acorn_Anomaly Shouldn’t make it into prod FW though
@Acorn_Anomaly
@Acorn_Anomaly 3 жыл бұрын
@@ArnaudMEURET No, but taking advantage of it in this instance would still require either an already compromised or non-functioning device. There have been worse backdoor incidents. Ideally, they'd have removed it or disabled it, but after they had an already working image, they may not have wanted to mess around too much with it, especially since, as I said above, taking advantage of that isn't generally achievable remotely.
@MygenteTV
@MygenteTV 2 жыл бұрын
maybe is used for support from the company
@RobertHallIV
@RobertHallIV 2 жыл бұрын
me thinks they be lazy
@jmchichstudio9145
@jmchichstudio9145 2 жыл бұрын
Thanks for the tip! Gonna try and modify an init script, pack the squashfs and update the camera. Should be similar to your model
@harshitjoshi3082
@harshitjoshi3082 4 жыл бұрын
You should make more such videos, you have the potential to grow your channel
@CyReVolt
@CyReVolt 4 жыл бұрын
This is awesome, I can perfectly use tooling such as jefferson right now for firmware modification. To split up flash image partitions, I am simply using dd though and cat things together again. Edit: Since it looks like jefferson is for extraction only, I'll stick with mounting the rootfs through the mtd + jffs2 kernel modules, which is a bit of work and annoyance, but solved. =) I will still keep jefferson in mind for extraction-only/analysis use-cases though, makes sense also to have something portable. Thank you!
@youssefabdelkhalek2499
@youssefabdelkhalek2499 2 жыл бұрын
Your videos are amazing, please never stop posting videos, I am now a student of yours.
@ChrisWhalen00
@ChrisWhalen00 3 жыл бұрын
Great note about zero padding the modified filesystem image before you bundle it to keep it the same size as the original!
@attilapal3786
@attilapal3786 3 жыл бұрын
very cool i have always been thinking about repacking modified firmwares
@somehow_sane
@somehow_sane 4 жыл бұрын
Awesome Video! Keep up the good work!
@nrdesign1991
@nrdesign1991 3 жыл бұрын
interesting to see the miio client on there, same thing is running on my vacuum. Thanks for the very informative video
@More_Row
@More_Row 4 жыл бұрын
Welcome back-
@colfaxschuyler3675
@colfaxschuyler3675 2 жыл бұрын
No doubt, you've already had countless people recommending the Wyze Cam V3. The low light image capability seems very good. What it doesn't have is RTSP, and Wyze doesn't seem very anxious to provide that capability. But it's a swell cam.
@minecraftzombie4120
@minecraftzombie4120 4 жыл бұрын
Great content bro 👍😀
@stevecross9159
@stevecross9159 3 жыл бұрын
From the UK 🇬🇧. Great stuff
@seba123321
@seba123321 3 жыл бұрын
Thank you that knowledge!
@rogerf3622
@rogerf3622 3 жыл бұрын
This could all be avoided if the customer had all cameras on their own network (vLAN) with no internet access and no access to the main network. But this was a very informative detailed video.
@fabiorj2008
@fabiorj2008 2 жыл бұрын
This video is AMAZING. Thx
@i_am_dumb1070
@i_am_dumb1070 2 ай бұрын
Learned a lot thanks 👍🙏
@nsns7993
@nsns7993 2 жыл бұрын
Amazing vid!
@njnicho
@njnicho 4 жыл бұрын
Dude! Amazing!
@MinhNguyen-kv2mz
@MinhNguyen-kv2mz 4 жыл бұрын
Amazing video :) Please make more
@mohamedisaac924
@mohamedisaac924 3 жыл бұрын
dude this channel teach a lot better youtube channel easy tips and learn everyday
@leonardo9259
@leonardo9259 3 жыл бұрын
I'm taking some courses in IOT, I still can't understand everything here but I'm enjoying it a lot
@JLK89
@JLK89 4 жыл бұрын
Awesome video!
@TheSurvivor4
@TheSurvivor4 3 жыл бұрын
Amazing video. I love the "hack" where you get it into ram where there was more space. I was just wondering though: The need to store the extra binary was to get the reverse shell, but if bash was there, could you then use that instead? I do really like you went the NC way, because I learned a lot about what to do if the situation arose. Amazing!
@mikeydk
@mikeydk 4 жыл бұрын
Might have to get a few of those cams now :D
@neoXXquick
@neoXXquick 4 жыл бұрын
Amazing video...
@ricardojlrufino
@ricardojlrufino 2 жыл бұрын
Very good Job. I liked reverse Shell using netcat , i'm using reverse ssh , bit this is more easy
@ramondunker4981
@ramondunker4981 3 жыл бұрын
Awesome video 😍
@niklasgs1470
@niklasgs1470 2 жыл бұрын
This is so cool!
@HenryTonoyan
@HenryTonoyan 3 жыл бұрын
I'm going to start checking the firmware on every device I buy from now on. On the plus side it will keep me from buying too many things :D.
@karubabu
@karubabu 4 жыл бұрын
finally !YAY
@GnobarEl
@GnobarEl 4 жыл бұрын
I love your videos!
@DrDre001
@DrDre001 4 жыл бұрын
Heck ya new vid
@cocosloan3748
@cocosloan3748 4 жыл бұрын
Wow...Just wow!
@RawApeFromAlbion
@RawApeFromAlbion 3 ай бұрын
Awesome video
@xtdycxtfuv9353
@xtdycxtfuv9353 4 жыл бұрын
hey i love you. this was a fun video to watch
@Rafacz
@Rafacz 4 жыл бұрын
T.Hanks We need more videos xD
@deppy2165
@deppy2165 4 жыл бұрын
This was really interesting, do you have any plans on uploading more IOT videos?
@ciaobello1261
@ciaobello1261 4 жыл бұрын
cool video..👍👍👍
@wawied7881
@wawied7881 4 жыл бұрын
Nice video, keep up the good work! But are you planning on uploading more regularly? And do you have any plans in doing more Ghidra related videos?
@NGHVEVO
@NGHVEVO 3 жыл бұрын
Great job :)
@AmnesiaPhotography
@AmnesiaPhotography 3 жыл бұрын
The oh s*** moment at the end... love it
@KF4IXM_Mike
@KF4IXM_Mike 3 жыл бұрын
Would this work on the newer v3's? Awesome video and explanation. I'm looking to set one up as a weather webcam for weather underground.
@drozcan
@drozcan 4 жыл бұрын
15:50 Thanks for the advice :)
@desubakadesu
@desubakadesu 4 жыл бұрын
12:50 *
@edgeeffect
@edgeeffect 3 жыл бұрын
That's the best KZbin sponsorship I've ever seen.... "this video is sponsored by ME" ;)
@foosabraun2461
@foosabraun2461 4 жыл бұрын
Yay! :)
@soulife8383
@soulife8383 3 жыл бұрын
It's been a few years, but I believe I used to use squashfs as the system image on the good ol' T-Mobile G1 (HTC Dream), the first Android device. But I thought it wasn't read-only once mounted as I used to manipulate the system partition all the time... I may be mistaken tho, that was 2009
@Laflamablanca969
@Laflamablanca969 4 жыл бұрын
Whoever disliked this is either an idiot or they accidentally clicked the wrong button. Great video man and it would be good to see more videos like this that give us novices guidance in exploiting devices. It’s also good that you’ve shown it with a device we have access too, so yeh much appreciated 👍
@userPrehistoricman
@userPrehistoricman 4 жыл бұрын
Or they wanted to see disassembly and Ghidra.
@juancarlosmartinezhernande7777
@juancarlosmartinezhernande7777 Жыл бұрын
Awesome video very usefull =)
@MrGTAfan93
@MrGTAfan93 4 жыл бұрын
Once i backdoored my neighbour's security cam. He was backdooring his wife...
@cocosloan3748
@cocosloan3748 4 жыл бұрын
Now you are "backdooring" us? (lying)
@rocco0x415
@rocco0x415 4 жыл бұрын
@@cocosloan3748 boomer
@crystalsheep1434
@crystalsheep1434 Жыл бұрын
Nice video
@keganpowers3430
@keganpowers3430 2 жыл бұрын
Doom on a wyze camera can't wait to see that
@heycherry100
@heycherry100 4 жыл бұрын
a good video after another and another and another ... good job! Open a patreon if you need a little motivation to upload more frequently. I would sign up just like I'm on the LiveOverflow patreon...
@p0isN
@p0isN 4 жыл бұрын
"shameless plug", not sure why but I laughed my ass off at that haha
@AlexMarkessinis
@AlexMarkessinis 3 жыл бұрын
Great video! Is there a way to repack the JFS2 directory like you did with the squashfs folders? I took a look at jefferson but the docs only mention the ability to extract.
@Wythaneye
@Wythaneye 3 жыл бұрын
You can re-pack the JFFS2 filesystem by using mkfs.jffs2. The problem I'm running into is that the repacked filesystem (no modification) is larger than the original so my offsets are wrong when I go to re-pack the bin file. I'm not terribly skilled in Python so I'm trying to figure out how to mod the wyze_extractor script to build the image properly using a modified JFFS2 filesystem. Hopefully I'll be able to post my fixes here, as I'm working on a mod for my own purposes.
@phontric
@phontric 4 жыл бұрын
Can you do one similar reverse engineering on a Huawei 4G dongle , that could be a nice tutorial
@nicoladellino8124
@nicoladellino8124 3 жыл бұрын
👏👏👏
@statinskill
@statinskill 4 жыл бұрын
Another thing to do is to engineer a completely new board for that camera. One that runs the original firmware, except on the SOC there is another hidden core that taps into the wifi and the camera sensor. Perhaps even add one of those very interesting radios I read about the other day, and exfiltrate images from up to 7Km away. Now not everybody can afford a santa's work shop where all kinds of nifty things are made, such as certain upgrades for routers and the like, but it is still food for thought. The added benefit is you could leave the manufacturer provided backdoors dormant, perhaps add a feature to disable them remotely.
@guajilote2464
@guajilote2464 Жыл бұрын
I think u r reefering to LORA. Gupta doordan is around the neighborhood, fyi
@statinskill
@statinskill Жыл бұрын
@@guajilote2464 Nope. Definitely not LORA. LORA would be for short tactical messages but obviously not for audio and video streams.
@MygenteTV
@MygenteTV 2 жыл бұрын
man, you are a genius. i can only wish to know a half of a half of what you know. can you do some alexa hacking? my brother in law have one and i would love to do some pranks to him
@greatsaid5271
@greatsaid5271 4 жыл бұрын
nice
@alexluzinki206
@alexluzinki206 3 жыл бұрын
great.
@MiniArts159
@MiniArts159 3 жыл бұрын
I had a friend whose mom purchased a cheap Walmart IoT camera. This camera has two-way communication features and makes an alert when the owner rings in. One time it made the alert sound but no audio on the other end. They literally believed it was caused by ghosts as the camera ". . . doesn't connect to the internet, it goes through my mom's phone."
@NortelGeek
@NortelGeek 3 жыл бұрын
Thank you for this video. Tell me, please, is it possible to edit files within a SBN (signed binary) file and then repack with this method? I can open the archive and see the files inside but I'm not sure how to repack it.
@halbkorn6350
@halbkorn6350 4 жыл бұрын
bin mir absolut sicher, dass du aus dem deutschsprachigem raum bist. dieser akzent ist so einzigartig hahah :D
@stacksmashing
@stacksmashing 4 жыл бұрын
Ich nix verstehen😇
@halbkorn6350
@halbkorn6350 4 жыл бұрын
@@stacksmashing i thought your mother language is german. you sound like a german person is speaking english haha
@stacksmashing
@stacksmashing 4 жыл бұрын
War ein Witz, ich bin Deutsch :)
@halbkorn6350
@halbkorn6350 4 жыл бұрын
@@stacksmashing (x
@michaeldai1999
@michaeldai1999 4 жыл бұрын
more like we hope to see YOU soon on this channel again. Whatever happened to wannacry part 2?
@stacksmashing
@stacksmashing 4 жыл бұрын
Honestly: started it, found that without a debugger it really doesn’t make sense in parts, so hoping for the debugger release :)
@michaeldai1999
@michaeldai1999 4 жыл бұрын
@@stacksmashing does it uses something like mutable code or something like that? Is that why something like simple ollydbg or x64dbg won't work?
@zsoltsator5433
@zsoltsator5433 4 жыл бұрын
Would you please help a noob (little knowledge in navigation with Linux) how to check if any suspicious activity is going on on the devices (CCTV) - for instance how to check if any of the cameras or devices connected in my network having connections established outside of my network? How do I distinguish if the connection is due to cloud functionality (aka mobile access) or due to a malicious SW running in background. Thanks to every comment on this.
@superb7319
@superb7319 4 жыл бұрын
Subbed ;)
@TheStiepen
@TheStiepen 3 жыл бұрын
Generally speaking I do believe systems should allow users to load arbitrary firmware. Just OTA updates should be signed or at least loaded via TLS
@speedyboi9755
@speedyboi9755 4 жыл бұрын
The end was real scary
IoT Hacking - Polycom Conference Phone - Firmware Extraction
33:53
Radio Hacking: Cars, Hardware, and more! - Samy Kamkar - AppSec California 2016
51:12
LA FINE 😂😂😂 @arnaldomangini
00:26
Giuseppe Barbuto
Рет қаралды 20 МЛН
ВИРУСНЫЕ ВИДЕО / Мусорка 😂
00:34
Светлый Voiceover
Рет қаралды 8 МЛН
Which one will take more 😉
00:27
Polar
Рет қаралды 48 МЛН
Extracting Firmware from Embedded Devices (SPI NOR Flash) ⚡
18:41
Flashback Team
Рет қаралды 483 М.
Flash Neos or Wyze Camera with Custom Dafang Firmware - Tutorial
7:31
Will Surridge Tech
Рет қаралды 31 М.
How the Apple AirTags were hacked
8:38
stacksmashing
Рет қаралды 1,6 МЛН
everything is open source if you can reverse engineer (try it RIGHT NOW!)
13:56
Low Level Learning
Рет қаралды 1,2 МЛН
Building a Budget DIY Home Surveillance System
38:33
Hardware Haven
Рет қаралды 143 М.
Intro to Hardware Reversing: Finding a UART and getting a shell
12:07
Tony Gambacorta
Рет қаралды 869 М.
Hack everything: re-purposing everyday devices - Matt Evans
50:39
Linux.conf.au 2012 -- Ballarat, Australia
Рет қаралды 795 М.
Introduction to Firmware Reversing
11:32
Tony Gambacorta
Рет қаралды 298 М.
С Какой Высоты Разобьётся NOKIA3310 ?!😳
0:43
Я Создал Новый Айфон!
0:59
FLV
Рет қаралды 1,8 МЛН
Что если бы Apple делала зубные щётки?
0:59
Start from 0 at any point on the T1 Digital Tape Measure
0:14
REEKON Tools
Рет қаралды 22 МЛН
Эволюция телефонов!
0:30
ТРЕНДИ ШОРТС
Рет қаралды 1,7 МЛН