rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org account access, and private resources.

rpCheckup - Catch AWS resource policy backdoors like Endgame

rpcheckup2

rpCheckup is an AWS resource policy security checkup tool that identifies public, external account access, intra-org account access, and private resources. It makes it easy to reason about resource visibility across all the accounts in your org.

Why?

We (Gold Fig Labs) built rpCheckup based on a part of how we assess customer AWS accounts. While there are many tools to assess and analyze IAM policies, the same treatment for policies attached to resources is a blind spot. As product iteration sometimes necessitates overprovisioned access to just get things working, finding such issues after the fact across a slew of different AWS resource types, accounts, and regions isn't straightforward.

rpCheckup generates an HTML & CSV report to make this easy.

Supported AWS Resources

rpCheckup uses the resources supported by Endgame as the high-water mark for analyzing attached policies.

Resource Type rpCheckup Endgame AWS Access Analyzer
ACM Private CAs
CloudWatch Resource Policies 🔜
EBS Volume Snapshots
EC2 AMIs
ECR Container Repositories
EFS File Systems
ElasticSearch Domains
Glacier Vault Access Policies
IAM Roles
KMS Keys
Lambda Functions
Lambda Layers
RDS DB Snapshots
RDS Cluster Snapshots
S3 Buckets
Secrets Manager Secrets
SES Sender Authorization Policies
SQS Queues
SNS Topics

Pre-requisites

  • AWS credentials (~/.aws/, env variables, metadata server, etc)
  • Docker
  • If running from source; go version >= go1.15

Installing

  1. Download the latest release:

Linux:

curl -Lo rpCheckup https://github.com/goldfiglabs/rpCheckup/releases/latest/download/rpCheckup_linux
chmod a+x ./rpCheckup

OSX x86:

curl -Lo rpCheckup https://github.com/goldfiglabs/rpCheckup/releases/latest/download/rpCheckup_darwin_amd64
chmod a+x ./rpCheckup

OSX M1/arm:

curl -Lo rpCheckup https://github.com/goldfiglabs/rpCheckup/releases/latest/download/rpCheckup_darwin_arm64
chmod a+x ./rpCheckup
  1. Run from source:
git clone https://github.com/goldfiglabs/rpCheckup.git
cd rpCheckup
go run main.go

Usage

Run ./rpCheckup and view the generated report found in output/.

Screen Shot 2021-03-01 at 12 22 36 PM

Overview

rpCheckup uses goldfiglabs/introspector to snapshot the configuration of your AWS account. rpCheckup runs SQL queries to generate findings based on this snapshot. Introspector does the heavy lifting of importing and normalizing the configurations while rpCheckup is responsible for querying and report generation.

Notes

If the account you are scanning is not the master account in an Organization, other accounts in the Organization may be detected as external accounts. This is because non-master accounts may not have access to see the organization structure.

Since rpCheckup relies on Introspector's snapshots, rpCheckup is unable to detect policies that are no longer attached. When detecting flapping or transient access, please use tools which utilize audit and security logs (CloudTrail, etc). See here for further information in preventing resource exposure.

Sample Reports

See sample reports in sample/

Screen Shot 2021-02-26 at 9 59 12 PM

rpCheckup report against Endgame sample account:

Screen Shot 2021-03-02 at 4 05 40 PM

License

Copyright (c) 2019-2021 Gold Fig Labs Inc.

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Mozilla Public License v2.0

Comments
  • Roles needed to run rpCheckup

    Roles needed to run rpCheckup

    What role(s) does the user require in order to run all the checks? I'm getting the following error:

    sudo go run main.go
    INFO[0000] Running postgres                             
    INFO[0000] Waiting for postgres to be healthy           
    INFO[0032] Postgres is healthy                          
    panic: no EC2 IMDS role found, operation error ec2imds: GetMetadata, http response error StatusCode: 404, request to EC2 IMDS failed
    
    goroutine 1 [running]:
    main.main()
    	/home/ec2-user/rpCheckup/main.go:214 +0xef3
    exit status 2
    

    From experience typically when running such tools the SecurityAudit and/or Read-Only is required.

  • Support AWS sub-accounts

    Support AWS sub-accounts

    Currently goldfiglabs/introspector doesn't support sub-accounts, and as a result, neither does rpCheckup. When it does, add support back to rpCheckup.

  • Improve error message when credentials can't be found

    Improve error message when credentials can't be found

    Fixes #6

    The AWS sdk gives a slightly cryptic error when it can't find credentials. Return our specific error with a link to the credential management page.

  • Document permissions required, include terraform module

    Document permissions required, include terraform module

    Fixes #7

    • Includes documentation for required permissions to run rpCheckup
    • Includes shell script to run with an assumed role
    • Includes terraform module to create an appropriately-permissioned role
  • Add documentation and a terraform module for required permissions

    Add documentation and a terraform module for required permissions

    AWS-Managed SecurityAudit and ViewOnlyAccess cover most, but not all of the permissions required.

    Verify that the remaining permissions are covered by:

    • apigateway:GetRestApis
    • efs:Describe*
    • acm-pca:List*
    • acm-pca:GetPolicy

    Document a role and policy to create these permissions. Optionally, add a terraform module to provision this role.

  • Depend on smaller postgres docker image

    Depend on smaller postgres docker image

    The supabase/postgres image is great, but huge. This tool does not actually need many of the additional features, like plv8. Once https://github.com/goldfiglabs/introspector/issues/5 is addressed, we should be able to move to a much smaller standard postgres docker image.

