Juniors CTF 2016 :: ROFL

John Hammond · Intermediate ·🔐 Cybersecurity ·9y ago

Key Takeaways

Completes a ROFL challenge in Juniors CTF 2016

Full Transcript

hello everyone and welcome back to another YouTube video my name is John Hammond still checking out the junior CTF or Capture the Flag uh game and competition that was going on last weekend um so I want to showcase this rfl rolling on floor laughing challenge apparently is a trivial admin task whatever that means uh 400 points so a few people solved it um and there's a a gif a gif or whatever of uh rolling around and if you he is actually a link if you click on him it leads you to the B 64 Wikipedia article um and we get this included PDF file which is apparently a bunch of b64 strings or a giant Bas 64 string who knows uh let's take a look at it and and and let's download it so I actually view the source here um I go ahead and I grab the URL for this because I just want to straight up download it I think you can can you just click on it or can you like specify download no that's a zoom in button so I guess you would just have to save it text up PDF and let's put it in juniors let's create a new folder for this one rafle so let's sit over there CD rafle oh almost got some seam locomotive twice in a row damn all right so there's the text PDF is that an actual PDF file now did they did they just fool me with that I don't want the viewer I want the actual URL okay so now let's save this let's save this I just want to be sure let's get rid of the text files okay so we have this giant PDF which we want to be able to get the text out of I'm not going to like copy and paste all this because that would be dumb although it would probably work maybe can I control a yeah and select all just like that sweet maybe that actually isn't too bad of an idea I had used PDF to text and just scraped out everything out of here uh pdf2 txt and that's get that gets it all but it includes the new line characters which may not be you want all the time because it's going Page by Page and there are 73 pages so um it's. text if you do this does this include new lines it does it looks like I mean all of these are new lines regardless we should be able to save this one now so there's our text in all in base 64 what just happened did I just delete it C it yeah guess I guess I deleted it what the heck just happened okay whatever let's put it back and we can B 64 code this now we can um b 64- d it but it gives us more base 64 which I'm assuming if we base 64 decode that it will give us more Bas B 64 so right now we have like recursive base 64 so I try to like whip out a small easy thing to be able to keep track of that so I created a like zero file and I cat zero right so now what I'm going to do is I'm going to create a while loop or a for Loop actually because I can do this like let's say 100 times for I in range of one to 100 and I can do let's let a variable um P equal I the value of I minus one so I I use let so I can do some math and actually subtract one from this guy so P will be the previous thing and I will be the current file that I'm looking at because I want to be able to keep decoding again and again and again but I don't want to overwrite everything that I've done if I append or if I overwrite the file that I'm currently processing and looking at because bash does that sometimes so we let this new variable and then we can base 64 decode um the uh previous and we append it to or we uh redirect it to a new file the I file so it's done and now we have a bunch of files which I can all file if I wanted to and I get asky Tex asky Tex asky Tex all the time until I get this 32 one which apparently has ISO 8859 Tex if you actually cat out all these now or if like you did for Iron Range some of them are actually are empty like you saw like everything after almost after 32 is empty so we know we're at the very end we can display them all 0 to 32 do cat I done but again it's just the recursive base 64 until we get to the very end which is this ISO encoding see I googled this for a little bit like what is this thing but it's just in their character set so it took a lot of lurking around in the telegram like IRC chat conversation Channel thing uh begging administrators and mods um and asking like what are we supposed to do with this what is this this is clearly not the flag this is clearly not the hex bites for it like if I just hexedit that file we've got some things here but these are a unit there's a specific character set so what they tell us eventually is that oh we didn't expect like this challenge wasn't intended for any other International Players this was just for a Russian because it was a Russian CTS this was just for this is not for non-russian players so they didn't expect any to actually like get get this one that it was outside of the Russia or whatever they were they were putting it on for so apparently this ISO 8859 Tex is koi which is another uh quite eight which is an 8bit character encoding designed to cover Russian so that it it is it it's just being interpreted as the iso 8859 one right now so we have to convert it from Koi to utf8 or something we can actually read or so like a real Russian text flag so literally the flag is in Russian I would not have been able to get in this I would never have gotten this unless they straight up told me this is what I have to do which is why they straight up told me this is what I had to do so again if I have not yet made my point clear about how much this was a crazy stupid and sometimes really bad CTF and there was a lot of guessing and a lot of weird language barriers yet again again the flag is in Russian so okay let me explain what I what I did uh end up solving it and getting it out of the that koi encoding RL my get flag script uses ion to force the COI 8 file into changing the type to utf8 so that's the command I ended up running the convert convert text from one character encoding to another so I convert COI 8 R the 32 file to a new file the flag. text and I can cat that file and literally this Russian text is your flag I don't know if it actually translates anything that's actually a interesting point uh does this translate to anything at all Huts wonders yeah whatever that is or means um but literally you would submit this that's literally what you would submit and get your points um so peculiar peculiar challenge but really cool uh the recursive b64 encoding um I hadn't done that tactic before where I had like a simple Wild Loop previous uh number that I can B 64 out of and just crank that out in a in in a while loop and then I can just see where the offset is and what I hit all the empty um files that way I know okay this 32 was the last one in in recursive base 64 so that was kind of cool so not too bad of a challenge although what the heck not too bad in the technical sense and I did some cool bash scripting while Loops for recursive bas6 4 but why is the flag in Russian whatever I realized it's a Russian CTF and but I was hoping for international players we could still be cool so enough of me Jibber jabbering and and and blabbering on uh thanks for watching the video guys I hope to see you in a later video

