Fix: Move Historical Attack Analysis to Threat Analysis menu

Issue: Historical Attack Analysis was in its own "System Diagnostics"
category with only one tool, but it's actually threat analysis.

Changes:
- Added Historical Attack Analysis to Threat Analysis menu (option 6)
- Removed System Diagnostics sub-menu entirely (both functions)
- Updated main security menu from 5 to 4 categories
- Removed option 5 and its handler

New Structure:
Main Security Menu (4 categories):
  1) Threat Analysis (6 tools) ← Historical Attack Analysis moved here
  2) Live Monitoring (4 tools)
  3) Log Viewers (4 tools)
  4) Security Actions (3 tools)

Benefits:
- More logical grouping - analyzing attacks is threat analysis
- No orphan category with only one tool
- Cleaner main menu (4 options vs 5)

Code Changes:
- Added: +2 lines (option 6 in show/handle)
- Removed: -30 lines (System Diagnostics menu)
- Net: -28 lines

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
cschantz
2026-02-05 20:50:48 -05:00
parent 55c50614e0
commit 701bc76de1
+2 -28
View File
@@ -124,6 +124,7 @@ show_threat_analysis_menu() {
echo -e " ${CYAN}3)${NC} 📊 IP Reputation Manager - Query/manage IP database" echo -e " ${CYAN}3)${NC} 📊 IP Reputation Manager - Query/manage IP database"
echo -e " ${CYAN}4)${NC} 🔐 Suspicious Login Monitor - SSH/Panel login analysis" echo -e " ${CYAN}4)${NC} 🔐 Suspicious Login Monitor - SSH/Panel login analysis"
echo -e " ${CYAN}5)${NC} 🦠 Malware Scanner - ImunifyAV, ClamAV, Maldet" echo -e " ${CYAN}5)${NC} 🦠 Malware Scanner - ImunifyAV, ClamAV, Maldet"
echo -e " ${CYAN}6)${NC} 🛡️ Historical Attack Analysis - Scan past logs (ET Open)"
echo "" echo ""
echo -e " ${RED}0)${NC} Back to Security Menu" echo -e " ${RED}0)${NC} Back to Security Menu"
echo "" echo ""
@@ -142,6 +143,7 @@ handle_threat_analysis_menu() {
3) run_module "security" "ip-reputation-manager.sh" ;; 3) run_module "security" "ip-reputation-manager.sh" ;;
4) run_module "security" "suspicious-login-monitor.sh" ;; 4) run_module "security" "suspicious-login-monitor.sh" ;;
5) run_module "security" "malware-scanner.sh" ;; 5) run_module "security" "malware-scanner.sh" ;;
6) bash "$BASE_DIR/tools/analyze-historical-attacks.sh" ;;
0) return ;; 0) return ;;
*) echo -e "${RED}Invalid option${NC}"; sleep 1 ;; *) echo -e "${RED}Invalid option${NC}"; sleep 1 ;;
esac esac
@@ -242,32 +244,6 @@ handle_security_actions_menu() {
done done
} }
# System Diagnostics Sub-Menu
show_system_diagnostics_menu() {
show_banner
echo -e "${GREEN}${BOLD}🛠️ System Diagnostics${NC}"
echo ""
echo -e " ${GREEN}1)${NC} 🛡️ Historical Attack Analysis - Scan past logs (ET Open)"
echo ""
echo -e " ${RED}0)${NC} Back to Security Menu"
echo ""
echo -e "${CYAN}──────────────────────────────────────────────────────────────${NC}"
echo -n "Select option: "
}
handle_system_diagnostics_menu() {
while true; do
show_system_diagnostics_menu
read -r choice
case $choice in
1) bash "$BASE_DIR/tools/analyze-historical-attacks.sh" ;;
0) return ;;
*) echo -e "${RED}Invalid option${NC}"; sleep 1 ;;
esac
done
}
############################################################################# #############################################################################
# MAIN SECURITY MENU # MAIN SECURITY MENU
############################################################################# #############################################################################
@@ -280,7 +256,6 @@ show_security_menu() {
echo -e " ${MAGENTA}2)${NC} 🔴 Live Monitoring → Real-time attack detection" echo -e " ${MAGENTA}2)${NC} 🔴 Live Monitoring → Real-time attack detection"
echo -e " ${BLUE}3)${NC} 📋 Log Viewers → Tail system/security logs" echo -e " ${BLUE}3)${NC} 📋 Log Viewers → Tail system/security logs"
echo -e " ${YELLOW}4)${NC} 🔒 Security Actions → Hardening & protection" echo -e " ${YELLOW}4)${NC} 🔒 Security Actions → Hardening & protection"
echo -e " ${GREEN}5)${NC} 🛠️ System Diagnostics → Analyze past attacks"
echo "" echo ""
echo -e " ${RED}0)${NC} Back to Main Menu" echo -e " ${RED}0)${NC} Back to Main Menu"
echo "" echo ""
@@ -298,7 +273,6 @@ handle_security_menu() {
2) handle_live_monitoring_menu ;; 2) handle_live_monitoring_menu ;;
3) handle_log_viewers_menu ;; 3) handle_log_viewers_menu ;;
4) handle_security_actions_menu ;; 4) handle_security_actions_menu ;;
5) handle_system_diagnostics_menu ;;
0) return ;; 0) return ;;
*) echo -e "${RED}Invalid option${NC}"; sleep 1 ;; *) echo -e "${RED}Invalid option${NC}"; sleep 1 ;;
esac esac