Code Monkey home page Code Monkey logo

braker-scripts's Introduction

braker-scripts

Scripts written by Steve Stonebraker for Administration & Simluations

==============

AWS SCRIPTS

Scripts written for interaction with the AWS cli

aws-find-missing-accounts-in-credentials-file.sh

print accounts that exist remotely but do not exist in ~/.credentials file

aws_fix_dual_nic_routing.sh

  • Add two network interface in ubuntu 12.04 in aws and route traffic properly to either ip
  • Scope: Amazon EC2 Attach Elastic Network Interface (VPC)

Automates this manual process (from 4-10)

  1. Start AMI in VPC
  2. After boot attach secondary nic
  3. Ensure both nic's have an external IP associated with it
  4. configure new /etc/network/interfaces
  5. restart networking
  6. stop network-manger
  7. ssh back in (ssh will flip to the other elastic ip)
  8. add new ip route
  9. flush ip route table
  10. restart networking

More details at http://brakertech.com/aws-add-two-network-interfaces-in-ubuntu-12-04-precise/

aws-list-subnets-all-profiles.sh

print subnets from all vpcs across all profiles to a txt file

aws-list-all-public-ips-all-profiles.sh

output all ec2 public IPs from all profiles in ~/.aws/config

aws-route53-saml2aws-all-account-backup.sh

Exports all route53 zones across all AWS accounts

aws-s3-dl-list-uris-multithread.py

Downloads a list of s3 objects (user provided) using multithreading (100 concurrent downloads at a time)

aws-s3-find-public-objects-in-s3-buckets.py

If you provide the file with a list of s3 buckets, it will enumerate every object in each bucket and output which objects are publicy accessible.

generate_lambdaguard_report_all_profiles.sh

Generates a lambdaguard report for all profiles listed in ~/.aws/config

Perl

ddos_ntp.pl

NTP Reflection and Amplification attack simlator

Requires:

  • Net::RawIP
  • System capable of sending raw packets

listmodules.pl

Displays currently installed perl modules

ModSecurity

install_mod_security_2.7.4.sh

This has only been tested on an Ubuntu precise (12.04) server. This script will:

  • Download the source code for Modsecurity version 2.7.4
  • Ensure all required prerequisites are installed
  • Install ModSecurity to /opt/modsecurity
  • Create the recommended folder structure (from the ModSecurity book) under /opt/modsecurity
  • Enable the relevant Apache Modules

install_mod_security_audit_console.sh

Install the jwall audit console for modsecurity on an Ubuntu 12.04 machine

Security information and event management

  • install_aws_elasticsearch_cluster_node.sh
  • upgrade_logstash_to_1.1.13.sh
  • install_kibana3.sh

Other

add_current_shell_and_path_to_crontab.sh

Will add the ${PATH} of the current shell to the crontab

cidr_to_ipset.sh

Converts a text file with a list of CIDR ip blocks in to a saved hashset.

Sample lists of CIDR blocks available for US, Great Britain, Spain, Italy, and France

fwtest_solariburst_domains.sh

Performs a nslookup on all Solariburst malicious domains Purpose: To test Endpoint Detection Response and Network Monitoring Software

install_ipset_rules.sh

Performs the following:

  1. Download your compressed rule hashes from an s3 bucket
  2. Decompress
  3. Install ipset
  4. Add rules
  5. Modify iptables to use the new rules

ip_lookup_from_list.sh

Will perform nslookup on a list of FQDNs in a file (provided via an argument)

ubuntu_change_hostname.sh

Easily change your hostname on any debian based distribution

shred_self.sh

Example script will shred itself once ran

shred_self_and_dir.sh

Example script will shred itself and the current directory (if empty)

use_ssl_decrypt_cert_on_cli.sh

This allows you to use a custom ssl decrypt cert from the keystore on the cli.

For use with Zscaler/ Palo Alto Global Protect SSL decryption.

