start	end	text
2880	14260	Hi everyone, welcome to Shopping for Vulnerabilities, how cloud service provider marketplaces can help white and black hat vulnerability research.
14260	21900	This is a presentation that's being recorded after DEF CON.
21900	29220	You know, I hope you all enjoyed Vegas, the ones that could attend, that you are all safe and were able to dodge the COVID.
29900	37740	And if you're just watching this and didn't go to the event, hope I see you on a future edition of the event.
37740	39760	My name is Alex Sierra.
40340	49760	I am only one of three people that was involved in creating this content.
49780	57580	I am the co-founder and CTO at Tenchi Security, but I've been working in information security for over 25 years now.
57580	60960	You know, the copious gray hair.
61840	77620	And previously I was co-founder and CTO at Cypher and then at Needle, two startups you might have heard of, and was for a brief moment, global head of detection response products and head of product management for those products at Verizon.
77640	81480	I am certified AWS certified security specialty as well.
81480	85440	You can find me on Twitter and you have my email address there.
85440	92480	And I was mostly focused on the AWS part of this presentation, as well as setting up the whole thing.
92860	107520	And I have Gleison Tomas from our security research team to thank for the Azure part of the research and for Marcelo Lima, as far as the Google Cloud part of the research as well, right?
107520	119420	So Tenchi is a Brazilian security company that's focused on third-party security and cloud security, which is why this subject matter that we're going to be talking about is near and dear to our hearts.
119660	140280	So hopefully by the end of this meeting, of this meeting, of this presentation, you will have learned a little bit more about those marketplaces' work, and in particular, how can they be used by both well-meaning and malicious players, unfortunately, to advance finding vulnerabilities in security products.
140280	142280	And why is this important?
142280	143140	Why is this relevant?
143140	159180	The inspiration for this talk came maybe a year and a year and a half ago, when there was like a couple of weeks where tons of very, very high CVSS score vulnerabilities were found in internet-facing networking or security products, right?
159420	164240	And so something triggered in my brain saying, why now?
164240	177280	Why are we suddenly finding so many vulnerabilities in so many of those internet-facing products, and especially like SSL VPNs, and firewalls, and web application firewalls, and load balancers?
177280	179260	So that was really, really weird, right?
179280	182400	And we all know those are juicy targets, right?
182400	184820	Those are interesting things.
185280	196220	So the Conti leaks came out a while back, where someone was able to get the internal communications of a big ransomware crew.
196560	206800	And one of the things that, again, caught my attention was how they explicitly talked about how they would love to get their hands on security products, right?
206800	218260	They wanted to get their hands, in particular, on SonicWall firewalls to be able to exploit and test the exploitation of a vulnerability.
218260	229380	And also, they wanted to get their hands on some endpoint security products, so they could check if those products were efficient in blocking their payloads and things like that.
229600	231940	And so why are black hats interested in that?
231940	253520	So if you think about access brokers, those players in the malicious actor marketplaces that gain the initial foothold into companies and then sell them, of course, any internet-facing product that allows them to get the initial access into a company and then maybe even pivot internally means money to them.
253520	264300	So any internet-facing networking or security appliance that they can get their hands on to find vulnerabilities or to learn how to exploit previously known vulnerabilities is a big win.
264380	268640	Malware developers want to bypass detection and prevention on security products.
268720	272800	And so if you think about it, perimeter security appliances are like a double whammy.
272800	274220	They check both boxes.
274220	277240	So they're particularly interesting to black hats.
277240	282100	And white hats also want the same things, but for different reasons, right?
282100	291080	So maybe you are thinking about purchasing one of those products at the company you work for and you want to evaluate how secure they are independently.
291080	293240	So we want to test their security.
293560	296640	Maybe you want to profit from bug bounties.
296640	305380	A lot of those large vendors, networking equipment and security vendors, offer cash prizes if you find vulnerabilities in their products.
305720	315200	But most importantly of all, right, you want to find a vulnerability and brand it and create a logo and a webpage for it and become rich and famous, right?
315620	317220	Well, anyway.
318120	331800	And so one of the things that changed recently, for some definition of recently, is that a lot of those products used to be sold just as hardware appliances.
332000	339400	And when you sell something as hardware, right, you have some additional level of control over who gets it.
339400	350200	Because for example, you know, some countries are under sanctions and they have a hard time buying products, you know, from Western technology companies.
350200	360540	So it's an extra step for them to get hardware that contains running software and even licenses for some of those products.
360540	366460	It's not like the nice people at Hacking Village that can just go on eBay because they are in the U.S.
366460	373460	and buy, you know, discontinued or previously owned election equipment.
373620	382320	If you were in Russia, if you're in Iran or, you know, North Korea, it's not as easy to do that to buy a major appliance.
382360	386200	There are ways around it, of course, and you see that happening with the Conti League.
386200	392900	I think they end up being able to acquire some of those things through a proxy company in France or something.
393040	394540	But it's an added step.
394540	396020	It's an added difficulty, right?
396020	403500	And even if you do have the hardware, who knows if some of that hardware has temporary protection that might delete the software.
403840	410220	If you're going to need a valid license to run that, that's still going to be hard to get.
410320	423340	But at the very least, if you get your hands on hardware, you could maybe detach the hard disk where the software is installed, and then you mount that as a secondary disk on another machine you control, and then you get to play around with it.
423340	432080	You get to see the low-level content of that and try to, you know, reverse engineer binaries, just understand how that product works.
432080	434200	There's a benefit to that.
434440	440000	And relying on hardware means you don't have a ton of control over which versions you get, necessarily.
440240	442320	So it's a mess.
442820	454980	But luckily for both white and black hat attackers, a lot of those products, like most of them, are now available for purchase very conveniently through cloud service provider marketplaces.
454980	477140	If you go to AWS Marketplace, Google Cloud Marketplace, and Azure Marketplace, which are the three major cloud providers and the ones we covered in this research, you just see a huge number of products, right, that you can very easily get and run like in minutes in a virtual machine on one of your environments.
477180	479440	And you can play around with them very easily.
479440	497140	So just immediately, even if you don't do anything too weird with it, you immediately are able to get the latest version of those products to run and do black box testing against it, right, paying typically by the hour or by the minute.
497140	507840	You don't even need to do like the down payment, the investment of buying an appliance, which can be very expensive in some of those cases, to start testing it.
507840	512700	And you can stop it when you're not working on it and not be charged anymore, and then start it up again.
513280	518360	And in some cases, even run different versions in parallel, right, to do testing.
518360	529980	So right off the bat, the same kind of benefit the automation of Infrastructure as a Service gives to IT in general, it's now paying off for attackers as well.
529980	532160	It becomes a very convenient way to do testing.
532160	538200	And we can see no shortage of products that are available on those marketplaces.
538200	540640	But how far can you go with it, right?
540640	542680	What can you do, right?
543680	556360	So let's talk about how AWS Marketplace works, and let's try to do the same sort of things with AWS Marketplace products that we want to do with hardware appliances, right, that I just mentioned.
557620	569580	So looking at how AWS Marketplace works, and we're particularly focused, by the way, on this research on virtual machine type products, like Infrastructure as a Service products.
569580	577920	We're not looking at SaaS because you can buy SaaS licenses from marketplaces, you can buy machine learning models, you can buy datasets.
577920	579580	We're not looking at any of that.
579580	589960	We're focusing on, again, the cloud equivalent of buying a used hardware on eBay and then doing reverse engineering, right?
589960	594020	This is what we're trying to do here as a service, like on the cloud.
594380	603760	So in AWS, they have a few things that are very specific to when you run an EC2 instance that came from the marketplace.
603760	607140	One of those things is the product codes, right?
607160	611460	So AWS Marketplace is not a very friendly product.
611460	614820	It doesn't have APIs for the buyers.
614820	617100	It does have APIs for the sellers.
617100	633040	If you're a vendor that's selling a VM-based product on the marketplace, you have APIs to know who bought your product, when, what licenses did they purchase, to automate the creation of new offers or publishing a new version of your VM, things like that.
633040	637700	But as a seller , those APIs, they do exist if you go on the console.
637700	645760	And when you see there's a tab for marketplace , you can see there are hidden APIs and documented APIs at discovery.marketplace.region.
646200	647520	amazonaws .com.
647520	649940	But they're not on any of the SDKs.
649940	651580	They're not anywhere, right?
651580	656480	They're really driven to being used by the browser, which is very atypical for AWS.
656480	660320	And I really found that experience rather icky.
660780	670120	But if you look a little bit, you're going to notice that every EC2 instance you create from the marketplace gets something called the product code.
670180	670340	Right?
670340	685600	It's an ID, much like an instance ID, that marks that instance as having come from the marketplace and uniquely identifies which product version it's associated with, right?
685600	690940	So, one of the places it appears that surprised me is on the EC2 instance metadata service.
690940	701760	If you query what's called an instance identity document on the EC2 instance metadata service, you're going to see a field called marketplace product codes.
701760	703220	That's actually an array.
703220	706620	I've never seen it be populated with more than one value.
706620	707580	But there it is.
707580	712580	It's a product code for which product is associated with that.
712580	716860	It was used... which product image was used to create that instance, right?
716860	737300	Based on the seller documentation for the marketplace on AWS, it seems like this exists so that any software that the seller puts into their image is able to query at runtime to see if the instance it's running from actually has a valid product code.
737300	749900	It's kind of an anti-cheat measure so that software can check if it was copied off of a VM that came from the marketplace and copied somewhere else to be run, right?
749900	757960	So, kind of, again , trying to help you as a seller enforce if your software was properly licensed for the marketplace , right?
758860	762080	And it's shown to buyers at least in four places.
762080	771980	So, in the marketplace wizard, when you're creating an instance, you see the... it's been confusingly called offer ID instead of product code.
772000	783640	But unless you had like a bespoke offer where someone offered you a non -standard discount, the offer ID is the same as the product code, right?
783900	793920	When you get a notification email, you know, telling you that you've accepted the offer, again, the offer ID will be populated with the product code.
793920	801300	You can see it on the identity document on the EC2 instance metadata service, which I just described.
801300	808320	But also, if you call EC2 describe instances, that same field marketplace product codes will also be present.
808320	820300	So, you don't have to be inside the instance to check, to realize it was created from the marketplace and to have some indication of which product it was created from, right?
821700	826900	So, that immediately gives us some useful uses, right?
826900	834740	So, first of all, if you do have an instance product code and you visit this URL here on a browser, unfortunately, it's human-centric.
834740	838760	Again, there are no buyer-specific APIs for this.
838760	841640	You can find out what product it is.
841640	843520	Oh, it's a firewall, it's a load balancer, etc.
843520	852060	So, immediately, that becomes useful, say, if you're a defender, if you're working on a security operation center doing incident response.
852060	855240	And one of the things that you ask first is, what is this instance?
855240	856900	Someone's attacking this instance.
856920	857800	What is this?
857800	859100	Does it have any private data ?
859100	860860	What is this instance's role?
860860	873440	If you suddenly realize, oh yeah, this is a Palo Alto firewall , you immediately learn a lot about what that instance is, what it does, what its role is, what its criticality is in your company, right?
874240	877180	And so, here are a few commands that you can use.
877180	895240	If you have the right to call EC2 describe instances on a particular AWS account, you can use filters on the describe instances command to filter out, in this case, companies that have come from the marketplace, regardless of which product code they belong to.
895240	903740	And you can see here, searching for a particular product code, individual product code, right?
903920	910060	So, I just want to see, you know, things created from this particular version of this product on the marketplace.
910060	912200	So, it can be very specific, right?
912240	916360	So, this could be used if you're a defender as an enrichment to SIEM events.
916360	919820	This can be used to populate asset management details.
919820	921640	So, there's a ton you can do.
921640	924720	And for attackers as well, like this can be used for recon.
924720	928760	If you're able to break into an instance, you don't know what it does.
929020	940220	You can run commands, or if you have an SSRF, you can run, get the identity document from the EC2 metadata service.
940220	950080	And again, if it has a product code, without even touching the file system, without doing anything that could be noisy, you immediately know what that machine is, right?
950080	955840	Because you know the role of that machine, which product it was used to create it, right?
955900	967920	So, that is very subtle, very unlikely to trigger any alarms anywhere, and gives you a ton of information about the machine you just landed on, right?
967920	970620	So, very helpful for attackers as well.
972060	988080	So, one of the things we did was you can also list AMIs, because in order for a product to be on the marketplace, the image, the AMI, or the Amazon machine image that is used to create new instances from it, has to be made public.
988080	993160	It has to be listed on the describe images command, right?
993160	999780	So, again, we have here a command that says, give me the AMIs associated with a particular product code.
1000420	1004440	So, what we did first is the obvious thing.
1004440	1013580	Let's try to create a new instance directly from that public AMI, without subscribing to it first on the marketplace.
1013580	1014840	And it fails.
1014920	1016040	And it says, no, no, no, no, no.
1016040	1017320	You have to opt in first.
1017320	1018580	You have to accept the offer.
1018580	1022920	You need to have a valid license for this product in order to use that AMI.
1022920	1029460	So, the AMI is marked the same way that, I don't know, binaries in Windows have the mark of the internet.
1029460	1035340	If you downloaded it from the web and it's, you know, restricts what you can do immediately with it.
1035340	1040880	So, the AMIs and the snapshots associated with that AMI have the mark of the marketplace.
1041000	1047080	And you can't immediately start an instance from them unless you accepted the license first.
1048060	1060100	So, after you accepted the offer for the marketplace, you can then start as many instances as you want based on those images.
1060500	1062060	And they will be charged.
1062060	1064120	They will work as expected, right?
1064120	1073160	And you can see, again, after you run them, as I mentioned before, the describe instances command, the output will show you the product code ID and the product code type, right?
1073160	1074920	Saying this came from the marketplace.
1074920	1078760	This is the product ID of the product associated.
1080820	1085600	So, now, this immediately allows an attacker again to do black box testing.
1085820	1087560	So, let's try the next thing.
1087560	1098280	So, let's try the equivalent of bought the hardware, unplugged the hard drive for the boot disk, and then I start rummaging through it and seeing, you know, looking at the software that's running on this appliance.
1098280	1108860	Because as we know, most appliances will not just give you like SSH and a shell as root to mess around with the binaries and the file system that the vendor created, right?
1108860	1114620	So, can we bypass that protection in getting to the contents of that boot disk?
1114740	1117600	So, the first thing I tried is the obvious thing.
1117600	1134280	Again, create a marketplace instance, stop it, detach the boot disk, create a new Linux instance, and attach that disk as a secondary volume, right, on that new instance whose boot I control and where it can SSH as root.
1134320	1135860	And it fails.
1135860	1155000	It seems, again, that the volumes and the snapshots that came somewhere from the marketplace have a mark of the marketplace and the boot volumes from instances or AMIs that came from the marketplace can only ever be used as boot volumes.
1155000	1160000	They are not allowed to be accessed as secondary volumes.
1160280	1164000	So, no, no luck there.
1164260	1165960	So, let's try something else.
1165960	1168880	I'm going to create a snapshot from that volume.
1168880	1183360	I'm going to create a completely new volume from that snapshot and then try to attach it as a secondary volume on EBS volume on a new instance and no, again, it's not working.
1183360	1191020	AWS saw that coming and that mark of the marketplace persists even though I went through a snapshot, right?
1191020	1193000	So, no dice.
1193680	1197520	So, maybe the associations through the AMI.
1197700	1200400	So, I stop the marketplace instance.
1200400	1202440	I create a completely new AMI.
1202440	1206060	That's not the AMI that those volumes came originally from.
1206060	1208680	Create a new instance from that AMI.
1208680	1209920	It still works.
1209920	1211740	And then stop it.
1211740	1215340	Detach the boot volume and try to add it as a secondary disk.
1215560	1217260	No, no, no, no, no, no.
1217440	1224300	AWS's team did a great job there and also covered that avenue.
1224420	1226500	That also does not work.
1228420	1246560	Looked at a mailing list and found some people from the Packer tool, which is used to create AMIs and container images, et cetera, saying they found this, they bumped into this problem and they suggested a workaround where you create an AMI from the marketplace instance,
1246560	1252260	and then you make that new AMI public, or at least share it with a different unrelated account.
1252260	1254960	And then you create an instance on that account.
1254960	1260820	And apparently crossing that AWS account barrier made the mark of the marketplace go away.
1261040	1262980	And it's not working anymore.
1262980	1265080	This was from a couple of years ago.
1265080	1270200	Someone in AWS clearly saw that post and closed that loophole as well.
1271820	1281140	So I tried everything I could think of, and maybe some of you listening to this talk are smarter than me and can think of different things and ways to bypass this.
1281140	1283440	Actually, a great topic for research.
1283440	1284880	I tried two other things.
1284880	1291000	I tried copying a snapshot to S3 and try to get access to direct raw content that way.
1291000	1292660	Also didn't work.
1292660	1302680	And AWS also launched recently something called direct access APIs, where you can get, again, low-level access to the bytes inside of an EBS volume.
1302680	1311220	And this is meant to be used by traditional backup solutions to be able to directly access the content of EBS volumes.
1311260	1313340	And that didn't work either.
1313340	1326600	AWS did a great job of closing every possible avenue I can think of to try to have raw access to the content of that marketplace instance boot disk.
1326820	1328340	So I don't know.
1328340	1330480	Great job, AWS, I guess.
1331120	1333800	And you had to think, by the way, about this.
1333800	1344640	If you are counting on having access to all your instances for direct access to do backups, including virtual appliances you bought from the marketplace, that's not going to work.
1344740	1351540	You will need to make sure as a defender or as an infrastructure manager on the cloud that you realize this is a limitation.
1352080	1365180	And you will have to rely on vendor-specific backup strategies, like whatever backup functionality the maker of that virtual appliance provides.
1365320	1371800	And you will not be able to use AWS backup or direct access to do backups of that.
1371800	1391500	So keep that in mind on your backup strategy to make sure you can still recover those virtual machine instances, those marketplace-originated instances in your environment in the case of failures or ransomware or whatever.
1393180	1404580	And just to make sure we don't give AWS a free pass and a complete win on this, there was one problem I found not related to accessing the boot volume, which is the main goal.
1404580	1413800	But it seems like AWS is very fast and loose with who can publish stuff on the marketplace.
1413860	1420580	So, for example, you're not necessarily obligated to charge for products on the marketplace.
1420580	1427400	You can create a bring-your-own license or even a free product, for example, for open-source stuff on the marketplaces.
1427520	1439100	And they do no KYC, no know-your-customer at all, if you are trying to publish free products or even if you're publishing paid products outside of EMEA.
1439100	1446340	Their documentation is pretty clear, actually, that they only require know-your-customer because they're forced to by European legislations.
1446680	1453920	I haven't tried, by the way, publishing a paid product, but I did try publishing a free product.
1453920	1460040	So, when you create your seller profile, you can choose whatever logo and company URL you choose.
1460040	1464560	I chose things that were completely unrelated to my company.
1464560	1484840	So, I could very well try to create a seller account for trying to mimic a large organization, do a lookalike domain, grab someone's logo, and try to pretend to be a large technology vendor and try to list products there and ensnare unsuspecting victims.
1484840	1492300	The same way people do with software packages on npm or pypi and typosquatting on domains.
1492300	1494880	Seems like this is fully automated.
1494880	1499900	As soon as I added a logo in a URL, it was immediately available on the marketplace.
1499900	1503360	So, there seems to be no human review whatsoever of this.
1503480	1510920	So, I think it's an interesting place here for AWS to address and improve their security.
1511220	1520980	The other thing that I found interesting is AWS purports to do regular scanning of images to check for vulnerabilities and even provides a functionality for sellers to check their images.
1520980	1525220	I haven't tested it, but it seems like an interesting feature.
1525220	1531580	And they have standards, such as no known vulnerabilities, no hard-coded passwords, no remote access by seller.
1531880	1539940	But it's not clear how regularly they scan images, only at upload, or how that works.
1540720	1549100	But at the very least, they should be checking that any URLs you publish, you are the owner of that domain.
1549100	1551180	They should prove that they own that domain.
1551180	1560060	They might want to do a human review to make sure that the logos being published are based on trademarks that actually belong to that seller.
1560060	1567320	They're not trying to purport to be, I don't know, Cisco or Palo Alto or Checkpoint or a well-known company to try to fool people, right?
1567320	1579020	So, I think this is a bit dangerous because people will trust that if this is on the AWS marketplace that it went through some vetting, where all the indications I found is that it does not.
1579020	1592760	As soon as you hit publish, it immediately goes out to the listing on the marketplace, unless you're trying to sell a paid product, and you say you want to target EMEA customers, right?
1592760	1600780	So, that's the only scenario where some know your customer will be done and documentation will be requested, as per the documentation and my testing.
1602320	1609760	If you go to the Azure marketplace, it's actually a breath of fresh air as far as the user experience.
1609820	1620760	And that's very on-brand for Azure, actually, in my experience, where they have very well-documented APIs for buyers to interact with their marketplace.
1620760	1621200	Who knew?
1621200	1623360	Who knew that was possible, right?
1623360	1626180	And they have very good documentation about this.
1626180	1638960	So, by the way, learning all those things about AWS meant trying them out and reading the seller documentation, I could find very little documentation on the buyer side that explained the internals of how things work.
1638960	1643700	Not so much for Azure, especially because their API is very well-documented.
1643700	1653880	So, if you look at how Azure marketplace products work, they have essentially four attributes.
1653880	1665780	So, the publisher, which is like the seller, the name of the organization, the offer is kind of the product, the SKU would be like a major release version of the product or presentation of the product, and then the version.
1665820	1676940	And if you combine the four things separated by colons, it's like a unique identifier of a particular virtual machine that you can download and install on your environment.
1676940	1690660	But you can also replace the version number with latest, like you can do with containers, typically, and get the latest possible version, as long as you know the publisher, offer, and SKU, right?
1690660	1695100	And you can click here to see the documentation that Azure publishes on that.
1696120	1714040	So, one of the things we found is that differently from AWS, you can detach the boot disk from a marketplace image and attach it as a secondary disk on another virtual machine you created and rummage around.
1715300	1717780	Gleason was able to find a way to do this.
1717780	1734860	So, the way you start is you find the URL for a particular marketplace product, and on that URL, you're going to realize that the publisher and the offer are already contained on the URL, right after slash apps.
1735040	1736900	So, in this case, Tidal Media Inc.
1736900	1743420	is the publisher, and Tinyproxy, Easy, Ubuntu, I just picked the first product that appeared on my listing, right?
1743420	1745360	I don't even know what this is.
1745520	1747020	This is the offer, right?
1747020	1761920	If you know the publisher and the offer, you can use this Azure CLI command on the Azure shell, the cloud shell, to figure out the SKU name, or the SKU names, if they have multiple ones.
1761920	1763540	This case just has one.
1764000	1770160	And then you can obtain the URN of all of the images, right?
1770160	1784700	You can, basically, if you already have these three, you have the publisher, offer, and SKU, you could just append colon latest and get the latest version, or you can list what versions exist, and you can choose which one you're going to explore, right?
1784700	1786240	So, this is very convenient.
1786240	1793040	Keep old versions around, apparently, so you can try and find vulnerabilities in multiple versions of a product.
1793040	1794880	How cool is that, right?
1795660	1806060	So, the next thing you would do, if you were following their web wizard, would be to accept the license terms, before you run a VM based on that product.
1806200	1809660	This seems to be optional, as far as Gleason was concerned.
1809660	1817300	Even if he skipped this step, he was still able to create virtual machines, based on the marketplace product.
1817300	1828900	So, again, I'm not a lawyer, but it seems like if you never accepted the license terms of the product, maybe some restrictions or reverse engineering don't apply.
1828900	1830680	Again, consult a lawyer.
1830680	1836160	I am not a lawyer, but this certainly doesn't look good, as far as Azure.
1836200	1846280	But again, you know, giving company A access to company B's data seems to be very on-brand for Azure recently, given how many cross-tenant vulnerabilities have been found.
1846340	1848860	So, again, very on-brand for Azure, right?
1848860	1856580	Allowing people to use the intellectual property of a seller on their marketplace without accepting their license terms?
1856580	1857500	I don't know.
1857500	1865860	In any case, after you do that, what you can do is create a disk based on that image, right?
1865860	1890240	So, instead of creating a VM based on the marketplace entry, you can just create a disk and providing, as the image reference, that full unique identifier with publisher, offer, SKU, and version, and then just create a new VM with your preferred operating system and attach that recently created disk as a secondary disk on that VM.
1890240	1903340	And then, boom, you can boot your VM, you can mount that disk, and you can play around with the raw contents and, you know, find all sorts of interesting things inside the products you want to do vulnerability research for.
1903340	1904780	How cool is that?
1906140	1911160	On Google Cloud, we were also able to do the same thing, right?
1911160	1919640	Again, Marcello found this procedure here that allows you to get any product there that's a virtual machine based and do the same thing.
1919640	1936900	You go to the cloud console, the Google Cloud console, go to the marketplace section, you pick up a vendor, which use whatever filters you want, deploy the application, so follow the regular steps to create a virtual machine, a compute instance, from that product,
1936900	1954880	then stop it, create a snapshot from that instance that you just stopped, create a new disk from that snapshot, and then create a new instance and attach that disk as a secondary disk to that VM, and then just log into your newly created VM, mount that disk,
1954880	1958400	and explore it away to your heart's content, right?
1958700	1967320	He gives a little bit more feedback on, you know, using fdisk to figure out which partitions there are and mount them independently, things like that, right?
1968100	1971480	So you can play around with it.
1971480	1986420	You can also just do like a DD, get the raw contents of that disk and download it, like save it to, you know, S3 or cloud storage or blob storage, and then download it to your machine so you don't even have to continue the analysis by running it on the cloud,
1986420	1989820	maybe run a local VM, or do something else, right?
1989820	1999560	At that point, if you have raw access to the bytes contained in that boot volume, you know, you can do whatever you want and, you know, play around with it.
2001040	2014880	So this hopefully provides some context into how marketplaces can be a big boom to both white and black hat hackers.
2015580	2024380	I think of the three marketplaces we analyzed, AWS seems to offer the best protection for sellers, intellectual property.
2024700	2032720	And actually, it's even safer than selling hardware is my current conclusion based on what I've seen on the AWS marketplace.
2032720	2041980	If you are a product vendor, you're less likely to have your binaries reversed engineered by selling it through AWS marketplace than through hardware.
2041980	2046220	Because if someone does get a hold of your hardware, they basically can do whatever they want.
2046220	2054960	Whereas if you're running on AWS, AWS is enforcing a ton of stuff that would have no parallel in the physical world.
2054960	2058080	So that's pretty interesting.
2058120	2069160	And as an owner, like an IT manager or blue team person, beware of the restrictions that that imposes on what you can do with your instances, right?
2069160	2083160	Again, backing them up seems to be the biggest sticking point where you have to use vendor-specific strategies to back them up, because most of the standard things could have limitations, right?
2084060	2087660	Azure and GCP marketplaces, though, are fair game, right?
2087660	2089880	And they're the second and third largest marketplaces.
2089880	2096060	AWS is the largest, same as with their market share, as we've seen on the beginning slide.
2096200	2107000	But you can use Azure and GCP marketplaces to do a lot of research and find vulnerabilities and get some money on bug bounties, right?
2107040	2109460	So a few things to keep in mind.
2109460	2113680	There are low or no cost options, so either bring your own license or pay as you go.
2113680	2122880	And you only need to run the actual instance from the marketplace for a short amount of time before you take an image and do other things, and you can play around with the content.
2122880	2125900	So you wouldn't need to run it for more than an hour, perhaps.
2127080	2134620	You don't have any sanctions or logistics-related difficulties that are involved in obtaining hardware.
2135100	2136940	Just virtualize it.
2136960	2138640	Very low barrier to entry.
2138640	2149260	If you're an attacker, if you're someone malicious, you can just create a cloud account with a fake or stolen credit card and start plugging away with things there.
2149260	2150940	Don't even have to pay for it.
2151300	2154540	And actually, this is very amenable to automation, right?
2154700	2174120	I'm sorry to release this out into the world, but DevSecResearchOps is now a thing, apparently, because you can automate creating instances, creating those images, rummaging through the content, or even trying out as a black box your exploits to figure out how many versions are affected by a particular thing,
2174120	2176880	just because the cloud is automatable, right?
2176880	2183400	So attackers of both colored hats can now enjoy this.
2183560	2187080	And I want to emphasize again, I am not a lawyer.
2187080	2193000	We never try to actually access any of the content of those boot disks to do our research.
2193000	2197100	We just confirm that we could see the partition table and that's it.
2197900	2204220	We don't know how legal or illegal this will be in different places in the world.
2205320	2211660	And so make sure whatever you're doing, you don't break any laws, you don't get arrested.
2212440	2214080	And, you know, please don't.
2214080	2215980	I don't want that on my conscience.
2215980	2229860	Having said that, this could be a very interesting strategy if you know what you're doing to getting some money on black bounties or to help move the security of those products forward by finding and reporting vulnerabilities.
2231860	2233160	And that's it.
2233160	2234860	That's the content of my talk.
2234860	2237880	I hope you guys found this enjoyable.
2238220	2241200	Let me know you have my contact information here.
2241200	2253020	If you liked it, if you have any feedback, if you were able to find ways around the AWS protections that I wasn't able to, I'd love to hear more about the subject because I think it's pretty interesting.
2253020	2272940	I think it's an underappreciated, this new level of cheap, easy automated access to things that were previously very hard to test security-wise could be one of the reasons why we're seeing so many new vulnerabilities in this kind of enterprise product recently.
2272940	2274480	Hope you enjoyed it.
2274480	2289280	My deepest thank you, heartfelt thanks to Jayesh and the entire Cloud Village team for putting this up together again, for keeping up with my and tolerating my nonsense.
2289340	2293320	I'm very lucky and privileged to be able to present here.
2293460	2294660	Hope you enjoyed this.
2294660	2295380	Bye-bye.
