TRANSCRIPTEnglish

Getting Started in ICS/OT Cyber Security - 20+ Hours - Part 5 (Asset Registers & Inventory)

2h 25m 8s23,351 words3,388 segmentsEnglish

FULL TRANSCRIPT

0:01

hello my friend and welcome back and uh

0:05

this part I'm really excited about this

0:06

part because uh in part some of this is

0:09

actually recorded and already on my

0:11

YouTube channel actually recorded some

0:12

of the asset register videos previously

0:16

uh because it's so important to cyber

0:19

security in in icot environments but

0:23

we've also updated the sections uh

0:25

particularly concerning to when we look

0:27

at performing active scanning so we're

0:30

going to look at using tools like nmap

0:33

in an icot environment which we

0:35

typically say we don't do but there

0:38

could be a time and place for it

0:42

potentially and then so it also borders

0:46

on talking about penetration testing in

0:49

ic OT environments so so the section is

0:52

not as boring on the surface as it seems

0:55

to be because asset registers no one's

0:57

ever is going to say is like a fun sexy

0:59

topic to to talk about but not only

1:02

we're going to talk about active

1:04

scanning in the environments but we're

1:05

also going to talk about passive

1:06

listening which really builds into a

1:09

network intrusion detection conversation

1:11

or network security monitoring right how

1:14

do we find the bad people on the

1:16

network if we're not looking for them

1:19

right so we need to be looking at we

1:21

need to be looking at Network traffic

1:23

and we can look at Network traffic as

1:25

one way to determine you what type of

1:27

assets do we have in the environment and

1:30

that's really what this section is going

1:34

to be about but it's going to be one of

1:36

those other long long sections but

1:38

hopefully in in a good way so and let's

1:43

just jump in right after our disclaimer

1:47

because everything we're talking about

1:48

in in in the course is is for

1:51

informational purposes only right to

1:53

help you in your environments uh become

1:57

more more

1:58

secure

2:00

so here's the agenda for this part so

2:04

again we're going to talk about asset

2:05

registers and and if you're not familiar

2:07

with the term asset registers which I

2:09

was not coming into OT from it and Ian

2:12

it sounds like we're talking about asset

2:14

inventory but why wouldn't we call it

2:17

asset inventory um it's a good question

2:20

they just call it asset registers in

2:22

inot so it's exactly what we're talking

2:25

about so when we say asset register in

2:27

OT it just means it's an asset inventory

2:30

it's just a list of the assets that we

2:32

have in the environment it just looks

2:34

probably slightly different than what we

2:37

would have in it where it is primarily

2:41

computers right with workstations and

2:43

servers and and laptops and and while we

2:47

have some of those in OT right we also

2:51

have things like programmable logic

2:53

controllers are plc's and other types of

2:56

OT assets that are going to be in that

2:59

inventory vory or on that asset register

3:02

that that we're not going to see in it

3:03

so we're going to look at how we build

3:06

that asset register and and the four

3:08

main ways that we can do that so if

3:10

especially if you go into let's say an

3:12

environment that's existed for say 10

3:15

plus years and they don't have an asset

3:17

register how are you going to to build

3:20

that and so that's where we can talk

3:22

about doing things like walking the

3:24

environment right tracing cables to to

3:27

actually find those assets and and add

3:29

them to a list

3:30

we can do active scanning and when we

3:33

talk about doing Network mapping using

3:35

tool like like nmap that's usually going

3:38

to be the one that that people are still

3:40

going to use even though there there

3:42

could be some risks there so so there's

3:45

some ways to limit that that risk and

3:47

there are other tools out there and

3:49

we'll talk about some we talk about

3:51

active versus passive scanning I hate

3:53

the term passive scanning cuz well

3:56

passive scanning we're not scanning

3:58

anything so why why do we call it that

4:00

so that's really where it's it's more

4:02

like passive listening and where we're

4:05

capturing traffic on the network to

4:07

review to see oh okay what hosts are out

4:10

there and what are they talking so and I

4:11

have some new plc's in my my home lab so

4:14

we'll actually get to see the traffic

4:16

generated by those I'm excited to to get

4:18

to get to play with those and and show

4:21

those off a little bit so um we talk

4:24

about there's there's other types of

4:27

documents out there that we can pull

4:29

information from so the change

4:30

management process is one of them uh

4:33

maybe in procurement right you we've

4:36

bought these plcs so hopefully we have a

4:38

receipt somewhere and that we're able to

4:40

find that receipt and then be able to

4:43

use that to to add it to our asset

4:46

register so that's there's a couple

4:48

options that we're going to talk about

4:49

there uh also things like PLC

4:51

programming code that we're going to

4:53

talk about project uh and program data

4:56

right those are all places where asset

4:59

information can hide that that we want

5:01

to

5:02

find uh and then after that we're going

5:04

to come back and you can see monitoring

5:06

the control system State that's actually

5:11

what I built my Master's thesis on so

5:14

I'm not going to bore you with the whole

5:17

uh I think it came out to be about 30

5:19

pages so it's not too crazy uh it's not

5:21

too much um but but we get a get an idea

5:25

of why it's important to understand uh

5:28

when we look at at especially the plc's

5:31

in our environment all right and and

5:33

trying to understand when they're secure

5:35

when they're in a safe State versus when

5:37

they're in a unsecure or a vulnerable

5:40

state and it's not as cut and dry as a

5:44

lot of people in the industry will will

5:46

make it sound and that's really the

5:47

point of the the thesis so and then

5:51

ultimately we'll wrap up well once we

5:53

have this asset register uh or as we're

5:56

building this asset register which which

5:58

more than likely h honestly is probably

6:00

just a bunch of inventory data in an

6:02

Excel spreadsheet nothing fancy uh but

6:05

we have to make sure we keep it safe

6:07

because if an attacker was able to gain

6:09

access to that asset register

6:11

essentially if they have this treasure

6:12

map of your environment right you have a

6:15

list of all the assets and and the

6:17

software that's running and the services

6:18

and the versions of the software and the

6:20

services which they can map to

6:22

vulnerabilities and then they could use

6:24

that to come and and attack the

6:27

environment and and take control which

6:29

obviously is the last thing that we want

6:32

to have happen in OT that's why we're

6:36

here so we already started to touch on

6:39

right this idea that you know we need

6:42

asset registers in OT environments just

6:45

like we have to have asset inventories

6:48

in an it I think also like an asset

6:52

inventories in it they're never they're

6:55

never going to be perfect and even if

6:57

they are 100% accurate let's say today

7:01

something's probably going to change

7:02

tomorrow or next week or within the next

7:05

year and it's not going to be 100%

7:08

accurate so I never assume any of these

7:12

are 100% accurate I've never met an IT

7:16

environment that unless it was super

7:18

tiny and super small that had an asset

7:21

inventory that was 100% accurate just

7:24

doesn't happen I did I did a

7:27

presentation at a gardener conference

7:29

one time in front of you know I think

7:31

300 cios and and

7:34

csos and asked you know raise your hand

7:37

if if you feel that your inventory

7:39

management program has everything 100%

7:42

or as close to 100% as possible and one

7:46

guy raised his hand and he was sitting

7:47

in the front row so of course everybody

7:49

else sitting in the room was laughing at

7:51

him behind his back because it just just

7:54

doesn't work that way they're never

7:56

going to be perfect but we need them to

7:59

be as close to perfect as possible and

8:03

why I focus on them it's not necessarily

8:06

a matter of do I care what do we have in

8:09

the environment sure we say you know we

8:11

have to know or understand what we have

8:13

in the environment to be able to protect

8:15

it and I'm like yeah there's a sense of

8:16

Truth to that but I don't completely

8:19

agree with that I can still protect the

8:21

environment even if I don't know

8:24

everything that's in it because if I

8:27

then play off of the two main areas that

8:30

I always focus on in cyber security

8:31

whether it's in it or OT when we talk

8:34

about vulnerability management and we

8:37

talk about incident detection and

8:39

response I cannot effectively do

8:42

vulnerability management or incident

8:44

detection and response in an OT

8:47

environment without an asset

8:49

register so without that asset register

8:52

we're only

8:53

guessing and so if I can't become aware

8:56

of the vulnerabilities in the

8:57

environment or what if I have have an

8:59

incident how do I respond how do I even

9:01

know I have an incident in the first

9:03

place and we'll talk about a couple of

9:06

stories that uh as we go

9:09

throughout of things that that either

9:11

I've seen or I've talked with people

9:14

especially recently that have have had

9:18

certain circumstances come up where you

9:22

know they didn't have an asset register

9:24

and here's how it did to damage or

9:27

here's where the lack of an asset

9:30

register prevented them from effectively

9:33

responding in an incident that did

9:35

significant damage to the environment to

9:37

the point where people lost

9:39

jobs and that's one of the the big

9:41

focuses for me in in cyber security

9:44

always is I don't want a breach ever to

9:47

result in somebody losing their job

9:49

right it's just as easy as

9:51

that so I know I'm going off on a

9:54

tangent

9:55

already but the idea is with the asset

9:57

register is our inventory

9:59

list now very similar to it but there

10:02

are other pieces of information about

10:05

those assets that we're going to be

10:06

tracking in OT that we don't see in in

10:10

it and as hopefully by now throughout

10:12

the course we understand yeah it and OT

10:15

environments while very similar they're

10:17

also very different so your asset

10:20

register yeah it's going to look very

10:21

similar to an IT asset inventory but

10:24

it's also going to be different so we

10:27

want to make sure we clud when we talk

10:29

about all the Assets in the OT

10:31

environment we're talking about all the

10:33

hardware so whether it's a server a

10:35

workstation an HMI a PLC DCS all of your

10:40

sensors and other instrumentation we

10:42

have at that lowest level of the Purdue

10:45

model right that's we want to make sure

10:46

all of those are

10:48

listed and then all the software that's

10:51

running on those systems and then also

10:54

the firmware firmware is not necessarily

10:56

something that's always tracked in the

10:59

it World sometimes it is sometimes it's

11:00

not but it's something we definitely

11:02

want to be tracking in the OT world so

11:07

we're going to be tracking all Hardware

11:08

software and firmware and those are the

11:11

three main focuses but then we'll also

11:13

have lots of other properties for these

11:15

that we're tracking that we'll see when

11:16

we look at some of the examples of or

11:18

sample asset

11:20

registers you if you have virtualized

11:23

assets let's say I'm running a VMware

11:25

server and then I have a bunch of

11:28

virtualized hosts running on top of that

11:30

we want to make sure all of those

11:31

virtualized host are inventoried as well

11:33

as the VMware

11:35

server because those are all assets

11:39

they're all I always think of especially

11:42

and this isn't always 100% true but for

11:44

the most part if you think something has

11:47

an IP address in on it I want to know

11:49

about it in particular now I understand

11:53

in OT environments maybe not all assets

11:56

are running

11:57

tcpip maybe they're just talking in an

12:00

older OT

12:03

protocol they don't have to talk tcpip

12:07

right maybe old profet right that host

12:10

oh it doesn't have a have an IP address

12:13

but we'll still see it talking on the

12:14

network we'll actually see that in the

12:16

example that we're going to talk about

12:18

in a little

12:19

bit but again my main focus and why I

12:23

want to work in asset registers and why

12:25

it's so important is that it builds in

12:28

into allowing us to do vulnerability

12:31

management and incident detection

12:34

response without that asset register

12:37

we're we're crippled right we're

12:39

hampered and we can't do the job 100%

12:42

probably can't even do it

12:46

50% like I mentioned earlier is that we

12:49

never want to assume that the asset

12:51

register is 100% complete I'm I'm very

12:54

fortunate that most of the environments

12:56

that I work in you through my day job

13:00

they're brand new environments right I

13:02

have a client that I'm working with you

13:04

know outside of my my day job now which

13:06

is a a brand new manufacturing

13:10

facility and maybe that asset inventory

13:13

is a 100% accurate today but again

13:16

changes are H happening over

13:19

time and it's never going to be 100%

13:22

accurate let alone what if you had an

13:26

attacker come into to the environment

13:28

and maybe they take something out or you

13:31

know probably more important they leave

13:33

something right they connect maybe some

13:35

type of attack jump host to the

13:40

network so things to start to consider

13:43

so we it it's kind of a weird situation

13:46

where I can talk about well we have to

13:48

have asset registers and we want them as

13:50

accurate as as they can be right we want

13:53

them to be 100%

13:54

complete but also with the understanding

13:57

that it might not be that way tomorrow

14:00

because something can always

14:05

change and so when we talk about

14:07

different changes that can happen yeah

14:09

common occurrences is what if a a

14:12

technician comes into to you connect a a

14:16

a new sensor to to the network and

14:19

doesn't let anybody know right will we

14:22

even detect that maybe

14:25

not but now we have a new asset on the

14:28

network that we don't understand and

14:29

maybe that asset has a vulnerability

14:31

that we need to be able to

14:34

understand what if a PLC programmer uh

14:38

brings in a new engineering workstation

14:40

right maybe they bring in their personal

14:42

laptop and plug it in to the OT Network

14:46

to do programming on on a PLC would we

14:50

detect that and what are the dangers

14:53

there right if somebody brings in a

14:55

personal laptop and plugs it in well

14:57

what if they were infected while they're

14:59

at home I was just talking with a

15:02

gentleman actually this morning from the

15:04

UK he worked in in a manufacturing

15:07

facility where there was a lady that

15:09

brought in a USB drive from home because

15:12

she wanted to show off some holiday

15:14

pictures you plugs it into the the OT

15:18

Network and because that personal USB

15:20

drive she had was infected and infected

15:23

all the systems at the manufacturing

15:24

plant and the manufacturing plant not

15:27

only went down

15:29

but because they had no backups they had

15:32

no ability to recover that the plant

15:35

shut down they went out of business and

15:38

160 people lost their jobs just because

15:40

somebody wanted to bring in their

15:42

holiday photos and show them off on the

15:44

OT

15:46

Network that's pretty devastating I

15:49

couldn't imagine the responsibility that

15:52

that that woman felt I mean hopefully

15:55

she felt responsible for

15:57

it so so what happens when we bring in

15:59

these different types of of assets we

16:02

actually had a client one time where

16:04

some one of the operators in the control

16:06

room they they thought it was a good

16:08

idea to bring in an

16:09

Xbox now I don't know why they thought

16:12

they were going to have an internet

16:14

connection for the Xbox in the control

16:16

room because that's always a big no no

16:18

in OT environments but for some reason

16:21

right they they thought they would bring

16:22

in their Xbox and connect it to the

16:24

network and and play games when they are

16:28

at the

16:29

at work in the middle of the night right

16:31

that's something we want to be able to

16:33

detect when somebody attaches a new

16:36

device to the network we want to get an

16:38

alert and be able to

16:41

investigate 99.9% of the times it's not

16:44

something evil it's not something

16:47

malicious it's somebody doing something

16:49

that they're not supposed to be doing

16:51

right they're bringing in the personal

16:52

USB drive they're bringing in their XBox

16:54

because apparently they're

16:57

bored the you know the maintenance

16:59

technician you doing the the install of

17:02

the the the field device right they just

17:05

forgot to let somebody know they didn't

17:07

maybe go through the appropriate change

17:08

management

17:10

procedures there's lots of reasons but

17:12

again 99.9% of what we find in OT

17:16

environments when looking for the bad

17:20

things we don't find the evil malicious

17:23

cyber attackers it's it's people just

17:26

making stupid mistakes

17:29

there are time we we can find

17:31

operational issues that if we find those

17:34

issues we can get them fixed before they

17:36

can affect the availability or the

17:39

uptime of the plan which is great so

17:41

that's where we really push when we talk

