pentestfunctions / lazy-ctfs

A lot of lazy machines lately.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lazy-ctfs

A lot of lazy machines lately. This isn't for every box, this is just to rate how lazy the box is.

  • Make sure you have nuclei installed go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest

To check if a machine is lazy:

  1. Set your target

    export target=127.0.0.1
  2. Run nmap against 80/443 for quick DNS records. Add results to /etc/hosts

    nmap -sV -sC -p 80,443 $target | tee /tmp/nmap_output.txt; echo "Try adding these to your /etc/hosts file"; grep "DNS:" /tmp/nmap_output.txt | sed 's/.*DNS:\(.*\)/\1/' | tr ',' '\n' | sed 's/^[ \t]*//' | tee /tmp/dns_records.txt
  3. Add the original/initial target to the dns_records.txt

    echo $target >> /tmp/dns_records.txt
  4. Run nuclei against the target.

    ~/go/bin/nuclei -l /tmp/dns_records.txt -fhr -uc -headless -as -silent

Extra spicy

cd ~ 
wget https://github.com/projectdiscovery/nuclei-templates.git
~/go/bin/nuclei -l /tmp/dns_records.txt -fhr -uc -headless -t ~/nuclei-templates -silent

About

A lot of lazy machines lately.