Merge branch '1N3:master' into master

This commit is contained in:
Md Ali 2025-01-07 11:18:09 -06:00 committed by GitHub
commit fbe5c7036e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 146 additions and 116 deletions

24
.github/workflows/semgrep.yml vendored Normal file
View File

@ -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

View File

@ -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.

View File

@ -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"

View File

@ -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
fi

View File

@ -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
fi

196
sniper
View File

@ -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 <TARGET>'
echo ""
echo -e "$OKBLUE[*]$RESET SPECIFY CUSTOM CONFIG FILE"
echo ' sniper -c /full/path/to/sniper.conf -t <TARGET> -m <MODE> -w <WORKSPACE>'
echo ""
echo -e "$OKBLUE[*]$RESET NORMAL MODE + OSINT + RECON"
echo ' sniper -t <TARGET> -o -re'
echo ""
echo -e "$OKBLUE[*]$RESET STEALTH MODE + OSINT + RECON"
echo ' sniper -t <TARGET> -m stealth -o -re'
echo ""
echo -e "$OKBLUE[*]$RESET DISCOVER MODE"
echo ' sniper -t <CIDR> -m discover -w <WORSPACE_ALIAS>'
echo ""
echo -e "$OKBLUE[*]$RESET SCAN ONLY SPECIFIC PORT"
echo ' sniper -t <TARGET> -m port -p <portnum>'
echo ""
echo -e "$OKBLUE[*]$RESET FULLPORTONLY SCAN MODE"
echo ' sniper -t <TARGET> -fp'
echo ""
echo -e "$OKBLUE[*]$RESET WEB MODE - PORT 80 + 443 ONLY!"
echo ' sniper -t <TARGET> -m web'
echo ""
echo -e "$OKBLUE[*]$RESET HTTP WEB PORT MODE"
echo ' sniper -t <TARGET> -m webporthttp -p <port>'
echo ""
echo -e "$OKBLUE[*]$RESET HTTPS WEB PORT MODE"
echo ' sniper -t <TARGET> -m webporthttps -p <port>'
echo ""
echo -e "$OKBLUE[*]$RESET HTTP WEBSCAN MODE"
echo ' sniper -t <TARGET> -m webscan '
echo ""
echo -e "$OKBLUE[*]$RESET ENABLE BRUTEFORCE"
echo ' sniper -t <TARGET> -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 <WORKSPACE_ALIAS>'
echo ""
echo -e "$OKBLUE[*]$RESET MASS PORT SCAN MODE"
echo ' sniper -f targets.txt -m massportscan -w <WORKSPACE_ALIAS>'
echo ""
echo -e "$OKBLUE[*]$RESET MASS WEB SCAN MODE"
echo ' sniper -f targets.txt -m massweb -w <WORKSPACE_ALIAS>'
echo ""
echo -e "$OKBLUE[*]$RESET MASS WEBSCAN SCAN MODE"
echo ' sniper -f targets.txt -m masswebscan -w <WORKSPACE_ALIAS>'
echo ""
echo -e "$OKBLUE[*]$RESET MASS VULN SCAN MODE"
echo ' sniper -f targets.txt -m massvulnscan -w <WORKSPACE_ALIAS>'
echo ""
echo -e "$OKBLUE[*]$RESET PORT SCAN MODE"
echo ' sniper -t <TARGET> -m port -p <PORT_NUM>'
echo ""
echo -e "$OKBLUE[*]$RESET LIST WORKSPACES"
echo ' sniper --list'
echo ""
echo -e "$OKBLUE[*]$RESET DELETE WORKSPACE"
echo ' sniper -w <WORKSPACE_ALIAS> -d'
echo ""
echo -e "$OKBLUE[*]$RESET DELETE HOST FROM WORKSPACE"
echo ' sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dh'
echo ""
echo -e "$OKBLUE[*]$RESET DELETE TASKS FROM WORKSPACE"
echo ' sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dt'
echo ""
echo -e "$OKBLUE[*]$RESET GET SNIPER SCAN STATUS"
echo ' sniper --status'
echo ""
echo -e "$OKBLUE[*]$RESET LOOT REIMPORT FUNCTION"
echo ' sniper -w <WORKSPACE_ALIAS> --reimport'
echo ""
echo -e "$OKBLUE[*]$RESET LOOT REIMPORTALL FUNCTION"
echo ' sniper -w <WORKSPACE_ALIAS> --reimportall'
echo ""
echo -e "$OKBLUE[*]$RESET LOOT REIMPORT FUNCTION"
echo ' sniper -w <WORKSPACE_ALIAS> --reload'
echo ""
echo -e "$OKBLUE[*]$RESET LOOT EXPORT FUNCTION"
echo ' sniper -w <WORKSPACE_ALIAS> --export'
echo ""
echo -e "$OKBLUE[*]$RESET SCHEDULED SCANS"
echo ' sniper -w <WORKSPACE_ALIAS> -s daily|weekly|monthly'
echo ""
echo -e "$OKBLUE[*]$RESET USE A CUSTOM CONFIG"
echo ' sniper -c /path/to/sniper.conf -t <TARGET> -w <WORKSPACE_ALIAS>'
echo ""
echo -e "$OKBLUE[*]$RESET UPDATE SNIPER"
echo ' sniper -u|--update'
echo ""
echo ""
local star
printf -v star "$OKBLUE[*]$RESET"
cat <<EOHELP
$star NORMAL MODE
sniper -t <TARGET>
$star SPECIFY CUSTOM CONFIG FILE
sniper -c /full/path/to/sniper.conf -t <TARGET> -m <MODE> -w <WORKSPACE>
$star NORMAL MODE + OSINT + RECON
sniper -t <TARGET> -o -re
$star STEALTH MODE + OSINT + RECON
sniper -t <TARGET> -m stealth -o -re
$star DISCOVER MODE
sniper -t <CIDR> -m discover -w <WORSPACE_ALIAS>
$star SCAN ONLY SPECIFIC PORT
sniper -t <TARGET> -m port -p <portnum>
$star FULLPORTONLY SCAN MODE
sniper -t <TARGET> -fp
$star WEB MODE - PORT 80 + 443 ONLY!
sniper -t <TARGET> -m web
$star HTTP WEB PORT MODE
sniper -t <TARGET> -m webporthttp -p <port>
$star HTTPS WEB PORT MODE
sniper -t <TARGET> -m webporthttps -p <port>
$star HTTP WEBSCAN MODE
sniper -t <TARGET> -m webscan
$star ENABLE BRUTEFORCE
sniper -t <TARGET> -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 <WORKSPACE_ALIAS>
$star MASS PORT SCAN MODE
sniper -f targets.txt -m massportscan -w <WORKSPACE_ALIAS>
$star MASS WEB SCAN MODE
sniper -f targets.txt -m massweb -w <WORKSPACE_ALIAS>
$star MASS WEBSCAN SCAN MODE
sniper -f targets.txt -m masswebscan -w <WORKSPACE_ALIAS>
$star MASS VULN SCAN MODE
sniper -f targets.txt -m massvulnscan -w <WORKSPACE_ALIAS>
$star PORT SCAN MODE
sniper -t <TARGET> -m port -p <PORT_NUM>
$star LIST WORKSPACES
sniper --list
$star DELETE WORKSPACE
sniper -w <WORKSPACE_ALIAS> -d
$star DELETE HOST FROM WORKSPACE
sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dh
$star DELETE TASKS FROM WORKSPACE
sniper -w <WORKSPACE_ALIAS> -t <TARGET> -dt
$star GET SNIPER SCAN STATUS
sniper --status
$star LOOT REIMPORT FUNCTION
sniper -w <WORKSPACE_ALIAS> --reimport
$star LOOT REIMPORTALL FUNCTION
sniper -w <WORKSPACE_ALIAS> --reimportall
$star LOOT REIMPORT FUNCTION
sniper -w <WORKSPACE_ALIAS> --reload
$star LOOT EXPORT FUNCTION
sniper -w <WORKSPACE_ALIAS> --export
$star SCHEDULED SCANS
sniper -w <WORKSPACE_ALIAS> -s daily|weekly|monthly
$star USE A CUSTOM CONFIG
sniper -c /path/to/sniper.conf -t <TARGET> -w <WORKSPACE_ALIAS>
$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"