Skip to content

Instantly share code, notes, and snippets.

@aglerj
aglerj / README.md
Created October 18, 2022 01:14
Table Top With Teeth - Training Exercise

Instructions

The following script is designed to create artifacts that teams can use to hunt, new or interesting capabilities.

The following table top is based on the code here: https://github.com/code-scrap/DynamicWrapperDotNet

This script is self-contained. It should dynamically write a DLL to disk and load it in to cscript.exe

To Invoke cscript.exe stranger_things.js This example expects a 64bit system.

@aglerj
aglerj / windows_hardening.cmd
Created October 29, 2018 01:21 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
::
::#######################################################################
::
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
:: Alternatively, you can right-click on them and hit 'Run as Administrator' but ensure it's a script you want to run :)
:: ---------------------
ftype htafile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype WSHFile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype batfile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
@aglerj
aglerj / DeviceGuard_Driver_Strict_Enforcement_policy.xml
Created November 27, 2017 17:52 — forked from mattifestation/DeviceGuard_Driver_Strict_Enforcement_policy.xml
File-based driver enforcement Device Guard policy for my Surface Laptop w/ Windows 10 Enterprise.
<?xml version="1.0" encoding="utf-8"?>
<SiPolicy xmlns="urn:schemas-microsoft-com:sipolicy">
<VersionEx>10.0.0.0</VersionEx>
<PolicyTypeID>{A244370E-44C9-4C06-B551-F6016E563076}</PolicyTypeID>
<PlatformID>{2E07F7E4-194C-4D20-B7C9-6F44A6C5A234}</PlatformID>
<Rules>
<Rule>
<Option>Enabled:Unsigned System Integrity Policy</Option>
</Rule>
<Rule>
@aglerj
aglerj / search_command.py
Created August 23, 2017 05:57 — forked from LukeMurphey/search_command.py
A base class for making Python-based search commands in Splunk#Splunk
"""
This class provides a base class for search commands that handles much of the Splunk-to-Python
interaction necessary for making a search command.
This is licensed under the Apache License Version 2.0
See https://www.apache.org/licenses/LICENSE-2.0.html
To make a search command, you will need to:
1) Sub-class the search command (see below for an example)
2) Declare your search command in commands.conf