GoBuster Agent Setup for Directory Discovery

GoBusterDir Command

Using {{domain}} ReconNess replace {{domain}} for the subdomain.

If we have the wordlist in ~/Desktop/tools/wordlist/directories.txt

gobuster dir -u https://{{domain}} -w ~/Desktop/tools/wordlist/directories.txt go run main.go dir -u https://{{domain}} -w ~/Desktop/tools/wordlist/directories.txt -z -k -l -r --wildcard

Click here to know more about GoBuster

GoBusterDir Script

using ReconNess.Core.Models;
if (lineInputCount < 15)
return new ScriptOutput();
var match = System.Text.RegularExpressions.Regex.Match(lineInput, @"(.*?)\(Status: (.*?)\) \[Size: (.*?)\]");
if (match.Success && match.Groups.Count == 4)
return new ScriptOutput
HttpDirectory = match.Groups[1].Value,
HttpDirectoryMethod = "GET",
HttpDirectoryStatusCode = match.Groups[2].Value,
HttpDirectorySize = match.Groups[3].Value,
return new ScriptOutput();

Check the Readme on GitHub to know more about the Script.

GobusterDir Dockerfile Entry

# -------- Agents dependencies --------
# To allow run gobuster inside the docker
RUN apt-get update && apt-get install -y git wget
RUN wget https://golang.org/dl/go1.16.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go1.16.linux-amd64.tar.gz
RUN export GOPATH=$HOME/go
RUN export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
RUN /usr/local/go/bin/go get github.com/OJ/gobuster
# -------- End Agents dependencies --------

GoBusterDir Command for Docker

/root/go/bin/gobuster dir -u https://{{domain}} -w /app/Content/wordlists/dir_enum/default.txt -z -k -l -r --wildcard