start	end	text
0	1400	Welcome to Don't Cry Wolf.
1400	2280	I'm Jimmy Wiley.
2280	3940	I'm a malware analyst at Dragos.
4100	4760	I'm Sam.
4760	7800	I'm a half and half vulnerability researcher and malware analyst at Dragos.
7800	13740	And we're here to talk to you about how we hunt for and assess threats to ICS capabilities in VirusTotal.
15060	18460	So it's 2021 and a customer is asking me for an assist.
18460	23700	They sent me a zip file with some stuff to look at, validate some results that another team had done.
24380	25500	Take a look.
25500	26980	It's fairly straightforward.
26980	31200	Identify the thing as Cobalt Strike Beacon for delivering Conti ransomware.
31240	32960	The customer is satisfied.
32960	34140	I didn't really think any more of it.
34140	40920	At that time, ransomware had really started to grow in the industrial space and this kind of stuff was getting more and more common.
41500	49020	A few months later, in 2021, a BioISAC partner releases a report on a new APT called Tardigrade.
49180	66660	They claim that Tardigrade is targeting biomanufacturing and pharmaceutical companies, and they're doing it with a quote, extremely sophisticated malware that's a metamorphic version of SmokeLoader, and potentially the first identified malware with this level of sophistication targeting a biomanufacturing facility.
66760	68660	The release makes freaking headlines, right?
68660	69800	This is 2021.
70280	72500	COVID vaccine supply chains are at the top of mind.
72500	76300	The whole country is sensitive to pharmaceutical-related news.
76300	86520	You know, Wired reports devious Tardigrade malware hits biomanufacturing, and they call it a shockingly sophisticated strain, and they make some claims about it being able to operate autonomously.
87600	90280	Now, of course, our customers get really concerned.
90540	92120	They start messaging us.
92200	100820	So we pull the report, and it's the same hash that I had analyzed a few months previously, the thing that I had identified as Cobalt Strike Beacon for delivering Conti ransomware.
101000	108740	Bleeping Computer publishes an article on this stuff, and they cite the late Vitaly Kremes, and he comes to the same conclusion that we had.
108740	115580	He's like, this just looks like, so clearly there'd been some kind of mix-up.
115580	118300	Conti ransomware is not a new APT.
119120	123540	But because everybody had gotten riled up, we have to address our customer concerns.
123540	130840	So we published an internal report, and the whole report was just us being like, hey, like, just keep doing what you're doing to prevent ransomware, right?
130840	132260	There's, you know, nothing to see here.
132260	133180	Don't worry about this.
133180	135560	Just, you know, operate as normal.
136200	141740	And so, you know, this event really stuck with our team in 2021, and me personally.
141740	144860	This, like, misidentification caused a lot of trouble.
144860	153380	Some poor analyst was probably sitting at their desk having to answer their manager's questions about what they were doing to defend their network from Tardigrade.
153520	155680	And, you know, I'm not here to drag those analysts.
155680	156400	Mistakes happen.
156400	157540	That's not really the point here.
157540	160680	I'm just advocating for some care and analytical rigor, right?
160680	171800	When we talk about these threats to the public as experts, people are listening, and we don't really ever want to be the reason that gets the media or, more importantly, the community worked up over some shit that they shouldn't be.
172080	179580	So, you know, for this reason, we're very careful with our assessments of ICS threats, especially when we're hunting for ICS malware.
179580	184740	And to help, we created a process and definition for identifying ICS malware that we apply in our hunting.
184800	186420	This is a really quick summary.
186520	192920	There's, like, a white paper and other talks on this, but we're going to use some of these terms throughout the talk, and I just want to make sure that everyone's familiar.
192920	196760	So for us to consider something ICS malware, it has to have three properties.
196760	202140	It needs to be, has to have ICS capable, malicious intent, and adverse effects.
202140	207620	So when we talk about ICS capable, what we mean is that the code can do ICS or OT actions.
207620	215280	These are things like speaking OT protocols, uploading download ladder logic, code made for interacting with runtimes, or maybe the engineering software.
215480	219780	Next, the sample has to be designed with malicious intent.
219780	226840	And what that means is that we can find evidence that the software was intentionally designed to cause harm to OT environments.
226880	232760	This property is basically the difference between something that is malware and something that looks like malware but is designed for red teamers.
233280	238700	And lastly, the sample has the ability for ‑‑ has to have the ability for adverse effects on OT environments.
238700	248640	Now, what this means is that this software can actually cause harm against an OT environment, meaning we can find some negative effect and we can verify that the software works to achieve it.
248640	259280	So these are going to be things like stealing sensitive process information, enabling unauthorized access, downloading arbitrary logic or executable code to the PLC.
259280	264960	These kinds of things are going to vary from site to site, device and industry, so there's no go‑to hard list or anything.
265960	266760	And that's it.
266760	273140	We used three criteria, ICS capability, malicious intent, and the ability for adverse effects on OT environments.
273140	276180	If we have enough evidence of all three, we consider it ICS malware.
276180	284720	If not, if it's less than that, it's probably just something else, like IT malware, research, it could be a broken tool or something that's in development.
284740	290620	And with these criteria, we sort of assess the things that we find when we're looking through VirusTotal.
290780	297240	So part of our jobs at Dragos is to be constantly monitoring and hunting for what we call emerging threats.
297240	305160	These might be threats that lurk in our existing data sources, like VirusTotal, but are not discoverable based off of known bad indicators of compromise.
305280	309920	And there's actually a history of ICS malware, or ICS‑related malware, ending up on VT.
309920	313260	So Frosty Goop, Trisys, and Cosmic Energy were all found there.
313280	325540	So whether it's because the defender or an incident responder uploads the capability as part of their investigation, or whether the threat actor actually is uploading it themselves to test the detection rate, these samples continue to end up on VT.
325540	329320	And that leads us to our emerging threats hunting hypothesis.
329800	335620	And that is, there exists undiscovered ICS malware or ICS‑related malware in VT.
335780	349640	Of course, the ultimate goal here is to find novel ICS malware or capabilities before their use out in the wild, which is a very short and challenging window of opportunity, but we'll actually have an example of this later on in the presentation, not with something ICS specific,
349640	351360	but something a bit more generic.
352060	359380	Now, there's a lot of ways to hunt in VT for ICS malware, but I've found that keeping it simple often yields the best results.
359380	366640	This mostly means using good old‑fashioned strings, and the obvious method here is to grab ICS‑related strings, right?
366640	372760	Whether it be protocol names, vendor names, makes and models of PLCs, those are all good places to start.
373000	381660	Additionally, from samples like Pipe Dream and Frosty Goop, we've learned that threat actors are using open source libraries to build tools like Frosty Goop.
381740	386460	Why build your own OPC UA protocol stack if there's one on GitHub?
386460	387480	Same with Frosty Goop.
387480	390980	Why build a whole Modbus TCP stack when you don't need to?
390980	392520	There's plenty available.
392540	401600	So narrowing down on ICS‑related strings from open source libraries is a really good way to dial in on that ICS‑capable component.
402260	408420	We've also seen ICS malware utilize popular programming languages like Python, Go, and .NET.
408420	422040	Of course, we've seen binaries written in C and C++, but focusing first on languages that make triaging efficient is a lot easier, and hence why we focused on Python and .NET first.
422040	429880	You can be looking at the original source code within minutes, and that makes static analysis much, much easier than something like C or C++.
430540	442780	And finally, we look for malicious strings or CVE identifiers or even more generic stuff like words like exploit or attack that has often led to some interesting samples.
442780	452440	So that's a very quick and high‑level word on how we do our hunting and the strategies we take to narrow in on that potentially ICS malicious component.
452540	457140	Now let's look at some of the more interesting samples we've come across during our hunting.
457140	466360	These could be standalone tools that demonstrate some sort of ‑‑ some of the challenging assessments we've had to make with limited visibility, primarily just being the capability itself.
466360	469000	So we'll start with a tool called IoT exploit.
470240	480440	So Trisis was Python malware with ICS‑related strings, and so learning from that, we want to hunt for ICS ‑‑ or Python malware with ICS‑related strings.
480440	487860	So we stumbled upon this massive zip file, about half a gigabyte in size, containing a bunch of Nuica‑generated Cython binaries.
487860	495520	These are Python to C transpiled code, so it's an absolute mess to disassemble or decompile and statically analyze.
495520	500680	And the file names and the file paths, the modules, are obfuscated as well.
501820	503360	Thankfully, we got a bit lucky.
503360	509160	So the author had incorporated a bunch of doc strings into their code in basically every place they could.
509180	511040	And so here's actually a screenshot of one of them.
511040	516040	You can see it defines the class and the functions that it takes or that it has.
516040	523860	And it turns out, by doing a simple little Python trick, you can actually pull out these doc strings from the Nuica‑generated Cython binaries.
524220	526100	And that makes analysis a ton easier.
526100	528920	This is equivalent to running help on a Python module.
528980	538360	So we're able to learn a ton from basic static analysis of strings as well as some of the more unique byte strings that were actually contained in the ICS‑related exploits.
539220	539800	All right.
539800	542020	So here are the highlights from the analysis, right?
542020	545620	One, you all might have noticed in the last screenshot, there's a bunch of Chinese strings.
545620	546940	We translated all of them.
546940	554180	One of them was identification, and that translated to IoT device vulnerability scanning, verification, and exploitation toolkit.
554180	559460	The tool has over 1,000 exploits targeting IP cameras, routers, and industrial devices.
559460	572180	In the ICS category, IoT exploit has roughly 175 tools for publicly disclosed vulnerabilities from common OT manufacturing products like Siemens SIMATIC and Rockwell Automation Micrologics.
572300	579800	And it provides at least partial support for 19 industrial protocols, things like Ethernet IP, FINS, and Modbus TCP.
580180	587100	Now, when we assess this tool against our criteria, the ICS capable and adverse effects properties are straightforward.
587100	598980	We consider it ICS capable for all the protocols it speaks, even though it's partial support, it works to deliver the exploits, and the adverse effects protocol is derived ‑‑ sorry, the adverse effects property is derived from the effects of the exploits,
598980	603660	so they can do things like denial of service or enable and authorize access and these types of things.
603660	608220	When we were trying to assess the sort of malicious intent behind the tool, this is where things got a little bit more challenging.
608860	609980	This is another screenshot.
609980	622300	The tool includes a JSON file with detailed vulnerability information like CVSS strings and public advisory information, and this sort of thing seemed more applicable to mitigating vulnerabilities than an offensive operation.
622980	626900	And it just generally features a lot of what we call dual use dilemmas.
626900	632240	These are features for which both offensive and defensive use cases can be found.
632240	634640	The big one here just being the exploits and vuln scanners, right?
634640	638360	That could be used for an unauthorized intrusion or it could be used for a red team.
638440	640580	Another example, it can detect malware, right?
640580	646080	Classically defensive, but also adversaries may want to detect if the box they're on has been compromised already.
646340	658960	We found persona information and we were able to find the related organization, but after investigating that organization, we realized that it does both offensive and defensive research, so the tool could just as easily support either.
658960	661160	So the persona information was a bust.
661160	663260	The binary analysis was inconclusive.
663260	665800	The OT exploits were for publicly disclosed vulns.
665800	671000	There were no evidence of zero days and we had no evidence of the tool's use or any other intelligence on it.
671000	673940	To us, that's just not enough evidence for malicious intent.
674660	681480	Yeah, so we concluded that this is probably not ICS malware and more likely to be an ICS red teaming tool.
681600	690060	Still, even a non-malicious tool can be used for malicious purposes, so we reported on this internally, we got detections out to customers, et cetera.
690800	695300	The lesson here when we're dealing with samples like this is to stick to the facts, right?
695300	698480	It's really easy to jump to conclusions in a case like this.
698480	703700	Oh my gosh, it's from an adversarial nation, it can exploit ICS, it must be bad.
703760	710620	But we have to remember that other countries want to protect and defend their infrastructure as well, so they'll develop tools including red teaming tools to do it.
710840	723180	Of course, with new information, assessments can change, but staying unbiased while looking for evidence of malicious intent prevents worst-case scenarios from from tainting our analysis and helps us reach a sensible conclusion.
724160	726980	So next we're going to talk about a tool called Kertler SCADA.
727100	729240	This tool was found with a simple query.
729240	732800	We were looking for Python scripts with SCADA in the name submitted from Iran, right?
732800	733460	Even before the U.S.
733460	737000	decided to bomb Iran, that area was all kinds of geopolitical tension.
737200	743220	At this point we were seeing a lot of the hacktivist groups like Cyber Avengers express increasing interest in attacking OT systems.
743680	752060	Now, Kertler SCADA is a compiled Python binary and decompiling compiled Python is usually pretty straightforward with tools like PyCDC or Uncompile 6.
752160	756200	And to start the decompilation, you need to know which version of Python that you're dealing with.
756280	761920	Usually you can just do a simple string rep for this, but in this case the Python version was too new for Uncompile 6.
761920	763800	You can see here this is like Python 3.12.
763800	766740	Basically anything before Python 3.10 is fine.
766740	768640	Anything after that, you're going to have some trouble.
768900	778680	But luckily there's this new like AI-based transformer tool called Pylingual and that supports 3.10 and later and we were able to use that to get a good decompilation of the tool and basically read the code.
778940	785620	So after reading through some of the decompilation, we realized this tool is basically a glorified VNC client.
785620	801160	That is, Kertler SCADA would accept a list of IP addresses that had to be generated by the operator, probably using Shodan, then iterate over each IP address, brute forcing the VNC server's authentication mechanism with a small list of hard-coded credentials.
801160	807100	If it successfully connected, it would then capture a screenshot of the compromised server just basically proving access.
807720	812160	So now by pivoting off of the tool's name, we were able to discover a telegram channel.
812160	822060	This is where an actor was boasting pro-Iranian and anti-Western ideology, selling the tool to the roughly 3,500 followers, even offering discounts for those targeting the West.
822180	831940	So Kertler Cyber Lab, the telegram channel, had about 7,000 subscribers at the beginning of July, but then was just so just a few weeks ago was banned by telegram.
831940	837280	But backup channels exist where they're still operating, although with a lot less of a reach.
838340	843560	So now using the tool, the actor actually compromised dozens of HMIs.
843560	850740	They posted a video of them, mass scanning and mass exploiting them, and of course posted screenshots as well.
850740	859260	Here you can see two screenshots, and if you look closely, you can see a couple images that have been added to the HMI screen of Elliot from Mr.
859260	864020	Robot throwing his hands in the air after a big successful hack, I would assume.
864020	867520	So they actually went and took steps to modify the HMI screen.
868740	872780	So this tool isn't complicated and it lacks any real ICS capability, right?
872780	880000	It's just a VNC client, so we weren't considering it ICS malware, but the fact was the campaign was targeting ICS organizations and HMIs, and that's a serious problem.
880000	883240	So we contacted CISA and worked with them to notify the victims.
883560	888940	The main takeaway here is that ICS targeting malware doesn't need to be sophisticated to be effective.
888940	893660	I don't think y'all can actually read the caption here, but this is just a video of opening a master lock with a hammer.
893660	897180	So if you just take a crowbar and a hammer and hit the lock, it opens up.
898000	907520	So anyway, so curler SCADA is just an instance of hacktivists using low-hanging fruit techniques against poorly secured internet exposed HMIs.
907520	914060	And the good news here is that since these techniques are basic, the defenses don't have to be complicated, like just use a better password and you'd be fine.
915420	916000	Okay.
916000	924040	So hopefully you can read this, but this is from the vendor of one of the compromised HMIs targeted by curler SCADA, and I'm actually going to read a couple sentences here from it.
924040	927080	So VNC can have several layers of security.
927080	930540	The VNC client must give a password before connecting.
930540	932800	Blacklist may exempt certain machines from connecting.
932820	935380	Nonstandard port numbers may be used, et cetera.
935660	940300	We have currently chosen not to implement these means in order to avoid too much complexity.
941300	944360	They're saying we know what we should be doing and we aren't, right?
944360	948460	Of course they got compromised and state of security, I guess, huh?
948960	953480	So while curler SCADA was a cool win, most samples aren't usually as clear cut.
953480	958260	So let's look at a similarly named tool, the fake rapid SCADA masquerade.
958260	967800	So we found this while searching virus total for files that contained any CVE tag that had five or more detections and had SCADA somewhere found in the metadata.
968840	973740	Now, rapid SCADA is a legit open source industrial software for building SCADA systems.
973740	978200	As the sample's name suggests, it pretends to be an update for rapid SCADA.
978220	982580	The sample is actually a zip file that masquerades as an executable.
983300	992880	And inside the zip file, there's a fake read me batch file, which abuses CVE 2023 38831, which is a WinRAR arbitrary code execution vulnerability.
993380	995780	This vuln has many public proof of concepts.
995780	998560	It has been exploited in the wild by different threat groups.
998700	1005740	But the file that we had didn't align and the DTPs that we were seeing didn't quite align with the behavior from those groups.
1006280	1008820	So here's how the exploit chain works.
1008820	1010900	A user is sent a zip file via an email.
1010920	1016960	The user opens up the zip file with WinRAR, and more importantly, they preview the zip file in WinRAR.
1016960	1021600	And when they preview the readme.txt, it's a sort of malformed PNG that kicks off the exploit.
1021600	1024040	This is going to cause a batch file to execute.
1024220	1033320	This batch file will then modify the shell open command registry keys associated for various browsers, along with the HTTP and HTTPS protocols.
1033320	1042080	The effect here is that when the user tries to open up an HTML file or a URL, it's going to cause this encoded firmware.exe binary to execute.
1042080	1058860	Now, once that thing launches, one of the first things it does is it kills a task called SCADA underscore manager.exe, and then it moves on to searching the desktop directory for PDFs, XLS files, DocXs, and files with power plant SCADA or firewall in the name.
1058920	1063200	It then sends these files to a custom C2 server that's hard-coded in the binary.
1063920	1073280	Now, most of the evidence pointed at this binary being a custom, although weirdly specific, information stealer, since it's just looking at the desktop directory.
1074100	1083200	You know, they use an exploit, there's obfuscated scripts and binaries, they're stealing potentially sensitive documents, and it had a very clear ICS angle with this masquerade as rapid SCADA.
1083260	1092740	While we didn't think this was ICS malware, again, because there was no real ICS capability here, we thought that maybe we had another curler SCADA type situation where the thing was targeting ICS organizations.
1093320	1094320	And then we found this.
1094320	1102360	The C2 server had a shared SSL certificate with a domain operated by hackrocks.com, which is a CTF and security training website.
1103160	1105540	So there goes our malware theory, right?
1105540	1111520	Not only did it lack ICS capability, but this evidence meant that really malicious intent isn't there either.
1111520	1122400	So we contacted hackrocks, tried to determine if it was one of their exercises, and after multiple attempts of emailing them back and forth, we just gave up because they fully stopped responding to us.
1122440	1130360	So while it could have been a stolen certificate, it seems a lot more likely and plausible that this is a custom challenge designed by hackrocks.
1131780	1137560	Frustratingly, sometimes one piece of high confidence evidence nullifies eight pieces of evidence to the contrary.
1137560	1139060	But that's our job, right?
1139060	1145860	We're just here to follow the evidence and accept the reality given by the facts, even if the result's a bit unsatisfying.
1146900	1150380	All right, so next we're going to talk about some .NET Modbus samples that we found.
1150380	1156740	So we were searching, using YAR, we were searching for .NET executables that statically linked to open source Modbus libraries.
1156740	1160240	And we found a whole cluster of samples, and they all share similar patterns.
1160240	1166320	They're all .NET, they all download and execute a second stage, and they contain the EZ Modbus library.
1166480	1173340	Now what was weird about this is that most of the samples don't use the EZ Modbus library, meaning it's imported, but the code never calls into it.
1173360	1174620	Except for one sample.
1174620	1178700	One sample actually uses a couple functions from the library, and that's what we're going to talk about.
1179080	1181260	All right, so I'm going to walk through some of the code here.
1181260	1185460	A lot of it was obfuscated, but the symbols have been renamed and such.
1186140	1188940	I've done most of the renaming, so hopefully it's something sensible.
1188940	1191860	But we start by importing the EZ Modbus library.
1192040	1202400	We then connect to that LDUG host name over port 502 with a Modbus client connection, then separately create an instance of a strange class that I'm going to refer to as the Z class.
1203060	1210940	So next we're going to download, deobfuscate, and execute a binary it fetches from Discord's content distribution network.
1210940	1213360	So let's zoom in on that function .
1213760	1214880	Here we are.
1214940	1227180	So this code issues an HTTP GET request to Discord CDN, then does a base64 decode , and finally it does a swap character algorithm to get the plain text and well-formed binary.
1227600	1231560	When that binary is executed, it returns an IP address.
1232560	1237680	The sample connects to that IP address using Modbus and then just doesn't do anything.
1238620	1248720	Unfortunately, at the time of researching this, the second stage payload, which was being hosted on Discord, was no longer available, nor was it captured by VirusTotal, so we lost visibility into that capability.
1248720	1250080	We don't know where it was connecting to.
1250080	1252800	We don't know what other functionality it had in it.
1255120	1265740	So we don't have any evidence of victims or targeting, so with just the binary behavioral alone, we can't really say for sure if this sample has any malicious intent aside from it just being weird.
1265840	1277000	Further, since it doesn't actually issue any Modbus commands, right, if you notice the very first time it initiates a Modbus connection, there's no control commands after that, and the second time it just connects again to an IP address and issues no control commands.
1277000	1281500	We can't actually assess any kind of adverse effects here because we don't know what it's trying to do.
1281500	1285740	So in our assessment, it's not ICS malware in its current state.
1285740	1286920	It might be eventually.
1286920	1288340	It could be in development malware.
1288340	1290600	It could just be a toy, research project, whatever.
1290780	1295600	The point here really is that you have to remember that malware analysis is an intelligence discipline.
1295600	1303740	In this case, the capability alone was not enough to make a decision, and we need more context around how it's used, by who, or for what before we can say anything else.
1303800	1311540	Sometimes we just don't have enough high-confidence information or find too many reasonable alternative explanations to prevent any kind of high-confidence assessment.
1311760	1319360	So, you know, sure, it might look like a duck, walk like a duck, quack like a duck, but if it's like a duck robot store down the street, you have to consider whether or not you have a duck robot.
1321000	1321560	Okay.
1321560	1325540	So we've covered four samples all related to ICS in some way today.
1325540	1327360	The first was IoT exploit tool.
1327360	1333620	That looked real nasty right off the bat, but after further investigation, more than likely just an ICS red teaming tool.
1333620	1341400	Then Curtler SCADA, claimed to be some sort of OT malware, but kind of a glorified VNC client, not that impressive technically.
1342060	1351300	There was the rapid SCADA masquerade, which used an exploit that has been seen exploited out in the wild by various threat groups, and it appeared to steal ICS-related files.
1351600	1353700	Turned out to be probably a CTF.
1353900	1359040	And then finally, there were the dot net Modbus cluster of samples, which were malware lookalikes, right?
1359040	1367380	It was a downloader capability that executed a second stage, made two Modbus connections, but then issued no control commands for whatever reason.
1367420	1370560	These examples, they remind us of two things.
1370960	1379220	The first is that simple queries, like the ones we've demonstrated or shown in this presentation, they take a lot less time to make and yield really interesting results.
1379240	1390280	Something as simple as a Python artifact plus some ICS-related keywords can give you plenty to look at and to hunt in, like the Curtler SCADA tool that was found legitimately targeting HMIs.
1390780	1398720	And the last point here is that without a careful evidence-driven process, any of these four samples could have easily turned into a tardigrade-type situation, right?
1398720	1416220	Claiming that some sample is ICS malware when it isn't, or over-hyping some sample as more dangerous than it is, stirring up headlines, causing headaches for ICS defenders, having to answer to their managers, or just do a bunch of extra work that isn't necessary for a threat that probably isn't a problem or threat to their network.
1416340	1424360	So, you know, by taking care in our investigations, we retain the trust of the community so that when the real bad shit comes through, people actually listen to us.
1425840	1427460	Anyway, so thanks for coming to our talk.
1427460	1428460	We appreciate it.
1428460	1429320	These are our dogs.
1429320	1430300	They help us out.
