Github Account Recovery After 2FA Failure.

I just spent a day and a half recovering my Github account after the code in my 2FA application stopped working for authentication. GitHub has a good support article on how to recover your account that has this ominous warning on it:

Warning: For security reasons, GitHub Support may not be able to restore access to accounts with two-factor authentication enabled if you lose your two-factor authentication credentials or lose access to your account recovery methods.

I was worried that I wasn’t going to get access to my account back since I didn’t have a copy of my recovery codes so I reached out to GitHub support and was able to work with them to get access using my verification token from an SSH session.

If you have 2FA enabled on your account you should make sure you have the following:

Hopefully, no one else has to go through this but I figured I would write up my notes since they were fresh in mind.

Automatically Build Kali VM’s in VirtualBox

About once a month I need a Kali VM to use for an hour or so, and I am terrible at keeping a VM up-to-date, so this weekend I took a few hours and built a tool to download automatically, provision and update a Kali Linux VM in Virtualbox.

All the code for this project is in this Github Project.

Here is what the output looks like:

This script meets my needs but if you have any questions or suggestions please feel free to ping me on twitter at @JGamblin

Vulnerablecontainers.org

Recently I have been working on a project to use the Trivy container scanner to scan large swath of containers for open vulnerabilities that I wanted to quickly post here. There is a full blog about the project here on the Kenna site.

Here are some of the pages I have built out so far:

As always reach out to me on twitter if you have any questions.

LoCoMoCoSec 2019

I had the chance to attend LoCoMoCoSec this year and had a fantastic time. It was a well-run conference that was extremely focused on being friendly for families and being inclusive of the diverse group of people who make up our community.

It also doesn’t hurt that it was in one of the most beautiful places I have ever seen.


Many of the attendees and speakers had brought their families with them, and this helped the conference have a fantastic family feel to it.

The organizers decided to keep the inclusiveness going by only offering a cash bar and asking anyone who was planning on over drinking to please move to another bar.


LoCoMoCoSec is the only conference I have attended that is hyper-focused on real-world product security. With talk after talk full of actionable or relatable stories that I will take back to work with me to help improve our security posture. I will highlight some of the key takeaways I will be bringing back to work with me.

Open Source Security

Neil and Adam both had amazing presentations on open source security and I had a ton of conversations with people around the subject at this conference.

Neil talked about how Github struggled with getting from an out of date forked version of Rails to the latest current version. It was one of those rare talks where the presenter was open and honest about how hard it was to get up to date even in a technology company. I am looking forward to this presentation video being uploaded to share with my dev teams.

Adam from NPM talked about framework security and how little code is actually written in modern node apps. This slide shows that 97% of modern node apps are made up of underlying frameworks was one of the most talked about at the conference.

Outside of these talks, I spent a lot of time talking with people about how we can better understand and help the security of the many open source frameworks that companies build their applications on. This is a problem that everyone is obviously thinking about but no one has found an answer to yet.

DevSecOps

I saw three really good talks about DevSecOps from James Wickett, Tanya Janca, and Dave Lindner all of who I really respect as leaders in our industry. They each had a very unique approach to this topic but they all ended up with DevSecOps is really hard and we all have a lot of work left to do. I have some thoughts on this topic and am working on a talk that I am hoping to be able to share later this summer.

James Wickett talk was one of the most entertaining of the conference, and he is writing a DevSecOps book that he is looking for material for. You can check out his slide deck here that includes contact information.

Tanya Janca is a high energy presenter and talked about the DevSecOps in sprints. She also talked about how great organizations have a ratio of 100 Devs to 10 Ops to 1 security person.

David Lindner who works at Contrast and is a friend of mine talked on Friday about the challenges of adapting appsec at a startup and balancing that with business needs. I empathized with him as we both come from startups of about the same size.

Bug Bounties

Bug Bounties are always a touchy subject at these conferences but there was a bunch of great discussions around them and how to improve them to make them more actionable.

Google in their talk about fixing CSP talked about 75% of their web payouts are for XSS bugs and how they are working on fixing that.

Katie Moussouris gave a talk about how bug bounties work and my biggest take away from her talk was that there is likely less than 500 bug bounty hunters who find the majority of all bugs.

CTF

Matt Langlois put together an amazing collabrtive CTF for the last day of the confrence and open sourced all the puzzles.

Dive Track

Melanie Ensign from Uber put together an amazing Dive Track with the ability for people to take a few hours and explore some of the best diving in the world. I took a morning and went out for an amazing drive.

Bubble, bubble.
I loved watching these turtles.

Closing

Overall I had an amazing time and I didn’t talk to anyone who wasn’t looking forward to LoCoMoCoSec 20202. I know if at all possible I will be going back. 🤙

My 2019 RSA Guide

With the 2019 RSA Conference fastly approaching I thought I would take a few minutes and put together a quick list of what I am excited to see this year.

Sunday

Monday

Tuesday

Wednesday

Thursday


Did I miss something cool? If so, let me know Twitter at @jgamblin.

Run Bundle Audit Against A Github Org

Bundle Audit is a great tool to check if the Ruby Gems used in your project have any known vulnerabilities. Most DevOps teams I know run this tool against their builds in their CI/CD process when deploying. This can mean that code that is not updated often can have vulnerable gems unless you have a way to continually monitor your projects.

I spent some time looking at a few solutions this week and I thought I might be able to do this with a crappy shell script™ and the GitHub API. So, this morning while watching cartoons (The new Carmen San Deigo series is excellent.) I wrote this:

https://gist.github.com/jgamblin/e91d25acec689e2cad1ff4b8b4a6e13c

After you grab a github token and update the scirpt, running it is as simple as:

./bundleauditgithub.sh OrgToTest

Since I was watching Netflix while writing this tool I decided to use them since they run a great bounty program on bugcrowd.

Their ruby repos where all up to date outside of Workflowable which they have archived but it makes a good example. Here are complete findings for that repo.

Overall this turned out to be a fairly simple project that I will get a lot of use out of.
If you have any questions let me know twitter at @jgamblin.

Host Websites On Github

I have developed a bad habit of picking up vanity domain names and not really doing much with them. Last month at AWS Re:Invent I picked up ServerlessSecurity.org and really wanted to do something with it but didn’t feel like maintaining, or paying for, a VPS so after doing some looking around I found that is was possible to point a custom domain to Github pages.

The documentation they provide is a little lacking, so I figured I would put together a small how to for anyone who wants to do this for themselves.

Configure Your Github Repo

  • Select Your Theme:
  • Decide What Branch You Want To Host The Page In:
  • Enter Your Domain Name:
  • Enforce HTTPS
  • Finally, Edit Your Index.md file With Your Content.

Configure DNS

DNS configuration is pretty straightforward. You want to add the following IP addresses to your custom resource records.

185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
This is what my records look like.

You Now Have A Website

After you configure your repo and update you DNS settings within 15 minutes or so your website should be live.

Conclusion

This is a really such simple method of hosting a website I parked the rest of my vanity websites:

I hope this is helpful for other people looking to host a website quickly.

Favorite Security Books Of 2018

Here is a list of my favorite security books from 2018 if you are looking for that last minute gift or have some extra time around the holidays to catch up on some reading.  

The GCHQ Puzzle Book 2

I just got The GCHQ Puzzle Book 2, and like the original, it has quickly become the book that I always have in my bag.  It is full of amazingly challenging and thought-provoking problems.  It is easily the best gift you can give the security geek in your life this year. 

Cracking Codes with Python

Cracking Codes with Python: An Introduction to Building and Breaking Ciphers was a great (re)introduction to python development and cryptography concepts. While fairly basic in some places this book will be one I give out to people for years to come. 

Hands-On Security in DevOps

Hands-On Security in DevOps: Ensure continuous security, deployment, and delivery is a great book that covers at a high level what goes into succesfull starting and running a security program.  

Agile Application Security

Agile Application Security: Enabling Security in a Continuous Delivery Pipeline is a book that clearly explains how to make security work in an agile development environment.  This book will be a must-read for security professionals for years to come. 

Dawn of the Code War

Dawn of the Code War: America’s Battle Against Russia, China, and the Rising is a book by John Carlin that shows both how far the US Federal government has come and how far behind the rest of the world they are.  

Re:Invent Re:Cap & Re:ading

I spent this last week in Las Vegas attending AWS Re:Invent

This event is mind-numbingly massive with classes happening at 4 or 5 hotels all over the strip. I personally spent over an hour every day on their (nice but extremely slow) shuttle buses between the MGM Grand, Aria and the Sands Expo Center.

It would be impossible to see everything at this conference so throughout the week I compiled a list of services I wanted to investigate more, and I thought I would share them below.

Security

Serverless

Cloudless(?)

ML/AI

Devops

Grab Bag

Closing Thoughts

I had a great time this year and learned a ton. I am looking forward to playing with Security Hub and to finish reading the AWS Well-Architected Framework PDF soon.

I am disappointed that DeepRacer seems to be AWS just taking the DonkeyCar model and close sourcing it without mentioning the original project, even after they have had DonekyCars at the last 2 re:invents.

Lastly, I interested to see if security is deemphasized next year with the announcement of a security-focused conference called re:inforce.

Automatically Create Github Issues From Burp 2.0

I have started using the Burp Suite 2.0 beta full time recently, and some of the new features I knew I wanted to explore more was the API and the CI Integration.  

I took a few hours this last week and built a small POC shell script that will scan a website and open Github Issues for all findings.  Here is the test repo I have been using to upload issues if you want to follow along at home.

This project is still in its *very* early stages, but if you want to play with what I have been working on below are directions to get started. 

What You Need

Running The Script

Download BurpIssues.sh to the folder where you have burp-ci-driver-v1.0.5beta.jar saved.

Edit the following fields in the script:

Github_Auth_Token="YourToken"
Github_Repo_URL=”YourRepo"
min_severity_burp="low"  # Can Be Info|Low|Medium|High

Once that is done, running the script is as simple as: 

./BurpIssues.sh domainyouhavepermissiontoscan.tld

Reminder:  This is a full burp scan and can take anywhere from 10 mintues to many hours to complete depending on how big the site is. 

What’s Next:

  • Move From Gist To A Github Repo.
  • Add More Fields The Issues
    • Identify Duplicate Issues
  • Kenna Integration
  • JIRA / Service Now Tickets
  • Customizable Scanning and Crawling Profiles
  • Docker Container / VPS Build Script

Closing Thoughts

While I am just getting started with the CI tool, I was impressed that this only took 20 lines of shell code.   I plan on building out a lot more functionality and error checking over the next few months.

If you have any questions, suggestions or improvements, let me know on twitter

Site Footer