Skip to content

Instantly share code, notes, and snippets.

@watson0x90
watson0x90 / DataTransformationLoader.py
Last active April 4, 2025 00:05
This script is designed to create a hacker-themed data transformation visualization using the rich library.
# Script Name: DataTransformationLoader.py
# Author: Ryan Watson
# Gist Github: https://gist.github.com/Watson0x90
# Created on: 2025-04-03
# Last Modified: 2025-04-03
# Description: Data transformation loader for hacker-themed visualization
# Purpose: This script is designed to create a hacker-themed data transformation visualization using the rich library.
# Version: 1.0.0
# License: MIT License
# Dependencies: rich
@watson0x90
watson0x90 / poc2.py
Last active November 23, 2024 19:45
# This is a proof of concept for CVE-2020-5377, an arbitrary file read in Dell OpenManage Administrator
# Proof of concept written by: David Yesland @daveysec with Rhino Security Labs
# More information can be found here:
# A patch for this issue can be found here:
# https://www.dell.com/support/article/en-us/sln322304/dsa-2020-172-dell-emc-openmanage-server-administrator-omsa-path-traversal-vulnerability
from xml.sax.saxutils import escape
import http.server
import ssl
import sys
import socket
from concurrent.futures import ThreadPoolExecutor
import ipaddress
import argparse
def parse_ports(file_path):
"""
Parses a file containing port numbers and ranges, expanding ranges into individual ports.
"""
ports = set() # Use a set to avoid duplicates

Neo4j Cypher Queries for Bloodhound Data

Introduction

You will use these queries within the Neo4j query dashboard and not from the Bloodhound interface. There are so many different ways to examine the data. The queries below are designed to help myself and others find unique things in the gathered Bloodhound data and make it useful.

Queries

User Descriptions where not null or empty

MATCH (u:User) 
WHERE u.description IS NOT NULL AND u.description <> "" AND u.description <> " "
return u.name, u.description
@watson0x90
watson0x90 / polyfill_io_page_source_check.bcheck
Last active June 27, 2024 12:59
Page source includes reference to polyfill[.]io
metadata:
language: v1-beta
name: "Page source includes reference to polyfill[.]io"
description: "Locate polyfill[.]io issues."
author: "@watson0x90"
tags: "cdn", "javascript", "polyfill", "exposure"
given response then
if {latest.response} matches "(https?:\/\/)?([a-z0-9-]+\.)*polyfill\.io(\/.*)?" then
report issue:
@watson0x90
watson0x90 / BHSanitize.py
Last active June 21, 2024 16:48
Designed to sanitize BloodHound JSON data by replacing Unicode escape sequences with `uni-` and base64 encoding invalid characters.
# Script Name: BHSanitize.py
# Author: Ryan Watson
# Gist Github: https://gist.github.com/Watson0x90
# Created on: 2024-06-21
# Last Modified: 024-06-21
# Description: Designed to sanitize BloodHound JSON data by replacing Unicode escape sequences `\u` with `uni-` and base64 encoding invalid characters.
# Version: 1.0.0
# License: MIT License
# Usage: python BHSanitize.py
@watson0x90
watson0x90 / customqueries.json
Created January 24, 2024 23:30 — forked from seajaysec/customqueries.json
bloodhound custom queries
{
"queries": [{
"name": "List all owned users",
"queryList": [{
"final": true,
"query": "MATCH (m:User) WHERE m.owned=TRUE RETURN m"
}]
},
{
"name": "List all owned computers",
@watson0x90
watson0x90 / WSL2_VPN_Workaround_Instructions.md
Created March 16, 2021 16:48 — forked from machuu/WSL2_VPN_Workaround_Instructions.md
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active. The workaround breaks down into two problems:

  1. Network connection to internet
  2. DNS in WSL2

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@watson0x90
watson0x90 / Get-InjectedThread.ps1
Last active April 29, 2020 23:07 — forked from jaredcatkinson/Get-InjectedThread.ps1
Code from "Taking Hunting to the Next Level: Hunting in Memory" presentation at SANS Threat Hunting Summit 2017 by Jared Atkinson and Joe Desimone
function Get-InjectedThread
{
<#
.SYNOPSIS
Looks for threads that were created as a result of code injection.
.DESCRIPTION
@watson0x90
watson0x90 / CompileInMemory.cs
Created July 23, 2019 20:55
Compile and run C# code in memory to avoid anti-virus. Taken from a C# ransomware sample: https://www.bleepingcomputer.com/news/security/new-c-ransomware-compiles-itself-at-runtime/ However, this will still execute csc.exe and drop a dll to %temp% https://twitter.com/Laughing_Mantis/status/991018563296157696
using System;
using System.Collections.Generic;
using System.Text;
using System.CodeDom.Compiler;
using Microsoft.CSharp;
using System.IO;
using System.Reflection;
namespace InMemoryCompiler
{
class Program