Clean Binaries with Suspicious Behaviour

Published: 2022-03-15
Last Updated: 2022-03-15 06:59:52 UTC
by Xavier Mertens (Version: 1)
0 comment(s)

EDR or "Endpoint Detection & Response" is a key element of many networks today. An agent is installed on all endpoints to track suspicious/malicious activity and (try to) block it. Behavioral monitoring is also a key element in modern SIEM infrastructure: To see a word.exe running is definitively not malicious, same with a Powershell script being launched. But if you monitor parent/child relations, to see a Powershell script launched from a Word process, that is suspicious! Here is a simple Sigma[1] rule to detect this behavior:

title: Suspicious PowerShell Invocation Based on Parent Process
id: 95eadcb2-92e4-4ed1-9031-92547773a6db
status: test
description: Detects suspicious powershell invocations from interpreters or unusual programs
author: Florian Roth
references:
  - https://www.carbonblack.com/2017/03/15/attackers-leverage-excel-powershell-dns-latest-non-malware-attack/
date: 2019/01/16
modified: 2022/01/07
logsource:
  category: process_creation
  product: windows
detection:
  selection:
    ParentImage|endswith:
      - '\wscript.exe'
      - '\cscript.exe'
      - '\word.exe'
      - '\excel.exe'
    Image|endswith: '\powershell.exe'
  falsepositive:
    CurrentDirectory|contains: '\Health Service State\'
  condition: selection and not falsepositive
fields:
  - CommandLine
  - ParentCommandLine
falsepositives:
  - Microsoft Operations Manager (MOM)
  - Other scripts
level: medium
tags:
  - attack.execution
  - attack.t1059.001

Note: I modified it to add "word.exe" and "excel.exe".

When you implement this kind of rule in your SIEM, the next mandatory step is the fine-tuning process to reduce the unavoidable false positive alerts. Indeed, to increase the detection of suspicious Powershell invocations, it can be tempting to reduce the list of parent processes. The side effect is an increase in noise generated by the alert. For example, do you know that some Microsoft tools are able to launch Powershell script? ccm.exe is a good example[2]. 

I found an interesting project called "w*fbins"[3]. Unlike "lolbas", which lists official Microsoft tools that can be (ab)used by attackers to perform malicious actions, this project aims to list tools that could be flagged as malicious by rules like the one seen above but... they are not! At this time, the tools list remains small but I'm sure it will grow in the future. 

[1] https://github.com/SigmaHQ/sigma
[2] https://docs.microsoft.com/en-us/mem/configmgr/apps/deploy-use/create-deploy-scripts
[3] https://wtfbins.wtf

Xavier Mertens (@xme)
Xameco
Senior ISC Handler - Freelance Cyber Security Consultant
PGP Key

0 comment(s)
ISC Stormcast For Tuesday, March 15th, 2022 https://isc.sans.edu/podcastdetail.html?id=7920

Comments

What's this all about ..?
password reveal .
<a hreaf="https://technolytical.com/">the social network</a> is described as follows because they respect your privacy and keep your data secure:

<a hreaf="https://technolytical.com/">the social network</a> is described as follows because they respect your privacy and keep your data secure. The social networks are not interested in collecting data about you. They don't care about what you're doing, or what you like. They don't want to know who you talk to, or where you go.

<a hreaf="https://technolytical.com/">the social network</a> is not interested in collecting data about you. They don't care about what you're doing, or what you like. They don't want to know who you talk to, or where you go. The social networks only collect the minimum amount of information required for the service that they provide. Your personal information is kept private, and is never shared with other companies without your permission
https://thehomestore.com.pk/
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> public bathroom near me</a>
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> nearest public toilet to me</a>
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> public bathroom near me</a>
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> public bathroom near me</a>
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> nearest public toilet to me</a>
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> public bathroom near me</a>
https://defineprogramming.com/
https://defineprogramming.com/
Enter comment here... a fake TeamViewer page, and that page led to a different type of malware. This week's infection involved a downloaded JavaScript (.js) file that led to Microsoft Installer packages (.msi files) containing other script that used free or open source programs.
distribute malware. Even if the URL listed on the ad shows a legitimate website, subsequent ad traffic can easily lead to a fake page. Different types of malware are distributed in this manner. I've seen IcedID (Bokbot), Gozi/ISFB, and various information stealers distributed through fake software websites that were provided through Google ad traffic. I submitted malicious files from this example to VirusTotal and found a low rate of detection, with some files not showing as malware at all. Additionally, domains associated with this infection frequently change. That might make it hard to detect.
https://clickercounter.org/
Enter corthrthmment here...

Diary Archives