The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.
I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.
This file contains hidden or 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
| function aws_config | |
| if not fgrep -q "[$argv]" ~/.aws/credentials | |
| echo "Please specify a valid profile." | |
| else | |
| set -e AWS_ACCESS_KEY | |
| set -e AWS_SECRET_KEY | |
| set -g -x ATLAS_TOKEN (awk "/\[$argv\]/,/^\$/ { if (\$1 == \"atlas_token\") { print \$3 }}" ~/.aws/credentials) | |
| set account (awk "/\[$argv\]/,/^\$/ { if (\$1 == \"account_id\") { print \$3 }}" ~/.aws/credentials) | |
| set username (awk "/\[$argv\]/,/^\$/ { if (\$1 == \"username\") { print \$3 }}" ~/.aws/credentials) | |
| set mfarn "arn:aws:iam::$account:mfa/$username" |
This file contains hidden or 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
| { | |
| "extractors": [ | |
| { | |
| "condition_type": "string", | |
| "condition_value": "sudo:", | |
| "converters": [], | |
| "cursor_strategy": "copy", | |
| "extractor_config": { | |
| "regex_value": "sudo:\\s+(\\S+)\\s+:" | |
| }, |
This file contains hidden or 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
| $ knife ssh -m "...every host in the network..." "sudo netstat -nutap" -a hostname > meganetstat.txt | |
| $ python | |
| >>> from collections import Counter as C | |
| >>> HS = "...every host in the network...".split() | |
| >>> ip = lambda s: s.split(":")[0] | |
| >>> xs = [map(ip, [x[0], x[4], x[5]]) for x in [x.strip().split() for x in open("meganetstat.txt").readlines() if "tcp" in x] if len(x)>=6] | |
| >>> ipmap = [(h, C([x[1] for x in xs if x[0] == h])) for h in HS] | |
| >>> ipmapx = dict([(sorted([(x,y) for (x,y) in ip[1].items() if x.startswith("10.")], key=lambda t: -t[1])[0][0], ip[0]) for ip in ipmap]) | |
| >>> sorted(C(map(ipmapx.get, [x[2] for x in xs if x[2].startswith("10.")])).items(), key=lambda t: t[1]) |
This file contains hidden or 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
| function table() { | |
| case "$1" in | |
| flip) | |
| echo "(╯°□°)╯︵ ┻━┻ " | |
| ;; | |
| set) | |
| echo "┬─┬ ノ( ゜-゜ノ)" | |
| ;; | |
| man) | |
| echo "(╯°Д°)╯︵ /(.□ . \)" |
This file contains hidden or 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 | |
| # | |
| # This script requires xpath to parse part of the dnscurl.pl output | |
| # on CentOS/RedHat/Amazon Linux: | |
| # | |
| # sudo yum install perl-XML-XPath | |
| # | |
| # also, dnscurl.pl (from http://aws.amazon.com/code/Amazon-Route-53/9706686376855511) | |
| # expects your secrets to be in ~/.aws-secrets | |
| # using a file format like this (from http://dmz.us/wp/wp-content/uploads/r53/aws-secrets.txt) |