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

Add three techniques and some new images #5115

Conversation

CheraghiMilad
Copy link
Contributor

Summary of the Pull Request

This rule detects adversaries attempting to discover group and permission settings.

Changelog

Example Log Event

groups log

<Event>
  <System>
    <Provider Name="Linux-Sysmon" Guid="{ff032593-a8d3-4f13-b0d6-01fc615a0f97}"/>
    <EventID>1</EventID>
    <Version>5</Version>
    <Level>4</Level>
    <Task>1</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2024-12-01T11:07:26.551148000Z"/>
    <EventRecordID>286262</EventRecordID>
    <Correlation/>
    <Execution ProcessID="1258" ThreadID="1258"/>
    <Channel>Linux-Sysmon/Operational</Channel>
    <Computer>caldera-virtual-machine</Computer>
    <Security UserId="0"/>
  </System>
  <EventData>
    <Data Name="RuleName">-</Data>
    <Data Name="UtcTime">2024-11-26 18:50:45.939</Data>
    <Data Name="ProcessGuid">{36fe7a82-1885-6746-91ce-8c4be7550000}</Data>
    <Data Name="ProcessId">19678</Data>
    <Data Name="Image">/usr/bin/groups</Data>
    <Data Name="FileVersion">-</Data>
    <Data Name="Description">-</Data>
    <Data Name="Product">-</Data>
    <Data Name="Company">-</Data>
    <Data Name="OriginalFileName">-</Data>
    <Data Name="CommandLine">groups</Data>
    <Data Name="CurrentDirectory">/tmp</Data>
    <Data Name="User">caldera</Data>
    <Data Name="LogonGuid">{36fe7a82-0000-0000-e803-000000000000}</Data>
    <Data Name="LogonId">1000</Data>
    <Data Name="TerminalSessionId">3</Data>
    <Data Name="IntegrityLevel">no level</Data>
    <Data Name="Hashes">SHA256=175a52497e658e138f7dce3fbb3ba7d794f302dc7be29f9c9ca79a8cb377554c</Data>
    <Data Name="ParentProcessGuid">{36fe7a82-1381-6743-d526-4b5458550000}</Data>
    <Data Name="ParentProcessId">2249</Data>
    <Data Name="ParentImage">/usr/bin/bash</Data>
    <Data Name="ParentCommandLine">bash</Data>
    <Data Name="ParentUser">caldera</Data>
  </EventData>
</Event>

netstat log

<Event>
  <System>
    <Provider Name="Linux-Sysmon" Guid="{ff032593-a8d3-4f13-b0d6-01fc615a0f97}"/>
    <EventID>1</EventID>
    <Version>5</Version>
    <Level>4</Level>
    <Task>1</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2024-12-01T11:08:55.895691000Z"/>
    <EventRecordID>286269</EventRecordID>
    <Correlation/>
    <Execution ProcessID="1258" ThreadID="1258"/>
    <Channel>Linux-Sysmon/Operational</Channel>
    <Computer>caldera-virtual-machine</Computer>
    <Security UserId="0"/>
  </System>
  <EventData>
    <Data Name="RuleName">-</Data>
    <Data Name="UtcTime">2024-11-26 18:52:15.275</Data>
    <Data Name="ProcessGuid">{36fe7a82-18df-6746-7d0c-f4aabf550000}</Data>
    <Data Name="ProcessId">19688</Data>
    <Data Name="Image">/usr/bin/netstat</Data>
    <Data Name="FileVersion">-</Data>
    <Data Name="Description">-</Data>
    <Data Name="Product">-</Data>
    <Data Name="Company">-</Data>
    <Data Name="OriginalFileName">-</Data>
    <Data Name="CommandLine">netstat localgroup</Data>
    <Data Name="CurrentDirectory">/tmp</Data>
    <Data Name="User">caldera</Data>
    <Data Name="LogonGuid">{36fe7a82-0000-0000-e803-000000000000}</Data>
    <Data Name="LogonId">1000</Data>
    <Data Name="TerminalSessionId">3</Data>
    <Data Name="IntegrityLevel">no level</Data>
    <Data Name="Hashes">SHA256=7af5f6cda055b65e31298fe20ed4456a87d2ca92803552bc0d3422f0e1a1fda1</Data>
    <Data Name="ParentProcessGuid">{36fe7a82-1381-6743-d526-4b5458550000}</Data>
    <Data Name="ParentProcessId">2249</Data>
    <Data Name="ParentImage">/usr/bin/bash</Data>
    <Data Name="ParentCommandLine">bash</Data>
    <Data Name="ParentUser">caldera</Data>
  </EventData>
</Event>

getent log

