Skip to content

Commit 9279aec

Browse files
committed
EDRChecker
EDR's tools, AV's, and other security-related applications on a Windows system.
1 parent 43301e0 commit 9279aec

File tree

3 files changed

+210
-0
lines changed

3 files changed

+210
-0
lines changed

EDRChecker/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[package]
2+
name = "EDRChecker"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
regex = "1.11.0"

EDRChecker/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## EDRChecker-Rust
2+
3+
This Code aims to check for the presence of EDR's tools, antivirus software, and other security-related applications on a Windows system.
4+
5+
## What It Does !
6+
7+
- **Checks Running Processes**: Scans for processes that match names associated with EDR or antivirus software.
8+
- **Checks Services**: Looks for services that might indicate the presence of EDR or antivirus solutions.
9+
- **Scans Directories**: Searches through common installation directories for known EDR or antivirus product names.
10+
11+
## Prerequisites
12+
13+
- **Rust**: Ensure you have Rust installed. You can download it from [rustup.rs](rustup.rs).
14+
- **Windows**: This script is designed for Windows systems, using Windows-specific commands.
15+
16+
## RUN
17+
18+
```
19+
cargo run
20+
```
21+
22+
23+
## CREDITS!
24+
25+
* https://github.com/PwnDexter/Invoke-EDRChecker/tree/master
26+
* https://github.com/PwnDexter/SharpEDRChecker
27+
28+
By [@5mukx](https://x.com/5mukx)

EDRChecker/src/main.rs

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
2+
const EDR_LIST: [&str; 125] = [
3+
"activeconsole",
4+
"ADA-PreCheck",
5+
"ahnlab",
6+
"amsi.dll",
7+
"anti malware",
8+
"anti-malware",
9+
"antimalware",
10+
"anti virus",
11+
"anti-virus",
12+
"antivirus",
13+
"appsense",
14+
"attivo networks",
15+
"attivonetworks",
16+
"authtap",
17+
"avast",
18+
"avecto",
19+
"bitdefender",
20+
"blackberry",
21+
"canary",
22+
"carbonblack",
23+
"carbon black",
24+
"cb.exe",
25+
"check point",
26+
"ciscoamp",
27+
"cisco amp",
28+
"countercept",
29+
"countertack",
30+
"cramtray",
31+
"crssvc",
32+
"crowdstrike",
33+
"csagent",
34+
"csfalcon",
35+
"csshell",
36+
"cybereason",
37+
"cyclorama",
38+
"cylance",
39+
"cynet",
40+
"cyoptics",
41+
"cyupdate",
42+
"cyvera",
43+
"cyserver",
44+
"cytray",
45+
"darktrace",
46+
"deep instinct",
47+
"defendpoint",
48+
"defender",
49+
"eectrl",
50+
"elastic",
51+
"endgame",
52+
"f-secure",
53+
"forcepoint",
54+
"fortinet",
55+
"fireeye",
56+
"groundling",
57+
"GRRservic",
58+
"harfanglab",
59+
"inspector",
60+
"ivanti",
61+
"juniper networks",
62+
"kaspersky",
63+
"lacuna",
64+
"logrhythm",
65+
"malware",
66+
"malwarebytes",
67+
"mandiant",
68+
"mcafee",
69+
"morphisec",
70+
"msascuil",
71+
"msmpeng",
72+
"nissrv",
73+
"omni",
74+
"omniagent",
75+
"osquery",
76+
"Palo Alto Networks",
77+
"pgeposervice",
78+
"pgsystemtray",
79+
"privilegeguard",
80+
"procwall",
81+
"protectorservic",
82+
"qianxin",
83+
"qradar",
84+
"qualys",
85+
"rapid7",
86+
"redcloak",
87+
"red canary",
88+
"SanerNow",
89+
"sangfor",
90+
"secureworks",
91+
"securityhealthservice",
92+
"semlaunchsv",
93+
"sentinel",
94+
"sentinelone",
95+
"sepliveupdat",
96+
"sisidsservice",
97+
"sisipsservice",
98+
"sisipsutil",
99+
"smc.exe",
100+
"smcgui",
101+
"snac64",
102+
"somma",
103+
"sophos",
104+
"splunk",
105+
"srtsp",
106+
"symantec",
107+
"symcorpu",
108+
"symefasi",
109+
"sysinternal",
110+
"sysmon",
111+
"tanium",
112+
"tda.exe",
113+
"tdawork",
114+
"tehtris",
115+
"threat",
116+
"trellix",
117+
"tpython",
118+
"trend micro",
119+
"uptycs",
120+
"vectra",
121+
"watchguard",
122+
"wincollect",
123+
"windowssensor",
124+
"wireshark",
125+
"withsecure",
126+
"xagt.exe",
127+
"xagtnotif.exe"
128+
];
129+
130+
use std::process::Command;
131+
use std::fs;
132+
use regex::Regex;
133+
134+
fn check_edr() -> Result<(), Box<dyn std::error::Error>> {
135+
let edr_regex = Regex::new(&format!("(?i)({})", EDR_LIST.join("|")))?;
136+
137+
let output = Command::new("wmic").args(&["process", "get", "name"]).output()?;
138+
if let Ok(processes) = String::from_utf8(output.stdout) {
139+
for line in processes.lines() {
140+
if edr_regex.is_match(line) {
141+
println!("[-] Suspicious process found: {}", line);
142+
}
143+
}
144+
}
145+
146+
let output = Command::new("wmic").args(&["service", "get", "name"]).output()?;
147+
if let Ok(services) = String::from_utf8(output.stdout) {
148+
for line in services.lines() {
149+
if edr_regex.is_match(line) {
150+
println!("[-] Suspicious service found: {}", line);
151+
}
152+
}
153+
}
154+
155+
for dir in &["C:\\Program Files", "C:\\Program Files (x86)", "C:\\ProgramData"] {
156+
if let Ok(entries) = fs::read_dir(dir) {
157+
for entry in entries {
158+
if let Ok(entry) = entry {
159+
if let Some(name) = entry.file_name().to_str() {
160+
if edr_regex.is_match(name) {
161+
println!("[-] Suspicious file found in {}: {}", dir, name);
162+
}
163+
}
164+
}
165+
}
166+
}
167+
}
168+
169+
Ok(())
170+
}
171+
172+
fn main() -> Result<(), Box<dyn std::error::Error>>{
173+
check_edr()?;
174+
Ok(())
175+
}

0 commit comments

Comments
 (0)