Skip to content

Instantly share code, notes, and snippets.

View EatMoreChicken's full-sized avatar
💭
Let's learn something

Emlin Charly EatMoreChicken

💭
Let's learn something
View GitHub Profile
@codingWithJimmy
codingWithJimmy / thp.sh
Last active November 29, 2022 09:30
Script used to disable THP and configure ulimits for Splunk Enterprise as recommended by Splunk
#!/bin/bash
## Script developed by Jimmy Maple - Splunk Professional Services
## This script was designed to allow for quick deployment of THP, ulimit
## and Splunk user accounts for Splunk infrastructure. It was developed
## using RHEL 7 as the Splunk host. There may be issues using other
## Linux OS for this and should be altered and tested if necessary
## particularly using the find command for the THP changes and any
## additional commands for user and group creation. Confirm the
## commands before proceeding. There is some flexibility when it comes
@automine
automine / inputs.conf
Last active September 7, 2023 11:18
Nice windows event blacklisting
[WinEventLog://Security]
disabled = 0
start_from = oldest
current_only = 0
evt_resolve_ad_obj = 1
checkpointInterval = 5
blacklist1 = EventCode="4662" Message="Object Type:(?!\s*groupPolicyContainer)"
blacklist2 = EventCode="566" Message="Object Type:(?!\s*groupPolicyContainer)"
blacklist3 = EventCode="4688" Message="New Process Name:\s*(?i)(?:[C-F]:\\Program Files\\Splunk(?:UniversalForwarder)?\\bin\\(?:btool|splunkd|splunk|splunk\-(?:MonitorNoHandle|admon|netmon|perfmon|powershell|regmon|winevtlog|winhostinfo|winprintmon|wmi|optimize))\.exe)"
blacklist4 = EventCode="4689" Message="Process Name:\s*(?i)(?:[C-F]:\\Program Files\\Splunk(?:UniversalForwarder)?\\bin\\(?:btool|splunkd|splunk|splunk\-(?:MonitorNoHandle|admon|netmon|perfmon|powershell|regmon|winevtlog|winhostinfo|winprintmon|wmi|optimize))\.exe)"
@idiom
idiom / psdecode.ps1
Created April 24, 2017 18:15
Script to decode a Base64 Encoded and Compressed PowerShell script
#
# Decode a base64 and compressed Powershell script.
#
#
#
#
$input = Read-Host -Prompt 'Base64 Text'
$decoded = $(New-Object IO.StreamReader ($(New-Object IO.Compression.DeflateStream($(New-Object IO.MemoryStream(,$([Convert]::FromBase64String($input)))), [IO.Compression.CompressionMode]::Decompress)), [Text.Encoding]::ASCII)).ReadToEnd();
Write-Host "----- Decoded -----"