I hereby claim:
- I am ion-storm on github.
- I am ionstorm_ (https://keybase.io/ionstorm_) on keybase.
- I have a public key ASDcmNr5gWQB17z9e3J6fs2d-EuPTVa_33DwKKjKva6KWAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$path_ = "C:\" | |
$list = @(Get-ChildItem -Path $path_ -Name "SolarWinds.Orion.Core.BusinessLayer.dll" -Recurse) | |
$list | % { | |
$fullPath = $path_ + $_ | |
Get-FileHash $fullPath -Algorithm SHA256 | Format-List | |
} |
input { | |
kafka { | |
bootstrap_servers => "" #configurable | |
group_id => "" #configurable | |
auto_offset_reset => "" #configurable | |
security_protocol => "SASL_SSL" | |
sasl_mechanism => "SCRAM-SHA-512" | |
sasl_jaas_config => "org.apache.kafka.common.security.scram.ScramLoginModule required username='' password='';" | |
ssl_endpoint_identification_algorithm => "" | |
topics => [""] #configurable |
function Get-InjectedThread | |
{ | |
<# | |
.SYNOPSIS | |
Looks for threads that were created as a result of code injection. | |
.DESCRIPTION | |
MITRE ATT4CK - T1132 - Data Encoding
Base64 Code | Mnemonic Aid | Decoded* | Description |
---|---|---|---|
JAB |
🗣 Jabber | $. |
Variable declaration (UTF-16) |
TVq |
📺 Television | MZ |
MZ header |
UEs |
🏬 Upper East Side | PK |
ZIP, Office documents |
SUVY |
🚙 SUV | IEX |
PowerShell Invoke Expression |
$ScrObjBlockRule = New-CIPolicyRule -DriverFilePath $Env:windir\System32\scrobj.dll -Level FileName -Deny -AppID $Env:windir\System32\regsvr32.exe | |
# Merge the block rule into the allow all template rule included in the OS | |
Merge-CIPolicy -OutputFilePath CustomASRPolicy.xml -PolicyPaths $Env:windir\schemas\CodeIntegrity\ExamplePolicies\AllowAll.xml -Rules $ScrObjBlockRule | |
# This must be run elevated. Convert the policy to binary form and copy it to where WDAC will consume it. | |
ConvertFrom-CIPolicy -XmlFilePath .\CustomASRPolicy.xml -BinaryFilePath $Env:windir\System32\CodeIntegrity\SIPolicy.p7b | |
# Now reboot and the policy will take effect. |
import time | |
import etw | |
import etw.evntrace | |
import sys | |
import argparse | |
import threading | |
class RundownDotNetETW(etw.ETW): | |
def __init__(self, verbose, high_risk_only): |
CREATE STREAM WINLOGBEAT_STREAM (source_name VARCHAR, type VARCHAR, task VARCHAR, log_name VARCHAR, computer_name VARCHAR, event_data STRUCT< UtcTime VARCHAR, ProcessGuid VARCHAR, ProcessId INTEGER, Image VARCHAR, FileVersion VARCHAR, Description VARCHAR, Product VARCHAR, Company VARCHAR, CommandLine VARCHAR, CurrentDirectory VARCHAR, User VARCHAR, LogonGuid VARCHAR, LogonId VARCHAR, TerminalSessionId INTEGER, IntegrityLevel VARCHAR, Hashes VARCHAR, ParentProcessGuid VARCHAR, ParentProcessId INTEGER, ParentImage VARCHAR, ParentCommandLine VARCHAR, Protocol VARCHAR, Initiated VARCHAR, SourceIsIpv6 VARCHAR, SourceIp VARCHAR, SourceHostname VARCHAR, SourcePort INTEGER, SourcePortName VARCHAR, DestinationIsIpv6 VARCHAR, DestinationIp VARCHAR, DestinationHostname VARCHAR, DestinationPort INTEGER, DestinationPortName VARCHAR>, event_id INTEGER) WITH (KAFKA_TOPIC='winlogbeat', VALUE_FORMAT='JSON'); | |
CREATE STREAM WINLOGBEAT_STREAM_REKEY WITH (VALUE_FORMAT='JSON', PARTITIONS=1, TIMESTAMP='event_date_creation') AS SEL |
logman --% start dotNetTrace -p Microsoft-Windows-DotNETRuntime (JitKeyword,NGenKeyword,InteropKeyword,LoaderKeyword) win:Informational -o dotNetTrace.etl -ets | |
# Do your evil .NET thing now. In this example, I executed the Microsoft.Workflow.Compiler.exe bypass | |
# logman stop dotNetTrace -ets | |
# This is the process ID of the process I want to capture. In this case, Microsoft.Workflow.Compiler.exe | |
# I got the process ID by running a procmon trace | |
$TargetProcessId = 8256 |
/* | |
_____ __ __ ___ __ | |
/ ___/__ ___/ / / |/ /__ ___/ /__ | |
/ (_ / _ \/ _ / / /|_/ / _ \/ _ / -_) | |
\___/\___/\_,_/_/_/__/_/\___/\_,_/\__/ | |
\ \/ / _ | / _ \/ _ | / _ \__ __/ /__ | |
\ / __ |/ , _/ __ | / , _/ // / / -_) | |
/_/_/ |_/_/|_/_/ |_| /_/|_|\_,_/_/\__/ | |
Florian Roth - v0.1 May 2019 |