Skip to content

Commit 1bf58dc

Browse files
authored
Merge pull request #931 from mandiant/new/20240920
rules: dotnet: adding new .NET rules
2 parents dec3ded + e67af53 commit 1bf58dc

6 files changed

+82
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
rule:
2+
meta:
3+
name: access unmanaged COM objects in .NET
4+
namespace: host-interaction/com
5+
authors:
6+
7+
scopes:
8+
static: function
9+
dynamic: unsupported # requires .NET API feature
10+
features:
11+
- or:
12+
- api: System.Runtime.InteropServices.Marshal::GetTypeFromCLSID
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
rule:
2+
meta:
3+
name: implement UI automation client in .NET
4+
namespace: host-interaction/ui/automation
5+
authors:
6+
7+
scopes:
8+
static: file
9+
dynamic: unsupported # requires .NET Namespace feature
10+
references:
11+
- https://learn.microsoft.com/en-us/dotnet/api/system.windows.automation?view=windowsdesktop-8.0
12+
features:
13+
- or:
14+
- namespace: System.Windows.Automation
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
rule:
2+
meta:
3+
name: interact with shortcut via IWshShortcut in .NET
4+
namespace: host-interaction/shortcut
5+
authors:
6+
7+
scopes:
8+
static: function
9+
dynamic: unsupported # requires .NET Class feature
10+
references:
11+
- https://stackoverflow.com/questions/4897655/create-a-shortcut-on-desktop
12+
features:
13+
- or:
14+
- class: IWshRuntimeLibrary.IWshShortcut
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
rule:
2+
meta:
3+
name: interact with Windows Scripting Host in .NET
4+
namespace: host-interaction/wsh
5+
authors:
6+
7+
scopes:
8+
static: file
9+
dynamic: unsupported # requires .NET Namespace feature
10+
references:
11+
- https://stackoverflow.com/questions/4897655/create-a-shortcut-on-desktop
12+
features:
13+
- or:
14+
- namespace: IWshRuntimeLibrary
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
rule:
2+
meta:
3+
name: use .NET library SimpleJSON
4+
namespace: data-manipulation/json
5+
authors:
6+
7+
scopes:
8+
static: file
9+
dynamic: unsupported # requires .NET Class feature
10+
references:
11+
- https://github.com/mhallin/SimpleJSON.NET
12+
features:
13+
- or:
14+
- class: Json.SimpleJson
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
rule:
2+
meta:
3+
name: use .NET library websocket-sharp
4+
namespace: communication/websocket
5+
authors:
6+
7+
scopes:
8+
static: file
9+
dynamic: unsupported # requires .NET Namespace feature
10+
references:
11+
- https://github.com/sta/websocket-sharp
12+
features:
13+
- or:
14+
- namespace: WebSocketSharp

0 commit comments

Comments
 (0)