For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
CSPRNG (Cryptographically Secure Pseudo-Random Number Generator) functions:
os.urandom(n)
: return a string of n random bytes.random.SystemRandom()
: provides random functions that uses os.urandom()
.Note: Don't use random
module for PRNG for security purposes.
#!/bin/bash | |
JQPATH=$(which jq) | |
if [ "x$JQPATH" == "x" ]; then | |
echo "Couldn't find jq executable." 1>&2 | |
exit 2 | |
fi | |
set -eu | |
shopt -s nullglob |
ENV | |
__pycache__ | |
*.json | |
!example.json |
# GROK match pattern for logstash.conf filter: %{LOG_DATA}%{IP_SPECIFIC_DATA}%{IP_DATA}%{PROTOCOL_DATA} | |
# GROK Custom Patterns (add to patterns directory and reference in GROK filter for pfSense events): | |
# GROK Patterns for pfSense 2.2 Logging Format | |
# | |
# Created 27 Jan 2015 by J. Pisano (Handles TCP, UDP, and ICMP log entries) | |
# Edited 14 Feb 2015 by E. Paul | |
# | |
# Usage: Use with following GROK match pattern |
input { | |
syslog { | |
port => 1514 | |
} | |
} | |
filter { | |
#IP Address of Snort | |
if [host] =~ /192\.168\.0\.250/ { | |
mutate { |
{ | |
"title": "PFSense Firewall", | |
"services": { | |
"query": { | |
"idQueue": [], | |
"list": { | |
"0": { | |
"query": "tags: \"PFSense\" AND action: \"pass\"", | |
"alias": "Passed", | |
"color": "#6ED0E0", |
#!/bin/sh | |
# dependencies | |
echo "Installing dependencies via Homebrew (http://brew.sh)" | |
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
brew update | |
brew install gcc48 |