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

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

1 week ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

2 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

3 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

3 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

3 weeks ago