17:43

about implementing things like network

17:45

security monitoring in OT environments

17:47

it's not just about security it can also

17:50

help with things like ensuring

17:52

availability but by identifying

17:54

operational

17:57

issues we have another one and this is

18:00

you the classic example and I see this a

18:02

lot of facilities where you go

18:04

especially larger facilities out in the

18:06

middle of nowhere and they don't take

18:09

physical security as seriously as they

18:11

should and somebody could just walk into

18:14

the the facility and they they could

18:16

plant a device on the network and it

18:19

gets an IP address from DHCP and Boop

18:22

they're off and running because they

18:23

have that foothold on the network so

18:26

they're able to attack other devices in

18:27

the environment or or what if they're

18:29

doing this over Wi-Fi right after I'm

18:31

recording this I actually have a a

18:34

meeting with one of our Engineers for a

18:36

large project in in Canada about

18:39

securing Wireless communication in OT

18:44

environments so it's extremely important

18:46

but it's one of those areas that that

18:47

are are vastly

18:53

overlooked so when you look at and this

18:56

is what kind of alluded to earlier right

18:58

where do we put the asset

19:01

register and or how do we create it I

19:04

mention most asset registers still today

19:08

are are in Excel now there are uh

19:11

different applications you can buy so we

19:13

talk about off the shelf Solutions you

19:15

can you can purchase I I've seen

19:17

environments uh build you internal web

19:20

applications to be able to stor as as

19:22

something like a Microsoft SQL Server

19:24

back end and they create a web interface

19:27

and so there's not really a lot to do

19:30

you could probably code one of these

19:31

with chat gbt in probably 15 minutes or

19:34

less right so it's it's it's not hard

19:38

hard to do it's actually probably a good

19:40

idea

19:42

but but we still see most of these are

19:46

are stored in

19:47

Excel again we'll come back and talk

19:50

about it as we wrap up the main idea is

19:52

I don't care where it is other than it

19:54

needs to be

19:56

accessible but it also needs to be

19:58

secure so we want to make sure plant

20:00

Personnel have access to that

20:02

information when we're doing things like

20:04

vulnerability management having

20:06

conversations around risk we're doing

20:09

network security monitoring but again we

20:12

want to make sure that the attackers

20:14

aren't able to access that information

20:16

because it gives them that that treasure

20:18

map on how to break into the environment

20:20

and that's not what we want to

20:25

provide also mentioned in that last

20:27

point sure you can go out and buy an

20:29

application and you can store this in

20:32

the cloud or in some app that's running

20:35

on the

20:36

internet just keep in mind that any

20:39

Cloud environment any app that's out

20:42

there on the internet it's going to be

20:44

compromised one day okay it's another

20:46

one maybe not tomorrow maybe not next

20:48

week but maybe next month maybe next

20:51

year it's going to be

20:54

compromised so do you want to take that

20:57

risk or do you want to make sure that

21:00

it's only stored locally on

21:02

premise where your employees can access

21:05

it right it's it's a risk conversation

21:07

definitely to be had and it may might

21:10

sound silly but it's actually one of

21:13

those really

21:14

important conversations to have about

21:18

where are we going to store the asset

21:20

register right we want to make sure

21:21

everybody has access to it least the

21:24

people that need access to it right our

21:27

plan operators our our OT cyber security

21:29

team

21:31

members they need access to the asset

21:33

register so do we want to put put it in

21:36

a cloud-based application that's

21:38

eventually going to get hacked and then

21:40

the attackers have access to that

21:42

information and at that point again they

21:44

have that treasure map on just basically

21:47

a guideline on yeah here's exactly how

21:49

you break into the environment and take

21:51

control over it okay that's not

21:54

something that we want to have

21:56

exposed so now that we've talked a

21:59

little bit of the idea of what an asset

22:02

register is and where we're going to put

22:06

this inventory data right whether it's

22:08

an Excel spreadsheet or a web

22:10

application maybe in the cloud maybe

22:13

maybe not but what are we storing in the

22:16

asset register and there's a lot of

22:18

information that we could put in the

22:20

register I'm always a fan of the more

22:23

the better and realistically once you

22:24

put it in there once you have that

22:26

information and you don't have to

22:29

ideally worry about you know losing it

22:32

or or having to go back and recreate it

22:34

for somewhere or maybe you forget a

22:36

piece of information that you later need

22:38

and then you scramble around trying to

22:40

find it so I'm a big fan of having as

22:42

much up front as possible throw

22:44

everything in the kitchen sink into it

22:47

personally but keep it organized right

22:50

that's excel's good at that but and you

22:52

can see so there's there's an asset ID

22:54

that's ass assigned to that ass asset or

22:58

that system usually that's an internal

23:00

naming convention right that that will

23:02

assign even if it's you're the first

23:04

asset right you're the second asset

23:06

we've deployed or the third asset and

23:08

and so on it just doesn't have to be

23:10

anything

23:11

complicated usually we'll have asset

23:14

names you know we'll give systems names

23:17

or use a naming convention that help us

23:19

remember or understand what that asset

23:22

is just based off of his name maybe even

23:25

where it's located on site so we can use

23:28

that the the naming convention to help

23:30

us with that we'll talk about the asset

23:32

type so is it a workstation a server a

23:35

PLC an HMI etc

23:38

etc right the location where is it

23:41

stored right what building is it um or

23:44

out in the field or in a substation or

23:48

the list goes on and on where where is

23:49

this this asset hiding right where where

23:52

do we have it located so we want to make

23:54

sure that that's that's definitely a

23:57

piece of information we have listed

23:59

right we want to understand who the

24:01

manufacturing the manufacturer is right

24:04

who's the vendor right who produced it

24:06

because we also want to know the model

24:09

because we can use that information to

24:11

understand if I have let's say a seen

24:13

PLC as a SL1

24:15

1200 there could be certain

24:18

vulnerabilities that are associated with

24:20

that let alone there could be different

24:22

attacks that are specific to the

24:25

sl1200 that I need to be a aware of from

24:28

a security perspective and I need to

24:30

understand that I have these plc's in

24:32

the environment so I have these risks I

24:34

have these

24:37

vulnerabilities you see we can track

24:39

serial numbers for assets so it's always

24:42

comes in handy for for inventory

24:44

purposes or if you're maybe calling in

24:46

for

24:47

support if there's an IP address right

24:49

so if it's running tcpip then you want

24:52

to have the IP address if if it's

24:54

running tcpip it's going to have a MAC

24:56

address could also have a Mac address if

24:58

it's if it's running some other protocol

25:01

and not tcpip so you're going to want to

25:04

to have those listed there that's

25:05

especially one of those keys that's

25:07

going to help us later on doing network

25:09

security monitoring and incident

25:12

detection then you can see when it was

25:14

installed all right that's you maybe

25:16

good background information to to have

25:18

now I want to see what firmware is

25:21

installed what software is running on it

25:23

and and what version of software because

25:25

those are other pieces of information we

25:27

can use to find out are there

25:30

vulnerabilities in that firmware are

25:32

there vulnerabilities in that software

25:33

that we need to be aware of again if we

25:37

have that asset register we can plug

25:39

that into our vulnerability management

25:41

processes to look up to see if those

25:43

vulnerabilities exist and if there is a

25:45

vulnerability well how bad is it and

25:47

we're going to come back and talk about

25:49

that more in the next part but it's

25:52

really that understanding of if we have

25:54

a critical risk vulnerability does it

25:56

threaten safety

25:58

right rather physical or environmental

26:00

safety or does it threaten the

26:02

operations of the plan if it is then

26:04

we're going to want to look at how we're

26:05

going to get that addressed if it

26:07

doesn't threaten one of those three

26:09

things honestly we're probably not going

26:11

to do anything about it because it's not

26:15

going to threaten right our main focuses

26:18

right keeping people safe keeping the

26:20

environment safe keeping the plant up

26:22

and running producing whatever it

26:25

produces you see we tracked the last

26:27

maintenance in state sometimes that can

26:29

come in handy uh whether from a security

26:31

perspective or or an operations

26:34

perspective right some when's the last

26:36

time somebody fiddled with something

26:38

right maybe we're seeing some strange

26:40

activity coming maybe from this HMI

26:42

talking to a PLC we hadn't seen these

26:44

commands

26:45

before and we saw these starting with oh

26:49

this last maintenance date so maybe it's

26:51

just because of a firmware update or

26:52

some programming change it wasn't an

26:55

attacker taking over the HMI and using

26:58

it to try to compromise the the

27:01

PLC like to know when there's a

27:03

maintenance schedule if there's a

27:05

regular maintenance schedule for this

27:06

type of equipment so that way when we do

27:09

get alerts we can see is this in a

27:10

maintenance schedule or

27:12

not because I can give it a sign idea if

27:15

I see lplc maybe go from run mode which

27:19

means it's up and running and ideally in

27:21

readon mode so it can't be changed more

27:25

on that later you know versus is it in

27:27

program mode which does put it in this

27:30

kind of writable format where people can

27:33

do things or a technician can upload

27:35

firmware or make changes to PLC

27:39

programming you see are we going to

27:41

consider it a mission critical asset if

27:44

I lost this asset if this asset went

27:46

down and I didn't replace it let's say

27:48

for

27:50

days would the entire operation come to

27:53

a standstill or would we still be up and

27:56

running if the entire operation would

27:59

come to a standstill or if it's used to

28:02

ensure safety like our sis remember the

28:05

safety instrumented system the the fail

28:07

safe backup that we've talked

28:09

about that is considered a mission

28:11

critical asset if we have no sis the

28:15

plant's not running because then we have

28:17

no way to guarantee people are

28:22

safe we see a responsible party we want

28:24

to make sure well who who are we going

28:26

to contact if we have a question about

28:28

one of these devices what if I get a

28:30

security alert about a specific IP

28:33

address I can look it up in the asset

28:35

register understand oh well what type of

28:38

asset this is right oh it's it's a PLC

28:41

okay well who's the vendor oh it's it's

28:43

Alan Bradley

28:45

Rockwell it's a micro 820 PLC well who

28:50

who do I need to contact about questions

28:52

on that right maybe it's an engineer or

28:54

someone in operations right who do I

28:56

need to reach reach out

28:58

to we see a status a lot of times is it

29:02

in production maybe

29:05

not you can look at uh if there's any

29:08

additional notes that people have placed

29:11

and then when we get more into Isa 62443

29:14

but we we started to introduce in the

29:17

last section when we started talking

29:19

about secure network architecture the

29:21

idea of zones and conduits so every

29:24

asset should be assigned to reside in a

29:28

Zone can be a VLAN but remember it's

29:31

this idea of a a

29:33

subnetwork where all the assets are

29:36

collected together because they share a

29:38

common

29:40

purpose so all of the assets that make

29:43

up the sis right they're in a sis

29:47

Zone and then if you have any

29:49

communication into or out of that zone

29:53

remember each path each form of

29:55

communication each you know one

29:57

essentially ACL right the access control

30:00

list if we have a path from one IP

30:02

address to another IP address that would

30:05

be a conduit and then we're also

30:08

remembering to make them as specific as

30:10

possible so not just IP address to IP

30:11

address but we also have to make sure to

30:13

include the source and the destination

30:15

ports

30:18

right so that's a lot of information and

30:20

there's there's other pieces of

30:22

information that you could put into an

30:24

asset register but I think that's a lot

30:25

of the the common ones it's rare

30:27

actually to see zones and conduits for

30:29

most people but it's you know now in

30:31

2024 we're starting to see

30:35

people understanding the importance of

30:37

62443 seeing it as the gold standard of

30:40

how do I build a cyber security program

30:43

for my OT Network and so we do see zones

30:46

and conduits pop up if you don't have

30:49

them there initially you're going to

30:51

want to add them later on because you

30:53

are going to do risk assessments and

30:55

we're going to talk about that in one of

30:56

the later part Parts but when you do

30:58

those risk assessments it's all based

31:00

off of guess what zones and conduits and

31:04

really it's about what assets do we have

31:07

what zones are they in and what zones

31:09

are talking with what other

31:11

zones that's the risk assessment so we

31:14

have to have that information to be able

31:16

to do a risk assessment that's why

31:17

another reason why this section is very

31:21

important here's a sample idea honestly

31:24

I just had this generated in chat GP

31:27

I don't often use chat GPT I don't use

31:30

it to um write text or context but uh

31:35

when it was oh you know what create a

31:37

sample asset register it's a it's a

31:40

perfect job for it so I don't have to

31:42

sit there and and take the time to worry

31:45

about it and so you can see asset ID

31:47

asset name asset type the manufacturer

31:50

so that's where you get all these you

31:52

know kind of generic names right a model

31:56

serial number location IP address

31:59

installation date last last maintenance

32:01

date and then status you know what I

32:03

think it did a really good job

32:05

personally I we could have gone back and

32:07

used like real manufacturer names like

32:09

seens and um Rockwell and and used real

32:13

models of of assets but but other than

32:16

that I again I'm happy with this I

32:19

thought it was a good good they did a

32:21

good

32:24

job so now that we've looked at this

32:27

idea of yeah here's a sample asset

32:29

register and here's all this information

32:31

that we can store in the

32:36

database that well now again what if we

32:39

go into an environment and they don't

32:41

have an asset register or they say they

32:43

have an asset register but it's sadly

32:46

lacking they might have 10 assets listed

32:49

and they could have hundreds or

32:50

thousands or tens of thousands of assets

32:53

you know depending on the size of the

32:56

environment

32:59

so there's really four main ways that we

33:01

can build that asset register or

33:04

Continue to update it and so we're going

33:07

to come back and and look at each one of

33:09

these in in detail you see the number

33:12

one way we can look at or the number one

33:14

that we the first one we talk about it's

33:17

probably not the the one the ones

33:18

preferred but we can walk the

33:20

environment we can trace cables we can

33:22

go into the the the data room and and

33:26

look at the first switch we see and grab

33:28

the first cable we see and walk it Down

33:31

Right trace it

33:33

down yeah start to think though that

33:36

that takes time that takes takes money

33:39

and as our employees Trace cables out

33:42

into an environment they're probably not

33:45

in a very safe environment right so

33:47

there's this idea of putting our

33:49

employees in harm way Harm's Way so

33:51

walking in the environment is not

33:53

necessarily always preferred I think

33:55

I've already shared the the story of

33:57

when I was in the grid course one of the

33:58

gentlemen that was taking the class his

34:00

job was to do this at Disney World for

34:03

all the

34:04

rides it's a really cool job so they

34:07

would shut down each of the rides for

34:08

like two weeks and he would Trace cables

34:11

to figure out how each of the rides was

34:14

was wired and then he would also look at

34:16

the protocols that they were used

34:18

because you know you had different

34:19

person writing these different protocols

34:21

for each of the different rides and they

34:23

were very custom jobs and of course they

34:27

or an actually you know any type of

34:30

Industry standard as you might imagine

34:33

so now there's review we can review

34:36

existing data so this is where yeah we

34:38

can find network diagrams programming

34:40

data project files procurement info

34:42

right invoices where we've purchased

34:44

this equipment so we can use all of that

34:46

to try and understand what's in the

34:50

environment we can capture Network

34:53

traffic and then we can examine that so

34:55

we can use a tool like wire shark to to

34:58

capture traffic on the wire and use that

35:01

to see well what assets are talking with

35:03

each other because we can use that to

35:05

identify things like IP addresses or Mac

35:09

addresses protocols being used because

35:12

again not everything necessarily in an

35:13

OT environment is talking tcpip we're

35:16

going to see some examples of that

35:21

today and then we can also talk about we

35:24

can actively scan the environment using

35:26

a tool like nmap and and we'll do some

35:28

of that in the the home

35:32

lab but when you think about it right we

35:35

always talk about we don't want to do

35:36

active scanning in a production

35:38

environment because there's always a

35:40

chance it'll cause an issue now it's

35:43

more true in older

35:45

environments but do you want to take the

35:48

chance that you cause some type of issue

35:50

especially whether it's again you're

35:51

going to crash the site and bring it

35:52

down for three days and cost the company

35:54

$10 million or what if it could

35:59

introduce some type of physical or

36:01

environmental safety issue I had a CSO

36:05

uh ciso for a very large Manufacturing

36:09

Company in the United States told me one

36:13

time that they had a basically a PLC

36:16

that if you scanned it with nmap and it

36:18

went down it the resulting Chain

36:22

Reaction would create an explosion that

36:25

would leave a crater in the ground a

36:27

mile

36:29

wide and he was completely

36:33

serious

36:37

100% so that's always always stuck with

36:42

always stuck with

36:46

me so we want to be very careful now is

36:48

that an extreme case most

36:52

definitely but it's always in the back

36:54

of mine do you want to ever take a

36:56

chance for me no there can never be

36:59

enough liability insurance or errors and

37:01

and Emissions

37:03

Insurance to offset the the dangers that

37:06

we have in OT

37:11

environments so let's go back and talk

37:13

about you know when we're walk in the

37:15

environment we've already covered most

37:17

of this so we're not going to spend a

37:18

ton of time here remember the idea is

37:21

we're out there we're taking the time to

37:23

physically Trace cables but if we're

37:26

physically in the site there could be

37:29

danger depending on on the site in most

37:32

OT environments right there's always

37:34

some level of danger just very different

37:37

levels right but even in a maybe a tiny

37:40

manufacturing facility you're still

37:42

probably wearing steel toed boots and

37:45

and a hard hat and a safety vest and

37:46

safety

37:49

glasses there's a reason why you're

37:51

wearing the PPE right to protect

37:54

yourself in case something goes wrong

37:58

you see this is going to take the most

38:01

time I always think of this is the one

38:03

that that I had added you know after the

38:06

fact but I was thinking of because

38:08

because I've I've done this before in

38:09

whether my home OT lab or in in it what

38:12

if I'm tracing cables and uh I'm moving

38:15

my hand to the cable behind you know

38:17

maybe it's going into a rack and there's

38:20

other cables and accidentally you know

38:22

one of the other cables comes loose and

38:24

I don't realize it well type of issue

38:27

did I just

38:28

create maybe it's something that's no

38:31

big deal maybe it's something that

38:32

brings down the environment we don't we

38:34

don't

38:36

know one of the things we do add in

38:38

there though is if you're out there in

38:40

the field right if you're out in the

38:42

plant one of the things we talk about is

38:45

you want to if you have plc's and they

38:47

have key switches whether it's like

38:50

literally a physical key or sometimes

38:52

it's like a dip switch right a little

38:53

switch you can just flip up and down the

38:56

idea is we want to make sure all of

38:58

those are always kept in run mode

39:00

because the general idea is if you have

39:03

the key switch in run mode it puts the

39:06

PLC in readon

39:09

mode so that way it can't be change at

39:13

least remotely by an attacker so they

39:15

can't upload malicious firmware or PLC

39:18

programming uh like they did in the tric

39:21

incident where the Russians had come

39:23

into the petrochemical facility run by

39:25

Saudi Arab

39:27

and because the sis wasn't on a separate

39:30

segment and that it was connected and

39:32

the key switch was in program mode it

39:36

allowed the attackers to remotely access

39:38

the the sis controllers and upload

39:42

essentially a malicious

39:44

code so we always want to make sure that

39:47

if controllers have those key switches

39:51

whether it's a physical key or a little

39:53

dip switch then you want to make sure

39:55

it's in run

39:57

mode and a lot of people say well that

39:59

keeps it safe that's not necessarily

40:02

true and again this goes back to my

40:04

thesis but the idea is that not all

40:06

plc's play by the same rules so it's

40:10

really up to the vendor some vendors say

40:12

yeah if you're run mode you can't make

40:14

remote changes now all the plc's that I

40:17

tested they allow you even when you're

40:20

in run mode to still make changes to the

40:22

PLC

40:23

code now you can't upload new firmware

40:27

so it helps some of the

40:30

problem but not all of the problem and

40:33

then the other part with this is if

40:35

people are just monitoring for the key

40:37

switch the problem is a lot of plc's

40:40

especially lower-end ones right lower

40:42

cost ones that you'll see in more you

40:44

smaller to medium siiz environments they

40:46

don't have key switches some of them

40:48

might have a dip switch but a lot of

40:50

even the Seaman SL 20 1200 that I paid

40:55

$1,500 for or that it has no Hardware

40:59

switch you can control it through

41:01

software but there is no Hardware switch

41:04

so I I can't just look for a PLC key

41:06

switch and make sure it's in run mode

41:08

because it doesn't

41:11

exist so there's other aspects that we

41:14

want to monitor for like I want to

41:16

monitor when it comes out of run run

41:19

mode because somebody could have used

41:20

software to take it out of rad mode to

41:23

make programming changes or upload

41:25

firmware

41:29

so just a couple things I don't want to

41:30

go too far off the the

41:34

tangent so we can review project file

41:37

data again this is and really it's just

41:39

idea of how all the information we have

41:41

related to the environment right so

41:44

Network diagrams is a is a big one of

41:46

course logical physical and then we'll

41:49

have things like oh plc's and IP

41:51

addresses and hmis listed and there are

41:53

IP addresses and maybe it has the vendor

41:56

information and and so

41:58

on other system div design

42:01

specifications so you can have a lot

42:04

of uh you other documents that go along

42:06

with network diagrams they could have

42:08

some

42:09

details the programming files themselves

42:12

for plc's could have potential

42:14

information in

42:16

there right asset specifications so as

42:19

you're designing the

42:22

environment those specifications can

42:24

give us clues or have information about

42:26

like what types of plc's that we have in

42:28

the

42:29

environment and you can see I mean a lot

42:31

of the different records to you and

42:34

plans that are associated with the

42:36

project can all have Clues to what types

42:38

of assets we have in the environment

42:40

especially going talk about again those

42:42

purchase records which is something that

42:44

I don't think a lot of people people

42:46

talk about but I was at work one day

42:47

realizing as we're going through talking

42:49

about a practice

42:51

to ensure when our Engineers are

42:54

ordering equipment right we have a whole

42:57

security questionnaire that goes with it

43:00

and then of course these assets

43:02

eventually when they're brought on site

43:03

are placed into the the asset register

43:07

so we should be able to go back through

43:08

those purchase records and find

43:12

assets there's also another way that

43:14

we're going to look at in a minute where

43:16

we talk about we can go into the network

43:20

and there's different places where we

43:22

can look for Clues like on network

43:24

switches and firewalls where we can look

43:26

at ARP tables so those ARP tables will

43:29

show us the IP addresses and the Mac

43:32

addresses of any systems that are

43:34

sending traffic through that device

43:37

again typically a firewall or a a

43:40

network

43:44

switch and again we're going to come

43:46

back and and talk about that in a few

43:47

minutes so here's an example of a

43:49

network diagram this is one I just got

43:51

off of the Cisco kind of OT I site that

43:55

they have

43:57

and so we can see here's maybe some some

44:00

switches right we can see a model number

44:02

I don't see any IP address for it so I'm

44:05

assuming it has a management interface

44:07

that's probably out of band so it's not

44:09

connected to the rest of the network but

44:11

there's probably still an IP address

44:12

there to manage it unless they're making

44:14

you physically watch the walk to the

44:15

switch to make those

44:18

changes but then I can see oh here's

44:20

some type of asset at 1 18268

44:24

2.400 here's one at 10.1 19511

44:28

19.9 right here's oh here's an HMI at

44:31

10.1 19511

44:34

19.8 so we do have a list of here are

44:37

some assets I think of it as as building

44:40

a Sudoko puzzle or suduku puzzle however

44:43

you say it his ideas is you get these

44:45

little pieces of information like said

44:48

oh I have this asset maybe this switch

44:50

at iie named ie4000 d119 do25 over here

44:55

oh and I know it's in zone one okay

44:58

great that's some great information I

45:00

don't have an IP address for its

45:02

management interface or Mac address or I

45:05

could probably look up the vendor right

45:07

or in this case okay we know it's Cisco

45:11

what

45:11

firmware is running on this box right

45:14

are there any other potential

45:15

applications or software running on the

45:17

box probably not because it's a

45:19

switch but those all pieces of

45:21

information that we need to gather so we

45:23

just have this one little clue that it's

45:25

oh okay you have a switch that's named

45:28

this now go find all this other

45:32

information right same thing like when

45:34

we're over here and and there's other

45:36

pieces because I can say oh well all

45:38

these hosts start with

45:41

10.15.19 so they're on this subnet 10.1

45:46

19519 maybe there's other host in that

45:49

same subnet and they're just not on the

45:52

the network diagram right so it's just

45:54

finding all these little Clues and and

45:55

then having to chase them to

46:00

ground now this is kind of jumping a

46:03

little bit ahead or to the side but this

46:05

is what the home lab Network looks like

46:08

that we're going to be using to do the

46:10

scanning and the the passive sniffing so

46:12

this is what I have set up for the doing

46:15

the the thesis that I was working on so

46:17

you can see I have my my laptop the

46:19

engineering workstation at

46:22

192.168.100.1

46:24

100 and then it's connected with a

46:27

really long Ethernet cable to the other

46:29

side of my living

46:30

room through a unmanaged network switch

46:33

that I paid $20 for off of Amazon so

46:36

nothing special and then actually have

46:39

four plc's connected to it but we're

46:41

only seeing three here but that's part

46:43

of the oh well how are we going to find

46:45

that fourth

46:46

one so you can see I have a click plus

46:49

PLC that's at 200 of an Allan Bradley or

46:53

Rockwell Automation a micro 820 at 220

46:57

and then there's the seens sl1200 at 220

47:01

that I was talking about and then again

47:03

there's there's one other Mystery

47:05

Machine this is what I have out there

47:07

for the the thesis so I don't have any

47:09

other systems that are actually being

47:11

controlled and there's there's no HMI

47:13

the HMI hasn't shown up yet I'm very

47:15

disappointed with that um but so that's

47:20

what we're going to work with so kind

47:21

we'll come back and look at that but

47:23

this is what we're going to be scanning

47:25

and this is what going to be looking at

47:26

Network traffic for when we come back

47:29

and and get into those

47:32

sections so earlier we were talking

47:36

about one place to find

47:39

information about host on the network is

47:42

in network switches now I should have

47:43

said these are managed Network switches

47:46

so remember this network switch I have

47:49

in the home lab it's unmanaged so it's

47:52

not going to give us an interface it's

47:54

not going to show us us any information

47:56

so it's it's worthless other than it

47:58

provides connectivity which you know

48:00

that's all I cared about

48:02

honestly but if I have let's say Cisco

48:05

Network switches in the environment

48:08

which is still very popular in in

48:10

OT right I can log into the

48:14

switch with an administrative name and

48:17

and password and I can look at the

48:18

config sometimes the configs have pieces

48:20

of information like in this case you can

48:23

see well the switch probably has a a IP

48:26

address of

48:29

192.168.1.1 so maybe that's what they're

48:31

using as a default gateway so they're

48:32

using it as a router which you can do

48:35

with a what they call a level three

48:37

switch right can see some descriptions

48:40

on ports like plc-1

48:43

firewall-1 valve do-1 so oh okay well I

48:46

have a PLC and maybe it's named

48:49

plc-1 what's the IP address on the

48:51

interface named fast ethernet 01 right

48:55

now there's a new PLC I can add to the

48:58

asset register okay it's plain

49:03

Suduko and when you're on that manage

49:05

switch you can also tell it to show you

49:08

the ARP table so the ARP table tracks

49:11

all the IP addresses and the Mac

49:14

addresses and the MAC address is that

49:16

physical 48-bit address that we assigned

49:19

to the network interface

49:21

card when we connect it or that we

49:24

connect to the network

49:26

and so we have that physical address the

49:28

MAC address on each network interface

49:30

and then we logically assign it an IP

49:33

address so we always talk about well we

49:36

talk IP address to IP address well

49:38

really we talk Mac address to MAC

49:40

address the IP address and that's that

49:42

logical address that makes it easier for

49:45

for us to be able to connect to

49:47

computers at that transport layer of the

49:49

OSI

49:53

model but with arp right we can go to

49:56

these network devices and we can also do

49:58

this on on our machines which we're

49:59

going to take a look at in a

50:01

second but any machine that either

50:04

passes tcpip traffic or that talks

50:09

tcpip it's going to have a command to be

50:13

able to look at the ARP cache to see oh

50:16

yeah in this case right I can see

50:18

there's one two 3 four five six seven

50:21

different host with IP

50:24

addresses I can see how long that's been

50:27

in the cache right when's the last time

50:30

that communication was seen now in this

50:33

case I don't see who's talking with who

50:34

I just see there is a host at

50:40

192.168.0.1 and that it has a MAC

50:42

address of 0000

50:45

BB2

50:50

6f and then can also see it's on VLAN 80

50:53

which is also another great piece of

50:55

information we can use but again I'm

50:58

really interested in those IP addresses

51:01

and the Mac

51:03

addresses so that's with being able to

51:06

look at the the ARP

51:08

cache so real quickly just going to like

51:11

okay we're talking about ARP and ARP

51:13

caches so what the heck is ARP so arp we

51:17

use in the world of

51:19

tcpip to allow computers initially to

51:21

find each other and it's also very

51:24

important when we do things like was

51:27

tied in with the DHCP process right if

51:29

you you have a host like a let's say an

51:32

engineering workstation maybe that

51:33

doesn't have a static IP address for

51:35

some reason if you had a DHCP server you

51:39

could use it to assign a dynamic IP

51:42

address to that that workstation now

51:45

that's usually just in it you should

51:47

have static IP addresses for everything

51:49

in OT there's no reason not to right

51:52

don't don't be lazy so but the idea is

51:56

that ARP allows us again to map those

51:59

logical IP addresses to the physical

52:01

addresses the MAC address on each of our

52:04

network interfaces it's a 48 bits long

52:07

which usually represented in

52:09

HEX and then it's broadcast traffic

52:12

which means it goes to all of the

52:14

computers on that local network so

52:17

everybody's going to see it and and

52:19

we'll see some examples in in a second

52:22

so that traffic goes everywhere on the

52:24

network

52:25

so if there's a computer there if

52:27

there's an asset there and it talks

52:30

tcpip or it's able to at least see AR

52:33

traffic and understand it it will see

52:36

the traffic and then try to to process

52:40

it now you can see that last note is

52:43

broadcast traffic including ARP right

52:46

that's actually blocked by routers

52:49

because you don't want to have like this

52:51

broadcast traffic sent everywhere and

52:52

then it gets out to the internet and it

52:54

tries to go everywhere on on the

52:55

internet and everybody else is doing the

52:57

same thing your bandwidth would fill up

52:59

and everything would

53:01

crash so we do broadcast in a very

53:04

limited fashion you even use broadcast

53:08

to do discovery of assets like those

53:11

plcs I had in my doing the home

53:15

research right when I had like the Click

53:18

PLC when I installed the click PLC

53:21

software on the engineering workstation

53:23

the first thing it does is it sends out

53:25

a broadcast out on the network to say

53:29

hey are there any click plc's out there

53:33

and if there's any click plc's out there

53:35

on the network they respond back and say

53:37

yeah hey I'm here here's my IP address

53:40

here's my Mac address here's my firmware

53:42

version hey I'm in run mode or I'm in

53:44

stop mode it's they give a lot of

53:47

information here's my

53:50

name like too much information but it

53:53

makes it super easy right to set up and

53:56

configure right that's that whole

53:58

balance between if it's easy to use it's

54:00

probably not secure and vice

54:05

versa so if we want to look at ARP

54:08

traffic and we can generate ARP traffic

54:11

if we want now we can go back and

54:13

actually have wire shark running so just

54:16

capturing traffic from the let me uh go

54:20

back to there it is so here we have wire

54:22

shark oh my gosh I think I had just

54:24

updated it so it's

54:26

a very tiny window so let's yeah blow it

54:29

up so it makes it easier to

54:33

read and so here's all the traffic

54:37

that's happening on the the home

54:40

lab and I can see oh yeah there's an

54:42

engineering workstation to that's the

54:44

remember the Dell right there it's

54:46

taking that 48 bit Mac address and it's

54:49

remember if we take that first half the

54:52

first 24 bytes or bits sorry

54:56

and we do a look up on the i e Mac

54:59

database we can see who the manufacturer

55:02

is so I see oh Dell oh okay well that's

55:04

my

55:05

laptop or oh seens oh well I guess

55:09

that's the Seaman PLC or Phoenix

55:12

contact right or and then I guess those

55:16

are the ones that we see there there's

55:18

there's a few more out

55:22

there but that's the idea if we start to

55:25

see the traffic if I want to limit it

55:27

just to the ARB traffic I can just go up

55:29

into that upper field type in ARB and

55:31

then hit enter now we can see just the

55:34

ARP traffic that's that's been captured

55:37

from the

55:40

network and usually remember with ARB

55:42

again it's computers trying to find

55:45

other

55:48

computers and so and you can see oh yeah

55:51

here from this Rockwell device it's any

55:54

broad so it goes out to everybody on the

55:57

network over ARP and it says hey who out

56:00

there has an IP address of 169.254 do1

56:08

153-178 in this case probably what

56:10

happened is that PLC got turned on and

56:13

the DHCP server that I was using

56:15

cheating with uh was turned

56:18

off and so it was saying hey I'm going

56:20

to give myself an IP address in this

56:23

169.254

56:25

15531 178

56:28

range if you're out there and you're

56:30

using this IP address tell me now and I

56:33

won't use it but if it doesn't get a

56:35

response back and it sounds like that IP

56:37

address is free it'll use the IP address

56:40

idea is we just want to check because if

56:41

you have two hosts using the same IP

56:43

address there's going to be

56:45

conflicts and then one will send traffic

56:48

one won't they'll be stepping on each

56:49

other and you'll have lost connectivity

56:52

and you'll you'll drive yourself crazy

56:53

trying to troubleshoot it

56:57

so that's one type of of ARP or

57:00

broadcast you can also see the more

57:02

common one is the second one we see

57:04

where you can say oh who has

57:07

192.168.1 100210 tell

57:10

192.168.100.1

57:12

100 what that means is the engineering

57:16

workstation at

57:18

192.168.100.1 100 remember you can see

57:20

the source says

57:22

Dell it wants to talk with the PLC

57:28

at210 but it hasn't talked to it yet so

57:31

it doesn't know what the MAC address is

57:33

we again we know the IP address but we

57:35

don't know the MAC address the only way

57:37

to get the MAC address is to send out

57:39

this broadcast and just shout out on the

57:41

network hey if you're out there hey 100

57:45

tell me what your Mac address

57:48

is and then if 100's out there it should

57:51

respond back and say oh yeah here's

57:53

here's my Mac address

57:56

we don't actually see it uh right oh

57:59

actually it probably responded back not

58:01

with a broadcast but unit cast or

58:03

pointto point which is why you probably

58:05

don't see

58:07

it but that's some of the ARP

58:11

traffic if I go ahead and let's go ahead

58:14

and oh let me hide my little recording

58:16

bar let's go ahead and stop this we're

58:18

going to go and let's do a brand new

58:22

capture right because what we're talking

58:24

about about back on the slides is we can

58:27

use nmap as a tool to generate a ARP

58:30

broadcast on the local subnet to

58:32

hopefully find hosts that are out there

58:35

and you'll see how effective or let's

58:38

say uneffective it could be right it's

58:41

more effective in in certain

58:42

environments I surpris it's less

58:44

effective but let's let's go ahead and

58:46

open up end map all right so if I use

58:50

nmap and we're going to go ahead and

58:52

test against our 100.0 24 that's the the

58:56

subnet mask so or subnet range and

58:59

subnet mask for the the home research

59:04

lab and what I'm going to do is I'm

59:06

going to do a dash s lowercase s

59:10

lowercase

59:11

n that basically says do a ARP

59:18

broadcast so if I go

59:21

back to Wi Ark you can see that's EX

59:25

exactly what what end map is doing you

59:29

can see it's just saying hey

59:30

192.1681 100. one are you out there

59:33

right we go all the way to the beginning

59:35

right are you out there right or I guess

59:37

kind of out of order

59:39

but one are you out there two are you

59:42

out there 85 are you out there 86 are

59:45

you out there 87 are you out there it's

59:48

going through all 254 possible

59:51

combinations to say hey if you're out

59:53

there if you are tell me and I'll add

59:56

you to my list so here we actually see a

59:59

response somebody responded back and

60:01

said oh yeah hey I'm

60:03

192.168.1 100.2 200 and I'm at 00 d07

60:09

c18

60:11

5687 so well now we know there's

60:14

something at

60:17

192.168.1 100.2 and it has a MAC address

60:20

of 00 d07 c1a 5687

60:25

and we took that 00 D 07c the first half

60:29

of the MAC address and we looked it up

60:31

or wi shark did in this case in the it

60:34

jle database and it says oh that was was

60:38

manufactured by the

60:42

electronics I know that's going to be

60:44

the click

60:48

PLC again this is how we can look at

60:50

Network traffic to get an idea of oh

60:53

yeah there's two host right there's one

60:56

at

60:56

192.168.1 100.2 and

60:59

192.168.1

61:01

100100 and if we keep going down then oh

61:05

we found oh here's somewhere here's

61:07

somebody who's a Rockwell device and

61:10

it's responding saying hey I'm at 210

61:13

and my Mac address is BCF 49900

61:17

1392 and if you take that BC F4 99 and

61:21

you look it up in the i e Mac database

61:23

you see Rock

61:25

automation like oh okay well there's the

61:27

Rockwell

61:28

820 the micro 820 PLC I have sitting

61:31

over

61:33

there so again it's building the suduku

61:37

puzzle now some OT environments will

61:40

tell you not even to generate ARB

61:42

traffic that is too dangerous so that's

61:45

a whole conversation you have to have

61:47

and and any type of scanning or any type

61:50

of network traffic you create you're

61:52

going to need authoriz ization to do

61:55

that in the

61:56

environment most people will tell you

62:00

that you know our traffic is very

62:01

limited it's not I guess heavy to to to

62:05

hit systems if it's just like one packet

62:08

hitting all of them you know one

62:11

time so I think a lot of environments

62:14

will say yeah there's a

62:15

place but that's the idea of an ARB

62:18

broadcast where it just ask hey if

62:20

you're out there on the network tell me

62:23

and you could see that there were some

62:25

responses saying hey I'm here here's my

62:27

Mac

62:29

address so we have that ability and then

62:32

nmap comes back and puts it oh in the

62:35

screen for you and says oh yeah well we

62:38

found someone at 100100 well yeah that's

62:40

the workstation we're running the the

62:42

scan from so thanks for

62:44

that and then we can see oh there's

62:47

there's something at 251 but we don't

62:48

know what that is

62:50

yet it's actually another IP address on

62:53

the same laptop so don't get too excited

62:56

there now we can also see that oh

62:59

there's one something at

63:03

100.2 and it's we don't know exactly

63:05

what it is but here's its Mac address

63:08

and here's the vendor coyo Electronics

63:11

that's the The Click

63:13

PLC and then here we have oh there's a

63:16

host at 192.168 what 100210 and well

63:21

that is an unknown Mac address which is

63:24

we see nmap doesn't know what these are

63:28

because it hasn't updated its i e Mac

63:31

database but wi shark

63:33

does so wire shark's own local database

63:36

is more up to- date than this version of

63:39

of end map and this should actually be a

63:40

fairly new version of

63:43

nmap so that's why nmap and wi Shark

63:47

look definently they're just using

63:49

different versions of that

63:51

database now also remember there's two

63:54

other plc's out there but we're not

63:55

seeing them here and so as we get

63:58

further on through this part we'll see

64:00

well why is that why aren't we seeing

64:03

that well are they talking tcpip or

64:06

maybe they are talking TCP but maybe are

64:08

they hidden in some way shape or form

64:12

right something something to consider

64:14

but not to to give everything

64:18

away sometimes and this is a screenshot

64:20

I took from another wire shark capture

64:23

and in general

64:25

uh broadcast traffic what you see is the

64:27

destination is all FS which represents a

64:30

subnet mask and destination of

64:35

255.255.255.0 which logically means we

64:37

go to Every machine on the network right

64:41

this was just a different type of

64:42

capture this was not uh end map

64:45

traffic right um and here's a screenshot

64:48

of this was on my home it

64:50

Network right so I can see my default

64:53

gateway at

65:04

10.21.13

65:06

1.24 or oh again there's some unknown

65:09

device but we know it's at 10.2.1

65:13

247 I see there's oh some type of Intel

65:16

device that's almost always like a PC or

65:19

a laptop I see that at 10.2.1 254 and

65:22

then oh there's a Roku TV at

65:26

254 right right down

65:30

here and then there's also something at

65:33

252 but we're not sure what that

65:36

is so get lots of information right and

65:40

that's a great tool to use I love map's

65:43

still my favorite tool and it's 25 years

65:45

old and I've been using it pretty much

65:48

since day one when it came out so we'll

65:50

talk a lot more about that as we go on

65:52

but that's just a real quick brief in

65:56

introduction so I also mentioned you can

65:59

go into other different types of systems

66:01

to look up the the ARP

66:04

table so I can go and I can if I open up

66:07

the command prompt on my Windows machine

66:10

and I type in

66:12

rp-a you can actually see and this for

66:15

every inter I have every interface on

66:17

the machine I have a ton of interfaces

66:19

because VMware is installed and a few

66:21

other things are emulation software is

66:23

installed

66:25

but you can see for this one interface

66:27

it knows oh here's a bunch of IP

66:29

addresses and their Mac addresses now

66:31

some of these are are not valid IP

66:34

addresses for individual hosts they're

66:36

either what we call Local Host or

66:38

they're broadcast addresses or they're

66:41

multicasting addresses as well so a lot

66:44

of and I know this is not that place to

66:47

have that discussion but I realize some

66:49

of these are not valid host right we're

66:51

looking for things if you want to think

66:53

like in in the middle of the range so

66:55

we're not looking for one we're not

66:56

looking for

66:58

254 but I'll take oh there's

67:04

210 right or 254 that could be

67:09

legit and that's oh um no that's that's

67:14

probably about it those are the only

67:15

legit IP addresses so this is not the

67:17

greatest example I'm sorry because of

67:19

the way all of this do

67:22

work but that's where we're at actually

67:24

see in here so you have to limit all the

67:25

things like the broadcast addresses

67:27

remember all fs and all those local

67:30

hosts like 1.1 or 1. one it actually

67:33

could be a legitimate

67:35

host everything else those are all

67:37

multicast addresses plus the Last

67:39

Broadcast so those are not you know

67:41

individual host in which we're looking

67:43

for now Linux you can see oh here

67:46

there's the host has a Gateway and

67:48

here's the MAC address you still have to

67:50

do a look up what's the IP address for

67:52

the Gateway

67:55

and then here you can see oh yeah here's

67:57

two other hosts one at 2.2 and one at

67:59

254 and here's the Mac addresses for

68:03

those so I'm not sure if those examples

68:05

help or H it depends on if you have some

68:08

tcpip experience so it's a way to look

68:13

for again hints on where are some IP

68:15

addresses and what are those Mac

68:17

addresses that are out there but it's

68:20

not as easy as oh here's all these IP

68:21

addresses because again most of these IP

68:23

address addresses are not actually valid

68:27

host IP

68:31

addresses so we've already alluded to

68:33

this idea that if we want to do active

68:36

scanning or we want to map the network

68:39

using a tool like

68:44

nmap that it can be very risky SL

68:49

dangerous if we want to just use nmap or

68:52

another type of scanning tool like a

68:54

vulnerability

68:56

scanner to just Blast away on the OT

69:02

Network now perfect world we can scan

69:05

everything at any time and not worry if

69:09

anything the problems I see in a lot of

69:11

OT environments is it's not that nmap's

69:14

going to necessarily blow something up

69:16

or vulnerability scanner is going to

69:18

right it's going to take out that PLC

69:20

that's going to cause an explosion and

69:22

put this huge crater in the ground

69:24

is the fact that maybe the network is

69:26

not wired

69:28

correctly and so by generating an end

69:31

map scan it could take down the network

69:33

if the network switches aren't

69:35

configured correctly that that could

69:37

definitely

69:42

happen so we H we still have to be

69:47

careful a couple things to remember yes

69:49

we're going to be careful if we're doing

69:50

any type of network scanning we have to

69:53

have author authorization

69:55

first keep in mind and like we'll see in

69:58

the lab right not all those plcs are

70:00

running

70:03

tcpip so when we do a a look you know an

70:06

ARP scan to look for host running tcpi

70:10

and get their Mac addresses remember we

70:11

only saw two assets

70:15

respond but we know there's two other

70:17

PC's

70:18

there like hm okay well what are they

70:22

running

70:24

and we'll talk more about this as we go

70:26

on when we get into the thread and

70:27

vulnerability management part which is

70:29

next right or say that says UniFi but

70:31

it's part six so the next next uh

70:37

video again with active scanning we're

70:39

only going to do this with authorization

70:41

right and the whole point with active

70:43

scanning is we're generating packets to

70:45

put on the

70:47

network why people in OT environments

70:50

get scared when you do this especially

70:52

the the old school folks

70:54

is that older OT equipment they're not

70:57

designed to understand different types

71:01

of network packets they're only designed

71:03

to understand the specific Network

71:06

packets that are legitimately being sent

71:08

to it they don't have you know basically

71:12

error checking information or error code

71:14

or collection built in so if I get am an

71:18

older PLC and I get this packet that's

71:20

saying hey what's your Mac address but I

71:23

don't understand what ARP traffic is I

71:26

get so confused that it takes up all my

71:28

resources and I

71:30

crash that's why active scanning still

71:32

has a bad

71:34

name in OT environments and it can still

71:37

cause issues right and so we always want

71:40

to make sure are people going to be safe

71:42

is the environment safe is the plant

71:44

going to stay up and running can you

71:45

guarantee those things

71:47

100% if you can't don't think about

71:50

running

71:52

nmap

71:54

so there's a a give and take there's

71:56

there's a balance especially in newer

71:58

environments right there's there's an

71:59

approach that that we'll talk about

72:01

where we can find that that good balance

72:04

where we can scan and and where we can't

72:06

or where maybe we can again it just is

72:08

going to depend from environment to

72:12

environment and we mentioned the common

72:14

uh n Maps or scanning tool Network

72:17

scanning tool we use is nmap whether

72:19

it's an it or or

72:21

OT because it it's been around for 25

72:25

years and and it's still the one tool

72:27

everybody use it's like wire shark

72:29

because it works and it does an awesome

72:31

job I do anything else any other tools

72:34

you say Network scanning tools uh that

