|
1 | | -# Defender-rs: DefendNot Written In Rust |
| 1 | +# Defender-rs: Rust Rewrite of DefendNot |
2 | 2 |
|
3 | | -Inspired by [es3n1n/defendnot](https://github.com/es3n1n/defendnot) |
| 3 | +An even funnier way to disable Windows Defender. Inspired by [es3n1n/defendnot](https://github.com/es3n1n/defendnot) |
4 | 4 |
|
5 | | -## Usage |
| 5 | +> [!CAUTION] |
| 6 | +> **Permitted Use Notice**: |
| 7 | +> |
| 8 | +> Using this tool to facilitate malware distribution, cybercrime, unauthorized access, evading detection, or any illegal activity is strictly prohibited. |
| 9 | +> |
| 10 | +> Users assume all legal responsibility for how they use this tool and any consequences thereof. You must comply with all applicable local, state, federal, and international laws when using this tool. |
| 11 | +> |
| 12 | +> By downloading, installing, or using this tool, you acknowledge that you have read, understood, and agree to these terms. |
6 | 13 |
|
7 | | -- `--name <NAME>`: Set AV name, default is `Defender-rs`. And regist AV and set auto boot task |
8 | | -- `--disable`: Unregist AV and remove auto boot task |
9 | | -- `--on-login`: Start on login instead of on boot (by default) |
| 14 | +A fully Rust rewrite of defendnot, 100% compatible with the original [C++ version](https://github.com/es3n1n/defendnot). You can use the Rust loader to inject the C++ DLL, or the C++ loader to inject the Rust DLL. |
10 | 15 |
|
11 | | -So the simplest way to use is `sudo defender` |
| 16 | +- Register/unregister custom AV/AS to Windows Security Center (WSC) |
| 17 | +- Automatic scheduled task for persistence (boot/login) |
| 18 | +- Minimal (Just 300kb), dependency-free |
| 19 | + |
| 20 | +## Installation & Usage |
| 21 | + |
| 22 | +1. Download the [latest release](https://github.com/fontlos/defender-rs/releases/latest) |
| 23 | +2. Unzip and run `defender.exe` as administrator. Just |
| 24 | + ```sh |
| 25 | + sudo defender.exe |
| 26 | + ``` |
| 27 | +3. Command help |
| 28 | + ```shell |
| 29 | + Set AV display name, register AV and set autorun task |
| 30 | + Usage: defender.exe [--name <NAME>] [--disable] [--auto] [--on-login] |
| 31 | + |
| 32 | + Options: |
| 33 | + --name Set AV display name (default: Defender-rs) |
| 34 | + --disable Unregister AV and remove autorun task |
| 35 | + --auto Silent mode (no window, used by scheduled task) |
| 36 | + --on-login Schedule autorun on login (default: on boot) |
| 37 | + ``` |
| 38 | + |
| 39 | +## How It Works |
| 40 | + |
| 41 | +Windows Security Center (WSC) allows third-party AV/AS to register themselves. When Defender detects another AV/AS registered, it disables itself. defender-rs communicates with WSC via COM, registering a custom AV/AS product so Defender enters "protected" state. |
| 42 | + |
| 43 | +## Limitations |
| 44 | +- **Must stay on disk:** Scheduled task autorun requires binaries to remain for persistence after reboot. |
| 45 | +- **No Windows Server support:** WSC is not available on Server editions, so registration is blocked. |
| 46 | +- **Defender will flag/block:** You must temporarily disable Defender real-time/tamper protection or add an exclusion to allow the program to remain on disk and execute |
| 47 | + |
| 48 | +## Legitimate Use Cases |
| 49 | +- Reduce resource usage in dev/test environments |
| 50 | +- Research/education on Windows security mechanisms |
| 51 | +- Home lab experimentation |
| 52 | + |
| 53 | +> [!IMPORTANT] |
| 54 | +> No support for illegal use. You are responsible for any consequences. |
| 55 | +
|
| 56 | +## Credits |
| 57 | +- [es3n1n](https://github.com/es3n1n) for original design and reverse engineering |
| 58 | +- [mrbruh](https://mrbruh.com) for reverse engineering and testing |
| 59 | +- [pindos](https://github.com/pind0s) for WSC debugging support |
0 commit comments