progress
This commit is contained in:
		
							parent
							
								
									54f68cc86c
								
							
						
					
					
						commit
						261f47c58e
					
				
							
								
								
									
										149
									
								
								src/main.c
									
									
									
									
									
								
							
							
						
						
									
										149
									
								
								src/main.c
									
									
									
									
									
								
							@ -1813,68 +1813,110 @@ void show_status(){
 | 
			
		||||
// TRANSPARENZ: Dies wurde KI-generiert
 | 
			
		||||
void print_filter_examples(){
 | 
			
		||||
    printf("\nFILTER-DOKUMENTATION\n");
 | 
			
		||||
    printf("\nEXKLUSIONS-FILTER (immer OR-Logik, unabhängig vom Modus):\n");
 | 
			
		||||
    printf("Beispiel: !('uptime' OR 'scanner')\n");
 | 
			
		||||
    printf("> Schließt ALLE Einträge aus, die 'uptime' ODER 'scanner' enthalten\n\n");
 | 
			
		||||
    printf("===================\n\n");
 | 
			
		||||
    
 | 
			
		||||
    printf("INKLUSIONS-FILTER im AND-Modus:\n");
 | 
			
		||||
    printf("Beispiel: ('bot' AND 'crawl')\n");
 | 
			
		||||
    printf("> Zeigt nur Einträge mit BEIDEN Begriffen\n\n");
 | 
			
		||||
    printf("GRUNDLEGENDE SYNTAX:\n");
 | 
			
		||||
    printf("  --filtertyp=wert1,wert2,wert3    Mehrere Werte kommagetrennt\n");
 | 
			
		||||
    printf("  --filtertyp=!wert                Ausschluss (mit ! Präfix)\n");
 | 
			
		||||
    printf("  --filtertyp=wert1,!wert2         Gemischt: wert1 einschließen, wert2 ausschließen\n");
 | 
			
		||||
    printf("  --mode=and                       UND-Verknüpfung (Standard)\n");
 | 
			
		||||
    printf("  --mode=or                        ODER-Verknüpfung\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("INKLUSIONS-FILTER im OR-Modus:\n");
 | 
			
		||||
    printf("Beispiel: ('bot' OR 'crawl')\n");
 | 
			
		||||
    printf("> Zeigt Einträge mit 'bot' ODER 'crawl'\n\n");
 | 
			
		||||
    printf("VERFÜGBARE FILTER:\n");
 | 
			
		||||
    printf("  --status=200,404,500             HTTP-Status-Codes\n");
 | 
			
		||||
    printf("  --ip=192.168.1.100,10.0.0.5     IP-Adressen (exakt)\n");
 | 
			
		||||
    printf("  --method=GET,POST,ATYPICAL       HTTP-Methoden\n");
 | 
			
		||||
    printf("  --useragent=bot,crawler,scanner  User-Agent Teilstrings\n");
 | 
			
		||||
    printf("  --url=.git,.env,wp-admin         URL-Pfad Teilstrings\n");
 | 
			
		||||
    printf("  --annotated=true                 Nur annotierte Einträge\n");
 | 
			
		||||
    printf("  --annotation=SQL,XSS             Annotations-Teilstrings\n");
 | 
			
		||||
    printf("  --timerange=START:END            Zeiträume (siehe unten)\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("KOMBINATION: Exklusion + Inklusion:\n");
 | 
			
		||||
    printf("AND-Modus: !('uptime') AND ('bot' AND 'crawl')\n");
 | 
			
		||||
    printf("OR-Modus:  !('uptime') AND ('bot' OR 'crawl')\n\n");
 | 
			
		||||
    printf("ZEITRAUM-SYNTAX:\n");
 | 
			
		||||
    printf("  Format: YYYY-MM-DD-HH-MM-SS:YYYY-MM-DD-HH-MM-SS\n");
 | 
			
		||||
    printf("  Beispiel: 2025-08-31-08-00-00:2025-08-31-18-00-00\n");
 | 
			
		||||
    printf("  Ausschluss: !2025-08-31-02-00-00:2025-08-31-06-00-00\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("PRAKTISCHE ANWENDUNGSFÄLLE:\n");
 | 
			
		||||
    printf("Malware-Erkennung:\n");
 | 
			
		||||
    printf("  '.git' OR '.env' OR '/admin'\n");
 | 
			
		||||
    printf("  > Verdächtige Pfad-Zugriffe\n\n");
 | 
			
		||||
    printf("FILTER-LOGIK:\n");
 | 
			
		||||
    printf("  1. Ausschlussfilter (!) haben IMMER Vorrang\n");
 | 
			
		||||
    printf("  2. Bei mehreren Filtern verschiedener Typen: Kombination nach --mode\n");
 | 
			
		||||
    printf("  3. Bei mehreren Filtern gleichen Typs: Kombination nach --mode\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Bot-Traffic bereinigen:\n");
 | 
			
		||||
    printf("  !('bot') AND Status=200 AND Method='GET'\n");
 | 
			
		||||
    printf("  > Nur menschliche, erfolgreiche GET-Anfragen\n\n");
 | 
			
		||||
    printf("PRAKTISCHE BEISPIELE:\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Zeitraum-Analyse:\n");
 | 
			
		||||
    printf("  --timerange=2025-08-31-08-00-00:2025-08-31-18-00-00 AND Status=500\n");
 | 
			
		||||
    printf("  > Server-Fehler nur während Geschäftszeiten\n\n");
 | 
			
		||||
    printf("SICHERHEITSANALYSE:\n");
 | 
			
		||||
    printf("Verdächtige Pfad-Zugriffe finden:\n");
 | 
			
		||||
    printf("  --url=.git,.env,wp-admin,phpmyadmin --mode=or\n");
 | 
			
		||||
    printf("  > Zeigt Zugriffe auf Git-Repos, Config-Dateien oder Admin-Bereiche\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Nachtzeit ausschließen:\n");
 | 
			
		||||
    printf("  --timerange=!2025-08-31-22-00-00:2025-09-01-06-00-00\n");
 | 
			
		||||
    printf("  > Alle Einträge außer der Nachtzeit\n\n");
 | 
			
		||||
    printf("SQL-Injection Versuche:\n");
 | 
			
		||||
    printf("  --annotation=SQL --url=select,union,drop --mode=or\n");
 | 
			
		||||
    printf("  > Kombiniert automatische Erkennung mit manuellen Mustern\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("DDoS-Verdacht:\n");
 | 
			
		||||
    printf("  Status=429 OR Status=503 OR Status=500\n");
 | 
			
		||||
    printf("  > Alle Überlastungs- und Fehler-Codes\n\n");
 | 
			
		||||
    printf("Bot-Traffic ausschließen:\n");
 | 
			
		||||
    printf("  --useragent=!bot,!crawler,!spider --status=200 --mode=and\n");
 | 
			
		||||
    printf("  > Nur erfolgreiche Requests ohne Bot-Traffic\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("ANNOTATIONS-FILTER:\n");
 | 
			
		||||
    printf("Nur verdächtige Einträge:\n");
 | 
			
		||||
    printf("PERFORMANCE-ANALYSE:\n");
 | 
			
		||||
    printf("Server-Fehler in Geschäftszeiten:\n");
 | 
			
		||||
    printf("  --timerange=2025-08-31-08-00-00:2025-08-31-18-00-00 --status=500,502,503 --mode=and\n");
 | 
			
		||||
    printf("  > 5xx Fehler nur während Arbeitszeit\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Wartungszeit ausschließen:\n");
 | 
			
		||||
    printf("  --timerange=!2025-08-31-02-00-00:2025-08-31-06-00-00 --status=!200\n");
 | 
			
		||||
    printf("  > Alle Fehler außerhalb der Wartungszeit\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("ANOMALIE-ERKENNUNG:\n");
 | 
			
		||||
    printf("Alle verdächtigen Aktivitäten:\n");
 | 
			
		||||
    printf("  --annotated=true\n");
 | 
			
		||||
    printf("  > Zeigt nur Einträge mit Annotationen\n\n");
 | 
			
		||||
    printf("  > Zeigt alle automatisch erkannten Anomalien\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Bestimmte Anomalien:\n");
 | 
			
		||||
    printf("  --annotation='Long Payload'\n");
 | 
			
		||||
    printf("  > Nur Einträge mit verdächtig langen Anfragen\n\n");
 | 
			
		||||
    printf("Lange Payloads von bestimmten IPs:\n");
 | 
			
		||||
    printf("  --annotation=Long --ip=!192.168.1.0 --mode=and\n");
 | 
			
		||||
    printf("  > Verdächtig lange Requests von externen IPs\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Normale Traffic-Analyse (ohne Anomalien):\n");
 | 
			
		||||
    printf("  --annotated=!true\n");
 | 
			
		||||
    printf("  > Schließt alle annotierten/verdächtigen Einträge aus\n\n");
 | 
			
		||||
    printf("FORENSIK:\n");
 | 
			
		||||
    printf("Angriffsmuster in kritischem Zeitfenster:\n");
 | 
			
		||||
    printf("  --timerange=2025-08-31-14-30-00:2025-08-31-15-30-00 --status=403,404 --annotation=Scanner,SQL,XSS --mode=and\n");
 | 
			
		||||
    printf("  > Detaillierte Analyse eines Sicherheitsvorfalls\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("KOMPLEXE KOMBINATIONEN:\n");
 | 
			
		||||
    printf("Forensik-Analyse:\n");
 | 
			
		||||
    printf("  --timerange=2025-08-31-14-00-00:2025-08-31-16-00-00 --status=400,404,403 --annotated=true\n");
 | 
			
		||||
    printf("  > Verdächtige Aktivitäten in kritischem Zeitfenster\n\n");
 | 
			
		||||
    printf("Fehlgeschlagene Login-Versuche:\n");
 | 
			
		||||
    printf("  --url=login,signin,auth --status=401,403 --annotation=Failed --mode=and\n");
 | 
			
		||||
    printf("  > Brute-Force Angriffe auf Login-Bereiche\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Performance-Analyse:\n");
 | 
			
		||||
    printf("  --timerange=!2025-08-31-02-00-00:2025-08-31-06-00-00 --status=200 --annotated=!true\n");
 | 
			
		||||
    printf("  > Normaler Traffic außerhalb der Wartungszeit\n\n");
 | 
			
		||||
    printf("TRAFFIC-BEREINIGUNG:\n");
 | 
			
		||||
    printf("Nur menschlicher Traffic:\n");
 | 
			
		||||
    printf("  --useragent=!bot,!crawler,!scanner --method=!PROPFIND --status=200,304 --mode=and\n");
 | 
			
		||||
    printf("  > Erfolgreiche Requests ohne automatisierten Traffic\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Security-Monitoring:\n");
 | 
			
		||||
    printf("  --url='.git','.env','wp-admin' --annotation='Long Payload' --mode=or\n");
 | 
			
		||||
    printf("  > Alle bekannten Angriffsmuster und verdächtige Payloads\n");
 | 
			
		||||
    printf("Administrative Zugriffe ausschließen:\n");
 | 
			
		||||
    printf("  --ip=!192.168.1.10,!10.0.0.100 --url=!admin,!manager --mode=and\n");
 | 
			
		||||
    printf("  > Traffic ohne Admin-IPs und Admin-Bereiche\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("HÄUFIGE KOMBINATIONEN:\n");
 | 
			
		||||
    printf("DDoS-Verdacht:\n");
 | 
			
		||||
    printf("  --status=429,503,502 --annotation=Rate --mode=or\n");
 | 
			
		||||
    printf("  > Überlastungsindikationen und Rate-Limiting\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Webshell-Suche:\n");
 | 
			
		||||
    printf("  --url=.php,cmd=,exec= --annotation=Shell --method=POST,GET --mode=or\n");
 | 
			
		||||
    printf("  > Verdächtige PHP-Aufrufe und Shell-Aktivitäten\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("Normale Website-Nutzung:\n");
 | 
			
		||||
    printf("  --status=200,304 --method=GET,POST --useragent=!bot --annotated=!true --mode=and\n");
 | 
			
		||||
    printf("  > Sauberer, erfolgreicher Website-Traffic ohne Anomalien\n\n");
 | 
			
		||||
 | 
			
		||||
    printf("ANNOTATIONEN (automatisch erkannt):\n");
 | 
			
		||||
    printf("  Long Payload    - Verdächtig lange Anfragen\n");
 | 
			
		||||
    printf("  Git Access      - Zugriff auf .git Verzeichnisse\n");
 | 
			
		||||
    printf("  Config Access   - Zugriff auf Konfigurationsdateien\n");
 | 
			
		||||
    printf("  WP Attack       - WordPress-spezifische Angriffe\n");
 | 
			
		||||
    printf("  SQL Injection   - SQL-Injection Versuche\n");
 | 
			
		||||
    printf("  XSS Attempt     - Cross-Site-Scripting Versuche\n");
 | 
			
		||||
    printf("  Scanner/Bot     - Automatisierte Scanner\n");
 | 
			
		||||
    printf("  Path Traversal  - Directory-Traversal Angriffe\n");
 | 
			
		||||
    printf("  Failed Auth     - Fehlgeschlagene Authentifizierung\n");
 | 
			
		||||
    printf("  Shell Access    - Webshell-Zugriffe\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int handle_menu_shortcuts(int choice) {
 | 
			
		||||
@ -2410,7 +2452,6 @@ void menu_filter_mode(){
 | 
			
		||||
    
 | 
			
		||||
    printf("1. AND-Modus (alle Einschluss-Filter müssen zutreffen)\n");
 | 
			
		||||
    printf("2. OR-Modus (mindestens ein Einschluss-Filter muss zutreffen)\n");
 | 
			
		||||
    printf("3. Detaillierte Beispiele anzeigen\n");
 | 
			
		||||
    printf("Navigation: [b]Zurück [m]Hauptmenü [q]Beenden\n");
 | 
			
		||||
    printf("Auswahl: ");
 | 
			
		||||
    
 | 
			
		||||
@ -2423,8 +2464,6 @@ void menu_filter_mode(){
 | 
			
		||||
    } else if (choice == 2) {
 | 
			
		||||
        filters.combination_mode = 1;
 | 
			
		||||
        printf("Filter-Modus auf OR gesetzt.\n");     
 | 
			
		||||
    } else if (choice == 3) {
 | 
			
		||||
        print_filter_examples();        
 | 
			
		||||
    } else if (choice == -2 || choice == -3) {
 | 
			
		||||
        return;
 | 
			
		||||
    } else if (choice != -1) {
 | 
			
		||||
@ -2475,9 +2514,13 @@ void menu_reset_filters(){
 | 
			
		||||
 | 
			
		||||
void menu_filter_management(){
 | 
			
		||||
    int choice = 0;
 | 
			
		||||
    int supress_preview = 0;
 | 
			
		||||
    // Standardnavigation aus read_menu_input
 | 
			
		||||
    while (choice != -2 && choice != -3) {
 | 
			
		||||
        if (supress_preview==0){
 | 
			
		||||
            show_status();
 | 
			
		||||
        }
 | 
			
		||||
        supress_preview = 0;
 | 
			
		||||
        
 | 
			
		||||
        printf("\nFILTER VERWALTEN\n");
 | 
			
		||||
        printf("1. Filter hinzufügen\n");
 | 
			
		||||
@ -2502,6 +2545,7 @@ void menu_filter_management(){
 | 
			
		||||
            menu_reset_filters();
 | 
			
		||||
        } else if (choice == 5) {
 | 
			
		||||
            print_filter_examples();
 | 
			
		||||
            supress_preview = 1;
 | 
			
		||||
        } else if (choice == -2) {
 | 
			
		||||
            return;
 | 
			
		||||
        } else if (choice == -3) {
 | 
			
		||||
@ -2520,7 +2564,7 @@ void menu_show_entries(){
 | 
			
		||||
        if (supress_preview == 0) {
 | 
			
		||||
            show_status();
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        supress_preview = 0;
 | 
			
		||||
        
 | 
			
		||||
        int filtered_count = count_filtered_entries();
 | 
			
		||||
        printf("\nDATEN ANZEIGEN UND EXPORTIEREN\n");
 | 
			
		||||
@ -2562,7 +2606,7 @@ void menu_show_entries(){
 | 
			
		||||
            supress_preview = 1;
 | 
			
		||||
        } else if (choice == 5){
 | 
			
		||||
            show_annotated_entries();
 | 
			
		||||
            supress_preview =1;
 | 
			
		||||
            supress_preview = 1;
 | 
			
		||||
        } else if (choice == -2) {
 | 
			
		||||
            return;
 | 
			
		||||
        } else if (choice == -3) {
 | 
			
		||||
@ -2570,7 +2614,6 @@ void menu_show_entries(){
 | 
			
		||||
        } else if (choice != -1) {
 | 
			
		||||
            printf("ERROR: Ungültige Auswahl! Bitte wählen Sie 1-4 oder b/m/q.\n");
 | 
			
		||||
        }
 | 
			
		||||
        supress_preview = 0;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user