Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #443

Merged
merged 8 commits into from
Jan 4, 2022
Merged

Dev #443

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions Docker/01_nodoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
path-exclude /usr/share/doc/*
# we need to keep copyright files for legal reasons
path-include /usr/share/doc/*/copyright
path-exclude /usr/share/man/*
path-exclude /usr/share/groff/*
path-exclude /usr/share/info/*
# lintian stuff is small, but really unnecessary
path-exclude /usr/share/lintian/*
path-exclude /usr/share/linda/*
75 changes: 53 additions & 22 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# syntax=docker/dockerfile:1.3-labs

#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#

FROM kalilinux/kali-rolling:latest
## You can change these variables
ARG COLLAB_SERVER="XXXXXXXXXX"
ARG XSS_SERVER="XXXXXXXXXXX"
ARG SHODAN_API_KEY="XXXXXXXXXXXXXX"

## You can change this
ENV COLLAB_SERVER='XXXXXXXXXX'
ENV XSS_SERVER='XXXXXXXXXXX'
ENV SHODAN_API_KEY='XXXXXXXXXXXXXX'
ARG LANG=en_US.UTF-8
ARG LANGUAGE=en_US

## Do NOT change this
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true
ENV GOPATH=$HOME/go
ENV GOROOT=/usr/local/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH
##################################################
###> Do NOT change anything beyond this point <###
##################################################

FROM kalilinux/kali-rolling:latest AS base

LABEL org.label-schema.name='reconftw'
LABEL org.label-schema.description='A simple script for full recon'
Expand All @@ -23,35 +23,66 @@ LABEL org.label-schema.url='https://github.com/six2dez/reconftw'
LABEL org.label-schema.docker.cmd.devel='docker run --rm -ti six2dez/reconftw'
LABEL MAINTAINER="six2dez"

ARG COLLAB_SERVER
ARG XSS_SERVER
ARG SHODAN_API_KEY

ARG LANG
ARG LANGUAGE

ENV COLLAB_SERVER=$COLLAB_SERVER
ENV XSS_SERVER=$XSS_SERVER
ENV SHODAN_API_KEY=$SHODAN_API_KEY

ENV LANG=$LANG
ENV LANGUAGE=$LANGUAGE
ENV LC_ALL=$LANG

ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true

ENV GOPATH=$HOME/go
ENV GOROOT=/usr/local/go
ENV PATH=$GOPATH/bin:$GOROOT/bin:$PATH

COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/

RUN <<eot
#!/bin/bash
set -x
############> Update Sources <############
echo "deb http://kali.download/kali kali-rolling main contrib non-free" > /etc/apt/sources.list
echo "deb-src http://kali.download/kali kali-rolling main contrib non-free" >> /etc/apt/sources.list
############> System Update <############
############> System Configuration <############
apt clean all
apt update
apt full-upgrade -f -y --allow-downgrades
apt install -y git wget
############> Install Golang <############
GO_BIN=$(wget -qO- https://golang.org/dl/ | grep -oP 'go([0-9\.]+)\.linux-amd64\.tar\.gz' | head -n 1)
wget https://dl.google.com/go/${GO_BIN}
tar -xzf ${GO_BIN} -C /usr/local
ln -sf /usr/local/go/bin/go /usr/bin
apt install -y --no-install-recommends apt-utils ca-certificates git nano wget
############> Congifure Locales <############
apt install -y --no-install-recommends locales
sed -i -- "/${LANG}/s/^# //g" /etc/locale.gen
dpkg-reconfigure locales
update-locale LANG=${LANG}
############> Install reconFTW <############
mkdir -p /root/Tools
cd /root/Tools
git clone https://github.com/six2dez/reconftw.git
cd reconftw
./install.sh
############> Clean up <############
rm -f "/${GO_BIN}"
rm -rf "/root/go" "/root/.cache/go"
apt update
apt remove --purge -y build-essential
apt autoremove -y
apt install -y --no-install-recommends localepurge
sed -i -- '/^USE_DPKG/s/^/#/' /etc/locale.nopurge
dpkg-reconfigure localepurge
localepurge
apt clean all
find /var/cache -type f -delete
find /var/lib/apt/lists -type f -delete
find /var/log -type f -delete
rm -rf /root/.cache
rm -rf /root/go
eot

COPY amass_config.ini /root/.config/amass/config.ini
Expand All @@ -60,5 +91,5 @@ COPY notify.conf /root/.config/notify/notify.conf
COPY subfinder_config.yaml /root/.config/subfinder/config.yaml

WORKDIR /root/Tools/reconftw
ENTRYPOINT ["bash", "reconftw.sh"]
ENTRYPOINT [ "bash", "reconftw.sh" ]
CMD [ "--help" ]
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ docker buildx build -t reconftw Docker/.
# Running from reconftw root folder, configure values properly for your needs
docker run -v $PWD/reconftw.cfg:/root/Tools/reconftw/reconftw.cfg -v $PWD/Recon/:/root/Tools/reconftw/Recon/ --name reconftwSCAN --rm reconftw -d target.com -r
```

#### You can also choose to configure a locale at build time

```
docker buildx build --build-arg LANG=es_ES.UTF-8 --build-arg LANGUAGE=es_ES -t reconftw Docker/.
```

# ⚙️ Config file:
> A detailed explaintion of config file can be found here [Configuration file](https://github.com/six2dez/reconftw/wiki/3.-Configuration-file) :book:
Expand Down Expand Up @@ -562,4 +568,4 @@ If you want to contribute to this project you can do it in multiple ways:
# Disclaimer
Usage of this program for attacking targets without consent is illegal. It is the user's responsibility to obey all applicable laws. The developer assumes no liability and is not responsible for any misuse or damage caused by this program. Please use responsibly.

The material contained in this repository is licensed under GNU GPLv3.
The material contained in this repository is licensed under GNU GPLv3.
75 changes: 44 additions & 31 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,42 @@

. ./reconftw.cfg

dir=${tools}
double_check=false

# Raspberry Pi Detecting
if [ -s "/proc/cpuinfo" ]; then
if grep -q "Raspberry Pi 3" /proc/cpuinfo; then
IS_ARM="True"
RPI_3="True"
RPI_4="False"
elif grep -q "Raspberry Pi 4" /proc/cpuinfo; then
IS_ARM="True"
RPI_4="True"
RPI_3="False"
else
IS_ARM="False"
fi
else
IS_ARM="False"
fi
#Mac Osx Detecting
if [[ "$OSTYPE" == "darwin"* ]]; then
IS_MAC="True"
else
IS_MAC="False"
fi

# Check Bash version
BASH_VERSION=$(bash --version | awk 'NR==1{print $4}' | cut -d'.' -f1)
if [ ${BASH_VERSION} -lt 4 ]; then
printf "${bred} Your Bash version is lower than 4, please update${reset}\n"
if [ "True" = "$IS_MAC" ]; then
printf "${yellow} For MacOS run 'brew install bash' and rerun installer in a new terminal${reset}\n\n"
exit 1;
fi
fi

declare -A gotools
gotools["gf"]="go get -u -v github.com/tomnomnom/gf"
gotools["qsreplace"]="go get -u -v github.com/tomnomnom/qsreplace"
Expand Down Expand Up @@ -64,28 +100,6 @@ repos["cloud_enum"]="initstring/cloud_enum"
repos["ultimate-nmap-parser"]="shifty0g/ultimate-nmap-parser"
repos["pydictor"]="LandGrey/pydictor"

dir=${tools}
double_check=false

# Raspberry Pi Detecting
if grep -q "Raspberry Pi 3" /proc/cpuinfo; then
IS_ARM="True"
RPI_3="True"
RPI_4="False"
elif grep -q "Raspberry Pi 4" /proc/cpuinfo; then
IS_ARM="True"
RPI_4="True"
RPI_3="False"
else
IS_ARM="False"
fi
#Mac Osx Detecting
if [[ "$OSTYPE" == "darwin"* ]]; then
IS_MAC="True"
else
IS_MAC="False"
fi

printf "\n\n${bgreen}#######################################################################${reset}\n"
printf "${bgreen} reconFTW installer/updater script ${reset}\n\n"
printf "${yellow} This may take time. So, go grab a coffee! ${reset}\n\n"
Expand Down Expand Up @@ -116,11 +130,10 @@ install_brew(){
else
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
eval $SUDO brew update -$DEBUG_STD
eval $SUDO brew install chromium-browser $DEBUG_STD
eval $SUDO brew install chromium $DEBUG_STD
eval $SUDO brew install python3 python3-pip build-essential gcc cmake ruby git curl libpcap-dev wget zip python3-dev pv dnsutils libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev nmap jq apt-transport-https lynx tor medusa xvfb $DEBUG_STD
eval $SUDO brew services start tor $DEBUG_STD
eval brew update -$DEBUG_STD
eval brew install --cask chromium $DEBUG_STD
eval brew install bash python massdns jq gcc cmake ruby git curl libpcap-dev wget zip python3-dev pv dnsutils libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev nmap jq apt-transport-https lynx tor medusa xvfb libxml2-utils libdata-hexdump-perl $DEBUG_STD
eval brew services start tor $DEBUG_STD
}

install_yum(){
Expand Down Expand Up @@ -182,14 +195,14 @@ if [[ $(eval type go $DEBUG_ERROR | grep -o 'go is') == "go is" ]] && [ "$versio
eval wget https://dl.google.com/go/${version}.linux-arm64.tar.gz $DEBUG_STD
eval $SUDO tar -C /usr/local -xzf ${version}.linux-arm64.tar.gz $DEBUG_STD
fi
elif [ "True" = "$IS_MAC" ]; then
eval wget https://dl.google.com/go/${version}.darwin-amd64.tar.gz $DEBUG_STD
elif [ "True" = "$IS_MAC" ]; then
eval wget https://dl.google.com/go/${version}.darwin-amd64.tar.gz $DEBUG_STD
eval $SUDO tar -C /usr/local -xzf ${version}.darwin-amd64.tar.gz $DEBU
else
eval wget https://dl.google.com/go/${version}.linux-amd64.tar.gz $DEBUG_STD
eval $SUDO tar -C /usr/local -xzf ${version}.linux-amd64.tar.gz $DEBUG_STD
fi
eval $SUDO cp /usr/local/go/bin/go /usr/local/bin
eval $SUDO ln -sf /usr/local/go/bin/go /usr/local/bin/
rm -rf $version*
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
Expand Down Expand Up @@ -274,7 +287,7 @@ for repo in "${!repos[@]}"; do
eval $SUDO pip3 install -r requirements.txt $DEBUG_STD
eval $SUDO python3 setup.py install --record files.txt $DEBUG_STD
[ -s "files.txt" ] && eval xargs rm -rf < files.txt $DEBUG_STD
eval pip3 install . $DEBUG_STD
eval $SUDO pip3 install . $DEBUG_STD
fi
if [ "massdns" = "$repo" ]; then
eval make $DEBUG_STD && strip -s bin/massdns && eval $SUDO cp bin/massdns /usr/local/bin/ $DEBUG_ERROR
Expand Down