SlideShare a Scribd company logo
Shopping for
Vulnerabilities
How Cloud Service Provider Marketplaces can Help
White and Black Hat Vulnerability Research
VULNS
sts:GetCallerIdentity
arn:aws:iam:sa-east-1:*:user/GlayssonTomaz
Cloud Security Researcher @ Tenchi Security
arn:aws:iam:sa-east-1:*:user/AlexandreSieira
Co-Founder and CTO @ Tenchi Security
> 25+ years in cybersecurity - old_man_yells_at_cloud.gif
> Co-founder & CTO @ Cipher (acquired by Prosegur)
> Co-founder & CTO @ Niddel (acquired by Verizon)
> Global Head of Detection & Response products @ Verizon
> AWS Certified Security - Specialty
> 12+ years of experience in Cybersecurity
> Security researcher in AppSec, IoT, Cloud
arn:aws:iam:sa-east-1:*:user/MarceloLima
Cloud Security Consultant @ Tenchi Security
> 25+ years of experience in Infrastructure and security
> Cloud Infrastructure Manager @ Claro
> GCP Professional Cloud Security Engineerl
asieira@tenchisecurity.com
@AlexandreSieira
gtomaz@tenchisecurity.com
https://github.com/s4dhulabs
mlima@tenchisecurity.com
Why should you care?
https://www.trellix.com/en-us/about/newsroom/stories/threat-labs/conti-leaks-examining-the-panama-
papers-of-ransomware.html
Black hats are looking for a way in:
● Access brokers want to exploit Internet-facing
products;
● Malware developers want to bypass your
detection and prevention security products;
● Perimeter security appliances are a double
whammy!
White hats want the fun and the profit:
● Evaluate product security;
● Profit from bug bounties;
● Create logos and name vulnerabilities.
Why should you care?
A few notable examples:
Data collected August 3rd, 2022
AWS Marketplace
Product codes (a.k.a. offer IDs) != product IDs.
Seem designed to ensure software isn't executed
on instances not created by AWS Marketplace
(https://docs.aws.amazon.com/marketplace/latest/userguide/best-practices-fo
r-building-your-amis.html#verifying-ami-runtime)
Shown to buyers in at least four places:
● the marketplace wizard;
● notification e-mail;
● instance identity document of EC2
instances;
● ec2:DescribeInstances.
Console calls undocumented APIs at
discovery.marketplace.us-east-1.amazonaws.com
and "offerId" is used to return the product code.
AWS Marketplace
Product code has potential uses for defenders (asset management) and attackers (recon).
If you visit https://aws.amazon.com/marketplace/pp/ref=bill_eml_2?sku=<product code> you can manually
discover the seller and product of a product code.
List all instances with a Marketplace product code:
aws ec2 describe-instances --filters Name=product-code.type,Values=marketplace
List all instances with a specified Marketplace product code:
aws ec2 describe-instances --filters Name=product-code,Values=<product code>
List all public AMIs associated with a specified Marketplace product code:
aws ec2 describe-images --filters Name=product-code,Values=<product code>
AWS Marketplace
Trying to run an instance with a Marketplace AMI without a subscription:
$ aws –region us-east-1 ec2 run-instances --image-id ami-0ceb5feceacf87c44 --subnet-id
subnet-<redacted>
An error occurred (OptInRequired) when calling the RunInstances operation: In order to
use this AWS Marketplace product you need to accept terms and subscribe. To do so please
visit https://aws.amazon.com/marketplace/pp?sku=
f2ew2wrz425a1jagnifd02u5t
After launching an instance through the Marketplace and subscribing:
$ aws ec2 describe-instances --instance-id i-<redacted> | jq
'.Reservations[].Instances[] | .ProductCodes'
[
{
"ProductCodeId": "
6njl1pau431dv1qxipg63mvah",
"ProductCodeType": "marketplace"
}
]
AWS Marketplace
Boot volume seems normal under "aws ec2 describe-volumes", no product
codes. Let's try to mount at as a secondary disk on a new analysis instance to
rummage through it:
1. Detach from Marketplace instance: ✅
2. Create new Linux instance and stop it: ✅
3. Attach volume as secondary disk on the analysis instance: 🛑
$ aws ec2 attach-volume --device xvdb --instance-id
i-<redacted> --volume-id vol-<redacted>
An error occurred (OperationNotPermitted) when calling the
AttachVolume operation: One or more of
[6njl1pau431dv1qxipg63mvah] are not allowed as secondary volume
xvdb
AWS Marketplace
Only visible association to the original AMI and the Marketplace is through
the snapshot it was created from. So let's try:
1. Create a new snapshot of the volume: ✅
2. Create a new volume from this snapshot: ✅
3. Attach newly created volume as secondary disk on the analysis
instance: 🛑
$ aws ec2 attach-volume --device xvdb --instance-id
i-<redacted> --volume-id vol-<redacted>
An error occurred (OperationNotPermitted) when calling the
AttachVolume operation: One or more of
[6njl1pau431dv1qxipg63mvah] are not allowed as secondary
volume xvdb
AWS Marketplace
Maybe the association is via the AMI? So let's try this:
1. Create an AMI from the Marketplace instance: ✅
2. Create a new instance from that AMI: ✅
3. Detach the boot volume from new instance: ✅
4. Attach volume as secondary disk on the new instance: 🛑
$ | => aws ec2 attach-volume --device xvdb --instance-id
i-02f09c8ee2628f46e --volume-id vol-09db9337b82217687
An error occurred (OperationNotPermitted) when calling the
AttachVolume operation: One or more of
[6njl1pau431dv1qxipg63mvah] are not allowed as secondary
volume xvdb
AWS Marketplace
Found an old mailing list post mentioning a workaround
(https://www.mail-archive.com/packer-tool@googlegroups.com/msg04649.
html):
1. Create an AMI from the Marketplace instance: ✅
2. Share it with another account: ✅
3. Create an instance at other account using the shared AMI: 🛑
ec2:DescribeImages still shows the product codes associated with the
new AMI, so AWS closed that loophole at some point.
Also tried copying a snapshot to S3 and using direct access APIs. All
blocked.
AWS Marketplace
No KYC, domain, URL or logo validation required
to become a seller eligible to publish free products.
KYC is required to sell paid products to EMEA,
apparently, though T&Cs allows them across the
board.
AWS purports to do regular scanning of images to
check for vulnerabilities, and provides on-demand
scanning to sellers.
Defines security standards for images, such as:
● no known vulnerabilities;
● no hardcoded passwords;
● no remote access by seller.
Azure Marketplace
Azure is kind enough to have documented APIs and CLI commands to interact with Marketplace images!
(https://docs.microsoft.com/en-us/cli/azure/vm/image?view=azure-cli-latest)
Azure Marketplace
You can attach a marketplace boot disk as a secondary disk in another VM!
1) First find the Publisher.Offer part of the URL:
https://azuremarketplace.microsoft.com/en-us/marketplace/apps/tidalmediainc.tinyproxy-easy-ub
untu?tab=Overview
2) Obtain the SKU name:
$ az vm image list-skus -l brazilsouth -p tidalmediainc -f tinyproxy-easy-ubuntu | jq
.[].name
"tinyproxy-easy-ubuntu"
3) Obtain the URN of the images:
$ az vm image list -p tidalmediainc -s tinyproxy-easy-ubuntu --all | jq .[].urn
"tidalmediainc:tinyproxy-easy-proxy-server-ubuntu:tinyproxy-easy-ubuntu-server:1.0.1"
"tidalmediainc:tinyproxy-easy-ubuntu:tinyproxy-easy-ubuntu:1.0.0"
Azure Marketplace
4) Accept the terms of the license (appears to be optional):
$ az vm image terms accept --urn
"tidalmediainc:tinyproxy-easy-proxy-server-ubuntu:tinyproxy-easy-ubuntu-server:1.0.1"
5) Create a disk based on that image:
$ az disk create -g <resource group> -n <disk name> -l brazilsouth --image-reference
tidalmediainc:tinyproxy-easy-ubuntu:tinyproxy-easy-ubuntu:1.0.1
6) Attach as a secondary disk on an analysis VM:
$ az vm disk attach -g <resource group> –vm-name <VM name>
-n <disk name> -l brazilsouth
7) Profit!
Google Cloud Marketplace
GCP provides an easy way to deploy any marketplace infrastructure with predefined deployments. You can
filter for the kind of software you want, select it and the GCP will do all the rest.
You can attach a marketplace boot disk as a secondary disk in another VM!
1) Open Google Cloud console and go to the Marketplace:
https://console.cloud.google.com/marketplace
2) Pick up a vendor product with Virtual Machines type. Use filters to choose on
3) Deploy the application and stop the virtual machine(s).
$ gcloud compute instances stop <marketplace-product-instance-name>
4) Create a snapshot from the instance you just stopped.
$ gcloud compute snapshots create <snapshot-name> --zone=<zone> 
--source-disk=<marketplace-instance-disk>
Google Cloud Marketplace
5) Create a disk from the snapshot
$ gcloud compute disks create <disk-name> --source=<snapshot-name> --zone=<zone>
6) Create a new instance and attach the new disk as a secondary disk to the VM.
$ gcloud compute instances create <new-instance-name> --machine-type=<machine-type> 
--disk=boot=no,device-name=<disk-name>,mode=rw,name=<disk-name> --zone=<zone>
7) From the GCP console SSH to the new VM
8) Run fdisk to see the disks and mount the disk (it should be /dev/sdbX where X is the physical partition)
$ sudo fdisk -l
$ sudo mount /dev/sdbX /<mounting-point>
Google Cloud Marketplace
9) If the disk is not mounted it is probably because it has an invalid partition type or it is a volume group.
In both cases run a logical volume scan in the physical partition and mount it. You should see
something similar as /dev/sdbX/<logical-volume>.
$ sudo lvscan -a
$ sudo mount /dev/sdbX/<logical-volume> /<mounting-point>
10) Start digging
Final Words
● AWS Marketplace seems to offer better protection for seller
intellectual property than selling hardware appliances, kudos!
○ Should have documented APIs, SDK and CLI support for
buyers;
○ Beware of instance restrictions (backup, etc).
● Azure and GCP Marketplaces offers big advantages to white
and black hat security researchers:
○ Low or no cost (BYOL or pay-as-you-go);
○ No pesky sanctions or logistics-related difficulties to
obtaining access to products;
○ Very low barrier to entry (account with fake/stolen
payment data);
○ Very amenable to automation! DevSecResearchOps
FTW
IANL disclaimer - don't do any
of this before you are sure of
the legal risks involved.
Thank you!
> Alex Sieira
asieira@tenchisecurity.com
@AlexandreSieira

