.pem

  • private key
  • chmod 400

.ppk

  • putty /etc/sudoers
  • Target list
    • Scan hosts
    • Sort by low, med, high
  • vsftpd
    • anonymous login by default
  • Windows rdp Centos
  • sudo yum update
  • sudo yum install vsftpd
  • sudo service vsftpd status
  • Enable anonymous login:
    • anonymous_enabled=YES Metasploit:
  • Exploits aka Modules
  • written in Ruby
  • exploit/multi/handler - listener that looks for incoming connections on ports from specific services
  • apt install metasploit-framework
  • msfdb run

AWS CLI

Installing AWS CLI

  • aws --version
  • apt-get remove awscli -y
  • apt-get install awscli -y
  • aws --version

Basic Commands

  • aws help
  • aws ec2 describe instance
    • describe attributes of ec2
  • aws s3 los s3://
    • list out the buckets in an s3 environment
  • aws lambda list-functions --region <<region>>
    • list out functions with Lambda

Pentesting and Ethical Hacking

  • Pentesting is the evaluation of a system’s attack surface throug manual and automated exploitation

Methodology

  • Planning
  • Reconnaissance
  • Threat modeling
  • Testing and exploiting
  • Post-exploitation
  • Reporting

nmap -sV -sC -p 21 <victim ip>

  • -sV = version

  • -sC = scripts

  • -p = ports

  • AWS Inspector

    • AWS tool to run automated security assessments on EC2 instances

Metasploit

  • apt install metasploit-framework

  • msfdb run

  • service ssh start

  • service ssh status

  • search TCP port scanner

  • use auxiliary/scanner/portscan/tcp

  • options

  • set RHOSTS <IP>

  • run

Scripting