<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Muhammad Fathy Rashad</title>
    <description>The latest articles on Forem by Muhammad Fathy Rashad (@mfrashad).</description>
    <link>https://forem.com/mfrashad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F251511%2F36c96c43-5abd-478f-8508-8edb7b81466e.jpeg</url>
      <title>Forem: Muhammad Fathy Rashad</title>
      <link>https://forem.com/mfrashad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mfrashad"/>
    <language>en</language>
    <item>
      <title>APU Battle of Hackers Final 2019 Write Ups</title>
      <dc:creator>Muhammad Fathy Rashad</dc:creator>
      <pubDate>Sun, 24 Nov 2019 18:55:48 +0000</pubDate>
      <link>https://forem.com/mfrashad/apu-battle-of-hackers-final-2019-write-ups-19ad</link>
      <guid>https://forem.com/mfrashad/apu-battle-of-hackers-final-2019-write-ups-19ad</guid>
      <description>&lt;p&gt;This is a write-ups on how my team solved the challenges in the APU Battle of Hackers 2019 (APUBoH) capture the flags in the final round. We were ranked 9 at the end of the CTF and managed to solve 3 questions, 2 forensic questions and 1 steganography.&lt;/p&gt;

&lt;p&gt;The challenges can be download on github:&lt;br&gt;
&lt;a href="https://github.com/mfrashad/apuboh19" rel="noopener noreferrer"&gt;https://github.com/mfrashad/apuboh19&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, onto the writeups.&lt;/p&gt;
&lt;h2&gt;
  
  
  Steganography
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Nyanyanyanya
&lt;/h3&gt;

&lt;p&gt;When we download the attached file in the challenges, we are given an mp3 file called All_Star_-_Smash_Mouth.mp3. Opening the file, it was a song, however one peculiar thing is that it has a cover image.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage7.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Afterwards, we tried out common tricks like strings command, and seeing the spectogram of the file, but it doesn’t lead us to any clue.&lt;/p&gt;


&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage10.png"&gt;Spectogram of the file



&lt;p&gt;However, we found that a png file is embedded in the file when we use binwalk to carve out the file.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage5.png"&gt;Carving out file with binwalk



&lt;p&gt;Next, we proceed to extract the image, and opening it unsurprisingly give us the same cover image we previously seen.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage4.png"&gt;Extracted image



&lt;p&gt;But now, since we have a png file to work on, we can try various image steganography programs. So, the first thing we did is opening the image in Stegsolve.jar, a java program that will apply various operation to the image such as inverse, xor, or noise etc. And surprisingly it revealed the flag for us in red plane 1 straight away.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage9.png"&gt;Stegsolve.jar



&lt;p&gt;The flag is &lt;strong&gt;&lt;em&gt;apuboh2019{s0m3b0dy_h1d_th3_fl@g}&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Forensics
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Neighbors
&lt;/h3&gt;

&lt;p&gt;For this challenge, we are given a pcapng file &lt;code&gt;neighbors.pcapng&lt;/code&gt;. Since it’s a pcap file, we proceeded to open it in wireshark. Next, we just start searching for some keyword in the flag format which in this case is ‘apu’ , and it luckily gave us the flag straight away.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage8.png"&gt;Wireshark



&lt;p&gt;The flag is &lt;strong&gt;&lt;em&gt;apuboh2019{cdp_spoofed}&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Zip it
&lt;/h3&gt;

&lt;p&gt;The next challenge was also a network forensic challenge, and we are given &lt;code&gt;zipit.pcapng&lt;/code&gt;, a pcapng file again. However this time, searching for strings doesn’t lead us to anything. After looking around, we found some suspicious HTTP packets that might be the clue. So, we use the export objects function in wiresharks.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage6.png"&gt;Wireshark export objects



&lt;p&gt;After exporting the files. We ran &lt;code&gt;file&lt;/code&gt; command to check the files.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage2.png"&gt;File commands



&lt;p&gt;Based on the output, the &lt;code&gt;smss.doc&lt;/code&gt; file stood out as it is a zip file, which is related to the title. Therefore, we tried to extract the &lt;code&gt;smss.doc&lt;/code&gt; file, but it asks for a password. By this time, we know we are on the right track and this might be the file that have the flag. Next, we started searching for the passwords, and we found a lead in one of the exported files, &lt;code&gt;share&lt;/code&gt;.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage1.png"&gt;share file



&lt;p&gt;We found a text about &lt;code&gt;rockyou.txt&lt;/code&gt;, a very well known password list used for cracking. Therefore, we tried to bruteforce the zip file using &lt;code&gt;fcrackzip&lt;/code&gt;, a zip file cracking tool, and the &lt;code&gt;rockyou.txt&lt;/code&gt; dictionary.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage3.png"&gt;Cracking with fcrackzip attempt



&lt;p&gt;However, it gave us an error that it is not a zipfile. After some searching around, we found that the file is not the usual PKzip file but 7zip and fcrackzip cannot work with 7zip file (Took me quite a long time to figure out this, I thought I just need to use different version). Hence, we searched for other cracking tool and found 7zip-crack.&lt;br&gt;
&lt;a href="https://github.com/Goron/7zip-crack" rel="noopener noreferrer"&gt;https://github.com/Goron/7zip-crack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then, we start cracking the file using &lt;code&gt;rockyou.txt&lt;/code&gt; dictionary with the 7zip-crack. After a while it finally give us the password &lt;code&gt;godisgood&lt;/code&gt;, yay!.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage11.png"&gt;Cracking with 7crackzip



&lt;p&gt;Extracting the zip file with the password will give us a PE32 Windows executable file &lt;code&gt;smss&lt;/code&gt;. The first thing we tried is always &lt;code&gt;strings&lt;/code&gt;, but sadly it does not give any result.&lt;/p&gt;

&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage13.png"&gt;Checking the extracted file



&lt;p&gt;As this is an executable file, we thought that this will be a reverse engineering challenge, and tried to run and reverse engineer this. But we didn't manage to run the program even in dos mode, as it give some error. And trying to reverse engineer the program in IDA pro just confused us even more, since we can only do static analysis, but cannot debug the program.&lt;/p&gt;

&lt;p&gt;Fortunately, we tried to &lt;code&gt;hexedit&lt;/code&gt; the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ hexedit smss
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage12.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fmfrashad%2Fapuboh19%2Fmaster%2Fimages%2Ffinal%2Fimage12.png"&gt;&lt;/a&gt;&lt;/p&gt;
File in hexeditor



&lt;p&gt;And yay, we found the flag! We suspect the reason that &lt;code&gt;strings&lt;/code&gt; command didn't pick up the flag is because the characters are not adjacent and spaced. This challenge really took us quite a long time, and quite frustrating as well. We are really lucky to open the file in hexeditor, else we would have missed out the flag. &lt;/p&gt;

&lt;p&gt;The flag is &lt;strong&gt;&lt;em&gt;apuboh2019{7z1PIsuS3Fu|}&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Although the challenges above may look simple, we really spent a lot of times doing other challenges, although we did made some progress, we still didn't manage to solve those, hence our struggles for those challenge are not written here.&lt;/p&gt;

&lt;p&gt;One regret that I have, is that I didn't study binary exploitation topic more thoroughly before coming to the competition. I was expecting basic reverse engineering challenge, but was given binary exploitation challenge such as basic stack overflow or buffer overflow instead. We could have boosted our ranking a lot more if I studied those beforehand.&lt;/p&gt;

&lt;p&gt;Overall, it was a great experience and we learnt a lot from the competition. Also, I'd like to thank my teammates Faris Rosly and Tan Li Tung for performing well during the competition and spending time to practice for the competition. And thank you also to APU (Asia Pacific University) for hosting the event! There should be more CTFs around here!&lt;/p&gt;

&lt;p&gt;For other participants of APU BoH 2019, feel free to post your solutions or link to your writeup on the comments!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My First CTF Writeup : KPMG Cyber Security Challenge 2019</title>
      <dc:creator>Muhammad Fathy Rashad</dc:creator>
      <pubDate>Thu, 17 Oct 2019 06:45:57 +0000</pubDate>
      <link>https://forem.com/mfrashad/my-first-ctf-writeup-kpmg-cyber-security-challenge-2019-2698</link>
      <guid>https://forem.com/mfrashad/my-first-ctf-writeup-kpmg-cyber-security-challenge-2019-2698</guid>
      <description>&lt;h2&gt;
  
  
  CTF: A fun way to learn hacking
