## Course #337: Mastering Maltego$

### Section 1: Installation & Configuration of Maltego on Kali Linux

#### 1.1 Introduction to Maltego

Maltego is a powerful open-source intelligence (OSINT) and forensics application that provides a graphical interface for data mining and link analysis. It is widely used in penetration testing and cybersecurity to gather information about targets, analyze relationships between entities, and visualize data in a way that is easy to understand. In this section, we will guide you through the installation and configuration of Maltego on Kali Linux, followed by a step-by-step usage guide with real-world examples.

#### 1.2 Installation of Maltego

Maltego is included in the Kali Linux repositories, so the installation process is straightforward. Follow these steps to install Maltego on your Kali Linux system.

**Step 1: Update your system**

Before installing any new software, it is crucial to ensure that your system is up-to-date. Open a terminal and run:

"`bash
sudo apt update && sudo apt upgrade -y
"`

**Step 2: Install Maltego**

To install Maltego, use the following command:

"`bash
sudo apt install maltego
"`

**Step 3: Launch Maltego**

Once the installation is complete, you can launch Maltego from the terminal by typing:

"`bash
maltego
"`

Alternatively, you can find Maltego in the applications menu under the "Information Gathering" category.

#### 1.3 Configuration of Maltego

After launching Maltego for the first time, you will be prompted to create or sign in to a Maltego account. Follow these steps:

**Step 1: Create an Account**

1. Click on “Create a new account.”
2. Fill in the required details, such as your username, password, and email address.
3. Confirm your email address to activate your account.

**Step 2: Choose the Community Edition or Paid Version**

Maltego offers multiple versions, including a Community Edition that is free but limited in features, and more advanced paid versions. For learning purposes, the Community Edition is sufficient.

**Step 3: Update Transforms**

Once logged in, it is advisable to update your transforms to ensure that you are using the latest data sources available. You can do this by going to:

"`plaintext
Maltego Menu > Manage > Transform Hub
"`

Here, you can view available transforms and update them accordingly.

### Step-by-Step Usage of Maltego

In this section, we will cover the basic usage of Maltego and walk through some real-world use cases.

#### 2.1 Creating a New Graph

**Step 1: Start a New Graph**

Upon launching Maltego, click on "New Graph" to start your investigation. You will see a blank canvas where you will create your graph.

**Step 2: Add Entities to Your Graph**

Entities are the core components of a Maltego graph. They represent different data types such as people, companies, domains, IP addresses, etc. You can add entities from the palette on the left side.

For example, to search for information about a domain, drag the "Domain" entity onto the graph.

"`markdown
* Right-click on the "Domain" entity.
* Select “Add to Graph”.
* Enter the domain name (e.g., example.com).
"`

#### 2.2 Running Transforms

Transforms are the backbone of Maltego, allowing users to gather information about the entities added to the graph.

**Step 1: Run a Transform on the Domain**

1. Right-click on the domain entity you added.
2. Navigate to “Run Transform” and select a suitable transform, such as "To DNS Name."
3. Observe the results in the graph. New entities related to the domain may appear, such as IP addresses or subdomains.

**Step 2: Analyze Results**

As transforms run, various relationships will be established, providing crucial insights into the target. For example, by running the "To IP Address" transform, you can discover the IP address associated with the domain.

### Real-World Use Cases of Maltego

#### 3.1 Use Case 1: Domain Reconnaissance

One of the primary use cases of Maltego is domain reconnaissance. This allows pentesters to gather detailed information about the target's web presence.

**Step 1: Add the Target Domain**

Add the target domain to the graph, as described earlier.

**Step 2: Explore DNS Information**

Run transforms to gather:

– **Subdomains**
– **DNS records**
– **MX records** (Mail Exchange records)
– **WHOIS information**

This data can provide insights into the organization's infrastructure and potential attack vectors.

#### 3.2 Use Case 2: Social Media and OSINT

Maltego can also be used to gather intelligence from social media platforms and other public sources.

**Step 1: Identify a Target**

Add an entity representing a person. For example, you might use a “Person” entity to represent an employee from the target organization.

**Step 2: Search for Social Media Profiles**

Run the “To Social Media” transform. Maltego will search for public profiles associated with that person across various platforms.

**Step 3: Analyze Relationships**

As you gather social media profiles, you can analyze the connections between different individuals, building a network map of employees, their relationships, and the platforms they use.

### Detailed Technical Explanations

#### 4.1 Understanding Transforms

Transforms in Maltego are scripts that query specific data sources and return results. They are an essential part of the tool, allowing you to automate the information-gathering process. Transforms can be categorized based on their function, such as:

– **Information Gathering**: Collects data about domains, IPs, emails, etc.
– **Social Engineering**: Focuses on gathering information for social engineering attacks.
– **Infrastructure Mapping**: Maps out a target’s network and web presence.

#### 4.2 Custom Transforms

For advanced users, Maltego allows the creation of custom transforms using the Maltego Transform Template (MTT). This is particularly useful for integrating proprietary data sources into your Maltego graphs.

**Example of a Custom Transform Script (Python)**

"`python
import maltego

def custom_transform(entity):
# Logic to gather information
data = fetch_data(entity.value)
return data

# Register the transform
maltego.register(transform_name="Custom Transform", entity_type="Domain", function=custom_transform)
"`

### External Reference Links

– [Maltego Documentation](https://docs.paterva.com/en/docs/maltego/)
– [Kali Linux Official Website](https://www.kali.org/)
– [OWASP Open Source Intelligence](https://owasp.org/www-project-open-source-intelligence/)
– [Maltego and the Art of Information Gathering](https://www.owasp.org/index.php/Maltego)

### Conclusion

This section has introduced you to the powerful capabilities of Maltego, providing insights into installation, configuration, and practical usage in real-world scenarios. Maltego is an invaluable tool in the arsenal of any pentester and cybersecurity professional, facilitating efficient and effective reconnaissance.

In the subsequent sections, we will delve deeper into specific types of transformations, advanced analysis techniques, and integration with other tools.

Made by pablo rotem / פבלו רותם

Pablo Guides