Skip to content

Instantly share code, notes, and snippets.

View scudette's full-sized avatar
🦕
Digital Paleontologist

Mike Cohen scudette

🦕
Digital Paleontologist
View GitHub Profile
@scudette
scudette / sigcheck.yaml
Last active March 30, 2020 13:11
Run sigcheck recursively
name: Custom.Sigcheck
precondition: SELECT OS From info() where OS = 'windows'
parameters:
- name: binaryURL
description: |
Specify this as the base of the binary store (if empty we use
the server's public directory).
- name: SigcheckArgs
default: c:\windows\system32
@scudette
scudette / Windows.Services.Hashes.yaml
Created March 26, 2020 05:43
This artifact enumerates the service binaries from the registry and locates their binaries. We then calculate hashes of the binaries.
name: Windows.Services.Hashes
description: |
This artifact enumerates the service binaries from the registry and locates their
binaries. We then calculate hashes of the binaries.
parameters:
- name: serviceKeys
default: |
HKEY_LOCAL_MACHINE\System\CurrentControlSet\services\**\ImagePath
- name: pathRegex
@scudette
scudette / Custom.RemoveService.yaml
Last active March 7, 2020 00:39
Remove Malicious Service
name: Custom.RemoveService
description: |
Clean up malicious services.
type: CLIENT
parameters:
- name: script
default: |
$service = Get-WmiObject -Class Win32_Service -Filter "Name='%v'"
@scudette
scudette / Custom.RemoveScheduledTask.yaml
Created March 6, 2020 23:37
Remove Scheduled Tasks
name: Custom.RemoveScheduledTask
description: |
Remove malicious task
# Can be CLIENT, CLIENT_EVENT, SERVER, SERVER_EVENT
type: CLIENT
parameters:
- name: script
@scudette
scudette / GetLocalAdmins.yaml
Created March 6, 2020 23:04
Get All Local Admins
name: Custom.GetLocalAdmins
description: |
Gets a list of local admin accounts
reference:
- https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/get-localgroupmember?view=powershell-5.1
# Can be CLIENT, CLIENT_EVENT, SERVER, SERVER_EVENT
type: CLIENT
@scudette
scudette / Jupyter_cell1.py
Created March 5, 2020 13:32
Jupyter and Velociraptor
pandas.DataFrame(velo_pandas.DataFrameQuery("""
SELECT *
FROM hunt_results(hunt_id='H.a127011b',
artifact='Windows.System.TaskScheduler',
source='Analysis')
LIMIT 50
"""))
@scudette
scudette / pyvelociraptor.py
Created March 5, 2020 08:47
Pandas PyVelociraptor interface
import pandas
from pyvelociraptor import velo_pandas
pandas.set_option('display.max_colwidth', None)
pandas.set_option('display.max_columns', None)
pandas.set_option('display.max_rows', None)
pandas.DataFrame(velo_pandas.DataFrameQuery("""
SELECT * FROM info()
"""))
@scudette
scudette / Windows.Applications.EdgeUrls.yaml
Created February 21, 2020 01:18
Bruteforce scan for URLs in Edge folders
name: Windows.Applications.EdgeUrls
description: |
Scan anything that looks like a URL in Edge folders.
parameters:
- name: EdgeGlob
default: C:/Users/*/AppData/Local/Packages/Microsoft.MicrosoftEdge_*/**
- name: URLYaraRule
default: |
rule URL {
@scudette
scudette / hash_run_keys.yaml
Created February 20, 2020 12:08
Hash Run Key Binaries
name: HashRunKeys
description: |
Iterate over all the run keys and locate their binary then hash it.
parameters:
- name: runKeys
default: |
HKEY_USERS\*\Software\Microsoft\Windows\CurrentVersion\Run\*
- name: pathRegex
type: hidden
@scudette
scudette / mutant.ps1
Last active January 12, 2020 10:43
Tests creating a mutant of a specific name
$createdNew = $False
$mutex = New-Object -TypeName System.Threading.Mutex(
$true, "Global\MyBadMutex", [ref]$createdNew)
if ($createdNew) {
echo "Acquired Mutex"
sleep(100)
} else {
echo "Someone else has the mutex"
}