More Related Content

Similar to Shopping for Vulnerabilities - How Cloud Service Provider Marketplaces can Help White and Black Hat Vulnerability Research

Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcached
Skills Matter
 
Azure from scratch part 4
Azure from scratch part 4Azure from scratch part 4
Azure from scratch part 4
Girish Kalamati
 
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
Amazon Web Services Korea
 
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
POSSCON
 
Automating Container Deployments on Virtualization with Ansible: OpenShift on...
Automating Container Deployments on Virtualization with Ansible: OpenShift on...Automating Container Deployments on Virtualization with Ansible: OpenShift on...
Automating Container Deployments on Virtualization with Ansible: OpenShift on...
Laurent Domb
 
CloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingCloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and Troubleshooting
ShapeBlue
 
Automated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRMAutomated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRM
openQRM Enterprise GmbH
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
Amazon Web Services
 
Introduction To Managing VMware With PowerShell
Introduction To Managing VMware With PowerShellIntroduction To Managing VMware With PowerShell
Introduction To Managing VMware With PowerShell
Hal Rottenberg
 
Rapid scaling in_the_cloud_with_puppet
Rapid scaling in_the_cloud_with_puppetRapid scaling in_the_cloud_with_puppet
Rapid scaling in_the_cloud_with_puppet
Carl Caum
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
Isaac Christoffersen
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and Drupal
Promet Source
 
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
Simon Su
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
Jos Boumans
 
