All Projects → rams3sh → Aaia

rams3sh / Aaia

AWS Identity and Access Management Visualizer and Anomaly Finder

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Aaia

Aws Securitygroup Grapher
This ansible role gets information from an AWS VPC and generate a graphical representation of security groups
Stars: ✭ 93 (-57.34%)
Mutual labels:  aws, graph, security-tools
Smogcloud
Find cloud assets that no one wants exposed 🔎 ☁️
Stars: ✭ 168 (-22.94%)
Mutual labels:  aws, security-tools
Iam Floyd
AWS IAM policy statement generator with fluent interface
Stars: ✭ 165 (-24.31%)
Mutual labels:  aws, iam
Slurp
Evaluate the security of S3 buckets
Stars: ✭ 183 (-16.06%)
Mutual labels:  aws, pentesting
Rescope
Rescope is a tool geared towards pentesters and bugbounty researchers, that aims to make life easier when defining scopes for Burp Suite and OWASP ZAP.
Stars: ✭ 156 (-28.44%)
Mutual labels:  security-tools, pentesting
Neo4j 3d Force Graph
Experiments with Neo4j & 3d-force-graph https://github.com/vasturiano/3d-force-graph
Stars: ✭ 159 (-27.06%)
Mutual labels:  graph, neo4j
Crithit
Takes a single wordlist item and tests it one by one over a large collection of websites before moving onto the next. Create signatures to cross-check vulnerabilities over multiple hosts.
Stars: ✭ 182 (-16.51%)
Mutual labels:  security-tools, pentesting
Consoleme
A Central Control Plane for AWS Permissions and Access
Stars: ✭ 2,631 (+1106.88%)
Mutual labels:  aws, security-tools
Knary
A simple HTTP(S) and DNS Canary bot with Slack/Discord/MS Teams & Pushover support
Stars: ✭ 187 (-14.22%)
Mutual labels:  security-tools, pentesting
Aws Auto Remediate
Open source application to instantly remediate common security issues through the use of AWS Config
Stars: ✭ 191 (-12.39%)
Mutual labels:  aws, security-tools
Movies Python Bolt
Neo4j Movies Example application with Flask backend using the neo4j-python-driver
Stars: ✭ 197 (-9.63%)
Mutual labels:  graph, neo4j
Neo4j Php Ogm
Neo4j Object Graph Mapper for PHP
Stars: ✭ 151 (-30.73%)
Mutual labels:  graph, neo4j
Webhashcat
Hashcat web interface
Stars: ✭ 151 (-30.73%)
Mutual labels:  security-tools, pentesting
Diagram Maker
A library to display an interactive editor for any graph-like data.
Stars: ✭ 2,086 (+856.88%)
Mutual labels:  aws, graph
Airmaster
Use ExpiredDomains.net and BlueCoat to find useful domains for red team.
Stars: ✭ 150 (-31.19%)
Mutual labels:  security-tools, pentesting
Intrec Pack
Intelligence and Reconnaissance Package/Bundle installer.
Stars: ✭ 177 (-18.81%)
Mutual labels:  security-tools, pentesting
Iamy
A cli tool for importing and exporting AWS IAM configuration to YAML files
Stars: ✭ 200 (-8.26%)
Mutual labels:  aws, iam
Blockchain2graph
Blockchain2graph extracts blockchain data (bitcoin) and insert them into a graph database (neo4j).
Stars: ✭ 134 (-38.53%)
Mutual labels:  graph, neo4j
Kube Aws Iam Controller
Distribute different AWS IAM credentials to different pods in Kubernetes via secrets.
Stars: ✭ 137 (-37.16%)
Mutual labels:  aws, iam
Awesome Shodan Queries
🔍 A collection of interesting, funny, and depressing search queries to plug into shodan.io 👩‍💻
Stars: ✭ 2,758 (+1165.14%)
Mutual labels:  security-tools, pentesting

Aaia

(A)n(a)lysis of (I)dentity and (A)ccess

Note: Expansion created post the name was decided :P

What does Aaia do ?

Aaia (pronounced as shown here ) helps in visualizing AWS IAM and Organizations in a graph format with help of Neo4j. This helps in identifying the outliers easily. Since it is based on neo4j , one can query the graph using cypher queries to find the anomalies.

Aaia also supports modules to programatically fetch data from neo4j database and process it in a custom fashion. This is mostly useful if any complex comparision or logic has to be applied which otherwise would not be easy through cypher queries.

Aaia was initially intended to be a tool to enumerate privelege esclation possibilities and find loop holes in AWS IAM. It was inspired from the quote by @JohnLaTwC

