AnalyticsRelationships : Get Related Domains / Subdomains By Looking At Google Analytics IDs

AnalyticsRelationships is a tool to Get Related Domains / Subdomains By Looking At Google Analytics IDs.

██╗   ██╗ █████╗       ██╗██████╗                        
██║   ██║██╔══██╗      ██║██╔══██╗                       
██║   ██║███████║█████╗██║██║  ██║                       
██║   ██║██╔══██║╚════╝██║██║  ██║                       
╚██████╔╝██║  ██║      ██║██████╔╝                       
 ╚═════╝ ╚═╝  ╚═╝      ╚═╝╚═════╝                        
                                                         
██████╗  ██████╗ ███╗   ███╗ █████╗ ██╗███╗   ██╗███████╗
██╔══██╗██╔═══██╗████╗ ████║██╔══██╗██║████╗  ██║██╔════╝
██║  ██║██║   ██║██╔████╔██║███████║██║██╔██╗ ██║███████╗
██║  ██║██║   ██║██║╚██╔╝██║██╔══██║██║██║╚██╗██║╚════██║
██████╔╝╚██████╔╝██║ ╚═╝ ██║██║  ██║██║██║ ╚████║███████║
╚═════╝  ╚═════╝ ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝╚═╝  ╚═══╝╚══════╝

> Get related domains / subdomains by looking at Google Analytics IDs
> Python/GO versions
> By @JosueEncinar

This script try to get related domains / subdomains by looking at Google Analytics IDs from a URL. First search for ID of Google Analytics in the webpage and then request to builtwith and hackertarget with the ID.

Note: It does not work with all websites.It is searched by the following expressions:

-> “www.googletagmanager.com/ns.html\?id=[A-Z0-9-]+”
-> GTM-[A-Z0-9]+
-> “UA-\d+-\d+”

Available versions

Installation

Installation according to language.

Python

>git clone https://github.com/Josue87/AnalyticsRelationships.git
>cd AnalyticsRelationships/Python
>sudo pip3 install -r requirements.txt

GO

>git clone https://github.com/Josue87/AnalyticsRelationships.git
>cd AnalyticsRelationships/GO
>go build -ldflags “-s -w”

Docker

>git clone https://github.com/Josue87/AnalyticsRelationships.git
>cd AnalyticsRelationships
>docker build -t analyticsrelationships:latest .

Usage

Usage according to language

Python

>python3 analyticsrelationships.py -u https://www.example.com

Or redirect output to a file (banner or information messages are sent to the error output):

>python3 analyticsrelationships.py -u https://www.example.com > /tmp/example.txt

GO

>./analyticsrelationships –url https://www.example.com

Or redirect output to a file (banner or information messages are sent to the error output):

>./analyticsrelationships –url https://www.example.com > /tmp/example.txt

Docker

>docker run -it analyticsrelationships:latest https://www.example.com

Or redirect output to a file (banner or information messages are sent to the error output):

>docker run -it analyticsrelationships:latest https://www.example.com > /tmp/example.txt

Examples

Python

Output redirection to file /tmp/example.txt:

Without redirection

GO

Without redirection:

Working with file redirection works just like in Python.

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

10 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

11 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

2 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago