• Stars
    star
    199
  • Rank 196,105 (Top 4 %)
  • Language YARA
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A production-friendly malware scanner for your AWS cloud

Patrolaroid


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.

Overview

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.

Why?

The tired way

Most commercial “cloud security” scanners that aim to detect malware in cloud workloads ironically operate pretty similarly to malware. Their mode of operation is:

  1. Just-in-time installation of an agent via SSH
  2. Running the agent from /tmp
  3. 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.

The inspired way

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:

  1. Runs from an AWS instance within the same account as the target instances or buckets
  2. Snapshots each instance
  3. Uses YARA rules to scan the instance’s filesystem for matches (and generates an alert if there is a match)
  4. 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.

Getting Started with Patrolaroid

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.

Step 1: Create an AWS role

☁️ Make sure to use the account and availability zone you want to scan to create the role ☁️

  1. 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)
  2. Select AWS service for type of trusted entity
  3. Select EC2 as the allowed service and use case, then choose Next: Permissions
  4. Select the AmazonEC2FullAccess andAmazonS3FullAccess policies or paste our recommended policy (with tighter permissions) into the JSON editor, then choose Next: Tags
  5. No tags are needed, so select Next: Review
  6. Type Patrolaroid for the Role name
  7. Review the role and, if satisfied, choose Create role

Step 2: Create an EC2 instance

☁️ Make sure you’re still logged into the account you want to scan before proceeding ☁️

  1. Open the AWS EC2 console, then choose Launch instance
  2. On the Step 1: Choose an Amazon Machine Image (AMI) page, select Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
  3. On the Step 2: Choose an Instance Type page, select the t2.micro type, then click Next: Configure Instance Details
  4. For IAM role, select the Patrolaroid role you created
  5. Click Review and Launch

Step 3: Install dependencies

  1. Connect to your new EC2 instance via SSH (or PuTTY if using Windows)
  2. Install curl by running the command:
sudo apt-get install curl

Step 4: Install Patrolaroid

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

Step 5: Run Patrolaroid

Start scanning by running Patrolaroid via sudo:

sudo ./patrolaroid

Enjoy your ☁️ 🔒 📷 🖤

More Repositories

1

CaptainHook

Common hooking/monkey patching headers for Objective-C on Mac OS X and iPhone OS. MIT licensed
Objective-C
660
star
2

deviceconsole

An iOS system log tailer that doesn't suck
C
291
star
3

ldid

Minimal for of saurik's ldid and prebuilt binary
C++
287
star
4

AppList

Dynamic access to installed application list, their icons and simple preferences panes
Objective-C
262
star
5

babel-plugin-transform-async-to-promises

Transform async/await to somewhat idiomatic JavaScript promise chains
TypeScript
237
star
6

RocketBootstrap

API to securely expose global services on jailbroken iOS
C
230
star
7

libactivator

Centralized gestures and button management for iOS
Objective-C
180
star
8

deciduous

App that simplifies building decision trees to model adverse scenarios
HTML
173
star
9

ProSwitcher

Palm Pre-style application switcher for iPhone OS. Abandoned.
C
98
star
10

swift-to-js

Swift to JavaScript compiler using swiftc's AST printing facility
TypeScript
67
star
11

objc_api_visibility

Private API checker for iOS. Requires class-dump-z to be in the PATH
Perl
63
star
12

LightMessaging

Simple low-level replacement for CFMessagePort, with RocketBootstrap integration
Objective-C
56
star
13

MobileVLC

MobileVLC project hacked up to work when installed in /Applications
Objective-C
43
star
14

CacheClearer

Clear app caches from the Usage pane of the Settings app
Logos
41
star
15

ZWRCompatibility

Support Objective-C zeroing weak references with unsafe fallback on non-OS X 10.7/iOS 5.0
Objective-C
41
star
16

IconRenamer

Quickly rename icons via SpringBoard
Logos
31
star
17

Localization

Localizations for my iOS projects. Email me if you'd like to contribute
Makefile
30
star
18

Powercuff

Logos
28
star
19

SSLPatch

C
28
star
20

CaptainHammer

Simple debugging tools for iOS
Logos
26
star
21

DietBar

Puts navigation bars on a diet!
25
star
22

RunningIndicator

Running app icons glow
Objective-C
24
star
23

WiCarrier

Show WiFi network name/iP in place of carrier view. GPL licensed
Objective-C
23
star
24

BrowserChooser

Default browser chooser for iOS5.0+
Logos
20
star
25

cydia-gift-chrome-extension

Completely gross and unsupported Chrome extension to gift Cydia Store packages
JavaScript
19
star
26

SelectWithSwipes

Simple App Store-compatible gestures for iOS's keyboard. GPL LICENSED, commercial license available upon request
Objective-C
19
star
27

battery_stat

Simple program to read Apple battery information as json, text or in a format suitable for a shell prompt
C
16
star
28

MusicBanners

Track change bulletins with album art in SpringBoard
Objective-C
16
star
29

QuickReply

iOS QuickReply for SMS 2.x-4.x Jailbreak tweak
Objective-C
16
star
30

Cask

Tis a silly thing
Logos
15
star
31

MailMend

Mends a few bugs in MobileMail's MIME.framework
Logos
13
star
32

SBSToggles

SBSettings Toggles
Objective-C
13
star
33

VideoPace

Logos
13
star
34

FastBlurredNotificationCenter

Fast version of BlurriedNCBackground with my own personal customizations. GPL licensed
13
star
35

