Sunday, June 21, 2020

Recon for a security bug by automation - .bash_script - Automation tool


Run the command by automation –
Dirsearch(){
Python3 ~/tools/dirsearch/dirsearch.py -u $1 -t  $2 -e $3
}           #u =url, t= no. of , e- extension 

Bash Program – For automation:
è Nano auto.sh
for domain in ‘crtsh $1’; do
echo $domain | tee -a /Desktop/Recon/$1_22-6-2020.txt
curl -I -s $domain | tee /Path/Recon/curlout/$domain_22-6-2020.txt
done

Webfuzzing for critical file and directory   -à nano autoWebFuzz.sh

for domain in ‘crtsh $1’; do
echo $domain | tee -a /Desktop/Recon/$1_22-6-2020.txt
wfuzz -c -z file,/Path/Payloads/DirSrc_CritFile.txt --sc 200 http://$domain/FUZZ | tee /Desktop/Recon/WebFuzzFileDirout/$domain_22-6-2020.txt
done

certspotter(){
curl -s https://certspotter.com/api/v0/certs\?domain\=$1 | jq '.[].dns_names[]' | sed 's/\"//g' | sed 's/\*\.//g' | sort -u | grep $1
} #h/t Michiel Prins

crtsh(){
curl -s https://crt.sh/?Identity=%.$1 | grep ">*.$1" | sed 's/<[/]*[TB][DR]>/\n/g' | grep -vE "<|^[\*]*[\.]*$1" | sort -u | awk 'NF'
}

dirsearch(){ #runs dirsearch and takes host and extension as arguments
python3 /Path/tool/dirsearch/dirsearch.py -u $1 -e $2 -t 50 -b
}

certnmap(){
curl https://certspotter.com/api/v0/certs\?domain\=$1 | jq '.[].dns_names[]' | sed 's/\"//g' | sed 's/\*\.//g' | sort -u | grep $1  | nmap -T5 -Pn -sS -i - -$
}

ipinfo(){
curl http://ipinfo.io/$1
}

crtshdirsearch(){ #gets all domains from crtsh, runs httprobe and then dir bruteforcers
curl -s https://crt.sh/?q\=%.$1\&output\=json | jq -r '.[].name_value' | sed 's/\*\.//g' | sort -u | httprobe -c 50 | grep https | xargs -n1 -I{} dirsearch -u {} -e $2 -t 50 -b
}
s3ls(){
aws s3 ls s3://$1
}

s3cp(){
aws s3 cp $2 s3://$1
}

Make a permanent tool:

  sudo nano /bin/crtsh
  curl -s https://crt.sh/?Identity=%.$1 | grep ">*.$1" | sed 's/<[/]*[TB][DR]>/\n/g' | grep -vE "<|^[\*]*[\.]*$1" | sort -u | awk 'NF'

sudo chmod +x /bin/crtsh
nano .profile    -  remove crtsh from here
source .profile



Saturday, June 13, 2020

Clipboard Stopped working in Virtual Box Kali Linux: Display Screen Size in Virtual Box:

Clipboard Stopped working in Virtual Box Kali Linux:

The used to happen if guest ISO version is getting mismatch with respect to virtual box version or extension pack version. if you are trying to update and upgrade then this used to happen of version mismatch. 
Solution: Bring all three on same version. If updating virtual box with the latest version. Make sure update the extension pack on the same version. Next - update the guest addition ISO on the same version from Device Tab -> Insert Guest additions CD images(If it is already there then first login to  kali and removed cd image added as unmount) -> then install

Installation process - > chmod  +x VBoxLinuxAddition.run
and then -> sudo ./VBoxLinuxAdditions.run

and finally -> sudo reboot


This will solve the clipbord problem 
.

Guest addition ISO is also used for solving the screen size issue in virtual box. Without it, screen size is not working properly.