72:36

are quote unquote better than nmap it's

72:39

only because they're faster and they can

72:41

be super fast and those could definitely

72:44

crash an OT Network because they can

72:46

definitely crash an IT Network that's

72:48

wired correctly so they could easily

72:51

crash an either an OT Network that's

72:53

wired correctly or an O OT Network that

72:56

is not wired correctly at all if you

73:00

want to see some of the horror stories

73:01

you can follow uh Josh Vorhees on uh

73:05

LinkedIn he runs a company called trace

73:07

route and that's his whole focus is

73:09

doing networks in OT environments and he

73:13

has you know crazy stories about

73:15

networks going down or you know assets

73:18

not able to talk to each other and they

73:19

get called in to to do troubleshooting

73:21

so it's really fascinating at least for

73:23

me you being an old networking

73:27

person so let's talk about end map a

73:30

little bit now I have a full end map

73:33

Workshop that I'll I'll probably post

73:35

either alongside this or or after the

73:39

course but uh I mentioned I'm a I'm a

73:42

big fan I've always been a big fan since

73:43

day one I remember when map pretty much

73:46

came out and and it was this amazing

73:49

tool where it's like oh I can map I can

73:51

see what hosts are on the network and

73:53

not only what hosts are on the network

73:55

what what ports are open on those host

73:58

TCP and UDP Port so then you could start

74:01

to guess

74:03

what services are there over time nmap

74:08

added additional functionality like

74:10

service script scans that we're going to

74:12

look at to give us more information but

74:14

it's an amazing amazing tool right and

74:17

again still is it's the reason why

74:19

everybody still uses it 25 years down

74:21

the road there created by a gentleman

74:24

named he went by Theodore so he was ran

74:27

reading Russian Russian literature at

74:30

the time that was his thing so but

74:32

Gordon lion I uh got to meet him at

74:34

Defcon one year many many years ago and

74:37

uh I think nmap 2.0 was was out at the

74:42

time but uh you can download map from

74:45

insecure. org even though humans are

74:48

insecure computers are unsecure but

74:51

anyways um nmap runs on just about any

74:55

operating system out there whether it's

74:59

Windows Linux uh any variation of of

75:03

other uh systems that that are out there

75:06

uh Android you can you can run it I saw

75:09

a study where they're talking about the

75:11

software that comes with entertainment

75:13

consoles and high-end cars and there was

75:15

you know $100,000 Mercedes that had nmap

75:19

installed on them which which is kind of

75:22

funny because it used to come just

75:24

installed by default on a lot of Linux

75:26

host there is a guey interface uh in it

75:30

called zenmap that's your thing I think

75:33

a lot of people look down at you though

75:35

if you use the the guey interface right

75:37

you're supposed to use the command line

75:39

uh you can see the current version is

75:42

7.94 uh and then I actually have some

75:44

quick start guys that you can find on my

75:46

GitHub

75:48

repository and you can see the URL there

75:51

and this is what they they look like so

75:52

there's one

75:53

for it so this is the it version and so

75:57

it gives you some the basic commands of

76:00

scanning a subnet running things like

76:03

script

76:04

scans and service scans which are

76:07

incredibly powerful in in end map and

76:10

then there's also the icot

76:13

version so it has some of the the basic

76:16

scannings like from the the previous

76:18

quick guide but then you can see things

76:20

like in the lower middle you can see a

76:22

list of you know some of the more common

76:24

ports that we see for industrial control

76:27

protocols that run over

76:29

tcpip so when we talk about mod bus or

76:33

really again it's mod bus over

76:35

tcpip we can see it runs on TCP

76:39

502 or S7 S7 com right the Seaman

76:43

industrial control protocol it runs on

76:46

TCP 102 and and so on and so forth so so

76:51

those are there to help you get started

76:52

with map whe whether it's in it or in

76:57

icot so we'll play around with some of

76:59

this in a little bit when we talk about

77:01

active scanning and and looking at the

77:03

home

77:04

lab now with scanning a network and this

77:08

is what I touching on a little bit just

77:10

a few minutes ago is using a tool like

77:13

mmap we can go ahead and scan the

77:16

network and really what we're looking

77:18

for is we're looking for what hosts are

77:22

on the Network right so we're looking

77:24

for live hosts so really I'm almost

77:27

always looking for IP addresses just

77:29

like we were looking at earlier when

77:31

we're looking in you the the wire shark

77:33

capture or the ARP tables right I want

77:36

to find IP addresses and Mac addresses

77:39

that indicate live hosts right hosts

77:42

that are on and active on the

77:44

network then we have open ports right in

77:49

TCP we have

77:52

65,535 possible ports that can be active

77:55

and open on one system running

77:59

tcpip and then you also have

78:02

65,535 UDP ports as well and we're going

78:04

to come back in in a little bit and talk

78:06

about the differences between TCP and

78:11

UDP now once I see those ports are open

78:14

then I can do additional tests using

78:16

nmap like service scans to determine

78:19

well what's running on that open port so

78:22

maybe I see TCP 22 is open and I can

78:26

assume that's for SSH but let's not make

78:29

any assumptions let's do some additional

78:31

checks because maybe it's not SSH but

78:34

maybe it's being used for SFTP like

78:37

secure

78:38

FTP which yes it uses SSH but but I

78:42

think you get the idea so we want to do

78:44

additional checks to make sure what

78:46

really is the service that's running on

78:48

that

78:50

Port same thing if I see TCP e 502 open

78:54

I can assume it's modbus but is it let

78:56

me double

78:58

check and then if it is well then maybe

79:01

I can determine oh then maybe it's a

79:04

PLC but we want to find Live host we

79:07

want to enumerate or determine what open

79:09

ports are on those host then we want to

79:11

find out what services or applications

79:13

are tied into that

79:17

Port then we want to find the version of

79:19

that software of that application so

79:22

earlier we mentioned SSH well what

79:24

version what type what vendor of SSH oh

79:27

it's open SSH version

79:29

2.22 well if I have that version

79:32

information and the vendor information

79:34

and then the the type of software I can

79:37

use my best friend Google to see are

79:39

there any vulnerabilities associated

79:41

with this

79:45

software or maybe I determine oh this is

79:47

a PLC well what type of PLC what version

79:51

of firmware is it running because

79:52

there's end map scripts that will help

79:54

you find that information on plc's and

79:56

we'll see that when we look at the do

79:59

the active scanning on the the

80:02

lab so I can take that information again

80:05

back to my friend Google and say hey are

80:07

there any vulnerabilities on this host

80:11

and if there are then if we're an

80:13

attacker or a pin tester right we win

80:17

essentially if we're on the defensive

80:19

side we need to determine what do we do

80:22

next now I'm jumping ahead right because

80:24

that's the next part in the course where

80:25

we're talking about thread and

80:27

vulnerability management so we're not

80:28

going to go too far down that rabbit

80:30

hole right

80:31

now but Live host to open ports to what

80:35

services and applications are running on

80:37

those ports to what version of those

80:40

services and applications because we

80:41

want to go to our friend Google and

80:43

determine are there any existing

80:46

vulnerabilities on these

80:49

hosts and well if there is a

80:51

vulnerability is there an exp exploit

80:53

that we can use to take advantage of

80:56

that vulnerability and maybe gain full

80:57

control over that

80:59

asset so those are our scanning

81:06

objectives now nmap has a whole bunch of

81:09

different scans that it can do and this

81:12

is one where I'll just I don't have a

81:14

slide on this but I remember the first

81:16

time I took Ed scotus SS course and Ed

81:19

scotus is considered kind of The

81:20

Godfather of pin testing and he built

81:23

all all the offensive security courses

81:26

for for

81:28

sanss and so Ed and super super great

81:32

guy I mean like many of the Sans

81:34

instructors they're just all really

81:36

phenomenal people that that want to help

81:39

but I remember him talking about if you

81:41

really want to understand how your tools

81:43

work run wire shark behind the scenes so

81:48

that way you can go back and watch

81:50

what's happening just like earlier

81:51

remember we were watching

81:53

that ARP traffic that was being

81:55

generated by an ARP scan in

81:57

nmap so we could actually understand

81:59

what's happening or what's being taken

82:01

place by the actual tool

82:05

itself so just keep that in mind you

82:08

don't have to do it but I've done that a

82:12

big part of my career especially when

82:13

learning so that way I could watch the

82:16

tool see what it's doing behind the

82:17

scenes actually in the first

82:20

Sans IC course that I took they had some

82:23

end map commands and they said oh only

82:24

use this end map command because it does

82:26

not do trying to remember at this time

82:29

right

82:30

XYZ and basically I had to point out

82:32

well if you run wi shark and you run

82:34

this command just as you have it for

82:36

nmap it actually does it doesn't do XYZ

82:40

but it does Y and Z which is you

82:42

definitely don't want those happening in

82:44

an OT

82:46

environment so use wi shark while you're

82:50

running these tools to understand what's

82:52

actually happening behind the scenes how

82:54

are they what are they actually doing on

82:56

the network that's even more important

82:59

now in OT than than in it again it a lot

83:02

of environments is just like scan away

83:05

247 365 scan whatever you want whenever

83:08

you

83:09

want that's what it is like at my day

83:12

job I can scan 40,000 hosts anytime I

83:16

want in an OT environment maybe with 100

83:19

host or 50 host I'm not scanning

83:22

anything

83:24

usually we'll talk more about that as

83:29

well so one of the first types of scans

83:32

that we're going to run with nmap is a

83:34

ping sweep so this is where typically

83:38

nmap will send out an icmp echo request

83:42

which is that first part of the the Ping

83:44

packet to say hey are you there and if

83:46

it gets a response back we understand

83:49

that there's a host there if that host

83:51

responds back back with an echo

83:54

reply and that's generally how it it it

83:57

works there's some small exceptions can

83:59

run wire shark in the background if you

84:00

want to learn how those different

84:02

exceptions work but let's go ahead and

84:05

open up a command prompt and we can go

84:07

ahead and just do a quick scan against

84:12

the home lab that we have set up again

84:15

where we're just going to do a quote

84:17

unquote ping sweep and send out an echo

84:20

request now technically behind the

84:23

scenes since the host recognizes that

84:26

it's on the same subnet as the host that

84:31

we're targeting so the engineering

84:32

workstation is on the same host as the

84:34

rest of the lab it realizes since

84:37

they're on the same same host he can

84:38

just do an art broadcast to to get a

84:41

response and not have to send out icmp

84:44

packets so that's actually what's going

84:45

on behind the scenes uh if you're not on

84:48

the same subnet you're trying to scan

84:49

then it'll actually send out icmp Echo

84:52

requests but

84:55

anyways so here you can see that we did

84:58

a quote unquote ping sweep against the

85:00

home lab and we saw oh okay there's a

85:03

host at 100 at 200 and that looks like

85:06

that's associated with coyo

85:08

electronics there's another unknown host

85:11

at two uh 200

85:14

210 and then there's another one at 220

85:18

where we see

85:21

seens so so we have a seaman Industrial

85:24

Automation product so some Seaman thing

85:27

is there at 220 we have some unknown

85:30

entity at 210 and then at 200 we have

85:35

coo Electronics right so we have an idea

85:38

at least that there's these three host

85:41

that are on the subnet that we can pick

85:43

up from active scanning now remember

85:45

there's there's more because we have the

85:46

engineering workstation but we're

85:48

scanning from the engineering

85:50

workstation so we don't see it and

85:51

there's actually another PLC out there

85:54

that is active on the network it's just

85:56

not configured with

86:01

tcpip so once we find hosts that are out

86:04

there we want to do a port scan right

86:07

this is going to allow us to find the

86:09

individual ports that are open on that

86:13

asset usually use the example if you're

86:15

not familiar with ports the idea is

86:18

especially I always think of it as from

86:20

the attacker perspective is think of if

86:23

somebody wants to break into a house in

86:25

your neighborhood they're going to

86:26

they're going to drive through in their

86:28

probably in their car maybe they walk

86:30

through the neighborhood and just

86:32

casually looking for are there any open

86:35

windows or maybe any doors that are

86:37

popped open maybe the garage door is

86:39

open and so they're looking for those

86:42

openings that you can use to get into

86:44

the house well in this case those ports

86:48

are the doors and the windows that we

86:50

can use to get into the

86:54

system now we talk about each host

86:57

running

86:58

tcpip each each of those has

87:02

65,535 TCP ports and then you have

87:05

another

87:07

65,535 UDP ports as well now we're

87:11

mostly focused on the TCP

87:14

ports and we'll talk about that in a

87:16

little bit why but it takes a long time

87:19

to scan all the UDP ports where doesn't

87:22

take too long to scan all of the

87:27

65,535 TCP ports but that's the

87:30

differences between how in TCP and UDP

87:32

work and we're going to come back and

87:34

talk about that now we also look at

87:37

ports and there's this idea that we have

87:39

these well-known ports so any port

87:41

between 1 and 1024 essentially is

87:44

considered well-known which means if I

87:47

see a port like Port 80 that oh we know

87:51

that Port 8 that's used for HTTP that's

87:53

the the default Port that's used for a

87:56

web server for a web page or if you're

87:59

going to the encrypted version you would

88:03

go to Port TCP

88:06

443 right those are commonly known ports

88:10

so the idea is that people aren't

88:12

supposed to use those ports for anything

88:15

else than what they're commonly known

88:18

for it doesn't mean that uh normally

88:22

right tcp2 is used for email SMTP to to

88:26

send email but what

88:29

if I put a web server on Port 25 you can

88:33

do that you can put pretty much any

88:36

application on any port you want you

88:39

just have to maybe make some adjustments

88:42

to be able to reach it like in that case

88:44

you have to take tell your web browser

88:46

not to go to Port 80 or 443 by default

88:49

but to go to Port 25 it'll still work

88:51

you just have to do the extra work to

88:53

say hey go to Port

88:55

25 realistically anything over 1024 is

88:59

kind of wide open there's this idea sure

89:01

there's registered ports and so they're

89:03

associated with different applications

89:05

but

89:07

yeah and then say and then there's free

89:09

ports again for me everything over 1024

89:12

pretty much is open you can do a Google

89:15

Search and there's a couple main pages

89:16

on the internet that will show you you

89:19

know Common applications with associate

89:22

ports but a lot of those still have

89:24

dozens of applications associated with

89:27

them so it's not like a one toone

89:29

relationship so again at that point does

89:32

it really matter if I put my own

89:35

application on a port that 20 other

89:39

applications are going to use as well as

89:41

long as they're not running on the same

89:43

machine there's no

89:44

conflict it's only when you try to run

89:46

two applications using the same port

89:48

that's where well one's going to bind

89:50

into the port and use it and the other

89:52

one's going to be like sorry the port's

89:54

not available I'm not going to be able

89:55

to work until you put it on something

89:59

else so we want to go through and find

90:02

all of the different ports that are open

90:03

on the system right if we're the thief

90:05

walking down the neighborhood we're

90:07

looking for the houses we're looking for

90:11

the windows we're looking for the doors

90:12

then we're starting to look at well what

90:14

you know do does it look like the the

90:16

windows cracked open or maybe somebody

90:18

left the garage door slightly open right

90:21

maybe a door a jar so we can slip

90:25

through that's really what we're we're

90:28

looking

90:31

for so we'll take a step back and talk

90:34

about and I mentioned right there are

90:35

differences between TCP and

90:38

UDP idea is TCP is what we call a

90:40

connection oriented protocol versus UDP

90:43

which is

90:45

connectionless the idea is and we use

90:47

the example that if I want to send I was

90:50

talk about I want to send a a say

90:52

Christmas card to my mom who actually

90:55

