-: Embedded system vulnerabilities.
In this lesson, we're going to start talking about
some embedded system vulnerabilities,
because we talked about the fact that
a lot of these devices that we connect to the Internet
as part of the Internet of Things at large
do have embedded operating systems
like Linux or Android or other things like that.
Now, when we talk about an embedded system,
this is a computer system that is designed
to perform a specific and dedicated function.
Now, oftentimes, when we talk about an embedded system,
we're talking about things
more in the manufacturing space or automation space.
So, we might have a microcontroller in a medical drip system
that has one job,
it's to measure the amount of volume of fluid
that goes through that machine and into your IV
so you can give the patient what they need.
You might have another one
for a control system at a water treatment plant,
and its responsibility is to make sure that
water is flowing through at a certain rate,
and they're going to open or close valves
to make sure we maintain
that amount of flow through the system.
This is the idea of an embedded system.
And it can be a very, very simple device
or it can be fully complex
and have a full operating system like Linux or Android
being used to run these types of systems.
It just depends.
Now, in this particular lesson,
I'm going to focus more on the specific embedded systems
that have a single function,
and they have their own dedicated operating system
or microprocessors to do that function.
For instance, at my house, I have a smart meter,
so, if I go out to my side of my house,
I can look at the electric meter on my house,
and it will tell me how many kilowatts per hour I'm using
and how much I've used over time.
Now, this information is connected to the Internet
so that the power company
doesn't have to send somebody me to my house
to read this meter once a month.
Instead, it's all done electronically now.
They do this by using cellular modems
and it connects to the cellular network
back over the Internet
to their headquarters and to their servers
to feed in the data
of what we've used for power consumption.
If you look at your meter at your house,
you probably have something that looks pretty similar.
Now, these types of embedded systems
are considered static environments
where frequent changes are not made or allowed.
So, when is the last time you upgraded the software
on your electric meter, for instance?
You probably never have
and the power company
probably doesn't do it very frequently, either.
That's the idea of these embedded systems.
They are a very stripped down system
that is made to do one purpose and one purpose only.
And by doing that, that helps them become more secure,
because they don't have a lot of extra code.
But if that original code
wasn't made in place in a good state,
it makes it hard to do updates,
because these things aren't built
to be able to get frequent software updates.
Because of this,
embedded systems often have very little support
for identifying and correcting security issues.
You can't call the power company
and tell them to come secure your meter,
that's just not part of what they're going to do for you.
They're going to do it the way they want to do it
because it's their device.
And often, if you have an embedded system inside your factory
or inside your plant if you're in a manufacturing area,
you're going to have limited support from that manufacturer.
And so, this is an area
where you really want to get all these devices
onto a separate network
and not have them connected back to the Internet at large,
or this could be a big area of vulnerability for you.
Now, when we talk about embedded systems,
there's a term called PLC,
which is a programmable logic controller.
This is a type of computer that is designed for deployment
in industrial or outdoor setting,
and it can automate and monitor mechanical systems.
Now, when you think about a PLC,
I want you to think of something like manufacturing
that's going to open or shut a valve
to let more or less water come in.
That's the idea of a PLC.
It is a programmable logic controller.
Now, these PLCs run on firmware,
because again, these are embedded systems.
So, the firmware which is software at a chip
can be patched and reprogrammed
to fix vulnerabilities when they occur,
but again, there's a very specific process
and there's usually limited support from the manufacturer.
It's not like Microsoft
where they're going to give you a patch every Tuesday.
With these PLCs, you might get a patch
every six months or a year or two years.
There's usually a very long time in between patches.
Now, another way we can do this
is using what's called a system on a chip.
This is another form of embedded systems.
This is where our processor
integrates the platform functionality
of multiple logical controllers onto a single chip.
So, instead of having all these big PLCs all over the place,
we can get all that down to one single chip.
Now, this system on a chip can be very power efficient,
and therefore, they're often used with smaller devices
that need to have an embedded system.
So, if I need to create something
that's going to have an embedded system
and be very small that can fit in my pocket,
that would usually use something like a system on a chip.
If using something like a Roomba or robot vacuum cleaner,
those use a system on a chip type of mentality,
because they try to get all that information
put onto a single chip,
because again, it takes up less space,
and therefore, you can leave more room
for the functioning parts you need such as the vacuum.
Now, the other thing we want to talk about
is some of these operating systems they use.
So, there's this thing known as an RTOS,
which is a real-time operating system.
Now, this is a type of operating system
that prioritizes deterministic execution of operations.
And this will help us to ensure consistent response
for time-critical tasks.
Now, think about this.
If you're running something that has to open or shut a valve
inside of a nuclear plant,
can you have the ability
for that to be offline at any time?
Probably not, right?
Well, that's the idea of where we would use an RTOS,
a real-time operating system.
This is because a lot of our embedded systems
typically can't tolerate reboots or crashes,
and they have to have these response times
that are predictable within milliseconds.
So, if I'm building something
that's going to run parts of an airplane,
that's going to help my autopilot fly,
and where the autopilot needs to make
adjustments on the wings every couple of milliseconds,
well, that is something that we would want to use
a real-time operating system for,
we can't use a standard Windows system for that.
It's just not fast enough or powerful enough,
and it's subject to rebooting or crashing
and security patches and all that other stuff.
So, RTOS, when you hear that term,
think about this as a type of operating system
that's often used with embedded systems,
especially in critical applications.
Now, the last thing I want to talk about is an FPGA,
which is a field programmable gate array.
This is a type of processor that can be programmed
to perform a specific function by a customer,
rather than at the time of manufacture.
So, if I'm going to use something like a system on a chip,
that is going to be programmed by the manufacturer
and whatever it's programmed to do,
that's what it's going to do.
But with a field programmable gate array,
I, as the customer, can actually program what I want it to do.
This is really useful if I have a more generic function
like open or shut a valve,
but I need to tell it what time I want it to do it.
Or if I want to tell it
how many seconds it should be open for
and how many seconds it should be closed for.
Those are things I can program in
using a field programmable gate array.
Now, the end customer here
has the ability to program these things
by configuring the programming logic.
And we can do this to run a specific application
instead of using an application-specific integrated circuit,
like I was talking about a system on a chip design would.
When you burn a system on a chip,
that is the program you're going to have.
When you're dealing with a field programmable gate array,
you have the ability to change that.