start	end	text
0	1900	And we're doing the 11 o'clock talk.
2220	3640	It's you guys right here.
4280	6540	And the talk is basically...
6540	7360	Oops.
7500	13520	Inside Look at a Chinese Operational Relay Network with MTU and Earl.
13520	15220	All right, guys, kick it off.
15680	16440	Thanks.
22090	23270	All right.
23630	24310	Hello, everyone.
24310	32650	As he just said, we're going to be going over what we call Meeting Mac, or the longer name, an inside look at a PRC-based operational relay network.
33190	34850	A quick overview.
34870	37350	We're going to obviously introduce ourselves and what we did.
37350	42410	We're going to talk about some secrets discovery in Docker, which was the source of all of our stuff.
42470	50970	We're going to talk about the finding that we found super interesting, go through all of their databases, access keys, passwords, all that good stuff.
50970	56810	How they made their infrastructure work and what their infrastructure was made to provide to their users.
57750	63670	By way of introduction, I'm Michael Torres, also known as MTU, and I am just another dude...
67010	69070	You're working on it, or do you need me to do something?
70070	71390	Do you need me to do something?
74300	74980	Okay.
74980	76440	As long as you get it fixed.
77900	78920	I guess I'm...
80160	81380	The slides are not up.
81380	82780	Just keep on talking, I guess.
82780	84700	Well, I'm going to try to restart the show.
84820	88360	Slide it over to the right.
88360	89500	Go back to regular view.
90140	91700	Maybe slide it over that way.
92780	93460	No?
93620	93900	No?
93900	96160	All right.
96160	96860	That's right.
98320	100660	I'm going to have a duplicate, yeah.
101020	102280	With a view.
105700	107240	This is not ideal.
108300	109400	Let me try.
109780	111180	Sorry about that.
115360	117520	We'll go quick for...
117520	118200	Just...
118200	118720	Yeah.
119520	121240	All right, sounds good.
121900	123680	So yeah, Michael, another dude.
124840	125920	Hi, and I'm Zane.
125920	126900	I'm a dude.
129240	131780	I will apologize about my voice.
132080	133760	It is gone.
134380	135500	How does this work?
137660	138380	Cool.
138380	140300	So I'm going to talk about kind of the...
140300	150700	I'm going to talk a little bit about the research we did and kind of how we got from where we were to meeting Mac, as Michael kind of hinted at.
150700	157980	So originally this research was kind of thought about at DEF CON 32.
157980	167140	We watched a demo for the Docker exploitation framework, which showed that you can identify whiteouted files in container images.
167140	174600	Which is basically if you delete a file from your image, it still exists in the full image tarball.
174600	183660	I thought that'd be super interesting to look into and find what kind of secrets people are publishing to Docker Hub inside of their containers.
184980	191160	So, you know, things like the .env, passwords, SSH keys, and the like.
191520	193640	The display's not working, so it's okay.
194060	195500	I need to see the next slide.
206060	209100	So yeah, sorry, we don't have the slides up here either.
209100	223720	So starting off with scanning at scale, we were actually in our hotel room at DEF CON last year and we wrote like the world's worst version of Truffle Hog to try to identify these secrets in Docker containers.
224800	226400	I need to see.
227320	229200	Sorry about this, guys.
229200	230040	It's all good?
230100	231240	No, I don't know.
231240	242540	So yeah, we started basically regexing through all of these containers with our crappy version of Truffle Hog, downloading as many copies of images as we could.
242860	251340	We started to get a lot of things like cloud provider API keys, Binance keys, databases, which was kind of an interesting one.
251340	265100	People would have database backups in their Docker containers, which was super fun to look at, as well as the credentials to reach their production SQL containers.
268200	271800	So we started to get a lot of... yeah, sorry.
271800	274080	We started to get a lot of data.
274080	282920	At the bottom, if you can see the slides now, we had 240,000 total Elasticsearch indexes for our found data.
282920	288680	A lot of that is going to be like false positives and it's going to be like example keys and stuff like that.
288680	290160	But it's just the two of us.
290160	292020	We have short attention span.
297050	298310	Hi, everybody.
299210	301270	Sorry about the technical difficulties.
302250	305530	Video in this kind of a format is a real pain in the butt.
305530	313650	Did anybody come when DEF CON was at Caesars a number of years ago, the year that it was a really good time with the video?
314430	315770	Video is hard.
316570	321630	New place, we've got a great staff that's working their butt off to make sure that we don't have these kinds of issues this year.
321630	323930	I got confidence that we're going to be good.
324110	327190	These gentlemen got a little bit off their game.
327870	329610	Let's give them a big welcome.
329610	333110	Let's have them start again and relax.
333110	333970	Yeah.
338750	339370	Awesome.
339370	341170	Are we going back to the intro slide?
341170	342830	Start wherever you want to.
342830	343970	Your slides work.
343970	345070	Get back on your game.
345070	345910	Give your best shit.
345910	346790	Have a good time, all right?
346790	347290	Yeah.
348130	349490	Do you want me to start again?
349490	349990	Yeah.
349990	351030	I mean, sure.
351230	352450	You can introduce yourself.
352450	352970	All right.
352970	354150	So let's try this again.
354150	358250	So like I mentioned, inside look at a PRC operational relay network.
358250	359530	My name is Michael Torres.
359530	360910	I'm just another dude.
360910	366170	We're going to go over the research we started on how to find secrets in Docker Hub images.
366170	377050	We're going to talk about the relay network we discovered, including credentials, the cloud providers they were abusing, their domain names, IP addresses, email addresses, all that fun stuff.
377730	378690	Cool.
378970	381110	Yeah, and once again, I am a dude.
381810	388390	So yeah, I was inspired by the Docker exploitation framework from DEF CON last year.
388390	399390	They gave a demo on this cool tool that they made, but the most interesting thing that we saw was the ability to check for whiteouted data in the container overlay FS image.
399810	406170	And so we wanted to start scanning at the biggest scale we could to identify whiteouted data.
406170	413510	So data that people had in their container images that they thought they had deleted and it's still there.
413950	417630	So we started in our hotel room scanning at scale.
417630	424250	We wrote, like I said, a terrible version of Truffle Hog that's just going to regex for this whiteouted data in the images.
424770	427230	Unfortunately, we didn't get that many findings.
427230	430750	I think we got like a total of five while we were at DEF CON.
430750	437270	So we quickly pivoted to looking for more broad API keys, SSH keys, passwords, and the like.
437850	439570	And we were getting a lot of data.
439570	442850	At the bottom, 240,000 total findings.
442850	447650	A lot of that's going to be false positives, so example keys and stuff like that.
447930	460250	And we were getting a lot of interesting info like database backups to include a production SQL server owned by an online casino with the credentials for it.
460250	461530	So that was kind of cool.
463150	466210	We have a short attention span that's allotted out a lot of false positives.
466210	469650	We're not going to look through 240,000 total findings by ourselves.
469650	476150	So we start looking into optimizing our tools so we can get less false positives.
476490	478270	But that's a lot of work.
478270	480630	We were seeing a lot of the same stuff over and over again.
480630	487030	And it's only so exciting seeing the same crypto trading bots for the 10th time that morning.
488470	493570	In the middle of our testing, we were pulling I think 5,000 containers a day.
493570	502550	So we quickly had to get the Docker premium accounts to not be rate limited to I think the free tier is like 200 image pulls a day.
502550	504370	And we were hitting a lot more than that.
504570	512330	You can see in the middle of our scanning, this is about the three month period that we were pulling a boatload of containers from Docker Hub.
513110	522330	They announced, and we have a link to the article, they announced that they're going to be rate limiting the premium tier accounts to I think it was 50,000 pulls a month.
522330	525870	Which coincidentally was about what we were hitting.
525870	530710	We have no idea if that was because of us, but we like to think we may have played a little part in it.
532370	534910	So yeah, that was just a fun little slide.
534910	539470	But we're still getting a bunch of data that we don't know what to do with because it's just too much.
539510	545790	I had previously done some work identifying publicly accessible private Git repositories.
545790	549190	So a lot of the times, it's like a Google dork.
549190	555790	You can look for a .git on a website and you'll go to mycoolwebsite.com forward slash .git.
555790	568650	You can wgit tech R that and 12 hours later because you just downloaded a bunch of tiny files, you can do a Git restore and you have their private Git repository that is publicly accessible.
568790	570930	I'm not sure how people are messing that up.
570930	579330	I'm thinking it's like small businesses that hire a developer to make them a website and then they just, you know, Git clone and then deploy it.
579450	587350	But we wanted to start, instead of looking at the broad like regex scale, start looking for .git slash config.
587350	593730	So then we could identify if there was like a private repository inside of this container.
594290	600570	So a little background on how to containerize an application if somebody here has never containerized an app.
600570	606930	If you Google search how to containerize an application, Docker provides a nice little workshop.
607110	612030	And the TLDR of it is that they want you to do a Git clone from your repository.
612450	614270	You'll create a Docker file.
614350	618770	Inside your Docker file, you'll base it off of, you know, a normal image, so like from Ubuntu.
618870	620970	And then do a copy dot dot.
621330	625010	Copy dot dot is really cool because it will pull in everything.
625010	625770	It makes sense.
625770	627690	That's exactly what you're telling it to do.
627690	631550	But it will also pull in hidden files and directories.
631790	635130	So that's how people are putting their .envs inside of their containers.
635310	643990	But for what we're looking at, it's pulling in the .git folder directory structure from that previous Git clone that they did.
644210	649350	So, you know, like the CI pipeline would do a build push job.
649350	650790	It's going to clone your repository.
650790	656310	It's going to build your container, copy in everything, including your repository, and then push it to Docker Hub.
656310	663790	So if you have a private repo and then you're pushing to a public Docker image, that's no good.
664210	666450	There's some other interesting things in here.
666450	669290	In the .git config, like I said, it will have the remote URL.
669290	673270	So you can query that to identify if it's a private repository or not.
674410	683370	But inside of that, you can also identify the CI job token that was used to push to Docker Hub and to do your CI job.
683370	686590	Those are short-lived for the length of the job.
687230	691510	And then generally, you know, it would also need write permissions to do anything fun with.
692050	703030	But some users are using their personal access tokens with rewrite permissions to do their CI pipelines, which would then push their credentials to their private repo to their public Docker image.
703030	704530	So we have a demo.
705270	707070	I'm not sure if it'll play on here.
707070	708090	Can you help me?
709990	711130	So, yeah.
712030	725830	While he gets that up, we have a demo showing basically if you know a container is going to be updated, you can scan that container on Docker Hub, wait for an update to happen, grab the credentials.
726190	728090	Oh, that's wrong screen.
728090	729110	Sorry about that.
729190	730050	Just keep talking.
730050	748110	Then you can grab the credentials and if they're using their personal access token, you actually then have write permission to their private repository, which will have the added benefit of once you push to that private repository, it'll kick off another CI job that you can then,
748110	753930	you know, have your code that you've pushed to their repo inside of their public Docker image.
753930	760690	So depending on, you know, how important their code base is or how popular that image is, that could be pretty nasty.
760690	765370	So right here, we're just, you know, scanning for the change in Docker Hub.
765450	771570	And then we're, I think, just going to write to the README file that, you know, we have write access to the repo.
771750	779270	So that was just a cool thing that we had seen while trying to identify like vulnerabilities or anything that we could do with all of this data.
782090	783070	Start talking.
783210	784550	I don't know what slide it is.
784610	788910	So on this slide, we're going to go over some of the metrics.
788910	795650	So in total, we pulled a little over 80,000 containers during this three-month time period starting last August.
795650	808630	Once we started looking just for the private Git repositories, about 15,000 of them contained Git metadata and 1,500 of those were for non-public Git repos.
808630	812010	That's basically anything that wasn't returning a status code 200.
812650	814810	So we're looking for 404s on GitHub.
814810	821030	If it's a private repo, it will, you know, if it's private, it will show that it's just a 404.
821030	825210	We also got some redirects for like Git at company name.com.
825210	834710	So some companies, their private internal Gits were being pushed to their public container images, which was also fun.
835110	845050	Some of the more notable stuff that we saw was there was an enterprise branch of an Apache open source project that had their private repository stored in their public container.
845050	850650	A Russian dash cam manufacturer and a security vendor's private detection rules.
850890	854370	We had reported as much as we could for all of these findings.
854370	855990	Unfortunately, nobody ever responded.
855990	860810	And we even emailed the, like, last commit author from the Git log.
860810	863010	So it was super easy to report.
863530	871010	I don't know if you'll be able to see it on this slide as it's being presented, but on the left-hand side is just some of our Elasticsearch findings.
871830	875270	We have the very top one is actually a personal access token.
875270	879870	So going back a few slides for that demo of the CI job to push to Docker Hub.
879870	886510	If they're using their personal access tokens for that job, in theory, then you would have write access to the repository.
886870	898350	On the right-hand side, those are all of the status codes and the percentage of the total findings for the containers containing private or non-public Git repositories.
898370	900010	So just a cool metric.
901090	902850	All right, we're going to start talking.
902850	907890	That was the background on the research we did, how we did it, and how we got to finding Mac.
908890	914150	There was one Docker Hub user that was pushing multiple containers a day.
914150	921150	They were doing a lot of updates, and we kept getting flags for it because they had private Git repositories in it.
921150	925010	So our automated tooling would alert us that we got new findings.
925870	936730	And from our initial look at these container images, it looked like this user was actually just using Docker containers as free cloud storage, which is a cool idea.
936970	942530	They had a boatload of data labeled like backups that they were just pushing.
943030	948850	So we started looking into it a little bit more because I thought it was a funny idea to use Docker as free cloud storage.
948850	962210	It led us to identifying three other Docker users that were doing similar things and kind of tied them all together, spanning across 38 total repositories, meaning like container images on those accounts.
962230	966090	There was hundreds of image tags per container.
966490	968550	So a couple gigs per container.
968550	971390	You know, you got a couple hundred tags per container.
971390	973610	It's a lot of data for us to look through.
973610	978350	So we saw it, and we thought it was kind of neat, but didn't look too far into it.
978350	979690	Here's a Discord message.
979690	983350	I like to go to bed pretty early, so Michael was up at 10.40 p.m.
983350	985570	I'd probably been asleep for a few hours.
985910	990270	But he had taken another look at these containers because we just kept getting hits on them.
990330	1004530	And it looked like they were using the data in the containers, pointed to them using this to spin up and down some cloud infrastructure to proxy traffic, and it was redirecting to the great firewall.
1004530	1007910	So that piqued our interest almost immediately.
1007910	1009170	It was super interesting.
1009170	1013590	So we wanted to look more into these containers and see what we could learn about their infrastructure.
1014930	1023190	Here is kind of a high-level view of what we think their infrastructure looks like after several months of research on all of this data.
1023370	1027170	Starting on the left, they have a couple different providers that they use for storage.
1027170	1030930	So Docker Hub is not the only free cloud storage you can use.
1030930	1035950	They were also using Mega and GitHub repos actually to store data.
1036570	1041610	Then in the middle, we are kind of going to go over the compute that they're using in a few slides.
1041610	1045910	But they have like traditional VMs and then more like serverless compute.
1045910	1047950	So they were using stuff like GitHub Actions.
1048430	1050830	We have the databases on the right-hand side as well.
1050830	1055470	And then we're going to go a little bit more in depth on all of these services and how they were used.
1056690	1061490	But we're going to go over first what we found and what we believe it is.
1061810	1067990	So with a somewhat high confidence, we believe it to be a PRC-based operational relay box network.
1068370	1073750	And that's basically a bunch of stuff proxying for bad actors.
1073750	1081630	There's a Google link for Chinese Nexus actors using similar networks to do malicious things on the internet.
1081630	1084450	So you can read that if you would like.
1084830	1089770	We believe there's more than one person involved in the development and operations of this infrastructure.
1089770	1095950	We observed messages in their database backups in these containers between multiple personas.
1096310	1105030	They're using this weird .rec file format that we couldn't figure out what the note-taking app or whatever was creating them.
1105030	1108290	So we would actually love if anybody knows what it is.
1109150	1111850	And it's been in development since 2022.
1112270	1116790	Last year, like I said, they were updating almost daily, several times a day.
1116790	1122810	The last update that we saw was in June of this year, so that's the last time we've looked at any of this data.
1123790	1133530	With a medium confidence, it's used to proxy web traffic, manage social media accounts, and otherwise do sort of anonymous browsing.
1133890	1138630	They also have some tooling to create and manage the social media accounts, pointing us to that.
1139210	1140450	Low confidence.
1140450	1148810	Unfortunately, these guys aren't in their database or in their backups putting proof that they're doing malicious things, which would have been really cool for us.
1149050	1154550	But we did see they have tooling and proof that they had one malicious PyPy package.
1154550	1156930	That is a virus total link to the package.
1156930	1164370	It is no longer on PyPy, but you can still go and analyze that package, as well as a Cobalt Strike listener log.
1164370	1170310	It looked like it was more for a test, but shows that the infrastructure was in place to use those things.
1172070	1179170	So the network tunneling protocols that they were using, they used NPS for their node hub C2 infrastructure.
1179250	1184330	And then on the bottom right, we have a little screen grab of them modifying the FRP fingerprint.
1184390	1187350	They changed all the key names on that.
1187450	1193650	And then they used a couple of different providers to obscure their C2 destination IPs.
1195110	1203970	And then they also, yeah, they had the full VMs for, you know, serverless and full VM access.
1205830	1213490	And then, as promised, we're going to start going over some of the domains and other juicy tidbits that we got from their data dumps.
1213670	1216890	So the top three are their main, like, hub domains.
1217050	1219870	We've defanged them, but those are them.
1220150	1223970	The bottom one, or the middle one, sorry, the private services are a little interesting.
1224290	1242290	They have this GitHub repo access domain where if you know their private repositories, because they've made them public, and you know the directory structure of them, you can actually browse that domain and get the files from their Git repos, which is kind of interesting.
1242710	1251110	And then they had their own file hosting for tooling and scripts that they would pull down when setting up infrastructure, as well as the workstations.
1251110	1256830	The bottom ones are the, like, miscellaneous that we didn't see a lot of information about, but they were sort of interesting.
1256830	1259730	The top one being, you know, Cracked Cobalt Strike.
1259730	1265790	So, pointing to them using this infrastructure for more nefarious things, but...
1269750	1276710	As far as data persistence, Zane mentioned earlier, they have a lot of different cloud services they were saving data to.
1276710	1279210	Probably the largest by volume was TerraCloud.
1279210	1281610	They had a WebDAV share set up there.
1281610	1284990	Obviously, Docker Hub Images, that's how we got our initial access.
1284990	1287370	They were all about uploading data there.
1287490	1293290	GitHub repositories, Hugging Face Spaces, Backblaze Buckets, and one instance of a OneDrive.
1293450	1301790	And then the screenshots here are their configs and things like that for those services, so you can kind of see how they pieced it together and how they thought about their data backup strategy.
1303870	1314150	Just as a little tidbit off of that, if you didn't know, OneDrive authentication tokens are JSON web tokens, which means you can decode them and get a little bit of additional information out of them.
1314150	1315710	So we went ahead and did that.
1315710	1322390	That bottom left screenshot has an email address that ends, like the host name is host.ac.cn.
1322490	1328150	A little bit of Googling says that that's a shared domain for a lot of university systems in the People's Republic of China.
1328150	1333870	So I'm not sure that that's a real email address that can tie back to a person, but it's still kind of interesting.
1333870	1342150	And then on the right side of the slide, you can see an IP address that is probably a legitimate home IP address based on the ASN.
1342150	1345470	I want to say it went back to China Telecom or something like that.
1348780	1352640	The most exciting part for us was access to these credentials.
1352640	1361620	On the right there, you can see that they were nice enough to give us an SSH config that included the path to the SSH key to use to access their nodes as the root user.
1361620	1367260	They also had that SSH key, so if we wanted to, we could have logged in to all of their things as root.
1367580	1369480	So great security practices there.
1369480	1376360	Even if we didn't have their SSH key, they also lettered passwords all throughout their code and their notes and all of that.
1376360	1381280	So we were able to figure out that they followed a pretty standard template for all of their passwords.
1381780	1389860	You can see it there, but A, B, some characters that we're not going to tell you, an at sign, and then a letter corresponding to the username.
1389980	1394000	So for the user temp0230, the letter was a T.
1394000	1397280	For coral86, it was a capital C and a capital O.
1397900	1398800	There's a hash there.
1398800	1400300	It has a special little salt.
1400300	1403460	If you want to try to crack it, then you'll have their actual passwords.
1403760	1412680	Like I said earlier, that password is used for emails, their domain management accounts, their social media, basically just everywhere that you can put a password in.
1412680	1414740	That was how they were generating their passwords.
1417950	1418890	That wasn't it.
1418890	1423950	They also had just plain text API keys all throughout their notes and through their code.
1423950	1427170	You can see the top players there are definitely Heroku and GitHub.
1427490	1432530	Heroku for running their exit nodes, if you want to call them that, for their network.
1432570	1437730	GitHub for cloning all these things into GitHub repositories for more data backups.
1437930	1442290	Sort of of interest at the bottom there, you can see they had a grok key and an xai key.
1442630	1451370	They were using those to, as we'll talk about later, help them develop this service, because who doesn't love a little AI-assisted development?
1451370	1454970	But if you're in the People's Republic of China, a lot of those systems are blocked.
1454970	1458030	So they were using their own network to do that kind of thing.
1460390	1461370	Emails.
1461370	1463710	Like I said earlier, they had a lot of emails.
1463710	1466150	Definitely at least 50, probably more.
1466510	1467690	There were a lot.
1467690	1475410	And as Zane mentioned, our note-taking system is roughly Discord, a Google Doc, and also Notepad on one of our computers.
1475410	1479330	So finding out all of the email addresses we saw was a hard challenge.
1479450	1484190	But those ones on the slide are definitely the most frequent that we saw throughout.
1484190	1491390	They also had tooling to create new email addresses on common free email service providers, so Outlook and Gmail.
1491670	1493690	They also had social media accounts.
1493690	1495830	They had two Twitter accounts, two Facebook accounts.
1495830	1500250	On the slide, you can see a screenshot of Coral86's Twitter account.
1500250	1506470	That is the only activity on his Twitter account, so I guess they're just all about Pokemon.
1509650	1513170	That still isn't the total story of all of their credentials.
1513170	1520010	They also had an API to serve credentials to either themselves or their users, depending on how they architected their system.
1520010	1522610	You can see the list of things they provided for there.
1522730	1526850	One note of interest is they don't just have API keys in there.
1526850	1534850	You can also see they have browser cookies and browser fingerprints, so they don't stop at just put a session ID in there and use the session cookie.
1534850	1552430	They actually persist what the browser fingerprint should be so they don't get detected either by malicious account detections for the infrastructure they're spinning up, or if they stole a session ID from a user, they can impersonate the fingerprint of that browser as well in a sort of automated fashion.
1556100	1559700	More on the services they offered to the users of this network.
1559700	1563100	They organized those services into what they called workgroups.
1563100	1566160	The big ones were the social workgroup, which is Headless Chrome.
1566160	1569740	We suspect it was used to manage their social media accounts.
1569740	1577220	Their op stations, which had Visual Studio Code Web and TTYD, which is just a website that is a terminal on the target box.
1577220	1590980	They had a scraper workgroup, which via calling third -party APIs and just using its own exit would scrape a website and give you back , I want to say, both the contents in raw form and also take screenshots if you asked it to.
1590980	1596240	And then all nodes would run SSH and VNC, presumably for administrative purposes.
1598940	1604480	So the way that they would access these nodes is their central hub server would do a reverse port forward .
1604480	1609240	So the pattern would be that you'd have your three-digit node ID, so, you know, node 1, 2, 3.
1609260	1613620	And then the last two numbers on the port would be the service you're going to.
1613620	1619980	So port 22, SSH, that's kind of an obvious one, so 1, 2, 3, 22 would let you SSH to node 1, 2, 3.
1620520	1622280	You can see the list of services there.
1622280	1625540	The sort of interesting callout is port 90 down there.
1625540	1632920	If you go to it, you'd get a bounce from the great firewall basically saying, like, this website isn't registered, you're not allowed to go to it.
1632960	1637320	It's probably an actual service, but I couldn't tell you what it is because I can't access it.
1641480	1643120	More on node numbering.
1643120	1648440	They had in their notes for us nice documentation on how they assign those numbers to nodes.
1648440	1653020	It looks like they break them down by the type of runner, the type of cloud provider they're running on.
1653020	1655900	So, like, HuggingFace is 42X.
1655940	1659700	On the left there, you can see the config for one of their HuggingFace nodes.
1659700	1665800	You can see their HuggingFace API key, the repo they're running, and a couple other bits of information about it.
1666160	1675920	You can also see in the bottom right screenshot, if it's big enough, I don't know if it is for you guys, but the workgroups that were assigned to nodes were also specific to where they were running.
1675920	1682560	So the HuggingFace node, for example, is always in the Chrome workgroup, not anything else.
1684700	1691460	As Zane mentioned previously, we did discover that they had one malicious PIP package that they'd upload called PTMPL.
1691460	1697400	It downloaded a script from one of their domains, which is how we were able to find it on VirusTotal, and just executed it.
1697400	1700740	So, good old-fashioned malicious PIP package, nothing too fancy there.
1700860	1708160	It also had this post install hook that's up on the slide of, again, just download something from the internet and run it as a Python script.
1708920	1715360	You can see on the bottom there, me sharing it with Zane and him looking at it on his phone and saying, I don't know, it's just Python, man.
1715980	1719320	And then when we looked at it more, he did say, yeah, no, that's real bad.
1722980	1732980	As a treat, we also found out that they were running something called BTPanel, which is sort of a People's Republic of China native cPanel equivalent.
1733100	1735560	So we did a little vulnerability research on that.
1735560	1749060	It is a Python Flask web app, and we were able to find two instances where if you were man-in-the-middle, you could get a remote code execution as root, one of which is patched, that first one, where they would download a PAM module, a pluggable authentication module over plain text.
1749060	1754600	So you could just give them a malicious PAM module, and that will execute as root the next time someone tries to log into the system.
1755300	1766040	And then their update and install script also fetches some RPMs and some tarballs over HTTP, and it's an update or install script, so it runs as root, so you can, again, get code execution through that.
1766600	1768500	That one is still not patched as of July.
1768500	1771480	It might be patched now, I don't know, I haven't checked since then.
1772040	1781600	And then the third class of vulnerabilities, because it's really two, is that they implemented multi-factor auth, just that, well, they didn't implement multi-factor auth, I think is the key there.
1782160	1794320	They used the same time-based one-time password key for all users, so if you registered with their panel, you could just sign up your authenticator, and then you know the authentication code for every user of that panel.
1794520	1806440	And then their one-time password for SSH access is actually just a static credential, so if you get it once, it'll be valid until the heat death of the universe, I suppose, or a bit before the flip on the computer.
1807120	1812220	And then there is a lot of weird memory safety stuff that just looks hinky, but we didn't decide to look into more.
1812220	1821540	If you want more details on BT panel and what it looks like from a security standpoint, I did a blog post in collaboration with SSD Disclosure with the link at the bottom there.
1825150	1832230	So I hinted at this earlier, turns out vibe coding also is alive and well for people trying to spin up infrastructure like this.
1832470	1843690	In their backups, they had database logs and just chat logs with large language models for assistance in trying to dev out this network, the system they built.
1844390	1848470	Part of the cool part for them, I guess, is because they'd already built parts of the network.
1848470	1859810	They could use it to access models and APIs that are not available within the People's Republic of China, so like open AI models, they could access those even though there's an IP block if you're in the People's Republic of China.
1859870	1863130	Some of those logs are in simplified Chinese, which we just threw in Google Translate.
1863130	1866290	I can't read simplified Chinese, and some were in English.
1866350	1872170	And there's low amounts of evidence, one piece of evidence suggesting that they were using Cursor specifically for their development.
1873990	1875810	Here's some screenshots of their chat logs.
1875810	1878830	I hope it's big enough that you can see it, but I sort of doubt it.
1878830	1886070	If you pull up the slide later, you can see on the left, they're asking for help developing a new feature for their network.
1886070	1893030	In the middle there, they're asking the chatbot how to set up their directory so Cursor can best help them develop new services.
1893230	1899490	And then on the right, I want to say they were talking through new ideas of services to offer through their infrastructure.
1899550	1902130	So, some kind of amusing bits there.
1904470	1911310	Summing it all up, Zane mentioned earlier the last update we saw to a Mac container was on the 20th of June.
1911530	1919530	They did implement encryption finally for their data, but because we already knew their password generation scheme, we could just decrypt it and access it again.
1919530	1925050	So that was cool for us that we'd gotten in early enough to make their encryption worthless.
1925110	1928010	It did include new Git repos and some new email addresses.
1928310	1938290	And as far as takeaways, if you're publishing to Docker, you probably want to make sure that they're not public containers because a lot of Docker containers contain information that is meant to be secret.
1938690	1944490	Git files, like we mentioned, we found a bunch of API keys, so many crypto trading bots, so, so many.
1944650	1949510	We did report that to Docker with the recommendation of have a default Docker ignore, I think.
1950270	1952170	They never really responded.
1952170	1955690	They confirmed receipt, and then we didn't hear from them until we told them we were presenting.
1957630	1970450	We also reported to GitHub and GitLab, as Zane mentioned, that they include the credentials in the .git config by default, and it'd be great if they could implement a change to not have a plain text credential on the file system.
1970890	1977770	They also never responded, or said that they didn't view it as an issue because it's a configuration problem, which it is.
1978450	1982490	And then the final takeaway is, like, the cloud's not just for good guys.
1982490	1995990	People are using cloud platforms, including free tiers, to build out infrastructure that will be used to attack or even just do weird social media stuff on the internet, like that Pokemon tweet.
1998480	2000700	And that's all we got.
2000820	2005640	We'll be available for questions or comments or just to chat off to the side.
2006500	2008140	Thank you all for coming.
