The Infrastructure, II
after DEF CON last year, we posted this blog about our infrastructure, which was spread between a handful of Intel NUCs, and AWS. it was epic. it was shiny and new. we loved it.
and then we burned it all down. we wiped and repurposed the NUCS, and killed all the things in AWS.
our team scouted out our new goods, we bought the hardware, slapped some wheels on it, and started anew.
several of you have been asking for the deets. we've been holding off on writing this until after the con dust settled. so here we go.
Prepping this bad boy for some serious threat hunting training at hacker summer camp with @mbromileyDFIR and @shortxstack 🤘— Eric Capuano (@eric_capuano) June 26, 2019
768GB of RAM
60+ simulated users
7+ nation state adversaries
4 wheels 🚀 pic.twitter.com/szlkDakppX
Our Network Defense Range has migrated to new hardware, now with much MOAR RAM!!— Recon InfoSec (@Recon_InfoSec) March 7, 2019
We'll miss our little NUC cluster but 48 cores and 768 GB of RAM will do just fine 🤓 pic.twitter.com/JVfgxQ3ryK
one of the biggest changes this year...
was that we weren't just running OpenSOC at DEF CON.
we were running NDR Crucible at Black Hat, with a day of "rest" in between that and running OpenSOC at the Blue Team Village.
we needed to scale even more, we needed student systems, we needed more variety, more scenarios, more surprises, more everything.
including MOAR RAM! <3
anyone who's ever relied on any cloud hosting at scale knows what their bank account looks like after months of dev-ing and testing (which is OpenSOC 99% of the year), or even just a month of prod-ing.
OpenSOC is no small environment. this year, we had somewhere around 50-60 windows systems, and roughly 70 linux systems.
this setup gave us PLENTY of horsepower to do all of the above without the monthly overhead. and total control.
one of the biggest milestones this year...
was fully automated windows and DC builds.
after last year, i made it my goal:
at some point in the near future, we plan on automating a lot of our windows builds as well. one thing at a time!
and you guys, i felt like i pulled some magic out of a hat (i am not primarily a windows nerd, far from it).
~40 of our windows systems were completely rebuilt nightly between training days at Black Hat and OpenSOC.
this meant windows, office, all of our random warez that we scattered throughout the environment, scenario artifacts, graylog/osquery/ossec/sysmon agents, traffic generation, all the things. so fresh and so clean. every. day.
one of the biggest hurdles...
was the DEF CON and/or Blue Team Village network. or a combination of both. we're not 100% sure where our problems started.
we got set up on thursday, had everything humming, systems were testing out perfectly when i got up friday morning. i health checked all the things, and walked to the village. and everything came to a screeching halt.
intermittently, things just died. couldn't ping 126.96.36.199. couldn't ping 188.8.131.52. couldn't get outbound for a while. apparently, we were being blocked and/or throttled to some degree. we couldn't get to anything in AWS at one point. we switched between a couple different VPNs, and even switched to cellular for a while. TL;DR - the DEF CON network had its share of issues that morning/afternoon, and as a result, everyone else's did, too.
once we DID figure out that it was a DC and/or BTV network issue, we reworked a few things, and got ourselves sorted out. everything was fine until we hit full capacity. more on that in a minute.
what stayed the same...
was a large part of our DFIR systems.
graylogwe still had a graylog cluster backed by an elasticsearch cluster.
it was ginormous and hardly using half of its resources, which is why we were so surprised when we got to DEF CON, after a completely smooth Black Hat experience, and things started to hiccup.
turns out, even the graylog team was surprised. we had more than double the participants this time around (a good problem to have!), which meant hundreds more people threat hunting on our graylog systems, which meant java was struggling.
thanks to the amazing nerds on the graylog team, all our problems were quickly solved.
Want to send a shout out to @kroepke and @_lennart from the @graylog2 team for helping us resolve an edge case performance issue caused by literally hundreds of threat hunters simulataneously querying Graylog.. after the tweak, performance sky rocketed! pic.twitter.com/aOslV899Ed— Eric Capuano (@eric_capuano) August 13, 2019
turns out, there's a little setting called
http_thread_pool_size that made all the difference. our thread pools were being exhausted with so many people searching on the frontend, and graylog couldn't event talk to its own nodes internally.
a few tweaks and a rolling restart, we were back in business!
Link - https://www.graylog.org
kolidewe still had kolide backed by redis and mysql. we are huge fans of kolide, and that UI is <3
kolide in and of itself didn't have issues. what did have issues... was osquery. and we're still looking into a better fix for that.
a half a dozen users would query a single windows system, and the osquery agent on it would come to a halt. which meant no one could hunt on it.
we crafted a fix to clean and restart those agents on a schedule, and that worked for the duration of the event(s). this is by no means a long term fix, but it worked well enough in this case.
Link - https://kolide.com/
we still had full packet capture in the range--moloch is a huge piece of OpenSOC. this year we integrated suricata, and that allowed us to capture so many more artifacts in each scenario.
traffic analysis, IDS alerts/signatures, PCAPs, rendering sekrit images in the moloch UI, built in cyberchef... so much to be gained from this tool. we are huge fans.
Link - https://molo.ch/
what was different...
we switched some things up this year.
it seems like this has been the bane of our existence a few times now.
Is there a stat for how many people asked shortstack if the scoreboard was down on Slack?— Cake (@ILiedAboutCake) August 11, 2019
but. of all the scoreboards we tried in the past (many), this one was ultimately the most successful in that it met all of our needs (regarding scenarios, hints, points, deductions, user administration, backups, categories, the list goes on). it just crumbled under heavy load.
we're planning on coming prepared with a custom solution next year.
if you played OpenSOC before, you may have seen a few similarities. but we brought about twice the material to DEF CON this year, with at least triple the artifacts to uncover.
more material means more for you guys to sink your teeth into, more tools and tactics to learn.
our team worked unbelievably hard to craft true to life stories, backing real scenarios, depicting real APT's. the behind the scenes red teaming efforts put into this year deserve a blog post all their own.
we didn't use wazuh/ossec this year. we don't get a lot of unique artifacts out of it for the amount of effort and resources it takes to have it in the range, so we let that one go this time around.
it's a great tool to have in your environment (especially for compliance purposes, lots of wins there), but it doesn't lend much to threat hunting that we can't already get out of the above tools.
Link - https://wazuh.com/
as the saying goes, hard work pays off. we were officially made a black badge contest this year. our first year as an official DEF CON contest, and we did it!
we were as surprised as the rest of you, as the finalists found out only minutes after we did :)
Mission accomplished 💙 https://t.co/VHaG1e4IGR— Recon InfoSec (@Recon_InfoSec) August 13, 2019
there are so many moving parts in OpenSOC, and we wouldn't have been able to accomplish any of this without everyone on this team. it truly is a group effort, and a labor of love.
to everyone who participated, has asked to participate, showed us <3 at events, provided feedback or constructive criticism, fresh ideas, we thank you.
we do this for you guys, and we hope you enjoy it as much as we do.
we can't wait to see you at an OpenSOC event in the future! and if you're interested in further training, please check out our other offering, Recon NDR.