Introduction to SecDevOps!
This talk is dedicated to
Segment-your-network Woman
and Patch-your-shit Man!
This talk is heavily focused on the buzzy wuzzy cloudy wowdy
AWS Cloudformation kind of environments, but similar patterns can be used in similar "Cloud Orchestrator" Tools*.
My loose interpretation of "DevOps" is the idea of
source control, testing, deployment and code reuse ;)
Infracode is quicker and easier than maintaining different technical silos.... Pulling in infracode PR from a developer to open a Port on the firewall
*HarshiCorp Terraform, OpenStack Heat, Atlas and others.
Maintain a solid git repository for as much as possible: Application Source/infracode/Jenkins/enviromental data.
For the following examples - Assume the following:
Each of these Repos are accessible from inside the VPN
to people in the correct LDAP security groups.
+ Read-only access is given as required.
The "Hardened" SOE is the sidekick of "patch your shit man"
All of my AWS environment servers are based on a single AMI.
1) Harden single RHEL 7.2 gold release and
utilise in Dev,Test,Pre-Prod and Production.
2) Build AWS launch configuration userdata scripts to maintained to your freerange bespoke machines, but always built on the SOE.
AWS RHEL Packer Serverspec SOE
Tools: Packer by Hashicorp
Tweaking /etc/sysctl.cfg, confirming timezone, installing bastion keys (revoking older keys), run openscap-scanner
Tools: ServerSpec
Test suites meant to be run against machines
Seperate the business functions
into different accounts inside AWS.
Seperate roles in each account to protect against stolen sessions!
Restrict functionality as required.
@dagrz loves popping AWS
Cloudformation allows for the creation of new VPC and Subnets inside these VPCs easily.
Public subnets can be accessible from internet facing addresses
Private subnets can be accessible from public devices
Restricted can ONLY be accessed by private services with the correct security groups!
Preprod Production
CloudFormation is my home boy
I love Jenkins, but it's a
perfect place to get persistence.
Using Jenkins Job Builder, I've moved on Jenkins code into the infracode repository.
Jenkins is read only and all modifications must be completed during the GIT repo.
Pull Requests preferred! :D
ImageTragick is an easy example of untrusted code running on production environments leading to RCE.
KEEP YOUR PASSWORDS OUT OF THE SOURCE CONTROL FOR THE LOVE OF CHRIST! YOU GOD DAMN SAVAGES!
Tools: Credstash/Unicreds
KMS and Credstore dynamodb
Limit write access to passwords
KMS and Credstore dynamodb
Limit read access to passwords
PUT IT ALL IN THE LOGS!
Gauntlt, mittn
Upright and proud
Thank you!