# Information Gathering (Reconnaissance)

## Passive Recon

**Physical Engagement/Social Engineering:**

* Location Information:
  * Satellite images
  * Drone recon
  * Building layout (badge readers, break areas, security, fencing)
* Job Information:
  * Employees (name, job title, phone number, manager, etc.)
  * Pictures (badge photos, desk photos, computer photos, etc.)

**Web/Host:**

* Target Validation: [WHOIS](https://who.is), [nslookup](https://www.nslookup.io), [dnsrecon](https://www.kali.org/tools/dnsrecon)
* Finding Subdomains: [Google FU](https://github.com/champmq/GoogleFU), [dig](https://toolbox.googleapps.com/apps/dig), [Nmap](https://nmap.org), [Sublist3r](https://www.kali.org/tools/sublist3r), [Bluto](https://github.com/darryllane/Bluto), [crt.sh](https://crt.sh)
* Fingerpriting: [Nmap](https://nmap.org), [Wappalyzer](https://www.wappalyzer.com), [WhatWeb](https://whatweb.net), [BuiltWith](https://builtwith.com), [Netcat](https://sectools.org/tool/netcat)
* Data Breaches: [HaveIBeenPwned](https://haveibeenpwned.com), [Breach-Parse](https://github.com/hmaverickadams/breach-parse), [WeLeakInfo](https://weleakinfo.io)

## Identifying The Target

Use [Bugcrowd](https://bugcrowd.com) (a public Bug Bounty Program) to identify the target T-Mobile.

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FMZlVOXAN6tS4mRpExO6E%2Fimage.png?alt=media&#x26;token=8b4fbed2-3ad5-4a0c-902b-2f08b1d81b61" alt="T-Mobile"><figcaption><p><a href="https://bugcrowd.com/engagements/t-mobile">https://bugcrowd.com/engagements/t-mobile</a></p></figcaption></figure>

Read the program details carefully and ensure that your testing activities comply with the authorized targets and rules outlined.

## Discovering Email Addresses

[Hunter.io](https://hunter.io) - find and verify professional email addresses

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FINM7vkm20W3Ek6Mt9xkD%2FUntitled.png?alt=media&#x26;token=f5016b9c-1d5a-4a3a-8059-434c11fc73c9" alt="T-Mobile email addresses found using Hunter.io"><figcaption><p><a href="https://hunter.io/try/search/t-mobile.com?locale=en">https://hunter.io/try/search/t-mobile.com?locale=en</a></p></figcaption></figure>

[Phonebook.cz](https://phonebook.cz) - lists all domains, email addresses, or URLs for the given input domain.

[Voila Norbert](https://www.voilanorbert.com) - great for getting the email addresses you need.

[Clearbit](https://clearbit.com) - free, verified B2B emails (it has to be used on Chrome).

[Email Hippo](https://tools.emailhippo.com) - free online email verification tool.

## Gathering Breached Credentials with Breach-Parse

[breach-parse](https://github.com/hmaverickadams/breach-parse) - a tool for parsing breached passwords

```sh
breach-parse @t-mobile.com t-mobile.txt "~/Downloads/BreachCompilation/data"
```

The obtained results can be leveraged for Credential Stuffing and Password Spraying.

## Hunting Breached Credentials with DeHashed

[DeHashed](https://dehashed.com) - Have you been compromised? DeHashed provides free deep-web scans and protection against credential leaks.

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FVAgHhofjneEifU9EUwSG%2Fimage.png?alt=media&#x26;token=f9929038-7b50-4185-9f1b-ee46440ae299" alt=""><figcaption><p><a href="https://dehashed.com/">https://dehashed.com</a></p></figcaption></figure>

Hashes.org is down, therefore, use [Hashes.com](https://hashes.com/en/decrypt/hash) or other tools to decrypt the hashed passwords.

## Hunting Subdomains

[Sublist3r](https://www.kali.org/tools/sublist3r) - Finding Subdomains

1. Synchronize the local package database with repository sources:

```sh
sudo apt update
```

2. Install Sublist3r tool:

```sh
sudo apt install sublist3r
```

3. Run Sublist3r:

```sh
sublist3r -d t-mobile.com
```

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FeI4w5jx6jup2LrN52sYx%2Fimage.png?alt=media&#x26;token=d41a9789-179a-41e7-9e23-f4e8c36299bb" alt="sublist3r -d t-mobile.com"><figcaption></figcaption></figure>

This enumerates subdomains of <mark style="color:orange;">T-Mobile.com</mark> using various search engines.

[crt.sh](https://crt.sh) - to look for registered certificates

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2Ft2xyVKqzmsrh9QtkTHUL%2FScreenshot%202024-10-24%20225943.png?alt=media&#x26;token=385cc848-8214-41c7-b075-d17dd208aad2" alt="crt.sh"><figcaption></figcaption></figure>

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FDyA6UCdN6rMjHax5dcWl%2Fimage.png?alt=media&#x26;token=00bcda69-10a5-442e-b006-c66c63dc4e21" alt="Certificates"><figcaption></figcaption></figure>

[OWASP Amass](https://github.com/owasp-amass/amass) - In-depth attack surface mapping and asset discovery

1. Install the GCC-based compiler for the `Go` programming language:

```sh
sudo apt install gccgo-go
```

2. Install the official `Go` programming language compiler and tools developed by Google:

```sh
sudo apt install golang-go
```

3. Install OWASP Amass:

```sh
go install -v github.com/owasp-amass/amass/v4/...@master
```

4. Run OWASP Amass:

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FUfu8PGQtc1xTxUec4pn0%2Fimage.png?alt=media&#x26;token=2c816495-4092-4ccb-ad65-32ae30818d45" alt="OWASP amass"><figcaption></figcaption></figure>

5. Enumerate subdomains of <mark style="color:orange;">T-Mobile.com</mark>:

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2F7VPHNZoOCRVsz2EKSKru%2Fimage.png?alt=media&#x26;token=d7ccc2ca-648e-48e6-88ac-7b851f74a864" alt="Enumerate subdomains of T-Mobile.com"><figcaption></figcaption></figure>

[httprobe](https://github.com/tomnomnom/httprobe) - Take a list of domains and probe for working HTTP and HTTPS servers

1. Install httprobe:

```bash
sudo apt install httprobe
```

2. Run httprobe with <mark style="color:orange;">domains.txt</mark>:

```bash
cat ~/Desktop/domains.txt | httprobe
```

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2Fxe9aq0fdNtG2pa7XVoTH%2Fimage.png?alt=media&#x26;token=95c891dd-0953-4452-916f-a099ca78c3aa" alt="cat ~/Desktop/domains.txt | httprobe"><figcaption></figcaption></figure>

This will narrow the list to the active subdomains.

## Identifying Website Technologies

[BuiltWith](https://builtwith.com) - Web technology information profiler tool. Find out what a website is built with.

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FRQDp42S75yVU7z5bT8Km%2FUntitled.png?alt=media&#x26;token=690028df-8503-466f-ab1e-ce320874b521" alt=""><figcaption><p><a href="https://builtwith.com/">https://builtwith.com</a></p></figcaption></figure>

This will display a detailed list of technologies <mark style="color:orange;">T-mobile.com</mark> is built with:

* Analytics and Tracking
* Widgets
* Language
* Frameworks
* Mapping
* Content Delivery Network
* Mobile
* Payment
* Audio / Video Media
* Content Management System
* JavaScript Libraries and Functions
* Verified Link
* Advertising
* SSL Certificates
* Name Server
* Email Hosting Providers
* Web Hosting Providers
* Web Servers
* Operating Systems and Servers
* Verified CDN
* Robots.txt
* Web Master Registration
* Content Delivery Network

Preview of <mark style="color:orange;">Analytics and Tracking</mark>:

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FrPFOoGZRDRL4QippjfTD%2Fimage.png?alt=media&#x26;token=81b60de7-edbd-4cd9-8f94-d2d8cabb1014" alt=""><figcaption><p><a href="https://builtwith.com/t-mobile.com">https://builtwith.com/t-mobile.com</a></p></figcaption></figure>

[Wappalyzer](https://www.wappalyzer.com) - Identify technologies on websites

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FHqabnSaKs04yDWGuXtYZ%2FUntitled.png?alt=media&#x26;token=57a45b08-4446-41a5-85cd-49d2dbf633df" alt="Wappalyzer - T-Mobile.com"><figcaption></figcaption></figure>

[WhatWeb](https://www.kali.org/tools/whatweb) - Next generation web scanner version

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FWn0FkgeGNrtEgvy66TLz%2Fimage.png?alt=media&#x26;token=ee75afa4-8c9a-4f0d-8a09-14ce426d8aa0" alt=""><figcaption></figcaption></figure>

```bash
whatweb t-mobile.com
whatweb tmobile.com
```

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FQztDqnmuKeqgI3XjYihK%2Fimage.png?alt=media&#x26;token=728ad11d-db79-44f3-a150-f2701623c4a6" alt="whatweb t-mobile.com &#x26;&#x26; whatweb tmobile.com"><figcaption></figcaption></figure>

## Information Gathering with Burp Suite

[Burp Suite](https://portswigger.net/burp) - The class-leading vulnerability scanning, penetration testing, and web app security platform. Burp Suite's main feature is the Proxy. The Proxy enables Burp to act as an intermediary between the client (web browser) and the server hosting the web application.

1. Set up Firefox for using Burp Suite:

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FLpsuSDE8Wpe9Yz8JX72b%2FUntitled.jpg?alt=media&#x26;token=8b4f9f8d-775c-47c1-a119-0bcb29830288" alt="Set up Firefox for using Burp Suite"><figcaption></figcaption></figure>

2. Access `https://burp` and download the `CA Certificate`:

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FaIfIiUUMI3Bvt52ESJEV%2FUntitled.png?alt=media&#x26;token=e87ff515-6555-44f6-baa8-396b9555eaa4" alt="Access https://burp and download the CA Certificate"><figcaption></figcaption></figure>

3. Import the `CA Certificate`:

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2FadSYsmcXSQkMNayfLfGk%2FUntitled.png?alt=media&#x26;token=446e5b80-b45b-45f5-87d9-60472caa6ec8" alt="Import the CA Certificate"><figcaption></figcaption></figure>

4. Access `T-Mobile.com` through Firefox:

<figure><img src="https://2377137241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyNXjlRfAJA38cZuMdmG3%2Fuploads%2F3TnHBYYt7bhROvVBScjk%2Fimage.png?alt=media&#x26;token=da962955-ce7b-4c81-ab26-330627d718e8" alt="Access T-Mobile.com through Firefox"><figcaption></figcaption></figure>

Here we can find very useful information.

## Google Fu

Google-Fu (uncountable) (informal) A skill in using search engines (especially Google) to quickly find useful information on the Internet.

[Google Search Operators (Dorks)](https://ahrefs.com/blog/google-advanced-search-operators) - The Complete List (44 Advanced Operators)

Example:

```
site:t-mobile.com -www filetype:pdf
```

* `site:t-mobile.com`: Restricts search to t-mobile.com and its subdomains
* `-www`: Excludes results from [www.t-mobile.com](http://www.t-mobile.com)
* `filetype:pdf`: Returns only PDF files

## Utilizing Social Media

Social media platforms like [LinkedIn](https://www.linkedin.com), [Twitter (X)](https://x.com), [Facebook](https://www.facebook.com), [Instagram](https://www.instagram.com), etc. are valuable resources for conducting Open-Source Intelligence (OSINT) gathering through publicly available information.

## Additional Learning, Open-Source Intelligence (OSINT)

On a separate page: [Open-Source Intelligence (OSINT)](https://blog.othmanemoutaouakkil.com/write-ups/tcm-security/open-source-intelligence-osint)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.othmanemoutaouakkil.com/write-ups/tcm-security/practical-ethical-hacking/information-gathering-reconnaissance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
