Latest / Talk Python To Me / #187: Secure all the things with HubbleStack
Transcript
- 0:00How do you keep track of your security, configuration states, and even out-of-date system-level packages in your servers?
- 0:06Well, what if you had 40,000 or more servers to manage?
- 0:10How would your process scale then?
- 0:12I'll tell you, mine would take a few tweaks.
- 0:14On this episode, you'll meet Colton Myers, who is a co-creator of Hubblestack.
- 0:18Hubblestack is an open-source security compliance framework.
- 0:21It provides on-demand profile-based auditing, real-time security event notifications, alerting, reporting.
- 0:27And yes, Colton, the group, has over 40,000 servers, and Hubblestack is watching over all of them.
- 0:34Learn about this cool Python-based framework on this episode of Talk Python To Me.
- 0:38It's episode 187, recorded November 14th, 2018.
- 0:56Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.
- 1:02This is your host, Michael Kennedy.
- 1:04Follow me on Twitter, where I'm @mkennedy.
- 1:06Keep up with the show and listen to past episodes at talkpython.fm.
- 1:10And follow the show on Twitter via at Talk Python.
- 1:12This episode is sponsored by Linode and Rollbar.
- 1:16Please check out what they're offering during their segments.
- 1:18It really helps support the show.
- 1:19Colton, welcome to Talk Python.
- 1:22Let's get started with your story and how you got into Python.
- 1:25I've been using computers since my parents got a black and white Macintosh.
- 1:29I don't actually know what it is.
- 1:30I should go back and figure out what Macintosh it was so I can tell people.
- 1:33But I would play Lode Runner on that when I was little.
- 1:36I'm, what, 30?
- 1:38Yeah, 30.
- 1:38I can never remember.
- 1:39So I'm younger than a lot.
- 1:43I guess I'm starting to get into the middle of the pack these days.
- 1:45But yeah, I remember playing with that when I was like seven on this little black and white Macintosh.
- 1:49Then we had like a Windows 3.1 machine that I'd play games on.
- 1:52And I mostly played games until high school.
- 1:54And then in high school, I actually, half of my senior year, I did the supplied technology course in computer programming, which was really great, actually.
- 2:03Like half the day I would send over here.
- 2:04It was C#.
- 2:05They had just switched from C++ to C#.
- 2:07Wow, that's a pretty big improvement, actually.
- 2:09Oh, yeah, yeah, yeah.
- 2:10I'm with you on that.
- 2:11And C# is a great language.
- 2:12And back then I was Windows, Windows, Windows, you know, because I was played video games, right?
- 2:17So it worked out just fine.
- 2:19And it was a really good course and really gave me like a jump start.
- 2:22And from there on, I knew that's what I wanted to do.
- 2:25So went into college.
- 2:26That's awesome.
- 2:27Let me ask you more about that because that sounds so awesome.
- 2:30This was a high school program?
- 2:32Yeah, yeah.
- 2:33It was like...
- 2:33And how long did you get to spend programming each day?
- 2:36Half the day.
- 2:37Like you could either do morning.
- 2:39They had a morning session or an afternoon session.
- 2:41And so like basically at lunchtime, you would switch either back to your high school or to
- 2:45the biotechnology center.
- 2:46And it was difficult because you had to like structure your whole schedule around it.
- 2:50Like you had to start planning.
- 2:51You could technically do it as a junior and a senior if you like really plan.
- 2:54But then you'd have to like...
- 2:55I was also in like band and stuff like that.
- 2:57And I'd have to have dropped that.
- 2:58And I was like, no, I'm just going to do it as a senior.
- 3:00But you still have to like make sure that you have all your other like things to graduate,
- 3:04you know, in the rest of your schedule.
- 3:06Your four years of math or three years of English, whatever, right?
- 3:10But it was a super cool program.
- 3:11Like and our professor, I think he's now working for Microsoft or something.
- 3:16But he also used to teach at university.
- 3:18Like he was really good.
- 3:19And he did a great job of like teaching us the right way.
- 3:23And I don't know, man.
- 3:24It was a really good introduction to programming for me.
- 3:27I am so jealous.
- 3:28When I was...
- 3:30This wasn't high school.
- 3:31It was my last year in middle school, I think.
- 3:33I'm pretty sure.
- 3:34But, you know, it could have been the same in high school.
- 3:36My teacher, you know, I took sort of an intro to programming course, right?
- 3:39And my teacher was kind of okay.
- 3:42And I was just really loving it.
- 3:44I said, oh, I'd love to write this kind of program.
- 3:46And like, how can I learn more?
- 3:47And they're like, well, you can do that.
- 3:48But you got to understand, like real programming is actually super hard.
- 3:51And I don't know if you really can do it.
- 3:52Like, I mean, that was my idea.
- 3:53Like, okay, great.
- 3:54Oh, well, that's awesome.
- 3:57I don't know.
- 3:58I'm blessed.
- 3:58Programming just clicks with my brain.
- 4:00Like, it's just is...
- 4:01It has never been a struggle for me to learn how to program.
- 4:04Like, you know, none of the conditionals, none of the advanced logic.
- 4:07Like, obviously, I struggle with like advanced algorithms like anybody does.
- 4:10But like, the basics of programming just came to me immediately.
- 4:13And so...
- 4:15And my teacher actually recognized that.
- 4:16And it was super nice because he like had me helping other students, which was frustrating as much as it was.
- 4:21But it was useful, right?
- 4:22Like, I've always been a bad teacher because with stuff that comes so easily to me because I can't bridge that gap.
- 4:28But he had me helping other students.
- 4:30But then he also like had me doing some of like the second year curriculum along with the first year curriculum.
- 4:34Because he's like, like, I would just finish so early on these projects.
- 4:38And you just be like, well, you can either just sit here and do whatever you want.
- 4:41Or I can get you started on this other stuff.
- 4:43And it was a real blessing like to have that start and to have somebody so supportive.
- 4:48Yeah, I've never heard of anything like that.
- 4:51I've heard of like vocational stuff like shop and, you know, carpentry, but never software.
- 4:57So, man, that's awesome for you.
- 4:59All right.
- 5:00So, that was C# back in the day and Windows.
- 5:03And somehow, your project is not in C#.
- 5:05No.
- 5:06So, college, I went straight into computer science.
- 5:09I knew exactly what I wanted to do.
- 5:10And I managed to make a couple of friends there that were super useful because I went to the University of Utah.
- 5:16And at the time I went, it was still, you know, there.
- 5:18They would start in C#.
- 5:20And then you go to C++.
- 5:21There was a lot of Java involved, like, through all their classes.
- 5:25But they didn't like Python hasn't hadn't at that point really pierced the, you know, the education, which, which is a whole different conversation as to whether we should actually be teaching Python as a first language.
- 5:36I almost think it's almost doing a disservice because it's so easy to program in Python.
- 5:40But I don't know.
- 5:41It's a hard conversation.
- 5:42But I made some good friends who basically we kind of pushed each other to explore outside of what our classes had.
- 5:50So, like some classes where you could choose the language and most people chose C# or Java because that's what we were learning, right?
- 5:54But we decided to try Python at one point.
- 5:56And it was, you know, really awesome.
- 5:57And we were using Git long before they, you know, taught us how to use Git and all these things that really, like, helped jumpstart that and helped me get a base in stuff that maybe I wouldn't have otherwise.
- 6:07And I found Python.
- 6:09I got my laptop stolen in while I was on vacation in Hawaii.
- 6:13And I had a good friend at work who convinced me to buy a Mac instead of a Windows machine, which was a great decision.
- 6:21I really like macOS in general, especially because it's just Unix underneath.
- 6:25And so, you know, that got me into more of the Unix side of things and kind of away from Windows.
- 6:30And you're like, hey, this C# stuff doesn't really work so well.
- 6:33There's mono, but it kind of is clunky over there.
- 6:36And so now what, right?
- 6:37Well, once I found Python, like Python, you just get rid of so much of that boilerplate.
- 6:41Like Java and C# have all this boilerplate and it's just so verbose.
- 6:45And Python, like, any time, like, Python was really interesting because, like, I would be like, oh, I need to do this.
- 6:52I need to, like, open a file or whatever.
- 6:53And I'd be like, okay, so I'm betting it's, like, this is the function name.
- 6:57And it turns out most of the time it was right.
- 6:59Like, it just, like, it felt like it was written out of my, straight out of my brain.
- 7:02And it was just so nice.
- 7:04But, yeah, like, with C# back then, you couldn't really write C# in Linux.
- 7:08Like, mono was just getting off, just getting started.
- 7:11And so I didn't really, yeah, I basically avoided it wherever I could from then on.
- 7:18That's awesome.
- 7:18Yeah, it was really great.
- 7:19Yeah.
- 7:19And of course, you know, those other libraries didn't have nearly the package management story and the ecosystem story that Python does.
- 7:26Sure.
- 7:27Yeah.
- 7:27And then the way, it's really interesting because I just feel like, I don't know, I just have, like, there are so many things in my life that if they'd changed just a little bit, I could have been on such a different path, right?
- 7:38And I think that's true of all of us.
- 7:39But, like, when I was getting close to graduating, I was on a local Python user group.
- 7:43And local startup advertised on that user group, hey, let's, we're looking for Python developers.
- 7:49And I was like, well, I'd love to do Python.
- 7:52But, like, my internship that I'm working on is in C# and C++, right?
- 7:56I'm working, like, at this, you know, on this legacy code base and this DoD contractor, this local or whatever.
- 8:01And I was like, I don't have any experience.
- 8:05Like, I've just written some Python for, like, class projects.
- 8:07And they're like, well, come in and interview.
- 8:09I was like, okay.
- 8:10And apparently, I interviewed pretty well.
- 8:12They were impressed.
- 8:13So, they actually hired me on part-time until I graduated with the expectation that, assuming I did well, you know, they'd hire me full-time.
- 8:20And it worked out.
- 8:20And I, that's how I joined SaltStack.
- 8:22So, I worked with, for SaltStack for three years and really, like, got my Python, you know, really solid and, you know, worked, was able to expand my ops knowledge, you know, because it's a configuration management tool.
- 8:35Yeah, it's not just the Python you got to learn.
- 8:37Right.
- 8:37It's also all the Linux and, you know, DevOps side of things.
- 8:41Yeah.
- 8:41So, that was, like, that was hugely important to my career.
- 8:45Because without that, like, I don't know.
- 8:47I could have found something, I'm sure, is like a junior Python dev.
- 8:50But it just really jump-started it and actually directly led to my position at Adobe, too.
- 8:54So, yeah.
- 8:55That's kind of where my career path has been.
- 8:57No, that's a super interesting story.
- 8:59So, speaking of where you are today, you know, so what do you do day-to-day at Adobe?
- 9:03So, I'm a senior software engineer at Adobe.
- 9:05And I actually mostly work on Hubble.
- 9:08I joined a, I joined actually, the other creator of Hubble.
- 9:13It was kind of his brainchild, but he's not really a developer.
- 9:15So, he was able to, like, you know, say, hey, I want to do this proof of concept.
- 9:19Can I hire somebody for it?
- 9:20And he hired me.
- 9:21We had met because he was actually in the SaltStack community.
- 9:24And his name is Christopher Edwards, by the way.
- 9:26I should give him credit.
- 9:27But this is his baby.
- 9:29And so, he hired me to do this.
- 9:30And the idea was to base it on Salt.
- 9:32And basically, we were trying to replace an existing vendor solution with this proof of concept because the vendor solution wasn't very popular and was very expensive.
- 9:41And so, yeah, we were able to...
- 9:44So, he brought me in on this.
- 9:45And it became just almost overnight.
- 9:48Like, we wrote this proof of concept.
- 9:49And it was good, right?
- 9:50And people liked it.
- 9:52And all of a sudden, it was like, oh, hey.
- 9:54Other people heard about it.
- 9:55And they're like, hey, by the way, our contract with CloudPassage is up next.
- 9:59And we're losing this promotional pricing.
- 10:02It's going to get like three times more expensive.
- 10:04So, could you maybe make it so that Hubble is everywhere at Adobe within like, you know, the next six months?
- 10:10Like, that'd be great.
- 10:11It's like...
- 10:12No pressure or anything, right?
- 10:15Oh, it was crazy.
- 10:17It was a crazy, crazy time.
- 10:18But we were able to...
- 10:20Like, we had an open source from the beginning, which was super awesome.
- 10:22And because it's grown so much inside of Adobe and is so important to our security posture,
- 10:28it's my full-time job.
- 10:29I get paid full-time to write open source software in Python.
- 10:33So, you can't really go wrong with that.
- 10:35Yeah.
- 10:36I feel like that's a lot of Python developers' dreams, right?
- 10:40They're like, I want to work on this open source thing I love.
- 10:42And I want to get paid full-time for it.
- 10:44Like, there's not that many people that get to do that.
- 10:46And I just like fell into it.
- 10:47Like, I...
- 10:48So much, so much...
- 10:49Yeah, I don't know.
- 10:50I don't even know how to approach how lucky I am that way.
- 10:54But it's been really great.
- 10:56So, yeah, that's kind of what I do.
- 10:57I just work on Hubble Stack.
- 10:58Okay.
- 10:59Super.
- 10:59So, maybe let's start with a super high-level conversation about this.
- 11:05Just even...
- 11:06Not just Hubble Stack and Hubble and Hubble Stack, but just this idea in general.
- 11:10So, what it is an open source security compliance monitoring and auditing system.
- 11:15Like, tell us just sort of about that world.
- 11:17Like, what kind of...
- 11:18So many words.
- 11:19What kinds of things...
- 11:20Yeah, I know.
- 11:21Yeah.
- 11:21So, just tell us, you know, what's that world like?
- 11:23And what kind of role does this try to play in there?
- 11:26So, there's a couple pieces, right?
- 11:27We...
- 11:28Security has multiple facets.
- 11:29And one of those facets is compliance.
- 11:32And really, the reason compliance is so important...
- 11:35I'm going to put air quotes around important.
- 11:37Because the reason compliance is so important is for these certifications, right?
- 11:41If you deal with customer data, especially like credit card data and that kind of stuff,
- 11:45then you need like PCI.
- 11:46Right.
- 11:47Exactly.
- 11:47You know, you might have SOX compliance.
- 11:50You might have HIPAA, right?
- 11:51All these different things that if you can check that box, you can have customers that you might
- 11:55not otherwise, right?
- 11:55And each of these has different requirements for compliance.
- 12:00A lot of them are a lot less fleshed out than you'd expect.
- 12:03Most of them, like, they just say, like, the audit...
- 12:05The auditors come in and they...
- 12:07And the audit control says something like,
- 12:09you have a baseline security compliance check thing that you audit against regularly and
- 12:16make sure that everything is in compliance, right?
- 12:17And it's just like written like that.
- 12:19And so at Adobe, we use the CIS compliance checks, Center for Internet Security.
- 12:24They are a nonprofit that publishes these profiles that allow you to...
- 12:29You know, if you follow all these checks in here, then you'll be more secure than if you
- 12:33didn't.
- 12:34That's the idea, right?
- 12:34Right.
- 12:35So does it include, like, known vulnerabilities or is it more like guidelines on, like, hardening
- 12:41of the server or what's...
- 12:42Yeah, it's more along the lines of hardening.
- 12:44Like, I don't think CIS...
- 12:46I don't actually know if they do, but I don't think they publish, like, a vulnerability list
- 12:49or a CVE list or anything like that.
- 12:50It's more like, hey, do you have root login enabled on your server, right?
- 12:55In SSH.
- 12:56And if you do, that's a problem, right?
- 12:57Do you have password list login?
- 13:00Do you have password login even, right?
- 13:02Like, or is it just SSH?
- 13:03Like, you know, those are easy ones to point out for SSH, but it's also like, hey, do you
- 13:08have Telnet installed, right?
- 13:09Do you have all these different things that are just like, you know, do you have FTP?
- 13:13Are you serving anything via FTP as opposed to SFTP, right?
- 13:17Like, just the gimmies, right?
- 13:19And obviously, they get a lot worse, like...
- 13:22Or a lot worse.
- 13:23A lot more stringent.
- 13:24Like, oh, you need to have SSH timeouts on your host set to these low values, right?
- 13:29So that it quickly kicks people off if they're not typing and that kind of stuff.
- 13:32And those, you know, obviously, as you get further and further into these checks, these
- 13:36different levels, they actually split them up into levels.
- 13:38It becomes less convenient, right?
- 13:40Because security is always a compromise between convenience and security, right?
- 13:44Right.
- 13:45So we basically choose a subset of those and we audit against them.
- 13:47And that is actually where like the big money is.
- 13:49Like, that's where we get like customers, right?
- 13:51But if I'm being honest, it's not actually making us a lot more secure.
- 13:56Like, obviously, if we have root login enabled, we should not, right?
- 13:59But like you fix that once.
- 14:00But that doesn't mean you're secure now, right?
- 14:03And so the other piece, the rest of Hubble is just to collect other data that our blue team
- 14:08can use to watch for actual like ongoing attacks, big holes, you know, that maybe an audit wouldn't
- 14:15have caught otherwise.
- 14:16Right.
- 14:16So give me an example.
- 14:18This is something I wonder all the time.
- 14:20If you don't know, that's fine.
- 14:21But give me an example of what an attack looks like, right?
- 14:26Like if I log into my server, it seems okay.
- 14:28You know, nobody's saying, hey, our data seems to be gone.
- 14:31But like, how do I, you know, shared, right, like stolen, but how do I look at the server
- 14:36and know outside of say web logs?
- 14:39Yeah, I mean, that's kind of a hard question.
- 14:41And I and that's actually not my expertise.
- 14:42Like I'm not a security engineer, but I work with them a lot.
- 14:46One that's pretty common in 2018 is if somebody gets access to your server, they might install
- 14:51a cryptocurrency miner on your server, right?
- 14:53And so, you know, one of the ways we can look for that kind of stuff is, oh, you know, in
- 14:58one piece of Hubble, we collect like the established outbound connections on your host, right?
- 15:02Because certain services have outbound connections, like that's a thing that they should
- 15:09have.
- 15:09But a lot of them don't.
- 15:09A lot of them just accept inbound, right?
- 15:11Especially if it's just like a web server, right?
- 15:12It's accepting inbound connections, but not reaching out.
- 15:15So if we see an outbound connection from a process we don't recognize or an uncommon process,
- 15:21then we might look into that and say, hey, you know, what's going on here?
- 15:25I see.
- 15:25That makes a lot of sense.
- 15:26Yeah, I mean, there are a lot of like tells like you can.
- 15:28You could have increased CPU usage or like, you know, stuff slowing down.
- 15:32Like, obviously, they're trying not to leave tracks, right?
- 15:34So they will tend, you know, attackers will tend to try to not let you know that they're
- 15:40there.
- 15:40So it's hard.
- 15:41Like, it's not it's a hard problem.
- 15:42And that's why we have a whole security team.
- 15:44We have the team I work with just with the digital marketing.
- 15:47They must have 30 security engineers, both like red team and blue team, like just constantly
- 15:52combing this data looking for patterns.
- 15:54And we have a whole security operations center looking for these alerts.
- 15:57And it's like it's a big thing because it's harder and harder, you know, in 2018 to keep
- 16:03your stuff secure.
- 16:03It definitely is.
- 16:04So maybe just to find some terms for folks who are not super up to date on the security
- 16:09side of things.
- 16:10Red team is the penetration testers and the folks trying to break in and the blue team
- 16:15are people like using Hubble to say, you know, wait, wait, wait.
- 16:18Why is it making all these connections to this VP over this VPN to somewhere we don't
- 16:22recognize?
- 16:23Yeah, exactly.
- 16:23The red team is trying to break it.
- 16:25They're the hackers.
- 16:26They're the white hat hackers, right?
- 16:27That say, how can we we're just going to spend all day trying to get into Adobe's hosts.
- 16:31And then if we find a way in, then we can patch that hole.
- 16:34The blue team can patch that hole.
- 16:35And they actually have like these whole things where like red team will set up these different
- 16:38things and make sure the blue team catches them.
- 16:40Like sometimes red team will work with access to the box and just say, let's assume I get access
- 16:45to the box.
- 16:46I don't you know, I don't have a way right now.
- 16:47We've patched all those holes, but let's assume and I'm going to just set up these breadcrumbs
- 16:51and make sure that blue team is catching them because blue team says they're watching for
- 16:54these things, but are they actually watching?
- 16:55You know?
- 16:55Yeah.
- 16:56And it's this back and forth.
- 16:57And then blue team is trying to catch red team.
- 16:59But then they're also trying to catch like black, you know, like the actual attackers,
- 17:03you know, because people are always trying to get into our data, right?
- 17:07Like they it could be really lucrative.
- 17:08And so we've had so many hacks that we see in the in the industry.
- 17:11And, you know, nobody doesn't want to be next on that list.
- 17:14So we have a substantial team.
- 17:16You do not want to be in those headlines.
- 17:17That's right.
- 17:17So no, no.
- 17:19This portion of Talk Python To Me is brought to you by Linode.
- 17:25Are you looking for bulletproof hosting that's fast, simple and incredibly affordable?
- 17:29Look past that bookstore and check out Linode at talkpython.fm/Linode.
- 17:34That's L I N O D E.
- 17:36Plans start at just $5 a month for a dedicated server with a gig of RAM.
- 17:41They have 10 data centers across the globe.
- 17:43So no matter where you are, there's a data center near you.
- 17:45Whether you want to run your Python web app, host a private get server or file server, you'll
- 17:51get native SSDs on all the machines, a newly upgraded 200 gigabit network, 24 seven friendly support, even on holidays and a seven day money back guarantee.
- 18:01Do you need a little help with your infrastructure?
- 18:03They even offer professional services to help you get started with architecture, migrations and more.
- 18:09Get a dedicated server for free for the next four months.
- 18:12Just visit talkpython.fm/Linode.
- 18:17Do you think containers and Docker and things like that make this harder or easier to protect?
- 18:23It's a combination.
- 18:24One thing that we've been struggling with is the so, you know, Docker is 12 factor apps, right?
- 18:30Like, are you familiar with the 12 factor thing?
- 18:31Yeah.
- 18:32But maybe give the listeners a quick, just a super quick rundown.
- 18:35What is the site?
- 18:36It's like there's like a site 12 factor dot net with like one, two factor dot net.
- 18:40And basically it's like this, the systems of things that like make, let's read their introduction.
- 18:45Software as a service, 12 factor app is a methodology for building software as a service inputs that have these different things.
- 18:51And really it's where containers come from and where these microservices come from.
- 18:55Like you want everything to be immutable and like easy to, you know, set up fresh, you know, instead of changing a host when it starts to misbehave, you just burn it down and create a new one.
- 19:03Don't embed all the configuration information and put that like in the environment.
- 19:07And so it's separate from, say, your source code and your app code and whatnot.
- 19:11And there are some great advantages to that because if you start with an image that like, for example, in auditing, right?
- 19:16If you start with an image that has all of those audit checks already passing, right?
- 19:20Then you're just starting from a much better place, right?
- 19:23And you can make sure that everybody is starting from this, you know, hardened, secure image, right?
- 19:26And then past that, when you're not messing with hosts, you have a lot fewer snowflakes.
- 19:31I mean, you have a lot fewer inconsistencies across your hosts in theory, right?
- 19:35And really where the attackers get in is in those snowflake servers that like have kind of been forgotten about, you know, sometimes they get in via dev, you know, whatever.
- 19:43Nobody wants to upgrade it because it might break the thing.
- 19:46Right.
- 19:46That person used to maintain, but they left the company and no one wants to make it their problem.
- 19:50So they don't touch it.
- 19:51But it has problems too.
- 19:52Like, for example, the established way to pass secrets into a container via the 12 factor method is via environment variables.
- 20:00And security engineers don't like that.
- 20:02They don't like secrets and environment variables.
- 20:04Because soon as you're on the box, you can just, you know, query the environment variables and see all the logins and stuff, right?
- 20:10Exactly.
- 20:10And theoretically, you know, you don't have the ability to log into the actual container, right?
- 20:16Because you don't ever need to.
- 20:17And so theoretically, and then of course, you're using CoreOS or something that is theoretically more secure, right?
- 20:23So like there's frameworks around that to try to prevent that from being as bad of a problem as it is.
- 20:27But it still is, you know, a hard thing that we're trying to deal with.
- 20:29So I do think 12 factor and containers and immutable images and those kinds of things do have a lot of advantages.
- 20:37But and probably the advantages override the disadvantages.
- 20:40But the other problem is that not every use case fits into that, right?
- 20:45Containers don't like, you know, we have 40,000 some odd servers across our analytics product.
- 20:51And like using those, like it's just not, you know, it would take a huge rewrite of that product to make it a microservices, you know, product kind of a thing.
- 21:00So like, so like it's going to take many years.
- 21:02And even then there are certain applications where like just being on bare metal is just better, more performant, etc.
- 21:09So it's never going to be like the only thing that we do.
- 21:12I don't think, I don't know.
- 21:13I'm not going to try to guess.
- 21:14But I do think from a security perspective, it is better overall.
- 21:18Yeah, interesting.
- 21:19I think it probably is as well.
- 21:20It's easier to set one baseline and just create the images from that.
- 21:24But still, I think it also, it seems like things change more often.
- 21:28And somebody could flip a switch in that image that you don't realize or in a base image, you know, somewhere down that chain.
- 21:33And, you know, all of a sudden, everything's like that.
- 21:36Not just that snowflake server, right?
- 21:38But that's also easy to undo when you find it, right?
- 21:40Because again, you just switch it on a higher level.
- 21:43And the next time they build their image, they get that, right?
- 21:44So I don't know.
- 21:45But yeah.
- 21:47Yeah, a bit of a diversion.
- 21:48But so let's, if you don't mind, tell us as much as you're happy to share.
- 21:53Just a little bit about, you talked about 40,000 servers, something like that.
- 21:57When I think of Adobe, I think of Photoshop and things like that that are more apps on like a desktop or a tablet or something.
- 22:06Give us a sense of what a cloud and server world looks like over there.
- 22:10So I have less of a sense on the, so we have two major business units.
- 22:14We have our digital media, which is what you referred to, the Photoshop, etc, etc.
- 22:20And then we have our digital marketing or digital experience as it's been rebranded recently.
- 22:23And that actually started from an acquisition of a company called Omniture here in Utah.
- 22:28And it turned into like, Adobe is one of the big players in marketing analytics.
- 22:32They do everything from helping customers see what's working as far as advertising on their sites to helping serve social media stuff.
- 22:42There's a whole suite of stuff that you can get from Adobe.
- 22:44And it's much less known, even though it's a pretty big business unit.
- 22:47And that's actually, on the digital media side, we have servers, right?
- 22:50Because we have now Creative Cloud, right?
- 22:52And we have to serve all that data.
- 22:53We have to keep your...
- 22:54You can keep your files in our Creative Cloud, all that stuff, right?
- 22:57Right.
- 22:57But it's much bigger on the digital marketing side because we're doing the software as a service for all these big companies.
- 23:03Yeah.
- 23:04So on the digital marketing side, we have something like 100, 120,000 servers or so across a whole bunch of teams.
- 23:10We just acquired...
- 23:11Adobe just finished acquiring Marketo, which added a whole bunch of new infrastructure to our...
- 23:16That we have to worry about.
- 23:18So how does that kind of stuff sort of shape what you're building and what Hubble is, where somebody outside of the company says,
- 23:28Oh, we just acquired this other company.
- 23:29And now they use this technology and here's all their servers.
- 23:31It changed a lot.
- 23:32It affected us a lot.
- 23:33LiveFire, we acquired a few years ago.
- 23:36And that one was a big one because they did a lot of auto scaling in AWS.
- 23:39And our original Hubble was built on top of Salt directly, right?
- 23:44You would deploy it as a series of modules inside of Salt.
- 23:48And that worked well.
- 23:50Not nearly as well as today's product, but they worked well.
- 23:53But then we get to LiveFire and it's going to be prohibitively expensive for them to actually deploy SaltStack everywhere.
- 23:58Because what they use, they use AWS a lot like containers, right?
- 24:02They use AMIs.
- 24:03They use images, right?
- 24:05And they don't really modify their host.
- 24:07They don't really have a good configuration management story in place because they don't need to, right?
- 24:10They use it like containers.
- 24:11So we basically realized that we needed a product that could be standalone, right?
- 24:15That did not rely on Salt.
- 24:16Because as this went wider and wider, a lot of teams at Adobe don't use Salt.
- 24:20And we couldn't necessarily force them to.
- 24:22Or it wasn't going to be prudent, right?
- 24:24So we created Hubble, which we use PyInstaller to compile.
- 24:30So that it basically, we do our best to compile everything into one directory.
- 24:35All of our dependencies, our packages have no dependencies, except glibc, which we can assume is going to be on a Linux host.
- 24:42It has no dependencies.
- 24:44It ships with its own Python.
- 24:45It doesn't mess with existing Pythons.
- 24:47It doesn't mess with existing Salt.
- 24:48It doesn't mess with anything.
- 24:49And that was hugely advantageous because now we can just say, hey, teams, all you need to do is install this package, put the configuration in place once, and restart Hubble.
- 25:00And all of a sudden, you were getting all of your reporting, right?
- 25:03And we're not adding a whole bunch of new stuff to overwhelm your Salt masters, right?
- 25:08We talked directly from those hosts to Splunk, which is the tool we use to collate all of those results.
- 25:14And it turned out to be just way better.
- 25:18And so eventually, we actually...
- 25:19Oh, and by the way, that version of Hubble does still use Salt.
- 25:23It just uses it as a library.
- 25:24It just imports Salt.
- 25:25Right.
- 25:25But we were able to just slim it down and make it so much more targeted and make it work so much better and make the onboarding story so much better that we eventually deprecated Hubble Salt and just focused on the standalone.
- 25:38Right.
- 25:39So Hubble Salt was the original one where it was just completely assuming this is going to be built on SaltStack, right?
- 25:46And now you kind of...
- 25:47Yeah, you just add it as like a remote in your SaltStack master and it just like pulls down the stuff.
- 25:51Right, right.
- 25:52But with all these acquisitions and disparate infrastructure, it's like, okay, well, that's not working.
- 25:57So let's not require that.
- 25:59Let's just do this straight Hubble.
- 26:01And what I'm really impressed with is your ability to take this and deploy it.
- 26:06No Python dependency on the machine.
- 26:09No pip install -r requirements dependency on the machine.
- 26:14Just here is a binary, run it.
- 26:16Like that seems just golden for Python.
- 26:18Oh, it's amazing.
- 26:19Like I, you know, yeah, pip is great.
- 26:21But like being able to like a lot of if you talk to SREs, they don't like pip in general.
- 26:27Yeah.
- 26:27They want to install via system packages.
- 26:30Why wouldn't they want to just download arbitrary code from the internet and run it?
- 26:33That's so, so paranoid.
- 26:35It's just, I mean, and pip has gotten so much better.
- 26:38But like, you know, it still doesn't even, it has like some uninstall issues.
- 26:41Like these days, it's a lot better than it used to be.
- 26:43But yeah, like they just want to do it as a package because that's what they're doing with everything else.
- 26:47Right.
- 26:47They just want to do RPM or deb.
- 26:49Like that's it.
- 26:50And so it's been really advantageous to do that.
- 26:52And we actually, we also use, we cheat a lot, right?
- 26:55We actually don't use proper Debian standards for packaging.
- 26:59We just use FPM because FPM is amazing and just makes it so easy to package for any operating system.
- 27:05And it's just been really good.
- 27:07And it was so much better.
- 27:08Like even if you're using salt, like my team uses salt.
- 27:11And it was like upgrading Hubble salt was much more of a pain to get consistent across our infrastructure than just doing this package.
- 27:18And so, you know, I immediately switched us to Hubble instead.
- 27:22And I was like, this is so much better.
- 27:23So, you know, we're actually in the process of completely phasing out Hubble salt.
- 27:27It's mostly gone out of Adobe's infrastructure and Hubble is Hubble's king.
- 27:31So is Hubble salt still a thing in open source?
- 27:34Or are you trying to push everyone over to Hubble outside Adobe as well?
- 27:37It's not a thing.
- 27:38Well, if somebody wanted to fork it, it's Apache 2.
- 27:40Go for it.
- 27:41But we have stopped maintaining it.
- 27:43I put a note in the readme and, you know, said we're deprecating this.
- 27:48Like I encourage you to try Hubble because it's just better.
- 27:52Like it's just a better story for users.
- 27:54So obviously, I don't know if we said it explicitly, but Hubble is written in Python.
- 27:58Yeah.
- 27:58Yes.
- 27:59So that's great.
- 28:00But I do love that you don't have to, you know, as a consumer,
- 28:04of it for your servers.
- 28:06You don't have to care that it's in Python.
- 28:08You just take the thing and run it.
- 28:09It's great that we have pip and it's in Python and all that for developing it.
- 28:14But it's, I just don't feel like pip is the right answer for consumers and users in general.
- 28:20And it's cool that you guys made that work.
- 28:22Yeah.
- 28:22We like it a lot.
- 28:23Yeah.
- 28:23So when I go to the GitHub organization, I see three things at least.
- 28:28I see Hubble and Hubble salt.
- 28:30Those are the two we talked about, right?
- 28:31And then there's also Hubble stack data.
- 28:34Now, do you want to maybe tell us about that?
- 28:36So the idea behind Hubble is that we, because upgrading is expensive, even though it shouldn't
- 28:41be, even though it should just be a, an RPM upgrade, right?
- 28:43It's expensive to work with all of these teams to upgrade because they're busy with their own
- 28:46stuff, right?
- 28:47So the idea was to try to make it as much as possible that we could safely change the information
- 28:53that we're gathering from a source that, you know, security engineering controls.
- 28:58Right.
- 28:58So this is something like the vulnerable, new vulnerabilities or new things to check
- 29:03for.
- 29:04Exactly.
- 29:04So we find out that we need to check for this new file or whatever.
- 29:08We want to watch this file that we haven't been watching, or we want to add this new audit
- 29:11check or whatever.
- 29:11We don't want to necessarily have to deploy new code to the servers, right?
- 29:15But on the other hand, we also don't want to give ourselves the ability to run arbitrary
- 29:19code on the servers.
- 29:21It's this compromise, right?
- 29:22We work as hard as we can to give ourselves as much flexibility in data gathering, but we also
- 29:26work as hard as we can to make sure that we can't modify the server from Hubble stack data
- 29:30and that any changes to Hubble stack data will be safe, right?
- 29:34So, you know, we have an agreement with our customers, which are other users at Adobe, that
- 29:39we won't push code to that Hubble stack data repo.
- 29:42And then we also, you know, we'll notify them and do it with a change request, a change management
- 29:46request inside of Adobe whenever we merge to like the master branch, right?
- 29:50So we treat it almost like a code deploy, even though it's not.
- 29:52And that way, you know, we mitigate the risk and we do testing around it before we merge
- 29:58those things.
- 29:58And that has just allowed us to create trust with our customers, right?
- 30:02That we're not going to, that Hubble is not going to mess up their servers.
- 30:04And so, yeah, Hubble stack data is where all of the profiles is the word we've chosen.
- 30:09That basically tells Hubble what data to collect.
- 30:12And inside of there, we have a couple of different components inside of Hubble.
- 30:16I guess I should have given like a high level review earlier than this, probably right?
- 30:2035 minutes in here.
- 30:21It's all right.
- 30:22Like I mentioned, Hubble does a couple of things, right?
- 30:24It does these audits, which are success fail checks against like, say, CIS or Red Hat Stig,
- 30:31any, you know, these different compliance standards.
- 30:34And that the code name for that is Nova.
- 30:36Hubble, you know, is named after the telescope.
- 30:38The idea is where we are looking with our telescope into the black hole of our infrastructure,
- 30:42right?
- 30:43We hope it's not a black hole, but sometimes it feels that way.
- 30:45But it can be vast, right?
- 30:46I mean, like trying to maintain 40,000 servers is not a not an obvious thing to do.
- 30:52It's crazy.
- 30:52And again, you know, yes, most of the servers are fine, but it's the edges that are hard.
- 30:56And those edges are the hardest thing for SREs to keep track of, right?
- 30:59So we everything is space themed.
- 31:01We may be moving away from that in the near future just because it's really hard to keep
- 31:04track of.
- 31:05Like if I say Nova, you're like, I don't know what that is.
- 31:07But if I say audit, you can say, oh, I get an idea of what that is.
- 31:11So Nova is the audit piece and that's all success fail stuff.
- 31:15It's built on this.
- 31:16You basically write these YAML profiles in kind of an ugly format.
- 31:20We're going to hopefully improve that in the near future.
- 31:23But but it works well.
- 31:24Just returns, you know, you can see all the failures.
- 31:27And then, you know, we then can ticket, you know, in JIRA, the teams that need to make changes
- 31:32based on those failures.
- 31:33And then we have Nebula, which is kind of our like data gathering segment of Hubble.
- 31:39It primarily uses OS query, which is a really cool open source project by Facebook.
- 31:45And it basically OS query allows you to query your system as if it was an SQL database.
- 31:51So you can query everything.
- 31:53Right.
- 31:53I've seen that.
- 31:54That is amazing.
- 31:55Yeah, it's really cool.
- 31:56You can query everything from like network connections to like installed packages to
- 32:01all sorts of stuff.
- 32:02It's crazy.
- 32:03It's actively developed.
- 32:03They fixed for a while.
- 32:05Facebook had we had some drama with Facebook around there.
- 32:08Oh, it was like a patents clause and like they're in their projects.
- 32:12And it was it was a bigger deal for Angular's Angular that they do.
- 32:16Or is it?
- 32:16I don't remember what JS project it is.
- 32:19It's react.
- 32:19I think react.
- 32:20Thank you.
- 32:21And it was this big deal because it's like if you if Facebook ever ends in ends up in
- 32:25litigation with your company, right, then we this is revoked and you can't use our
- 32:29thing.
- 32:30Right.
- 32:30And so it's this big thing that like, you know, a bunch of companies were like,
- 32:33we got to get react out of our infrastructure because of all this stuff like the lawyers
- 32:37were like, no, it cannot be that.
- 32:38And anyway, Facebook has fixed that since including with those queries.
- 32:41So it's it's been good.
- 32:42But yeah, it's a really cool product.
- 32:44And we use that to just collect terabytes of data every day from our hosts, everything like
- 32:49from the easy gimmies like established outbound connections to like all the packages installed
- 32:55on the system to all like the Docker processes running to shell histories to like we just collect
- 33:00all this stuff and shove it into Splunk.
- 33:02And then our blue team can sift through it and try to try to find actionable insights.
- 33:05That's not what makes us the money.
- 33:07But that's where the blue team is super excited about the data, right?
- 33:10That's the data that's useful to them.
- 33:12Right.
- 33:12And then we have Pulsar, which is our file integrity monitoring or FIM.
- 33:16We use iNotify on Linux and NTFS journaling on Windows.
- 33:21By the way, Hubble runs on Windows.
- 33:22Yeah, I was going to ask you that.
- 33:23So obviously it runs on Linux, but also runs on like Windows server.
- 33:27Yeah, yeah.
- 33:27Mac, macOS.
- 33:28It could run on Mac.
- 33:30There's nothing like there's nothing stopping it from running on Mac.
- 33:33It runs great.
- 33:33We don't have any audit profiles that are Mac specific in Hubble stack data yet.
- 33:38And we don't have like packages and like all the P list stuff for services.
- 33:43Yeah.
- 33:43I mean, there's very few servers running macOS, but there are some, I think, like some of these
- 33:49build systems.
- 33:50Yeah.
- 33:50Well, and theoretically, like some people, some people would like to use Hubble for like,
- 33:55like laptops and that kind of stuff.
- 33:58And it's really not like desktop management for like, I want to know what my machines
- 34:02are up to.
- 34:03And it could be useful that way.
- 34:04It would take some work to make it like more user friendly.
- 34:06Like you can't just like this is meant to be run on the CLI and doesn't have a UI at all.
- 34:12You know what I mean?
- 34:12Like it would take some work, but potentially, but I've tried to push back on that because
- 34:15I don't think it's useful.
- 34:17But anyway, so Pulsar.
- 34:20Okay.
- 34:20Yeah.
- 34:21Keep going on the infrastructures.
- 34:22Yeah.
- 34:22Yeah.
- 34:22Pulsar, FIM.
- 34:23We just basically collect file changes on the host and you can have it.
- 34:28Like send checksums of the new files.
- 34:29And that way you can compare, you know, is this, does this match our whitelist of checksums
- 34:33for the specific binary or whatever?
- 34:34We don't have a good answer on that one for like changes that are supposed to happen.
- 34:40Right.
- 34:40There's no, I don't have a good way to turn off our monitoring during say a configuration
- 34:45management push.
- 34:46Right.
- 34:47Like, obviously I could say, oh, if you lay down this file, then we'll say, oh, that
- 34:50file's there.
- 34:50Let's stop collecting for a minute.
- 34:51But like then an attacker could lay down that file.
- 34:53Right.
- 34:53So there's like, we haven't figured out a secure way for like a salt master to tell Hubble to
- 34:58stop collecting because Hubble doesn't accept incoming connections.
- 35:02Right.
- 35:02It only shoves data out and pulls data from, from GitHub.
- 35:05So, or from S3 or from wherever else.
- 35:08And so those are the big pieces.
- 35:10The other code name is Quasar, which is, I don't know if it qualifies as being its own
- 35:15section.
- 35:15It's basically just, that's the returners in salt.
- 35:18That's the salt stack terminology.
- 35:20But basically that's the glue that allows us to send the data to a destination.
- 35:25We support Splunk.
- 35:26That's what we use in Adobe.
- 35:27We also support elk and log stash.
- 35:29So that's what most of our open source users are using, I think, because Splunk is very
- 35:33expensive.
- 35:34Yeah.
- 35:34Yeah.
- 35:35So that's, that's kind of the high level overview of the pieces of Hubble.
- 35:38This portion of Talk Python To Me is brought to you by Rollbar.
- 35:44Got a question for you.
- 35:45Have you been outsourcing your bug discovery to your users?
- 35:48Have you been making them send you bug reports?
- 35:50You know, there's two problems with that.
- 35:52You can't discover all the bugs this way.
- 35:54And some users don't bother reporting bugs at all.
- 35:57They just leave sometimes forever.
- 35:59The best software teams practice proactive error monitoring.
- 36:02They detect all the errors in their production apps and services in real time and debug important
- 36:07errors in minutes or hours, sometimes before users even notice.
- 36:11Teams from companies like Twilio, Instacart, and CircleCI use Rollbar to do this.
- 36:16With Rollbar, you get a real-time feed of all the errors so you know exactly what's broken
- 36:21in production.
- 36:22And Rollbar automatically collects all the relevant data and metadata you need to debug the
- 36:27errors so you don't have to sift through logs.
- 36:29If you aren't using Rollbar yet, they have a special offer for you and it's really awesome.
- 36:33Sign up and install Rollbar at talkpython.fm/Rollbar.
- 36:38And Rollbar will send you a $100 gift card to use at the Open Collective, where you can donate
- 36:43to any of the 900 plus projects listed under the Open Source Collective or to the Women Who
- 36:49Code organization.
- 36:49Get notified of errors in real time and make a difference in Open Source.
- 36:53Visit talkpython.fm/Rollbar today.
- 36:56All right.
- 36:59So give me an example of maybe how once this data is collected, like what kinds of questions
- 37:06would you ask?
- 37:07So I'm not familiar with Splunk.
- 37:09You said this is not an Open Source project.
- 37:11It's like a paid commercial thing that's kind of pricey.
- 37:13Yeah.
- 37:14So Splunk is...
- 37:15How do they...
- 37:16What do they call themselves?
- 37:16Describe themselves.
- 37:17Search, analyze, and visualize the machine data generated by your organization.
- 37:22Right?
- 37:22So the idea behind Splunk is it's kind of the same story as like an elk stack, right?
- 37:27You have the collection, you know, with Logstash.
- 37:30You have the coordination with Elasticsearch that...
- 37:33Sorry, not coordination.
- 37:34Queryability with...
- 37:35Yeah.
- 37:36Correlations, I guess, is what I meant to say.
- 37:38Yeah, yeah.
- 37:38Okay.
- 37:39With Logstash...
- 37:39Or sorry, with Elasticsearch.
- 37:41And then you have Kibana for like reports and stuff.
- 37:45And Splunk does all of those things, right?
- 37:46You can do these elaborate searches and correlations across the data.
- 37:52And then you can turn that into, you know, alerts.
- 37:55Or you can turn that into dashboards.
- 37:57And they have, you know, machine learning aspects that try to help you do some of these security
- 38:02things without having to hire your own machine learning team.
- 38:06They're still young, but it's pretty expensive.
- 38:09I mean, I think your first few gigabytes are free or whatever.
- 38:12But then it's basically billed by the amount of data that you send to it.
- 38:17And, you know, it can get out of hand pretty quickly.
- 38:20So you save your company money by only upgrading your servers like once a year, things like that?
- 38:24Yeah.
- 38:26I mean, I don't deal with the Splunk stuff.
- 38:28They just tell me I can send as much data as I want to them, basically.
- 38:31Send it here and they go do what they do, right?
- 38:33Right.
- 38:33And so, yeah, we send terabytes of data to our Splunk clusters.
- 38:38Like the gimmies.
- 38:39I keep going back to this established outbound connections because it's such an easy thing
- 38:42for people to see.
- 38:44Like if something is calling home that shouldn't, right?
- 38:47That's actually pretty easy to spot in general, right?
- 38:50Yeah.
- 38:50Obviously, on something like, what's a good example of something that reaches out?
- 38:54Well, let's talk about, say, a web server, right?
- 38:56So it's got like a uWSGI or a Gunicorn worker process.
- 39:00But that worker process is probably talking to a database.
- 39:02Maybe it's talking to like a Stripe credit card API or a S3 bucket or something like that.
- 39:10Maybe that thing, right, would be reaching out.
- 39:12Maybe you've got, obviously, all the upgrades, right?
- 39:16If you're going to upgrade, just apt upgrade, you know, that sort of thing that's going to
- 39:20be reaching out.
- 39:21But those are the few, right?
- 39:23Those are easy to like limit to a specific whitelist, right?
- 39:26Like, you know, the server needs to reach out to the database servers and you know what all
- 39:30the database servers are.
- 39:31So you say, okay, in the search, I'm going to eliminate all of those.
- 39:34We don't care about those.
- 39:34You know, it's going to be reaching out to the package servers, right?
- 39:38And theoretically, hopefully you're rehosting those package servers, right?
- 39:41So that you know, so you can keep that list, you know, you don't have to whitelist every
- 39:45mirror in the world, right?
- 39:46Right.
- 39:46Or maybe your cloud server is, right?
- 39:48Like something like that.
- 39:50And then, you know, all these other things.
- 39:52But then past that, like the only thing that it accepts, like from any location is incoming
- 39:57connections, right?
- 39:58On 80 or 443 or whatever, right?
- 40:00So if you can create a search such that it says, hey, we know about all these different
- 40:05things on these servers that are good reaching out or okay reaching out.
- 40:09But if we see something from a new process that isn't in our whitelist or from an existing
- 40:15process, because somebody could say, oh, I'm a I'm Apache too, right?
- 40:18Like, you know, if you see see something from an existing process that is reaching out to
- 40:23somewhere we don't know about, then we send an alert to the security operations center and
- 40:26they contact the team and say, hey, is this normal?
- 40:29Like, is this something we should add to our whitelist?
- 40:31Can we look into this?
- 40:31You might find that you have a cryptocurrency miner on there or something, right?
- 40:36Like it's, you know.
- 40:36Sure.
- 40:37So that's like the easy one.
- 40:38Yeah.
- 40:39So you start with, let's just see what connections are being made.
- 40:42All right.
- 40:42These look valid.
- 40:43Hide them.
- 40:44Don't, you know, don't don't worry about those.
- 40:46And then you just slowly either go through till there's no more.
- 40:49There's none in your list or you start to get worried and figure out what the abnormal ones
- 40:54are.
- 40:54Exactly.
- 40:55And it's a hard problem, right?
- 40:57Right.
- 40:57Like I mentioned, we have like 30 security engineers.
- 41:00And it's because every time that you put something on that whitelist, you've given yourself a
- 41:05blind spot.
- 41:05Right.
- 41:06Yeah.
- 41:06So like, you still like, you know, ideally, you know, if we would have like some crazy AI
- 41:12that could go through and be like, hey, let's investigate this data.
- 41:15And it could notice things that we couldn't, you know, and that's and, you know, that's something
- 41:20that Adobe is working on.
- 41:21And so many companies are working on, right?
- 41:22Machine learning and AI is huge everywhere.
- 41:24Right.
- 41:24But yeah, it's it's it's a really difficult problem.
- 41:27And one that I'm not super qualified to talk about because yeah, no worries.
- 41:31Not what I do all day.
- 41:31So what we've spoken about so far to me sounds like one, a configuration of the machine and
- 41:39two, oh crap, something is bad here.
- 41:41At that point, I feel like you're it's not necessarily too late, but you're way far down the road of
- 41:47it's not good.
- 41:48You know, if there's a process connecting to something else on your server and it really is
- 41:54malicious, like that's a long ways down the path to not good.
- 41:56So one of the things that might be really helpful is to just say, I'm using this version
- 42:02of Django or that version of request.
- 42:04And it turns out that there's a critical security problem found in it.
- 42:08We had better upgrade that before someone else, you know, figures it out.
- 42:11Right.
- 42:12Does it support searching for that kind of stuff?
- 42:14Yeah.
- 42:14So we don't actually use it for that in Adobe.
- 42:17We have a different tool that they've been using for many years.
- 42:20And so we didn't see the need to change on that one yet.
- 42:22But we do have support for it in Hubble.
- 42:24It's not perfect.
- 42:25We use a site called Vulners, Vulners.com.
- 42:28Originally, we were we were downloading like their original API had the ability to download
- 42:33the whole vulnerability list, basically.
- 42:37And then you could audit it locally and look against the existing packages and see if you
- 42:42had any issues and then report those.
- 42:43And that was nice because it's a hard sell to send your list of installed packages to an
- 42:49API.
- 42:50Right.
- 42:51Because now they know if you have any vulnerabilities.
- 42:53Right.
- 42:54I'm not saying that Vulners can't be trusted, but I would, you know, I would hesitate to use
- 42:58them without without paying for them.
- 42:59Right.
- 43:00Like it just in general.
- 43:01Yeah.
- 43:01Just so that you can have somebody to blame.
- 43:03You know what I mean?
- 43:05So basically, with that original version, we were just hammering their servers and they
- 43:08were like, please stop.
- 43:09Please don't do this.
- 43:10And I was like, OK.
- 43:12And so like their new method is you actually get an API key from them and then you plug
- 43:17that into our Vulner's module configuration and then it can basically it will securely send
- 43:24your list of installed packages to them and they'll report if you have any vulnerabilities.
- 43:27And that's not perfect.
- 43:28Yeah.
- 43:29How does it do that?
- 43:29Does it look at the requirement like the pin versions and the requirements?
- 43:32Does it look at your virtual environments or your system level one and see what's installed
- 43:37or what's the process of even knowing what to send them?
- 43:40So I don't think it does stuff like Python packages.
- 43:43I think it's mostly dealing with system packages.
- 43:45Right.
- 43:46Like we know, you know, so they can keep a list of, hey, like bash or something.
- 43:50Yeah.
- 43:50CVE came out on.
- 43:53Yeah.
- 43:53And, you know, a lot of these things are repackaged.
- 43:55Right.
- 43:55Like you have you can install you can do yum install Python dash requests.
- 43:59Right.
- 44:00And you can get requests in its packaged Python version.
- 44:03Right.
- 44:03And so, you know, that kind of stuff would be reported.
- 44:06Right.
- 44:06If there's a big request vulnerability, then you can know that you're vulnerable and you need
- 44:10and you need to upgrade.
- 44:11But yeah, I don't think it does the Python stuff.
- 44:13So so like this is something where we don't have a super great answer for because it's
- 44:18arguably not a great thing to send all of your security data off to vulners who you maybe
- 44:22don't necessarily trust.
- 44:23Right.
- 44:23Yeah.
- 44:23And I haven't figured out a good way to do that because I don't want to be in the business
- 44:27of trying to compile that list of vulnerabilities because that's why companies get paid big bucks
- 44:34is because it would just consume all my time.
- 44:36Right.
- 44:36Like, you know, that's right.
- 44:37Right.
- 44:38Whole companies like vulners are just designed just to do that.
- 44:41Right.
- 44:41And they make money doing just that.
- 44:43So I don't know where that's going to go in the future with Hubble.
- 44:46But, you know, for now, you can do it with vulners, which is great.
- 44:49You know, as long as you're OK with that compromise.
- 44:52So sure.
- 44:53That's interesting.
- 44:54So one of the things I do for my servers and projects is I use a thing called pyup.io.
- 45:00And basically, it looks at your requirements.txt, pins the versions.
- 45:06And if there's new ones, it'll do a PR to automatically increment that.
- 45:09And it'll let you know if there's a security vulnerability in them.
- 45:13But that's only the Python side.
- 45:14And you still have the problem if you're sending them your requirements file.
- 45:18And GitHub has been doing great work recently.
- 45:20Have you seen that?
- 45:21Where they'll just like, they'll inspect your requirements file for you and say,
- 45:25hey, there's a CVE on this.
- 45:26You should upgrade this.
- 45:27And it's like, whoa, thank you, GitHub.
- 45:28Like, that's awesome.
- 45:29It is really good.
- 45:30And it's a huge like warning across when you log in and they update it weekly.
- 45:34You're not going to miss it.
- 45:35Yeah.
- 45:36Yeah.
- 45:36That used to would have been around for about a year, I think.
- 45:39But it was only for JavaScript and Ruby.
- 45:41I think it's doing it for Python now.
- 45:43Yeah.
- 45:43Now they added Python support, which is great.
- 45:45Just like a few months ago.
- 45:46So yeah, that's a really good one as well.
- 45:49I guess maybe we could talk just a little bit about some of the pieces involved and some
- 45:54of the building blocks.
- 45:55So we talked about salt and we also talked about vulnerable.
- 45:58So what else is involved here?
- 46:00It's your Python code, those two projects.
- 46:02And what else?
- 46:03Like, how have you built it?
- 46:04We actually use Docker to create our packages, which I recommend highly.
- 46:07It's really great.
- 46:08Like I can just basically do a Docker build and then a Docker run.
- 46:12And I just have packages.
- 46:13It's beautiful.
- 46:14We have a security engineer who's all about like not trusting what's on the host, which
- 46:17is smart, right?
- 46:18Like theoretically, an attacker could compromise the tools that you're using to try to track
- 46:24down the attacker, right?
- 46:25So like in a security like Utopia, Hubble would have nothing that comes from the host.
- 46:30It would have all its own stuff.
- 46:31It would lock itself down immediately and like, you know, not be modifiable.
- 46:35So we've worked to one of the easy ways to serve profiles to Hubble is via Git.
- 46:40And we include, apparently I'm still going through puberty.
- 46:44We include the Git libraries, you know, the Git Python libraries.
- 46:49We can use Git Python or LibGit2.
- 46:51We prefer LibGit2.
- 46:52And so we actually ship that with Hubble.
- 46:53But that also requires Git to be installed on the host.
- 46:57And Git is a really easy requirement to source, right?
- 47:01Like if you add a dependency for Git, it's almost certain that the host will be able to
- 47:06serve that dependency, right?
- 47:08Because that's a problem with like something like OS query, which is not necessarily in
- 47:11all of the normal repos, right?
- 47:12So like, that's harder to assume that it's going to be there.
- 47:15But even with stuff like Git, we actually, we semi recently added code into our build process
- 47:21to actually just compile Git from source.
- 47:23So we don't, we don't even reply, rely on Git on the host, right?
- 47:27We compile OS query from source, not because we need it to be newer than what they do, than
- 47:32the stuff that they provide.
- 47:33But just because we can add some different compile flags that are useful to our like little siloed,
- 47:39you know, OS query over here.
- 47:40So we compile a bunch of stuff from source as part of our build process.
- 47:44But yeah, the big pieces are salt and its dependencies.
- 47:47The reason we use salt SSH is because we don't need any of the transport stuff, which is where
- 47:52all of the difficulties in sourcing come from.
- 47:55Like all of a sudden, when you're sourcing zero MQ and these other things, you're talking about
- 48:00C code and binaries, right?
- 48:01Like it's not just pure Python and pure Python is easier.
- 48:04Right.
- 48:04And so we use all this as H because it doesn't have any of those dependencies.
- 48:08Volners, we have their, we now package their Python package in with our stuff so you can hit
- 48:14their API easily.
- 48:15And we package OS query in there.
- 48:17And yeah, those are really the biggest pieces that we add.
- 48:20Yeah.
- 48:21And that's cool.
- 48:21It's pretty standalone then.
- 48:22It doesn't have a huge list of dependencies.
- 48:24You know, you open this whole section by saying, well, there's this trade-off like security
- 48:29generally makes usability worse, but you kind of want it.
- 48:33I know, but what's surprising is like in your description here, your security considerations,
- 48:38like let's just package Git in there, even though it's a pain for us.
- 48:41And let's package it in OS query and all that.
- 48:43Like that actually makes it easier to deploy and maintain.
- 48:45So it's not always true, right?
- 48:46You're certainly right.
- 48:47Yeah.
- 48:47Like, but it does still have trade-offs.
- 48:49Like let's, let's be clear because now our package is, you know, 50 megabytes instead
- 48:54of five, right?
- 48:55Like, so theoretically, if we could use the stuff that's already on the host, like that could
- 48:58make our packages smaller and stuff like that.
- 49:00But let's face it, it's 2018 and a hundred megabyte package is just not really a big deal
- 49:06in general, like in most cases.
- 49:08Yeah.
- 49:09Yeah.
- 49:09What is that?
- 49:10Two, three seconds to download on a good connection.
- 49:11Yeah.
- 49:12It's just, I mean, yeah.
- 49:13And, and, you know, usually you're going to rehost these in your data center, you know,
- 49:17cause you usually will have mirrors of the repos or whatever.
- 49:20And it's just, it's just not a big deal.
- 49:21Yeah.
- 49:21So it sounds like such a cool project.
- 49:23People might be interested in participating, maybe bringing it over into their organization
- 49:28or just working on it in general.
- 49:30Are you looking for contributors?
- 49:32And if so, how, what things like that?
- 49:35So we definitely are.
- 49:36Our repo is, I'll make sure it's in the show notes, but it's all open source.
- 49:41It's all Apache too.
- 49:42You can use it.
- 49:43You don't have to worry about licensing issues.
- 49:45It's not GPL or anything like that.
- 49:46And we would love contributors.
- 49:48I have been so swamped with like actually doing this at Adobe that I have, I have not been able
- 49:54to spend as much time community building as I wish.
- 49:57Right.
- 49:57I've given a few talks and been on, you know, FOSS weekly earlier this year and now this podcast,
- 50:03but like, I'm not great at, you know, doing the social media stuff, the aspect and all those
- 50:07different things.
- 50:08So I apologize if it doesn't look like stuff's going on, but you can see in the PRs that we
- 50:11are actively developing and we would love people to report issues.
- 50:14We'd love people to add pull requests and it's all Python.
- 50:17It's a little bit salty.
- 50:19Like it's a little, there's some salt stuff, salt isms in there, which might put some people
- 50:23off.
- 50:23But like when you get actually down to like the modules that do the work, it's pretty much
- 50:28just straight Python.
- 50:29So it can be pretty fun to write.
- 50:30And we try to keep some of our issues labeled with like the help wanted good first issues
- 50:35labels.
- 50:35So that's a good place to start.
- 50:37We have a Slack workspace, which you can get to from our, from our homepage, which will also
- 50:43be in the show notes.
- 50:44And we'd love to see it.
- 50:46Like the Slack workspace is the best place.
- 50:48How about writing tutorials or something like that?
- 50:51Yeah, sure.
- 50:51Like documentation.
- 50:53I recently did a big overhaul of our documentation, which was way out of date.
- 50:56And so it's all hosted on read the docs now.
- 50:59And, but obviously that doesn't update itself.
- 51:01You know, some of it does if you, if you base it off of the doc strings, but like we'd love
- 51:05work there.
- 51:06You know, if you, if you get into Hubble and run into issues and you're like, this was
- 51:09not clear in the documentation, please submit a PR and let's fix the documentation or at least
- 51:14an issue.
- 51:14Like I don't even care if you don't want to like submit a PR that's, that takes time if you're
- 51:17not set up for it.
- 51:18But if you just file an issue and say, Hey, this could be better in this way.
- 51:21Like I'll love you forever.
- 51:23So yeah, we'd love to have people contribute.
- 51:26We'd love to grow the community and make this just like a really good tool.
- 51:29And yeah, I'm looking forward to your feedback.
- 51:32Sounds good.
- 51:33So when I was researching this project, I stumbled upon the Adobe security blog and it looks like
- 51:39you guys are actually doing a lot of interesting stuff out in public.
- 51:43Do you want to maybe just talk a little bit about that?
- 51:45Cause it seems way more open and sort of put together for public consumption than I would
- 51:51have expected.
- 51:52Yeah.
- 51:52Adobe is, is huge.
- 51:55Right.
- 51:55And, and all of a sudden it was so funny cause we did all this Hubble stuff and we're like
- 51:58deploying it everywhere at Adobe.
- 52:00And then my, my coworker, Krister, who came up with the idea for Hubble, he's like, Hey,
- 52:04the security at Adobe guys want to sponsor, have Hubble stack sponsor scale over in California,
- 52:10Southern California Linux expo.
- 52:13And they're going to sponsor a booth and give us some materials to take down and stuff like
- 52:17that.
- 52:17And I was like, we, that's the thing.
- 52:19Like we have like a, like a marketing team dedicated to security at Adobe.
- 52:23And he's like, yeah, dude.
- 52:24And I'm like, okay.
- 52:24So like, they've been great.
- 52:26That's pretty cool.
- 52:27They blogged about Hubble a couple of times and they kind of ping us on their social media
- 52:30and stuff like that.
- 52:31Open source at Adobe.
- 52:32You had a known here about that.
- 52:34That was another thing that I was super surprised about because like, I don't think of Adobe as
- 52:38an open source, as an open source company.
- 52:40Right.
- 52:40And it's really been in the last few years that it's really grown.
- 52:43We have like an open source committee inside that both goes for like open source into the
- 52:48like open, open source to the world, but then also encourages like open source inside of
- 52:52Adobe.
- 52:53Right.
- 52:53Which, you know, sometimes teams make their stuff.
- 52:56Like we have our own enterprise GitHub instance and, you know, you might be tempted to make your
- 53:02stuff private, even though it's in Adobe only.
- 53:04And they're like working, no, make it public.
- 53:06Like let's, let's share, let's, you know, collaborate inside of Adobe.
- 53:09And, and it's a really cool effort.
- 53:11And in fact, we're having our Adobe open source summit internally tomorrow, which will be
- 53:16really fun.
- 53:16And they like have been helping teams through the legal stuff, you know, cause you have to
- 53:20get legal approval to, you know, open source project, make sure that Adobe doesn't want
- 53:23to actually, you know, compete in that space, that kind of stuff.
- 53:26But anyway, so Adobe does have a, an org that's pretty substantial these days on GitHub.
- 53:32So it's github.com/Adobe.
- 53:34And you can check out all of our open source stuff there.
- 53:36Hubble stack is not on that org because we have multiple repos.
- 53:39So it doesn't gel well with having a giant, you know, being part of a giant org.
- 53:43If it was one repo, it would be there, but we have our own org.
- 53:46So yeah, cool.
- 53:47Yeah.
- 53:48Yeah.
- 53:48I was surprised to see that.
- 53:49And it's, it's a good sign.
- 53:50So let's close this out with sort of a high level conversation.
- 53:53You know, you've been building all the software to defend the servers and sound the alarms when
- 53:59needed.
- 53:59Are you hopeful about security, cybersecurity stuff in 2018?
- 54:04Things get better.
- 54:05Are they getting worse?
- 54:06What do you think?
- 54:07I think they're getting better.
- 54:08I mean, it's so hard with all the legacy stuff, right?
- 54:11Like that's, that's really where the problems come in is when you have this product that's
- 54:15been around for 10 years and rewriting it from scratch is super expensive.
- 54:19And that's a hard sell until you actually get owned.
- 54:22Right.
- 54:23And then it's like, okay, well, this is, this is going away in the year.
- 54:25Right.
- 54:25And so, you know, I think it's still okay.
- 54:29The thing that I probably worry about more is if quantum computing, you know, breaks SSL
- 54:34or something like that.
- 54:35Like, I think that's probably the bigger risk to like the overall internet.
- 54:39Like, cause if you don't have SSL, like, I don't, I don't know what you do at that point.
- 54:43Yeah.
- 54:43Economies come to a halt.
- 54:44I just try not to think about it too much.
- 54:46Yeah.
- 54:47That's like thinking about the 9.7 magnitude earthquake.
- 54:51It's like, well, there's nothing we can do about it.
- 54:53So let's just hope that doesn't happen.
- 54:54Yeah.
- 54:55I feel like I'm not super pessimistic about quantum computing breaking the internet because
- 55:01I feel like when that breakthrough happens, it's, there's going to be like one or two
- 55:05quantum computers in the world.
- 55:07And there's going to be a long time before that becomes something in the hands of standard
- 55:12people.
- 55:12And maybe by the time it's something in the hands of standard people, we'll have something
- 55:16that is, we'll come up with another math problem that will solve that for us.
- 55:20You know what I mean?
- 55:20Like, you know.
- 55:21Yeah, exactly.
- 55:21Like TLS three, that's quantum safe, you know, encryption or something like this.
- 55:25But yeah, that is, that is a little, a little concerning, but yeah, it's, I'm generally
- 55:30hopeful for it, but I don't know.
- 55:32I think I would say I'm generally hopeful as well.
- 55:33That's just the one thing that like niggles at the back.
- 55:35of my mind.
- 55:35I'm like, Oh, that would be really bad.
- 55:37This is like, this is like apocalypse, you know, fiction level stuff right here.
- 55:41But hopefully, yeah, it is.
- 55:43I mean, we've had, we've had plenty of those kinds of problems that we've, I don't know
- 55:48if we've had problems like that.
- 55:49We've been able to weather a lot of things already.
- 55:50So I'm not, I'm not super worried about it.
- 55:52And I think, I think we'll always have something that we can, that we can add on top and, and
- 55:56weather the next storm.
- 55:57So it would definitely send people scrambling and it would make the front page of a lot of news.
- 56:02Yeah.
- 56:02If it happened though.
- 56:03Yeah.
- 56:04Cool.
- 56:04All right.
- 56:04Well, I guess we'll leave it there for now.
- 56:06We could talk about this last part for a whole nother episode.
- 56:08I'm sure.
- 56:09So before, before we move on though, let me ask you the final two questions.
- 56:12When you write Python code, what editor do you use?
- 56:15I use Vim.
- 56:15I keep trying to, if I were going to switch to an IDE, it would be PyCharm.
- 56:20They have the best Vim integration I've ever, or Vim emulation that I've ever used.
- 56:24And they have a lot of other cool tools, but I hate not having it in my terminal.
- 56:27So I stick to Vim.
- 56:29Yeah.
- 56:29I think a lot of people like the, it's just always around everywhere.
- 56:33So I'm going to use that, but I hear you about PyCharm.
- 56:35Okay.
- 56:36And then notable PyPI packages.
- 56:38Obviously you could install Hubble from.
- 56:42Yeah.
- 56:43PyPI, but you're probably better off getting one of the prebuilt binaries, right?
- 56:46I definitely recommend using the prebuilt binaries because that way you get OS query, you get all
- 56:50these different things.
- 56:50I have been lax and like, there's no actual reason that Hubble shouldn't be on PyPI and
- 56:56I just haven't done it yet.
- 56:57So look for it in the near future, hopefully.
- 57:00Cause I just, I just need to do it because it's not that hard, but yeah, technically you
- 57:04can source install Hubble without any difficulty.
- 57:07So yeah, cool.
- 57:08And so another one besides Hubble, I don't have any others off the top of my head and I love
- 57:12requests.
- 57:13Like I know the whole world loves requests, but it's great.
- 57:16Well, Hubble is my, is my main one right now.
- 57:17I worked for a long time on SaltStack, which is a pretty good product.
- 57:20I don't love some of the directions that the company's going, that backs it, but it is
- 57:24open source Apache too.
- 57:26So, and it has a great community.
- 57:27So, check out SaltStack as well.
- 57:28Right on.
- 57:29All right.
- 57:30So final call action, maybe there's a bunch of companies or organizations out there that
- 57:34are nowhere near as organized as you guys are at Adobe.
- 57:38They maybe want to start using Hubble.
- 57:40They want to start putting some of these practices in place.
- 57:42What do you tell them?
- 57:43It's never too early to start thinking about security.
- 57:45That's, I guess, I guess is where I'd go.
- 57:47Like it's expensive.
- 57:48I know like to actually start looking at this stuff, you have to like hire security engineers
- 57:52and stuff.
- 57:53And you know, how do you have the money to do that?
- 57:55But if you lose a whole bunch of customer data, it's going to be way more expensive.
- 57:58So yeah, think about it early use, you know, the tools are so good these days, you know,
- 58:03Hubble stack included.
- 58:03I think Hubble is a pretty great tool and it's pretty easy to deploy.
- 58:06So there are things you can do from the beginning just to do a baseline thing that will just at
- 58:12least give you something.
- 58:13Right.
- 58:13And so just start.
- 58:15That's all.
- 58:15Sounds good.
- 58:16All right, Colton.
- 58:17Thanks for being on the podcast.
- 58:18Yep.
- 58:18Thanks so much.
- 58:19Yep.
- 58:19Bye.
- 58:20This has been another episode of Talk Python To Me.
- 58:23Our guest on this episode was Colton Myers, and it's been brought to you by Linode and Rollbar.
- 58:27Linode is bulletproof hosting for whatever you're building with Python.
- 58:31Get four months free at talkpython.fm/Linode.
- 58:36That's L-I-N-O-D-E.
- 58:37Rollbar takes the pain out of errors.
- 58:40They give you the context and insight you need to quickly locate and fix errors that might have
- 58:45gone unnoticed until your users complained, of course.
- 58:48Track a ridiculous number of errors for free as Talk Python To Me listeners at talkpython.fm
- 58:53slash Rollbar.
- 58:54Want to level up your Python?
- 58:57If you're just getting started, try my Python jumpstart by building 10 apps or our brand new
- 59:02100 days of code in Python.
- 59:04And if you're interested in more than one course, be sure to check out the Everything Bundle.
- 59:08It's like a subscription that never expires.
- 59:10Be sure to subscribe to the show.
- 59:12Open your favorite podcatcher and search for Python.
- 59:14We should be right at the top.
- 59:16You can also find the iTunes feed at /itunes, Google Play feed at /play, and
- 59:21direct RSS feed at /rss on talkpython.fm.
- 59:25This is your host, Michael Kennedy.
- 59:27Thanks so much for listening.
- 59:28I really appreciate it.
- 59:29Now get out there and write some Python code.
- 59:35I'll see you next time.
- 59:51Thank you.
- 59:52Thank you.