- 
                Notifications
    
You must be signed in to change notification settings  - Fork 198
 
Add dotnet rules having property features #601
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
          
     Merged
      
      
            mike-hunhoff
  merged 10 commits into
  mandiant:master
from
anushkavirgaonkar:feature_property
  
      
      
   
  Oct 3, 2022 
      
    
  
     Merged
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            10 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      ff6d88c
              
                Add dotnet rules having property features
              
              
                anushkavirgaonkar fceee81
              
                Update communication/ftp/send/send-file-using-ftp.yml
              
              
                anushkavirgaonkar b3cd0ab
              
                Update authors field
              
              
                anushkavirgaonkar 1fd8d49
              
                Merge branch 'feature_property' of https://github.com/anushkavirgaonk…
              
              
                anushkavirgaonkar be611e7
              
                Update rules with new property read/write syntax
              
              
                anushkavirgaonkar 1b9b973
              
                Remove class feature
              
              
                anushkavirgaonkar 7d5050b
              
                Update send-file-using-ftp.yml
              
              
                mike-hunhoff 96e3495
              
                Update create-tcp-socket.yml
              
              
                mike-hunhoff 868dff3
              
                Update set-http-cookie.yml
              
              
                mike-hunhoff 3a13660
              
                Update enumerate-gui-resources.yml
              
              
                mike-hunhoff File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,6 +4,7 @@ rule: | |
| namespace: anti-analysis/anti-debugging/debugger-detection | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| mbc: | ||
| - Anti-Behavioral Analysis::Debugger Detection::CheckRemoteDebuggerPresent [B0001.002] | ||
| 
        
          
        
         | 
    @@ -18,3 +19,4 @@ rule: | |
| - api: WUDFPlatform.WudfIsAnyDebuggerPresent | ||
| - api: WUDFPlatform.WudfIsKernelDebuggerPresent | ||
| - api: WUDFPlatform.WudfIsUserDebuggerPresent | ||
| - property: System.Diagnostics.Debugger::IsAttached | ||
        
          
          
            21 changes: 0 additions & 21 deletions
          
          21 
        
  communication/ftp/send/send-file-using-ftp-via-wininet.yml
  
  
      
      
   
        
      
      
    This file was deleted.
      
      Oops, something went wrong.
      
    
  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| rule: | ||
| meta: | ||
| name: send file using FTP | ||
| namespace: communication/ftp/send | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| mbc: | ||
| - Communication::FTP Communication::Send File [C0004.001] | ||
| - Communication::FTP Communication::WinINet [C0004.002] | ||
| examples: | ||
| - Practical Malware Analysis Lab 20-02.exe_:0x401380 | ||
| features: | ||
| - or: | ||
| - and: | ||
| - api: wininet.FtpPutFile | ||
| - optional: | ||
| - or: | ||
| - api: wininet.FtpSetCurrentDirectory | ||
| - and: | ||
| - api: wininet.InternetConnect | ||
| - number: 0x15 = IPPORT_FTP | ||
| - and: | ||
| - api: System.Net.WebRequest::Create | ||
| - class: System.Net.FtpWebRequest | ||
| - string: STOR | ||
                
      
                  anushkavirgaonkar marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| - property: System.Net.WebRequest::Method | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,11 +4,13 @@ rule: | |
| namespace: communication/http | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| mbc: | ||
| - Communication::HTTP Communication::Read Header [C0002.014] | ||
| examples: | ||
| - 6A352C3E55E8AE5ED39DC1BE7FB964B1:0x10002A30 | ||
| features: | ||
| - and: | ||
| - or: | ||
| - api: winhttp.WinHttpQueryHeaders | ||
| - property: System.Net.WebClient::Headers | ||
                
      
                  mike-hunhoff marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,11 +4,13 @@ rule: | |
| namespace: communication/http | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| mbc: | ||
| - Communication::HTTP Communication::Set Header [C0002.013] | ||
| examples: | ||
| - 6A352C3E55E8AE5ED39DC1BE7FB964B1:0x1000E230 | ||
| features: | ||
| - and: | ||
| - or: | ||
| - api: winhttp.WinHttpAddRequestHeaders | ||
| - property: System.Net.WebClient::Headers | ||
                
      
                  mike-hunhoff marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -5,6 +5,7 @@ rule: | |
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::File and Directory Discovery [T1083] | ||
| 
        
          
        
         | 
    @@ -30,3 +31,5 @@ rule: | |
