 What is going on everybody? My name is John Hammond. Welcome back from the YouTube video. We're looking at the Boot to Root CTF 2019. This is the third challenge in the cryptography category. It's called genetics. Challenge prompt is the ciphers in my blood. Flag is not in actual format. Wrap it in Boot to Root flag before you submit. We're given a file here which we can go ahead and open. It is again another Google Drive file. So it's very annoying. Looks like we can copy it and work with it and let's just create a, it was called biography.txt which is, is it actually called that? Biography. Very weird. Whatever. Paste it in. And we are working with a lot of A's and C's and G's and T's. So some of you might recognize this is DNA and that's what the genetics is supposed to refer to. This is some DNA encoding. I've seen this in other CTFs before and something I guess comes from exposure or whatever. But there is some mapping between what some of those letters can refer to in actual English or something that's a little bit more readable. So I have noted this in my katana framework or at least in the document reference. It is not yet implemented in our automated one but we will cover that very soon. So if you have not been to github.com slash John Hammond slash CTF hyphen katana this is something that I kind of tout often because I think it's a good reference and sometimes will help you look through your mental checklist and determine what you actually want to look at if you run out of ideas for a challenge. We have a DNA code segment in there. So there's some references in ACGT being equal to one binary sequence and I tried that and failed and then I tried, okay now we have DNA code in it's sort of triple renditions and that will refer to an A etc etc. So that is what we wanted to work through and check. I didn't have a script for this initially so props and shout out to my boy void update in the discord server. I'm a big fan. I'm a big metal fan. You're quite a bro and I'm very very grateful for your help and putting this together in a Python mapping dictionary. So I've got that script in my original boot to root work here. So that was under crypto genetics and ape.py. Let's put it in here and let's open that up. So you can see how originally worked with the ACGT binary renditions but then I created the mappings and void just whipped this out in what is it? It was a visual studio. You just had like some cool shortcuts. They were just cranking through so incredible work. Thank you. What I had done then and what you can do here is just put together, loop through the characters inside of that biography text file and remove the new line if for some reason that's right in. So that's why you strip up here and then I get each cluster in three. So I'll grab the piece and then I'm printing out each piece just to make sure it goes through and I did that because at the very very beginning of the game, it was kind of broken. The flag submission wasn't right. So we all kind of hounded black pearl in the slack channel. So anyway, once you get this all put together, you are pending the mappings which is just representing, okay, this is the key in a dictionary and that was value is what it should actually be representative of. So when we run this, we get flag is a DNA crypto is awesome. And that was that there are some online tools I saw other people use and it's funny, one of the online tools represented flag and all capital letters and like random numbers and letters and that was the wrong way to go. That's a bad rendition. So I would recommend checking out CTF Katana if you haven't already. That was my lead for this. And I was like, All right, cool, I know what to do with this challenge, crank it out and that's the flag. We can go ahead and submit that get to the page here. If I can get to the challenge. All right, so boot to roots in the flag format, wrap it in there. And you're good. So that's that. Keep that in your back pocket. Know that CTF Katana exists. I am working on the automated rendition of the CTF Katana. It is a private repository because I want to have a good first impression on the world, but I am working on this with my boy Caleb, you see him as a lizard tiger in the discord server. And you've seen him on streams a lot because he's a genius, much smarter than I am. But there's a lot of good code in here. And it actually does a fantastic job of looking for a flag hunting it down based off of easy low hanging from CTF. So that's coming. It's on its way. And thanks for watching this video guys. Hope you enjoyed this. If you did like this video, please do like comment and subscribe. Join the discord server. There's a link in the description. It's a lot of awesome people. It's a party place void updates hanging out in there and he's pretty much the only person you should go there for. Thanks for watching everybody.