Hands-on Lab: Comparing Redis with Relational
Hands-on Lab: Comparing Redis with RelationalHands-on Lab: Comparing Redis with Relational
Hands-on Lab: Comparing Redis with Relational
Amazon Web Services
 
Ansible Automation Inside Cloudforms ( Embedded Ansible)
Ansible Automation Inside Cloudforms ( Embedded Ansible)Ansible Automation Inside Cloudforms ( Embedded Ansible)
Ansible Automation Inside Cloudforms ( Embedded Ansible)
Prasad Mukhedkar
 
Hands-on Lab: Amazon ElastiCache
Hands-on Lab: Amazon ElastiCacheHands-on Lab: Amazon ElastiCache
Hands-on Lab: Amazon ElastiCache
Amazon Web Services
 
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:InventHow Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
Henning Jacobs
 
Lab Manual Managed Database Basics
Lab Manual Managed Database BasicsLab Manual Managed Database Basics
Lab Manual Managed Database Basics
Amazon Web Services
 

Similar to Shopping for Vulnerabilities - How Cloud Service Provider Marketplaces can Help White and Black Hat Vulnerability Research (20)

Itb session v_memcached
Itb session v_memcachedItb session v_memcached
Itb session v_memcached
 
Azure from scratch part 4
Azure from scratch part 4Azure from scratch part 4
Azure from scratch part 4
 
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
대용량 데이타 쉽고 빠르게 분석하기 :: 김일호 솔루션즈 아키텍트 :: Gaming on AWS 2016
 
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
Assembling an Open Source Toolchain to Manage Public, Private and Hybrid Clou...
 