&lt;/h2&gt;

&lt;p&gt;A few months ago, I discovered about CTFs or Capture The Flags. CTF is a type of computer security competition. There are different types of CTF, but the jeopardy style is the most commonly used in CTF where players are given many security challenges covering various fields such as forensic or reverse engineering and needed to solve it as many and as quickly possible. Each challenge solved will be rewarded with certain points based on the difficulty, and the player with highest points wins.&lt;/p&gt;

&lt;p&gt;I found that CTF is a really fun way to learn cyber security. The excitement you get when you've used real exploits or tactics that you learned and seeing it actually works (you've hacked something) or the "Aha!" moment when you finally found the solution is what makes CTF really fun to play.&lt;/p&gt;

&lt;h2&gt;
  
  
  My First CTF
&lt;/h2&gt;

&lt;p&gt;I immediately joined KPMG Cyber Security Challenge 2019 in Malaysia when I first discovered the event. CTF is still a rare event in Malaysia compared to hackathons (the hackathons are almost weekly here). Hence, I just jumped at the rare opportunity there. Unfortunately, it was a 4-member team competition, and out of my 3 teammates, only 1 of them is available during the competition.&lt;/p&gt;

&lt;p&gt;Sadly, my team was ranked at 32th place out of 60+ teams and did not manage to pass the qualifier round. But nonetheless, I had a lot of fun, learned many things, and it was a great experience  overall. And I personally think the result wasn't too bad considering I just knew about CTF a few weeks prior and I was missing 2 members.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenges
&lt;/h2&gt;

&lt;p&gt;The qualifier round doesn't have a lot of questions, there are around 7 questions and only comprised of steganography, forensic, and reverse engineering challenges. I managed to solve 3 challenges, 1 from each field. I had a hard time solving the other RE challenges as they gave Windows executables and I was expecting ELF files. So, without further ado, here we go.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steganography
&lt;/h3&gt;

&lt;p&gt;Steganography is the art of hiding data such as embedding secret message in an image. One example application of this in security is malware hiding.&lt;/p&gt;

&lt;h4&gt;
  
  
  Angola - Least Significant Failure
&lt;/h4&gt;

&lt;p&gt;So first we are given a link to a zip file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Least_Significant_Failures_95988b81547c2be1431cfd83199c573c.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So we just unzip it, using unzip command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ unzip Least_Significant_Failures_95988b81547c2be1431cfd83199c573c.zip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we will get an image file &lt;code&gt;kanye.png&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fdq8cdsm45m1698goetke.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fdq8cdsm45m1698goetke.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before we do anything, we should check the extension is correct using the &lt;code&gt;file&lt;/code&gt; command as file can be deceiving sometimes, and it is indeed a png file.  As this is steganography challenge, and from the zip file name, this seems to use LSB techniques to hide the flag somewhere inside the image. So first, we used &lt;code&gt;zsteg&lt;/code&gt; , a program which usually will reveal texts hidden in an image using LSB technique. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8afi6vykybpr3zh575d1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8afi6vykybpr3zh575d1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, this only result in gibberish text as shown in the image above.&lt;/p&gt;

&lt;p&gt;Next, we try to use &lt;code&gt;Stegsolve.jar&lt;/code&gt;, a java tool for steganography by processing the image with various techniques (invert color, xor, etc.) or filters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Futxm9eb5saxwh8gt9ppw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Futxm9eb5saxwh8gt9ppw.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And yes, we found some kind of text on the green plane, but it does not look like a flag so it might be encrypted or a cipher. &lt;/p&gt;

