Mastering Information Disclosure: Automating Your Process, examples & scripts

WillFromSwiss
4 min readAug 7, 2024

In the world of cybersecurity, information disclosure is a crucial step in understanding potential vulnerabilities and attack surfaces. This article will guide you through automating this process, focusing on subdomain enumeration and content discovery. We’ll use two powerful tools: Sublist3r for subdomain enumeration and dirsearch for content discovery.

Prerequisites

Before we begin, ensure you’re running a Linux system. We’ll be using Ubuntu for this guide, but most commands should work on other distributions with minimal modifications.

Let’s start by installing the necessary dependencies:

sudo apt update
sudo apt install python3 python3-pip git

Now, let’s install the required tools:

# Install Sublist3r
git clone https://github.com/aboul3la/Sublist3r.git
cd Sublist3r
sudo pip3 install -r requirements.txt

# Install dirsearch
git clone https://github.com/maurosoria/dirsearch.git
cd dirsearch
sudo pip3 install -r requirements.txt

Script 1: Subdomain Enumeration with Sublist3r

Here’s a Python script that uses Sublist3r to retrieve a list of subdomains for a target domain:

import subprocess
import sys

def enumerate_subdomains(domain):
try:
result = subprocess.run(
["python3", "Sublist3r/sublist3r.py", "-d", domain…

--

--