- [Instructor] So for this demo,
we built an IoT security camera device.
It takes pictures every few minutes,
just like a real security camera
and posts them to a publicly accessible website.
So the only thing,
keeping an attacker from being able to view your photos
is that each file is named
with this long random file name here,
chosen by the camera.
Now, before you go thinking
that this is unrealistically vulnerable,
this is how Discord works
and lots of other applications like it.
Anytime you take a photo
and send it to a friend over Discord,
it's publicly accessible.
The long random file name is the only thing
that's keeping people from seeing your photos.
Our device, however,
is built using Contiki-NG, a popular IoT operating system.
When you call the operating system to get a random number,
it will use the hardware RNG on board,
but only to see the insecure libsyn rand function.
So we don't know what the seed is,
but we don't have to because we can derive it.
So suppose one day,
you take a photo with your camera
and post it on social media.
Wow. What a cool camera you bought!
How fun!
But what you didn't know is
that an attacker can use this file name
to derive with the original seed was
that generated it.
That's because that's how the libsyn rand function works.
Our attacker here uses Untwister
to find the seed.
Once they have,
they can use that seed to determine every past
and future value from the R and G.
So our attacker can just plug in some of those numbers
back into the camera website
and view every photo
that the camera has ever taken,
even if they've never been shared before.