braker-scripts's People

Contributors

ssstonebraker avatar thoppe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

braker-scripts's Issues

add_current_shell_and_path_to_crontab

Hello

I try to use your script for get default bash env in cron (I found solution from http://stackoverflow.com/questions/2388087/how-to-get-cron-to-call-in-the-correct-paths)

In my crontab, after execute that script, removed some lines (Comments and may be wrong records)

Comments moved to begin of the crontab file (edited)

[*] Current SHELL: /bin/bash                                                                                                                           [1/276]
[*] Current PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[*] Adding current SHELL and PATH to crontab 
old crontab:
-------------------------------------------------------------------------------------------------------------------------------
[email protected]
12      0       *       *       *       /usr/local/ispmgr/sbin/update.sh ispmgr >/dev/null 2>&1
23      *       *       *       *       /usr/local/ispmgr/sbin/rotate
44      17      *       *       *       /usr/local/ispmgr/sbin/traffic.pl

* */12 * * *    find /var/www/all/data/mod-tmp/ -cmin +30 -name "sess_*" -delete
*/5 * * * *     /usr/local/ispmgr/sbin/cron.sh sbin/eximquota.check.sh
*/30    *       *       *       *       /usr/local/ispmgr/sbin/dbcache
10 0 * * *      /usr/local/ispmgr/sbin/cron.sh sbin/mgrctl -m ispmgr task.daily
9 2 * * *       /usr/local/ispmgr/sbin/cron.sh sbin/update.sh ispmgr
*/5 * * * *     /usr/local/ispmgr/sbin/cron.sh sbin/ihttpd.check.sh
#*/5 * * * *    /usr/sbin/logrotate /etc/logrotate.d/error-log-custom
0 6 * * *       /usr/sbin/logrotate -f /var/www/all/data/www/zelenoemore.ru/serverconfigs/predelanet/logrotate/zelenoemore.custom.error.log.conf
#*/10 * * * *   truncate --size=0 /var/www/all/data/www/predelanet.ru/cache/face/error.log
#*/10 * * * *    truncate --size=0 /var/www/all/data/www/zelenoemore.ru/cache/face/error.log
*/5 * * * * env - PATH="$PATH" /root/redis-auto-restart.sh
-------------------------------------------------------------------------------------------------------------------------------
[*] New crontab:
-------------------------------------------------------------------------------------------------------------------------------
#*/5 * * * *    /usr/sbin/logrotate /etc/logrotate.d/error-log-custom
#*/10 * * * *   truncate --size=0 /var/www/all/data/www/predelanet.ru/cache/face/error.log
#*/10 * * * *    truncate --size=0 /var/www/all/data/www/zelenoemore.ru/cache/face/error.log
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

[email protected]
12      0       *       *       *       /usr/local/ispmgr/sbin/update.sh ispmgr >/dev/null 2>&1
23      *       *       *       *       /usr/local/ispmgr/sbin/rotate
44      17      *       *       *       /usr/local/ispmgr/sbin/traffic.pl

* */12 * * *    find /var/www/all/data/mod-tmp/ -cmin +30 -name "sess_*" -delete
*/5 * * * *     /usr/local/ispmgr/sbin/cron.sh sbin/eximquota.check.sh
*/30    *       *       *       *       /usr/local/ispmgr/sbin/dbcache
10 0 * * *      /usr/local/ispmgr/sbin/cron.sh sbin/mgrctl -m ispmgr task.daily
9 2 * * *       /usr/local/ispmgr/sbin/cron.sh sbin/update.sh ispmgr
*/5 * * * *     /usr/local/ispmgr/sbin/cron.sh sbin/ihttpd.check.sh
0 6 * * *       /usr/sbin/logrotate -f /var/www/all/data/www/zelenoemore.ru/serverconfigs/predelanet/logrotate/zelenoemore.custom.error.log.conf
-------------------------------------------------------------------------------------------------------------------------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.