Commit Graph

413 Commits

Author SHA1 Message Date
Florian Roth e91fc4486e refactor: first bigger log source refactoring
see discussion here: https://github.com/SigmaHQ/sigma/discussions/2835
2022-03-22 17:58:29 +01:00
SimSama c37ae60cff Merge branch 'master' into master 2022-03-16 16:29:34 -05:00
Florian Roth 6d6e69b672 Merge pull request #2818 from redsand/hawk_publish
Merging latest changes for HAWK.IO
2022-03-16 22:28:28 +01:00
SimSama 3c864286be Update fortisiem-windows.yml
Removed duplicate title
2022-03-16 16:14:38 -05:00
Tim Shelton eefd026037 Merging latest changes for HAWK.IO 2022-03-16 20:26:49 +00:00
meiliumeiliu 37ef85ffa6 Merge pull request #1 from FortiSIEM/master
Merge code to FortiSIEM from AccelOps
2022-03-16 10:02:23 -07:00
Joel Perron-Langlois d1afed9f66 Update MITRE ATT&CK tactics and techniques to v10.1. Added fields. Created files for groups and software. 2022-03-15 22:41:46 -04:00
Max Altgelt 1044a20149 feat: Add log sources for process listing within THOR 2022-03-15 11:51:59 +01:00
Mei Liu b85482a9bc Example:
-O:
attackMapFile: It's used to set subFunction in XML rule. It's a map of subFunction and tags.attack in YML file.
ruleIndex: It's used to set rule id in XML rule. The format of rule id is PH_Rule_{ruleType}_SIGMA_{ruleIndex}
ruleType: It's used to set rule id in XML rule.

1. Generate rule for one YML file
    a. tools/sigmac -t fortisiem -c fortisiem-windows rules/windows/network_connection/win_net_python.yml
    b. tools/sigmac -t fortisiem -c fortisiem-windows -O attackMapFile=tools/config/fortisiem/MITRE-Attack-matrix.csv -O ruleIndex=0 -O ruleType=Windows rules/windows/network_connection/win_net_python.yml
   Output:
      <Rules>
      <Rule group="PH_SYS_RULE_THREAT_HUNTING" natural_id="PH_Rule_Windows_SIGMA_0"  phIncidentCategory="Server" function="Security" subFunction="Discovery" technique="T1046">
         <Name>Python Initiated Connection </Name>
         <IncidentTitle>Python Initiated Connection</IncidentTitle>
         <active>true</active>
         <Description> Adversaries may attempt to get a listing of services running on remote hosts, including those that may be vulnerable to remote software exploitation </Description>
         <SigmaFileName> rules/windows/network_connection/win_net_python.yml </SigmaFileName>
         <CustomerScope groupByEachCustomer="true">
            <Include all="true"/>
           <Exclude/>
         </CustomerScope>
         <IncidentDef eventType="PH_RULE_Python_Initiated_Connection" severity="7">
           <ArgList> compEventType = Filter.eventType,hostName = Filter.hostName,isInitialed = Filter.isInitialed,procName = Filter.procName </ArgList>
         </IncidentDef>
         <PatternClause window="300">
           <SubPattern displayName="Filter" name="Filter">
               <SingleEvtConstr> eventType REGEXP ( "Win-Sysmon-3-Network-Connect.*" ) AND isInitialed="true" AND procName REGEXP ( ".*python.*" ) </SingleEvtConstr>
               <GroupByAttr> eventType,hostName,isInitialed,procName </GroupByAttr>
               <GroupEvtConstr> COUNT(*) &gt;= 1 </GroupEvtConstr>
           </SubPattern>
         </PatternClause>
         <TriggerEventDisplay>
           <AttrList> phRecvTime,hostName,isInitialed,procName,rawEventMsg </AttrList>
         </TriggerEventDisplay>
       </Rule>
       </Rules>

2. Generate rules for YML files under rules/windows
   a. tools/sigmac -t fortisiem -c fortisiem-windows -r rules/windows -o rule.xml
   b. tools/sigmac -t fortisiem -c fortisiem-windows -r rules/windows -O attackMapFile=tools/config/fortisiem/MITRE-Attack-matrix.csv -O ruleIndex=0 -O ruleType=Windows -o rule.xml
   Generate rules for YML files under rules/windows

3. Find files that is modified after some date.
  a. tools/sigmac --lists-files-after-date 2020/06/04 rules/windows/wmi_event/sysmon_wmi_susp_scripting.yml
  b. tools/sigmac --lists-files-after-date 2020/06/04 -r rules/windows/
  Output:
     rules/windows/wmi_event/sysmon_wmi_susp_scripting.yml, Updated
     rules/windows/wmi_event/TestFile.yml, No date
2022-03-09 11:26:07 -08:00
Mei Liu 96196454cf -O:
attackMapFile: It's used to set subFunction in XML rule. It's a map of subFunction and tags.attack in YML file.
ruleIndex: It's used to set rule id in XML rule. The format of rule id is PH_Rule_{ruleType}_SIGMA_{ruleIndex}
ruleType: It's used to set rule id in XML rule.

1. Generate rule for one YML file
    a. tools/sigmac -t fortisiem -c fortisiem-windows rules/windows/network_connection/win_net_python.yml
    b. tools/sigmac -t fortisiem -c fortisiem-windows -O attackMapFile=tools/config/fortisiem/MITRE-Attack-matrix.csv -O ruleIndex=0 -O ruleType=Windows rules/windows/network_connection/win_net_python.yml
   Output:
      <Rule group="PH_SYS_RULE_THREAT_HUNTING" id="PH_Rule_Windows_SIGMA_0"  phIncidentCategory="Server" function="Security" subFunction="Discovery" technique="T1046">
         <Name>Python Initiated Connection </Name>
         <IncidentTitle>Python Initiated Connection</IncidentTitle>
         <active>true</active>
         <Description> Adversaries may attempt to get a listing of services running on remote hosts, including those that may be vulnerable to remote software exploitation </Description>
         <SigmaFileName> rules/windows/network_connection/win_net_python.yml </SigmaFileName>
         <CustomerScope groupByEachCustomer="true">
            <Include all="true"/>
           <Exclude/>
         </CustomerScope>
         <IncidentDef eventType="PH_RULE_Python_Initiated_Connection" severity="7">
           <ArgList> compEventType = Filter.eventType,hostName = Filter.hostName,isInitialed = Filter.isInitialed,procName = Filter.procName </ArgList>
         </IncidentDef>
         <PatternClause window="300">
           <SubPattern displayName="Filter" name="Filter">
               <SingleEvtConstr> eventType REGEXP ( "Win-Sysmon-3-Network-Connect.*" ) AND isInitialed="true" AND procName REGEXP ( ".*python.*" ) </SingleEvtConstr>
               <GroupByAttr> eventType,hostName,isInitialed,procName </GroupByAttr>
               <GroupEvtConstr> COUNT(*) &gt;= 1 </GroupEvtConstr>
           </SubPattern>
         </PatternClause>
         <TriggerEventDisplay>
           <AttrList> phRecvTime,hostName,isInitialed,procName,rawEventMsg </AttrList>
         </TriggerEventDisplay>
       </Rule>

2. Generate rules for YML files under rules/windows
   a. tools/sigmac -t fortisiem -c fortisiem-windows -r rules/windows -o rule.xml
   b. tools/sigmac -t fortisiem -c fortisiem-windows -r rules/windows -O attackMapFile=tools/config/fortisiem/MITRE-Attack-matrix.csv -O ruleIndex=0 -O ruleType=Windows -o rule.xml
   Generate rules for YML files under rules/windows

3. Find files that is modified after some date.
  a. tools/sigmac --lists-files-after-date 2020/06/04 rules/windows/wmi_event/sysmon_wmi_susp_scripting.yml
  b. tools/sigmac --lists-files-after-date 2020/06/04 -r rules/windows/
  Output:
     rules/windows/wmi_event/sysmon_wmi_susp_scripting.yml, Updated
     rules/windows/wmi_event/TestFile.yml, No date
2022-03-08 09:36:22 -08:00
Florian Roth 979d25ed67 fix: casing in thor config 2022-03-07 18:18:57 +01:00
frack113 87a0bed0ec Add missing WinEventLog prefix 2022-03-05 11:35:49 +01:00
Florian Roth 335ed24751 fix: wrong channel prefix 2022-03-05 11:21:00 +01:00
frack113 53651cdd2f Add Bits-Client rules 2022-03-03 06:27:00 +01:00
frack113 1fbb9a9b29 Add missing fields
Add missing fields
2022-03-01 15:36:39 +01:00
frack113 d3dff083f2 fix channel 2022-02-23 17:50:23 +01:00
frack113 8cfab22acb Add firewall-as basic rules 2022-02-19 10:18:49 +01:00
Mei Liu 0b263fec2a Example:
-O:
attackMapFile: It's used to set subFunction in XML rule. It's a map of subFunction and tags.attack in YML file.
ruleIndex: It's used to set rule id in XML rule. The format of rule id is PH_Rule_{ruleType}_SIGMA_{ruleIndex}
ruleType: It's used to set rule id in XML rule.

1. Generate rule for one YML file
    a. tools/sigmac -t fortisiem -c fortisiem-windows rules/windows/network_connection/win_net_python.yml
    b. tools/sigmac -t fortisiem -c fortisiem-windows -O attackMapFile=/opt/phoenix/data-definition/MITRE-Attack-matrix.csv -O ruleIndex=0 -O ruleType=Windows rules/windows/network_connection/win_net_python.yml
   Output:
      <Rule group="PH_SYS_RULE_THREAT_HUNTING" id="PH_Rule_Windows_SIGMA_0"  phIncidentCategory="Server" function="Security" subFunction="Discovery" technique="T1046">
         <Name>Python Initiated Connection </Name>
         <IncidentTitle>Python Initiated Connection</IncidentTitle>
         <active>true</active>
         <Description> Adversaries may attempt to get a listing of services running on remote hosts, including those that may be vulnerable to remote software exploitation </Description>
         <SigmaFileName> rules/windows/network_connection/win_net_python.yml </SigmaFileName>
         <CustomerScope groupByEachCustomer="true">
            <Include all="true"/>
           <Exclude/>
         </CustomerScope>
         <IncidentDef eventType="PH_RULE_Python_Initiated_Connection" severity="7">
           <ArgList> compEventType = Filter.eventType,hostName = Filter.hostName,isInitialed = Filter.isInitialed,procName = Filter.procName </ArgList>
         </IncidentDef>
         <PatternClause window="300">
           <SubPattern displayName="Filter" name="Filter">
               <SingleEvtConstr> eventType REGEXP ( "Win-Sysmon-3-Network-Connect.*" ) AND isInitialed="true" AND procName REGEXP ( ".*python.*" ) </SingleEvtConstr>
               <GroupByAttr> eventType,hostName,isInitialed,procName </GroupByAttr>
               <GroupEvtConstr> COUNT(*) &gt;= 1 </GroupEvtConstr>
           </SubPattern>
         </PatternClause>
         <TriggerEventDisplay>
           <AttrList> phRecvTime,hostName,isInitialed,procName,rawEventMsg </AttrList>
         </TriggerEventDisplay>
       </Rule>

2. Generate rules for YML files under rules/windows
   a. tools/sigmac -t fortisiem -c fortisiem-windows -r rules/windows -o rule.xml
   b. tools/sigmac -t fortisiem -c fortisiem-windows -r rules/windows -O attackMapFile=/opt/phoenix/data-definition/MITRE-Attack-matrix.csv -O ruleIndex=0 -O ruleType=Windows -o rule.xml
   Generate rules for YML files under rules/windows
2022-02-15 12:03:32 -08:00
Mei Liu c5e72a9446 Example:
-O:
attackMapFile: It's used to set subFunction in XML rule. It's a map of subFunction and tags.attack in YML file.
ruleIndex: It's used to set rule id in XML rule. The format of rule id is PH_Rule_{ruleType}_SIGMA_{ruleIndex}
ruleType: It's used to set rule id in XML rule.

1. Generate rule for one YML file
    a. tools/sigmac -t fortisiem -c fortisiem-windows rules/windows/sysmon/sysmon_config_modification_error.yml
    b. tools/sigmac -t fortisiem -c fortisiem-windows -O attackMapFile=/opt/phoenix/data-definition/MITRE-Attack-matrix.csv -O ruleIndex=0 -O ruleType=Windows rules/windows/sysmon/sysmon_config_modification_error.yml
   Output:
         <Rule group="PH_SYS_RULE_THREAT_HUNTING" id="PH_Rule_SIGMA_1"  phIncidentCategory="Server" function="Security" subFunction="Persistence" technique="T1564">
           <Name>Sysmon Configuration Error </Name>
           <IncidentTitle>Sysmon Configuration Error</IncidentTitle>
           <active>true</active>
           <Description> Someone try to hide from Sysmon </Description>
           <SigmaFileName> rules/windows/sysmon/sysmon_config_modification_error.yml </SigmaFileName>
           <CustomerScope groupByEachCustomer="true">
               <Include all="true"/>
               <Exclude/>
           </CustomerScope>
           <IncidentDef eventType="PH_RULE_Sysmon_Configuration_Error" severity="7">
               <ArgList> description = Filter.description,hostName = Filter.hostName </ArgList>
           </IncidentDef>
           <PatternClause window="300">
              <SubPattern displayName="Filter" name="Filter">
                  <SingleEvtConstr> description REGEXP ( ".*Failed to connect to the driver to update configuration.*|.*Failed to open service configuration with error.*" ) AND (description NOT REGEXP ( ".*Failed to open service configuration with error.*" ) OR description NOT REGEXP ( ".*Last error: The media is write protected\\..*" )) </SingleEvtConstr>
                  <GroupByAttr> description,hostName </GroupByAttr>
                  <GroupEvtConstr> COUNT(*) &gt;= 1 </GroupEvtConstr>
              </SubPattern>
          </PatternClause>
          <TriggerEventDisplay>
              <AttrList> phRecvTime,hostName,description,rawEventMsg </AttrList>
          </TriggerEventDisplay>
      </Rule>

