This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# author = "Aaron Melton <aaron@aaronmelton.com>" | |
# date = "2017-08-03" | |
# description = "Retrieve EC2 Instances" | |
# name = "get_ec2_instances.sh" | |
# version = "v0.0.4" | |
# | |
# REQUIREMENTS: | |
# 1. Install AWS Command Line Interface: https://aws.amazon.com/cli/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Uses AWS CLI to query CloudTrail (last 7 days only!) logs for Security | |
# Group changes. | |
# | |
for eventName in ApplySecurityGroupsToLoadBalancer | |
AuthorizeCacheSecurityGroupIngress AuthorizeClusterSecurityGroupIngress | |
AuthorizeDBSecurityGroupIngress AuthorizeSecurityGroupEgress | |
AuthorizeSecurityGroupIngress CreateCacheSecurityGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# author = "Aaron Melton <aaron@aaronmelton.com>" | |
# date = "2017-09-15" | |
# description = "Create AWS Baseline" | |
# name = "create_aws_baseline.sh" | |
# version = "v0.0.5" | |
# | |
# REQUIREMENTS: | |
# 1. Install AWS Command Line Interface: https://aws.amazon.com/cli/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# author = "Aaron Melton <aaron@aaronmelton.com>" | |
# date = "2017-08-30" | |
# description = "Retrieve Security-Groups" | |
# name = "get_security-groups.sh" | |
# version = "v0.0.1" | |
# | |
# REQUIREMENTS: | |
# 1. Install AWS Command Line Interface: https://aws.amazon.com/cli/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Script: Router Update Script | |
## Author: aaron@aaronmelton.com | |
## Version: 1.2 | |
## Created: 2012-03-12 | |
## Updated: 2012-03-13 | |
## Description: This script provides the ability to securely copy a Cisco IOS | |
## file to a Cisco router and then instruct the router to copy | |
## the contents of the file into the running-config. | |
#!/usr/bin/expect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TARGET="192.168.1.1" | |
ping -c3 $TARGET > /dev/null | |
if [ "$?" -eq "1" ]; then | |
echo | mail -s "HOSTNAME Unreachable at $(date)" user@email.com | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
(echo "DISK FREE:"; df -h; echo -e \\n; echo "DISK USAGE:"; du -h -d1 /var/ftp) | mail -s "Disk Usage Report" user@email.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TARGETS="192.168.1.0/24" | |
FILENAME="nmap_192.168.1.0" | |
OPTIONS="-v -n --open -sS -sU -F --scan-delay 1s" | |
DATE=`date +%F` | |
cd /var/log/nmap | |
nmap $OPTIONS $TARGETS -oA $FILENAME\_$DATE > /dev/null | |
if [ -e $FILENAME\-prev.xml ]; then | |
ndiff $FILENAME\-prev.xml $FILENAME\_$DATE.xml > $FILENAME\-diff_$DATE.txt | |
if [ "$?" -eq "1" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
TARGETS="192.168.1.0/24" | |
OPTIONS="-v -sn -n" | |
DATE=`date +%F` | |
cd /var/log/nmap | |
nmap $OPTIONS $TARGETS -oA ping_$DATE > /dev/null | |
if [ -e ping-prev.xml ]; then | |
ndiff ping-prev.xml ping_$DATE.xml > pingdiff_$DATE.txt | |
if [ "$?" -eq "1" ]; then | |
echo "See attachment for NMAP differences." | mutt -s "NMAP Differences Discovered" -a pingdiff_$DATE.txt -- user@email.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
# | |
# downloadOTX.sh | |
# | |
# This script uses AlienVault's Open Threat Exchange (OTX) to download a PDF | |
# containing the IP reputation of the IP Addresses provided. | |
# | |
# USAGE: | |
# $ ./downloadOTX.sh 1.2.3.4 | |
# $ ./downloadOTX.sh 1.2.3.4 1.2.3.5 1.2.3.6 etc. |