| - api: shell32.SHGetSpecialFolderPath | ||
| - api: shell32.SHGetSpecialFolderLocation | ||
| - api: System.IO.Directory::GetCurrentDirectory | ||
| - property: System.Environment::SystemDirectory | ||
| - property: System.Environment::CurrentDirectory | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,6 +4,7 @@ rule: | |
| namespace: host-interaction/file-system/meta | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::File and Directory Discovery [T1083] | ||
| 
        
          
        
         | 
    @@ -13,3 +14,4 @@ rule: | |
| - or: | ||
| - api: kernel32.GetFileSize | ||
| - api: kernel32.GetFileSizeEx | ||
| - property: System.IO.FileInfo::Length | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,6 +4,7 @@ rule: | |
| namespace: host-interaction/hardware/cpu | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::System Information Discovery [T1082] | ||
| 
        
          
        
         | 
    @@ -12,12 +13,14 @@ rule: | |
| examples: | ||
| - al-khaser_x86.exe_:0x432CB0 | ||
| features: | ||
| - and: | ||
| - match: PEB access | ||
| - or: | ||
| - and: | ||
| - arch: i386 | ||
| - number: 0x64 = PEB->NumberOfProcessors | ||
| - and: | ||
| - arch: amd64 | ||
| - number: 0xB8 = PEB->NumberOfProcessors | ||
| - or: | ||
| - and: | ||
| - match: PEB access | ||
| - or: | ||
| - and: | ||
| - arch: i386 | ||
| - number: 0x64 = PEB->NumberOfProcessors | ||
| - and: | ||
| - arch: amd64 | ||
| - number: 0xB8 = PEB->NumberOfProcessors | ||
| - property: System.Environment::ProcessorCount | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,6 +4,7 @@ rule: | |
| namespace: host-interaction/hardware/storage | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::System Information Discovery [T1082] | ||
| 
        
          
        
         | 
    @@ -19,3 +20,7 @@ rule: | |
| - api: kernel32.GetVolumePathNamesForVolumeName | ||
| - api: kernel32.GetLogicalDriveStrings | ||
| - api: kernel32.QueryDosDevice | ||
| - property: System.IO.DriveInfo::VolumeLabel | ||
| - property: System.IO.DriveInfo::DriveType | ||
| - property: System.IO.DriveInfo::DriveFormat | ||
| - property: System.IO.DriveInfo::Name | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,6 +4,7 @@ rule: | |
| namespace: host-interaction/hardware/storage | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::System Information Discovery [T1082] | ||
| 
        
          
        
         | 
    @@ -16,6 +17,9 @@ rule: | |
| - or: | ||
| - api: kernel32.GetDiskFreeSpace | ||
| - api: kernel32.GetDiskFreeSpaceEx | ||
| - property: System.IO.DriveInfo::TotalSize | ||
| - property: System.IO.DriveInfo::TotalFreeSpace | ||
| - property: System.IO.DriveInfo::AvailableFreeSpace | ||
| - basic block: | ||
| - and: | ||
| - api: DeviceIoControl | ||
| 
          
            
          
           | 
    ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,11 +4,14 @@ rule: | |
| namespace: host-interaction/network/domain | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| description: Looks for imported Windows APIs being called to collect information about the Windows domain that a computer is connected to. | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::System Network Configuration Discovery [T1016] | ||
| examples: | ||
| - 9B7CCAA2AE6A5B96E3110EBCBC4311F6:0x1001C184 | ||
| features: | ||
| - api: netapi32.DsRoleGetPrimaryDomainInformation | ||
| - or: | ||
| - api: netapi32.DsRoleGetPrimaryDomainInformation | ||
| - property: System.Net.NetworkInformation.IPGlobalProperties::DomainName | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -5,6 +5,7 @@ rule: | |
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::System Information Discovery [T1082] | ||
| 
        
          
        
         | 
    @@ -18,3 +19,4 @@ rule: | |
| - api: GetComputerObjectName | ||
| - api: ws2_32.gethostname | ||
| - api: gethostname | ||
| - property: System.Environment::MachineName | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,6 +4,7 @@ rule: | |
| namespace: host-interaction/process/create | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| mbc: | ||
| - Process::Create Process [C0017] | ||
| 
        
          
        
         | 
    @@ -12,24 +13,34 @@ rule: | |
