You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture. Knowledge cutoff: 2023-04 Current date: 2024-02-07
Image input capabilities: Enabled
# Setup Basic Lab | |
#use key you generated when prompted | |
terraform plan | |
#use key you generated when prompted | |
terraform apply | |
# SSH into Lab and Setup Listener | |
ssh ec2-user@<output IP> -i <location of your generate keys> | |
sudo yum install nc |
resource "aws_instance" "example" { | |
ami = "ami-06ca3ca175f37dd66" | |
instance_type = "t2.micro" | |
associate_public_ip_address = true | |
provisioner "remote-exec" { | |
inline = [ |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/arn/arn.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/awserr/error.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/awserr/types.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/awsutil/path_value.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/awsutil/prettify.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/client/client.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/client/default_retryer.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/client/logger.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/config.go | |
/Users/guptagr/go/pkg/mod/github.com/aws/[email protected]/aws/context_background_1_7.go |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC9A4kmSHmyhncSssfXAuEFIQ8bLExiXxwolr6wrx9NhyQa9229FTuLJmztF+QP755njtLFsV/hx8jlKYtBseEBV2M5DKZLloCP8ucyUmF1ZNS/qZoNQbMNCBLfsEExrD51f17f5aqbH6AeSLDJDn9YhPoZQYYURl3GIK06fn3NoL3gDXL95aLzU0b16WSbgPoTkszvo/LS8r468AalC5npAfyQ8eOpDwcBgJI/4WIXNPYMBr6eN2nYKlJlm5cIgvfEfft1hgrU4lyJFQB0US11vTRIJUOQ+ZLm7P9Axeu2iDSc5QMB1fmpnGJOaIvxr/5Io9x2JOZ5R9PIBBab8TOsL1nCyjZYuqw0mS/RucDyvA001MZUDHJBwnMNzDrp6pkZ9+Owj1rQTJCcnshP7B9H+9IxVW0tTpCGOGVr0v4CV3cTxzgjw1C6W4bn4MWDvuQnVMU2uMmJqFwy9ooo8SCXd3esFMnznvekhBlMDtPVnDhmgeH4G0eroYXxfn/SUE0= rhodes@mdm |
import boto3, json | |
print("Account: ", end = '') | |
print(boto3.client('sts').get_caller_identity()['Account']) | |
client = boto3.client('config') | |
print() | |
print("Getting non-compliant config results") | |
print() |
ssh in
apt-get update
scp Nessus-8.7.2-ubuntu1110_amd64.deb [email protected]:/tmp
cd /tmp
dpkg -i Nessus-8.7.2-ubuntu1110_amd64.deb
#Script to delete lambdas after downloading the code | |
#Accepts a new line delimited file with lambda names or ARNs | |
#Usage: log into the AWS account on the command line | |
# delete-lambda.sh <filename> | |
while IFS="" read -r p || [ -n "$p" ]; | |
do | |
if [ -z $1 ]; then | |
echo "Error: must supply a filename with line delimited values" |
# https://securitychops.com/2019/08/31/dev/random/one-liner-to-install-burp-cacert-into-android.html | |
# | |
curl --proxy http://127.0.0.1:8080 -o cacert.der http://burp/cert \ | |
&& openssl x509 -inform DER -in cacert.der -out cacert.pem \ | |
&& cp cacert.der $(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 \ | |
&& adb root \ | |
&& adb remount \ | |
&& adb push $(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 /sdcard/ \ | |
&& echo -n "mv /sdcard/$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0 /system/etc/security/cacerts/" | adb shell \ | |
&& echo -n "chmod 644 /system/etc/security/cacerts/$(openssl x509 -inform PEM -subject_hash_old -in cacert.pem |head -1).0" | adb shell \ |
while IFS="" read -r p || [ -n "$p" ]; | |
do | |
printf '%s' "$p -- Hosts: "; | |
subnetcalc $p|grep "Max. Hosts"|awk '{ print $4 }'; | |
done < hosts.txt | |
# while IFS="" read -r p || [ -n "$p" ]; do printf '%s' "$p -- Hosts: "; subnetcalc $p|grep "Max. Hosts"|awk '{ print $4 }'; done < hosts.txt |