Skip to content

Instantly share code, notes, and snippets.

Richard Henning rhenning

  • Philadelphia, PA
Block or report user

Report or block rhenning

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ee_notes.md
@rhenning
rhenning / equifax2017.md
Created Sep 14, 2017
Equifax 2017 Security Compromise Notes
View equifax2017.md

Equifax Credit Reporting Agency Compromise of 2017

Overview

Credit histories of 143 million Americans were stolen from Equifax by hackers in May 2017 due to compromise of an unpatched Apache Struts software vulnerability (CVE-2017-5638). Equifax disclosed the breach in early September 2017.

@rhenning
rhenning / phoenix_project_notes.md
Last active Aug 28, 2018
Notes from The Phoenix Project
View phoenix_project_notes.md

The Phoenix Project

Chapters 1-5

  • Bill goes out of his way during his conversation with Dick to understand the real business impact of the payroll outage.
  • IT Operations is frequently viewed as a business cost/liability rather than a valued asset, as evidenced by language used to discuss infrastructure. Steve says "IT ... should be like the toilet ... I don't ever
@rhenning
rhenning / djb2.rb
Created Dec 1, 2016
djb2 string to integer hash algorithm
View djb2.rb
i = 5381
k = 33
out = ARGF.read.each_char.inject(i) do |h, c|
h * k + c.ord
end
puts out
@rhenning
rhenning / phillydevops20161129.md
Last active Nov 30, 2016
Philly DevOps Notes 2016-11-29
View phillydevops20161129.md
@rhenning
rhenning / maxcdn_cidr_ck.rb
Created Jul 20, 2016
Check for an address in MaxCDN's address space
View maxcdn_cidr_ck.rb
require 'netaddr'
require 'open-uri'
MAXCDN_IPS =
open('https://www.maxcdn.com/one/assets/ips.txt').map(&:chomp).map do |range|
NetAddr::CIDR.create(range).enumerate
end.flatten
puts MAXCDN_IPS.include?(ARGV.first)
View rhenning_id_rsa2.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKS2e39w/BrCkcxlpnTpiKY7jmHxMIpxHUp9LJByfznPmdd9Nm/LGsFqE0QvECACNE55N4hFDmm/xU9TofjPbT6D8swh20o1WijNf6qNdxfC2zLyKUaUzECzgba4pm1T7uzCUADI/+aiEEo52Hdz1gVV68dn3XIB8+Jycq4mAXcHAWr9ca2JrcUBAO/mQee54Y/a83kragbEz1HLfCepomZPqoBflqdKep3IaV2ayel3KP7uN0QquAejbiaM0Ry45PGbLw7DRva4yiZqGvlsAPokCfFkrHM52rkVteiouer85HTFcH6DIkNQsBCI5/OqNkrTuVJ8u8bbqdHk5RlgYn rhenning2
@rhenning
rhenning / csr2crt.rb
Created Apr 13, 2016
Ruby CSR2CRT test CA signer with CN/SAN rewriting (ala some CAs)
View csr2crt.rb
require 'r509'
csr = R509::CSR.new(csr: File.read(ARGV[0]))
ca_csr = R509::CSR.new(
subject: {
CN: 'www.weblinc.com',
O: 'WebLinc Corp',
C: 'US',
ST: 'Pennsylvania',
@rhenning
rhenning / AWS-ReInvent2015-SEC307-NOTES.md
Last active Apr 8, 2016
re:Invent 2015 SEC307 AWS IAM Federation notes
View AWS-ReInvent2015-SEC307-NOTES.md

https://www.youtube.com/watch?v=-XARG9W2bGc

  • SAML federation at scale
    • Automate onboarding
      • Allow a cross-account trust to create SAML providers w/ MFA from master/payer acct (15:47)
        • This allows bootstrapping new accounts by a small group of admins w/ real IAM accts or root acct
      • automate integrating each subaccount's SAML ID provider
      • automate deployment of subaccount IAM role & policies
      • automate deployment of central directory groups/structure
      • keep role definitions consistent across subaccounts
@rhenning
rhenning / flathash.rb
Created Apr 6, 2016
naive nested ruby hash flattener
View flathash.rb
class FlatHash
def self.flatten_hval(pre, val)
out = {}
val.each do |k, v|
out["#{pre}_#{k}"] = v
end
flatten(out)
end
def self.flatten_aval(pre, val)
You can’t perform that action at this time.