libspeex-iphone

libspeex 1.2rc1 built with theos
C
12
star
36

VoiceKeys

Voice recognition plugin for iOS via Google's recognition service. GPL licensed
Objective-C
11
star
37

RPSpawnTask

Simple Objective-C class to spawn tasks using posix_spawn, API incompatible partial replacement for NSTask
Objective-C
11
star
38

FullForce

GPL Licensed: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html#SEC1
Logos
11
star
39

iPadRetinaSimulator

GPL Licensed
Shell
11
star
40

ChromeCustomization

Customize Google Chrome for iOS
Objective-C
10
star
41

SBAppCompat

Compatibility library for SBApplication on iOS 8, with alerting so developers can learn that they're using dead private APIs
Logos
10
star
42

PebbleActivator

Objective-C
10
star
43

SwitcherMod

App Switcher customization for iOS (now maintained by optimo)
Objective-C
10
star
44

git-dropbox

Backup repositories to Dropbox; single-user only
Shell
10
star
45

fonemonkey4

mirror
Objective-C
9
star
46

URLConnectionLog

9
star
47

AttachmentEncryptor

Fix for http://www.andreas-kurtz.de/2014/04/what-apple-missed-to-fix-in-ios-711.html
Objective-C
9
star
48

Cylo

Cycript Loader for MobileSubstrate
C++
9
star
49

untrackerd

Continuously clean up locationd's history data
C
9
star
50

ClearNotifications

Clear lock screen notifications with a swipe
Objective-C
8
star
51

SmartClose

Close background apps, the smart way via Activator
Objective-C
8
star
52

Skippy

HUD for quick index jumps in the Contacts and Phone apps
Logos
8
star
53

Snoverlay

Happy Holidays, everyone!
8
star
54

BatteryWaster

Background apps forever to waste battery
Logos
8
star
55

MathAlarm

Awake to Arithmetic, GPL licensed
Objective-C
8
star
56

SuperScroller

Paged scrolling via Activator
7
star
57

ContactPrivacy

GPL Licensed
7
star
58

Belfry

Install Clock, Voice Memos, Stocks and Weather apps on iPad
Objective-C
7
star
59

SwipeBack

Open sourcing an old tweak
Logos
7
star
60

CAKeyframeAnimation-Generation

Programatically generate keyframes for CAKeyframeAnimation
Objective-C
7
star
61

jiraconnect-ios

Mirror of the standard JIRA Mobile Connect mercurial repo
Objective-C
7
star
62

UIDeviceCrasher

Debugging tool to crash the process when UIDevice is accessed too early
Logos
7
star
63

partialzip

Low memory partial ZIP download and inflation via HTTP multi ranges
C
7
star
64

IconRotator

Rotates icons. That is all. GPL Licensed.
7
star
65

DisplayEffects

experimental effects for iOS
Objective-C
6
star
66

SwitchIcons

Simple example tweak for Flipswitch
Logos
6
star
67

mysqlpp

mysql++ mirror
C++
6
star
68

AllowRotate

A quick game of code-golf
Objective-C
6
star
69

DietBulletins

Skinny bulletins! (GPL Licensed)
Logos
6
star
70

LivePaper

Live wallpaper with plugins
Objective-C
5
star
71

overlayheaders

Overlay headers for jailbreak development
Objective-C
5
star
72

pagein

Tiny macOS utility to force an entire process to be read out of the pagefile/compressed memory into RAM
C
5
star
73

RotationInhibitor

Prevents applications from receiving orientation events.
Objective-C
5
star
74

LockLightCydget

Flashlight app that lives in the lock screen. Max brightness!
5
star
75

UpsideDown

April Fools Tweak
5
star
76

WebGLEnabler

Currently fails in unpatched MobileSafari.app and Web.app due to sandbox :(
5
star
77

SliderBar

Quick scrolling in all table views
5
star
78

xattrlist

Simple command that dumps extended attributes
C
5
star
79

gdata-objectivec-client

Objective-C
4
star
80

PullToDismiss

Pull down to dismiss keyboard just like in iMessages
4
star
81

JailbreakCon-Talk-2013

Objective-C
4
star
82

tsgo

Prototype of golang linter that warns on potentially thread unsafe use of data
Go
4
star
83

UDIDAlerter

Just something for testing
Logos
4
star
84

ListLauncher

Launch apps fast.
4
star
85

PlayBar

Objective-C
4
star
86

Paste

iPhone Pastie client
Objective-C
4
star
87

PagePusher

Page-styled app animations
4
star
88

SplitMail

Split-style iPad mail app in portrait
4
star
89

RespringCacheFix

Fix respringing on iOS6.1 leaving stale icon cache files
C
4
star
90

Glance

Peek at your wallpaper by swiping up
Logos
4
star
91

safepreferences

C
3
star
92

small_shared_ptr

C++
3
star
93

Multi-Slide

Tweak Week Day #1: Multi-Slide
3
star
94

redis.net

C#
3
star
95

gcovr

gcovr mirror
Python
3
star
96

LoadLog

Debug loading of mach images on iOS
Objective-C
3
star
97

IRCCloud-iPad

iPad app that makes using IRCCloud less cumbersome
Objective-C
3
star
98

NoNewsIsGoodNews

Hide Newsstand icon and relocate apps to SpringBoard
Logos
3
star
99

KBThemer

Objective-C
3
star
100

iPhoneHeaders_old

Headers for iPhone OS
3
star