-
-
Save omespino/85ce04f6851c733617ef663b72815228 to your computer and use it in GitHub Desktop.
HowTo set up AWS CLI version 2 to use Burp Suite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ # HowTo set up AWS CLI version 2 to use Burp Suite | |
$ | |
$ # Requirements: Burp Suite, curl | |
$ | |
$ # 1. Installing AWS CLI version 2, configure and test | |
$ | |
$ curl https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o Downloads/awscliv2.zip | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 33.5M 100 33.5M 0 0 6825k 0 0:00:05 0:00:05 --:--:-- 7290k | |
$ unzip -q Downloads/awscliv2.zip -d Downloads | |
$ sudo ./Downloads/aws/install | |
You can now run: /usr/local/bin/aws --version | |
$ aws configure | |
AWS Access Key ID [None]: <...> | |
AWS Secret Access Key [None]: <...> | |
Default region name [None]: <...> | |
Default output format [None]: <...> | |
$ # Execute any AWS CLI command to test it | |
$ | |
$ # 2. Set HTTP and HTTPS proxy | |
$ | |
$ export HTTP_PROXY=http://localhost:8080 | |
$ export HTTPS_PROXY=http://localhost:8080 | |
$ | |
$ # If we try to execute any command with AWS CLI it will show us the following error: | |
$ # SSL validation failed for https://<...>/ [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056) | |
$ | |
$ # 3. Add Burp Suite certificate | |
$ | |
$ curl http://127.0.0.1:8080/cert --output Downloads/certificate.cer | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 940 100 940 0 0 85454 0 --:--:-- --:--:-- --:--:-- 85454 | |
$ openssl x509 -inform der -in Downloads/certificate.cer -out Downloads/certificate.pem | |
$ which aws | |
/usr/local/bin/aws | |
$ file /usr/local/bin/aws | |
/usr/local/bin/aws: symbolic link to /usr/local/aws-cli/v2/current/bin/aws | |
$ ls /usr/local/aws-cli/v2/2.1.17/dist/botocore/ | |
cacert.pem data/ | |
$ sudo bash -c "cat Downloads/certificate.pem >> /usr/local/aws-cli/v2/2.1.17/dist/botocore/cacert.pem" | |
$ # Execute any AWS CLI command and check Burp Suite |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment