Skip to content

Instantly share code, notes, and snippets.

View jermdw's full-sized avatar
😺

jermdw jermdw

😺
View GitHub Profile
@jermdw
jermdw / docker-compose.yml
Created August 14, 2018 22:36
Graylog docker-compose configuration
version: '2'
services:
mongodb:
image: mongo:3
volumes:
- mongo_data:/data/db
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.9
volumes:
- es_data:/usr/share/elasticsearch/data
@jermdw
jermdw / A_Profile_Sigma.ps1
Created August 8, 2018 03:01 — forked from i-e-b/A_Profile_BJSS.ps1
My sample Powershell profile script
# Sigma profile
Import-Module W:\Gits\posh-git\posh-git.psm1
set-executionpolicy Unrestricted process
$baseDir = Split-Path -parent $MyInvocation.MyCommand.Definition
. "$baseDir\hand.ps1"
# General actions
function edit ($file) { & "${env:ProgramFiles(x86)}\Notepad++\notepad++.exe" $file }
@jermdw
jermdw / red_root_prompt.md
Created August 7, 2018 04:57
Bash - Red Root Prompt

Prompt is green for standard user and turns red when elevated to root

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Reference

Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@jermdw
jermdw / 01-netcfg.yaml
Created June 24, 2018 02:01
Netplan Configuration File
network:
version: 2
renderer: networkd
ethernets:
ens160:
addresses:
- 192.168.1.93/24
gateway4: 192.168.1.1
@jermdw
jermdw / SimpleHTTPServerWithUpload.py
Created June 18, 2018 20:30 — forked from touilleMan/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@jermdw
jermdw / unsigned_exes.ps1
Created May 2, 2018 02:32
Retrieve unsigned executables in user folders
(gwmi Win32_UserProfile | ? { $_.SID -notmatch "S-1-5-(18|19|20).*" }).LocalPath | % { ls -Path $_ -Recurse -Filter "*.exe" } | % { Get-AuthenticodeSignature -FilePath $_.FullName } | ? { $_.Status -ne 'Valid' }
#Grabs the path you wish to search
$getPath = Read-Host "What is the path you would like to search (example: c:\temp)"
#recursively searches through a path and grabs the data streams
$getItem = Get-ChildItem -Path $getPath -Recurse | Get-Item -Stream *
foreach($item in $getItem) {
@jermdw
jermdw / hugeLats.md
Created April 17, 2018 13:04
Move Laterally Why Don't you?

Lateral Movement Top 7

  1. Service Control Manager

    • This method is used by psexec and all of its clones to start the executable that psexec creates.
  2. Task scheduler (scheduled task)

    • A command to be run at designated time(s) as SYSTEM.
@jermdw
jermdw / create_dc.ps1
Created April 14, 2018 03:56
Create Domain Controller
# Create Windows Server 2016 Domain Controller
# with a little help from: https://j3rm.io/2EKvjXY
# rename computer
Rename-computer -newname 2016-DC01
# setup ip configuration
$ipaddress = "10.0.0.2"
$dnsaddress = "127.0.0.1"
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress $ipaddress -AddressFamily IPv4 -PrefixLength 24