2. Generate rules for YML files under rules/windows
   a. tools/sigmac -t fortisiem -c fortisiem-windows -r rules/windows
   b. tools/sigmac -t fortisiem -c fortisiem-windows -r rules/windows -O attackMapFile=/opt/phoenix/data-definition/MITRE-Attack-matrix.csv -O ruleIndex=0 -O ruleType=Windows
   Generate rules for YML files under rules/windows
2022-02-14 15:51:45 -08:00
Tim Shelton c4efcae4e0 Merge branch 'master' of https://github.com/redsand/sigma into hawk 2022-01-28 00:24:07 +00:00
frack113 43690233fb Merge pull request #2572 from zeronetworks/master
feat(rules): Adding rules for the rpc_firewall
2022-01-24 18:18:22 +01:00
sagiezero 41baa3c4c5 fix(rules): misshap in "test_rules", and also updated the splunk-windows.yml configuration 2022-01-23 10:35:46 +02:00
sagiezero 2c6b779fa3 fix(rules): misshap in "test_rules", and also updated the splunk-windows.yml configuration 2022-01-23 10:18:17 +02:00
sagiezero eb5578fa33 fix(rules): fixed capital in rule names, removed unknown mitre tags, removed unknown tag in logsource. 2022-01-20 16:53:01 +02:00
Florian Roth 9b7b48c0e6 Merge branch 'rule-devel' of https://github.com/SigmaHQ/sigma into rule-devel 2022-01-20 09:45:03 +01:00
Florian Roth 68f0cdf338 feat: new log channel windows-codeintegrity-operational
https://twitter.com/SBousseaden/status/1483810148602814466
2022-01-20 09:44:36 +01:00
Tim Shelton 3c115408b6 Adding translation for Imphash 2022-01-18 15:47:53 +00:00
frack113 5890c1bb20 Fix logsource 2022-01-16 08:56:51 +01:00
frack113 0828ff098f Fix windows-dns-server 2022-01-15 09:07:26 +01:00
Tim Shelton 2732c76d66 Merge branch 'master' of https://github.com/redsand/sigma into hawk 2022-01-11 00:40:32 +00:00
Florian Roth 683c1b59cb fix: add field mapping for provider name 2022-01-07 13:08:14 +01:00
Tim Shelton 4dc4d71afc removing hawk translation of Details to object_target 2022-01-06 17:47:36 +00:00
Thomas Patzke d0c7f54794 Merge pull request #2514 from DataDog/master
Add Datadog Backend
2022-01-04 07:43:43 +01:00
Tim Shelton 1618f587ab adding missing category entries 2022-01-03 22:22:35 +00:00
Tim Shelton 01c5a62941 adding additional ps that was missed 2022-01-03 22:19:33 +00:00
Tim Shelton 8b261d9a30 Adding ps_script to config 2022-01-03 22:09:50 +00:00
Anna Pauxberger 8fa714ca26 Merge branch 'SigmaHQ:master' into master 2022-01-03 20:20:08 +01:00
Anna Pauxberger d0560d1a65 Merge pull request #1 from DataDog/add-datadog-backend
Add Datadog Backend
2022-01-03 20:19:28 +01:00
Tim Shelton a4f601f53f adding spring to config 2021-12-29 19:53:57 +00:00
Julien Doutre a21fe1eb58 Use tags instead of facets 2021-12-15 17:26:45 +01:00
Tim Shelton db97b29e35 addding missing entry 2021-12-14 21:52:57 +00:00
Tim Shelton 2a96f239a5 adding additional translation fields for web based requests. 2021-12-14 20:54:32 +00:00
Florian Roth baa5d3758d Merge branch 'master' into rule-devel 2021-12-13 18:05:17 +01:00
Florian Roth 51a4315ab9 fix: referrer > referer adjustments 2021-12-13 15:47:43 +01:00
Max Altgelt b4553dcd9d feat: Add finer powershell log source distinguation
Credits for this go to @frack113
2021-12-13 09:49:28 +01:00
Tim Shelton d1b7eda60c adding translation for User, apparently its case sensitive 2021-12-09 20:04:20 +00:00
Tim Shelton 3b7ce140c1 adding ps_module to config.. currently not listed in any config yaml for backends, will trigger regex detection on all payloads 2021-12-07 16:18:00 +00:00
Tim Shelton 1937a90cbf fixing yaml err 2021-12-06 23:03:24 +00:00
Tim Shelton 7a7cf4ede6 fix str err 2021-12-06 22:32:10 +00:00
Tim Shelton 8871898adf fixing yaml fail 2021-12-06 22:05:13 +00:00