Original Description

If you would like to support me, please like, comment & subscribe, and check me out on Patreon: https://patreon.com/johnhammond010 E-mail: johnhammond010@gmail.com PayPal: http://paypal.me/johnhammond010 GitHub: https://github.com/JohnHammond Site: http://www.johnhammond.org Twitter: https://twitter.com/_johnhammond
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from John Hammond · John Hammond · 56 of 60

1 Code Commentaries? PHP to JavaScript in Bash and PHP!
Code Commentaries? PHP to JavaScript in Bash and PHP!
John Hammond
2 Tutorials? MySQL connection with PHP and Bash!
Tutorials? MySQL connection with PHP and Bash!
John Hammond
3 Variable Naming in Python! Happy Birthday, Linux! Nokia N900!
Variable Naming in Python! Happy Birthday, Linux! Nokia N900!
John Hammond
4 JavaScript Splits The URL!
JavaScript Splits The URL!
John Hammond
5 HTML Tables in Python!
HTML Tables in Python!
John Hammond
6 HTML, Net Shares, GML!
HTML, Net Shares, GML!
John Hammond
7 Python 08 Programming Style and Comments
Python 08 Programming Style and Comments
John Hammond
8 Python 26 Object Oriented Programming
Python 26 Object Oriented Programming
John Hammond
9 75 Python Tutorials, Out Now!
75 Python Tutorials, Out Now!
John Hammond
10 Batch 14 Mathematical Expressions
Batch 14 Mathematical Expressions
John Hammond
11 Batch 85 Array Append
Batch 85 Array Append
John Hammond
12 Batch 86 Array Count
Batch 86 Array Count
John Hammond
13 Batch 87 Array Index
Batch 87 Array Index
John Hammond
14 Batch 88 Array Insert
Batch 88 Array Insert
John Hammond
15 Batch 89 Array Remove
Batch 89 Array Remove
John Hammond
16 Batch 90 Array Reverse
Batch 90 Array Reverse
John Hammond
17 Python [colorama] 00 Installing on Linux
Python [colorama] 00 Installing on Linux
John Hammond
18 Python [colorama] 09 Cursor Position
Python [colorama] 09 Cursor Position
John Hammond
19 Python [hashlib] 02 Algorithms
Python [hashlib] 02 Algorithms
John Hammond
20 Python 00 Installing IDLE on Linux
Python 00 Installing IDLE on Linux
John Hammond
21 Python [pygame] 11 Rectangular Collision Detection
Python [pygame] 11 Rectangular Collision Detection
John Hammond
22 Python [pygame] 12 Platforming Rectangular Collision Resolution
Python [pygame] 12 Platforming Rectangular Collision Resolution
John Hammond
23 Python [XML-RPC] 01 Research
Python [XML-RPC] 01 Research
John Hammond
24 Python [pyenchant] 03 Personal Word Lists
Python [pyenchant] 03 Personal Word Lists
John Hammond
25 FancyURLopener Authentication and User-Agent [urllib] 03
FancyURLopener Authentication and User-Agent [urllib] 03
John Hammond
26 Python 04: PEP8 Coding
Python 04: PEP8 Coding
John Hammond
27 Python Challenge! 17 COOKIES
Python Challenge! 17 COOKIES
John Hammond
28 Google CTF 2016: Ernst Echidna
Google CTF 2016: Ernst Echidna
John Hammond
29 Google CTF 2016: Spotted Quoll
Google CTF 2016: Spotted Quoll
John Hammond
30 Google CTF 2016: Can you Repo It?
Google CTF 2016: Can you Repo It?
John Hammond
31 Google CTF 2016: No Big Deal
Google CTF 2016: No Big Deal
John Hammond
32 Google CTF 2016: In Recorded Conversation
Google CTF 2016: In Recorded Conversation
John Hammond
33 Homemade CTF Challenge: 01 "Orchestra"
Homemade CTF Challenge: 01 "Orchestra"
John Hammond
34 Homemade CTF Challenge: 02 "Bae's Base"
Homemade CTF Challenge: 02 "Bae's Base"
John Hammond
35 Homemade CTF Challenge: 03 "Web Hunt"
Homemade CTF Challenge: 03 "Web Hunt"
John Hammond
36 Homemade CTF Challenge: 04 "UPX"
Homemade CTF Challenge: 04 "UPX"
John Hammond
37 Homemade CTF Challenge: 05 "The Assumption Song"
Homemade CTF Challenge: 05 "The Assumption Song"
John Hammond
38 Homemade CTF Challenge: 06 "A Brisk Stroll"
Homemade CTF Challenge: 06 "A Brisk Stroll"
John Hammond
39 Homemade CTF Challenge: 06 "I lost my password!"
Homemade CTF Challenge: 06 "I lost my password!"
John Hammond
40 web25 :: Mr. Robot : EKOPARTY CTF 2016
web25 :: Mr. Robot : EKOPARTY CTF 2016
John Hammond
41 web50 : RFC 7230 :: EKOPARTY CTF 2016
web50 : RFC 7230 :: EKOPARTY CTF 2016
John Hammond
42 misc50 : Hidden inside EKO :: EKOPARTY CTF 2016
misc50 : Hidden inside EKO :: EKOPARTY CTF 2016
John Hammond
43 Hack The Vote 2016 CTF: Sander's Fan Club [web100]
Hack The Vote 2016 CTF: Sander's Fan Club [web100]
John Hammond
44 Hack The Vote 2016 CTF Warpspeed [forensics150]
Hack The Vote 2016 CTF Warpspeed [forensics150]
John Hammond
45 Juniors CTF 2016 :: Black Suprematic Square
Juniors CTF 2016 :: Black Suprematic Square
John Hammond
46 Juniors CTF 2016 :: Six Strange Tales
Juniors CTF 2016 :: Six Strange Tales
John Hammond
47 Juniors CTF 2016 :: Lost Code
Juniors CTF 2016 :: Lost Code
John Hammond
48 Juniors CTF 2016 :: Here Goes!
Juniors CTF 2016 :: Here Goes!
John Hammond
49 Juniors CTF 2016 :: Southern Cross
Juniors CTF 2016 :: Southern Cross
John Hammond
50 Juniors CTF 2016 :: Clone Attack
Juniors CTF 2016 :: Clone Attack
John Hammond
51 Juniors CTF 2016 :: Dirty Repo
Juniors CTF 2016 :: Dirty Repo
John Hammond
52 Juniors CTF 2016 :: Hackers Blog
Juniors CTF 2016 :: Hackers Blog
John Hammond
53 Juniors CTF 2016 :: Voting!!!
Juniors CTF 2016 :: Voting!!!
John Hammond
54 Juniors CTF 2016 :: The Good, The Bad and The Junkman
Juniors CTF 2016 :: The Good, The Bad and The Junkman
John Hammond
55 Juniors CTF 2016 :: Stop Thief!
Juniors CTF 2016 :: Stop Thief!
John Hammond
Juniors CTF 2016 :: ROFL
Juniors CTF 2016 :: ROFL
John Hammond
57 Juniors CTF 2016 :: Restriced Area
Juniors CTF 2016 :: Restriced Area
John Hammond
58 Juniors CTF 2016 :: Oh SSH!
Juniors CTF 2016 :: Oh SSH!
John Hammond
59 HackCon CTF 2017 TRIVIA and BONUS Challenges
HackCon CTF 2017 TRIVIA and BONUS Challenges
John Hammond
60 HackCon CTF 2017 "Bacche" Challenges
HackCon CTF 2017 "Bacche" Challenges
John Hammond

Related Reads

📰
$1T investment giant Apollo breached after social engineering attack
Apollo, a $1T investment giant, was breached after a social engineering attack, highlighting the importance of cybersecurity and employee training
The Register
📰
The $15 Identity
Synthetic customers can bypass liveness checks, and improving models isn't the solution, highlighting the need for alternative security measures
Medium · Cybersecurity
📰
5 Best Data Encryption Services for Small Businesses
Learn about the top 5 data encryption services for small businesses to protect sensitive information
Medium · Cybersecurity
📰
Become a Hacker - TryHackMe Writeup
Learn hands-on cybersecurity skills with TryHackMe's Become a Hacker room, a beginner-friendly platform for practicing hacking techniques
Medium · Cybersecurity
Up next
Google Did The Impossible
Boot dev
Watch →