TCM Security Academy Notes - by syselement
🏠 Home BlogGitHub📚 Buy Me a Book
  • TCM Security Academy Notes
  • Courses
    • TCM - Linux 101
      • 1. Introduction
        • Linux Distributions
        • Installing Linux
      • 2. Command Line
        • Intro to Command Line
        • Getting help on the Command Line
        • Command Line Arguments and Options
        • Reading Text Files
      • 3. File System
        • Filesystem Hierarchy Standard
        • Devices, Partitions and Mounting
        • Absolute and Relative Paths
        • Files and Directories
        • Paths, Filenames and Text Files
        • Filesystem Links
        • Archiving and Searching Files
      • 4. Users and Groups
        • Working with Users and Groups
        • File and Directory Permissions
        • Changing Users and Passwords
      • 5. Installing Software
        • Package Management
      • 6. Shells
        • Common Command Line Shells
        • Environment Variables & Startup Files
        • Input/Output Redirection
        • Command History & Substitution
      • 7. Utilities and File Editors
        • Searching and Processing Text
        • Networking at the Command Line
        • File Transfer
        • Text Editors and Converters
      • 8. Process Management
        • Process Information
        • Foreground and Background Processes
        • Managing Processes
        • Scheduling Processes
      • 9. Regular Expressions
        • Regular Expressions, Searching, Replacing, Building
      • 10. Bash Scripting
        • Bash Scripting Basics, Control Structures, Loops
      • 🌐Linux101 References
    • TCM - Mobile Application Penetration Testing
      • 1. Introduction & Mobile Pentesting
      • 2. Android Security
      • 3. Android Lab Setup
      • 4. Android Static Analysis
      • 5. Android Dynamic Analysis
      • 6. Android Bug Bounty
      • 7. iOS Security
      • 8. iOS Lab Setup
      • 9. iOS Static Analysis
      • 10. iOS Dynamic Analysis
      • 11. iOS Bug Bounty
      • 🌐MAPT References
    • TCM - Practical Ethical Hacking
      • 1. Introduction & Networking
      • 2. Lab Set Up, Linux & Python
        • Intro to Kali Linux
        • Intro to Python
      • 3. The Ethical Hacker Methodology
        • Information Gathering
        • Scanning & Enumeration
        • Vulnerability Scanning with Nessus
        • Exploitation Basics
        • Capstone Practical Labs
      • 4. Active Directory
        • Active Directory Lab
        • AD - Initial Attack Vectors
        • AD - Post-Compromise Enumeration
        • AD - Post-Compromise Attacks
        • AD - Additional Attacks
        • AD - Case Studies
      • 5. Post Exploitation
      • 6. Web Application
        • Web App Lab Setup
        • Web App - SQL Injection
        • Web App - XSS
        • Web App - Command Injection
        • Web App - Insecure File Upload
        • Web App - Authentication Attacks
        • Web App - XXE
        • Web App - IDOR
        • Web App - Capstone Practical Lab
      • 7. Wireless Attacks
      • 8. Legal Documentation & Report Writing
      • 🌐PEH References
  • 🏠syselement's Blog Home
Powered by GitBook
On this page
  • Passive reconnaissance
  • Target
  • Discovering email addresses
  • Breached credentials
  • Hunting subdomains
  • Screenshotting websites
  • Website technologies
  • Automated recon script
  • Using Burpsuite
  • Google Fu
  • Social Media

Was this helpful?

Edit on GitHub
  1. Courses
  2. TCM - Practical Ethical Hacking
  3. 3. The Ethical Hacker Methodology

Information Gathering

Previous3. The Ethical Hacker MethodologyNextScanning & Enumeration

Last updated 3 months ago

Was this helpful?

Passive reconnaissance

➡️ Physical engagement / Social engineering

  • Location information like

    • satellite images

    • drone recon

    • building layout (badge readers, security, fencing, etc)

  • Job information

    • employees (name, job title, phone number, etc)

    • pictures (badge photos, desk photos, computer photos, etc)

➡️ Web / Host Assessment

  • target validation

    • whois, nslookup, dnsrecon

  • finding subdomains

    • Google, dig, nmap, crt.sh, etc

  • fingerprinting

    • nmap, wappalyzer, netcat, etc

  • data breaches

    • , Breach-Parse, WeLeakInfo

Target

❗ Always refer to a Bug Bounty program to find valid targets that can be legally tested

  • Read the program details, follow the terms and stay in scope

  • Following test will be made on the *.tesla.com target


Discovering email addresses

  • The goal is discovering public email addresses and check if they really exist


Breached credentials

  • BreachCompilation password list (44GB) file comes from breached password dumps

breach-parse @tesla.com tesla.txt "~/Downloads/BreachCompilation/data"

Credential stuffing and Password spraying can be done using the results.

  • Hashed passwords or other data can be found

  • Collect all the data (email, username, IP, address, etc) with the goal to find patterns, that could be related to personal accounts too

  • Investigation to tie the data to other accounts, etc


Hunting subdomains

Identify subdomains

sudo apt install sublist3r
sublist3r -d tesla.com

sublist3r -d tesla.com -t 100 -v
sudo apt install amass
amass enum -d tesla.com

amass enum -d syselement.com
# Go is necessary (installed via pimpmykali.sh)
go install github.com/tomnomnom/httprobe@latest