just did till recent she used to live in

90:57

San Diego on the other side of the

91:00

country so if I wanted to send her a

91:03

Christmas card I would take it down to

91:06

the post office I get the letter or the

91:08

the card in the envelope and I would

91:10

address it i' put her her address on it

91:12

I put my address on it and then I put a

91:15

stamp on it and then I would

91:19

uh drop it in the the post office in in

91:23

the mailbox and I'm going to assume that

91:26

it's going to get to where it's going

91:29

now know there's a million in one things

91:32

that could go wrong between where I live

91:35

in South Carolina on one side of the

91:36

country and San Diego where my mom used

91:40

to live she just moved here

91:43

actually but I she might not ever get

91:46

that letter right that's the idea of UDP

91:49

traffic it's connectionless we just just

91:51

put packets out there with an address

91:54

right we say this is where it's going

91:56

get it there but we don't have an idea

91:59

of if it actually ever gets there or not

92:02

if I want to make sure my mom gets that

92:04

Christmas card I can go

92:07

to UPS or FedEx and then I can or the

92:10

post office and I can ask for a return

92:12

receipt so I get guaranteed delivery so

92:15

when they drop it off at my mom's house

92:17

I even get a picture right here's the

92:20

the letter at your mom's house or here

92:22

your mom actually signed for this right

92:24

there's a return receipt so I know

92:27

without a certainty of a doubt that she

92:29

got

92:30

it that's TCP so when we say connection

92:33

oriented protocol it means there's a

92:35

return receipt there's guaranteed

92:37

delivery where UDP has no such guarantee

92:42

but because we're not we don't have this

92:44

extra overhead doing the guarantees it

92:47

actually makes UDP very

92:50

fast so when we talk about sending large

92:52

amounts of

92:54

data we like to use UDP because it's

92:58

much faster than

93:02

TCP so when we're doing something like

93:05

streaming Netflix and we have billion

93:07

billions and billions of packets and you

93:10

know what if I lose one or two packets

93:12

it's not a big deal it's not going to

93:14

stop the show from from playing the

93:17

human eye is not going to notice a

93:19

difference on the TV that a couple of

93:22

packets were

93:24

dropped and so it's much quicker to use

93:27

UDP for for things like

93:31

streaming TCP when we talk about that

93:33

connection oriented protocol right it is

93:36

reliable it is slower but it has its

93:38

play sometimes especially when we talk

93:40

more about security

93:42

usually and part of the reason when we

93:44

talk about having that connection

93:46

oriented protocol or how we get this

93:48

idea of guaranteed delivery it comes

93:51

because of the three-way

93:53

handshake and so the three-way handshake

93:56

looks like this where if I have my

93:58

computer let's say on the left hand side

94:00

and I want to talk with let's say this

94:01

this web server on the right hand

94:04

side so before I can just have my web

94:07

browser open up a web page from the

94:09

server my computer actually has to go to

94:12

the server on the port that the website

94:14

is running on and say Hey I want to talk

94:17

to you that's why it sends that

94:19

synchronization or that send packet

94:22

says Hey I want to talk to you and then

94:24

the server nor it needs to send an

94:26

acknowledgement back to say hey I want

94:28

to talk or I'll talk with

94:30

you right so we send a s pack and say I

94:33

want to talk with you and then the

94:34

server is supposed to send an

94:35

acknowledge back back says okay I'll

94:37

talk with

94:38

you the problem is is when we set up

94:41

that connection that's that only allows

94:44

the client on the left to send data to

94:47

the server on the right it doesn't allow

94:51

the server on the right to send data to

94:53

the client it's a one-way connection so

94:56

when two computers talk to each other

94:58

over tcpa we have to set up two way

95:05

communication so they realize back in

95:07

the day instead of sending you know a s

95:10

packet and then an act packet for one

95:13

way and then the other way you would

95:14

send another send packet and another

95:17

ackn acknowledgement or act packet right

95:20

which would be four packets

95:22

that they took the the two metal packets

95:26

and combined those into one just to to

95:29

save some some time and space saves

95:34

bandwidth so now that client wants to

95:36

transfer the web website the web page

95:39

right sends a synchronization packet to

95:42

the server says Hey I want to talk to

95:44

you the server sends the acknowledgement

95:45

back saying Hey I want to talk to you as

95:47

well or I'll talk with you as well and

95:49

then it also combines it send packet to

95:52

say hey I want to talk with

95:55

you and then the client gets that and

95:57

says oh okay he's talking with me oh and

95:59

he wants to talk with

96:01

me right so one he's going to receive my

96:04

information and then it's oh he wants to

96:06

send me information as

96:07

well he or

96:11

she and then it'll take my computer and

96:13

then send that final acknowledgement

96:15

back to say okay I'll talk with you so

96:17

then we get two-way communication

96:20

between these hosts

96:22

again the idea is we could have done

96:24

that with a four-way handshake a sin an

96:27

act a sin and an act but why not just

96:30

combine that send and act packet into

96:33

one so we just save the time and band

96:36

l so that's the idea of the three-way

96:38

handshake now the three-way handshake

96:40

becomes important when we talk about

96:42

nmap because that's what nmap uses to

96:46

determine when ports are open or if

96:48

they're closed or if they're filtered by

96:49

a firewall when we're talking talking

96:51

about testing TCP

96:56

ports and packets can have different

96:58

flags so the sin is a type of flag the

97:02

act or the acknowledgement that's

97:03

another type of flag and there's others

97:06

like urge or push which you could see

97:09

these are more kind of old school when

97:11

youed to have really slow networks but

97:13

trying to you know push in Urgent

97:15

traffic or push it through to to make it

97:18

go

97:19

faster so usually you'll see

97:21

act so you'll start seeing these as we

97:23

go through some of the wire shark

97:25

captures later on but then and then

97:27

there's also the fin and the reset so

97:29

this is for when well we're done talking

97:31

you know I've got my website you I

97:34

loaded the web page I've I've got what I

97:36

needed out of you so thanks take care

97:39

and we go ahead and close down that that

97:41

connection so that's where we'll see

97:43

other flags like fin and and

97:47

reset so there's a sin scan that we have

97:50

at nmat right which is the the kind of

97:52

the default end map scan that we have

97:55

now or they talk about this half openen

97:58

scan because what happens is that let's

98:01

say here I am and I'm doing a port scan

98:03

on this server and so I'll go ahead and

98:06

send a send packet to Port one saying

98:12

Hey I want to talk to

98:15

you if that port is open the computer

98:18

will come back and say okay yeah let's

98:20

talk and I want to talk with you

98:23

too and so at that point we have the

98:26

information we're trying to get and we

98:29

know in this case Port one is open and

98:32

then maybe I'll try Port two and three

98:34

four five six until I get oh Port 80 oh

98:37

Port 80 sends me a synac so I know okay

98:41

Port 80 is open again I'm not trying to

98:43

load a web page off of Port 80 I just

98:46

want to see if it's open or not so at

98:48

this point I know the port's open or not

98:50

so done from a port scanning perspective

98:53

we're done we don't have to send the

98:55

acknowledgement I got the information we

98:57

need right I know that the port's open

99:01

so that's why they call it a half open

99:03

scan because we never send the final

99:07

acknowledgement we know the port's open

99:10

that's all we came for so we're done

99:12

we're moving

99:14

on ports open we win at this

99:20

point now the full send

99:24

scan right and the idea here is right if

99:28

I send the send

99:30

packet and what happens when I get a

99:33

reset act back from the server that I'm

99:37

scanning what this means is that well

99:41

the port's closed so what happens is the

99:42

Sy packet actually got to the server and

99:45

the server processed it and the server

99:47

says oh hey you're testing Port one

99:50

nothing nothing's running on Port one so

99:53

it sends that reset acknowledgement back

99:55

saying nothing here is running on Port

99:58

one so again there's there's two things

100:00

that happen at that point is again we

100:03

know we're communicating with the server

100:05

because the send packet got there and it

100:07

send us a reset act back so we know we

100:10

have two-way communication with the

100:12

server and we know the port's closed so

100:16

again we're trying to scan are the ports

100:17

open or closed well in this case now we

100:20

know the ports closed so again it's

100:21

another one where we

100:25

win the other combination we see is well

100:28

what happens if there's a firewall

100:30

whether it's a network-based firewall

100:32

it's a host-based firewall that's

100:33

blocking traffic because if you think if

100:36

I send a sin packet to test a port and

100:40

the firewall blocks the

100:42

traffic then I never get a response back

100:46

I'm just sitting there waiting and

100:48

waiting and waiting so if I don't get

100:51

any type of response back then we just

100:54

realize okay the port's filter there's a

100:56

firewall Block in us or maybe it was

100:58

some just really freaky network

101:01

connection that just went bad at that

101:02

one particular point in time but let's

101:05

say all the time right it's it's going

101:07

to be oh there's a firewall in the way

101:10

so the three options we have is when we

101:12

scan a port if we send a s packet and

101:16

get a syac back it means oh yeah that

101:18

port's open good okay we know we have a

101:20

Target we have a window or a door that

101:22

could potentially allow us to get into

101:24

the

101:27

house remember if I see a reset act that

101:30

comes

101:31

back in that case it means right the

101:34

port's closed because we're talking with

101:36

the server we said hey we're just

101:38

checking what we want to talk to Port

101:41

one and the server just comes back says

101:44

Hey Port one's closed there's nothing

101:46

here like okay that hey you know what

101:49

that's all we wanted to know open or

101:50

closed remember the third alternative is

101:53

if we send a send packet and there's a

101:55

firewall blocking that traffic we never

101:57

get a response so after an amount of

102:00

time we'll just say okay we're going we

102:02

haven't got a response back we're not

102:04

going to wait anymore we're just going

102:05

to say hey y you know what that that

102:07

Port is filtered means there's a

102:10

firewall somewhere between our computer

102:14

and the target we're scanning right so

102:17

we get closed open filtered

102:24

so we can do these default scans we can

102:27

pick one of

102:29

these systems that we have

102:32

in

102:36

the home

102:38

lab so let's say I'm going to go ahead

102:40

and

102:42

scan I mean they're all kind of the same

102:45

now I can scan 192 say do 16800

102:52

100 oops or sorry 200 so this is the

102:56

click PLC that we have

103:00

in the lab again it doesn't tell us much

103:04

we don't see any open ports we don't see

103:06

any Clos or well we we see a thousand

103:09

closed ports and what this means is by

103:12

default I'm kind of go back to the slide

103:14

I'm kind of jumping

103:15

ahead by default nmap scans the most

103:18

common 1,000 Port so Theodore had a

103:20

project once upon a time where he

103:22

scanned the entire internet with end map

103:25

and then he took all those results and

103:28

then just went through and determined

103:30

you know which Port was seen the most on

103:32

the internet he just put them all in

103:34

order so it's like oh okay so we can

103:36

come up with this idea of whether the

103:38

top 1,000 commonly used ports remember

103:40

on the internet not not internal

103:45

networks so by default it only scans for

103:48

1,000 the top 1,000 Port so so that's

103:50

what we're seeing here is hey I scanned

103:53

the top 1,000 ports and didn't find

103:56

anything now just remember there's

103:59

65,535 ports so just because we don't

104:01

find anything with the default top 1,000

104:04

it doesn't mean that there's not

104:05

something there so we can tell it to

104:07

scan all TCP ports if we

104:11

want so we can use the- p- switch is

104:14

usually what I do because that's the one

104:17

that Theodore talked about when I saw

104:19

him at Defcon a long time ago

104:21

before it was a documented

104:24

feature so you can say Okay scan all

104:27

65,000 535 ports it's going to take a

104:31

second or two or

104:35

60 so now that the scan completed we

104:38

scan all

104:40

65,535 ports we do see that there is one

104:43

port identified as open so we see TCP

104:47

502

104:49

open now now we can assume we know what

104:53

that's normally associated with or some

104:55

of you might not but we'll find out well

104:58

how how do we know what what's running

105:00

on that that Port right and and we'll

105:03

come back and and we'll look at that in

105:06

in a sec and here going back to slide

105:08

this is where right we're scanning all

105:10

the ports in this case you can see in

105:12

the example right that's a Windows box

105:14

that that we're scanning or in this case

105:16

we know we're scanning a

105:19

PLC

105:24

we just kind that was a side by-side

105:26

comparison so we can scan UDP

105:29

ports so instead of the the normal

105:33

default scan we actually have to specify

105:35

Dash lowercase S capital

105:38

u now the problem with UDP is that UDP

105:41

traffic is just sent remember we put the

105:43

mail in the mailbox and we assume it

105:46

gets to where it's going there is no

105:49

three-way handshake because we use that

105:51

three-way handshake for guaranteed

105:52

delivery there's no guaranteed delivery

105:55

in

105:57

UDP so because there's no three-way

106:00

handshake mmap doesn't have that that

106:02

real true functionality on how to

106:05

determine if a UDP port is open or not

106:08

there are some tricks where it kind of

106:11

can so in this case you can see if it

106:13

sends UDP traffic to a port that's not

106:16

open it should get an icmp Port

106:18

unreachable message back from the server

106:21

or the target

106:23

should but might or or might

106:28

not and we could use that to determine

106:31

the port is closed right and anything

106:34

else would be considered open or

106:37

filtered or that the server is just not

106:40

responding so that's it so when you try

106:44

to scan UDP you can kind of get an idea

106:48

but one is is you're only going to scan

106:52

a handful of

106:53

ports and mostly because it takes an

106:55

extremely lot of time because UDP just

106:58

you have to sit there and wait and wait

107:00

and wait to see if you ever get that

107:02

icmp Port unreachable message to tell

107:05

you that the port's closed and then

107:06

otherwise you say oh it's open or

107:08

filtered well there's a big difference

107:11

between is a port open or is it filtered

107:13

by a firewall right those are completely

107:15

two different

107:19

things

107:21

so UDP you're going to scan a few ports

107:23

but you're not going to

107:25

scan for

107:28

everything but here's an example of

107:30

scanning a it's a a Windows machine

107:33

right for UDP because it does have UDP

107:35

you see things like like for DNS right

107:38

when you do a DNS lookup to resolve a a

107:42

name to an IP address that's over UDP 53

107:47

so UDP traffic does have its place and

107:50

you will see it in certain

107:53

instances and even in control system

107:57

environments and and we'll see a couple

107:58

of

108:01

examples and here's some different ways

108:04

on how we can scan like entire subnets

108:06

which we're doing you can see you can

108:07

scan individual IP addresses or maybe a

108:10

sub range like everything between one1

108:13

and and 100 there's a few things for you

108:16

to to play with there like oops you can

108:20

also import a list a text list of host

108:23

So and I've used this I use this

108:25

actually a lot of times maybe I get a

108:26

list of vulnerable host out of maybe an

108:28

Excel spreadsheet and it has 100 hosts

108:30

and then I want to put them into end map

108:32

to do additional scans to really

108:34

determine what what type of hosts these

108:36

are so you can do that so that's a

108:39

really nice trick you can also you can

108:40

exclude certain hosts maybe I have one

108:43

host that I know that if I scan it it'll

108:45

crash so I'm always going to exclude

108:48

that right in this case don't scan 1.32

108:51

scan everything else in that

108:53

192.168.1 range just don't scan

108:58

192.168.1

108:59

32 right you can scan an entire subnet

109:03

which we've already been doing right we

109:05

say end map and then we give it the

109:06

subnet range Insider notation right

109:08

which is the slash followed by the

109:10

subnet mask and we'll scan everything in

109:14

the entire

109:16

192.168.1 range nice thing also is

109:19

there's the dash dash open option which

109:23

I guess kind of gives away well what's

109:25