Automating Container Deployments on Virtualization with Ansible: OpenShift on...
Automating Container Deployments on Virtualization with Ansible: OpenShift on...Automating Container Deployments on Virtualization with Ansible: OpenShift on...
Automating Container Deployments on Virtualization with Ansible: OpenShift on...
 
CloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and TroubleshootingCloudStack - Top 5 Technical Issues and Troubleshooting
CloudStack - Top 5 Technical Issues and Troubleshooting
 
Automated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRMAutomated Amazon EC2 Cloud deployments with openQRM
Automated Amazon EC2 Cloud deployments with openQRM
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)
 
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
(ARC402) Deployment Automation: From Developers' Keyboards to End Users' Scre...
 
Introduction To Managing VMware With PowerShell
Introduction To Managing VMware With PowerShellIntroduction To Managing VMware With PowerShell
Introduction To Managing VMware With PowerShell
 
Rapid scaling in_the_cloud_with_puppet
Rapid scaling in_the_cloud_with_puppetRapid scaling in_the_cloud_with_puppet
Rapid scaling in_the_cloud_with_puppet
 
OpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid CloudOpenSource ToolChain for the Hybrid Cloud
OpenSource ToolChain for the Hybrid Cloud
 
AutoScaling and Drupal
AutoScaling and DrupalAutoScaling and Drupal
AutoScaling and Drupal
 
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic TrainingGCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
GCP - GCE, Cloud SQL, Cloud Storage, BigQuery Basic Training
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
Hands-on Lab: Comparing Redis with Relational
Hands-on Lab: Comparing Redis with RelationalHands-on Lab: Comparing Redis with Relational
Hands-on Lab: Comparing Redis with Relational
 
Ansible Automation Inside Cloudforms ( Embedded Ansible)
Ansible Automation Inside Cloudforms ( Embedded Ansible)Ansible Automation Inside Cloudforms ( Embedded Ansible)
Ansible Automation Inside Cloudforms ( Embedded Ansible)
 
