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

create extras.json and installing waymore #782

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
343 changes: 343 additions & 0 deletions images/provisioners/extras.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,343 @@
{
"builders": [],
"provisioners": [
{
"type": "file",
"source": "./configs",
"destination":"/tmp/configs"
},
{
"execute_command": "chmod +x {{ .Path }}; {{ .Vars }} sudo -E sh '{{ .Path }}'",
"inline": [
"echo 'Waiting for cloud-init to finish, this can take a few minutes please be patient...'",
"/usr/bin/cloud-init status --wait",

"fallocate -l 2G /swap && chmod 600 /swap && mkswap /swap && swapon /swap",
"echo '/swap none swap sw 0 0' | sudo tee -a /etc/fstab",

"echo 'Running dist-uprade'",
"sudo apt update -qq",
"DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confnew dist-upgrade -qq",

"echo 'Installing ufw fail2ban net-tools zsh jq build-essential python3-pip unzip git p7zip libpcap-dev rubygems ruby-dev grc'",
"sudo apt install fail2ban ufw net-tools zsh zsh-syntax-highlighting zsh-autosuggestions jq build-essential python3-pip unzip git p7zip libpcap-dev rubygems ruby-dev grc -y -qq",
"ufw allow 22",
"ufw allow 2266",
"ufw --force enable",

"echo 'Creating OP user'",
"useradd -G sudo -s /usr/bin/zsh -m op",
"mkdir -p /home/op/.ssh /home/op/c2 /home/op/recon/ /home/op/lists /home/op/go /home/op/bin /home/op/.config/ /home/op/.cache /home/op/work/ /home/op/.config/amass",
"rm -rf /etc/update-motd.d/*",
"/bin/su -l op -c 'wget -q https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O - | sh'",
"chown -R op:users /home/op",
"touch /home/op/.sudo_as_admin_successful",
"touch /home/op/.cache/motd.legal-displayed",
"chown -R op:users /home/op",
"echo 'op:{{ user `op_random_password` }}' | chpasswd",
"echo 'ubuntu:{{ user `op_random_password` }}' | chpasswd",
"echo 'root:{{ user `op_random_password` }}' | chpasswd",

"echo 'Moving Config files'",
"mv /tmp/configs/sudoers /etc/sudoers",
"pkexec chown root:root /etc/sudoers /etc/sudoers.d -R",
"mv /tmp/configs/bashrc /home/op/.bashrc",
"mv /tmp/configs/zshrc /home/op/.zshrc",
"mv /tmp/configs/sshd_config /etc/ssh/sshd_config",
"mv /tmp/configs/00-header /etc/update-motd.d/00-header",
"mv /tmp/configs/authorized_keys /home/op/.ssh/authorized_keys",
"mv /tmp/configs/config.ini /home/op/.config/amass/config.ini",
"mv /tmp/configs/tmux-splash.sh /home/op/bin/tmux-splash.sh",
"/bin/su -l op -c 'sudo chmod 600 /home/op/.ssh/authorized_keys'",
"chown -R op:users /home/op",
"sudo service sshd restart",
"chmod +x /etc/update-motd.d/00-header",

"echo 'Installing Golang 1.20.4'",
"wget -q https://golang.org/dl/go1.20.4.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz && rm go1.20.4.linux-amd64.tar.gz",
"export GOPATH=/home/op/go",

"echo 'Installing Docker'",
"curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh && rm get-docker.sh",
"sudo usermod -aG docker op",

"echo 'Installing Interlace'",
"git clone https://github.com/codingo/Interlace.git /home/op/recon/interlace && cd /home/op/recon/interlace/ && python3 setup.py install",

"echo 'Optimizing SSH Connections'",
"/bin/su -l root -c 'echo \"ClientAliveInterval 60\" | sudo tee -a /etc/ssh/sshd_config'",
"/bin/su -l root -c 'echo \"ClientAliveCountMax 60\" | sudo tee -a /etc/ssh/sshd_config'",
"/bin/su -l root -c 'echo \"MaxSessions 100\" | sudo tee -a /etc/ssh/sshd_config'",
"/bin/su -l root -c 'echo \"net.ipv4.netfilter.ip_conntrack_max = 1048576\" | sudo tee -a /etc/sysctl.conf'",
"/bin/su -l root -c 'echo \"net.nf_conntrack_max = 1048576\" | sudo tee -a /etc/sysctl.conf'",
"/bin/su -l root -c 'echo \"net.core.somaxconn = 1048576\" | sudo tee -a /etc/sysctl.conf'",
"/bin/su -l root -c 'echo \"net.ipv4.ip_local_port_range = 1024 65535\" | sudo tee -a /etc/sysctl.conf'",
"/bin/su -l root -c 'echo \"1024 65535\" | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range'",

"echo 'Downloading Wordlists'",

"echo 'Downloading cent'",
"git clone https://github.com/xm1k3/cent.git /home/op/lists/cent",

"echo 'Downloading leaky-paths'",
"git clone https://github.com/ayoubfathi/leaky-paths.git /home/op/lists/leaky-paths",

"echo 'Downloading axiom-dockerfiles'",
"git clone https://github.com/0xtavian/minimal-pentesting-dockerfiles.git /home/op/lists/axiom-dockerfiles",

"echo 'Downloading permutations'",
"wget -q -O /home/op/lists/permutations.txt https://gist.github.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw",

"echo 'Downloading resolvers'",
"wget -q -O /home/op/lists/resolvers.txt https://raw.githubusercontent.com/trickest/resolvers/main/resolvers.txt",

"echo 'Downloading SecLists'",
"git clone https://github.com/danielmiessler/SecLists.git /home/op/lists/seclists",

"echo 'Installing Tools'",

"echo 'Installing anew'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/anew@latest'",

"echo 'Installing assetfinder'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/assetfinder/Dockerfile -t axiom/assetfinder'",

"echo 'Installing Amass'",
"wget -q -O /tmp/amass.zip https://github.com/OWASP/Amass/releases/download/v3.21.2/amass_linux_amd64.zip && cd /tmp/ && unzip /tmp/amass.zip && mv /tmp/amass_linux_amd64/amass /usr/bin/amass",

"echo 'Installing aquatone'",
"wget -q -O /tmp/aquatone.zip https://github.com/michenriksen/aquatone/releases/download/v1.7.0/aquatone_linux_amd64_1.7.0.zip && cd /tmp/ && unzip /tmp/aquatone.zip && mv /tmp/aquatone /usr/bin/aquatone",

"echo 'Installing Arjun'",
"cd /tmp && git clone https://github.com/s0md3v/Arjun && cd Arjun && sudo python3 setup.py install && cd",

"echo 'Installing axiom'",
"/bin/su -l op -c 'git clone https://github.com/pry0cc/axiom.git /home/op/.axiom && cd /home/op/.axiom/interact && ./axiom-configure --shell zsh --unattended'",

"echo 'Installing cero'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/cero/Dockerfile -t axiom/cero'",

"echo 'Installing chaos-client'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/chaos-client/cmd/chaos@latest'",

"echo 'Installing commix'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/commix/Dockerfile -t axiom/commix'",

"echo 'Installing concurl'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/hacks/concurl@latest'",

"echo 'Installing Corsy'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/corsy/Dockerfile -t axiom/corsy'",

"echo 'Installing crlfuzz'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/dwisiswant0/crlfuzz/cmd/crlfuzz@latest'",

"echo 'Installing dalfox'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/hahwul/dalfox/v2@latest'",

"echo 'Installing dirdar'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/m4dm0e/dirdar@latest'",

"echo 'Installing DNSCewl'",
"wget -q -O /tmp/DNSCewl https://github.com/codingo/DNSCewl/raw/master/DNScewl && mv /tmp/DNSCewl /usr/bin/DNSCewl && chmod +x /usr/bin/DNSCewl",

"echo 'Installing dnsgen'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/dnsgen/Dockerfile -t axiom/dnsgen'",

"echo 'Installing dnsrecon'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/dnsrecon/Dockerfile -t axiom/dnsrecon'",

"echo 'Installing dnsvalidator'",
"git clone https://github.com/vortexau/dnsvalidator.git /home/op/recon/dnsvalidator && cd /home/op/recon/dnsvalidator/ && sudo python3 setup.py install",

"echo 'Installing dnsx'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/dnsx/cmd/dnsx@latest'",

"echo 'Installing ERLPopper'",
"git clone https://github.com/maikthulhu/ERLPopper.git /home/op/recon/ERLPopper",

"echo 'Installing exclude-cdn'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/Cgboal/exclude-cdn@latest'",

"echo 'Installing feroxbuster'",
"/bin/su -l root -c 'curl -sL https://raw.githubusercontent.com/epi052/feroxbuster/master/install-nix.sh | bash && mv feroxbuster /usr/bin/'",

"echo 'Installing fff'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/fff@latest'",

"echo 'Installing ffuf'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/ffuf/ffuf@latest'",

"echo 'Installing findomain-linux'",
"wget -q -O /tmp/findomain.zip https://github.com/Edu4rdSHL/findomain/releases/latest/download/findomain-linux.zip && unzip /tmp/findomain.zip -d /usr/bin/ && chmod +x /usr/bin/findomain && rm /tmp/findomain.zip",

"echo 'Installing gau'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/lc/gau/v2/cmd/gau@latest'",

"echo 'Installing gauplus'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install -v github.com/bp0lr/gauplus@latest'",

"echo 'Installing gf'",
"/bin/su -l op -c 'GO111MODULE=off /usr/local/go/bin/go install github.com/tomnomnom/gf@latest'",

"echo 'Installing Gf-Patterns'",
"git clone https://github.com/1ndianl33t/Gf-Patterns /home/op/.gf",

"echo 'Installing github-subdomains'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/gwen001/github-subdomains@latest'",

"echo 'Installing github-endpoints'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/gwen001/github-endpoints@latest'",

"echo 'Installing gobuster'",
"cd /tmp && wget -q -O /tmp/gobuster.7z https://github.com/OJ/gobuster/releases/download/v3.1.0/gobuster-linux-amd64.7z && p7zip -d /tmp/gobuster.7z && sudo mv /tmp/gobuster-linux-amd64/gobuster /usr/bin/gobuster && sudo chmod +x /usr/bin/gobuster",

"echo 'Installing google-chrome'",
"wget -q -O /tmp/chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && cd /tmp/ && sudo apt install -y /tmp/chrome.deb -qq && apt --fix-broken install -qq",

"echo 'Installing gorgo'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/gorgo/Dockerfile -t axiom/gorgo'",

"echo 'Installing gospider'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/jaeles-project/gospider@latest'",

"echo 'Installing gowitness'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/sensepost/gowitness@latest'",

"echo 'Installing gron'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/gron@latest'",

"echo 'Installing Gxss'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/KathanP19/Gxss@latest'",

"echo 'Installing hakrawler'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/hakluke/hakrawler@latest'",

"echo 'Installing hakrevdns'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/hakluke/hakrevdns@latest'",

"echo 'Installing httprobe'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/httprobe@latest'",

"echo 'Installing httpx'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/httpx/cmd/httpx@latest'",

"echo 'Installing interactsh-client'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/interactsh/cmd/interactsh-client@latest'",

"echo 'Installing ipcdn'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/ipcdn/Dockerfile -t axiom/ipcdn'",

"echo 'Installing jaeles'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/jaeles-project/jaeles@latest'",

"echo 'Installing katana'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/projectdiscovery/katana/cmd/katana@latest'",

"echo 'Installing kiterunner'",
"/bin/su -l root -c 'wget -q https://github.com/assetnote/kiterunner/releases/download/v1.0.2/kiterunner_1.0.2_linux_amd64.tar.gz ; tar -zxvf kiterunner_1.0.2_linux_amd64.tar.gz ; rm kiterunner_1.0.2_linux_amd64.tar.gz ; mv kr /usr/bin/'",

"echo 'Installing kxss'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/hacks/kxss@latest'",

"echo 'Installing LinkFinder'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/linkfinder/Dockerfile -t axiom/linkfinder'",

"echo 'Installing masscan'",
"apt install masscan -y -qq",

"echo 'Installing massdns'",
"git clone https://github.com/blechschmidt/massdns.git /tmp/massdns; cd /tmp/massdns; make -s; sudo mv bin/massdns /usr/bin/massdns",

"echo 'Installing meg'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/meg@latest'",

"echo 'Installing naabu'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/naabu/v2/cmd/naabu@latest'",

"echo 'Installing nmap'",
"sudo apt-get -qy --no-install-recommends install build-essential libssl-dev flex bison",
"/bin/su -l op -c 'wget https://nmap.org/dist/nmap-7.92.tgz -O /home/op/recon/nmap.tar.gz && cd /home/op/recon/ && tar zxf nmap.tar.gz --transform s/nmap-7.92/nmap/ && rm nmap.tar.gz && cd /home/op/recon/nmap/ && sudo ./configure --without-ndiff --without-zenmap --without-nping --without-ncat --without-nmap-update --with-libpcap=included && sudo make && sudo make install'",

"echo 'Installing nuclei'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest && /home/op/go/bin/nuclei'",

"echo 'Installing OpenRedireX'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/openredirex/Dockerfile -t axiom/openredirex'",

"echo 'Installing ParamSpider'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/paramspider/Dockerfile -t axiom/paramspider'",

"echo 'Installing puredns'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/d3mondev/puredns/v2@latest'",

"echo 'Installing qsreplace'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/qsreplace@latest'",

"echo 'Installing RustScan'",
"wget -q -O /tmp/rustscan.deb https://github.com/brandonskerritt/RustScan/releases/download/2.0.1/rustscan_2.0.1_amd64.deb && apt install /tmp/rustscan.deb -y -qq",

"echo 'Installing s3scanner'",
"/bin/su -l op -c 'pip3 install s3scanner'",

"echo 'Installing scrying'",
"wget -q -O /tmp/scrying.deb https://github.com/nccgroup/scrying/releases/download/v0.9.0-alpha.2/scrying_0.9.0-alpha.2_amd64.deb && apt install /tmp/scrying.deb -y -qq && apt install xvfb -y -qq",

"echo 'Installing shuffledns'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/shuffledns/cmd/shuffledns@latest'",

"echo 'Installing sqlmap'",
"git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git /home/op/recon/sqlmap-dev",

"echo 'Installing subjack'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/haccer/subjack@latest'",

"echo 'Installing subfinder'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest'",

"echo 'Installing subjs'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install -v github.com/lc/subjs@latest'",

"echo 'Installing testssl'",
"git clone --depth 1 https://github.com/drwetter/testssl.sh.git /home/op/recon/testssl.sh",

"echo 'Installing tlsx'",
"/bin/su -l op -c 'GO111MODULE=on /usr/local/go/bin/go install github.com/projectdiscovery/tlsx/cmd/tlsx@latest'",

"echo 'Installing trufflehog'",
"/bin/su -l op -c 'docker image build - < /home/op/lists/axiom-dockerfiles/trufflehog/Dockerfile -t axiom/trufflehog'",

"echo 'Installing unimap'",
"wget -q -O /tmp/unimap https://github.com/Edu4rdSHL/unimap/releases/download/0.5.1/unimap-linux && mv /tmp/unimap /usr/bin/unimap && chmod +x /usr/bin/unimap",

"echo 'Installing wafw00f'",
"cd /tmp && git clone https://github.com/EnableSecurity/wafw00f && cd wafw00f && sudo python3 setup.py install",

"echo 'Installing waybackurls'",
"/bin/su -l op -c '/usr/local/go/bin/go install github.com/tomnomnom/waybackurls@latest'",

"echo 'Installing waymore'",
"git clone https://github.com/xnl-h4ck3r/waymore.git /home/op/recon/ && cd /home/op/recon/waymore && sudo python3 setup.py install && sudo pip3 install -r requirements.txt",

"echo 'Installing webscreenshot'",
"/bin/su -l op -c 'pip3 install webscreenshot'",

"echo 'Installing wpscan'",
"gem install wpscan",

"echo 'Removing unneeded Docker images'",
"/bin/su -l op -c 'docker image prune -f'",

"/bin/su -l op -c '/usr/local/go/bin/go clean -modcache'",
"/bin/su -l op -c 'wget -q -O gf-completion.zsh https://raw.githubusercontent.com/tomnomnom/gf/master/gf-completion.zsh && cat gf-completion.zsh >> /home/op/.zshrc && rm gf-completion.zsh && cd'",
"/bin/su -l root -c 'apt-get clean'",
"echo \"The password for user op is: {{ user `op_random_password` }}\"",
"echo \"CgpDb25ncmF0dWxhdGlvbnMsIHlvdXIgYnVpbGQgaXMgYWxtb3N0IGRvbmUhCgogICAgICAgICAgICAgYXhpb20gaXMgc3BvbnNvcmVkIGJ5Li4uCl9fX18gICAgICAgICAgICAgICAgICAgICAgIF8gXyAgICAgICAgX19fX18uICAgICAgICAgXyBfCi8gX19ffCAgX19fICBfX18gXyAgIF8gXyBfXyhfKSB8XyBfICAgfF8gICBffCBfXyBfXyBfKF8pIHxfX18KXF9fXyBcIC8gXyBcLyBfX3wgfCB8IHwgJ19ffCB8IF9ffCB8IHwgfHwgfHwgJ19fLyBfYCB8IHwgLyBfX3wKIF9fXykgfCAgX18vIChfX3wgfF98IHwgfCAgfCB8IHxffCB8X3wgfHwgfHwgfCB8IChffCB8IHwgXF9fIFwKfF9fX18vIFxfX198XF9fX3xcX18sX3xffCAgfF98XF9ffFxfXywgfHxffHxffCAgXF9fLF98X3xffF9fXy8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHxfX18vCgpSZWFkIHRoZXNlIHdoaWxlIHlvdSdyZSB3YWl0aW5nIHRvIGdldCBzdGFydGVkIDopCgogICAgLSBRdWlja3N0YXJ0IEd1aWRlOiBodHRwczovL2dpdGh1Yi5jb20vcHJ5MGNjL2F4aW9tL3dpa2kvQS1RdWlja3N0YXJ0LUd1aWRlCiAgICAtIEZpbGVzeXN0ZW0gVXRpbGl0aWVzOiBodHRwczovL2dpdGh1Yi5jb20vcHJ5MGNjL2F4aW9tL3dpa2kvRmlsZXN5c3RlbS1VdGlsaXRpZXMKICAgIC0gRmxlZXRzOiBodHRwczovL2dpdGh1Yi5jb20vcHJ5MGNjL2F4aW9tL3dpa2kvRmxlZXRzICAgICAKICAgIC0gU2NhbnM6IGh0dHBzOi8vZ2l0aHViLmNvbS9wcnkwY2MvYXhpb20vd2lraS9TY2FucwoKCg==\" | base64 -d",
"touch /home/op/.z",
"chown -R op:users /home/op",
"chown root:root /etc/sudoers /etc/sudoers.d -R"
], "inline_shebang": "/bin/sh -x",
"type": "shell"
}
]
}