Skip to content

Instantly share code, notes, and snippets.

View shadowbq's full-sized avatar
👔
Doing Things

shadowbq shadowbq

👔
Doing Things
View GitHub Profile
@shadowbq
shadowbq / update_cloudwatch_vpncount
Last active June 8, 2016 21:05
describe ipsec vpns for aws
#!/usr/bin/python
import boto.ec2.cloudwatch
import boto.vpc
AWS_Regions=["us-east-1","us-west-2","us-west-1","eu-west-1","ap-southeast-1","ap-northeast-1","ap-southeast-2","sa-east-1","eu-central-1"]
#AWS_Regions=boto.ec2.regions()
CloudWatch_Region="us-east-1"
cw = boto.ec2.cloudwatch.connect_to_region(CloudWatch_Region)
for region in AWS_Regions:
Indicator type Indicator Description
FileHash-SHA256 426142a23d356f105dfdfa27e9855d3ee47fe7149a502e9eb3cde1f368025fee
FileHash-SHA256 f82e90c02b05f86cd720f7f15667356a7e997c5cf13a1d6f6492db0c5ffbe6a2
domain sqnhh67wiujb3q6x.onion
FileHash-MD5 bda230a18d42aabca4b6b9ccdd62dedd
FileHash-MD5 d5bc571d34a80fc91ed6189f50b47772
FileHash-SHA1 1eb97c7ca98e75d64ad2d7b1ec5d5f6a67bb5c30
FileHash-SHA1 6b1589c5cd84d52ee091580355e99c9560064ebb
domain fxn5ao5mmaktpsug.onion
NetworkFlow process, process_id where NetworkFlow src_ip contains 10.250.45.0/24
and NetworkFlow dst_ip equals 10.0.0.2
CurrentFlow process_id where CurrentFlow local_ip contains 10.250.45.0/24 and
CurrentFlow remote_ip equals 10.0.0.2
@shadowbq
shadowbq / vmkernel_prep.sh
Last active March 11, 2018 22:42
AskUbuntu SO #966585 - Post Kernel Upgrade
#!/usr/bin/env bash
# Must be run as root / sudo
# Reference: https://askubuntu.com/questions/966585/ubuntu-17-10-upgrade-broke-vmware-workstation-12-5
if [ $(dpkg-query -W -f='${Status}' linux-headers-generic 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
echo "Kernel Headers Package Missing"
echo "apt-get install linux-headers-generic";
exit 1
fi
$ yum update
$ sudo yum install gcc libtool perl-core zlib-devel openssl-devel libxslt-devel libxml-devel libyaml-devel -y
$ sudo update-ca-trust
$ cd /usr/src/
$ wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
$ tar zxvf Python-2.7.10.tgz
$ cd Python-2.7.10/
$ ./configure
@shadowbq
shadowbq / vss_powershell_restore.ps1
Created July 3, 2018 14:37
Restore from VSS using PS
# VSS Location
# \\localhost\D$\@GMT-2011.09.20-06.00.04_Data\Folder\SubFolder
$source="\\localhost\D$\@GMT-2011.09.20-06.00.04_Data\Folder\SubFolder"
$dest="C:\temp\dest"
$logfile="C:\logs\VSS-restoration.log"
$what = @("/COPYALL","/MIR")
@shadowbq
shadowbq / Firewallpol.json
Last active February 14, 2019 13:18
Nsm javascript pseudo
{
"FirewallPolicyId": 120,
"Name": "TestFirewallPolicy",
"DomainId": 0,
"VisibleToChild": true,
"Description": "test the firewallpolicy",
"LastModifiedTime": "2012-12-12 12:32:44",
"IsEditable": true,
"PolicyType": "ADVANCED",
"PolicyVersion": 1,
@shadowbq
shadowbq / Powershell.log
Last active April 30, 2021 13:07
PDH with Powershell for Network Stats
' Notes:
' https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-counter?view=powershell-5.1
' https://docs.bmc.com/docs/display/public/bcmco95/Windows+IPv4+and+IPv6+Statistics
' https://kb.paessler.com/en/topic/50673-how-can-i-find-out-the-names-of-available-performance-counters
' https://docs.microsoft.com/en-us/windows-server/networking/technologies/network-subsystem/net-sub-performance-counters
' https://leanpub.com/windowspowershellnetworkingguide/read#leanpub-auto-performance-counters
PS C:\Users\jdoe> powershell –ExecutionPolicy Bypass
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
@shadowbq
shadowbq / Window_Time.bat
Last active April 15, 2019 13:26
Windows Time Force for Cloud Snapshots
@echo off
:: Reference: https://www.pahoehoe.net/configure-w32time-ntp-on-a-standalone-windows-box/
:: Reference: https://community.spiceworks.com/topic/1951714-ntp-setting-server-2012-r2-settings-not-working
:: Reference: https://www.mcbsys.com/blog/2014/08/basic-windows-time-service-setup/
:: ## Look @config
w32tm /query /configuration
w32tm /query /status
:: # Changing the Polling Flag (its listed in decimal seconds)
#! /bin/bash
for d in {1..100}; do
mkdir -p ./dir-$(printf %03d "$d") && cd ./dir-$(printf %03d "$d")
for n in {1..100}; do
( dd if=/dev/urandom of=file-$( printf %03d "$n" ).bin bs=1 count=$(( RANDOM + 1024 )) ) > /dev/null 2>&1
done
cd ..
done