Skip to content

Instantly share code, notes, and snippets.

View cutaway's full-sized avatar

Don C. Weber cutaway

View GitHub Profile
@cutaway
cutaway / iptables_monitor.sh
Created December 16, 2020 20:32
Script to use IPTables to prevent outbound traffic when using network taps and monitoring network traffic.
#!/bin/bash
ipt4='/sbin/iptables'
ipt6='/sbin/ip6tables'
for i in $ipt4 $ipt6; do
# Flush Rules
echo 'Flushing IPTables: ' $i
$i -F
$i -X
@cutaway
cutaway / PowerView-3.0-tricks.ps1
Created October 29, 2020 23:07 — forked from HarmJ0y/PowerView-3.0-tricks.ps1
PowerView-3.0 tips and tricks
# PowerView's last major overhaul is detailed here: http://www.harmj0y.net/blog/powershell/make-powerview-great-again/
# tricks for the 'old' PowerView are at https://gist.github.com/HarmJ0y/3328d954607d71362e3c
# the most up-to-date version of PowerView will always be in the dev branch of PowerSploit:
# https://github.com/PowerShellMafia/PowerSploit/blob/dev/Recon/PowerView.ps1
# New function naming schema:
# Verbs:
# Get : retrieve full raw data sets
# Find : ‘find’ specific data entries in a data set
@cutaway
cutaway / aws_testing_steps.md
Last active October 15, 2020 14:44
AWS Testing Steps
###########################
# References:
# https://pen-testing.sans.org/blog/2017/03/08/pen-test-poster-white-board-powershell-built-in-port-scanner/
# https://mcpmag.com/articles/2018/12/10/test-sql-connection-with-powershell.aspx
# https://support.solarwinds.com/SuccessCenter/s/article/Use-PowerShell-to-test-that-a-port-is-open-on-a-server
###########################
function Test-SqlConnection {
#param(
#[Parameter(Mandatory)]
@cutaway
cutaway / freq_analysis.py
Created September 2, 2019 18:54
Conduct frequency analysis on all characters in a binary blob.
#!/usr/bin/env python3
import os, sys
# Debug if you want to stop early in large files
DEBUG = False
COLUMNS = 4
def main():
# Preload a dictionary with all characters
table = {}
@cutaway
cutaway / arin_lookup.py
Created October 16, 2018 15:39
ARIN Lookup for IP Ranges
import os,sys
from ipwhois import IPWhois
import socket
import warnings
# Supress warnings
warnings.filterwarnings('ignore')
# Set field names
f = ['asn','asn_cidr','nets','query','asn_description']
@cutaway
cutaway / bigip_decode_cookie.py
Created July 2, 2015 18:33
Deocde BigIP cookies to internal IP address and port number
@cutaway
cutaway / simple_commands_and_reminders.md
Last active August 27, 2017 19:14
Simple Commands And Other Things To Remember
@cutaway
cutaway / ssh_accepted_xlog_parser.py
Last active December 15, 2015 06:24
Parsing SSH Accepted Syslog files with Python and PyParsing - based on Lendro Silva's code
#!/usr/bin/env python
import sys
from pyparsing import Word, alphas, Suppress, Combine, nums, string, Optional, Regex
#from time import strftime
import time
from datetime import datetime
# Script: ssh_accepted_xlog_parser.py
# Author: Don C. Weber (cutaway)