Skip to content

Instantly share code, notes, and snippets.

View jsecurity101's full-sized avatar

Jonathan Johnson jsecurity101

View GitHub Profile
@jsecurity101
jsecurity101 / LogonSessionProcesses.ps1
Created September 27, 2022 21:40
Updated version of Lee Christensen's (@tifkin_) Get-LogonSessionProcesses script which will obtain information regarding processes tied to a given LogonID and with it any network connections that process may have.
if (-not ('TokenInformation.ProcessNativeMethods' -as [type])){
$TypeDef = @'
using System;
using System.Runtime.InteropServices;
namespace TokenInformation {
[Flags]
public enum ProcessAccess {
All = 0x001FFFFF,
Terminate = 0x00000001,
CreateThread = 0x00000002,
@jsecurity101
jsecurity101 / Privileges.txt
Created July 23, 2022 01:00
System privileges and their values
Author: Jonathan Johnson
Data pulled via winnt.h / LookupPrivilegeValue
SE_CREATE_TOKEN_NAME / SeCreateTokenPrivilege / 2
SE_ASSIGNPRIMARYTOKEN_NAME / SeAssignPrimaryTokenPrivilege / 3
SE_LOCK_MEMORY_NAME / SeLockMemoryPrivilege / 4
SE_INCREASE_QUOTA_NAME / SeIncreateQuotoPrivilege / 5
SE_MACHINE_ACCOUNT_NAME / SeMachineAccountPrivilege / 6
SE_TCB_NAME / SeTcbPrivilege / 7
SE_SECURITY_NAME / SeSecurityPrivilege/ 8
@jsecurity101
jsecurity101 / KerberosCorrelation.ipynb
Last active May 28, 2024 22:40
Kerberos Detection/Investigation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jsecurity101
jsecurity101 / ProtectionChecks.ps1
Last active March 28, 2025 21:53
Powershell script that will pull whether a process or service is running as protected (PPL).
#Author: Jonthan Johnson (@jsecurity101)
if (-not ('ProtectedObjects.ProcessNativeMethods' -as [Type])) {
$TypeDef = @'
using System;
using System.Runtime.InteropServices;
namespace ProtectedObjects {
[Flags]
public enum ProcessAccess {
if (-not ('TokenInformation.ProcessNativeMethods' -as [type])){
$TypeDef = @'
using System;
using System.Runtime.InteropServices;
namespace TokenInformation {
[Flags]
public enum ProcessAccess {
All = 0x001FFFFF,
Terminate = 0x00000001,
rpc
filter
add rule layer=um actiontype=permit
add condition field=if_uuid matchtype=equal data=<uuidguid>
add condition field=auth_type matchtype=equal data=16
add condition field=auth_level matchtype=equal data=6
add filter
add rule layer=um actiontype=block
add condition field=if_uuid matchtype=equal data=<uuidguid>
add filter
{
"name": "RPC to Technique Mapping",
"versions": {
"attack": "9",
"navigator": "4.4.1",
"layer": "4.2"
},
"domain": "enterprise-attack",
"description": "",
"filters": {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.