Dec 1 12:08:30 caldera-virtual-machine sysmon: 
<Event>
  <System>
    <Provider Name="Linux-Sysmon" Guid="{ff032593-a8d3-4f13-b0d6-01fc615a0f97}"/>
    <EventID>1</EventID>
    <Version>5</Version>
    <Level>4</Level>
    <Task>1</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2024-12-01T11:08:30.797177000Z"/>
    <EventRecordID>286268</EventRecordID>
    <Correlation/>
    <Execution ProcessID="1258" ThreadID="1258"/>
    <Channel>Linux-Sysmon/Operational</Channel>
    <Computer>caldera-virtual-machine</Computer>
    <Security UserId="0"/>
  </System>
  <EventData>
    <Data Name="RuleName">-</Data>
    <Data Name="UtcTime">2024-11-26 18:51:50.183</Data>
    <Data Name="ProcessGuid">{36fe7a82-18c6-6746-6570-640d07560000}</Data>
    <Data Name="ProcessId">19682</Data>
    <Data Name="Image">/usr/bin/getent</Data>
    <Data Name="FileVersion">-</Data>
    <Data Name="Description">-</Data>
    <Data Name="Product">-</Data>
    <Data Name="Company">-</Data>
    <Data Name="OriginalFileName">-</Data>
    <Data Name="CommandLine">getent group</Data>
    <Data Name="CurrentDirectory">/tmp</Data>
    <Data Name="User">caldera</Data>
    <Data Name="LogonGuid">{36fe7a82-0000-0000-e803-000000000000}</Data>
    <Data Name="LogonId">1000</Data>
    <Data Name="TerminalSessionId">3</Data>
    <Data Name="IntegrityLevel">no level</Data>
    <Data Name="Hashes">SHA256=b8c45799a591949d1728e7177fa14ddb110102dfe20d7b3610ce7f448e7bb902</Data>
    <Data Name="ParentProcessGuid">{36fe7a82-1381-6743-d526-4b5458550000}</Data>
    <Data Name="ParentProcessId">2249</Data>
    <Data Name="ParentImage">/usr/bin/bash</Data>
    <Data Name="ParentCommandLine">bash</Data>
    <Data Name="ParentUser">caldera</Data>
    host = caldera-virtual-machine
    source = Syslog:Linux-Sysmon/Operational
    sourcetype = sysmon_linux
  </EventData>
</Event>

id -Gn log

<Event>
  <System>
    <Provider Name="Linux-Sysmon" Guid="{ff032593-a8d3-4f13-b0d6-01fc615a0f97}"/>
    <EventID>1</EventID>
    <Version>5</Version>
    <Level>4</Level>
    <Task>1</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2024-12-09T07:17:20.100898000Z"/>
    <EventRecordID>375686</EventRecordID>
    <Correlation/>
    <Execution ProcessID="1252" ThreadID="1252"/>
    <Channel>Linux-Sysmon/Operational</Channel>
    <Computer>caldera-virtual-machine</Computer>
    <Security UserId="0"/>
  </System>
  <EventData>
    <Data Name="RuleName">-</Data>
    <Data Name="UtcTime">2024-12-08 17:03:58.251</Data>
    <Data Name="ProcessGuid">{36fe7a82-d17e-6755-e121-65502e560000}</Data>
    <Data Name="ProcessId">5294</Data>
    <Data Name="Image">/usr/bin/id</Data>
    <Data Name="FileVersion">-</Data>
    <Data Name="Description">-</Data>
    <Data Name="Product">-</Data>
    <Data Name="Company">-</Data>
    <Data Name="OriginalFileName">-</Data>
    <Data Name="CommandLine">id -Gn caldera</Data>
    <Data Name="CurrentDirectory">/home/caldera</Data>
    <Data Name="User">caldera</Data>
    <Data Name="LogonGuid">{36fe7a82-0000-0000-e803-000000000000}</Data>
    <Data Name="LogonId">1000</Data>
    <Data Name="TerminalSessionId">3</Data>
    <Data Name="IntegrityLevel">no level</Data>
    <Data Name="Hashes">SHA256=371021b0c9ab1a3c893ca98b1c648445e3cfe5c6883d9c0a5b1d0339c0d4cd2d</Data>
    <Data Name="ParentProcessGuid">{36fe7a82-6868-6755-d5d6-c908e8550000}</Data>
    <Data Name="ParentProcessId">2352</Data>
    <Data Name="ParentImage">/usr/bin/bash</Data>
    <Data Name="ParentCommandLine">bash</Data>
    <Data Name="ParentUser">caldera</Data>
  </EventData>
</Event>

Fixed Issues

SigmaHQ Rule Creation Conventions

  • If your PR adds new rules, please consider following and applying these conventions

@github-actions github-actions bot added Rules Linux Pull request add/update linux related rules labels Dec 9, 2024
@frack113 frack113 added the 2nd Review Needed PR need a second approval label Dec 14, 2024
@nasbench
Copy link
Member

Closing this as its already in #5128

@CheraghiMilad you're very clumsy in regards to PRs a lot of duplication sometimes and closing of already reviewed PRs. Please fix this behavior in the future.

@nasbench nasbench closed this Dec 14, 2024
@CheraghiMilad CheraghiMilad deleted the proc_creation_lnx_local_groups branch December 14, 2024 20:53
@CheraghiMilad CheraghiMilad restored the proc_creation_lnx_local_groups branch December 15, 2024 06:59
@CheraghiMilad
Copy link
Contributor Author

@nasbench You said in branch #5103 (#discussion_r1874829467), I created a new rule called (CheraghiMilad:proc_creation_password_group_discovery) which was wrong, because this rule with the name (proc_creation_lnx_local_groups.yml) existed. To avoid mistakes, I closed the previous PR and created a new PR that only adds a few techniques to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2nd Review Needed PR need a second approval Linux Pull request add/update linux related rules Rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants