Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve .NET detections for ZIP compression and OS detection #715

Merged
merged 2 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions nursery/create-zip-archive-in-dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
rule:
meta:
name: create zip archive in .NET
namespace: data-manipulation/compression
authors:
- [email protected]
scope: basic block
features:
- and:
- optional:
- api: System.IO.Compression.ZipFile::Open
- or:
- api: System.IO.Compression.ZipFile::CreateFromDirectory
- api: System.IO.Compression.ZipFile::CreateEntryFromFile
19 changes: 19 additions & 0 deletions nursery/extract-zip-archive-in-dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
rule:
meta:
name: extract zip archive in .NET
namespace: data-manipulation/compression
authors:
- [email protected]
- [email protected]
scope: basic block
att&ck:
- Defense Evasion::Deobfuscate/Decode Files or Information [T1140]
features:
- and:
- optional:
- api: System.IO.Compression.ZipFile::Open
- api: System.IO.Compression.ZipFile::OpenRead
- or:
- api: System.IO.Compression.ZipFileExtensions::ExtractToFile
- api: System.IO.Compression.ZipFileExtensions::ExtractToDirectory
- api: System.IO.Compression.ZipFile::ExtractToDirectory
14 changes: 0 additions & 14 deletions nursery/extract-zip-archive.yml

This file was deleted.

4 changes: 3 additions & 1 deletion nursery/get-os-version-in-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ rule:
namespace: host-interaction/os/version
authors:
- [email protected]
scope: function
scope: basic block
att&ck:
- Discovery::System Information Discovery [T1082]
features:
- or:
- property/read: System.Environment::OSVersion
- property/read: System.Environment::Is64BitOperatingSystem
- property/read: System.OperatingSystem::Version
- property/read: Microsoft.VisualBasic.Devices.ComputerInfo::OSFullName