Patrolaroid is an instant camera for capturing cloud workload risks. It’s a prod-friendly scanner that makes finding security issues in AWS instances and buckets less annoying and disruptive for software engineers and cloud admins.
Patrolaroid scans production infrastructure from a safe distance rather than within production, so you don’t have to install an agent, run code, or perform other invasive infosec rituals to use it.
Patrolaroid snapshots AWS instances and buckets to uncover malware, backdoors, cryptominers, toolkits, and other attacker tomfoolery that you probably don’t want in your prod. Software engineers, security engineers, and cloud administrators only need familiarity with YARA and the AWS Management Console to use it.
Patrolaroid does not require running an agent or code in prod, only needs read-only access to cloud assets, and generally avoids the myriad stability and performance sins of security tools.
Most commercial “cloud security” scanners that aim to detect malware in cloud workloads ironically operate pretty similarly to malware. Their mode of operation is:
- Just-in-time installation of an agent via SSH
- Running the agent from
/tmp
- Deleting themselves once the scan completes
This results in the security agent stealing compute cycles and I/O from the host it’s scanning, which is veritably unstonkly – as is the chance that prod is borked if the agent screws up.
Patrolaroid avoids these problems by scanning prod instances and buckets for security problems while staying safely out of prod. After the engineer or admin identifies the AWS account containing the resources they want to scan, Patrolaroid then:
- Runs from an AWS instance within the same account as the target instances or buckets
- Snapshots each instance
- Uses YARA rules to scan the instance’s filesystem for matches (and generates an alert if there is a match)
- Deletes the snapshot volume
In short, Patrolaroid provides "point-and-shoot" malware scanning of AWS assets without the malware-like tactics of existing “cloud security” tools.
All you need is an AWS account and the ability to create an AWS role and EC2 instance to get Patrolaroid up and running. Getting started involves creating a dedicated EC2 instance for Patrolaroid in the same AWS account and availability zones as the assets you want to scan.
☁️ Make sure to use the account and availability zone you want to scan to create the role ☁️
- Log into your AWS account and access the Identity and Access Management (IAM) service in the AWS Management Console, then choose Create Role (you can also use the AWS CLI if you prefer)
- Select AWS service for type of trusted entity
- Select EC2 as the allowed service and use case, then choose Next: Permissions
- Select the AmazonEC2FullAccess andAmazonS3FullAccess policies or paste our recommended policy (with tighter permissions) into the JSON editor, then choose Next: Tags
- No tags are needed, so select Next: Review
- Type Patrolaroid for the Role name
- Review the role and, if satisfied, choose Create role
☁️ Make sure you’re still logged into the account you want to scan before proceeding ☁️
- Open the AWS EC2 console, then choose Launch instance
- On the Step 1: Choose an Amazon Machine Image (AMI) page, select Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
- On the Step 2: Choose an Instance Type page, select the t2.micro type, then click Next: Configure Instance Details
- For IAM role, select the Patrolaroid role you created
- Click Review and Launch
- Connect to your new EC2 instance via SSH (or PuTTY if using Windows)
- Install
curl
by running the command:
sudo apt-get install curl
Ensure you are connected to your dedicated EC2 instance and then download Patrolaroid to it by running:
curl -L https://github.com/rpetrich/patrolaroid/releases/download/v0.3/patrolaroid.tar.gz | tar xz
Start scanning by running Patrolaroid via sudo
:
sudo ./patrolaroid
Enjoy your ☁️ 🔒 📷 🖤