"Defenders think in lists. Attackers think in graphs. As long as this is true, attackers win."

Why the name "Aaia" ?

Aaia in Tamil means grandma. In general, Aaia knows everything about the family. She can easily connect who is related to whom; and how ;and give you the connection within a split second. She is a living graph database. :P

Since "Aaia" (this tool) also does more or less the same, hence the name.

Installation

Install the neo4j Database

1. Installation using Docker (Recommended)

i. Install Docker Runtime

Check the official documentation regarding installation here.

ii. Run the following docker command

docker run -p 7687:7687 -p 7474:7474 -v `pwd`/neo4j/data:/data -v `pwd`/neo4j/logs:/logs -e NEO4J_AUTH=neo4j/test neo4j:3.5.17

Note : Above command persists neo4j data in your disk. However, feel free to modify for your needs and change the auth according to your preference. The credentials provided here should be configured in Aaia.conf file as well.

2. Installation using binary

Instructions here

Setup the username , password and bolt connection uri in Aaia.conf file. An example format is given in Aaia.conf file already.

Note: Aaia has been tested with neo4j v 3.5.17. It may work with older versions. Neo4j has introduced some new changes post v 4.0 which has been found not compatible with Aaia's current codebase.

Install OS dependency

Debian :-

apt-get install awscli jq

Redhat / Fedora / Centos / Amazon Linux :-

yum install awscli jq

Note:

These packages are needed for Aaia_aws_collector.sh script. Ensure these packages are present in the base system from where the collector script is being run.

Clone this repository

git clone https://github.com/rams3sh/Aaia

cd Aaia/

Create a virtual environment

python3 -m venv env

Activate the virtual environment

source env/bin/activate

Note: Aaia depends on pyjq library which is not stable in windows currently. Hence Aaia is not supported for Windows OS.

Install the dependencies

python -m pip install -r requirements.txt

Using Aaia

Setting up Permissions in AWS

Aaia would require following AWS permissions for collector script to collect relevant data from AWS

iam:GenerateCredentialReport
iam:GetCredentialReport
iam:GetAccountAuthorizationDetails
iam:ListUsers
iam:GetUser
iam:ListGroups
iam:ListRoles
iam:GetRole
iam:GetPolicy
iam:GetAccountPasswordPolicy
iam:GetAccountSummary
iam:ListAccountAliases
organizations:ListAccountsForParent
organizations:ListOrganizationalUnitsForParent
organizations:DescribeOrganization
organizations:ListRoots
organizations:ListAccounts
organizations:ListTagsForResource
organizations:ListPolicies
organizations:ListTargetsForPolicy
organizations:DescribePolicy
organizations:ListAWSServiceAccessForOrganization

"Organizations" related permissions can be ommitted. However , all the above mentioned "IAM" related permissions are necessary.

Ensure the permissions are available to the user / role / any aws principal which will be used for collection of data for the collector script.

Collecting data from AWS

Ensure you have aws credentials configured. Refer this for help.

Once the crendential is setup.

Run:-

./Aaia_aws_collector.sh <profile_name>

Ensure the output format of the aws profile being used for data collection is set to json as Aaia expects the data collected to be in json format.

Note:-

In case of a requirement where data has to be collected from another instance; copy "Aaia_aws_collector.sh" file to the remote instance , run it and copy the generated "offline_data" folder to the Aaia path in the instance where Aaia is setup and carry on with following steps. This will be helpful in cases of consulting or client audit.

Loading the collected data to Neo4j DB

python Aaia.py -n <profile_name> -a load_data

-n supports "all" as value which means load all data collected and present within offline_data folder.

Note:

Please ensure you do not have profile as "all" in the credentials file as it may conflict with the argument. :P

Now we are ready to use Aaia.

Audit IAM through a custom module

As of now , a sample module is given as a skeleton example. One can consider this as a reference for building custom modules.

python Aaia.py -n all -m iam_sample_audit

Thanks to

Aaia is influenced and inspired from various amazing open source projects. Huge Shoutout to :-

Aaia in Action

asciicast

Screenshots

A sample visual of a dummy AWS Account's IAM

Image of AWS IAM Neo4j Visual

A sample visual of a result of a cypher query to find all relations of a user in AWS IAM

Image of AWS IAM query result Visual

TO DO

  • Write a detailed documentation for understanding Aaia's Neo4j DB Schema
  • Write a detailed documentation for developing custom modules for Aaia
  • Write custom modules to evaluate 28 AWS privelege escalation methods identified by RhinoSecurity.
  • Provide a cheatsheet of queries for identifying simple issues in AWS IAM
  • Extend Aaia to other cloud providers.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].