running on Port 502 but we'll come

109:28

back the idea is if you're scanning a

109:31

large range and maybe in this case I'm

109:34

saying hey I'm only scanning for

109:36

instances of modbus on 502 but if I scan

109:40

an entire

109:41

range every time I'm I hit a a host that

109:45

doesn't have mod bus running it sends me

109:47

a ho a a message back that says closed

109:50

close close close close close and then

109:52

you see oh open close close close close

109:55

close close it's like well I just want

109:56

to see what's open so that's the dash

109:58

dash open just show me where the open

110:01

ports are so when you're especially

110:03

scanning larger ranges that makes it

110:05

very nice and very clean so just

110:07

something to to think

110:10

about

110:12

oops kind of jumping ahead because the

110:15

one thing that's left off here is well

110:20

what we're seeing here is the service

110:23

scan so if I go back to our window right

110:28

and it's like oh okay I know something's

110:30

running on Port 502 so there's a couple

110:33

things that we can do here one is I can

110:36

go back to our end map command now

110:37

instead of saying oh scan all the ports

110:40

or scan the top 1,000 common I can say

110:43

does just just scan Port 502 because it

110:47

looks like that's the only Port running

110:49

on TCP

110:51

so I want to run just Port 502 and I'm

110:56

going to use what they call the service

110:58

scan in

111:01

nmap so I can use Dash lowercase S

111:04

capital V as inv Victor and what that

111:07

does so now it's only going to test to

111:09

see if 100.2 200 has Port 502 open and

111:15

then it's going to do additional checks

111:17

to tell

111:18

me

111:21

what is actually running on that Port so

111:24

we know Port 502 is open but now it's

111:27

going to come back and say before we saw

111:30

mbap I maybe maybe modb

111:34

something but I don't

111:36

know and I'm not going to make an

111:38

assumption I want to check because

111:40

somebody could put like a web server

111:42

running on

111:43

502 but in this case oh okay it's mod

111:46

bus over

111:47

tcpip awesome so this definitely now

111:52

even more so looks like yeah it's it's a

111:55

PLC well if we want to take it to the

111:58

next level what we can do is we can run

112:00

that service scan again but we can also

112:02

do what they call a script

112:05

scan so we do Dash lowercase S capital c

112:09

as in

112:11

Charlie so now it's going to run some

112:13

additional test on top of the service

112:17

scan to see if it can get any other

112:21

information from that Port now in this

112:25

case by default we don't see anything

112:28

else

112:33

right so at this point we found the port

112:36

we know we verified it's modbus TCP Now

112:39

map also has uh and we we tried the

112:42

scripting engine it didn't come up with

112:44

anything by default now there's also

112:47

individual scripts that you can run so

112:49

so there's one for modbus specifically

112:53

we're going to change that- as capital c

112:55

we're going to change that to just say--

112:57

script and then we're going to type in

112:59

modbus ddis

113:01

discover. NSE which is the name of this

113:05

modbus script and there's there's other

113:08

scripts as well and we're going to look

113:10

at some a little bit later on uh and you

113:12

can see then it comes back with well

113:14

here's the slave ID and I know m still

113:17

is is

113:18

this hierarch based off of Master Slave

113:21

model we're trying to get away from that

113:23

because of the the racist uh connotation

113:26

but or meaning um but for now it's like

113:30

okay here's another piece of information

113:33

about this host and we could use that

113:35

again GA gather more information that

113:38

helps us successfully attack that in

113:42

this case that that PLC right so again

113:46

that probably doesn't mean a lot yet but

113:48

again it's just another

113:50

piece of the puzzle so I think we are

113:52

transitioning from building asset

113:54

registers to penetration testing though

113:57

so I'm going to try and reel us reel us

113:59

back but so that gets us through the

114:02

active scanning portion as far as

114:04

looking for host on the network using a

114:06

scanning tool like nmap right finding

114:09

ports finding and really from building

114:12

asset registers perspective it's about

114:14

what's running on those ports do we get

114:17

information about what service what

114:19

version of that service or application

114:22

is running right so so that way again it

114:24

helps us build out that asset

114:27

register so let's go ahead now and and

114:29

let's kind of switch gears and we're

114:31

going to talk about passive s sniffing

114:34

or passive

114:38

listening okay so and you you can see

114:41

earlier we talked about passive scanning

114:44

but again we're not scanning anything I

114:46

hate that term so we're really talking

114:48

about passive listening sometime passive

114:51

passive sniffing we talk about sniffing

114:53

of of packets and the idea is that we're

114:56

sitting in the network with network

115:00

connectivity where we have visibility to

115:02

see packets moving over the wire and

115:05

that we can capture that traffic so

115:07

again yeah we're not scanning anything

115:09

we're not generating packets and putting

115:11

anything on the wire so this is

115:15

safe to be able to do the only time this

115:18

isn't safe is when

115:20

you unplug the wrong things or you pull

115:24

the power on on a network switch or you

115:26

know the network goes down that but just

115:29

from a passive listening or packet

115:31

sniffing

115:32

perspective again we're not generating

115:35

traffic to put on the network so there's

115:37

no chance of breaking anything from from

115:40

that

115:41

perspective so and we've already talked

115:43

about using wire shark in the in the

115:45

core so we can use wire shark as a tool

115:49

we going open it up or actually I guess

115:51

we already have one instance open up but

115:53

we can open up a new one right in this

115:55

case the uh ethernet adap the killer

115:58

ethernet adapter is is the one that's

116:00

connected to the the home the research

116:04

lab so I can just double click on that

116:07

and then let me go ahead and blow this

116:09

up a little bit so it's a little bit

116:11

easier to little bit easier to

116:14

see and then we can see maybe that's too

116:17

big the traffic as it comes through and

116:20

again right now I'm not seeing any tcpip

116:24

traffic right whereas if you're in an IT

116:26

Network you see tons of tcpip traffic

116:31

and very little anything

116:33

else where now you can see multicast

116:36

traffic labeled as LLP which we're going

116:39

to come back and talk about oh and now

116:42

we're starting to see oh there's some

116:43

icmp we actually see some version six

116:48

traffic if we want we can go ahead well

116:51

I can generate some traffic if I want

116:54

right so why don't I go ahead and can I

116:58

ping that first PLC that's on the

117:00

network oh yeah I'm getting the response

117:03

back and you can actually see there's

117:04

the in pink there's the icmp echo

117:08

request and the icmp reply remember we

117:11

had we did that four times so we have

117:13

four set of icmp echo requests and and

117:16

Echo replies we're seeing some ARP tra

117:19

TR like we were talking about earlier

117:20

remember the broadcast

117:22

traffic and then everything else again

117:25

we start to see it's not tcpip

117:30

traffic but what we're

117:33

seeing is other forms of communication

117:36

from these

117:38

plc's and then if I start looking at

117:40

them let me go ahead and stop this

117:43

capture so now we can see based off of

117:46

the MAC address remember wi shark's

117:47

going to translate that first half of

117:49

the Mac address for us so we do see

117:51

seens right which that lines up with

117:53

what we saw in the nmap scan earlier

117:58

because that Seamans PLC is running

118:01

tcpip but it's also running other

118:04

protocols industrial control protocols

118:07

just not

118:09

tcpip and then we can see oh there's

118:12

another PLC out there number four we

118:15

said kind it's the ghost in the machine

118:17

so it's from Phoenix contact

118:20

now it's not running

118:23

tcpip it's just running other industrial

118:26

control protocols like

118:30

profinet remember Dell that's our

118:33

engineering

118:34

workstation imaginatively named new

118:41

laptop and I think that's all we're

118:43

seeing here we're not seeing any other

118:46

traffic from the The Click

118:48

plc

118:51

so there's a lot we can see and a lot of

118:54

information that's being shared because

118:56

they're actually trying to kind of

118:57

announce information about each

119:00

other right if I open up this one packet

119:03

right we can

119:04

see that this is again coming from that

119:08

that

119:09

seens and if you can read through this

119:13

we can get the idea of the name of the

119:17

PLC we can then and we can see of course

119:20

the vendor we can see the where it

119:22

starts to get into the the kind of the

119:24

software or model type the model really

119:27

actually is that CPU 1200 down

119:30

below right we can see then things like

119:34

hardware version firmware version it's

119:37

proba probably the serial

119:39

number on the device right this is all

119:42

information that's advertised in the

119:44

clear this is not encrypted traffic most

119:47

traffic in OT environments is is not

119:49

encrypted and that's not a bad thing

119:51

people in it always cringe we have to

119:53

encrypt everything to keep it safe not

119:56

necessarily in

119:57

OT and for me I I love it when it's

120:00

unencrypted because it makes Network

120:02

intrusion detection so much more

120:05

easier so I don't have to worry about

120:08

capturing traffic and then breaking the

120:10

traffic breaking the encryption to be

120:12

able to read the tra the packets to see

120:14

you know is there malicious traffic in

120:15

there or

120:17

not so that's actually a really nice

120:19

advantage of not having traffic

120:21

encrypted I'm a big proponent in most in

120:24

most environments not using encryption

120:26

now there's some you know Mission

120:29

critical or super secret sensitive

120:31

proprietary information formula or

120:33

process that that the business is

120:35

worried about an attack or stealing then

120:38

you're going to

120:39

encrypt otherwise if it's no risk to

120:43

physical safety environmental safety or

120:45

the availability of the plant why do it

120:48

especially if it's it's going to give us

120:50

it's going to benefit us more so in the

120:52

long

120:54

run but if you want to see in fact we

120:57

can go ahead I think if I have this

121:00

open uh doesn't look like it but I can

121:03

so we can open up the ta uh portal which

121:07

is the seman software so in this case

121:10

since we were just talking about the the

121:11

semen software we can go ahead and and

121:14

open this up and you'll

121:16

see what and most

121:19

at least the ones I'm familiar with most

121:22

of the client software that we use for

121:24

configuring

121:26

plc's it has this option in this case it

121:30

we go down to online and Diagnostics and

121:34

basically it has an option basically to

121:37

go out on the network and find in this

121:40

case Seaman

121:43

plc's and so we can go ahead and you can

121:45

oh we're going to go start

121:47

search you can see we selected right the

121:50

right network interface and so it's

121:52

sending out traffic to see if it can

121:55

find any devices talking in this case

121:57

probably over

121:59

profet and you can actually see it comes

122:02

back with

122:05

two and so we can see oh well here's our

122:10

Seaman PLC at

122:12

192.168.1 100.00 and oh there's that

122:16

other

122:17

fourth plc

122:20

and oh it does have an IP address

122:22

assigned it's just on a different

122:27

subnet which is why we're not seeing it

122:29

right now we see oh it's

122:34

192.168.1.2 not 100.

122:39

230 but it also still has that other

122:42

traffic that it can use to talk on the

122:44

local

122:47

network so we kind of did it on purpose

122:50

so that way it's it's hidden but we can

122:52

still find it on the network and again

122:54

that's another one and i' I've seen many

122:56

instances of this in the real world so

122:58

this is another example of we're

122:59

building that suduku

123:05

puzzle and there's other options right

123:08

we have but this is how we can work with

123:10

a PLC so if you've ever never connected

123:12

to a PLC through its client software

123:15

this this is pretty pretty standard and

123:19

this is kind of similar to the other

123:21

packages that are out there there's

123:23

usually an option for something like

123:25

flash LED so that way if you had a

123:27

technician or you were you you were

123:29

going to try to program that PLC and

123:31

you're in there and you have a hundred

123:33

Seaman plc's well which one maybe do I

123:37

need to connect directly

123:40

into so you can say oh Flash the L8 LED

123:43

on this one PLC and then when you're

123:45

standing there you can see oh yeah this

123:47

is the one

123:50

or if I want I can go ahead and I can

123:52

connect to

123:54

it and then when I connect to

124:00

it it takes a second but you'll see once

124:04

it loads then we can get into things

124:05

like oh I want to go ahead and be able

124:07

to

124:08

program the PLC or maybe I want to go

124:11

ahead and make you know basic

124:14

changes to the

124:16

PLC right and here where you can also

124:19

see this look like what we were talking

124:21

about earlier is it in run

124:24

mode where you hopefully it's read only

124:28

and you can't make any changes right in

124:30

this case it's not but let's let's go

124:32

ahe and put it in run

124:34

mode you can just see it takes a second

124:37

and it actually already has PLC

124:38

programming so now that PLC programming

124:41

that code is running it's doing its job

124:44

it's monitoring it's it's going to make

124:46

changes in the environment if it needs

124:48

to

124:51

and I can't make changes at least to the

124:53

firmware unless I go into stop mode

124:57

right so the seen SL2 1200 this is one

125:00

of those plcs very

125:02

common but it doesn't have a physical

125:05

key switch or dip switch on the outside

125:07

to control it's just software it's just

125:09

literally you would connect with it

125:10

through the Tia portal and then go in

125:12

here and click stop and then when you

125:16

click on stop that will actually bring

125:18

it bring it down and now I could do

125:20

something like upgrade the

125:22

firmware but okay we'll go ahead and

125:25

turn it back

125:27

on so it just gives you a high level

125:29

intro again if it's something you

125:31

haven't seen before I think the first

125:33

time you see it it's really cool

125:34

especially the first time you play with

125:36

it that's the other thing when I I like

125:39

the you know I suggest if anybody if you

125:42

have the time the resources to go ahead

125:45

and get aplc the best one you can start

125:49

with is the click PLC from automation

125:52

direct because fully loaded it's 400

125:56

dollar which you're not going to find a

125:58

better deal even trying to buy something

126:01

off of eBay you're just not um and they

126:04

have a lot of training for it and all

126:06

their software is free and it's really

126:10

intuitive so it's fairly straight

126:12

forward to use but here's kind of the

126:14

same process that we saw with the Seaman

126:16

software said oh it broadcast see are

126:19

there any click plc's out on the network

126:21

and you see oh yeah here it found one

126:23

and again it tells us all this

126:24

information about itself in this case it

126:26

even says hey I'm in run mode and I'm

126:28

all

126:29

good and so I can go ahead and connect

126:32

to

126:33

it now in this case I actually assigned

126:36

a password for this one you can see the

126:38

seens one did not have a password by

126:40

default and it still doesn't have one

126:42

assigned to

126:43

it have to remember my

126:47

password and then uh in this case we're

126:50

going to just tell it okay use the

126:52

project code that's on the PLC this is

126:56

the lad logic very simple just to make

126:59

sure that I had something to get the PLC

127:02

up and running and just like in the

127:05

Seamans you know I have the ability to

127:07

go in and if I want I can stop it I can

127:09

put it in stop mode I can make changes

127:12

to the programming code if I wanted to

127:15

and this is what really most of what the

127:18

the rest of this interface is so

127:20

especially if you're new to OT like I

127:22

I'm still I was talking actually with an

127:24

engineer today and he was asking you

127:26

know what people would think if you come

127:28

from it cyber security really basic

127:30

questions about uh

127:33

firewalls and at the same time he's like

127:35

yeah I yeah I feel stupid asking these

127:38

questions he's like you know because

127:40

I've been programming plc's for 20 years

127:42

and and DCS and I'm like well yeah it's

127:46

but I've been doing firewalls for 20

127:49

years and I've you know I just program

127:51

plc's on the side when when I have

127:54

time I'm just learning so yeah it's it's

127:58

it's give and take so it's kind of

128:01

interesting

128:03

conversation but again if it's not

128:05

something that you've seen before it's

128:08

really interesting again I always

128:09

suggest if if you have the time the want

128:12

and and the money to get the get a a

128:15

click

128:16

PLC um and then you can program that and

128:22

get started with that and and then kind

128:24

