Skip to content

Instantly share code, notes, and snippets.

View AfroThundr3007730's full-sized avatar
🔧
Hacking all the things...

Eddie Carswell AfroThundr3007730

🔧
Hacking all the things...
View GitHub Profile
@AfroThundr3007730
AfroThundr3007730 / Rotate-ESXiCreds.ps1
Created March 20, 2020 03:32
Mass change ESXi host passwords to new values
# Mass change ESXi host passwords to new values
# The hashtable should have an entry for every host
# Ensure $host_creds doesn't end up in your history
Connect-VIServer -Server 'YOUR_VCSA' -Credential (Get-Credential)
$host_creds = @{
'ESXi1.lab.local' = 'VALUE_FROM_PW_DB';
'ESXi2.lab.local' = 'VALUE_FROM_PW_DB';
# More as needed...
@AfroThundr3007730
AfroThundr3007730 / gpo-cleanup.ps1
Created April 10, 2020 04:32
Nuking orphaned GPOs in the SYSVOL
# Nuking orphaned GPOs in the SYSVOL
Start-Transcript .\gpo-cleanup.log
$guids = (get-gpo -All).id.guid
$files = (ls .).name
Write-Host 'Registered GPOs:' $guids.count
Write-Host 'GPO Files:' ($files | Select-String '{').count
$extraFiles = @()
@AfroThundr3007730
AfroThundr3007730 / epo-web-redirect.md
Last active June 3, 2020 17:06
ePO apache config to put the webconsole on 443 (colocated with agent port)

Why do this?

I wanted to redirect the web console to port 443, but the agents use that for communication with ePO. I could change the agent communication port, but I don't want to redeploy all the agents to fix their configurations. Thus, this madness was born.

The configs

You'll need to navigate to the ePO apache server configuration directory:

X:\Program Files (x86)\McAfee\ePolicy Orchestrator\Apache2\conf
@AfroThundr3007730
AfroThundr3007730 / pfsense-props.conf
Created June 10, 2020 00:07
Splunk field extractions for pfSense firewall logs (IPv4)
# The first attempt used CSV, but can't break up the first fields
[pfsense-fw-ipv4-tcp]
INDEXED_EXTRACTIONS = csv
LINE_BREAKER = ([\r\n]+)
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
category = Network & Security
pulldown_type = 1
FIELD_NAMES = log_metadata,sub_rulenum,anchor,tracker,interface,reason,action,direction,ip_version,ip_tos,ip_ecn,ip_ttl,ip_id,ip_offset,ip_flags,ip_proto_id,ip_proto_text,ip_length,ip_src_addr,ip_dest_addr,ip_src_port,ip_dst_port,ip_data_length,tcp_flags,tcp_seq_num,tcp_ack_num,tcp_window,tcp_urg,tcp_opts
@AfroThundr3007730
AfroThundr3007730 / wanikani-breeze-dark-fix.user.css
Last active June 28, 2020 02:41
Fixes for the Wanikani Breeze Dark theme
/* ==UserStyle==
@name Wanikani Breeze Dark (Fixes)
@namespace github.com/AfroThundr3007730
@version 1.0.3
@description Fixes for the Wanikani Breeze Dark theme
@author ZeroSinner & Kumirei & AfroThundr
@homepageURL https://gitlab.com/valeth/wanikani-breeze-dark/
@updateURL https://gist.githubusercontent.com/AfroThundr3007730/6d591a5d2594d7951de92306858a60a7/raw/wanikani-breeze-dark-fix.user.css
@supportURL https://community.wanikani.com/t/16973/
@license CC-BY-SA-4.0
@AfroThundr3007730
AfroThundr3007730 / github-next-center-headers.user.css
Last active July 19, 2020 17:16
Restores the padding to center the headers in the repository view.
/* ==UserStyle==
@name Github-Next - Center Header
@namespace github.com/AfroThundr3007730
@version 0.0.20200719
@description Restores the padding to center the headers in the repository view.
@author AfroThundr
@homepageURL https://gist.github.com/AfroThundr3007730/1596ae3898d08f91a42bc4f64e8b4a44
@updateURL https://gist.githubusercontent.com/AfroThundr3007730/1596ae3898d08f91a42bc4f64e8b4a44/raw/github-next-center-headers.user.css
@license CC-BY-SA-4.0
==/UserStyle== */
@AfroThundr3007730
AfroThundr3007730 / decrypt_gnupg-sc.sh
Created July 20, 2020 07:38
Modified version of Debian's cryptsetup hook for GnuPG Smartcard unlock
#!/bin/sh
if [ -d "/cryptroot/gnupghome" ]; then
export GNUPGHOME="/cryptroot/gnupghome"
fi
run_gpg() {
/usr/bin/gpg --no-options --trust-model=always "$@"
}
decrypt_gpg () {
@AfroThundr3007730
AfroThundr3007730 / cve-2014-6287.py
Last active November 23, 2020 03:29
Modified version of CVE-2014-6287 python script found here: https://www.exploit-db.com/exploits/39161/
#!/usr/bin/env python
# Exploit Title: HttpFileServer 2.3.x Remote Command Execution
# Google Dork: intext:"httpfileserver 2.3"
# Date: 04-01-2016
# Remote: Yes
# Exploit Author: Avinash Kumar Thapa aka "-Acid"
# Vendor Homepage: http://rejetto.com/
# Software Link: http://sourceforge.net/projects/hfs/
# Version: 2.3.x
@AfroThundr3007730
AfroThundr3007730 / make_recursive_gdrive_download.py
Last active February 9, 2021 02:44
Generates a bash script to recursively download a Google Drive folder
#!/usr/bin/python3
# Generates a bash script to recursively download a Google Drive folder
# Original: https://gist.github.com/immuntasir/73b8e8eef7e6c9066aaf2432bebf7db0
import sys
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
@AfroThundr3007730
AfroThundr3007730 / AccountHygiene.ps1
Last active March 14, 2021 21:12
Script to disable inactive user accounts after a set period and delete disabled accounts after another set period.
Start-Transcript C:\ProgramData\account-hygiene.log -Append
function accountFilter($accountList) {
# Filter out system principals and exempt accounts
return $accountList | Where-Object {
# Don't process these accounts
$_.DistinguishedName -notmatch "OU=Service Accounts" -and
$_.DistinguishedName -notmatch "OU=Admin Accounts" -and
$_.DistinguishedName -notmatch "OU=DA Accounts" -and
$_.DistinguishedName -notmatch "OU=Special" -and