# or on Kali
sudo apt install httprobe
cat tesla.com/recon/final.txt | httprobe

# Skip default probes, and use only https:443 probe
cat tesla.com/recon/final.txt | httprobe -s -p https:443

# Strip only subdomains from the list
cat tesla.com/recon/final.txt | sort -u | httprobe -s -p https:443 | sed 's/https\?:\/\///' | tr -d ':443'
# Go is necessary (installed via pimpmykali.sh)
go get -u github.com/tomnomnom/assetfinder

# or on Kali
sudo apt install assetfinder
assetfinder syselement.com

assetfinder --subs-only tesla.com

Screenshotting websites

# Go is necessary (installed via pimpmykali.sh)
go install github.com/sensepost/gowitness@latest

# or on Kali
sudo apt install gowitness
gowitness scan single --url "https://tesla.com" --write-db

gowitness scan single --url "https://blog.syselement.com"

Website technologies

  • by visiting the webpage, interact with the browser extension to check the website technologies

whatweb https://blog.syselement.com/

Automated recon script

  • Little bash script for sub-domains hunting

#!/bin/bash

url=$1

if [ ! -d "$url" ]; then
	mkdir $url
fi

if [ ! -d "$url/recon" ]; then
	mkdir $url/recon
fi

# Assetfinder #
echo "[+] Harvesting subdomains with assetfinder..."
assetfinder $url >> $url/recon/assets.txt
# get only subdomains containing $url
cat $url/recon/assets.txt | grep $1 >> $url/recon/final.txt
rm $url/recon/assets.txt

# Amass #
# echo "[+] Harvesting subdomains with amass..."
# amass enum -d $url >> $url/recon/f.txt
# sort -u $url/recon/f.txt >> $url/recon/final.txt
# rm $url/recon/f.txt

# httprobe #
echo "[+] Probing for alive domains..."
cat $url/recon/final.txt | sort -u | httprobe -s -p https:443 | sed 's/https\?:\/\///' | tr -d ':443' >> $url/recon/alive.txt

###
wget https://raw.githubusercontent.com/Gr1mmie/sumrecon/refs/heads/master/sumrecon.sh
  • TCM's modified final script

    • Creates a directory structure for reconnaissance under a given URL

    • Harvests subdomains using assetfinder

    • Filters valid subdomains and saves them to final.txt

    • Checks for live domains using httprobe

    • Identifies potential subdomain takeovers using subjack

    • Scans for open ports using nmap

    • Scrapes archived URLs from waybackurls

    • Extracts parameters from Wayback Machine data

    • Categorizes JavaScript, PHP, JSON, JSP, and ASPX files from Wayback Machine data

    • Removes temporary files to keep the structure clean

    • (Commented out) Could run amass for subdomain discovery and use EyeWitness for screenshots

# 0. Requirements
sudo apt install amass assetfinder httprobe gowitness nmap subjack
go install github.com/tomnomnom/waybackurls@latest

# 1. Copy the code here https://pastebin.com/raw/MhE6zXVt to a new file

# 2. Fix last 2 lines with gowitness and uncomment them
# echo "[+] Running eyewitness against all compiled domains..."
# gowitness scan file -f $url/recon/httprobe/alive.txt

chmod +x finalrecon.sh
./finalrecon.sh syselement.com
  • Check those additional resources


Using Burpsuite


Google Fu

site:tesla.com filetype:pdf

Social Media


🔗

🧪 e.g. -

➡️ (free registration) - Find email addresses from any company name or website

➡️ (free registration) - Phonebook lists all domains, email addresses, or URLs for the given input domain

➡️

➡️ (Chrome extension)

➡️ - Free email address verification tool

➡️

➡️ - Check if your email address is in a data breach

➡️ - A tool for parsing breached passwords

➡️ (subscription) - public data search-engine

Use tools to try to decrypt the hashed password, like , Google, etc

➡️ (outdated) - enumerate subdomains of websites using OSINT

➡️ - look for registered certificates and find subdomains or sub-subdomains

➡️ - in-depth attack surface mapping and asset discovery

➡️ - take a list of domains and probe for working (alive) http and https servers

➡️ - find domains and subdomains related to a given domain

➡️ - A golang, web screenshot utility using Chrome Headless

➡️ - find out what websites are built with

➡️ - via browser extension

➡️

➡️ - web recon script

The Bug Hunter's Methodology -

➡️

➡️

, or other public websites can be used for some social media OSINT (Open-Source Intelligence).

HaveIBeenPwned
Bugcrowd
Tesla
Hunter.io
Phonebook.cz
VoilaNorbert
Clearbit Connect
EmailHippo Email address verifiy
Email-checker
HaveIBeenPwned
breach-parse
DeHashed.com
Hashes.com
Sublist3r
crt.sh
amass
httprobe
assetfinder
gowitness
BuiltWith.com
Wappalyzer.com
WhatWeb
sumrecon
The Bug Hunter's Methodology Full 2-hour Training by Jason Haddix
Nahamsec Recon Playlist
Burp Suite
Google.com
Google Search Syntax
Google Search Operators: The Complete List (44 Advanced Operators)
Linkedin
Twiter (X)
Hunter.io
DeHashed.com
crt.sh
amass enum -d tesla.com
amass enum -d syselement.com
BuiltWith.com