start	end	text
0	4000	So good morning and welcome. I know this is kind of early Sunday morning, so I really
4000	7760	appreciate you guys all being here. Today we're going to be talking about hacking and
7760	14160	implanting a drop cam. So we both work at the R&D team at Cinec. Cinec does crowdsource
14160	19020	vulnerability discovery with vetted security researchers. My name is Patrick Wardle. I've
19020	24640	worked at various acronymed places, but currently I'm the director of research at Cinec.
25380	29980	And I'm Colby Moore. I formerly worked at VRL and currently work at Cinec as a security
29980	36540	research engineer. More like a security ninja, I think. All right. So what are we going to
36540	42600	talk about today? First, a brief overview of drop cam. Then how we got a root shell on the
42600	47700	device. Following that, we're going to talk about some vulnerabilities that we found. And
47700	55340	then finally, we want to present a persistent implant that we designed for drop cam. So first
55340	58780	let's talk a little bit, give a little bit of an overview, talk about some background
58780	64920	information, talk about what drop cam is. Before jumping in, though, I always think it's a
64920	69800	good idea to concisely define any possible ambiguous terms, especially since we're in
69800	74500	Vegas, so there could be some confusion. So in the talk, when we talk about implants, we're
74500	81380	talking about persistent code that is malicious. Hooking means intercepting function calls,
81380	88400	usually by installing a hook or a detour. A Trojan is a malicious piece of software that
88400	93600	pretends to be something legitimate. Injection is all about getting code into a remote
93600	100740	process. And finally, a backdoor is some code that provides, you know, undetected remote
100740	103940	control of the device. Now, it's a little sad when I hear these terms. I actually now think
103940	108860	of the computer term first. But my wife likes that, so I guess that's the silver lining
108860	115280	there. So what is a drop cam? Well, as you can see from their definition, it's a cloud-based
115280	120500	video Wi-Fi solution. And at the core of it is the camera, the actual drop cam device. So
120500	124360	besides an incredible simple set-up process, it's got some cool features, such as cloud
124360	131660	recording, night vision, two-way talk and intelligent alerts. Now, one of the main appeals
131660	136460	of drop cam is its trivial set-up process. Really all the camera needs to get set up is the
136460	141940	name or SSID and password of your wireless network. Now, there's two ways to do this. This
141940	146980	configuration can be done by either plugging the camera into the computer via USB or with a
146980	151240	smartphone that has Bluetooth. Now, once the set-up is complete, the camera will be
151240	155520	connected to the Wi-Fi network. From then on, it's pretty much fully autonomous. You really
155520	159300	don't have to worry about it anymore. It's going to stream audio and video to the cloud and
159300	166240	beacon to the drop cam servers for updates on a regular basis. So there's a lot of IP-based
166240	169200	video solutions out there. So what's special about drop cam? Why did we choose to go after
169200	175120	it? Well, now drop cam is owned by Google. And Google has indicated it will become the core of
175120	178460	their push into the connected home. So in other words, soon there's going to be drop cams
178460	183060	everywhere. Now, when we started this research, we didn't know that Google would buy drop cam.
183060	186900	If we had, we probably would have tried to get hired there, get some equity. But it was still a
186900	191620	pretty appealing target. For one, it's really popular. You see all over the Bay Area, it's a
191620	196060	best-selling device on Amazon. Secondly, it shows up in interesting places like homes and
196060	200200	offices. Again, the Bay Area, all the start-ups pretty much use drop cams for their security
200200	205820	solutions. So good target in that point of view. And finally, it's kind of a juicy target
205820	209080	because it has some really cool capabilities that, you know, we thought were pretty
209080	213900	powerful and were just begging to be abused. Now Colby is going to talk about routing a
213900	219860	drop cam. So based on the network footprint, we figured taking a hardware approach would be
219860	225440	best. So naturally the first thing to do was crack the camera open. Conveniently, drop cam
225440	232180	left us this mysterious header right here. Probing around revealed what looked like a 3.3
232180	238100	volt UART on there. So we hooked it up to the FTDI to serial to USB connector that you guys
238100	243400	are all familiar with. And here's a little photo showing our ground connection and
243400	249520	transmit and receive on pins 3 and 4, respectively, if you guys want to try this at home. So
249520	254120	after a quick reboot, we have a serial console and major credit to drop cam for the sweet
254120	259800	ASCII art right there. We wrote a serial brute forcer to try admin, admin, admin password,
259800	265300	all the standards, but really no luck. So at this point we should probably mention the
265300	269420	drop cam is running essentially just Linux. It's a miniature computer. It's running a Linux
269420	275220	system on chip from a company called Ambarella based in the Santa Clara Bay area. And so,
275220	281300	you know, we figured we'd take more of a Linux approach to maybe getting root in this box. So
281300	286140	we decided to go after the boot loader. So if you hold enter on power on or you short the
286140	290620	transmit and receive lines and power on the device, it should drop you to the boot loader.
290620	297340	Now, this is Ambarella's custom boot loader. Now, looking at the boot loader, we got a
297340	301960	couple options here. The set EMV one looked pretty promising. And it looks like there's an
301960	306700	option to change the boot parameters. So we went ahead and just like, you know, root in a
306700	310000	standard Linux box that you have physical access to, we went ahead and changed the parameter
310000	320480	to slash bin slash SH and hope it drops us to a root shell. And yeah, that worked. So now we
320480	324740	got to get rid of that password so we can get on the system, right? So we checked out
324740	329820	Etsy shadow and it wouldn't open. So it looks like it was SIM linked to mount drop cam
329820	334980	shadow. So we checked out Etsy F stab and it gave us the necessary information we needed to
334980	339980	mount up that share. So we went ahead and mounted it up and now we have access to the
339980	345180	shadow file. I went ahead and just knocked out that hash and saved. Went ahead and
345180	350480	rebooted and reset the boot parameters in the boot loader and rebooted, boom, we have a
350480	356000	full-featured root shell on the device. So there's some other research done
357020	360820	previously and they really didn't find any vulnerabilities in the drop cam but we tend to
360900	365060	have a little bit of a different opinion. So we're going to talk a little bit about the
365060	369560	vulnerabilities that we found. So first let's talk about the environment. Since we have a
369560	374700	root shell we can now poke around and explore. The drop cam is running ARM 32 bit Linux
374700	379840	custom distribution and the heart of the drop cam is this connect executable. We're going to
379840	384840	talk about that a lot later. They also left all sorts of goodies on the device for us, you
384840	394400	know, drop bear, FTP, Telnet, GDB server, you know, thanks guys. So overall the drop cam is
394400	398940	decently secure. There were no open ports or exposed network services. All
398940	404440	communications were SSLed properly. And the drop cam employs device specific
404440	408120	provisioning from the factory. That's likely why we couldn't crack the root password
408120	413140	because each device has its own unique password. It also employs automatic updates. It
413140	416080	beacons out regularly and checks drop cam for updates and they're pushed down and the
416080	422340	whole device is reflashed. So it's pretty robust in that sense. But let's take a look at the
422340	428280	first bug. The camera is using open SSL for comms to drop cam servers. But it's running an
428280	434020	old version of open SSL so it's vulnerable to heart bleed. So what can we do with that?
435540	440180	Drop cam says our cameras won't communicate with anyone on the Internet, only drop cam's
440180	444920	cloud servers. But that's not really true. If we spoof DNS responses and trigger a client
444920	448840	side heart bleed attack, we're able to download the camera's private and public SSL keys
448840	454860	among other system information. So realistically now that we have these keys, what can we
454860	460400	do? Normally the drop cam talks to the cloud via SSL and then you use your devices to view
460400	464480	the video from the cloud. But you should note that it authenticates using the very same
464480	470280	certificates that we stole. So a hacker with these certs could spoof a drop cam video feed
470840	475840	providing false video to the cloud DVR. So should a user really trust what they're seeing?
476720	480280	For the record, we notified drop cam of this heart bleed bug and they patched it fairly
480280	484780	recently. However, they haven't rotated the camera's certificates so if anybody happened
484780	490480	to have a bucket full of these certificates, we don't. There's nothing the consumer can
490480	497540	really do at this point. So then for most of its functionality, drop cam runs busy box. But
497540	502700	unfortunately the version is outdated and vulnerable. Basically it's an old bug that
502700	508080	allows command injection via malicious DFCP response. So a user is able to inject commands
508080	513340	via the host name parameter and they get propagated into the system host name. This is
513340	519340	really only triggered if the host name is used by another utility. But we checked out the
520140	523420	vulnerable source code and compared it to the disassembly from drop cam and it
523420	528340	definitely matches. So we weren't able to trigger this bug right now because drop cam isn't
528340	531560	using the host name in a way that would trigger this, but it could come back to bite them
531560	538380	later. So all those bugs are pretty cool, but we had to open up the camera. So wouldn't it be
538380	543600	nice if we could implant the device without opening it up? Luckily there's an app for that.
545080	549160	It's called direct USB and we found a copy somewhere in the dark corners of the internet,
549160	554380	specifically Russia. If you hold down the button on the back of the camera, the button that
554380	558960	drop cam swears does nothing according to official docs, and you hold it down while you're
558960	562820	powering the camera on, it enters a firmware update mode. And we believe this is how the
562820	567200	devices are provisioned at the factory. When we questioned drop cam about this, they didn't
567200	571460	deny it. Ultimately we were able to read and write unsigned data to the camera. So
571460	575000	realistically an attacker could walk into the home, plug into a drop cam, reflash with
575000	582060	malicious software in minutes. And back to Patrick. So there's more to drop cam than just
582060	585680	the software that runs on the camera. So recall that a user may use their computer to
585680	590800	initially configure the device. So to do this, the camera is plugged into the computer and
590800	595100	then it mounts part of the camera as a share, which contains the setup utility. This
595100	599960	utility, which requests root privileges to run, gets the SSID and password of the Wi-Fi
599960	603940	network and then propagates that back to the camera. The end result is a connected and
603940	609820	configured camera. Unfortunately, this application which runs at root is world
609820	614980	writable. So in a proof of concept, a non-privileged host-based attacker can wait until
614980	621200	any drop cam is plugged in. They can then inject a malicious payload into the mounted drop
621200	627120	cam setup utility. Now when the application is run and elevated, so is the attacker's code.
627960	632780	Now the Windows installer setup configuration utility has a similar privilege escalation
632780	636700	vulnerability as well. Drop cam is still patching that so we can't go into details at this
636700	642320	time. Now as Colby mentioned, the CEO of drop cam said that their cameras only talk to
642320	646860	drop cam servers, which discounting things like Heartbleed is pretty much true. However,
646860	652520	the same cannot be said for their iOS application. Now SSL pinning is an extra layer of
652520	656360	security that ensures the client will only communicate with a well-defined set of
656360	661800	servers. Now since the drop cam iOS application does not use SSL pinning, a man in the
661800	668020	middle attack can occur. So if an attacker has a compromised root certificate or can coerce
668020	672480	the user to install a certificate, for example, sending them an email, the connection can be
672480	678260	man in the middle. So here we have a burp capture showing a man in the middle attack in
678260	682220	action actually against my own phone, which is non-jailbroken. It reveals a username and
682220	687160	password for a drop cam account. Now since drop cam does not use dual factor
687160	691920	authentication or any shared or duplicate session alerts, an attacker with these
691920	696900	credentials can persistently and surreptitiously spy on the user at any time. Now this is
696900	705550	really good for the bad guys, not good for the rest of us. So now that we have a good
705550	709950	way to implant the camera, let's have some fun. Introducing our full featured implant,
709950	718430	cuckoo's egg. For those who are unaware, the cuckoo lays its egg in other nests. See how many
718430	722890	you guys get it. Given the robust capability of the drop cam, our malicious software
722890	728510	should. C, we want to be able to intercept video. Here, we want to hot mic a room.
729170	732490	Propagate, we want to infect other hosts when they connect to the drop cam or it's plugged
732490	736570	in. We want to be able to geolocate the drop cam, so if we send a bunch out in the wild, we
736570	740090	know where they ended up. We want to be able to infill and exfil files in case we need to
740090	744050	upload our new exploit or tool so we can pivot into the network. We want to be able to
744050	748150	drop to a command shell to use our tools. And we want to be able to connect a basic network
748150	753810	survey and a device survey. So conceptually the drop cam will sit on a corporate network
753810	759990	and talk out to the drop cam's cloud. But with our implant, it will also talk out to us. We
759990	765430	also need a method for other devices on the drop cam's network. We also need a method,
765430	778470	sorry. What? Okay. Well, anyway. So our implant even comes with its own slogan. He sees you
778470	782530	when you're sleeping, he knows when you're awake, he knows if you've been bad or good, just
782530	791820	like the NSA JK. So in a real world scenario, how do we install our malicious software? We
791840	795980	don't have remote code execution but there's a lot of options. We can intercept the package
795980	801560	in transit, we could maybe gift a drop cam to somebody that's already been implanted or we
801560	809620	could break and enter and modify it in the house. Realistically that stuff never happens,
809620	815380	right? No further comment. We approached drop cam about this and they were convinced the
815380	819240	adversary wouldn't be able to reshrink the drop cam as nicely as it was done to the factory.
819240	830050	And that alone would be an appropriate anti tamper mechanism. What do you guys think? Now
830050	834370	what about sending one as a gift? Recently a friend's incubator space was broken into. Is it
834370	837910	too far-fetched to think that management might send them security cameras to implement?
838210	844930	Probably not. Is a break in entering scenario really plausible? Maybe. Drop cam's argument
844930	848870	was that you would see an attacker coming. However, only one third of users sign up for drop
848870	853030	cam's cloud recording. Even then, if you just showed up with a Wi-Fi jammer, the camera
853030	857730	doesn't cache any video locally so the video wouldn't get sent to the server. Now what makes
857730	863510	drop cam a good target? The drop cam CEO said all software products are susceptible to jail
863510	866910	breaking. And that's true. We tend to agree with that. But the drop cam really is the low
866910	874720	hanging fruit. Here are the other options. Someone could go after a computer that often has
874720	879140	full disk crypto, boot password and there's no forensic tools. They could go after a printer
879140	883180	but it runs a proprietary operating system. You've got to crack it open. A printer can't see,
883180	887180	can't hear. There's a lot of things it can't do. They could go after a gaming console but
887180	891600	again, it runs sign code and has DRM protection. You've got to crack it open and it's
891600	895580	generally turned off. Or they could go after a mobile phone but it's normally pass locked,
895580	901520	again, runs sign code and it's really off person. So the drop cam, you don't need to open it
901520	907160	up, no boot password, no disk crypto, no sign code, the operating system is open source,
907160	911400	it's always on, has tons of capabilities and who's going to suspect that the security
911400	922750	camera is spying on you. So in order to create an advanced implant, we needed to fully
922750	928050	understand how the drop cam worked. In other words, we had to answer questions such as how
928050	933670	does it hear, see or think? Where is its core logic, the main module of the brain? And
933670	940130	finally, can this be manipulated or rewired? The drop cam has many hardware and software
940130	944030	components. However, these all kind of come together in the connect binary, which I'll be
944030	948310	talking about a lot. This binary is really the brain of the camera as it contains most of the
948310	953550	drop cam specific operations such as talking to the audio and video devices, streaming
953550	957490	content to the cloud and then also handling or executing commands that are received from
957490	965110	drop cam servers. Unfortunately, the connect binary is packed with UPX, which is not
965110	970530	normally a problem. Unfortunately, when we tried to unpack it, it failed. Now, since we
970530	975530	wanted a full unpack, that would make everything easier from debugging to static
975530	981170	analysis, we decided to look into this a little more. Now, the unpacker stub matched the
981170	986670	UPX source code, indicating it wasn't a custom version of UPX. So we figured perhaps the
986670	992490	binary was perhaps modified after the fact in some way to prevent unpacking. Now, I single
992490	996610	stepped through the unpacking stub's instructions and followed along in the UPX source code,
996610	1002390	which was not fun. But this revealed exactly where the unpacking exception occurred. The
1002390	1007610	code was checking a value within the binary's ELF header and then branching into a code path
1007610	1014270	for unpacking shared library. That unfortunately then errored out. Now, connect is a normal
1014270	1018270	ELF executable. It's not a shared library. So I was a little confused why I was taking this
1018270	1023630	code path. So we decided to write a small Python script that simply unset the value in the
1023630	1028310	ELF header that the UPX unpacking code was looking at. Once we did this, we then
1028310	1033250	re-invoked UPX to attempt to unpack the binary and that worked. Connect was fully unpacked
1033250	1037610	and even fully runnable, which is really nice. And actually using the inverse of this
1037610	1041050	technique, so setting that member in the ELF header, we were actually able to create
1041050	1048910	unpackable binaries as well. So I guess thanks to Dropcam for that. So now that we've talked
1048910	1052290	about all these cool capabilities, let's talk about the core of our implant. We wanted to
1052290	1056130	create something simple, portable to other devices and have the ability to leverage
1056130	1061570	third-party libraries. So since we don't have to be too stealthy, Python seemed like a
1061570	1067650	natural choice. We cross-compiled and stripped down Python to reduce the disk footprint. And
1067650	1071710	then Python is then extracted to RAM disk on boot and our implant is kicked off all through
1071710	1081420	an energy script. It's great that we have an implanted camera and all, but how is it going
1081420	1086800	to talk to us? All comms are done over HTTPS and call out through the secure networks
1086800	1091760	firewall. Our command and control and streaming data are sent over separate channels and
1091760	1096840	our CNC server is set up on Amazon AWS infrastructure, the same as Dropcam's. Given the
1096840	1101680	nature of our comms and by putting our CNC server on AWS, it really wouldn't be that easy to
1101680	1106640	tell the difference between our regular Dropcam traffic and our implant by looking at network
1106640	1115240	traffic or even to create appropriate IDS rules. Which connection is legit? What about if we
1115240	1119280	wanted to ship a ton of these cameras out in the wild? How will we know where they end up?
1120160	1125260	Cuckoo's egg runs a camera side Wi-Fi survey and ships it back to the CNC server. The CNC
1125260	1130560	server then sends the survey back to Google's geolocation APIs and returns the device
1130560	1141440	location. Thanks, Google. We also wanted our implant to autonomously propagate to Windows
1141440	1146820	or Mac-based computers. Since we control the camera, we actually control the set-up
1146820	1152480	application as well. So we simply replace it with a malicious implant installer. Now,
1152480	1156940	whenever the user runs the implant or the set-up application, they're actually running the
1156940	1162200	implant installer first. And that's executed with root privileges. We also use a homograph
1162200	1166000	attack so that it's really difficult to actually tell which binary is the malicious one by
1166000	1170740	simply looking at their names. We also made sure to disable the Bluetooth set-up feature
1170740	1176040	so that the user was forced to plug the camera into the computer in order to configure it,
1176040	1181980	which for us ensured that they would then infect their PC or Mac-based computer. So Apple
1181980	1186260	loves to tout their many anti-malware mitigations. However, some of these are trivially
1186260	1191840	bypassed while others can be avoided altogether, which allows our implant to execute freely.
1191840	1195400	It's not detected at all. So if you want some more information, we gave a talk about the
1195400	1200120	stuff at ShakaCon and also released an open source tool that can detect persistent OSX
1200120	1206120	malware, which would also detect our implant on OSX. This talk describes bypasses for
1206120	1213520	XProtect, which is Apple's antivirus product, Gatekeeper, the OSX sandbox, and even signed
1213520	1218560	coding requirements. For example, it's able to load unsigned kernel module into the kernel. So
1218560	1226420	sorry, Apple. Now a major component of our implant is the ability to grab and manipulate audio
1226420	1231780	and video. Now I mentioned the Kinect binary talks to both the audio and video cards that
1231780	1236340	reside in kernel mode. Data is read from these devices and then is streamed to the
1236340	1241980	DropCam's cloud servers where it is consumed by the user. So first I'm going to talk about
1241980	1247600	how our implant is able to hot mic the camera in order to listen in to everything. Since the
1247600	1252440	Kinect binary exclusively opens the audio card, we have to inject a module into the Kinect
1252440	1258160	process. So here are the various relevant components. The Kinect binary is continually
1258160	1264700	reading the audio stream. But our injected module can then install a hook and gain access to
1264700	1272740	the audio stream and then exfil it to our command and control servers. Now DropCam uses a
1272740	1277200	standard Linux framework to read audio, which is kind of cool. So to get the audio, it
1277200	1282820	invokes the send PCM read end function, which retrieves audio frames containing audio
1282820	1288700	buffers. This is where the implant installs its audio hook. Again, the goal was to clone the
1288700	1293100	audio and stream it to the cuckoo's egg server while letting it stream in parallel up to
1293100	1298600	DropCam so the user wouldn't notice anything was amiss. So here is the code that is inserted
1298600	1305560	as an audio hook. This code gets a pointer to the original send PCM read function, invokes
1305560	1309860	it, and then simply exfiltrates any data or audio that's captured. So pretty
1309860	1316840	straightforward. All right. Now on to video. So by disassembling the Kinect binary, we were
1316840	1322760	able to uncover how the camera accesses and streams video to the cloud. In the
1322760	1328280	disassembly, you can see it opening the video device, which is slash dev slash IAV. Now this
1328280	1333960	device is backed by an umbrella chip that does all the video processing and H264 encoding in
1333960	1339280	hardware, obviously for performance reasons. The second disassembly snippet shows the
1339280	1345160	Kinect binary talking to this video device to get the actual video via an eye octal. The
1345160	1349860	eye octals are all undocumented and many take undocumented structures. Luckily, there were
1349860	1355220	some comments or error messages in the disassembly so we could maybe kind of get the name of
1355220	1361140	the eye octal, which gave us some insight into perhaps what it was doing. So I mentioned we
1361140	1366560	wanted to clone the video and stream it to the implant servers. Now, undocumented eye octals
1366560	1371720	and structures result in a ton of reverse engineering and a ton of seg faults. However, we
1371720	1376980	eventually got it all figured out and we wanted to describe that here. So first you open the
1376980	1383080	slash dev slash IAV device. Then you get the H264 encoding parameter so that the stream you
1383080	1389900	exfil can be decoded. You then map the bit stream buffer memory and the digital signal
1389900	1395080	processor memory. Now, after you check that the video is actually being recorded, the video
1395080	1401800	stream can finally be read with the IAV IOC read bit stream, yeah, bit stream EX eye octal.
1402200	1406640	Now, besides this being really useful for an implant, this actually allows you to stream the
1406640	1411720	video to a server or DVR of a choice. So this saves you money because you don't have to pay
1411720	1416820	DropCam $30 a month to store your video and it also prevents Google from seeing what's going
1416820	1420040	on, say, inside your house. So that's kind of a cool feature. I don't want Google seeing what
1420040	1427180	I'm up to. So now we could clone the video feed, send it to an implant server while it was
1427180	1431480	also streaming in parallel to DropCam. But we thought we wanted to take this a step farther
1431480	1436300	and actually manipulate the live video stream on the device to do cool things like in the
1436300	1442300	movies, for example, making an attacker invisible. So again, here are the various relevant
1442300	1448580	components. The video card is going to generate frames which will, in this example, show the
1448580	1453680	attacker, you know, breaking in or doing his bad things. So we really don't want that. However,
1453680	1459880	the injected module will intercept these frames and inject other frames. These injected
1459880	1464160	frames will then be streamed to the cloud instead and ultimately back to the user which will
1464160	1471780	hide the attacker. So take a little bit of a closer look. Here's the video device and the
1471780	1477820	connect binary which is reading frames. The injected module installs another hook. This
1477820	1486480	time it's an IOCTL hook and watches for the IOC read bit streams EX IOCTL. Now when this
1486480	1491420	IOCTL is called, it populates a structure with various values. Through reverse
1491420	1496100	engineering, we were able to determine what these values were. Some of the relevant ones
1496100	1504680	include the frame number, the address to the frame's raw H264 encoded data, the frame type,
1504680	1510100	and finally the frame size. Now the easiest way to manipulate the video stream is just to
1510100	1515200	wait for a frame type of JPEG full. Then moving forward, you can either just replay this
1515200	1520640	frame to lock or freeze the video frame or actually inject other full frames as well. The
1520640	1525800	other frames are not ideal because H26 encoding pretty much just encodes deltas. So if
1525800	1529260	you're trying to intercept and manipulate a frame, a lot of times you don't actually have
1529260	1533540	the full frame. These JPEG full frames happen every second so it's pretty easy to wait for
1533540	1539880	them and then use them moving forward. All right. So video demo time. I wanted to show you
1539880	1544680	how we can transparently lock the video stream. If you look at the top left is the drop cam
1544680	1549080	feed. So this is what the user is going to see and this is what we are manipulating. The top
1549080	1553980	right is a shot from an external camera. Bottom left is the sys log output and bottom right is
1553980	1561860	the attacker's console. All right. So you see a mom coming to tuck her kid in. If you look at
1561860	1568940	the attacker's window, they're going to then run the enable cam to activate the video lock. We
1568940	1578000	then see... an attacker that somehow looks like Colby. Got to work on your disguises. The
1578000	1582380	video now is locked to frame. It's injecting these JPEG full frames in so the video is
1582380	1587220	frozen. But you can see the camera is still counting up so the user is not going to notice.
1587600	1592860	Then we run the disable command which tells the camera feed to resync and then it's going to
1592860	1597880	flip back to the baby. Now, I'm sure the mom is going to accept this child as one of their
1597880	1619650	own. Well... apparently not. All right. Back to Colby. All right. So we built this awesome
1619650	1631270	implant that does everything an attacker could dream of. But how do we control it? So
1631270	1636230	naturally a sleek web control panel is needed. On the main screen all the cameras call back
1636230	1641430	with their name and location so targeting is super easy. From there it's easy to select a
1641430	1645610	target and a job to be sent down to the drop cam. We support all the commands we talked
1645610	1652190	about previously. The camera calls home to the server at a standard interval to report job
1652190	1659210	results and retrieve new jobs from the queue. We have a series of completed and unsent
1659210	1663650	jobs. Queued up is an execute and execute task whereas there are several completed
1663650	1670450	surveys. Results are reported in a convenient JSON format. For this next part we need a bit
1670450	1675070	of disclaimer. The stuff we're about to do is theoretically possible on any device, not
1675070	1680070	just drop cam. However, we were just kind of curious how far we could take things. Since
1680070	1684370	physical access is easy enough and there's lots of free space inside the drop cam, it's
1684370	1689390	conceivable to think that someone could add some extra hardware. Could someone turn this
1689390	1694590	network device into a true cyber weapon? Most embedded systems contain what are called
1694590	1699810	general purpose input and output, GPIO for short. What if we use this camera's GPIO pins to
1699810	1703630	control something external? However, since we don't have a device schematic and toggling
1703630	1709310	random pins is generally kind of frowned upon, we wanted to use a known quantity. In
1709310	1713870	this case we decided to interface with the drop cam status LED seen circled up above. The
1713870	1718510	status LED is really just tied to one of the drop cam's GPIO pins. But we needed a way to do
1718510	1722110	this intelligently because the light comes on randomly and we didn't really want to be
1722110	1727790	setting off whatever we're doing intermittently. So here's some pseudocode to show what we
1727790	1731890	did. We figured out how to toggle the status LED at a set frequency, just in a loop up
1731890	1736110	there. Then we installed a microcontroller to listen for the square wave that we're
1736110	1741230	generating on the LED. So it's listening for that specific frequency. And then when the
1741230	1745130	microcontroller gets the frequency it's looking for, something amazing happens. If your
1745130	1752410	camera starts blinking, get out of the way. So here's one possible scenario. Please note
1752410	1755610	that the following was performed in compliance with all local laws and you should not try
1755610	1756510	this at home.
1832430	1845810	Oh, that's tragic. Well, that's a wrap. You probably heard that the Internet of things is
1845810	1851270	blowing up. So remember you saw it first here at DEF CON 22. Again, I'm Patrick and this is
1851270	1855970	my coworker Colby. Feel free to contact us. We probably won't plug in any devices you send
1855970	1873800	us. Any questions now? We have a few extra minutes. Yes, in the front. Great. So the
1873800	1876760	question was, you know, while we're hooking the video and audio stream, did we see any
1877220	1881190	degradation in the performance of the device? Since we were hooking pretty low level,
1881940	1886180	where the IOPTLs are coming in, we're pretty much just mem copying them off and then putting
1886180	1890860	that in a shared buffer where exfiltrate code would just pick it up and do that. So in our
1890860	1895120	testing, we didn't see any specific degradation or anything. And sometimes the video
1895120	1906420	stream goes in and out anyway. So independent of us. Any other questions? Awesome. Well,
1906420	1909480	thanks again. Remember, don't trust cameras from strangers.