| examples: | ||
| - Practical Malware Analysis Lab 14-02.exe_:0x4011C0 | ||
| features: | ||
| - and: | ||
| - or: | ||
| - description: API functions that accept a pointer to a STARTUPINFO structure | ||
| - api: kernel32.CreateProcess | ||
| - api: kernel32.CreateProcessInternal | ||
| - api: advapi32.CreateProcessAsUser | ||
| - api: advapi32.CreateProcessWithLogon | ||
| - api: advapi32.CreateProcessWithToken | ||
| - number: 0x101 = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW | ||
| # STARTF_USESTDHANDLES indicates the hStdInput, hStdOutput, and hStdError members contain additional information | ||
| # STARTF_USESHOWWINDOW indicates the wShowWindow member contains additional information | ||
| - or: | ||
| - and: | ||
| - arch: i386 | ||
| - number: 0x44 = StartupInfo.cb (size) | ||
| - and: | ||
| - arch: amd64 | ||
| - number: 0x68 = StartupInfo.cb (size) | ||
| # STARTUPINFOEX size values not currently supported by this rule. | ||
| - optional: | ||
| - api: kernel32.GetStartupInfo | ||
| - or: | ||
| - and: | ||
| - or: | ||
| - description: API functions that accept a pointer to a STARTUPINFO structure | ||
| - api: kernel32.CreateProcess | ||
| - api: kernel32.CreateProcessInternal | ||
| - api: advapi32.CreateProcessAsUser | ||
| - api: advapi32.CreateProcessWithLogon | ||
| - api: advapi32.CreateProcessWithToken | ||
| - number: 0x101 = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW | ||
| # STARTF_USESTDHANDLES indicates the hStdInput, hStdOutput, and hStdError members contain additional information | ||
| # STARTF_USESHOWWINDOW indicates the wShowWindow member contains additional information | ||
| - or: | ||
| - and: | ||
| - arch: i386 | ||
| - number: 0x44 = StartupInfo.cb (size) | ||
| - and: | ||
| - arch: amd64 | ||
| - number: 0x68 = StartupInfo.cb (size) | ||
| # STARTUPINFOEX size values not currently supported by this rule. | ||
| - optional: | ||
| - api: kernel32.GetStartupInfo | ||
| - and: | ||
| - api: System.Diagnostics.Process::Start | ||
| - or: | ||
| - property: System.Diagnostics.ProcessStartInfo::UseShellExecute | ||
| - property: System.Diagnostics.ProcessStartInfo::Verb | ||
| - property: System.Diagnostics.ProcessStartInfo::WindowStyle | ||
| - property: System.Diagnostics.ProcessStartInfo::WorkingDirectory | ||
| - property: System.Diagnostics.ProcessStartInfo::FileName | ||
| - property: System.Diagnostics.ProcessStartInfo::Arguments | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -4,6 +4,7 @@ rule: | |
| namespace: host-interaction/process/modules/list | ||
| authors: | ||
| - [email protected] | ||
| - [email protected] | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::Process Discovery [T1057] | ||
| 
          
            
          
           | 
    @@ -36,3 +37,6 @@ rule: | |
| - number: 0x10 = TH32CS_SNAPMODULE32 | ||
| - number: 0x18 = TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32 | ||
| - api: kernel32.CreateToolhelp32Snapshot | ||
| - and: | ||
| - property: System.Diagnostics.Process::Modules | ||
| - property: System.Diagnostics.ProcessModuleCollection::Item | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| rule: | ||
| meta: | ||
| name: extract zip archive | ||
| namespace: host-interaction/file-system | ||
| authors: | ||
| - [email protected] | ||
| scope: function | ||
| att&ck: | ||
| - Discovery::File and Directory Discovery [T1083] | ||
| features: | ||
| - and: | ||
| - api: System.IO.Compression.ZipFile::Open | ||
| - property: System.IO.Compression.ZipArchive::Entries | ||
| - api: System.IO.Compression.ZipFileExtensions::ExtractToFile | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -6,5 +6,6 @@ rule: | |
| - [email protected] | ||
| scope: function | ||
| features: | ||
| - and: | ||
| - or: | ||
| - api: System.Net.CookieContainer::SetCookies | ||
| - property: System.Net.HttpWebRequest::CookieContainer | ||
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.