Skip to content

Instantly share code, notes, and snippets.

View Neo23x0's full-sized avatar

Florian Roth Neo23x0

View GitHub Profile
@Neo23x0
Neo23x0 / ms_ts_anomaly.yar
Created June 4, 2017 07:43
Microsoft Timestamp / Copyright Anomaly
rule Microsoft_PE_Timestamp_Copyright_Anomaly {
meta:
description = "Detects a portable executable with an old copyrigth statement but a new compilation timestamp"
author = "Florian Roth"
reference = "Internal Research"
date = "2017-06-02"
score = 30
strings:
$a1 = "Copyright (C) Microsoft Corp. 19" wide
@Neo23x0
Neo23x0 / shitrix_artefacts.yar
Last active January 14, 2020 12:34
Netscaler Forensic Artefacts
rule SUSP_Netscaler_Forensic_Artefacts {
meta:
description = "Detects strings / forensic artefacts on exploited Netscaler systems"
author = "Florian Roth"
reference = "https://www.trustedsec.com/blog/netscaler-remote-code-execution-forensics/"
date = "2020-01-14"
score = 70
strings:
$ = "shell_command=\"whoami\"" ascii
@Neo23x0
Neo23x0 / fp-hashes.py
Last active March 10, 2020 14:25
Typical False Positive Hashes
# This GIST has been transformed into a Git repository and does not receive updates anymore
#
# Please visit the github repo to get a current list
# https://github.com/Neo23x0/ti-falsepositives/
# Hashes that are often included in IOC lists but are false positives
HASH_WHITELIST = [
# Empty file
'd41d8cd98f00b204e9800998ecf8427e',
'da39a3ee5e6b4b0d3255bfef95601890afd80709',
@Neo23x0
Neo23x0 / nmap-cmdline
Last active March 19, 2020 17:10
Nmap Scan Params for CVE-2017-0143 MS17-010 Scanning
# Scan for CVE-2017-0143 MS17-010
# The vulnerability used by WannaCry Ransomware
#
# 1. Use @calderpwn's script
# http://seclists.org/nmap-dev/2017/q2/79
#
# 2. Save it to Nmap NSE script directory
# Linux - /usr/share/nmap/scripts/ or /usr/local/share/nmap/scripts/
# OSX - /opt/local/share/nmap/scripts/
#
@Neo23x0
Neo23x0 / get-casing.py
Created July 2, 2020 14:18
Get All Possible Variations of Casings for a String
import itertools
s = "cmd.exe"
list(map(''.join, itertools.product(*zip(s.upper(), s.lower()))))
@Neo23x0
Neo23x0 / sysmon_suspicious_keyboard_layout_load.yml
Last active September 4, 2020 15:41
Sigma Rule to Detect Uncommon Keyboard Layout Loads in Your Organisation
title: Suspicious Keyboard Layout Load
description: Detects the keyboard preload installation with a suspicious keyboard layout, e.g. Chinese, Iranian or Vietnamese layout load in user session on systems maintained by US staff only
references:
- https://renenyffenegger.ch/notes/Windows/registry/tree/HKEY_CURRENT_USER/Keyboard-Layout/Preload/index
author: Florian Roth
date: 2019/10/12
logsource:
product: windows
service: sysmon
definition: 'Requirements: Sysmon config that monitors \Keyboard Layout\Preload subkey of the HKLU hives - see https://github.com/SwiftOnSecurity/sysmon-config/pull/92/files'
@Neo23x0
Neo23x0 / fix-sourcetree-git-secrets.sh
Created October 27, 2018 20:30
SourceTree git-secrets
#!/bin/bash
#
# Fixes error:
# git: 'secrets' is not a git command. See 'git --help'.
#
# 1. Go to SourceTree preferences > Git > Use System Git
# Select the system's git e.g. /usr/local/git/bin/git
# 2. Run this script
# Adust the path if your system's git is located in a different folder
# git-secrets must be linked in the same folder as the system's git binary
@Neo23x0
Neo23x0 / wannacry-vaccine.reg
Last active March 15, 2021 19:49
WannaCrypt Ransomware Immunisation
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskdl.exe]
"Debugger"="taskkill /F /IM "
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\taskse.exe]
"Debugger"="taskkill /F /IM "
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\wannacry.exe]
"Debugger"="taskkill /F /IM "
@Neo23x0
Neo23x0 / config-client.xml
Last active May 17, 2021 04:14
Sysmon Base Configuration - Workstations
<!--
This is a Microsoft Sysmon configuration to be used on Windows workstations
v0.2.1 December 2016
Florian Roth (with the help and ideas of others)
The focus of this configuration is
- malware detection (execution)
- malware detection (network connections)
- exploit detection
It is not focussed on
@Neo23x0
Neo23x0 / stringex.sh
Last active August 13, 2021 13:56
String Extraction / ASCII and Wide by @RobertHaist
Linux
(strings -a -td "$@" | sed 's/^\(\s*[0-9][0-9]*\) \(.*\)$/\1 A \2/' ; strings -a -td -el "$@" | sed 's/^\(\s*[0-9][0-9]*\) \(.*\)$/\1 W \2/') | sort -n
macOS
(gstrings -a -td "$@" | gsed 's/^\(\s*[0-9][0-9]*\) \(.*\)$/\1 A \2/' ; gstrings -a -td -el "$@" | gsed 's/^\(\s*[0-9][0-9]*\) \(.*\)$/\1 W \2/') | sort -n