Skip to content

Instantly share code, notes, and snippets.

View bwolmarans's full-sized avatar

Brett Wolmarans bwolmarans

View GitHub Profile
# Welcome to the ADM UDF Lab.
Do everything from the jumpbox.
A note on credential complexity: In anticipation of reports of credential triviality, it's worth mentioning up front that you'll notice some very simple passwords in this lab. This is because complex passwords do not keep us safe, and they are not going to keep you or anyone else out of anything if you already breached big red's SSO and firewalls and got into the lab, so we're just going to save time for everyone and skip over added frustration and false senses of security.
## Description of the VMs in this Lab
1. NMS - this is your NMS and ADM management platform. creds are admin/admin
2. WEST-GW - this is one of your NGINX+ and NGINX-AGENT instances
3. EAST-GW - this is another
4. WWW - this is a box of web servers, with one listening on port 80
@bwolmarans
bwolmarans / aws_security_group_details.sh
Last active July 19, 2022 17:49 — forked from richadams/aws_security_group_details.sh
A quick and dirty script to list out all security group settings on an AWS account. Barely tested, use at own risk, etc. Requires awscli to be installed.
#!/bin/bash
# Requires: awscli (http://aws.amazon.com/cli/)
# Prints out a list of all security groups and their settings, just for quickly auditing it.
# Your AWS credentials
if [ -z ${AWS_ACCESS_KEY_ID} ]; then
export AWS_ACCESS_KEY_ID='***'
export AWS_SECRET_ACCESS_KEY='***'
fi
@bwolmarans
bwolmarans / howmanydns
Created July 11, 2022 02:53
howmanydns
GET https://392219492e943f0297bd0fdc1896d0c4.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html
GET https://ad-cdn.technoratimedia.com/html/usersync.html
GET https://ad-delivery.net/px.gif
GET https://ad.doubleclick.net/favicon.ico
GET https://adrta.com/i
GET https://ads.pubmatic.com/AdServer/js/pwt/156512/6397/pwt.js
GET https://ads.stickyadstv.com/additional-scripts/
GET https://adservice.google.com/adsid/integrator.js
GET https://amplify.outbrain.com/cp/obtp.js
GET https://analytics.twitter.com/i/adsct
@bwolmarans
bwolmarans / howmanydnsqueriesdoesittake
Created July 11, 2022 02:53
The unique DNS queries needed to resolve CNN.com
GET https://392219492e943f0297bd0fdc1896d0c4.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html
GET https://ad-cdn.technoratimedia.com/html/usersync.html
GET https://ad-delivery.net/px.gif
GET https://ad.doubleclick.net/favicon.ico
GET https://adrta.com/i
GET https://ads.pubmatic.com/AdServer/js/pwt/156512/6397/pwt.js
GET https://ads.stickyadstv.com/additional-scripts/
GET https://adservice.google.com/adsid/integrator.js
GET https://amplify.outbrain.com/cp/obtp.js
GET https://analytics.twitter.com/i/adsct
@bwolmarans
bwolmarans / bash_aws_jq_cheatsheet.sh
Created March 3, 2022 22:19 — forked from lukeplausin/bash_aws_jq_cheatsheet.sh
AWS, JQ and bash command cheat sheet. How to query, cut and munge things in JSON generally.
# Count total EBS based storage in AWS
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add"
# Count total EBS storage with a tag filter
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add"
# Describe instances concisely
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]'
# Wait until $instance_id is running and then immediately stop it again
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id
# Get 10th instance in the account