start	end	text
660	8200	Hello DEF CON. So, I'm very happy to be here. This has been a dream of mine for many, many
8200	18080	years. And thanks for being part of it. This research is about a cool story about secrets in
18080	25020	public cloud resources. And you know, who thinks we will never run out of customers
25020	32880	public, public, sharing secrets in public cloud resources? Yeah, I think, I think we will
32880	39440	never run out of that. And um, my name is Eduard Agavriluai. I was a senior penetration
39440	45200	tester at KPMG Romania while I've done this research. A huge shout out to them for
45200	52360	supporting the research and trusting this idea. I was also a contractor at Syncubes. I mean,
52360	57160	I still am and I'm doing offensive cloud projects there. I also worked one month at
57160	67330	CrowdStrike but I resigned on Friday. So, so I'm open for new opportunities and um, yeah, I'm
67330	75650	trying to do some cloud security research. Now, I started um, a cloud configuration
75650	84570	review for a customer of Syncubes. And um, I got the initial access um, and I started using
84590	94810	uh, Scoutsuite as I uh, always uh, as I always do. And um, I checked the report. I saw the S3
94810	99890	findings, the CloudTrail findings, the YAM findings. And when I looked at the EC2
99890	106770	dashboard, I saw for the first time, the critical finding AMI is set to public. And who
106770	114370	knows what an AMI is? Okay, cool. And um, who used at least once an EC2 instance?
114590	121030	Okay, so if you used an EC2 instance, you kind of know what an AMI is because every time you
121030	128490	start an EC2 instance, you are using an AMI. It's like a snapshot of a virtual machine and you
128490	137230	can pre-configure an AMI to contain your applications, secrets, um, so to have a baseline
137230	142410	right? And then you can start new EC2 instances starting from this AMI. And you have AWS
142410	148050	Marketplace AMI that are official and from trusted vendors which are the recommended ones
148050	154450	you can use. And you can also have community AMIs that are published by anyone. And you
154450	159710	have to be careful with uh, with them because if you don't trust the publisher, you might
159710	167170	have some back doors, malware and so on. But in any case, the thing is that an AMI can be
167170	171830	public or private. And by default, they are private and it's actually hard to make one
171830	177110	public. And I think you can see where I'm going with this. The issue is that they can be
177110	184990	public. And this customer had five public AMIs um, exposed for multiple years and when I
184990	191090	asked them, hey, can I take a look inside the AMIs to see what's inside of them? And um,
191090	197830	they were like, no. So I regretted I even asked. But I got this question, what was inside
197830	203630	the AMIs? And this actually gave me the research idea if there are other companies with
204190	215030	secrets in public AMIs out there. So um, first we wanted to do this research so bad that we
215030	220610	haven't checked any previous work but when we are, when we were in the middle of it, we
220610	225590	discovered the work done by Dolev Farhi who scanned based on keywords AMIs in a single
225590	233090	AWS region which was fine but it was not enough from our perspective. And also the work
233090	238450	done by Ben Morris who searched secrets in public ABS snapshots but we will see shortly
238990	246650	that there is very little overlap between his work. And funny story, last day I was talking
246650	251490	about the research with someone and he was like, hey, you know who did something similar?
252010	256890	He searched public ABS snapshots. He's Ben and he pointed at someone and it was Ben Morris
256890	267410	and he was like, yeah. And, sorry. So yeah, I've met Ben Morris. I've been saying his name a
269010	275790	lot rehearsing the presentation. It was a pleasure to meet him in person. He's a lovely guy.
276890	282490	Now, uh, we set some goals for the research to dig for secrets in every public AMI across all
282490	289350	AWS regions to have some fun and do some responsible disclosure. We also had a hidden goal
289350	295230	to get some bounties and uh, my colleague Matei will tell you more about it. Starting the
295230	301070	research we had to collect every public AMI across all AWS regions and to do that you have
301070	308090	to, you have to use the CLI because AWS automatically deprecates images after two years
308090	315330	after they were published. And if they are deprecated you can find them in the web portal.
315330	321170	Also customers can deprecate their images whenever they want. So you have to use the CLI and
321170	327290	specify the flag include deprecated to make sure you get all the AMIs. And we did that and
327290	334910	we got 3.1 million AMIs and uh, we were sure that this was too much for us to scan all of them
334910	342870	and we started asking if we can remove AMIs based on the chances of having secrets. So we
342870	349330	removed AMIs from marketplace, that left us with 1.5 million. We removed AMIs owned by AWS
349330	355910	that were not in the marketplace, that left us with 1 million. And we went further and we
355910	361850	removed the owners that had more than 50 public AMIs because honestly if you are a company
361850	367610	and you have more than 50 public AMIs security wise you are in a point of no return or you
367610	375130	are an official publisher, an unofficial publisher, right? And that left us with 27,000
375130	384730	AMIs. Now we did some sanity filtering because some AMIs had 17 volumes or volumes as big as
384730	389990	20 terabytes. Obviously I'm very curious what's inside of them but for our budget we had to
389990	397870	remove them and that left us with 26,000 AMIs. Now the distribution from our list looks like
397870	405030	this. Obviously the most AMIs were in U.S. East 1 and the region with the smallest number of
405030	414710	AMIs was IL Central 1, Israel Central 1 with only 30 public AMIs after our filtering. And when
414710	422010	I'm saying that we collected the AMIs this is what I mean by it. So we got the JSON
422010	427550	definition for each AMI and you have a lot of information like the ones highlighted, the
427550	432970	image ID, the information about the snapshot but you also have other important information
432970	441470	like description, title and the owner of the AMI and we'll see how we can use that shortly. Now
441470	447510	that we had our list we need a way to access the contents of the AMI and this should be time
447510	454390	and cost effective, automated and as reliable as possible. And we looked for various methods
454390	460150	some of them might work in certain situations but only the fourth option was the right one
460150	467830	for us. So first we tried to copy the snapshot of the AMI in our own AWS account and
467830	474890	download it. But even if the AMI is public the ABS snapshot is not by default and that's why
474890	480950	it's very little overlap between our work and the work done by Ben Morris. Next we tried to
480950	487370	start an EC2 instance based on the target AMI, create an ABS snapshot of its volume and
487370	495910	download it. But we quickly realized that this would take a lot of time for an ABS snapshot
495910	502790	of 100 gigabytes. It took around 20, 30 minutes to download and we were sure that AWS will
502790	510330	block our IP since we are downloading terabytes of data. So definitely not an option. But we
510330	517010	realized we had to operate as much as possible within the native AWS features to achieve the
517010	525650	faster method. And we tried to start a new EC2 instance based on the target AMI and connect
525650	532210	directly to the instance. But for some reason the instances were not in a state that allowed
532210	538450	us to connect to them. Either through SSH or through SSM features it just didn't work. But
538450	547750	we did a work around and we got to this method. So we have a secret search instance. We call it
547750	553970	like this because it's an instance that we already have in our own AWS account and it's
553970	559190	working. We can connect to it. And next we start an EC2 instance based on the target AMI,
559190	564110	detach its volume and reattach it to our secret search instance where we can connect and
564110	570410	analyze the data. It's like having a working laptop and someone brought a laptop that
570410	574670	doesn't work but you can get out the hard disk and connect it to your laptop and basically
574670	579010	that's how you can access the data. And everything is happening within the AWS environment
579010	585850	so it was both fast and it was both as reliable as possible. Now I'll show you a demo on how
585850	596530	you can manually access the contents of one AMI. Let me see if I can start this. So we can
596530	600670	search based on the description. You can use this to target certain technologies or
600670	605750	companies. You have to mention the right region because otherwise you will not find the
605750	612310	AMI and you also have to specify the flag include deprecated to make sure you get all the
612310	619030	images, right? If you know the AWS account ID, you can try to find all the images owned by
619030	625790	that account so that might be useful for bug counter, right? But let's stick with our
625790	635730	description based search. So let's try to copy the ABS snapshot as a first step. Let's
635750	641750	try. So you will see that if you try to copy the snapshot in our own AWS account, we will
641750	646670	get the error message source snapshot is not found. That's because the ABS snapshot is not
646670	653890	public only the AMI is. Now we will do the method with the secret searcher instance so we
653890	658230	have our instance that it's running and now we will start a new instance based on the target
658230	664270	AMI and we will place it in the same availability zone as our secret searcher instance. You
664270	669710	need the same availability zone to make sure you have, you can move the volume between the
669710	677050	instances. Now, the instance is running, we will stop it and we will detach the volume and
677050	683930	we will reattach it to the secret searcher instance. After you detach the volume, you can
683930	693090	delete the EC2 instance that is based on the AMI if you want to reduce some cost but in any
693090	698770	case, you can just attach the volume and then you can connect to it. We use the web portal
698770	704730	because it was easier for the demo but you can also connect to SSH. A common error that we
704730	710230	encountered was an ID collision between the new volume and the root volume that was
710230	716650	attached to the instance. And we have to use all kinds of weird tools I have never heard
716650	724050	about in order to fix this issue but once that is done, you will be able to mount the volume
724050	730030	and connect, to mount the volume and access the files. And now that it's mounted, let's look
730030	735870	for some AWS credentials, right? We found some and now let's check if they are valid. Because
735870	741850	for some older instances, the secrets might not be valid anymore so every time you have to
741850	751320	check them. So, surprise, yes, they are working. And that's exactly how we felt when we
751320	757700	found our first AWS access keys and the same day we found ten other valid access keys so we
757700	763780	realized that this was a big issue indeed. This is the high level architecture we put in
763780	771560	place. We had a master EC2 instance where we ran our big script and in each region we started
771560	780180	the secret searcher instance and then we started batches of 20 instances based on AMIs to make
780180	786180	sure we reduced the time. And for each instance we detached the volume, we reattached it to
786180	792920	the secret searcher instance where we will search for secrets and sensitive files. And after
794420	801200	writing 1.2K lines of code, 14 days of scanning time and a bill of 450 dollars, we
801200	808580	collected 500 gigabytes of carefully selected files and data um, that we had now to, to
808580	813960	analyze. And I invite my colleague Matej Josic to tell you more about it. Thank you.
817140	822460	Cool. Good morning everybody and thank you so much for being here. It's actually an absolute
822460	830900	pleasure to be on stage at DEF CON 32. This is the secret searcher section where I'm going to
830900	837520	talk about how we search for secrets, what sorts of secrets we found and what we were able to
837520	845380	do with them. I am Matej Anthony-Josephs. I've been with KPMG for about a year and a half
845380	851300	and I'd like to take this opportunity to thank them for the time and the budget for this
851300	856320	project right here. Other than that I'm a senior security researcher with experience in
856320	861960	pen testing, threat hunting, vulnerability management and a bit of people management as well.
863200	869400	Now, completely unrelated to this research, I've also set up a company alongside my wife,
869400	874380	Alexa. Our company is called Hivehack because we're absolutely fascinated by the
874380	880520	collaborative trace of bees whereby up to 60,000 bees work together in a colony for the greater
880520	887140	good of the community. Similarly, we think that collaboration is probably the most important
887140	895640	part of cyber security. And while I don't know the exact numbers, just looking around DEF CON, I
895640	901900	can see why. There's quite a hive of hackers around here. That's enough about me, back to
901900	908480	Cloud Query. For our initial strategy, we decided to be as lazy as possible. And trust me,
908480	914180	being lazy is a good thing here. We wanted to avoid reinventing the wheel and wanted to use
914180	920640	known tools as much as possible, such as Truffle Hog, but we quickly realized that this was not
920640	927860	going to work. In fact, the tools which we tried to use were quite slow and produced loads of
927860	933140	false positives. And while we could have worked through the false positives, the fact that
933140	937960	the tools were slow was the main issue because slow scanning times meant that our EC2
937960	943580	instances ran longer, which in turn meant that our AWS bill would have been way higher,
943580	952400	leaving us broke and lazy rather than just lazy. So, with this in mind, we had to pivot and we
952400	958780	went back to the Zen of Python. More specifically, the following section of it. Simple is
958780	964660	better than complex, complex is better than complicated, and special cases aren't special
964660	971460	enough to break the rules. So, with this in mind, we reduced our scope even further and became
971460	978640	even lazier. We ended up only looking for specific types of files or directories, such as,
978640	983900	uh, well, environment secrets, secrets leaked within Git repositories, AWS credentials,
983900	991780	private keys, and a few others. Now we faced another issue, and that is finding the right
991780	997900	tool for this. We had to find a tool which allowed us to search for files and directories on
997900	1004760	the file system based on their names. The tool had to be quick and simple. So, you can
1004760	1010700	probably see where I'm going with this. We ended up using the native Unix utility, find, of
1010700	1017580	course. So, uh, we, we skipped the Windows directory, program files directories because
1017580	1023360	they're full of junk and slow down our scans. We skipped everything about, above 25
1023360	1028300	megabytes because, well, this is only a proof of concept. We don't need to find everything
1028300	1035720	really. And searched for all of these various files and directories. So, besides our, well,
1035720	1040900	proprietary and very complex use of find, and I'm only joking as well, it's not that complex,
1040900	1047320	we had to set up a few other things. And one of them was an automation for verifying
1047320	1053940	AWS credentials. And you'll see in a minute exactly why we needed that. Secondly, we used
1053940	1061400	Git leaks for checking Git repositories for secrets. Also, we had to set up a few other
1061400	1067220	automations for verifying API keys and other types of credentials. And for this we used
1067220	1074000	key hacks, which is a fantastic repository of methods for validating keys and credentials.
1074540	1080780	However, even if we had all of these automations set up, we're still left with, well, a
1080780	1087680	shit load of manual work to be fair. So, following our data collection phase, we were left
1087680	1094900	with 2 million generic API keys, and of course many of them are false positives. Over 100,000
1094900	1101980	potential AWS credentials, several private keys, you can see some slack tokens, Stripe,
1101980	1106520	Telegram, and so on and so forth. So you can probably see why we needed all of these
1106520	1114180	automations for validating the keys and credentials. So, out of the about 100,000 AWS
1114180	1122940	credentials, only about 120 of them were valid, out of which 20 were root. Now, I know that
1122940	1131620	this does not seem like a lot. I mean, what is, 120 out of 100,000 is nothing, right? But,
1131620	1140760	think about it this way. These, these keys allowed us to access the AWS accounts of over 100
1140760	1147540	companies. So this gave us initial access there, and for 20 of them we had absolute complete
1147540	1156760	control. So, let that sink in for a bit. Now, we face another issue, and that is identifying the
1156760	1163820	donors. And for this, we used the get contact information call, which gave us, well, the
1163820	1169780	company name, in some cases the name of the contact, phone number, email address, and so on
1169780	1178200	and so forth. So with this in mind, we found something surprising. And that is, that it's
1178200	1183700	not only small boutique like companies affected by this. In fact, many of the companies are
1183700	1190920	on the Fortune 500 list. Some of the most valuable ones were worth 200, respectively 50
1190920	1196480	billion dollars. We found three large telecom companies, which you've definitely heard
1196480	1200700	about in the past. Ten relevant security and tech companies, and several others in
1200700	1207260	consulting, education, health, manufacturing. Now, unfortunately, we cannot disclose much
1207260	1211440	more about the companies at the moment, but maybe in the coming weeks or months we will be
1211440	1219080	able to do so. Now, you may ask, well, anybody can write whatever they like in the contact
1219080	1225700	information in the AWS account, right? And you're absolutely right. And then our efforts
1225700	1231720	for identifying the owners could have been completely in vain. However, here is where our
1231720	1236140	OSINT came in. We did quite a bit of OSINT, went on social media, including LinkedIn, and
1236140	1240800	found several of these owners. Funnily enough, many of them had several AWS
1240800	1245720	certifications on their accounts, suggesting that they are security aware and know how to
1245720	1254040	properly configure their AWS accounts. Now, one of these companies, which was and still is
1254040	1261340	actually on the Fortune 500 list, had a program on bug crowd. So we reported it. And this way
1261340	1266860	we got our first P1, our first confirmed critical vulnerability on a bug bounty platform.
1266920	1276350	That was actually fantastic for us. Oh, thank you. Thank you. Now, let's see, how much do you
1276350	1281710	guys think we made out of it? So who thinks we made between $10,000 and $100,000? So let's
1281710	1287310	say five digits. Yeah, only a few hands up. Maybe four digits, so a thousand and ten
1287310	1293650	thousand. Right, a few more. Well, let's say AWS or cloud in general is niche, maybe they
1293650	1300210	don't really care about these accounts. Maybe three digits? Okay, yeah, that's pretty low.
1301150	1310230	Yeah, we made zero dollars out of it, nothing. Yeah, thank you, absolutely. Well, to be
1310230	1316110	fair, there's a bit of a catch. It wasn't a bug bounty program, it was a vulnerability
1316110	1322710	discloser program. And we weren't too disappointed, to be fair, because we didn't really aim to
1322710	1328270	make money out of this research. We just wanted to make the internet a safer place, although
1328270	1334390	this sounds a bit cliche. But still, we quickly forgot about this because we found something
1334390	1340710	else which I think was more interesting than this. I like to call this story how we earned and
1340710	1345950	lost three million dollars in a week. And, well, we're in Vegas right now, we all know a
1345950	1351890	thing or two about losing and earning money quickly, right? Maybe not quite three million
1351890	1358230	dollars. For a bit of context, we found this company which had a public AMI, there was a
1358230	1366530	Git repository within that AMI, and within the Git repository we found a Stripe API key. And for
1366530	1372170	those of you who don't know, Stripe is a payment service not unlike PayPal. So our first
1372170	1379010	thought was, okay, let's run a balance call to the API and that's what we got. Seven digits in
1379010	1384890	the USD currency. So what looked like 3.1 million dollars. Fantastic. So our first thought,
1384890	1391270	of course, was, well, how would a threat actor go about transferring these funds into their own
1391270	1396430	account? For research purposes only, trust me. Only research. So we went to the
1396430	1405090	documentation and we quickly realized that the amount is in cents. So what we thought was
1405090	1412710	3.1 million was actually 31,000. Of course we were very disappointed. We had to get over the
1412710	1418550	disappointment that our net worth reduced from 3.1 million to 31,000 by simply reading the
1418550	1424970	documentation. So if there's any conclusion here, don't read the documentation. Just
1424970	1430190	joking, of course. So we wrote an e-mail to their security contact, let them know what's up
1430830	1438030	and waited and waited and waited. And all we got was radio silence for a few weeks. It was
1438030	1442350	pretty annoying to be fair. We thought, well, did we do something wrong? Didn't we prove
1442350	1451510	impact? So we thought of proving impact and that's what we did. We, or I, registered to their
1451510	1462210	cheapest plan which was 9.99 per month, confirmed the transaction from the API and did a
1462210	1468990	refund call which was successful. Fantastic. And a second level of validation was that the
1468990	1473410	transaction was reverted. So my money was back in my account and I could still use their
1473410	1478370	services which I didn't do because I didn't need their services. But now this was a bingo
1478370	1483810	moment for us because we knew that we can talk about money. So we contacted the CEO but for
1483810	1488750	this we had to go on LinkedIn, found the CEO, do a bit of OSINT, get their e-mail address and
1488750	1494130	write to them. And guess what? Within a couple of hours we got a response where he also
1494130	1502270	cc'd the CTO and asked us for more info. And we provided more info. We gave them a comprehensive
1502270	1510370	report including the finding, the impact of the finding and steps for remediating this. And
1510370	1515950	what we got in response was a pretty dry message from the CTO saying, thanks for sharing the
1515950	1522710	relevant information, we have made the AMI private. For now? What? For now? Okay. And we'll
1522710	1530590	be replacing the keys. Thanks so much for responsible disclosure. We took that as a thanks
1530590	1535930	bye. And yeah, honestly we were a bit disappointed but we had a lot of research to do. We had
1535930	1540290	to go back to our research and just dig through the 500 gigabytes of data which we already
1540290	1548550	got. However, one month later I was forced to remember the issue. I checked my bank account
1549710	1554690	and there's a 999 transaction. So I was so excited about being able to do the refund that I
1554690	1564130	completely forgot to cancel my subscription. Well, remember that we are fairly broke so I
1564130	1569390	didn't want to let 999 go by just like that. So I went back into the API, did the same call
1569390	1580430	again and guess what? Money was back in my account. Yes, thank you. Yep. Well, we were
1580430	1585510	disappointed initially by the dry response. But you cannot even imagine our disappointment
1585510	1593210	that the issue was still not fixed one month later. Now, there's way more impact than just
1593210	1599050	this. Think about it this way. We had to spawn several EC2 instances in our account, we got a
1599050	1607250	bill of 500 dollars which, well, I'd have preferred to avoid. So yeah, if we weren't ethical, we
1607250	1614350	could have went and used the victim, so to speak, AWS accounts to do this research for free.
1614950	1623130	Now, a second potential area of impact which I think has a bit more potential, well, AWS
1623130	1629890	based ransomware. And this way I could have come to DEF CON for free. So typically when we
1629890	1636150	think about ransomware, we think about these teams of developers working 24 7, working on
1636150	1641650	evasion and stuff like that. Perhaps when we talk about ransomware as a service, they're
1641650	1650490	using 24 7 customer support teams and call centers. Well, in here, with access to the
1650490	1657590	profiles, to the accounts, we could have used this, well, one liner or four liner, depends how
1657590	1666130	you write it, to list every S3 bucket within the accounts, copy all of the data to the
1666150	1673810	local systems and then remove all the data. Now, instead of the data which they expect to
1673810	1678250	have on their accounts, they could find something along these lines, a ransom note. All your
1678250	1682470	files have been stolen. You must buy us a Romania Las Vegas ticket to get your files. And
1682470	1686990	honestly, that would have been pretty reasonable. It's only what, 500, a thousand dollars? So
1686990	1694630	yeah, pretty decent ransom. And I need this disclaimer here, this is just a joke. We didn't do
1694630	1701010	this and we wouldn't do this, but it's pretty cool that we could have done this, right? Now,
1701010	1708050	Edward, want to take over? So, the research was done, we collected the data, we found
1708050	1715050	secrets, we validated them, but we wanted to bring down the impact of the affected companies
1715050	1721690	before we published the research. So, we looked for contact details and we couldn't find
1721690	1727650	many. We had to search for websites to go find their contact information, give some
1727650	1734650	generic e-mail just to make sure we don't give out too much information to someone that
1734650	1739590	doesn't need to know it. So we sent almost 70 responsible disclosure e-mails and we
1739590	1744470	received less than ten responses. We had to do some weird things like contacting the
1744470	1749070	national search for one company, scheduled a sales call just to tell them about the
1749070	1755170	vulnerability, and 90 days later after we did all this, only ten AWS keys were
1755170	1764090	invalidated. So, that sucked and it's like companies are using AWS and they are ignoring
1764090	1768210	responsible disclosure, they don't have contact details, they never wrote access keys and
1768210	1773710	they are like, man, this cloud thing is so unsafe. It's not like that, right? And in a
1773710	1779710	desperate attempt to invalidate more keys, we notified AWS security team and we were
1779710	1787570	like, I know this is weird but we got 120 access keys that are valid. Here is the proof.
1788350	1794410	Can you invalidate them? We have a research we want to publish. And the AWS security team,
1794410	1800830	the most amazing team we worked with, they made me rethink about the whole responsible
1800830	1806210	disclosure process. And after a few days after contacting them, more than 60 AWS keys were
1806210	1811850	invalidated. We had a meeting about the research, we provided some ideas, we discussed fixes
1811850	1819130	and it was overall an amazing experience and I want to give a huge shout out to Christian
1819130	1825550	Sever from AWS security team and AWS security outreach team. So, please give them a round of
1825550	1833450	applause. Thank you. Now, to discuss a bit about detecting and defending against this and
1833450	1840570	let's start with defending. So, if your AWS account has this yellow warning signs, you
1841390	1847590	might want to look into it. So, the settings block public access for AMIs and ABS snapshots
1847590	1853830	should be enabled. They should look like this. They should have this green check mark. You
1853830	1859850	can also use the CLI to validate if you have public AMIs. Make sure to check every region
1860450	1866430	and make sure to check for deprecated images. You have to be careful about this because one
1866430	1871930	technique attackers are using to exfiltrate data is by making AMIs public and accessing them
1871930	1877870	from their account. And if that happens to you, you should look in CloudTrail for this
1877870	1883610	event, shared snapshot volume created. This is the only event you get in CloudTrail if someone
1883610	1889690	accesses your public AMI. And it doesn't have a lot of information. As you can see, the IP
1889690	1898490	address is hidden which I get it. It's protecting the customer that is accessing the AMI. That
1898490	1903810	is cool. But the only identifiable information you have is the account ID which you can't do
1903810	1910310	much with it. So, better be careful, better protect your account and enable the settings if
1910310	1919210	you don't plan to publish AMIs or ABS snapshots. Now, we have a lot of data and we did other
1919210	1927450	research with it. And one idea we had was, so we had 20K JSON web tokens and we looked if
1927450	1932370	there are any tokens that were not expired, maybe they had some secrets in them, any other
1932370	1938330	misconfigurations but nothing came out of it. However, it was a good try. Next, we looked
1938330	1944130	through our 4K unique SSH private keys. We generated public keys and a figure print and we
1944130	1950550	searched on showdown but nothing came out of it. One idea was to perform the same scan from
1950550	1956710	within the AWS network. Maybe that's how we might find some servers but that was just too
1956710	1964510	much work and it wasn't worth it. Another cool idea we had but we haven't started this yet. So,
1964510	1969630	we collected a lot of private, a lot of repositories and some of them are surely private.
1969770	1974810	We wanted to identify the private repositories to identify the deployed web application in
1974810	1981390	the wild and then perform source code review in order to find some vulnerabilities, get some
1981390	1993890	CVs, get some bounties, but that is a lot of work and we are keeping it for later. And that
1993890	1999930	on the topic of further research. Well, we still have about 500 gigabytes of potential
1999930	2005450	secrets and we tried our best to dig through that data but there's definitely way more to
2005450	2011850	find. Moreover, our colleague from KPMG Romania, Stefan Tito, worked on some similar
2011850	2018050	research on Azure and we are looking forward to his research being published as well in the
2018050	2025630	near future. Also, we will soon make a word list public with all the files which we found in
2025630	2033130	all these public AMIs which we scanned. Now, going back to the research objectives formulated
2033130	2038850	by Edward at the beginning of this talk, we aim to dig for secrets in every public AMI across
2038850	2047870	all AWS regions. And while we didn't dig into all public AMIs, we dug into all public AMIs which
2047870	2053930	we found interesting. So I'd say that this was achieved. Also, we aim to have fun. And,
2053930	2058770	yeah, we did. We found a lot more stuff than we expected. It was a roller coaster and
2058770	2066670	thanks, Edward, for this. Lastly, responsible disclosure. Well, I was a bit disappointed by
2066670	2073330	the responsible disclosure process in general. Well, many of the owners didn't respond to
2073330	2081610	us. Others, well, didn't have any sort of information for us to contact them. However, the
2081610	2087550	experience of responsibly disclosing this to the AWS team definitely made up for all of the
2087550	2093910	less pleasant experiences, so this was definitely achieved as well. Now that we are
2093910	2100630	approaching the end of this talk, here are our conclusions. Firstly, the impact of this
2100630	2109370	research is not yet fully uncovered. There's still way more to find out there. We have found
2109370	2114810	several secrets already in the data which we collected. There's definitely more in the
2114810	2118690	data which we already collected, but there's definitely way more out there which we did not
2118690	2124390	collect yet. Potentially a nice area of research would be continuously monitoring new
2124390	2131370	AMIs becoming public. Secondly, security by obscurity is definitely insufficient. So many
2131370	2135990	developers definitely thought that their Git repositories were safe because they're private,
2135990	2142330	right? But how is anything private if it's placed in a public resource? Also, you may be
2142330	2148870	thinking, hey, I won't be a target of this, right? Nobody cares about my AMIs. Well, think
2148870	2154470	about it this way. Edward and I, two cyber security guys from Romania, were able to do this.
2154650	2160730	Think about what threat actors could do. So definitely don't make your AMIs public if you
2160730	2169330	don't have to. Now, AMIs are only the tip of the iceberg here. There are still a lot of other
2169330	2175650	interesting things to find across several other public cloud providers. Who knows, maybe
2175650	2181850	next year we'll be back here talking about how we dug for secrets in a different cloud
2181850	2188310	resource. And still we encourage you to do your own research as well. And please let us know if
2188310	2195090	you have any sort of ideas. We're happy to help. Actually, going back to my initial point
2195090	2202110	within the secret searcher section, collaboration is definitely the most important aspect of
2202110	2207010	cyber security. So please connect with us. Let us know if you need any help with any sort of
2207010	2212630	research in the future. And we'll definitely be happy to help. This being said, thank you
2212630	2231650	very much everybody. We appreciate you being here. Any questions? Yep. Sure. Go ahead. Is
2231650	2238630	the mic on? Not yet. Can we get the question mic on please?
2245690	2262160	Perhaps just speak really loudly. We don't know. So we didn't perform any calls beside the
2262160	2268200	contact information. So we tried to get security operation and another type of contact
2268200	2272940	details but we didn't check the permissions. I'm sure for some of them we surely could
2272940	2279680	have but that was too much because surely there was some automation based on the access
2279680	2287900	keys and we might have broken something. Also please note that just having the S3 ransomware
2287900	2292300	sort of code in my terminal got my adrenaline rushing. So we didn't try to do anything like
2292300	2302920	that. Yes. I didn't have the permission to do anything like that. So I don't know if you
2302940	2320720	have to. I wanted to. I'm looking for new opportunities. If you have something in mind in
2320720	2325900	the offensive security, cloud research or cloud security, just give me a message and I'll
2325900	2334960	start applying next week. So thanks. Cool. Any other questions?
2337080	2348820	Yes please. No and to be fair we didn't even expect that. I mean we had KPMG for that. So
2348820	2353780	thanks KPMG and uh we are waiting some t-shirts from the companies we disclosed this. Thank
2353780	2364350	you. Cool. Mic's working so if anybody has any questions you can speak in the mic. Cool.
2364350	2367910	Doesn't look like any other questions. We'll just be around here so please let us know
2367910	2370290	guys. Nice talking to you. Thank you.
