Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit 2e413f7

Browse files
authored
Merge pull request #195 from martyav/python-macos
added Python macos query
2 parents 5d85304 + 3687fc8 commit 2e413f7

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Python-based attacks on macOS
2+
3+
This query was originally published in the threat analytics report, *Python abuse on macOS*
4+
5+
The Python programming language comes bundled with macOS. In threat intelligence gathered from macOS endpoints, we have observed numerous attacks run with *[EmPyre](https://github.com/EmpireProject/EmPyre)*, a Python-based post-exploitation framework similar to [PowerShell Empire](https://www.powershellempire.com/) for Windows.
6+
7+
The following query checks for Microsoft Office documents that run Python scripts.
8+
9+
## Query
10+
11+
```Kusto
12+
DeviceProcessEvents
13+
| where InitiatingProcessParentFileName in ("Microsoft Word", "Microsoft Excel")
14+
| where FileName =~ "Python"
15+
| where ProcessCommandLine matches regex "[A-Za-z0-9]{50}"
16+
```
17+
18+
## Category
19+
20+
This query can be used to detect the following attack techniques and tactics ([see MITRE ATT&CK framework](https://attack.mitre.org/)) or security configuration states.
21+
22+
| Technique, tactic, or state | Covered? (v=yes) | Notes |
23+
|-|-|-|
24+
| Initial access | | |
25+
| Execution | v | |
26+
| Persistence | | |
27+
| Privilege escalation | | |
28+
| Defense evasion | | |
29+
| Credential Access | | |
30+
| Discovery | | |
31+
| Lateral movement | | |
32+
| Collection | | |
33+
| Command and control | | |
34+
| Exfiltration | | |
35+
| Impact | | |
36+
| Vulnerability | | |
37+
| Misconfiguration | | |
38+
| Malware, component | | |
39+
40+
## Contributor info
41+
42+
**Contributor:** Microsoft Threat Protection team

0 commit comments

Comments
 (0)