Skip to content

Commit

Permalink
v2.0 : Complete rework
Browse files Browse the repository at this point in the history
- Easier to use / faster / slack alerting
  • Loading branch information
JoshuaMart committed Oct 8, 2019
1 parent 0222ccc commit e624532
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 217 deletions.
52 changes: 14 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,36 @@
![Banner](https://image.noelshack.com/fichiers/2019/03/5/1547806549-ti-banner.png)![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg) ![made-with-bash](https://img.shields.io/badge/Made%20with-Bash-1f425f.svg) ![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)

## Features
- Enum subdomains with [Amass](https://github.com/OWASP/Amass/), [Sublist3r](https://github.com/aboul3la/Sublist3r), [Subfinder](https://github.com/subfinder/subfinder), [Crtsh](http://crt.sh/) & [Certspotter](https://certspotter.com/)
- Enum subdomains with [Amass](https://github.com/OWASP/Amass/)
- Create permutations with [DnsGen](https://github.com/ProjectAnte/dnsgen)
- Combination of results, check with [MassDNS](https://github.com/blechschmidt/massdns)
- Check for TakeOver with [Subjack](https://github.com/haccer/subjack) & [TkoSubs](https://github.com/anshumanbh/tko-subs)
- Screenshot with [GoWitness](https://github.com/sensepost/gowitness)
- Check CORS with [CORStest](https://github.com/RUB-NDS/CORStest)
- Check open ports with [Masscan](https://github.com/robertdavidgraham/masscan)
- Creation of an archive and upload with unique link on [Transfer.sh](https://transfer.sh)
- Scan with [Aquatone](https://github.com/michenriksen/aquatone)
- New subdomains alerts with open ports

![Workflow](http://image.noelshack.com/fichiers/2019/34/1/1566214999-autoreconworkflow.png)
![Workflow](http://image.noelshack.com/fichiers/2019/41/2/1570532619-workflow.png)

## Installation
- Installation & Recon tested on Debian 10 / Kali 2019.2
- Installation & Recon tested on Debian 10

Requierement : [Golang](https://golang.org/doc/install)
```bash
git clone https://github.com/JoshuaMart/AutoRecon
cd AutoRecon
```
Edit the following variables on install.sh & create ToolsDir directories :
```bash
ToolsDIR="/root/Recon/Tools" #Directory where tools was installed
GoPath="/root/go" #Your Go Workspace
```
And the following variables on recon.sh :
```bash
ToolsDIR="/root/Recon/Tools" #Directory where tools was installed
ResultsPath="/root/Recon" #Directory where you want scans results
TransferSH="https://transfer.sh" #Change this if you have you own transfer.sh
subjackDebug="/root/go/src/github.com/haccer/subjack/fingerprints.json" #Subjack bug without this ...
```
Run installer :
```bash
./install.sh
source ~/.bashrc
```
Launch Subfinder once and fill in the configuration file :
```bash
/root/Recon/Tools/Subfinder
nano /root/.config/subfinder/config.json
```
Modify line 4 & 5 of ```recon.sh``` and add your result path & your slack webhook token

## Usage

```bash
./recon.sh -d domain.tld -a -m -s -u
./recon.sh -d domain.tld
```
![screen](http://image.noelshack.com/fichiers/2019/34/1/1566214999-autorecon.png)

Options :
```bash
-d | --domain (required) : Launch passive scan (Passive Amass, CRT.sh, Certspotter, Subfinder, Subjack, TkoSubs, CORStest)
-a | --active (optional) : Launch active scans (Active Amass, Sublist3r, GoWitness, CORStest)
-m | --masscan (optional) : Launch masscan (Can be very long & very aggressive ...)
-s | --screen (optional) : Take screenshots with GoWitness (can be very long)
-u | --upload (optional) : Upload archive on Transfer.sh
-d | --domain (required) : Launch passive scan (Amass & DnsGen)
-m | --monitor (optional) : Launch monitoring (Port scanning & Slack alerting)
```

**If your internet connection crash with Masscan options, change --rate options to 100 at line 125**
![RunningScript](http://image.noelshack.com/fichiers/2019/41/2/1570533971-runningscript.png)

![SlackAlert](http://image.noelshack.com/fichiers/2019/41/2/1570533971-slackalert.png)
90 changes: 33 additions & 57 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,61 +1,37 @@
#!/bin/bash

## VARIABLES
ToolsDIR="/root/Recon/Tools"
GoPath="/root/go"

## SCRIPTS DEPENDANCES
apt-get install git jq zip python3 python3-pip python3-dev unzip gcc -y
pip2 install jsbeautifier soupsieve
mkdir -p $ToolsDIR

## Install AMASS
wget https://github.com/OWASP/Amass/releases/download/3.0.27/amass_3.0.27_linux_amd64.zip
unzip amass_3.0.27_linux_amd64.zip -d $ToolsDIR/
rm amass_3.0.27_linux_amd64.zip
mv $ToolsDIR/amass_3.0.27_linux_amd64 $ToolsDIR/Amass

## Install MassDNS
git clone https://github.com/blechschmidt/massdns.git $ToolsDIR/MassDNS
mkdir -p $ToolsDIR/MassDNS/bin
cc -O3 -std=c11 -DHAVE_EPOLL -DHAVE_SYSINFO -Wall -fstack-protector-strong $ToolsDIR/MassDNS/main.c -o $ToolsDIR/MassDNS/bin/massdns

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

## Install GoWitness
apt-get install chromium -y
go get -v -u github.com/golang/dep/cmd/dep
wget https://github.com/sensepost/gowitness/releases/download/1.0.8/gowitness-linux-amd64
mv gowitness-linux-amd64 $ToolsDIR/GoWitness
chmod +x $ToolsDIR/GoWitness

## Install Subfinder
go get github.com/subfinder/subfinder
cp $GoPath/bin/subfinder $ToolsDIR/Subfinder

## Install Subjack
go get github.com/haccer/subjack
cp $GoPath/bin/subjack $ToolsDIR/Subjack

## Install TkoSubs
go get github.com/bgentry/heroku-go
go get github.com/gocarina/gocsv
go get github.com/google/go-github/github
go get github.com/olekukonko/tablewriter
go get golang.org/x/net/publicsuffix
go get golang.org/x/oauth2
go get github.com/miekg/dns

git clone https://github.com/anshumanbh/tko-subs.git $ToolsDIR/TkoSubs
go build $ToolsDIR/TkoSubs/tko-subs.go
mv tko-subs $ToolsDIR/TkoSubs/TkoSubs

## Install CORStest
git clone https://github.com/RUB-NDS/CORStest.git $ToolsDIR/CORStest

## Install MassCan
apt-get install masscan -y
#Update & Upgrade
apt-get update && upgrade -y

#Install requierements
apt-get install python3 python3-pip unzip libldns-dev git snapd -y

#Install Aquatone
wget https://github.com/michenriksen/aquatone/releases/download/v1.7.0/aquatone_linux_amd64_1.7.0.zip
unzip aquatone_linux_amd64_1.7.0.zip
rm aquatone_linux_amd64_1.7.0.zip README.md LICENSE.txt
mv aquatone /usr/local/bin/

#Install massdns
git clone https://github.com/blechschmidt/massdns.git
cd massdns
make
mv bin/massdns /usr/local/bin
cd ..
rm -r massdns

#Install Chromium for Aquatone
snap install chromium

#Install Amass for recon
snap install amass

#Install DnsGen
pip3 install dnsgen

#Add /snap/bin to $PATH
echo -e "export PATH=\"$PATH:/snap/bin\"" >> ~/.bashrc

## END

rm install.sh
Loading

0 comments on commit e624532

Please sign in to comment.