Juniors CTF 2016 :: Dirty Repo

John Hammond · Intermediate ·🔐 Cybersecurity ·9y ago

Key Takeaways

Exploits Dirty Repo challenge in Juniors CTF 2016 using tar and gzip extraction and OpenVPN source code analysis

Full Transcript

all right what's up guys welcome back to another YouTube video my name is John Hammond showcasing the junior CTF Capture the Flag competition that was going on over the last week uh so dirty repo this was another uh funic challenge was a little bit harder um and I guess higher up in their difficulty range 500 points still because not many people had been able to solve it or whatever the scoring fluctuates is um says grungle loves his money blah blah blah um Z Fighter for justice I just spoil one developers project try to find find out what the mfactor added here are all the developers projects so we get this working directory is this download link uh and it's a zip archive so oh file download limit exceeded okay we can only do that so this was also another like difficulty that a bunch of people had while they were like playing the CTF so thankfully I still have the archive uh let me get it so I'm going to create a new folder here just call it dirty repo and just paste in the tar object here in our terminal we can start to to work with it you would have downloaded the same thing just with a gz extension so you can just gunzip it and that's how you would actually be able to extract it and um then you can just tar extract it with tar xfv I guess and then we'll just crank it out so now we have a bunch of other archives so great let's gunzip everything that is a zip archive okay so now we have all these tars and we can tar XF all of those and let's not get everything so let's actually just get the comp comp grip and extract those oh let's do Okay cool so now we have everything extracted that works well um so if you're just going into one of these um these are open VPN I was very confused with and appar apparently it just looks like the source code for open vpm like I literally just looked at the readme file for a little bit it's like okay wow this is seriously the source code for openvpn so we have a ton of these right if you check out um comp 2 it's the exact same stuff and that goes the same for all of the other things so I'm assuming okay we now have like 20 or so um actual archives that have different codes in them or the same code although there's one difference in them so it's our job to find out what the difference is so what I did is I actually ran this through with diff and if you take a look at the diff Man pages it can actually find recursive stuff like it can work through an entire directory uh DHR D lowercase R I think it is me find d r yeah yeah yeah dasr recursive recursively compare any subd directories found so we can just crank that out right I use comp one as my initial test so I grip out all the comp ones um and let's get rid of the tars actually okay so now while I read line what I can do is I can take the diff of comp one and the what I'm looking at and let's pass in the RS to recursively look through it and let's go done and hey we see one difference which is in this source code file in in comp one and uh in in comp five it looks like it looks like there's a a a new line in there uh line 132 or or 133 has uh has a new comment called flag Grunkle Stan the word coder so boom that that's it there's our flag all we did was we diffed a bunch of different directories so sweet right uh what I ended up doing in in in real life was I Ed use like s so I could see like all the information and I took through that and I grepped out what not what was not identical and then it tells me oh straight there it is right there I had used Q for quiet when I did this for thing because I just found that line on stack overflow and it says okay these are the ones that differ so this is the interesting file so I had catted that out and just GED lowercase flag and there's a bunch of stuff in there but I could see just the very top here hey here's this comment flag is this but honestly this without it and you you still get the flag just without those other uh arguments to diff to like try and use quiet or stuff like that you just literally just get the one difference and it gives you the solution here so that wasn't too bad right it was there's a lot to look through but if you automate it with like some bash and uh some some diff then you're done the work is the work is easy so you submit this and I mean 500 points cool cranked it out so thanks for watching guys hope that one was kind of cool it looks like we had 20 different folders that we just like easily Loop through them and that's awesome so uh hope you guys are enjoying these um I'll record some more of the other later challenges that I had Sol and maybe I'll be able to get a few more before the game ends there's like uh a day left so I don't know I'll 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
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from John Hammond · John Hammond · 51 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
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
56 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 AI Lessons

API-RTA Exam Walkthrough — Passed | CyberWarFare Labs
Get hands-on experience with the API-RTA exam, a practical black-box certification for red team analysts, and learn how to prepare for it
Medium · Cybersecurity
Ethical Hacking Step-by-Step (Part 3)
Learn ethical hacking by understanding network security fundamentals, including packets, firewalls, and traffic analysis using Wireshark.
Medium · Cybersecurity
DORA Compliance in 2026: What European Businesses Actually Need to Know
European businesses using cloud infrastructure must understand DORA compliance in 2026 to avoid regulatory risks
Medium · Cybersecurity
VAPT Series Part 2: Reconnaissance and Information Gathering — The Foundation of Every Pentest
Learn the importance of reconnaissance and information gathering in pentesting and how to apply these techniques in a real-world scenario
Medium · Cybersecurity
Up next
You Think Your Card Declined by Mistake? It Might Be a 2026 Scam
Tolulope Michael
Watch →