of build your home lab from there but

128:26

yeah it's unfortunately it's not cheap

128:30

to have like a physical you know asset

128:33

to have a physical PLC

128:35

unfortunately so and and there are

128:39

lesser altern so you can do them with

128:40

arduinos or um with uh raspberry pies

128:45

it's it's just and they're great

128:47

Alternatives it's it's just not the same

128:49

of having a true PLC so I definitely

128:52

suggest doing the the full PLC if you

128:55

can so but enough of that i' I've

128:57

totally derailed

128:59

us because what we were talking about

129:02

was using wire shark packet captures to

129:05

fine host on the network right and so we

129:09

kind of went down a rabbit hole but you

129:11

also got the idea of how we started

129:13

finding these plcs and we even found one

129:15

PLC that wasn't talking tcpip on the lab

129:19

network but it was still talking a

129:22

protocol on the network right and so

129:27

that's what we're really trying to do

129:29

with those now um when I was when I

129:34

first put this class together I didn't

129:35

have the big lab or well the quote

129:38

unquote big lab I only had one PLC

129:40

before um so I was using different

129:43

pocket captures that I would download

129:45

from GitHub repositories on the internet

129:47

so there's this I i1 I mentioned this

129:50

actually earlier in the course which is

129:51

great um so you can go and and there's

129:54

tons of captures for different

129:56

industrial control protocols so

129:58

definitely play with those in in wi

130:00

shark um to get get an idea but what we

130:03

can go back and do is wi shark has all

130:05

these great features or menu options so

130:09

that way if I go up to um

130:13

statistics and then there's a couple of

130:15

these that we would look for so

130:17

typically the one especially if I'm

130:19

starting and I'm trying to build an

130:20

asset register after packet capture

130:23

information I'm going to I'm going to go

130:25

to

130:26

endpoints and so you can actually see if

130:30

now here's ethernet addresses so that's

130:32

Mac addresses let's say you know we're

130:34

going to make it simple and I'm I just

130:36

want to look for IP addresses just IP

130:38

version 4 IP addresses right now so out

130:42

of all that traffic that was captured we

130:45

see 1 2 3 4 5

130:49

six IP addresses now the last four IP

130:54

addresses those are all multicasting

130:56

addresses that's a lot of the other

130:58

industrial control protocols that we are

131:00

seeing talking sharing

131:03

information but not tcpip so we actually

131:07

only have we see traffic from 100 which

131:10

is the engineering workstation and we

131:12

see traffic from

131:15

100.00 which is the click

131:18

PLC now this brings up a great point

131:21

because this capture that shows two IP

131:26

addresses is only a capture at a certain

131:30

point in

131:33

time so in OT environments two assets

131:38

right they might never talk or they

131:41

might talk once a month or once a

131:44

week so in that environment we know oh

131:48

well we have four four Fu can't can't

131:52

can't talk right now four host that we

131:55

should see over tcpip if they were all

131:57

talking but again they're not all

131:59

talking right now now if I did a scan we

132:02

would see a lot more pop up right

132:04

because that would generate some some

132:06

talk or conversation between those

132:08

hosts but just keep in mind

132:11

that that packet capture is only good

132:13

for that slice of time and that OT

132:17

devices by default right they're they're

132:19

not constantly talk they are not Windows

132:21

machines right they're not chatter boxes

132:24

not on tcpip we can see otherwise right

132:27

in the background over lldp where

132:30

they're just

132:32

multicasting all the information about

132:36

themselves like I'm here I'm here here's

132:38

here's all my information it's almost

132:39

like steal my

132:41

identity please they're begging us

132:44

to but you can use that endpoints option

132:48

to go in and see show show me all the IP

132:50

addresses and you can see it sure it had

132:52

it was showing Mac addresses so that

132:55

we're seeing more of right than just IP

132:57

addresses because remember those

132:59

machines are out there and they're not

133:00

not talking tcpip but they are connected

133:03

to the network and they are

133:05

talking if there's IP version 6 traffic

133:08

we'll see that as well and then you'll

133:10

see if there's any TCP or UDP traffic

133:13

right here now we're seeing the IP

133:15

addresses in the

133:16

ports

133:19

so the ports is where you we want to see

133:21

if we see anything like oh a port 502 or

133:25

and here we see like 5353 so mdns

133:28

multicast DNS or um but and other some

133:32

kind of random high order ports which

133:34

probably don't mean

133:39

anything so that's end points there's

133:41

other options as well so we can look at

133:44

conversations so it's like oh okay now

133:46

show me who's talking talking with

133:49

who so if I go back and see okay

133:53

192.168.100.1 100 is talking with 100.00

133:57

right so that's our engineering

133:59

workstation talking

134:00

with the click PLC we can see the

134:04

engineering workstation also doing a lot

134:05

of

134:07

multicasting we can see how much trans

134:09

data is transferred between the two so

134:11

you can see not a lot very minimal you

134:13

can see the the different directions how

134:15

much was sent to and from

134:18

you see again there's IP version 6

134:20

traffic if there's any TCP traffic which

134:22

we don't see any and then there's oh UDP

134:26

traffic because a lot of that especially

134:28

the broadcast traffic between an

134:30

engineering workstation and a PLC is is

134:34

done over

134:38

UDP so we have that and then we can also

134:42

look at the protocol hierarchy always

134:45

find

134:46

interesting not necessar neily for

134:49

usually for building asset registers we

134:51

probably got as much information already

134:53

out of the packet capture as we're going

134:54

to um but in this case we can see all

134:57

the protocols that are talking and how

134:59

much what percentage so we can see yeah

135:01

the biggest one is that that link layer

135:04

Discovery protocol lldp we saw all the

135:06

plcs using to again advertise hey I'm

135:10

here there's all this information about

135:12

me and then yeah we saw

135:14

some UDP traffic

135:20

so there's a couple of things that that

135:22

we can find from from that and there's

135:24

some some other ones that are in there

135:25

but those are the those are the big ones

135:28

especially when we talk about looking

135:30

for building asset registers we're going

135:32

to talk a lot more about wi shark when

135:35

we get into the intrusion detection

135:39

section but again we just kind of wanted

135:42

to kind of you can start to see at this

135:45

point how you can capture traffic in the

135:48

OT Network okay we're not active

135:50

scanning we're not putting any network

135:51

packets on the network so there's no

135:54

nothing at

135:56

risk and right we're just looking or

136:00

reviewing that information to see what's

136:02

out there okay now you might have

136:05

limited

136:06

visibility and don't forget you have to

136:09

capture traffic over a long period of

136:11

time because in OT it's not like an it

136:15

right the the systems aren't just

136:17

constantly talking to each other at

136:20

least again over

136:21

tcpip here you can see these PL plcs

136:24

trying to continually talk with each

136:26

other you know say I'm here here I'm

136:29

here it's just not over

136:33

tcpip all

136:36

right so that's what we were talking

136:38

about there so there's the slid uh

136:40

Network minor I just want to mention you

136:42

real quickly is is an alternative out

136:45

there um that you can use the cool thing

136:48

I like about Network mon uh minor is you

136:51

can see it's a little different view as

136:53

far as what host are out there tries to

136:54

guess what type of host it's not an OT

136:57

tool though so don't it don't you it's

136:59

not going to put like PLC on there or

137:01

anything um but if there's any type of

137:05

files that are transferred in that

137:07

Network traffic like a Word document or

137:09

a picture file or a web page it extracts

137:12

all of that and puts them on your hard

137:14

drive to read which is really really

137:17

cool so it's more for for it but it can

137:19

kind of come in handy in in OT

137:22

environments as well and there's a free

137:23

version and there's a paid for version

137:25

so um you know definitely always check

137:27

it out always you know you know

137:29

definitely love to use free software so

137:33

and here you see yeah you as you expand

137:35

those it tries to give you more

137:36

information about each host um so it's

137:39

definitely a little different as wiar

137:40

not as powerful as wire shark in any

137:42

stretch to the imagination but the few

137:45

things that wi shark doesn't do well it

137:47

does really well um and I think that's

137:50

kind of how they made their name it's

137:52

like okay we're going to do everything

137:54

that people the few things that people

137:57

don't like about wi shark we're going to

137:58

do them and we're going to do them well

138:00

and that's I guess that's their claim to

138:02

fame

138:04

honestly so last but not least to kind

138:07

of wrap everything

138:09

up and we've already started talking

138:11

about this earlier once we have build

138:14

out the asset register and maybe again

138:16

it's not 100% complete but it's as

138:18

complete as we're going to get

138:19

it it's like what could an attacker do

138:22

if they got the asset register again

138:24

that's it's the treasure map it's the

138:26

blueprint for here's the plan on how to

138:28

break into the environment so we want to

138:31

make sure that attackers aren't able to

138:34

access the asset register wherever we

138:36

store

138:38

it so if we're storing it let's say on a

138:41

system whether it's in the cloud whether

138:42

it's on within the the organization

138:45

whether it's on on site maybe it's on

138:47

the it Network and not the OT Network

138:49

it's maybe not a bad idea or you have it

138:52

on

138:53

both because we do have to make sure we

138:56

get access to it if we're you know on

138:57

the OT network doing things like

138:59

incident response or security

139:03

monitoring but wherever it goes right we

139:05

want to make sure we Harden the system

139:08

against attack so use things like go to

139:10

the Center for Internet Security uh and

139:14

get the hardening guidelines for the

139:16

operating system for that system that

139:18

you're the server or the host that

139:20

you're you're storing it on so if it's

139:22

for a Windows server or a Windows

139:24

workstation or or if it's a Linux host

139:26

or Linux work yeah it's go get that the

139:29

system hardening guidelines and make

139:31

sure you lock down that machine make it

139:33

as secure as possible remember we don't

139:35

want an attacker getting this blueprint

139:37

to how to attack the

139:40

environment you can consider encrypting

139:42

it right so even if it's just an Excel

139:45

spreadsheet yeah put the put the

139:46

password on it to encrypt it just make

139:49

sure this is where we want to make sure

139:51

everybody knows what the password is

139:53

because we don't want somebody getting

139:55

locked out in When In the Heat of the

139:57

Moment where they really need access to

139:59

the asset register where it could even

140:01

potentially Save a Life the last thing

140:04

we want is a password on Excel

140:06

spreadsheet uh preventing us from saving

140:09

somebody's life and I know that sounds

140:11

silly but at the same time that's kind

140:14

the conversation we have in

140:16

OT because everything ultimately comes

140:18

down to is is Saving Lives protecting

140:22

lives the environment and then we can

140:23

talk about uptime or availability of of

140:26

the

140:28

environment you can put access control

140:30

so things like permissions determine who

140:33

has access to it you can put in phys

140:36

make sure it's physically secure so

140:37

wherever whatever server or system that

140:40

it's residing on make sure it's it's

140:42

locked up and people just can't get to

140:43

it so hopefully it's a server like in

140:45

the data center maybe off the

140:47

engineering room or the control center

140:49

we're just talking about one location

140:51

today where they actually have the

140:54

control room on the second floor and the

140:56

data centers on the the floor beneath

140:58

them so for certain tasks they actually

141:01

have to leave the control room to go

141:04

into the data center down one floor I

141:06

thought that was really strange it's a

141:09

it was a outside party it's not related

141:11

to my my day job but that was very very

141:15

strange um and then what other things

141:19

should we consider those are some of

141:20

that that you know the high high level

141:22

ones uh some people might consider

141:24

keeping it offline I think personally if

141:28

you're you're in a physically secure

141:30

location which a lot of OT environments

141:34

typically are or not not all but I say t

141:37

especially larger ones probably

141:39

typically are are better um but you you

141:43

can have it printed out and sitting on

141:45

your desk if if you have of really good

141:48

you know physical security and keeping

141:50

people from coming in but you make sure

141:52

if you have it printed out on your desk

141:55

that when you're not there you put it at

141:57

least in maybe a locking file cabinet or

141:59

you know protect it in physically for

142:02

when you're you're not there so so

142:05

things to things to

142:07

consider of course we want to make sure

142:09

that the asset register is updated over

142:12

time so we have a process weekly monthly

142:16

quarterly annually where we're going

142:18

through and making sure there it's

142:20

updated probably I would say no more uh

142:23

don't wait for longer than you know

142:25

every quarter or three months don't wait

142:27

to do it every year that's crazy maybe

142:29

or you know once a month right so that

142:31

way you capture minimal changes and it

142:34

doesn't take all the time if you're only

142:35

doing it once a year you're going to

142:37

hate doing it so a lot of this plays

142:40

into change management procedures at

142:42

site so when somebody makes a change it

142:44

should go through change management and

142:46

get authorization

142:47

before right you're swapping out parts

142:49

or putting in new new assets or taking

142:52

out old assets so make sure and we're

142:56

going to talk more about this when we

142:57

get into things like incident detection

142:59

response because again when we do

143:00

incident detection response and we get

143:02

alerts 99% of the time it's not a hacker

143:05

or malicious activity it's someone doing

143:09

operations and maintenance

143:11

and maybe they didn't go through the

143:14

authorized change management procedures

143:16

or

143:17

panels right so it's we don't normally

143:21

have a high sense of paranoia in OT as

143:24

much as in in the IT world right and and

143:28

and and that's fair we still still

143:30

should have some paranoia though so

143:33

little little paranoia is good so again

143:35

we're going to come back and and talk

143:36

about that more and that's where we get

143:39

into going all the way full circle to

143:41

the beginning of the section again why

143:43

I'm such a firm believer in asset

143:45

registers where it sounds like it's so

143:47

so pouring because all we're talking

143:48

about is asset inventory but that asset

143:52

inventory especially in OT environments

143:54

it allows us to do threat and

143:56

vulnerability management and it allows

143:58

us to do incident detection and response

144:00

and those are the two biggest things

144:03

outside of network architecture that we

144:05

can do to protect the

144:08

environment and all of those are based

144:10

off of the asset register so having the

144:12

asset register is

144:16

critical and that's why we were talking

144:18

about

144:19

it so I appreciate everybody's time I

144:22

this is kind of a another big section

144:24

but hopefully everybody found it

144:25

interesting I know we took a few side

144:27

tangents but uh if you have questions

144:29

comments concerns you can comment on the

144:31

video if you like it you know give me a

144:34

thumbs up um you know subscribe if if

144:37

you haven't subscribed to the channel

144:38

anymore but you can feel free to reach

144:40

out to me there's my email address you

144:42

can always ping me on LinkedIn uh and

144:44

then of course you know where the

144:45

YouTube channel is cuz you're watching

144:47

so you don't need it there but anyways I

144:49

appreciate everybody's time and and

144:51

coming and watching the video and uh

144:53

we'll have part six out in a couple of

144:55

days where that's when we'll actually

144:57

get into threat and vulnerability

144:59

management so that's one of my other

145:00

favorite sections so I'll see everybody

145:03

soon all right take care

UNLOCK MORE

Sign up free to access premium features

INTERACTIVE VIEWER

Watch the video with synced subtitles, adjustable overlay, and full playback control.

SIGN UP FREE TO UNLOCK

AI SUMMARY

Get an instant AI-generated summary of the video content, key points, and takeaways.

SIGN UP FREE TO UNLOCK

TRANSLATE

Translate the transcript to 100+ languages with one click. Download in any format.

SIGN UP FREE TO UNLOCK

MIND MAP

Visualize the transcript as an interactive mind map. Understand structure at a glance.

SIGN UP FREE TO UNLOCK

CHAT WITH TRANSCRIPT

Ask questions about the video content. Get answers powered by AI directly from the transcript.

SIGN UP FREE TO UNLOCK

GET MORE FROM YOUR TRANSCRIPTS

Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.