Hands-on Lab: Amazon ElastiCache
Hands-on Lab: Amazon ElastiCacheHands-on Lab: Amazon ElastiCache
Hands-on Lab: Amazon ElastiCache
 
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:InventHow Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
How Zalando runs Kubernetes clusters at scale on AWS - AWS re:Invent
 
Lab Manual Managed Database Basics
Lab Manual Managed Database BasicsLab Manual Managed Database Basics
Lab Manual Managed Database Basics
 

More from Alexandre Sieira

SaaSpocalypse - The Complexity and Power of AWS Cross Account Access
SaaSpocalypse - The Complexity and Power of AWS Cross Account AccessSaaSpocalypse - The Complexity and Power of AWS Cross Account Access
SaaSpocalypse - The Complexity and Power of AWS Cross Account Access
Alexandre Sieira
 
Introdução à Segurança de Containers
Introdução à Segurança de ContainersIntrodução à Segurança de Containers
Introdução à Segurança de Containers
Alexandre Sieira
 
Uma Introdução a Threat Intelligence e Threat Hunting para Empresas Sem Orçam...
Uma Introdução a Threat Intelligence e Threat Hunting para Empresas Sem Orçam...Uma Introdução a Threat Intelligence e Threat Hunting para Empresas Sem Orçam...
Uma Introdução a Threat Intelligence e Threat Hunting para Empresas Sem Orçam...
Alexandre Sieira
 
Sharing is Caring: Medindo a Eficácia de Comunidades de Compartilhamento de T...
Sharing is Caring: Medindo a Eficácia de Comunidades de Compartilhamento de T...Sharing is Caring: Medindo a Eficácia de Comunidades de Compartilhamento de T...
Sharing is Caring: Medindo a Eficácia de Comunidades de Compartilhamento de T...
Alexandre Sieira
 
Reverse Engineering the Wetware: Understanding Human Behavior to Improve Info...
Reverse Engineering the Wetware: Understanding Human Behavior to Improve Info...Reverse Engineering the Wetware: Understanding Human Behavior to Improve Info...
Reverse Engineering the Wetware: Understanding Human Behavior to Improve Info...
Alexandre Sieira
 
Threat Intelligence Baseada em Dados: Métricas de Disseminação e Compartilham...
Threat Intelligence Baseada em Dados: Métricas de Disseminação e Compartilham...Threat Intelligence Baseada em Dados: Métricas de Disseminação e Compartilham...
Threat Intelligence Baseada em Dados: Métricas de Disseminação e Compartilham...
Alexandre Sieira
 
BYOD: Bring Your Own... Disaster?
BYOD: Bring Your Own... Disaster?BYOD: Bring Your Own... Disaster?
BYOD: Bring Your Own... Disaster?
Alexandre Sieira
 

More from Alexandre Sieira (7)

SaaSpocalypse - The Complexity and Power of AWS Cross Account Access
SaaSpocalypse - The Complexity and Power of AWS Cross Account AccessSaaSpocalypse - The Complexity and Power of AWS Cross Account Access
SaaSpocalypse - The Complexity and Power of AWS Cross Account Access
 
Introdução à Segurança de Containers
Introdução à Segurança de ContainersIntrodução à Segurança de Containers
Introdução à Segurança de Containers
 
Uma Introdução a Threat Intelligence e Threat Hunting para Empresas Sem Orçam...
Uma Introdução a Threat Intelligence e Threat Hunting para Empresas Sem Orçam...Uma Introdução a Threat Intelligence e Threat Hunting para Empresas Sem Orçam...
Uma Introdução a Threat Intelligence e Threat Hunting para Empresas Sem Orçam...
 
Sharing is Caring: Medindo a Eficácia de Comunidades de Compartilhamento de T...
Sharing is Caring: Medindo a Eficácia de Comunidades de Compartilhamento de T...Sharing is Caring: Medindo a Eficácia de Comunidades de Compartilhamento de T...
Sharing is Caring: Medindo a Eficácia de Comunidades de Compartilhamento de T...
 
