Skip to content

Instantly share code, notes, and snippets.

@mgreen27
mgreen27 / Get-KerberosTicketGrantingTicket.ps1
Created September 23, 2020 10:53
Get-KerberosTicketGrantingTicket.ps1
function Get-KerberosTicketGrantingTicket
{
<# __CYberCX__
.SYNOPSIS
Gets the Kerberos Tickets Granting Tickets from all Logon Sessions
.DESCRIPTION
Get-KerberosTicketGrantingTicket uses the Local Security Authority (LSA) functions to enumerate Kerberos logon sessions and return their associate Kerberos Ticket Granting Tickets.
@mgreen27
mgreen27 / plaso.txt
Last active September 24, 2022 12:43
Plaso notes
## Plaso stuff
# log2timeline
docker run -v $(pwd):/data log2timeline/plaso log2timeline /data/$MACHINENAME.plaso /data/$MACHINENAME
# parsers can be targeted or skipped with --parsers command
docker run -v $(pwd):/data log2timeline/plaso log2timeline --parsers=\!filestat,\!mft,\!usnjrnl /data/$MACHINENAME.plaso /data/$MACHINENAME
docker run -v $(pwd):/data log2timeline/plaso log2timeline --parsers=winevtx /data/$MACHINENAME_evtx.plaso /data/$MACHINENAME
@mgreen27
mgreen27 / HAFNIUM_Webshell.yaml
Last active August 30, 2021 16:14
HAFNIUM Webshell VQL
name: Custom.Packs.HAFNIUM.Windows.WebshellSearch
author: Matt Green - @mgreen27
description: |
This artifact will hunt for Webshells associated with the HAFNIUM campaign as
reported by Microsoft and Volexity.
The default artifact will discover all ASPX files on C: then run a preconfigured
yara rule. Yara can be supplied by the YaraRule parameter or alternatively a
URL can be set to enable download of remote rule set.
@mgreen27
mgreen27 / KB5000871.yaml
Last active March 11, 2021 22:07
Is KB5000871 installed?
name: Custom.Windows.System.KB5000871
author: Matt Green - @mgreen27
description: |
This artifact will check for KB5000871 in system Uninstall keys.
KB5000871 is not visible via Get-Hotfix or Systeminfo so we need to query the
uninstall keys. Modify NameRegex to search for other installed applications.
reference:
- https://support.microsoft.com/en-us/topic/description-of-the-security-update-for-microsoft-exchange-server-2019-2016-and-2013-march-2-2021-kb5000871-9800a6bb-0a21-4ee7-b9da-fa85b3e1d23b
@mgreen27
mgreen27 / Bitsadmin.yaml
Last active May 21, 2021 23:20
VQL for BitsAdmin suspicious download
name: Custom.Windows.EventLogs.Bitsadmin
author: "Matt Green - @mgreen27"
description: |
This content will extract BITS Transfer events and enable filtering by URL
reference:
- https://attack.mitre.org/techniques/T1197/
- https://mgreen27.github.io/posts/2018/02/18/Sharing_my_BITS.html
parameters:
@mgreen27
mgreen27 / config_embeddedx86.xml
Created April 28, 2021 23:37
Velociraptor x86 msi config
<?xml version='1.0' encoding='windows-1252'?>
<?define AppRegKey="Software\COMPANYNAME\TOOLNAME" ?>
<?define PackageDescription="COMPANYNAME TOOLNAME installer" ?>
<?define Manufacturer="COMPANYNAME" ?>
<?define Name="TOOLNAME" ?>
<?define Version="VERSION" ?>
<?define BinaryName="TOOLNAME.exe" ?>
<?define BinaryNamex86="TOOLNAMEx86.exe" ?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
@mgreen27
mgreen27 / base.json
Last active May 31, 2021 05:13
Velociraptor server config
{
"Frontend": {
"hostname": "",
"bind_address": "0.0.0.0",
"bind_port": 443,
"public_path": "/opt/velociraptor/PUBLICTEMPLATE",
"default_client_monitoring_artifacts": [
"Generic.Client.Stats"
],
"dyn_dns": {
@mgreen27
mgreen27 / JoeSandbox.yaml
Last active October 19, 2021 22:33
JoeSandbox submission poc
name: Custom.Server.Malware.JoeSandbox
description: |
This is a POC to submit a sample to JoesSandbox.
No options beyont TAC and API have been configured.
type: SERVER
parameters:
- name: JoeSandboxUrl
default: https://www.joesandbox.com/api/v2/submission/new
@mgreen27
mgreen27 / ETW.yaml
Created January 7, 2022 08:24
ETW enrichment example
name: Custom.ETW.Testing
description: |
This artifact uses the ETW provider:
Microsoft-Windows-Kernel-File {edd08927-9cc4-4e65-b970-c2560fb5c289}
type: CLIENT_EVENT
parameters:
- name: FilePathRegex
description: "FilePath regex filter for"