diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml new file mode 100644 index 0000000..3ab5688 --- /dev/null +++ b/.github/workflows/semgrep.yml @@ -0,0 +1,24 @@ +on: + workflow_dispatch: {} + pull_request: {} + push: + branches: + - main + - master + paths: + - .github/workflows/semgrep.yml + schedule: + # random HH:MM to avoid a load spike on GitHub Actions at 00:00 + - cron: 2 23 * * * +name: Semgrep +jobs: + semgrep: + name: semgrep/ci + runs-on: ubuntu-20.04 + env: + SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} + container: + image: returntocorp/semgrep + steps: + - uses: actions/checkout@v3 + - run: semgrep ci diff --git a/README.md b/README.md index dfa0f2b..6c71f24 100644 --- a/README.md +++ b/README.md @@ -48,13 +48,10 @@ Sn1per is a next-generation information gathering tool that provides automated, ### News +- #### [Sn1per Scan Engine v10.7 Released!](https://sn1persecurity.com/wordpress/sn1per-scan-engine-v10-7-released/) +- #### [Sn1per Enterprise v20240608 Released!](https://sn1persecurity.com/wordpress/sn1per-enterprise-v20240608-released/) +- #### [Sn1per Scan Engine v10.6 Released!](https://sn1persecurity.com/wordpress/sn1per-scan-engine-v10-6-released/) - #### [Sn1per Enterprise v20231025 Released!](https://sn1persecurity.com/wordpress/sn1per-enterprise-v20231025-released/) -- #### [Automated Penetration Testing Guide - Your Ultimate Resource](https://sn1persecurity.com/wordpress/penetration-testing-guide/) -- #### [Dark Web Monitoring: Securing Your External Attack Surface](https://sn1persecurity.com/wordpress/dark-web-monitoring-securing-your-external-attack-surface/) -- #### [Sn1per Scan Engine v10.4 Released!](https://sn1persecurity.com/wordpress/sn1per-scan-engine-v10-4-released/) -- #### [Sn1per: The Next Generation of Tools for Security Professionals](https://sn1persecurity.com/wordpress/sn1per-the-next-generation-of-tools-for-security-professionals/) -- #### [5 Ways Sn1per Can Automate Your Security Workflow](https://sn1persecurity.com/wordpress/5-ways-sn1per-can-automate-your-security-workflow/) -- #### [External Attack Surface Management with Sn1per](https://sn1persecurity.com/wordpress/external-attack-surface-management-with-sn1per/) - #### [Sn1per Enterprise Released!](https://sn1persecurity.com/wordpress/sn1per-enterprise-released/) - #### [Sn1per Professional v10.0 Released!](https://sn1persecurity.com/wordpress/sn1per-professional-v10-released/) @@ -219,7 +216,7 @@ sniper -u|--update - **DISCOVER:** Parses all hosts on a subnet/CIDR (ie. 192.168.0.0/16) and initiates a sniper scan against each host. Useful for internal network scans. - **PORT:** Scans a specific port for vulnerabilities. Reporting is not currently available in this mode. - **FULLPORTONLY:** Performs a full detailed port scan and saves results to XML. -- **MASSPORTSCAN:** Runs a "fullportonly" scan on mutiple targets specified via the "-f" switch. +- **MASSPORTSCAN:** Runs a "fullportonly" scan on multiple targets specified via the "-f" switch. - **WEB:** Adds full automatic web application scans to the results (port 80/tcp & 443/tcp only). Ideal for web applications but may increase scan time significantly. - **MASSWEB:** Runs "web" mode scans on multiple targets specified via the "-f" switch. - **WEBPORTHTTP:** Launches a full HTTP web application scan against a specific host and port. diff --git a/install.sh b/install.sh index f37a295..699e6d2 100755 --- a/install.sh +++ b/install.sh @@ -72,14 +72,17 @@ fi echo -e "$OKBLUE[*]$RESET Installing package dependencies...$RESET" apt update -apt install -y python3-paramiko apt install -y nfs-common apt install -y nodejs apt install -y wafw00f apt install -y xdg-utils apt install -y ruby apt install -y rubygems -apt install -y python +apt install -y python2 +apt install -y python3 +apt install -y python3-paramiko +apt purge -y python3-pip +apt install -y python3-pip apt install -y dos2unix apt install -y aha apt install -y libxml2-utils @@ -90,8 +93,8 @@ apt install -y whois apt install -y dnsrecon apt install -y curl apt install -y nmap -apt install -y php7.4 -apt install -y php7.4-curl +apt install -y php8.2 +apt install -y php8.2-curl apt install -y hydra apt install -y sqlmap apt install -y nbtscan @@ -104,9 +107,6 @@ apt install -y adb apt install -y xsltproc apt install -y ldapscripts apt install -y libssl-dev 2> /dev/null -apt install -y python-pip 2> /dev/null -apt purge -y python3-pip -apt install -y python3-pip apt install -y xmlstarlet apt install -y net-tools apt install -y p7zip-full @@ -119,8 +119,10 @@ apt install -y urlcrazy apt install -y iputils-ping apt install -y enum4linux apt install -y dnsutils +apt install -y wtmpdb echo -e "$OKBLUE[*]$RESET Installing Metasploit...$RESET" +rm -f /usr/share/keyrings/metasploit-framework.gpg 2> /dev/null curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > /tmp/msfinstall chmod 755 /tmp/msfinstall /tmp/msfinstall @@ -447,5 +449,8 @@ mkdir -p /usr/share/sniper/loot/workspaces/ 2> /dev/null ln -fs /usr/share/sniper/loot/workspaces/ /home/kali/Desktop/workspaces 2> /dev/null ln -fs /usr/share/sniper/loot/workspaces/ /root/Desktop/workspaces 2> /dev/null +echo -e "$OKBLUE[*]$RESET Cleaning up installation files... $RESET" +rm -Rf /tmp/arachni* /tmp/gobuster* /tmp/msfinstall /tmp/openssl.cnf 2> /dev/null + echo -e "$OKRED[>]$RESET Done! $RESET" echo -e "$OKRED[>]$RESET To run, type 'sniper'! $RESET" diff --git a/modes/stealth.sh b/modes/stealth.sh index f400f94..31665ae 100644 --- a/modes/stealth.sh +++ b/modes/stealth.sh @@ -229,7 +229,7 @@ if [[ "$MODE" = "stealth" ]]; then echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" echo -e "$OKRED FETCHING GUA URLS $RESET" echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" - gau -subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250 + gau --subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250 fi if [[ "$BLACKWIDOW" == "1" ]]; then echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" @@ -387,7 +387,7 @@ if [[ "$MODE" = "stealth" ]]; then echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" echo -e "$OKRED FETCHING GUA URLS $RESET" echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" - gau -subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250 + gau --subs $TARGET | tee $LOOT_DIR/web/gua-$TARGET.txt 2> /dev/null | head -n 250 fi if [[ "$BLACKWIDOW" == "1" ]]; then echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" @@ -528,4 +528,4 @@ if [[ "$MODE" = "stealth" ]]; then loot fi exit -fi \ No newline at end of file +fi diff --git a/modes/webscan.sh b/modes/webscan.sh index a69ae4d..7894a17 100644 --- a/modes/webscan.sh +++ b/modes/webscan.sh @@ -130,8 +130,8 @@ if [[ "$MODE" = "webscan" ]]; then echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" echo -e "$OKRED RUNNING NUCLEI SCAN $RESET" echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" - nuclei -silent -t /usr/share/sniper/plugins/nuclei-templates/ -c $THREADS -target http://$TARGET -o $LOOT_DIR/web/nuclei-http-${TARGET}-port80.txt - nuclei -silent -t /usr/share/sniper/plugins/nuclei-templates/ -c $THREADS -target https://$TARGET -o $LOOT_DIR/web/nuclei-https-${TARGET}-port443.txt + nuclei -silent -t /root/nuclei-templates/ -c $THREADS -target http://$TARGET -o $LOOT_DIR/web/nuclei-http-${TARGET}-port80.txt + nuclei -silent -t /root/nuclei-templates/ -c $THREADS -target https://$TARGET -o $LOOT_DIR/web/nuclei-https-${TARGET}-port443.txt fi if [[ "$SC0PE_VULNERABLITY_SCANNER" == "1" ]]; then echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" @@ -162,4 +162,4 @@ if [[ "$MODE" = "webscan" ]]; then fi loot exit -fi \ No newline at end of file +fi diff --git a/sniper b/sniper index 3633b31..603a71e 100755 --- a/sniper +++ b/sniper @@ -46,101 +46,105 @@ DISTRO=$(cat /etc/*-release | grep DISTRIB_ID= | cut -d'=' -f2) function help { logo - echo "" - echo -e "$OKBLUE[*]$RESET NORMAL MODE" - echo ' sniper -t ' - echo "" - echo -e "$OKBLUE[*]$RESET SPECIFY CUSTOM CONFIG FILE" - echo ' sniper -c /full/path/to/sniper.conf -t -m -w ' - echo "" - echo -e "$OKBLUE[*]$RESET NORMAL MODE + OSINT + RECON" - echo ' sniper -t -o -re' - echo "" - echo -e "$OKBLUE[*]$RESET STEALTH MODE + OSINT + RECON" - echo ' sniper -t -m stealth -o -re' - echo "" - echo -e "$OKBLUE[*]$RESET DISCOVER MODE" - echo ' sniper -t -m discover -w ' - echo "" - echo -e "$OKBLUE[*]$RESET SCAN ONLY SPECIFIC PORT" - echo ' sniper -t -m port -p ' - echo "" - echo -e "$OKBLUE[*]$RESET FULLPORTONLY SCAN MODE" - echo ' sniper -t -fp' - echo "" - echo -e "$OKBLUE[*]$RESET WEB MODE - PORT 80 + 443 ONLY!" - echo ' sniper -t -m web' - echo "" - echo -e "$OKBLUE[*]$RESET HTTP WEB PORT MODE" - echo ' sniper -t -m webporthttp -p ' - echo "" - echo -e "$OKBLUE[*]$RESET HTTPS WEB PORT MODE" - echo ' sniper -t -m webporthttps -p ' - echo "" - echo -e "$OKBLUE[*]$RESET HTTP WEBSCAN MODE" - echo ' sniper -t -m webscan ' - echo "" - echo -e "$OKBLUE[*]$RESET ENABLE BRUTEFORCE" - echo ' sniper -t -b' - echo "" - echo -e "$OKBLUE[*]$RESET AIRSTRIKE MODE" - echo ' sniper -f targets.txt -m airstrike' - echo "" - echo -e "$OKBLUE[*]$RESET NUKE MODE WITH TARGET LIST, BRUTEFORCE ENABLED, FULLPORTSCAN ENABLED, OSINT ENABLED, RECON ENABLED, WORKSPACE & LOOT ENABLED" - echo ' sniper -f targets.txt -m nuke -w ' - echo "" - echo -e "$OKBLUE[*]$RESET MASS PORT SCAN MODE" - echo ' sniper -f targets.txt -m massportscan -w ' - echo "" - echo -e "$OKBLUE[*]$RESET MASS WEB SCAN MODE" - echo ' sniper -f targets.txt -m massweb -w ' - echo "" - echo -e "$OKBLUE[*]$RESET MASS WEBSCAN SCAN MODE" - echo ' sniper -f targets.txt -m masswebscan -w ' - echo "" - echo -e "$OKBLUE[*]$RESET MASS VULN SCAN MODE" - echo ' sniper -f targets.txt -m massvulnscan -w ' - echo "" - echo -e "$OKBLUE[*]$RESET PORT SCAN MODE" - echo ' sniper -t -m port -p ' - echo "" - echo -e "$OKBLUE[*]$RESET LIST WORKSPACES" - echo ' sniper --list' - echo "" - echo -e "$OKBLUE[*]$RESET DELETE WORKSPACE" - echo ' sniper -w -d' - echo "" - echo -e "$OKBLUE[*]$RESET DELETE HOST FROM WORKSPACE" - echo ' sniper -w -t -dh' - echo "" - echo -e "$OKBLUE[*]$RESET DELETE TASKS FROM WORKSPACE" - echo ' sniper -w -t -dt' - echo "" - echo -e "$OKBLUE[*]$RESET GET SNIPER SCAN STATUS" - echo ' sniper --status' - echo "" - echo -e "$OKBLUE[*]$RESET LOOT REIMPORT FUNCTION" - echo ' sniper -w --reimport' - echo "" - echo -e "$OKBLUE[*]$RESET LOOT REIMPORTALL FUNCTION" - echo ' sniper -w --reimportall' - echo "" - echo -e "$OKBLUE[*]$RESET LOOT REIMPORT FUNCTION" - echo ' sniper -w --reload' - echo "" - echo -e "$OKBLUE[*]$RESET LOOT EXPORT FUNCTION" - echo ' sniper -w --export' - echo "" - echo -e "$OKBLUE[*]$RESET SCHEDULED SCANS" - echo ' sniper -w -s daily|weekly|monthly' - echo "" - echo -e "$OKBLUE[*]$RESET USE A CUSTOM CONFIG" - echo ' sniper -c /path/to/sniper.conf -t -w ' - echo "" - echo -e "$OKBLUE[*]$RESET UPDATE SNIPER" - echo ' sniper -u|--update' - echo "" - echo "" + local star + printf -v star "$OKBLUE[*]$RESET" + cat < + +$star SPECIFY CUSTOM CONFIG FILE + sniper -c /full/path/to/sniper.conf -t -m -w + +$star NORMAL MODE + OSINT + RECON + sniper -t -o -re + +$star STEALTH MODE + OSINT + RECON + sniper -t -m stealth -o -re + +$star DISCOVER MODE + sniper -t -m discover -w + +$star SCAN ONLY SPECIFIC PORT + sniper -t -m port -p + +$star FULLPORTONLY SCAN MODE + sniper -t -fp + +$star WEB MODE - PORT 80 + 443 ONLY! + sniper -t -m web + +$star HTTP WEB PORT MODE + sniper -t -m webporthttp -p + +$star HTTPS WEB PORT MODE + sniper -t -m webporthttps -p + +$star HTTP WEBSCAN MODE + sniper -t -m webscan + +$star ENABLE BRUTEFORCE + sniper -t -b + +$star AIRSTRIKE MODE + sniper -f targets.txt -m airstrike + +$star NUKE MODE WITH TARGET LIST, BRUTEFORCE ENABLED, FULLPORTSCAN ENABLED, OSINT ENABLED, RECON ENABLED, WORKSPACE & LOOT ENABLED + sniper -f targets.txt -m nuke -w + +$star MASS PORT SCAN MODE + sniper -f targets.txt -m massportscan -w + +$star MASS WEB SCAN MODE + sniper -f targets.txt -m massweb -w + +$star MASS WEBSCAN SCAN MODE + sniper -f targets.txt -m masswebscan -w + +$star MASS VULN SCAN MODE + sniper -f targets.txt -m massvulnscan -w + +$star PORT SCAN MODE + sniper -t -m port -p + +$star LIST WORKSPACES + sniper --list + +$star DELETE WORKSPACE + sniper -w -d + +$star DELETE HOST FROM WORKSPACE + sniper -w -t -dh + +$star DELETE TASKS FROM WORKSPACE + sniper -w -t -dt + +$star GET SNIPER SCAN STATUS + sniper --status + +$star LOOT REIMPORT FUNCTION + sniper -w --reimport + +$star LOOT REIMPORTALL FUNCTION + sniper -w --reimportall + +$star LOOT REIMPORT FUNCTION + sniper -w --reload + +$star LOOT EXPORT FUNCTION + sniper -w --export + +$star SCHEDULED SCANS + sniper -w -s daily|weekly|monthly + +$star USE A CUSTOM CONFIG + sniper -c /path/to/sniper.conf -t -w + +$star UPDATE SNIPER + sniper -u|--update + + +EOHELP exit } @@ -590,7 +594,7 @@ function loot { echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET" echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 💡 Don't miss out on important updates by using the Community version. $RESET" echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET" - echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🔝 The latest Professional version ( ${OKRED}10.5 ${RESET}) offers unparalleled features, including: $RESET" + echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🔝 The latest Professional version ( ${OKRED}10.7 ${RESET}) offers unparalleled features, including: $RESET" echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET $RESET" echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 💻 Sleek Web UI $RESET" echo -e "$OKBLUE[$RESET${OKRED}i${RESET}$OKBLUE]$RESET 🛠️ Extensive add-ons $RESET"