Python scripts
60 scripts and 21,166 lines of code. Open any script to read the highlighted source and copy its run commands. Run security tools only on systems you own or have written permission to test.
60 of 60 scripts
- ddos_detection.pyNetwork Security / DDoS (Distributed Denial of Service) AttacksDDoS Attack Detection Scriptdetection261 lines
- traffic_analyzer.pyNetwork Security / DDoS (Distributed Denial of Service) AttacksNetwork Traffic Analyzerdetection274 lines
- firewall_rules.txtNetwork Security / DDoS (Distributed Denial of Service) AttacksFirewall Rules for DDoS Mitigation.prevention300 lines
- rate_limiting.pyNetwork Security / DDoS (Distributed Denial of Service) AttacksRate Limiting Implementation for DDoS Preventionprevention405 lines
- dns_spoof_detector.pyNetwork Security / DNS Spoofing and Cache PoisoningDNS spoofing / cache-poisoning detectordetection163 linesmay need admin rights
- dnssec_check.pyNetwork Security / DNS Spoofing and Cache PoisoningDNSSEC checkprevention74 lines
- arp_spoof_detector.pyNetwork Security / Man-in-the-Middle (MITM) AttacksARP Spoofing Detectordetection385 lines
- ssl_strip_detector.pyNetwork Security / Man-in-the-Middle (MITM) AttacksSSL Strip Detectordetection433 lines
- certificate_pinning.pyNetwork Security / Man-in-the-Middle (MITM) AttacksCertificate Pinning Implementation This script demonstrates certificate pinning techniques to prevent MITM attacks by validating server certificates against known pins.prevention362 lines
- ssl_tls_config.pyNetwork Security / Man-in-the-Middle (MITM) AttacksSSL/TLS Secure Configuration This script demonstrates secure SSL/TLS configuration for various servers and provides examples of proper encryption implementation.prevention434 lines
- ids_rules.txtNetwork Security / Port ScanningIDS/IPS Rules for Port Scan Detectiondetection343 lines
- port_scan_detector.pyNetwork Security / Port ScanningPort Scan Detector This script detects port scanning activities by monitoring network connections, analyzing patterns, and identifying suspicious scanning behavior.detection503 lines
- firewall_config.pyNetwork Security / Port ScanningFirewall Configuration for Port Scan Preventionprevention505 lines
- stealth_mode.pyNetwork Security / Port ScanningStealth Mode - Port Knocking Implementation This script implements port knocking to hide services from port scanners. Services only become available after a specific sequence of connection attempts.prevention450 lines
- csrf_detector.pyWeb Application Security / Cross-Site Request Forgery (CSRF)CSRF Detectordetection132 lines
- csrf_protection.pyWeb Application Security / Cross-Site Request Forgery (CSRF)CSRF protection: signed, session-bound tokens plus Origin checkingprevention89 lines
- lfi_detector.pyWeb Application Security / File Inclusion and Path TraversalLocal file inclusion / path traversal detectordetection91 linesmay need admin rights
- safe_file_access.pyWeb Application Security / File Inclusion and Path TraversalSafe file access: stop path traversal and file inclusionprevention64 lines
- security_headers_checker.pyWeb Application Security / Security MisconfigurationSecurity misconfiguration checker (OWASP Top 10:2025 A02)detection118 lines
- session_security_checker.pyWeb Application Security / Session Hijacking and FixationSession security checkerdetection162 lines
- secure_session.pyWeb Application Security / Session Hijacking and FixationSecure server-side session managerprevention95 lines
- sql_injection_detector.pyWeb Application Security / SQL InjectionSQL Injection Detectordetection335 lines
- sql_injection_scanner.pyWeb Application Security / SQL InjectionSQL Injection Scanner (simple front end)detection50 lines
- input_validation.pyWeb Application Security / SQL InjectionInput Validation and Sanitization for SQL Injection Preventionprevention690 lines
- parameterized_queries.pyWeb Application Security / SQL InjectionSQL Injection Prevention - Parameterized Queriesprevention373 lines
- xss_detector.pyWeb Application Security / Cross-Site Scripting (XSS)XSS Vulnerability Detector (reflected XSS)detection254 lines
- csp_analyzer.pyWeb Application Security / Cross-Site Scripting (XSS)Content-Security-Policy analyzerprevention80 lines
- output_encoding.pyWeb Application Security / Cross-Site Scripting (XSS)Context-aware output encoding (the real fix for XSS)prevention58 lines
- keylogger_detector.pyMalware Analysis / KeyloggersKeylogger indicator scanner (Linux)detection112 linesmay need admin rights
- file_monitor.pyMalware Analysis / RansomwareFile Monitor for Ransomware Detectiondetection368 lines
- ransomware_behavior.pyMalware Analysis / RansomwareRansomware Behavior Detectordetection476 lines
- app_whitelisting.pyMalware Analysis / RansomwareApplication Whitelisting for Ransomware Prevention This script implements application whitelisting to prevent unauthorized executables from running, effectively blocking ransomware and other malware.prevention533 lines
- backup_system.pyMalware Analysis / RansomwareAutomated Backup System for Ransomware Prevention This script implements a robust backup system following the 3-2-1 backup strategy to protect against ransomware attacks. It includes versioning, integrity checking, and automated backup scheduling.prevention692 linesmay need admin rights
- integrity_checker.pyMalware Analysis / RootkitsSystem Integrity Checkerdetection567 lines
- rootkit_detector.pyMalware Analysis / RootkitsRootkit Detectordetection737 lines
- kernel_patching.pyMalware Analysis / RootkitsKernel Patching and Update Management This script manages kernel updates and patches to prevent rootkit exploitation of kernel vulnerabilities.prevention590 lines
- secure_boot.pyMalware Analysis / RootkitsSecure Boot Configuration This script configures and manages Secure Boot to prevent bootkits and low-level rootkits from infecting the system.prevention435 lines
- process_analyzer.pyMalware Analysis / TrojansProcess Analyzer for Trojan Detectiondetection486 lines
- trojan_scanner.pyMalware Analysis / TrojansTrojan Scannerdetection630 lines
- av_config.pyMalware Analysis / TrojansAntivirus Configuration for Trojan Prevention This script configures and optimizes antivirus software for maximum protection against trojans and other malware.prevention527 lines
- sandbox_setup.pyMalware Analysis / TrojansSandbox Setup for Trojan Analysis This script sets up an isolated sandbox environment for safely analyzing suspicious files and potential trojans.prevention602 lines
- usb_bait_scanner.pySocial Engineering / BaitingUSB baiting scannerdetection125 linesmay need admin rights
- email_analyzer.pySocial Engineering / PhishingEmail Analyzer This script analyzes email headers, SPF/DKIM/DMARC records, and performs deep inspection of email content for phishing indicators.detection515 lines
- phishing_detector.pySocial Engineering / PhishingPhishing Detectordetection695 lines
- email_filters.pySocial Engineering / PhishingEmail Filters for Phishing Preventionprevention871 lines
- social_engineering_detector.pySocial Engineering / PretextingSocial Engineering Detector This script analyzes phone calls, text messages, and in-person interactions for social engineering indicators.detection724 lines
- sample_access_log.csvSocial Engineering / Tailgating (Piggybacking)detection17 lines
- tailgating_log_analyzer.pySocial Engineering / Tailgating (Piggybacking)Tailgating and badge-misuse analyzerdetection121 lines
- file_signer.pyCryptography / Digital SignaturesFile signing and verification with Ed25519other132 lines
- rsa_example.pyCryptography / Asymmetric Encryption (RSA)RSA encryption and signatures (OAEP and PSS)other127 lines
- integrity_checker.pyCryptography / Hashing FunctionsFile Integrity Checkerother372 lines
- password_hashing.pyCryptography / Hashing FunctionsPassword Hashing Toolother434 lines
- key_manager.pyCryptography / Key ManagementMinimal key manager: envelope encryption, rotation and an audit trailother245 lines
- aes_example.pyCryptography / SymmetricRSA Encryption Toolother385 lines
- disk_forensics.pyIncident Response / Digital ForensicsDisk Forensics Analyzerother538 lines
- memory_analyzer.pyIncident Response / Digital ForensicsMemory Forensics Analyzerother357 lines
- post_incident_report.pyIncident Response / Post-Incident AnalysisPost-incident analysis report generatorother127 linesmay need admin rights
- sample_incident.jsonIncident Response / Post-Incident Analysisother24 lines
- backup_recovery.pyIncident Response / ContainmentBackup and Recovery Toolother558 linesmay need admin rights
- isolation_script.pyIncident Response / ContainmentIncident Isolation Scriptother561 lines