&lt;p&gt;Then we tried to use some general online decoder at first, but it does not give the flag. Then we assume it may be a caesar cipher, and tried to bruteforce it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F9itjjjnaoy3t7ds9vx4c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F9itjjjnaoy3t7ds9vx4c.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But all result in nothing and does not give the flag. Finally we tried to decode it as base64.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Flyhrnjx86zmnup294qx2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Flyhrnjx86zmnup294qx2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And yes! Surprisingly, we got the flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KPMG{3V3RY0N3_L0V3S_ST3GGY&amp;lt;/3}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is quite tricky as we did not think of it as base64 at first since it does not end with the usual &lt;code&gt;==&lt;/code&gt; padding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Forensic
&lt;/h3&gt;

&lt;p&gt;Forensics is the art of recovering the digital trail left on a computer. In this case, it is related to network forensic where we try to find the flag in &lt;code&gt;.pcap&lt;/code&gt; file.&lt;/p&gt;

&lt;h4&gt;
  
  
  Canada - Project Searching MH370
&lt;/h4&gt;

&lt;p&gt;First, we download the zip file. After unzipping it we will get a pcapng file  &lt;code&gt;Essence.pcapng&lt;/code&gt;. Then we open the file using wireshark. On the wireshark, we searched for any strings that might give us the flag such as ‘KPMG’, ‘flag’, ‘ctf’, ‘pass’, etc. And luckily, we quickly found a zip file &lt;code&gt;CTF_Flag.zip&lt;/code&gt;, which might contain the flag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F84u431ptb143l2awfn50.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F84u431ptb143l2awfn50.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we proceed to try extracting the file and unzipping it. However it is locked with a password.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fitmifytlb9ud5tucsjj5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fitmifytlb9ud5tucsjj5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At first we were thinking to just bruteforce the password using cracking tool like  &lt;code&gt;fcrackzip&lt;/code&gt;, but fortunately we remember that we saw a &lt;code&gt;pass.txt&lt;/code&gt; file which might contain a password when we were browsing around the &lt;code&gt;.pcapng&lt;/code&gt; file previously.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbwei4fxnf4e5tduk87f1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbwei4fxnf4e5tduk87f1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we proceed to extract the password text file and use it for unzipping the zip file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fe0kowsdvhh3uxvm2y9wx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fe0kowsdvhh3uxvm2y9wx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And yay! By using the password &lt;code&gt;W@k@nd@_s0m3tim3s&lt;/code&gt; to unzip the file. We get the flag!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KPMG{I_CAN_SAVE_IRONMAN}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Reverse Engineering
&lt;/h3&gt;

&lt;p&gt;Reverse Engineering in a CTF is typically the process of taking a compiled (machine code, bytecode) program and converting it back into a more human readable format.&lt;/p&gt;

&lt;p&gt;Usually this would involve disassembling a program and trying to make sense of the assembly file produced. And indeed, some of the RE challenges given required you to disassemble a Windows PE file or executables. However, I didn't manage to solve these, and instead solved the easy one that only needed some python knowledge.&lt;/p&gt;

&lt;h4&gt;
  
  
  Russia - GateToRiches
&lt;/h4&gt;

&lt;p&gt;First, we download the zip file and unzip it, this will give us a python code &lt;code&gt;GateToRiches.py&lt;/code&gt;. By looking at the code. It will  ask a username and somehow calculate flag. We can easily solve this by modifying the code to print the produced flag &lt;code&gt;res&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmr9y1tafg1ech0rjvato.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmr9y1tafg1ech0rjvato.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, when we run the python script, it will give us the flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KPMG{f00d}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmbcdbdxbqokbj6ydmvgl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmbcdbdxbqokbj6ydmvgl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I was a bit disappointed with the result, but I learned a lot from the competition and definitely would join more CTFs in the future. In fact, I just participated another CTF a few weeks ago and will make another writeup about it soon. &lt;/p&gt;

&lt;p&gt;And to readers who are interested to get into cyber security, I really encourage to try playing CTF regardless of your skill level! You can start with &lt;a href="https://picoctf.com/" rel="noopener noreferrer"&gt;picoCTF&lt;/a&gt;, a beginner friendly CTF.&lt;/p&gt;

&lt;p&gt;This is my first post, feel free to leave a feedback about my writing.&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>security</category>
      <category>hacking</category>
    </item>
  </channel>
</rss>