Reverse Engineering the Wetware: Understanding Human Behavior to Improve Info...
Reverse Engineering the Wetware: Understanding Human Behavior to Improve Info...Reverse Engineering the Wetware: Understanding Human Behavior to Improve Info...
Reverse Engineering the Wetware: Understanding Human Behavior to Improve Info...
 
Threat Intelligence Baseada em Dados: Métricas de Disseminação e Compartilham...
Threat Intelligence Baseada em Dados: Métricas de Disseminação e Compartilham...Threat Intelligence Baseada em Dados: Métricas de Disseminação e Compartilham...
Threat Intelligence Baseada em Dados: Métricas de Disseminação e Compartilham...
 
BYOD: Bring Your Own... Disaster?
BYOD: Bring Your Own... Disaster?BYOD: Bring Your Own... Disaster?
BYOD: Bring Your Own... Disaster?
 

Recently uploaded

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 

Recently uploaded (20)

Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 

Shopping for Vulnerabilities - How Cloud Service Provider Marketplaces can Help White and Black Hat Vulnerability Research

  • 1. Shopping for Vulnerabilities How Cloud Service Provider Marketplaces can Help White and Black Hat Vulnerability Research VULNS
  • 2. sts:GetCallerIdentity arn:aws:iam:sa-east-1:*:user/GlayssonTomaz Cloud Security Researcher @ Tenchi Security arn:aws:iam:sa-east-1:*:user/AlexandreSieira Co-Founder and CTO @ Tenchi Security > 25+ years in cybersecurity - old_man_yells_at_cloud.gif > Co-founder & CTO @ Cipher (acquired by Prosegur) > Co-founder & CTO @ Niddel (acquired by Verizon) > Global Head of Detection & Response products @ Verizon > AWS Certified Security - Specialty > 12+ years of experience in Cybersecurity > Security researcher in AppSec, IoT, Cloud arn:aws:iam:sa-east-1:*:user/MarceloLima Cloud Security Consultant @ Tenchi Security > 25+ years of experience in Infrastructure and security > Cloud Infrastructure Manager @ Claro > GCP Professional Cloud Security Engineerl asieira@tenchisecurity.com @AlexandreSieira gtomaz@tenchisecurity.com https://github.com/s4dhulabs mlima@tenchisecurity.com
  • 3. Why should you care? https://www.trellix.com/en-us/about/newsroom/stories/threat-labs/conti-leaks-examining-the-panama- papers-of-ransomware.html Black hats are looking for a way in: ● Access brokers want to exploit Internet-facing products; ● Malware developers want to bypass your detection and prevention security products; ● Perimeter security appliances are a double whammy! White hats want the fun and the profit: ● Evaluate product security; ● Profit from bug bounties; ● Create logos and name vulnerabilities.
  • 4. Why should you care? A few notable examples: Data collected August 3rd, 2022
  • 5. AWS Marketplace Product codes (a.k.a. offer IDs) != product IDs. Seem designed to ensure software isn't executed on instances not created by AWS Marketplace (https://docs.aws.amazon.com/marketplace/latest/userguide/best-practices-fo r-building-your-amis.html#verifying-ami-runtime) Shown to buyers in at least four places: ● the marketplace wizard; ● notification e-mail; ● instance identity document of EC2 instances; ● ec2:DescribeInstances. Console calls undocumented APIs at discovery.marketplace.us-east-1.amazonaws.com and "offerId" is used to return the product code.
  • 6. AWS Marketplace Product code has potential uses for defenders (asset management) and attackers (recon). If you visit https://aws.amazon.com/marketplace/pp/ref=bill_eml_2?sku=<product code> you can manually discover the seller and product of a product code. List all instances with a Marketplace product code: aws ec2 describe-instances --filters Name=product-code.type,Values=marketplace List all instances with a specified Marketplace product code: aws ec2 describe-instances --filters Name=product-code,Values=<product code> List all public AMIs associated with a specified Marketplace product code: aws ec2 describe-images --filters Name=product-code,Values=<product code>
  • 7. AWS Marketplace Trying to run an instance with a Marketplace AMI without a subscription: $ aws –region us-east-1 ec2 run-instances --image-id ami-0ceb5feceacf87c44 --subnet-id subnet-<redacted> An error occurred (OptInRequired) when calling the RunInstances operation: In order to use this AWS Marketplace product you need to accept terms and subscribe. To do so please visit https://aws.amazon.com/marketplace/pp?sku= f2ew2wrz425a1jagnifd02u5t After launching an instance through the Marketplace and subscribing: $ aws ec2 describe-instances --instance-id i-<redacted> | jq '.Reservations[].Instances[] | .ProductCodes' [ { "ProductCodeId": " 6njl1pau431dv1qxipg63mvah", "ProductCodeType": "marketplace" } ]
  • 8. AWS Marketplace Boot volume seems normal under "aws ec2 describe-volumes", no product codes. Let's try to mount at as a secondary disk on a new analysis instance to rummage through it: 1. Detach from Marketplace instance: ✅ 2. Create new Linux instance and stop it: ✅ 3. Attach volume as secondary disk on the analysis instance: 🛑 $ aws ec2 attach-volume --device xvdb --instance-id i-<redacted> --volume-id vol-<redacted> An error occurred (OperationNotPermitted) when calling the AttachVolume operation: One or more of [6njl1pau431dv1qxipg63mvah] are not allowed as secondary volume xvdb
  • 9. AWS Marketplace Only visible association to the original AMI and the Marketplace is through the snapshot it was created from. So let's try: 1. Create a new snapshot of the volume: ✅ 2. Create a new volume from this snapshot: ✅ 3. Attach newly created volume as secondary disk on the analysis instance: 🛑 $ aws ec2 attach-volume --device xvdb --instance-id i-<redacted> --volume-id vol-<redacted> An error occurred (OperationNotPermitted) when calling the AttachVolume operation: One or more of [6njl1pau431dv1qxipg63mvah] are not allowed as secondary volume xvdb
  • 10. AWS Marketplace Maybe the association is via the AMI? So let's try this: 1. Create an AMI from the Marketplace instance: ✅ 2. Create a new instance from that AMI: ✅ 3. Detach the boot volume from new instance: ✅ 4. Attach volume as secondary disk on the new instance: 🛑 $ | => aws ec2 attach-volume --device xvdb --instance-id i-02f09c8ee2628f46e --volume-id vol-09db9337b82217687 An error occurred (OperationNotPermitted) when calling the AttachVolume operation: One or more of [6njl1pau431dv1qxipg63mvah] are not allowed as secondary volume xvdb
  • 11. AWS Marketplace Found an old mailing list post mentioning a workaround (https://www.mail-archive.com/packer-tool@googlegroups.com/msg04649. html): 1. Create an AMI from the Marketplace instance: ✅ 2. Share it with another account: ✅ 3. Create an instance at other account using the shared AMI: 🛑 ec2:DescribeImages still shows the product codes associated with the new AMI, so AWS closed that loophole at some point. Also tried copying a snapshot to S3 and using direct access APIs. All blocked.
  • 12. AWS Marketplace No KYC, domain, URL or logo validation required to become a seller eligible to publish free products. KYC is required to sell paid products to EMEA, apparently, though T&Cs allows them across the board. AWS purports to do regular scanning of images to check for vulnerabilities, and provides on-demand scanning to sellers. Defines security standards for images, such as: ● no known vulnerabilities; ● no hardcoded passwords; ● no remote access by seller.
  • 13. Azure Marketplace Azure is kind enough to have documented APIs and CLI commands to interact with Marketplace images! (https://docs.microsoft.com/en-us/cli/azure/vm/image?view=azure-cli-latest)
  • 14. Azure Marketplace You can attach a marketplace boot disk as a secondary disk in another VM! 1) First find the Publisher.Offer part of the URL: https://azuremarketplace.microsoft.com/en-us/marketplace/apps/tidalmediainc.tinyproxy-easy-ub untu?tab=Overview 2) Obtain the SKU name: $ az vm image list-skus -l brazilsouth -p tidalmediainc -f tinyproxy-easy-ubuntu | jq .[].name "tinyproxy-easy-ubuntu" 3) Obtain the URN of the images: $ az vm image list -p tidalmediainc -s tinyproxy-easy-ubuntu --all | jq .[].urn "tidalmediainc:tinyproxy-easy-proxy-server-ubuntu:tinyproxy-easy-ubuntu-server:1.0.1" "tidalmediainc:tinyproxy-easy-ubuntu:tinyproxy-easy-ubuntu:1.0.0"
  • 15. Azure Marketplace 4) Accept the terms of the license (appears to be optional): $ az vm image terms accept --urn "tidalmediainc:tinyproxy-easy-proxy-server-ubuntu:tinyproxy-easy-ubuntu-server:1.0.1" 5) Create a disk based on that image: $ az disk create -g <resource group> -n <disk name> -l brazilsouth --image-reference tidalmediainc:tinyproxy-easy-ubuntu:tinyproxy-easy-ubuntu:1.0.1 6) Attach as a secondary disk on an analysis VM: $ az vm disk attach -g <resource group> –vm-name <VM name> -n <disk name> -l brazilsouth 7) Profit!
  • 16. Google Cloud Marketplace GCP provides an easy way to deploy any marketplace infrastructure with predefined deployments. You can filter for the kind of software you want, select it and the GCP will do all the rest. You can attach a marketplace boot disk as a secondary disk in another VM! 1) Open Google Cloud console and go to the Marketplace: https://console.cloud.google.com/marketplace 2) Pick up a vendor product with Virtual Machines type. Use filters to choose on 3) Deploy the application and stop the virtual machine(s). $ gcloud compute instances stop <marketplace-product-instance-name> 4) Create a snapshot from the instance you just stopped. $ gcloud compute snapshots create <snapshot-name> --zone=<zone> --source-disk=<marketplace-instance-disk>
  • 17. Google Cloud Marketplace 5) Create a disk from the snapshot $ gcloud compute disks create <disk-name> --source=<snapshot-name> --zone=<zone> 6) Create a new instance and attach the new disk as a secondary disk to the VM. $ gcloud compute instances create <new-instance-name> --machine-type=<machine-type> --disk=boot=no,device-name=<disk-name>,mode=rw,name=<disk-name> --zone=<zone> 7) From the GCP console SSH to the new VM 8) Run fdisk to see the disks and mount the disk (it should be /dev/sdbX where X is the physical partition) $ sudo fdisk -l $ sudo mount /dev/sdbX /<mounting-point>
  • 18. Google Cloud Marketplace 9) If the disk is not mounted it is probably because it has an invalid partition type or it is a volume group. In both cases run a logical volume scan in the physical partition and mount it. You should see something similar as /dev/sdbX/<logical-volume>. $ sudo lvscan -a $ sudo mount /dev/sdbX/<logical-volume> /<mounting-point> 10) Start digging
  • 19. Final Words ● AWS Marketplace seems to offer better protection for seller intellectual property than selling hardware appliances, kudos! ○ Should have documented APIs, SDK and CLI support for buyers; ○ Beware of instance restrictions (backup, etc). ● Azure and GCP Marketplaces offers big advantages to white and black hat security researchers: ○ Low or no cost (BYOL or pay-as-you-go); ○ No pesky sanctions or logistics-related difficulties to obtaining access to products; ○ Very low barrier to entry (account with fake/stolen payment data); ○ Very amenable to automation! DevSecResearchOps FTW IANL disclaimer - don't do any of this before you are sure of the legal risks involved.
  • 20. Thank you! > Alex Sieira asieira@tenchisecurity.com @AlexandreSieira