Skip to content

Instantly share code, notes, and snippets.

View jymcheong's full-sized avatar

Jym Cheong jymcheong

View GitHub Profile
@jymcheong
jymcheong / InterceptorThing.ps1
Created January 26, 2018 00:16
Interceptor - Normal User No Admin Required.
<#
.SYNOPSIS
This script demonstrates the ability to capture and tamper with Web sessions.
For secure sessions, this is done by dynamically writing certificates to match the requested domain.
This is only proof-of-concept, and should be used cautiously, to demonstrate the effects of such an attack.
Function: Interceptor
Author: Casey Smith, Twitter: @subTee
License: BSD 3-Clause
@jymcheong
jymcheong / winlogon.reg
Created February 12, 2018 08:24 — forked from anonymous/winlogon.reg
WinLogon Windows 7 x64 COM Hijack
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam.1.00]
@="AtomicRedTeam"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam.1.00\CLSID]
@="{00000001-0000-0000-0000-0000FEEDACDC}"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam]
@="AtomicRedTeam"
[HKEY_CURRENT_USER\SOFTWARE\Classes\AtomicRedTeam\CLSID]
@="{00000001-0000-0000-0000-0000FEEDACDC}"
[HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{00000001-0000-0000-0000-0000FEEDACDC}]
@jymcheong
jymcheong / DGAtester.cs
Created March 26, 2018 06:46
C# to resolve list of domains
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace DGAtester
{
@jymcheong
jymcheong / ALLexes.ps1
Created April 3, 2018 01:43
Get All EXEs
$Dir = get-childitem "C:\" -recurse
$List = $Dir | where {$_.extension -eq ".exe"}
$List | Select-Object -ExpandProperty fullname | out-file EXEs.txt
@jymcheong
jymcheong / autonxlog.ps1
Last active February 19, 2025 15:25
Auto-install Nxlog with Chocolatey Package Manager
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
iex "choco install nxlog -y"
$client = New-Object System.Net.WebClient
# download & save the correct nxlog config which includes Sysmon, Nxlog WILL FAIL if Sysmon is not installed
if ([System.IntPtr]::Size -eq 4) { # I also assumed no change in default install paths
$url = "https://raw.githubusercontent.com/jymcheong/SysmonResources/master/6.%20Sample%20Data/nxlog.conf32.txt"
$path = "C:\Program Files\nxlog\conf\nxlog.conf"
} else {
$url = "https://raw.githubusercontent.com/jymcheong/SysmonResources/master/6.%20Sample%20Data/nxlog.conf64.txt"
@jymcheong
jymcheong / win_r_auto.au3
Created October 9, 2018 05:52
Auto Run All EXEs
#include <File.au3>
#Include <WinAPI.au3>
#Include <WindowsConstants.au3>
Func Win_R($fullpath)
$splitArray = StringSplit($fullpath,"\")
$arraySize = UBound($splitArray)
Send("#r")
WinWait("Run", "", 10)
Send($fullpath & "{ENTER}")
@jymcheong
jymcheong / lq.js
Last active October 16, 2018 03:29
OrientJS beta sample
const OrientDBClient = require("orientjs").OrientDBClient;
var _session, _client, _handle;
OrientDBClient.connect({
host: "localhost",
port: 2424
}).then(client => {
_client = client;
client.session({ name: "YOURDB", username: "YOURID", password: "YOURPASSWORD" })
.then(session => {
@jymcheong
jymcheong / windows_hardening.cmd
Created November 5, 2018 04:04 — 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"
@jymcheong
jymcheong / SysmonEventGUIDParser.ps1
Created December 22, 2018 07:47 — forked from mattifestation/SysmonEventGUIDParser.ps1
Extracts fields from sysmon process and logon GUIDs
# Author: Matthew Graeber (@mattifestation)
$Epoch = Get-Date '01/01/1970'
# Conversion trick taken from https://blogs.technet.microsoft.com/heyscriptingguy/2017/02/01/powertip-convert-from-utc-to-my-local-time-zone/
$StrCurrentTimeZone = (Get-WmiObject Win32_timezone).StandardName
$TZ = [TimeZoneInfo]::FindSystemTimeZoneById($StrCurrentTimeZone)
# Parse out all the LogonGUID fields for sysmon ProcessCreate events
Get-WinEvent -FilterHashtable @{ LogName = 'Microsoft-Windows-Sysmon/Operational'; Id = 1 } | ForEach-Object {
@jymcheong
jymcheong / autosshd
Created December 30, 2018 13:48 — forked from maratsh/autosshd
autosshd is the autossh daemon.
#!/bin/bash
#
# autosshd This script starts and stops the autossh daemon
#
# chkconfig: 2345 95 15
# processname: autosshd
# description: autosshd is the autossh daemon.
# Source function library.
. /etc/rc.d/init.d/functions