From the course: Python: Pen Testing AWS

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Enumerating policies

Enumerating policies - Python Tutorial

From the course: Python: Pen Testing AWS

Start my 1-month free trial

Enumerating policies

- [Instructor] We've seen how we can identify a caller's identity by knowing the access credentials. Let's dig a bit deeper and see what we can find out about the policies related to the account. We'll replace the call to the sts service with a call to the iam service, nano miami.py -l and replace sts with identity and access management, iam. We can then call the iam get account authorization details function to enumerate the account details, get_account_authorization_details. Okay, let's save that and run it, python3 miami.py, and I'll put the output into out.txt because I expect to get a reasonable amount of output. Okay, let's take a look at it, nano out.txt -l. Okay, we've retrieved a lot of data from aws about our account, and we can start to analyze exactly what we can do with our account access. The output starts with a detail to the group set up in the account. Here we see the admins group, which has an…

Contents