Hack The Vote 2016 CTF Warpspeed [forensics150]

John Hammond · Intermediate ·🔐 Cybersecurity ·9y ago

Key Takeaways

Solves a web challenge using a forensics150 exploit

Full Transcript

hey what's going on everybody my name is John Hammond welcome back to another video still showing off the hack the vote CTF Capture the Flag competition that was going on this past weekend on November 4th to November 6th uh I didn't solve a whole ton of challenges and I'm uh recording these videos in advance so it is still Saturday although I want to show off next that's 150 Point forensics question it got a lot of solved 290 because it wasn't extremely difficult it just took a little bit of scripting um so the challenge is called warb speed and it says our Trump advertising campaign is incredible it's skyrocketing it's astronomical weight slow down Etc uh so we get this file warp speed and it's a JPEG image and it's crazy jumbled up and and and messed up so I see clear text here I I see the word Trump and I don't know what stuff is over on the side here and I'm curious what all uh this this this is although I think I see like the beginning letters f l a g for flag so this we clearly have to be able to like decipher this in in some way so what I'm going to end up doing is going ahead and uh starting to script this solution I admittedly have already solved this because I have the flag and that's why I'm recording this right up but I want to just showcase the code that I wrote The simpol Python stuff that I that I whipped out so I won't go into too much depth as to how I ended up like viewing all of this although admittedly I just like open it in color paint and tried to the widths and Heights and uh mentally piece together what has been done the image but anyway let's just create a hack the vote uh directory uh we'll get in there and we'll make directory for warp speed and then we'll save this image totally in there uh hack the vote warp speed and I'm just going to call this uh warp speed. jpeg I'm remove the hash in here cool so now let's start up uh Sublime Text and I'm going to create a new script in my hack the vote warp speed ap. Python and I'll zoom in a bit so you can actually see this stuff throw my sh bang line as usual and hopefully I can whip this stuff out so I use Python's Imaging Library python image Library pill and all I actually need from it is the uh image portion and I go ahead and open the thing warp speed. jpeg this should be um Capital image and I'll just call it image okay and admittedly while I was checking out the file in color paints that's not color paint I saw all of the bars for one thing are shifted it they're offset like each row is offset by about each okay so each row is eight pixels high for one thing I saw that by putting in Grid mode and examining each like section you can see just down at the bottom I've selected about eight I don't know if you can barely see that and it the they've all been like rolled to the left so I ended up like assuming if I take this like 32 times I'm sorry I take this 500 like withd image roll about eight times for each one I went through about 32 iterations of it so I did a four Loop here and I ended up cropping each like portion cropping each section I actually just called it region and I did image crop starting from the very left going from that 8 width pixel high in each like 32 or like the multiplication iteration of how far I'm going and then I got the entire image which the width was about a th and again I did the next portion of that that height eight and then I just I multiplied it by one here so it got that box it got each region the8 bit portion and it shifts it over what I'm going to end up doing is I'm going to move that onto and roll it back out and paste it backwards pretty much again I'm just using eight times I to index each call or each each row times I and 8 time I + one because we want to move on to the next row so so now I want to check out that image or see what we have so far I'll run this and I can't really zoom in that well but but hopefully you can see that okay now Trump is aligned and the November 28th or whatever that actually is supposed to say is is put together and now I notice again I can't zoom in this I'm sorry uh but it looks like they're they're kind of shuffled like each column has now been shuffled a little bit I see like the start of a curly brace beginning here and the next end of a clyra on the other side like see this start of an end the very top here on the right is missing on the left it's like each one of them has been shuffled in an alternating order and you because you see this pattern going back and forth throughout it so then I whipped out some quick another another strange kind of loop to uh to put those together and the width of the image now is still a thousand so since there are two of them and I'm trying to just Jam them together I ended up creating a like 500 by 500 image so I do that here I call it image two gosh I should learn to type again I just said I use 500 by 500 image and I alternated through those 32 rows again uh but I just use like a a quick again this is the quick code that you write during a CTF I deter whether I was using like a first half by like a Boolean and I did this by uh for I in range 64 this time here actually I think it was it was Q I did like yeah I used an i and a q I like used a y Loop because I wanted to keep track of two different variables at the same time so while I is less than 64 what I ended up doing was I would determine okay is this the first half is my thing still true and I grabbed the region again image. crop this time again the 08 eight times the row or the column that I'm actually looking at sorry the row I should I should say again 500 being my width and I get the height of it being or my Y2 in this case being a times it Etc I do an else in case it's not because I'm alternating with every iteration so I'll toggle that first half Boolean value and I go from the 500 end because when it's when it's you know X2 or xx1 X2 for these values you can check out the documentation for um image. crop if you need to but it just takes an X1 X2 y1 Y2 for the the section or the the selection that's actually trying to crop out and region is variable I end up creating and then we just paste it onto the Quee that we're working through each time which I just use to index each individual row since now they're being combined you know again I'm just putting them all in one that's why I only go from zero to 500 for the X values and now my Q iterates after each row that I do after I've determined what the region is and I'll toggle that first half variable so it alternates each row as I as I go through it now we should be able to image two. show because that's the one that we've started to work with and this is uh somewhat readable I would again try to zoom in on this for you but flag uh Elite photo skills I'll I'll save this so you can see it a little better winner jpeg okay so now we can get to our terminal and we can EOG winner once I'm in warp speed once I'm in warp speed and I'll zoom in on this can I rotate it for you rotate clockwise dang it I chose the wrong one okay now you can see flag 337 like leite leite Photo skills sk1 or maybe one ll5 lead photo skills and that's our flag to submit crazy pretty discussing python code uh but again it's the kind of thing that you whip out during a CTF so thanks for watching guys hope you enjoyed it uh really it was just two effects that I was trying to unwrap or Unravel for the for the get in the flag that Roll Effect by offsetting each of the rows and then that shuffled card Effect since they're like alternated in one side to another so hope you guys enjoyed and and uh I'll see you in the next video bye

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 · 44 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
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
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

Apple rushed to squash 29 bugs because AI is supercharging hackers - update ASAP
Apple releases urgent software updates to fix 29 bugs exploited by AI-powered hackers, prompting users to update ASAP
ZDNet
The Augean Stables: Cleaning The Overlooked Cybersecurity Blind Spots For PQC Readiness​
Identify and address overlooked cybersecurity blind spots to ensure PQC readiness
Forbes Innovation
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
Up next
You Think Your Card Declined by Mistake? It Might Be a 2026 Scam
Tolulope Michael
Watch →