Hacking Notes
  • What is this?
  • Reconnaissance ๐Ÿ—ฃ
    • Information Gathering ๐Ÿ—ฃ
  • Enumeration ๐ŸŽฏ
    • Host Discovery ๐Ÿ›Ž
    • DNS Enumeration
    • OS Discovery ๐Ÿ–ฅ
    • Port Scanning ๐Ÿ“Ÿ
    • WAF Evasion
  • Web ๐Ÿ“ฑ
    • Unrestricted File Upload
    • Templates Injections โœ–๏ธ
    • File Inclusion
    • Login Panes
    • SQL Injection
    • NoSQL Injection
    • OAuth 2.0 Bypass
  • Privilege Escalation
    • Linux Privesc
    • Windows Privesc
    • Run Commands AS
  • Post Explotation ๐Ÿ’€
    • Port Forwarding and Tunneling
    • Transfering Files ๐Ÿ“ค
    • Reverse Shell ๐Ÿ”™
    • Crypto 101 ๐Ÿ‘
    • AV Evasion
    • Bypass UAC
    • Get Credentials
  • Services
    • PORT 21/tcp - FTP
    • PORT 25/tcp - SMTP
    • PORT 53/tcp/udp - DNS
    • Port 80,443/tcp - HTTP
    • Port 111/tcp - RPCBind
    • PORT 143,993/tcp - IMAP
    • PORT 139,445/tcp - SMB
    • PORT 161/udp - SNMP
    • PORT 1100/tcp - Java RMI
    • PORT 1433/tcp - Microsoft SQL Server
    • PORT 2049/tcp - NFS
    • PORT 3306/tcp MySQL
    • PORT 3389/tcp RDP
    • PyPI Server
  • Software
    • Tomcat
    • Jenkins
    • Drupal
    • Wordpress
  • Client-Side Attacks
    • Evil PDF
    • Microsoft Office Macros
  • Other
    • Hacking WiFI
      • WPA/WPA2 PSK
      • WPA/WPA2 PEAP (Enterprise)
      • WEP
    • Hacking with Powershell
    • Hacking AWS
  • Exploiting
    • Buffer Overflow
  • Active Directory
    • ๐Ÿ–ฅ๏ธAD Attacks
Powered by GitBook
On this page
  • Passive Information Gathering (OSINT)
  • OSINT Framework
  • Search Engines
  • Harvesting
  • Social Media
  • Infrastructures
  • Domains and subdomains
  • Recon-ng
  • Shodan
  • Open-Source Code

Was this helpful?

  1. Reconnaissance ๐Ÿ—ฃ

Information Gathering ๐Ÿ—ฃ

Information Gathering is the act of gathering different kinds of information against the targeted victim or system.

PreviousWhat is this?NextHost Discovery ๐Ÿ›Ž

Last updated 3 years ago

Was this helpful?

There are two types of information gathering, passive or OSINT (Open Source INTelligence) information gathering which means gathering as much information about our target wihout exposing our presence, and active information gathering which techniques interact directly with the target system.

Passive Information Gathering (OSINT)

Is a technique to gather information without any interaction with the target. There are many tools that are listed in OSINT Framework.

OSINT Framework

The OSINT Framework includes information gathering tools and websites in one central location. Some tools listed in the framework cover more disciplines than information security.

Search Engines

Google offers the opportunity to perform advanced search queries using special operators:

AND, OR, +, -, ""

And this is some examples of queries:

Query Type
Google Dork

Cache

cache:www.example.com

Link

link:www.example.com

Site

site:www.website.com

Filetype

filetype:pdf

Title

intitle:index.of

Harvesting

Harversting is extract information from documents and files. We can find information such as emails, workers and so on. theHarvester is a tool that automates this working

theharvester -d example.com -b google
theharvester -d example.com -b linkedin

Social Media

The spread of social networks has made information gathering extremely important and effective. With the help of social media, a pentester can esaily gather employee's personal informacion such as phone numbers, addresses, history and CV.

We want to collect the following information about the employees:

  • Age

  • Phone Number

  • Addresses

  • Occupation

  • Business

  • Interests

  • Email Addresses

  • Website Owned

  • Related Documents

  • Financial Info

Infrastructures

The main goal here is to retrieve data such as:

  • Domains

  • Netblocks or IP addresses

  • Mail servers

  • ISP's used (Internet Server Provider)

  • Any other technical information

Domains and subdomains

There are some tools that search subdomains like amass or sublist3r:

sublist3r -d [Domain]
amass enum -d example.com

Nmmapper is an online tool that finds a lots of subdomains:

The following user guide helps us a lot to inspect some awesome queries.

Recon-ng

Recon-ng is a moduled-base framework for web-based information gathering. Recon-ng displays the results of a module to the terminal but it also stores them in a database.

Searching Modules

We can add modules from the recon-ng with marketplace.

marketplace search <MODULE>
marketplace info <MODULE>
marketplace install <MODULE>

Using Modules

We need to load the module before using it:

marketplace load <MODULE>
info
options set <OPTION> <VALUE>

Display results

We can display some different results, since hosts to vulnerabilities.

show #To see all posibilities of displaying
show <SELECTION>

Best Recon-ng Modules

recon/domains-hosts/google_site_web #Search subdomains on Google with Google Dorks
recon/hosts-hosts/resolve #Update hosts table with the DNS resolution

Shodan

The following repository gives us some examples of what we can do with this brilliant tool

Open-Source Code

One such of interesting information are open-source projects and online code repositories, such as GitHub, GitLab and SourceForge.

GitLeaks

Gitleaks is a SAST tool for detecting hardcoded secrets like passwords, api keys, and tokens in git repos. Gitleaks is an easy-to-use, all-in-one solution for finding secrets, past or present, in your code.

gitleaks --repo-url=https://github.com/my-insecure/repo -v

Given a domain, the first source for information is . There are a lot of online tools that allow you top use WHOIS:

As we gather information on our target, it is important to remember that traditional websites are just one part of the internet. is a search engine that crawls devices connected to the internet.

WHOIS
http://who.is
http://whois.domaintools.com
https://www.betterwhois.com/
https://searchdns.netcraft.com/
https://www.nmmapper.com/sys/tools/subdomainfinder/
Shodan
https://github.com/jakejarvis/awesome-shodan-queries
OSINT Framework
Amass/user_guide.md at master ยท OWASP/AmassGitHub
GitHub - zricethezav/gitleaks: Scan git repos (or files) for secrets using regex and entropy ๐Ÿ”‘GitHub
GitLeaks Repo
Logo
Logo
OSINT Framework
Shodan search.