Skip to content

Yx0r/Win_Defender_Manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Windows Defender Management Script - Advanced by Yaxploit

πŸ“– Overview

A comprehensive batch script for managing Windows Defender in controlled educational environments. Designed for malware analysis, security research, and educational testing in isolated lab setups.

⚠️ CRITICAL WARNINGS & DISCLAIMERS

🚨 LEGAL & ETHICAL USAGE

  • FOR EDUCATIONAL USE ONLY in controlled environments
  • ILLEGAL to use for malicious purposes or on systems you don't own
  • AGAINST TOS to disable security on corporate/managed devices
  • Use only in isolated virtual machines or dedicated test hardware

πŸ”’ SAFETY REQUIREMENTS

  • βœ… Run in VMware/VirtualBox/Hyper-V with snapshots
  • βœ… Disconnect from internet before testing
  • βœ… Use on dedicated test machines only
  • βœ… Enable logging for audit trails
  • ❌ NEVER use on production systems
  • ❌ NEVER connect to corporate networks
  • ❌ NEVER use without proper isolation

πŸ› οΈ Installation & Usage

Prerequisites

  • Windows 10/11 Pro/Enterprise (Home edition has limitations)
  • Administrator privileges
  • .NET Framework 4.5+ and PowerShell 5.0+

Quick Start

  1. Save script as DefenderManager.bat
  2. Right-click β†’ "Run as administrator"
  3. Follow menu prompts for desired actions

Recommended Workflow

1. Create VM snapshot
2. Disconnect network
3. Run script β†’ Create restore point (Option 8)
4. Disable Tamper Protection (Option 6) if needed
5. Disable Defender completely (Option 1)
6. Conduct educational testing
7. Restore snapshot when done

πŸ“‹ Feature Overview

Core Functions

  • Complete Defender Disablement - Multi-layer approach
  • Real-time Protection Control - Selective disabling
  • Tamper Protection Bypass - Windows 11 compatibility
  • Service Management - Start/stop/configure services
  • Exclusion Management - Add/remove file/folder exclusions
  • System Restore Points - Safety backups
  • Comprehensive Logging - Activity tracking

Technical Methods

  • Registry modifications (Group Policy equivalents)
  • PowerShell configurations (MPPreference settings)
  • Service control (SCM commands)
  • Process termination (Taskkill)
  • Multiple bypass techniques for robust disablement

πŸ”§ Menu Options Detailed

1. Complete Disablement

  • Disables all Defender components
  • Stops and disables services
  • Kills running processes
  • Modifies registry policies

2. Real-time Protection Only

  • Selective disablement of real-time scanning
  • Leaves other protections active

3. Enable Defender

  • Restores all Defender functionality
  • Resets exclusions and configurations

4. Add Exclusions

  • Add folders/files to Defender exclusion list
  • Path validation and error checking

5. Remove Exclusions

  • Clear all Defender exclusions
  • Useful for cleanup after testing

6. Tamper Protection Bypass

  • Multiple methods to bypass Windows 11 Tamper Protection
  • Registry modifications and service restarts

7. Service Management

  • Manual control over Defender services
  • Start/stop/disable/enable services

8. System Restore

  • Creates restore point before modifications
  • Safety net for system recovery

9. Activity Log

  • View all script actions and timestamps
  • Audit trail for educational purposes

🎯 Future Enhancements

πŸ”„ Immediate Improvements

  • GUI Interface - Graphical user interface for easier use
  • Password Protection - Prevent unauthorized usage
  • Network Isolation - Auto-disable network adapters
  • Configuration Profiles - Save/load different disablement levels
  • Scheduled Operations - Auto-enable after time period

πŸ›‘οΈ Security Enhancements

  • Digital Signing - Code signing for integrity verification
  • Checksum Verification - Ensure script hasn't been modified
  • Usage Limits - Auto-expire after certain date/usage count
  • Environment Detection - Auto-abort if not in VM/dedicated hardware

πŸ”§ Technical Upgrades

  • PowerShell Module - Convert to proper PowerShell module
  • WMI Integration - Additional management methods
  • Group Policy Templates - ADMX templates for enterprise labs
  • Cloud Management - Central logging for educational institutions
  • API Integration - Windows Security Center API usage

πŸ“Š Monitoring & Reporting

  • HTML Reports - Generate detailed activity reports
  • Email Alerts - Notify when Defender is disabled
  • Centralized Logging - Send logs to SIEM for educational tracking
  • Compliance Checking - Verify educational usage compliance

πŸŽ“ Educational Features

  • Learning Mode - Explain what each command does
  • Security Lessons - Integrated cybersecurity education
  • Lab Scenarios - Pre-built testing scenarios
  • Progress Tracking - Track learning objectives

πŸ› Known Limitations

Windows Version Compatibility

  • Windows 11 - Tamper Protection requires additional steps
  • Windows Home - Limited Group Policy support
  • Server Editions - Different service names may need adjustment

Technical Limitations

  • Temporary Disablement - Windows may re-enable after updates
  • Cloud Protection - May require additional network blocking
  • SmartScreen - Separate component needing additional disablement

πŸ“ Logging & Auditing

Log Location

%temp%\DefenderManager_YYYYMMDD_HHMM.log

Log Contents

  • Timestamp of all operations
  • User account performing actions
  • Specific commands executed
  • Success/failure status
  • System changes made

🀝 Contributing

For Educational Institutions

  • Document your use cases
  • Share lab configuration best practices
  • Contribute to safety enhancements

For Security Researchers

  • Suggest additional disablement methods
  • Improve detection avoidance
  • Enhance logging and monitoring

πŸ“ž Support

No Technical Support Provided

This script is provided as-is for educational purposes. No technical support, troubleshooting, or assistance with modifications is available.

Educational Resources

  • Microsoft Docs: Windows Defender configurations
  • Cybersecurity curriculum guidelines
  • Virtualization platform documentation

πŸ”„ Recovery Procedures

Manual Re-enablement

If script fails to re-enable Defender:

  1. Run Option 3 multiple times
  2. Use Windows Security app to reset
  3. System Restore to previous point
  4. Windows Update to refresh components

Emergency Recovery

# Manual PowerShell commands if needed
powershell -Command "Set-MpPreference -DisableRealtimeMonitoring $false"
sc config WinDefend start= auto
sc start WinDefend

Remember: With great power comes great responsibility. Use this tool only for legitimate educational purposes in properly controlled environments.

About

A batch script to manage windows defender for 10/11

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors