Skip to content

Commit 9f72e3a

Browse files
authored
Merge pull request #175 from TheToddLuci0/add_credential_process
Add `credential_process` info
2 parents b30498c + 3c70419 commit 9f72e3a

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

  • src/pentesting-cloud/aws-security/aws-basic-information

src/pentesting-cloud/aws-security/aws-basic-information/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,26 @@ aws --profile acc2 ...
397397

398398
If you are looking for something **similar** to this but for the **browser** you can check the **extension** [**AWS Extend Switch Roles**](https://chrome.google.com/webstore/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?hl=en).
399399

400+
#### Automating temporary credentials
401+
402+
If you are exploiting an application which generates temporary credentials, it can be tedious updating them in your terminal every few minutes when they expire. This can be fixed using a `credential_process` directive in the config file. For example, if you have some vulnerable webapp, you could do:
403+
404+
```toml
405+
[victim]
406+
credential_process = curl -d 'PAYLOAD' https://some-site.com
407+
```
408+
409+
Note that credentials _must_ be returned to STDOUT in the following format:
410+
```json
411+
{
412+
"Version": 1,
413+
"AccessKeyId": "an AWS access key",
414+
"SecretAccessKey": "your AWS secret access key",
415+
"SessionToken": "the AWS session token for temporary credentials",
416+
"Expiration": "ISO8601 timestamp when the credentials expire"
417+
}
418+
```
419+
400420
## References
401421

402422
- [https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html)

0 commit comments

Comments
 (0)