start	end	text
0	7560	The fact that we leverage as OT pen testers, assuming that we compromise the enterprise environment, we get domain admin.
7560	13140	Domain admin is not always the key or dependent on success.
13140	14480	It just makes things easier.
14480	16420	So first thing, get domain admin.
16560	17520	And oh...
18740	20200	Let me go back.
20200	20700	Okay.
21040	22500	Thank you.
23520	24440	Cool.
24440	25420	Yes.
25800	27240	Much better.
28900	30700	Well, I'm actually a little bit ahead.
30700	32540	So here's the remote access architecture.
32540	36340	So just going back a slide, you have RDP jump servers.
36340	39660	You have remote access proxy or VPN gateway.
39660	42920	So these are the most three common types of remote access.
42920	45740	Like I said, there could be a jump server in the OT DMC.
45740	47360	Sometimes it's double hopped.
47580	54260	But this is kind of key as an OT pen tester to know what type of remote access people are using to get in.
54260	56200	Because that will change our tactic.
56880	57660	Okay.
57720	61100	So this is like a basic standard IT type of attack.
61100	62540	But it's actually pretty...
62540	65720	I kind of want to highlight it, because it's actually pretty interesting.
66400	76260	So assuming we get domain admin in the enterprise network, the first thing we do is we pivot to NZ user's workstation that remotes into the OT DMC.
76300	82100	And of course, we also look for the RDP save credentials.
82100	91360	If you think about these operators, if they're logging into the OT DMC five days a week, and they don't want to type in their creds every single time they RDP in.
91580	93640	So of course, you look at the desktop.
93640	95660	You might find a .rdp file.
95900	102960	And using something like Sharp DP API or Mimikatz, you can harvest these clear text credentials.
103660	111320	But if they're leveraging multi-factor authentication, that would prevent us from masquerading as these users.
111320	119140	But we also like to keep this in our back pocket, because the chances that once they're in the OT network, there's a good chance that these creds will work again.
119140	122420	So like cred reuse is definitely a thing between IT and OT.
124420	128740	Okay, another kind of low-level attack is group membership.
128740	139700	So again, once we get domain admin, we look at the groups that these OT users are associated with, and we just add ourselves to those groups.
139700	144540	And sometimes, just by doing that, we can access the same resources that they do.
145000	149020	But again, if multi-factor authentication, that would prevent us.
149020	153320	But we'll just use that later.
153960	158220	Okay, so two kind of low-level, just general type of IT attacks.
158500	161100	And now we're getting into something a little bit more interesting.
161600	173320	So I'm not sure if any of you heard of set RDP, but this attack is a fun attack to do, it's very limited as far as the type of environments we can leverage this.
173700	182200	So what's interesting about this attack is that it intercepts remote desktop credentials as an end-user attempts to authenticate to a jump server.
182440	189120	But it only works in usually small environments, like wastewater treatment plants, or just very small organizations.
189420	196840	Because to pull off this attack, you have to be in the same subnet, and the workstation and the jump server also has to be in the same subnet.
196840	199720	So you're talking about a very small organization.
199720	202820	But this is a pretty fun attack because you can just run this man-in-the-middle attack
206020	208240	and gather clear-text credentials.
208400	213180	Again, if there's multi-factor authentication, that would stop us from pivoting.
213180	218440	But we can keep this in our back pocket and maybe reuse the creds later on.
220220	223400	Okay, so this is where the fun stuff happens.
223400	229760	This is probably the most common technique that we use to pivot between IoT and OT.
230600	232800	And there's a few reasons why.
232800	234580	It's actually very easy to pull off.
234580	236360	There's not a whole lot of requirements.
236760	239620	And it bypasses multi-factor authentication.
239940	248300	So again, assuming we have domain admin, we find the users, like operators, that remote into the OT DMZ.
248340	250240	We pivot to their workstation.
250240	256140	And so one of the requirements is we have to have an anti-authority system level shell.
256140	257320	And that's pretty easy to do.
257840	259380	There's multiple ways to do it.
259380	260540	You can use Task Manager.
260540	262000	You can use PsXec.
262200	268460	We just upload PsXec, spawn another shell as anti-authority system.
268660	270720	And then the first thing we run is query user.
270720	273360	So what users are logged on to that host?
273360	276580	If it's a jump server on the enterprise, it's not...
280440	283580	at any given time, you can see at least 12 different connections.
283660	286840	So jump servers, there's a lot of connections we can see.
286900	290140	If it's an end-user workstation, it's probably just one session.
290140	295520	But with this attack, what we do is then we find the user that we want to hijack.
295540	299260	And we run, like, tscon.exe and the session ID.
299260	301280	And then, boom, we have their session.
301280	302860	We just, like, bump them off.
302860	304820	And now we have their connection.
305180	308280	So we're just piggybacking off of their remote access process.
308280	312320	So they're going through the whole remote access two-factor authentication.
312320	315360	They're going to jump server or remote access proxy.
315560	319640	And then in some situations, they're even pivoting to, like, some engineer workstation.
319740	323800	So we don't need to know what their password is or know the two-factor authentication.
323800	326140	We just bump them off and we have their session.
326280	329120	The thing about this attack is it's not very OPSEC.
329120	330940	It's actually, like, non-SEC.
331620	333120	You know, we're bumping them off.
333120	335660	Usually, they think it's, like, a network connectivity issue.
335900	341780	But, you know, this type of attack, we usually collaborate with the end user.
341780	345880	Because if they're, like, an operator doing something very important, we don't want to just bump them off.
345880	350020	So we let them know beforehand, hey, we're going to run this attack.
350020	351260	Are you okay with that?
351340	353760	And then we bump them off and take over.
353920	355700	But again, it's not very OPSEC.
355700	356940	Like , you know, it is something...
356940	361300	If you try to do this as a red team, someone would know.
361900	365320	So this leads me into the next attack.
365920	367580	Remote desktop shadowing.
367580	369740	So this is also, like, another favorite of mine.
370480	374360	It's very similar to remote desktop session hijacking.
374440	378520	But you don't need to have an NT authority system shell.
378520	382660	All you need is admin and you have to make an edit to the registry.
383240	385300	And then same thing, you can run a query user.
385300	389020	If you're on a jump server, you'll probably see over a dozen connections.
389020	392560	If you're on top of workstations, this is usually the end user's connection.
393400	397560	And then we run mstsc.exe, which is RDP.
397560	401200	Or you can run shadow.exe.
401200	408860	And with the no consent prompt, this means that the end user wouldn't know that you're shadowing their session.
409060	411300	So that kind of makes it OPSEC.
411300	416240	So once we run this command, we would have, like, a view of their desktop.
416680	419540	And, like, again, they wouldn't know that we're viewing their desktop.
419820	425280	But on the flip side, if we run commands or move the mouse, they can see that.
425540	428340	So not very OPSEC, right?
428800	433460	Again, we would work with the end user to let them know we're going to run this attack.
433660	439340	But we can't do a whole lot if we want to, like, hide our activity.
439340	442320	So this kind of leads into, like, the next attack.
442540	443760	This is OPSEC.
443760	445740	This is actually very, very OPSEC.
445740	449100	So hidden desktop or HVNC.
449560	453560	So, again, we have a domain admin on the enterprise network.
453680	456440	We pivot to an end user workstation.
456440	464800	And if we're using Cobol Strike, we can run hidden desktop, which is an open source tool by White Knight Labs.
464800	468780	There's also, like, commercial tools from OST and Fortra.
468780	478160	But the main concept here is that, again, the end user is logging into the OTDMC or they're logging into, like, their engineering workstation.
478320	484440	And once they have gone through the connection process, we would launch HVNC's hidden desktop.
485060	486940	And then we would be presented with a...
486940	487540	Sorry.
487940	489180	Is that better?
489180	489620	Yeah.
489620	500200	We would be presented with another UI of their desktop, but we can run commands, open up prompts without them seeing our activity.
500540	502160	So this is actually really hard.
502160	503300	This is a nice trick.
503300	509240	So we're pretty much piggybacking off of their connection into the OTDMC or even lower.
509480	512520	And, yeah, it bypasses two-factor authentication.
514920	515800	Okay.
516140	517000	Next.
517000	522900	So this is unfortunately something that I've encountered on many engagements.
522900	525160	Larger organizations.
525680	544380	So in situations where, like, an organization is relying on top IT to manage network infrastructure or even worse, like, a third party to manage their network infrastructure, unfortunately, sometimes they leave it open to, like, from the enterprise to the OT.
544380	547600	So, like, it's a very implicit...
547600	548600	Bless you.
548720	549920	Implicit rules.
549920	561700	For example, if they have implicit firewall rules, they allow access to network switches, routers, management portals to the whole enterprise.
561700	569520	This is something that we can leverage to access these, like, these interfaces, like, over SSH or telnet or web.
569520	575560	And it's really sad because, like, you know, it kind of bypasses their whole remote access design.
575560	580760	And, yeah, so it's not just the router switches or firewalls.
580760	583220	It's also other, like, miscellaneous devices.
583220	585960	Like, one common one is BMC devices.
586140	592140	So, like, think iDRAC or ILO or UPS devices.
592140	595840	So what I have here is, like, a UPS interface over telnet.
595840	598020	And then I can enable SSH.
598020	601300	And with SSH tunneling, I can pivot into OTDMC.
601300	607160	So this is kind of like one of those things where, yeah, they just leave open to the whole enterprise network.
607160	612360	And , yeah, if you have SSH, and if you combine this with default creds, it's even worse.
613720	615220	So miscellaneous stuff.
616160	616440	Okay.
616440	620120	This is my last slide on attacks.
620160	624680	And I was, like, kind of wondering if I should leave this in, put this in here, because I almost feel like it's common knowledge.
624680	628960	But the thing is, I see this so often, and it's kind of sad.
629580	630120	Okay.
630120	641100	So in situations where there's, like, a jump server in the enterprise network, and then they incorporate, like, two-factor authentication, they use RSA or whatever, two-factor authentication, they forget that.
641100	646440	So even if I have domain admin access, I can't remote desktop into the jump server because I don't have two-factor, right?
646440	649720	So the client usually thinks, oh, this is great, you know, you can get in.
649720	655240	But they tend to forget that, like, on Windows servers, like, WinRM is on by default.
655320	657200	Or SMB might be open.
657200	660720	We don't need two-factor authentication to access these services.
660720	674780	We can just use, like, Evo, WinRM, or PS remoting to access the jump server through a different port, and then we can just redo the whole attack chain, use RDP shadow, RDP session hijacking, or HPNC.
675300	680720	So, yeah, always put the jump server below the firewall and close off any ports.
680720	685600	If it's meant to be just remote desktop, make sure only remote desktop is exposed.
687300	688400	Okay.
688400	692620	So defense detection opportunities.
692620	704380	So , yeah, easy to detect remote desktop session hijacking, just look for TS con, RDP shadowing, look for shadow.exe, especially with the no consent prompt.
704380	708900	That should be a very, like, high fidelity indicator.
708900	720340	Because if you think about an IT support that's working with someone to troubleshoot something, they're usually going to ask for permission to take over their screen, their desktop.
720340	724000	So if someone's not using that, that might be a red flag.
724680	733080	HPNC is going to be much more difficult to detect because you're going to have to look at, like, API calls to, like, switch desktop or create desktop.
733080	735260	That's going to be a bit of a challenge.
737240	737740	Okay.
737740	740100	So hard in the DMC defensive takeaways.
740800	748540	Like, a lot of the attacks that I mentioned, yeah, like, we bypassed two-factor authentication and all that.
748540	750560	But there's still a lot of things that you can do.
750560	756280	So first, secure remote access paths, you know, the basics, multi-factor authentication for everything.
757400	759540	So strengthen segmentation points.
759540	773540	So one thing I want to see more often, I've only seen this top one engagement, unfortunately, but they had two jump servers, but they split the protocol from remote desktop to remote desktop over web.
773660	780860	And funny enough, that actually kind of was pretty effective because we could hijack the session that had, like, a standard remote desktop access.
780860	784580	But once they switched to remote desktop over web, they're not using port 339 anymore.
784580	786800	It's using 80 and 443.
786980	791060	And so we couldn't hijack that same session on the second server.
791060	794560	So you want to separate, you want to change the protocols.
794560	797380	So not just go with RDP over RDP.
799040	806140	Hardened jump servers, like I said, you want to make sure that if you expect people to RDPN, only RDP is accessible.
806140	807720	You want to put it behind the firewall.
808380	809440	You want to NAT it.
810600	815440	And of course, you want to enhance detection and visibility if you can, wherever you can.
816140	821100	So look for, like, even IDs 4624, 4634, 4778.
822380	824540	And so I'm a bit early.
824760	829100	I actually have time for some questions.
829600	829880	Oh.
830800	831900	Thank you.
836610	837270	Yes.
837270	837990	Go ahead.
844370	844890	Do next...
844890	847130	Oh, the question is, why are...
847130	849590	Is do next on the jump box bad?
850230	850570	Okay.
850970	861510	So do next on the jump box means, like, when an end user remotes into the jump box, they have an interface in the OT DMC already, right?
861510	866670	So it makes it very easy for us to start scanning the network.
867230	868430	You know, you can just do an ARP.
868430	871610	You can enumerate the OT DMC much easier.
871890	873550	You don't want to be doing that.
873550	876610	You want to have an RDP into something else.
877190	880330	Yeah, that would be, yeah, very easy to enumerate.
880610	881950	Any other questions?
895480	896740	What was the beginning again?
896740	897220	Sorry.
899910	900790	Oh.
901610	902730	Yeah, yeah.
902730	906130	Actually, I don't commonly see that, but that's a good idea.
906130	911370	He said, do I recommend having separate identity stores between IT DMC and OT?
911370	912570	Yes, definitely.
912650	913770	Especially, like, Active Directory.
913770	917430	You don't want to have Active Directory between enterprise and OT.
918170	919590	In some situations, I've seen...
920190	920970	Oh, thank you.
920970	921750	Five minutes.
923230	924970	Some situations I've seen...
924970	928790	Actually, OT DMC is work group devices, which makes it, you know, very interesting.
928790	933530	Definitely separate identity stores between IT and enterprise.
933530	934470	I mean, OT.
935350	936490	Any other questions?
936490	937650	Got a few more minutes.
941770	942810	Go ahead.
949640	953020	Yeah, that's why I like it so much.
953020	954840	Because it's hard to detect.
954840	956160	It really is.
958020	961780	So, actually, I created a fork of this tool.
961780	965600	Because most of the times on the OT Pentest, we're not even using C2.
965600	966700	We're living off the LAN.
967780	971560	So, this is where, like, something like URL rules would come in.
971840	974760	And I know, like, you know, I work at SE.
974760	981360	I know how, you know, for bigger organizations, URL rules is not always the most practical thing to find API calls.
981360	982480	Because it's a lot of resource...
982480	984200	It's very resource intensive, right?
984700	985160	So...
985160	987170	But, yeah, you want...
987920	993240	I mean, for this attack, you're going to have to detect the C2 beacon first.
993240	995640	So, that's your best bet.
996800	998380	Aaron, go ahead.
1014060	1014820	Okay.
1015480	1016500	So, yeah.
1016500	1017700	Suspicious SMB pipes.
1017700	1018660	That's a good one.
1019100	1020760	But, again, again, a huge organization.
1020760	1021700	That may be hard to...
1021700	1023020	It's like a needle in a haystack, right?
1023260	1023640	So...
1023640	1024040	But, yeah.
1024060	1025980	Thank you for that input, Aaron.
1027760	1028900	Anything else?
1032780	1033320	Okay.
1033320	1034440	Well, that's it.
1034620	1035400	Thanks, guys.