Eos-resource-purchase-cal - Calculate eos resource fee with golang

eos-resource-purchase-cal calculate eos resource fee Info this rep complete eosi

Jan 20, 2022
Serverless SOAR (Security Orchestration, Automation and Response) framework for automatic inspection and evaluation of security alert
Serverless SOAR (Security Orchestration, Automation and Response) framework for automatic inspection and evaluation of security alert

DeepAlert DeepAlert is a serverless framework for automatic response of security alert. Overview DeepAlert receives a security alert that is event of

Jan 3, 2023
A package for access aws service using AWS SDK for Golang

goaws ?? A package for access aws service using AWS SDK for Golang Advantage with goaws package Example for get user list IAM with AWS SDK for Golang

Nov 25, 2021
Account - Ant Chain ACCOUNT SDK for Go

English | 简体中文 Ant Chain ACCOUNT SDK for Go Requirements It's necessary for you

Jan 13, 2022
Program to fetch public IP ranges of AWS, Azure and Google

cloudip This program will retrieve a list of all public IP address ranges (v4 or v6) for the three major cloud vendors: Amazon AWS, Microsoft Azure an

Aug 21, 2022
Simple tool to search tagged resources between all AWS resouces

Welcome to Cloud Inventory Tags ?? Simple tool to search tagged resources around all AWS Account Installation MacOS / OSX

Jan 26, 2022
Lookup or replace AWS account IDs with their names and vice versa

awsacc A trusty helper for working with AWS account IDs. Working with AWS account IDs often involves more manual effort than necessary. Often account

Oct 14, 2021
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.
Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure.

tutor-pet API Simple CRUD API written in Go, built using AWS SAM tool and using the AWS' infrastructure. Macro architecture: Code architecture: Pre-Re

Aug 17, 2022
AWS Tags Updater - Sync tags with all resources via sheet 🐏🐏

AWS Tags Updater - Sync tags with all resources via sheet ????

Mar 22, 2022
👀The vaws command was created to simplify the display of AWS resources.

Vaws The vaws command was created to simplify the display of AWS resources. This repository is a Go version of the command that was created in the fol

Feb 12, 2022
AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.
AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.

AWS credential_process utility to assume AWS IAM Roles with Yubikey Touch and Authenticator App TOPT MFA to provide temporary session credentials; With encrypted caching and support for automatic credential refresh.

Dec 20, 2022
Useful AWS access key attribution tool
Useful AWS access key attribution tool

whodunnit Working towards this: https://twitter.com/__steele/status/1410437278489477120. Dumping code now to validate if it's useful or not before inv

Jan 1, 2022
Simple no frills AWS S3 Golang Library using REST with V4 Signing (without AWS Go SDK)

simples3 : Simple no frills AWS S3 Library using REST with V4 Signing Overview SimpleS3 is a golang library for uploading and deleting objects on S3 b

Nov 4, 2022
Integrate AWS EKS Anywhere cluster with AWS Services
 Integrate AWS EKS Anywhere cluster with AWS Services

This article provides step-by-step instruction on integrating AWS EKS Anywhere with AWS Services so the applications running on customer data center can securely connect with these services.

Mar 6, 2022
Apis para la administracion de notifiaciones, utilizando servicios como AWS SNS y AWS SQS

notificacion_api Servicio para envío de notificaciónes por difusión en AWS SNS Especificaciones Técnicas Tecnologías Implementadas y Versiones Golang

Jan 7, 2022
Aws-parameter-bulk - Export AWS SSM Parameter Store values in bulk to .env files

aws-parameter-bulk Utility to read parameters from AWS Systems Manager (SSM) Par

Oct 18, 2022
Feb 7, 2022
Aws-cognito-demo-go - Source code for AWS Cognito in Go

AWS Cognito Demo in Go Source code for YouTube series, AWS Cognito in Go - https

Dec 10, 2022
Una prueba técnica: Servicio Golang REST API local, sobre Docker, gRPC, AWS Serverless y sobre Kubernetes en AWS EC2

Una prueba técnica: Servicio Golang REST API local, sobre Docker, gRPC, AWS Serverless y sobre Kubernetes en AWS EC2

May 7, 2022