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

Update proc_creation_win_remote_access_tools_anydesk_piped_password_via_cli.yml #5139

Closed
wants to merge 1 commit into from

Conversation

DanielKoifman
Copy link

Summary of the Pull Request

Removed "/c" and "echo" parts of the command detection.
This is due to the fact that when you pipe a command in CMD, it actually splits the command into parts, one event for each pipe, as can be seen in the photos using the command example from the rule itself:
image
image

Changelog

Update proc_creation_win_remote_access_tools_anydesk_piped_password_via_cli.yml

Example Log 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 Windows Pull request add/update windows related rules labels Dec 23, 2024
@frack113
Copy link
Member

hi,
It should be in the ParentCommandLine .
Can you provide the full log ?
thanks

@frack113 frack113 added the Work In Progress Some changes are needed label Dec 24, 2024
@DanielKoifman
Copy link
Author

In this article, it also supports this finding:
image

I am unable to find "ParentCommandLine" in the 4688 events, but here are the XMLs:

  <Data Name="SubjectUserSid">S-1-5-21-3845620932-348487932-1468179686-500</Data> 
  <Data Name="SubjectUserName">cops</Data> 
  <Data Name="SubjectDomainName">WS01</Data> 
  <Data Name="SubjectLogonId">0x17d696</Data> 
  <Data Name="NewProcessId">0xba8</Data> 
  <Data Name="NewProcessName">C:\Windows\System32\cmd.exe</Data> 
  <Data Name="TokenElevationType">%%1936</Data> 
  <Data Name="ProcessId">0x1a0c</Data> 
  <Data Name="CommandLine">C:\WINDOWS\system32\cmd.exe /C cmd.exe /c echo J9kzQ2Y0qO</Data> 
  <Data Name="TargetUserSid">S-1-0-0</Data> 
  <Data Name="TargetUserName">-</Data> 
  <Data Name="TargetDomainName">-</Data> 
  <Data Name="TargetLogonId">0x0</Data> 
  <Data Name="ParentProcessName">C:\Windows\System32\cmd.exe</Data> 
  <Data Name="MandatoryLabel">S-1-16-12288</Data> 
 <Data Name="SubjectUserSid">S-1-5-21-3845620932-348487932-1468179686-500</Data> 
  <Data Name="SubjectUserName">cops</Data> 
  <Data Name="SubjectDomainName">WS01</Data> 
  <Data Name="SubjectLogonId">0x17d696</Data> 
  <Data Name="NewProcessId">0x1b50</Data> 
  <Data Name="NewProcessName">C:\Users\cops.WS01\Downloads\AnyDesk.exe</Data> 
  <Data Name="TokenElevationType">%%1936</Data> 
  <Data Name="ProcessId">0x1a0c</Data> 
  <Data Name="CommandLine">C:\Users\cops.WS01\Downloads\AnyDesk.exe --set-password</Data> 
  <Data Name="TargetUserSid">S-1-0-0</Data> 
  <Data Name="TargetUserName">-</Data> 
  <Data Name="TargetDomainName">-</Data> 
  <Data Name="TargetLogonId">0x0</Data> 
  <Data Name="ParentProcessName">C:\Windows\System32\cmd.exe</Data> 
  <Data Name="MandatoryLabel">S-1-16-12288</Data> 
<Data Name="SubjectUserSid">S-1-5-21-3845620932-348487932-1468179686-500</Data> 
  <Data Name="SubjectUserName">cops</Data> 
  <Data Name="SubjectDomainName">WS01</Data> 
  <Data Name="SubjectLogonId">0x17d696</Data> 
  <Data Name="NewProcessId">0x1d90</Data> 
  <Data Name="NewProcessName">C:\Windows\System32\cmd.exe</Data> 
  <Data Name="TokenElevationType">%%1936</Data> 
  <Data Name="ProcessId">0xba8</Data> 
  <Data Name="CommandLine">cmd.exe /c echo J9kzQ2Y0qO</Data> 
  <Data Name="TargetUserSid">S-1-0-0</Data> 
  <Data Name="TargetUserName">-</Data> 
  <Data Name="TargetDomainName">-</Data> 
  <Data Name="TargetLogonId">0x0</Data> 
  <Data Name="ParentProcessName">C:\Windows\System32\cmd.exe</Data> 
  <Data Name="MandatoryLabel">S-1-16-12288</Data> 

@nasbench
Copy link
Member

@DanielKoifman this rule is taking the case where the attacker uses quotes like this C:\WINDOWS\system32\cmd.exe /C "cmd.exe /c echo J9kzQ2Y0qO |C:\ProgramData\anydesk.exe --set-password" because without these quotes, as its known the commands will be split. That is a higher level of auspiciousness than just --set-password

If you want to catch any --set-password use, please create a new rules.

@DanielKoifman
Copy link
Author

Thanks @nasbench I will close this PR and create a new rule based only on --set-password.

@nasbench
Copy link
Member

Thanks @nasbench I will close this PR and create a new rule based only on --set-password.

Why close and not update this one? Closing and opening PRs is not fun for ys reviewers. So please refrain from unnecessarily closing PR that have comments and review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rules Windows Pull request add/update windows related rules Work In Progress Some changes are needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants