<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by PRISMO_TR on Medium]]></title>
        <description><![CDATA[Stories by PRISMO_TR on Medium]]></description>
        <link>https://medium.com/@prismo_tr?source=rss-d69e36ee5bf1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ppbZpikNK2ADLuMW</url>
            <title>Stories by PRISMO_TR on Medium</title>
            <link>https://medium.com/@prismo_tr?source=rss-d69e36ee5bf1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:08:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prismo_tr/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[picoCTF 2024 Forensics]]></title>
            <link>https://medium.com/@prismo_tr/picoctf-2024-forensics-e5721788bb12?source=rss-d69e36ee5bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5721788bb12</guid>
            <category><![CDATA[picoctf2024]]></category>
            <category><![CDATA[dear-diary]]></category>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[PRISMO_TR]]></dc:creator>
            <pubDate>Wed, 03 Apr 2024 02:46:40 GMT</pubDate>
            <atom:updated>2024-04-19T21:30:50.293Z</atom:updated>
            <content:encoded><![CDATA[<p>This writeup includes a solution to the <strong>Forensics </strong>section of the picoCTF 2024 competition, and it contains 8 challenges.</p><h3>1-Scan Surprise (50 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*oS6nJ4rpMZTLXiquqOppbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*05Rh2dufLWk-trQBBnmqyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*EJqCdH3eac6qf0fR6HIymg.png" /><figcaption>flag.png</figcaption></figure><p>This challenge is about scanning a QR code.</p><p>So, you just have to scan the code from your phone or upload it to this site <a href="https://scanqr.org/#scan"><strong><em>scanqr</em></strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VcvXkePmZ72OT7eWjiJ00g.png" /></figure><h3>2-Verify (50 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*qLcPh1lJmel3Tj-W4m8TtQ.png" /></figure><p>after connect to ssh</p><pre>ctf-player@pico-chall$ ls -la<br>total 20<br>drwxr-xr-x 3 ctf-player ctf-player   57 Mar  9 17:05 .<br>drwxr-xr-x 1 ctf-player ctf-player   20 Apr  2 23:44 ..<br>-rw-r--r-- 1 root       root         65 Mar  9 17:05 checksum.txt<br>-rwxr-xr-x 1 root       root        856 Mar  9 17:05 decrypt.sh<br>drwxr-xr-x 2 ctf-player ctf-player 8192 Mar  9 17:05 files<br>ctf-player@pico-chall$ cat checksum.txt <br>03b52eabed517324828b9e09cbbf8a7b0911f348f76cf989ba6d51acede6d5d8<br>ctf-player@pico-chall$ cat decrypt.sh <br><br>        #!/bin/bash<br><br>        # Check if the user provided a file name as an argument<br>        if [ $# -eq 0 ]; then<br>            echo &quot;Expected usage: decrypt.sh &lt;filename&gt;&quot;<br>            exit 1<br>        fi<br><br>        # Store the provided filename in a variable<br>        file_name=&quot;$1&quot;<br><br>        # Check if the provided argument is a file and not a folder<br>        if [ ! -f &quot;/home/ctf-player/drop-in/$file_name&quot; ]; then<br>            echo &quot;Error: &#39;$file_name&#39; is not a valid file. Look inside the &#39;files&#39; folder with &#39;ls -R&#39;!&quot;<br>            exit 1<br>        fi<br><br>        # If there&#39;s an error reading the file, print an error message<br>        if ! openssl enc -d -aes-256-cbc -pbkdf2 -iter 100000 -salt -in &quot;/home/ctf-player/drop-in/$file_name&quot; -k picoCTF; then<br>            echo &quot;Error: Failed to decrypt &#39;$file_name&#39;. This flag is fake! Keep looking!&quot;<br>        fi<br>        ctf-player@pico-chall$ <br>ctf-player@pico-chall$ ls files/<br>00011a60  4CwloraZ  AGOEyD4N  EXQ6DiO5  Izq2bmb5  Oe0SOw16  TeaXjOeh  ZyNsHVFW  fZHEnAvZ  lZiPMwX4  qHwcKaSC  vc1wGQhn<br>022cvpdN  4XqPqs6B  AVdbk5eX  F6yHlWpt  J16J63tC  OnCx4O4u  TeyHF78l  aGVRRt1d  g2E6RkkX  lcYptJNC  qK35XlHM  vjypfsoh<br>04nLilRD  4k4veVKp  AXFWLqwI  FJBePm2b  JVEoV1Bn  P7orF8IR  ToT9QPKf  aHFaEXKf  g2nu6vlR  ld12od7V  qSn3WAyi  vsGKdf0J<br>0MT2Wrui  4sczhCZl  AdzCNBlC  FLsBEmlR  Jcwq4RxP  PECjZnzJ  TtPblPd6  aIz8E0Iy  gLAo3J0D  lmr9cGCE  qV83Dmye  w1XGgnr9<br>0SGMttmR  58BnWcOc  AiUxYmz8  FOxKdaVP  Jk8UBmcS  PpktRW9a  U3BoYTr9  afLk75aO  gem657x8  lxv6mvZ6  qWv24Da7  w8DmFhfg<br>0fCDySFB  5bSdd2sp  AmsN0Lkj  FtMorZ65  KCL5hW02  QHv46Plh  UDI6pN8S  b9YCg3Tz  hNqXyUX2  m1NnTZoo  qZ7TLGA0  woaiQu5g<br>0hHVJSPh  5gxjbRbh  ArUDDIQ3  G7enzzui  KKRWbrqC  QbiQCWZr  UF1urDfG  bDK7A26M  hZxbAqts  m3bsNhyN  qojIz6XF  wvhWmTPt<br>0mPyFlda  5rHRNllE  Azqf6EEw  Gcv1H8Qs  KUIfl2m7  QcIkjhJ0  UUiDNDlO  bDZN0f4B  haNCaZmC  mWWBZCgt  r3HVTaJd  xQJV5GcG<br>0xknvebh  63MqIIVV  B8pBCEvG  GhrShrXN  KbGMgDus  QgmCuMSV  UuC7t9JQ  bcZupFpi  iGwCDzaU  mdFDpW9k  r3Pw8pFI  xlqXOqhL<br>1kTWMoOI  64nJlBLv  BN0HxLxE  Gtk4Kn9w  KlqDh1ZQ  Qxrlj2uk  V2eK2wiC  bjtBJwTc  iILvZZya  n2XnM9Nc  r8vIZE1F  yACAaKqG<br>1mGlW6Ts  69JSHBh1  BOeN3lXR  GufDk3Mb  L58tTvhF  R3rVsQa8  V4VMSZd9  c3Z3JN0m  ih6levXk  n7Vs8Bjh  rzYX4BnS  yYRsKiUO<br>2JKdkggW  6vgioqew  BdO65Tk4  HDLWGApz  L7gltlCF  RAXeLvjl  VhBNGSYV  cIDWC9cb  j1v0LBVe  n8r2Ejk9  s9TOeOaJ  yg7uBent<br>2Jr8UtbZ  76rj6cv7  Bh5xju3q  HIeYL84k  LCLocE1C  RFLWtody  WBpZ7iz6  dDoFZTXh  jIlhVDLw  nldOsSfJ  sAy34VP4  zYz6howf<br>2K4XCmfE  7j2g9w9w  C1kYNpjq  HJIPzwjJ  LMavH6jA  RHjAw3hj  WjY12GNe  dKYP6pnk  jObn0z94  nnZ33FAt  sKi8TaSn  zjkul95p<br>2MYWkWLC  7ye3lPVb  CF4c5xR8  HMq6348V  Lq3dNalV  RPVIP1xx  Ww6oTYL8  dKisxYdK  jVkxEmtq  nrwKQbJk  sNI2Q6oa  zoz7gvVr<br>2QpRnoZQ  870YaC5g  CGkVyMxT  HUjCgnh4  LrYo1dnu  RQWaIGxG  X5rRZ32p  deppMJSV  jVlaDg4q  oNnB9jru  sRaKyq1f<br>2emuPVOb  8Shyigig  CLCyTz85  HWRVc59e  MPeS8YHI  RVejZvvP  XGTpUJIw  dv0Mm4vr  jcMzi4VO  oi96tAtc  svmptIxV<br>2gP5wDgq  8d0Ncqme  CNvsyU3W  Hmr54gXd  N8vFOGDF  RdYwRe68  XJiFKTlc  e1x51vcc  jdYv9CQ3  oiy29oCW  tFGQywwr<br>2w5vJlLG  8hKIvq38  Cb22Z7FO  HqxLJgMp  NC6PZdoL  Rgs7l9CZ  XcmGmkwD  e2umkBxy  jzmPaO2D  p1LgEQdu  tY2epsSy<br>2yMtx5qd  8rIuGenM  Ce5TrzJu  IDQQR4nq  NS9xPzIA  ScOtAOiZ  YAZlvEou  e5b74XZq  kDPV8ASY  p5INCxLV  tuma818A<br>303DzMmf  91cLOGeN  ClWGbsxu  IITtRrrR  Ndyi6bnx  SwrcVnay  YKQLrxBm  eFlmUkb6  kKVvPy8S  p5INQHq8  uMpXxbqr<br>33CFCJ0y  9DNfzhUK  DCn7KnqG  IbMiqCHJ  NxdIqu0S  T5IkmqtJ  YdTZkUcM  eNfM7vPK  kWjYWiLD  pXJHJUbH  uUI8gJNi<br>36tjTWoF  9KIFXofB  DSKHZ66z  Ie0xOcl5  O5tEUFhw  T6AHhqdE  Z2rLXuyp  eZ4ehccg  kZ6DTcql  pb1E0Y3Z  ugeJ5RN3<br>3KZwXc8s  9pluLfgA  Dmsex2Ug  IikIpp05  OH3906gp  TPBDRCiJ  ZWIiY84t  efpcZmHN  kbumrMcy  pnycz11G  vJDrHtxo<br>3Vs8v8kW  ADMuzktV  EBBoQm7M  IlQwVZcY  OIYZeUCB  TRyxUwzw  ZXqAvkcE  ekSs7xW4  knHTEYup  q53EoTzu  vMv1M1qs<br>3qDKN57P  AEJxVlNY  EG1lW2KR  ItYR0Da2  OPqDbOIH  TXsLzqsp  ZdPbKJh1  eknrQKQh  ksIZWNZR  qCTrc9yM  vWguQ8rQ</pre><p>To find the flag, you must enter this code followed by the name of the folder that we want to decrypt, and I noticed that there are many files inside the files folder, But there is a simple trick to save time that I tried and it worked :)</p><pre>bash decrypt.sh files/*</pre><p>Yes, test the code on all files at once :P</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*oZ7reNBUnVDL8uctr0V9KQ.png" /></figure><h3>3-CanYouSee (100 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*0f8cyCA5eDoBRkQXIeFUJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*4BrqlcUMFIUSew2ST-nTxw.png" /></figure><p>An image file has been output <strong>Nice :)</strong></p><p>Let’s start with the <strong>strings tool</strong></p><p>Strings showed a lot of data through the Strings tool, but let’s note at the top there are some interesting things</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1ztXTP0moOgJYTOvlPjoWg.png" /></figure><p>It’s most likely base64 so let’s try to decode it :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4GoRb6oNm7D9z2Pv2gmB1g.png" /></figure><p>Nice :)</p><h3>4-Secret of the Polyglot (100 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*8oXhnhpYjCJSvUp-SpjI9w.png" /></figure><p>It is a PDF file and there is part 2 of the flag, but part 1 of the flag is missing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*xHtkZuHZPXOnVZxtrCZU0A.png" /></figure><p>There is a problem with byte’s hex for PDF, and to be honest, I did not understand what was happening, so I uploaded it to this <a href="https://www.ilovepdf.com/repair-pdf"><strong>site </strong></a>and found that it fixed the PDF file and gave me an image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*WgzVvGTYuqhvr8MnyKhfWw.png" /></figure><p>Let’s merge the two parts together to get the flag :)</p><h3>5-Mob psycho (200 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*HlLrirkQAadJ7cEW5spM_w.png" /></figure><pre>┌──(kali㉿kali)-[~/picoCTF2024/Forensics/MobPsycho]<br>└─$ unzip mobpsycho.apk<br>Archive:  mobpsycho.apk<br>......etc</pre><p>It’s an apk file so we can unzip it first</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7L2oPCiDiAHXqKRztSSrDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y-16LL0sQUHABc-h51Up6Q.png" /></figure><p>I assumed that the flag is located inside a text file flag.txt within the Android application files, so it happened to be found on the first try.</p><p>When reading the flag, it becomes clear that the flag is encoded in hexadecimal code</p><p>Finally, the flag was decoded, and yes, I got the flag :)</p><h3>6-endianness-v2 (300 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*cbif7eb6z2-8Gu9LfvHo_g.png" /></figure><p>The file does not resemble any known file, so open the file through the hex editor to know more details</p><p>I noticed that the byte of the file header is somewhat similar to the header JPEG, You should see this <a href="https://gist.github.com/leommoore/f9e57ba2aa4bf197ebc5?permalink_comment_id=3860213"><strong>page </strong></a>to understand what I mean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*WETzx7x26fcMavr8ETYSPQ.png" /></figure><p>original scattered file</p><p>hex-header-: E0 FF D8 FF ==Looks like==&gt; JPEG File — header-:FF D8 FF E0</p><p>It looks like the bytes of the file, every four bytes, have been reversed, like Little Endian and Big Endian, so we need a way to put things back the way they were.</p><p>I have created a Python code that solves the problem</p><pre>def reorder_bytes(file_path):<br>    with open(file_path, &#39;rb&#39;) as original_file:<br>        original_bytes = original_file.read()<br><br>    reordered_bytes = b&#39;&#39;.join(original_bytes[i:i+4][::-1] for i in range(0, len(original_bytes), 4))<br><br>    with open(&#39;reordered_file&#39;, &#39;wb&#39;) as new_file:<br>        new_file.write(reordered_bytes)<br><br>reorder_bytes(&#39;challengefile&#39;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*_R7L8L_BafBR7QtTKJYWCA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*EW5wHAp3f_uSbgHUuQ6fbw.png" /></figure><h3>7-Blast from the past (300 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*ZewIIi0YXjuX-whSzFY5Kw.png" /></figure><pre>┌──(kali㉿kali)-[~/picoCTF2024/Forensics/BlastFromThePast]<br>└─$ exiftool original.jpg                                  <br>ExifTool Version Number         : 12.76<br>File Name                       : original.jpg<br>Directory                       : .<br>File Size                       : 2.9 MB<br>File Modification Date/Time     : 2024:03:13 13:45:34-04:00<br>File Access Date/Time           : 2024:04:03 11:50:38-04:00<br>File Inode Change Date/Time     : 2024:04:03 11:50:38-04:00<br>File Permissions                : -rw-r--r--<br>File Type                       : JPEG<br>File Type Extension             : jpg<br>MIME Type                       : image/jpeg<br>Exif Byte Order                 : Little-endian (Intel, II)<br>Image Description               : <br>Make                            : samsung<br>Camera Model Name               : SM-A326U<br>Orientation                     : Rotate 90 CW<br>X Resolution                    : 72<br>Y Resolution                    : 72<br>Resolution Unit                 : inches<br>Software                        : MediaTek Camera Application<br>Modify Date                     : 2023:11:20 15:46:23<br>Y Cb Cr Positioning             : Co-sited<br>Exposure Time                   : 1/24<br>F Number                        : 1.8<br>Exposure Program                : Program AE<br>ISO                             : 500<br>Sensitivity Type                : Unknown<br>Recommended Exposure Index      : 0<br>Exif Version                    : 0220<br>Date/Time Original              : 2023:11:20 15:46:23<br>Create Date                     : 2023:11:20 15:46:23<br>Components Configuration        : Y, Cb, Cr, -<br>Shutter Speed Value             : 1/24<br>Aperture Value                  : 1.9<br>Brightness Value                : 3<br>Exposure Compensation           : 0<br>Max Aperture Value              : 1.8<br>Metering Mode                   : Center-weighted average<br>Light Source                    : Other<br>Flash                           : On, Fired<br>Focal Length                    : 4.6 mm<br>Sub Sec Time                    : 703<br>Sub Sec Time Original           : 703<br>Sub Sec Time Digitized          : 703<br>Flashpix Version                : 0100<br>Color Space                     : sRGB<br>Exif Image Width                : 4000<br>Exif Image Height               : 3000<br>Interoperability Index          : R98 - DCF basic file (sRGB)<br>Interoperability Version        : 0100<br>Exposure Mode                   : Auto<br>White Balance                   : Auto<br>Digital Zoom Ratio              : 1<br>Focal Length In 35mm Format     : 25 mm<br>Scene Capture Type              : Standard<br>Compression                     : JPEG (old-style)<br>Thumbnail Offset                : 1408<br>Thumbnail Length                : 64000<br>Image Width                     : 4000<br>Image Height                    : 3000<br>Encoding Process                : Baseline DCT, Huffman coding<br>Bits Per Sample                 : 8<br>Color Components                : 3<br>Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)<br>Time Stamp                      : 2023:11:20 15:46:21.420-05:00<br>MCC Data                        : United States / Guam (310)<br>Aperture                        : 1.8<br>Image Size                      : 4000x3000<br>Megapixels                      : 12.0<br>Scale Factor To 35 mm Equivalent: 5.4<br>Shutter Speed                   : 1/24<br>Create Date                     : 2023:11:20 15:46:23.703<br>Date/Time Original              : 2023:11:20 15:46:23.703<br>Modify Date                     : 2023:11:20 15:46:23.703<br>Thumbnail Image                 : (Binary data 64000 bytes, use -b option to extract)<br>Circle Of Confusion             : 0.006 mm<br>Field Of View                   : 71.5 deg<br>Focal Length                    : 4.6 mm (35 mm equivalent: 25.0 mm)<br>Hyperfocal Distance             : 2.13 m<br>Light Value                     : 4.0</pre><p>This challenge requires me to modify the meta data, which is 7 things… There is no problem with the first 6, but the problem lies in number 7 (<strong>Time Stamp</strong>)… I have tried many things and have come to the conclusion that the best way to modify is through the Hex editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*MzJJasjOZ7GCN_ujlhgJfw.png" /></figure><p>Nice…things are starting to get better :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*vTtDp2fiw3rDyczeqxHsAw.png" /></figure><p>Nice…it’s starting to become clear that this number is “<strong>UNIX Timestamp</strong>”</p><p>In the challenge, the time(<strong>1970:01:01 00:00:00.001+00:00</strong>) and its value are required to be in the UNIX Timestamp.<strong> I found it to be (1)</strong></p><p>Therefore, I want to change the original value and make it 1 so that it becomes this way, and the bytes must not be deleted, so we replace the numbers to the right of the 1 with null byte.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*VG0X4SigujcQ6j9j4NTveA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*j7nSSWM4MfGB7LjQXPBAng.png" /></figure><pre>┌──(kali㉿kali)-[~/picoCTF2024/Forensics/BlastFromThePast]<br>└─$ exiftool -ModifyDate=&#39;1970:01:01 00:00:00&#39; original.jpg<br>exiftool -DateTimeOriginal=&#39;1970:01:01 00:00:00&#39; original.jpg<br>exiftool -CreateDate=&#39;1970:01:01 00:00:00&#39; original.jpg<br>exiftool -SubSecCreateDate=&#39;1970:01:01 00:00:00.001&#39; original.jpg<br>exiftool -SubSecDateTimeOriginal=&#39;1970:01:01 00:00:00.001&#39; original.jpg<br>exiftool -SubSecModifyDate=&#39;1970:01:01 00:00:00.001&#39; original.jpg<br>    1 image files updated<br>    1 image files updated<br>    1 image files updated<br>    1 image files updated<br>    1 image files updated<br>    1 image files updated<br>                                                                                                        <br>┌──(kali㉿kali)-[~/picoCTF2024/Forensics/BlastFromThePast]<br>└─$ nc -w 2 mimas.picoctf.net 57592 &lt; original.jpg<br>                                                                                                        <br>┌──(kali㉿kali)-[~/picoCTF2024/Forensics/BlastFromThePast]<br>└─$ nc mimas.picoctf.net 52224<br>MD5 of your picture:<br>5ad8a6e01e19d24121349d3012eac471  test.out<br><br>Checking tag 1/7<br>Looking at IFD0: ModifyDate<br>Looking for &#39;1970:01:01 00:00:00&#39;<br>Found: 1970:01:01 00:00:00<br>Great job, you got that one!<br><br>Checking tag 2/7<br>Looking at ExifIFD: DateTimeOriginal<br>Looking for &#39;1970:01:01 00:00:00&#39;<br>Found: 1970:01:01 00:00:00<br>Great job, you got that one!<br><br>Checking tag 3/7<br>Looking at ExifIFD: CreateDate<br>Looking for &#39;1970:01:01 00:00:00&#39;<br>Found: 1970:01:01 00:00:00<br>Great job, you got that one!<br><br>Checking tag 4/7<br>Looking at Composite: SubSecCreateDate<br>Looking for &#39;1970:01:01 00:00:00.001&#39;<br>Found: 1970:01:01 00:00:00.001<br>Great job, you got that one!<br><br>Checking tag 5/7<br>Looking at Composite: SubSecDateTimeOriginal<br>Looking for &#39;1970:01:01 00:00:00.001&#39;<br>Found: 1970:01:01 00:00:00.001<br>Great job, you got that one!<br><br>Checking tag 6/7<br>Looking at Composite: SubSecModifyDate<br>Looking for &#39;1970:01:01 00:00:00.001&#39;<br>Found: 1970:01:01 00:00:00.001<br>Great job, you got that one!<br><br>Checking tag 7/7<br>Timezones do not have to match, as long as it&#39;s the equivalent time.<br>Looking at Samsung: TimeStamp<br>Looking for &#39;1970:01:01 00:00:00.001+00:00&#39;<br>Found: 1970:01:01 00:00:00.001+00:00<br>Great job, you got that one!<br><br>You did it!<br>picoCTF{71m3_7r4v311ng_p1c7ur3_XXXXXXXX}</pre><p>DONE :)</p><h3>8-Dear Diary (400 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*v9cxStW6VXgML2QGYh9foQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*8DG5T51LlF_WnXNIgx4BKg.png" /></figure><p>We will need the autopsy Tool :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1W0YueE_cl_B5wg9ul1ocw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*g7F-0nKO-oLbSWqgTpbImQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*HBqttxhrgQCsBKmzEj5Tjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*t79-ZyWjyP41cAPNHbaY9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*fopgwh-fuAF5h2BMAqteBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*VHAg-WXmLKft-UylAd0jwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*1mWerpd-s87ebJPwJRMIIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*EYAAh5u4NpzBiQ7HD_9XRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G388l6Yuvvc4Bcefsyi_Ow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*UodLa4zN5LARgb3TW1nHkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*jStzfyHBC3A_CgtJ7PXNEg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/813/1*VR4ENkQM8w5wfFpeyqmBog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YTWDGDtSPjICUyvl1JtV5w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*awA8uoQKRvkF8R-Q0QX_lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*s0PeY0dXoFLORv1GrGeU_w.png" /></figure><p>The flag is present in every file, but in parts, and when you find them all, they will be counted as the flag</p><p><em>picoCTF{1_533_n4m35_XXXXXXXX}</em></p><p>Thus, I have completed the solutions to all the challenges of the <strong>Forensics section</strong>. I hope the writeup will be helpful</p><p>insha- <strong>Allah</strong></p><p>:)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5721788bb12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[picoCTF 2024 General Skills]]></title>
            <link>https://medium.com/@prismo_tr/picoctf-2024-general-skills-dedc42a2a142?source=rss-d69e36ee5bf1------2</link>
            <guid isPermaLink="false">https://medium.com/p/dedc42a2a142</guid>
            <category><![CDATA[generalskills]]></category>
            <category><![CDATA[picoctf2024]]></category>
            <category><![CDATA[solutions]]></category>
            <dc:creator><![CDATA[PRISMO_TR]]></dc:creator>
            <pubDate>Tue, 02 Apr 2024 12:33:22 GMT</pubDate>
            <atom:updated>2024-04-02T13:43:16.530Z</atom:updated>
            <content:encoded><![CDATA[<p>This writeup includes a solution to the General Skills section of the picoCTF 2024 competition, and it contains 10 challenges.</p><h3><strong>1-Super SSH (25 points)</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*kjoLgTKkJQGdnJWKheAPtQ.png" /></figure><pre>ssh ctf-player@titan.picoctf.net -p65080 </pre><p><strong>get The flag:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4rB7e-sEOvqFj1E1y1Y58A.png" /></figure><h3>2-Commitment Issues (50 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*dYduU506nG3MDo2GoXXiJw.png" /></figure><pre>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/CommitmentIssues]<br>└─$ ls<br>challenge.zip<br>                                                                                                                                                             <br>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/CommitmentIssues]<br>└─$ unzip challenge.zip <br>Archive:  challenge.zip<br>   creating: drop-in/<br>   creating: drop-in/.git/<br>   etc....<br><br>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/CommitmentIssues]<br>└─$ ls<br>challenge.zip  drop-in<br>                                                                                                                                                             <br>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/CommitmentIssues]<br>└─$ cd drop-in <br>                                                                                                                                                             <br>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/CommitmentIssues/drop-in]<br>└─$ ls<br>message.txt<br>                                                                                                                                                             <br>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/CommitmentIssues/drop-in]<br>└─$ ls -la     <br>total 16<br>drwxr-xr-x 3 kali kali 4096 Mar  9 16:10 .<br>drwxr-xr-x 3 kali kali 4096 Apr  2 03:37 ..<br>drwxr-xr-x 8 kali kali 4096 Mar  9 16:10 .git<br>-rw-r--r-- 1 kali kali   11 Mar  9 16:10 message.txt<br>                                                                                                                                                             <br>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/CommitmentIssues/drop-in]<br>└─$ cat message.txt         <br>TOP SECRET<br>                                                                                                                                                             <br>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/CommitmentIssues/drop-in]<br>└─$ </pre><p>There is nothing in <strong>message.txt </strong>There is a <strong>.git</strong> file so we can try using <strong>git</strong></p><pre>git log </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*tdIPMyvlOaw12InhEr7-uQ.png" /></figure><pre>git show HEAD</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*XEjDr0Sdl0PHdQhln5Mpzw.png" /></figure><h3><strong>3-Time Machine </strong>(50 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*sNfFAwQwIvFA8qvLn3nWRQ.png" /></figure><pre>git log</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4exOvFtiFDxZeDCbQ0Jynw.png" /></figure><h3><strong>4-Blame Game </strong>(75 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*EcVyaTi7AyLmdKMHc59jDQ.png" /></figure><p>I tried to view the log, but it is too large for a text file, so we need to filter it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*dj5iwjrdYb_L1gjz53YM7g.png" /></figure><pre>cat log.txt | grep &quot;picoCTF{&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*j_tHl0QI-zqw9qGbbzJ9Hw.png" /></figure><h3>5-Collaborative Development (75 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*sbX6MAU0kf35pQZkpprx3Q.png" /></figure><p>Nothing interesting .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*qC9K23LkZSjFXbVolOuP1A.png" /></figure><p>But let’s try new things :)</p><pre>git branch</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*NwhqypEiKFbTOdJJxipxoQ.png" /></figure><p><strong>Let’s try:</strong></p><pre>git checkout feature/part-1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*k0oj4Yut0oM_l6bBE3wDBg.png" /></figure><p>Nice, we got the first part :)</p><p>Now Let’s try part 2:</p><pre>git checkout feature/part-2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*OK5FnMXGAiG5S3ybRMiQ-A.png" /></figure><p>:)</p><p>Finally, let’s try the third</p><pre>git checkout feature/part-3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*S2g20JONcqzgKKO3LDMIuA.png" /></figure><p>We got it, now let’s combine the three parts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*xnbk75TurXL2hQJl8H_SHw.png" /></figure><h3>6-binhexa (100 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*mR7R26gHyrCf9he8HNehfA.png" /></figure><pre>┌──(kali㉿kali)-[~/picoCTF2024/GeneralSkills/binhexa]<br>└─$ nc titan.picoctf.net 62817<br><br>Welcome to the Binary Challenge!&quot;<br>Your task is to perform the unique operations in the given order and find the final result in hexadecimal that yields the flag.<br><br>Binary Number 1: 01001000<br>Binary Number 2: 00110110<br><br><br>Question 1/6:<br>Operation 1: &#39;|&#39;<br>Perform the operation on Binary Number 1&amp;2.<br>Enter the binary result: 01111110<br>Correct!<br><br>Question 2/6:<br>Operation 2: &#39;+&#39;<br>Perform the operation on Binary Number 1&amp;2.<br>Enter the binary result: 1111110<br>Correct!<br><br>Question 3/6:<br>Operation 3: &#39;&gt;&gt;&#39;<br>Perform a right shift of Binary Number 2 by 1 bits .<br>Enter the binary result: 00011011<br>Correct!<br><br>Question 4/6:<br>Operation 4: &#39;*&#39;<br>Perform the operation on Binary Number 1&amp;2.<br>Enter the binary result: 111100110000<br>Correct!<br><br>Question 5/6:<br>Operation 5: &#39;&lt;&lt;&#39;<br>Perform a left shift of Binary Number 1 by 1 bits.<br>Enter the binary result: 10010000<br>Correct!<br><br>Question 6/6:<br>Operation 6: &#39;&amp;&#39;<br>Perform the operation on Binary Number 1&amp;2.<br>Enter the binary result: 00000000<br>Correct!<br><br>Enter the results of the last operation in hexadecimal: 0<br><br>Correct answer!<br>The flag is: picoCTF{b1tw^3se_0p3eR@tI0n_su33essFuL_XXXXXXXX}</pre><p>This site will help you ;) <a href="https://www.rapidtables.com/calc/math/binary-calculator.html"><strong>calculator</strong></a></p><h3>7-Binary Search (100 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*ObF64rTaUlcPfrD15wUZUQ.png" /></figure><p>This challenge is a game that uses binary search with 10 guesses</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*0ACnrQ9LhVAtGxAhpySvEQ.png" /></figure><h3>8-endianness (200 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*HxU5AiAPEoEIlVTzXWOO1w.png" /></figure><p>To solve this challenge, let’s find both the little endian and big endian representations of the word “muwpt”.</p><p>First, let’s convert each character of the word to its ASCII value:</p><ul><li>m = 109</li><li>u = 117</li><li>w = 119</li><li>p = 112</li><li>t = 116</li></ul><p>Now, let’s represent these ASCII values in hexadecimal format:</p><ul><li>m = 0x6D</li><li>u = 0x75</li><li>w = 0x77</li><li>p = 0x70</li><li>t = 0x74</li></ul><p>For little endian representation, we reverse the order of bytes:</p><p>Little Endian:</p><ul><li>m = 0x6D</li><li>u = 0x75</li><li>w = 0x77</li><li>p = 0x70</li><li>t = 0x74</li></ul><p>So, the little endian representation is: 747077756D.</p><p>For big endian representation, we keep the order of bytes as is:</p><p>Big Endian:</p><ul><li>m = 0x6D</li><li>u = 0x75</li><li>w = 0x77</li><li>p = 0x70</li><li>t = 0x74</li></ul><p>So, the big endian representation is: 6D75777074.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*FbQBg4O8Px0mvukqxqPIFg.png" /></figure><p>This site will help you ;) <a href="https://blockchain-academy.hs-mittweida.de/litte-big-endian-converter/"><strong>calculator</strong></a></p><h3>9-dont-you-love-banners (300 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*FzG5JsSvHtOFwfpef0ADdg.png" /></figure><p>When trying to connect to “<strong>nc tethys.picoctf.net 54160”</strong> request for a password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*2jKgUoHh3hdP6t5oCjwlug.png" /></figure><p>Returning to the description of the challenge, something was mentioned about a data leak in a server “<strong>tethys.picoctf.net 63688”,</strong>So I checked the port using N<strong>map </strong>And I got a password :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*DiRefLcWiG9Uwpkc_uBG5w.png" /></figure><p>Two other questions also appeared and I answered</p><p>1-My_Passw@rd_@1234</p><p>2-DEF CON</p><p>3-John Draper</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*hYHArnGyBoI2cf5U5uOjCg.png" /></figure><pre>player@challenge:~$ id<br>id<br>uid=1000(player) gid=1000(player) groups=1000(player)<br>player@challenge:~$ pwd<br>pwd<br>/home/player<br>player@challenge:~$ ls -la<br>ls -la<br>total 20<br>drwxr-xr-x 1 player player   20 Mar  9 16:39 .<br>drwxr-xr-x 1 root   root     20 Mar  9 16:39 ..<br>-rw-r--r-- 1 player player  220 Apr  4  2018 .bash_logout<br>-rw-r--r-- 1 player player 3771 Apr  4  2018 .bashrc<br>-rw-r--r-- 1 player player  807 Apr  4  2018 .profile<br>-rw-r--r-- 1 player player  114 Feb  7 17:25 banner<br>-rw-r--r-- 1 root   root     13 Feb  7 17:25 text<br>player@challenge:~$ cat banner<br>cat banner<br>*************************************<br>**************WELCOME****************<br>*************************************<br>player@challenge:~$ cat text    <br>cat text<br>keep digging<br>player@challenge:~$ cd /root<br>cd /root<br>player@challenge:/root$ ls<br>ls<br>flag.txt  script.py<br>player@challenge:/root$ ls -la<br>ls -la<br>total 16<br>drwxr-xr-x 1 root root    6 Mar  9 16:39 .<br>drwxr-xr-x 1 root root   29 Apr  2 10:12 ..<br>-rw-r--r-- 1 root root 3106 Apr  9  2018 .bashrc<br>-rw-r--r-- 1 root root  148 Aug 17  2015 .profile<br>-rwx------ 1 root root   46 Mar  9 16:39 flag.txt<br>-rw-r--r-- 1 root root 1317 Feb  7 17:25 script.py<br>player@challenge:/root$ cat flag.txt<br>cat flag.txt<br>cat: flag.txt: Permission denied</pre><p>script.py</p><pre>import os<br>import pty<br><br>incorrect_ans_reply = &quot;Lol, good try, try again and good luck\n&quot;<br><br>if __name__ == &quot;__main__&quot;:<br>    try:<br>      with open(&quot;/home/player/banner&quot;, &quot;r&quot;) as f:<br>        print(f.read())<br>    except:<br>      print(&quot;*********************************************&quot;)<br>      print(&quot;***************DEFAULT BANNER****************&quot;)<br>      print(&quot;*Please supply banner in /home/player/banner*&quot;)<br>      print(&quot;*********************************************&quot;)<br><br>try:<br>    request = input(&quot;what is the password? \n&quot;).upper()<br>    while request:<br>        if request == &#39;MY_PASSW@RD_@1234&#39;:<br>            text = input(&quot;What is the top cyber security conference in the world?\n&quot;).upper()<br>            if text == &#39;DEFCON&#39; or text == &#39;DEF CON&#39;:<br>                output = input(<br>                    &quot;the first hacker ever was known for phreaking(making free phone calls), who was it?\n&quot;).upper()<br>                if output == &#39;JOHN DRAPER&#39; or output == &#39;JOHN THOMAS DRAPER&#39; or output == &#39;JOHN&#39; or output== &#39;DRAPER&#39;:<br>                    scmd = &#39;su - player&#39;<br>                    pty.spawn(scmd.split(&#39; &#39;))<br><br>                else:<br>                    print(incorrect_ans_reply)<br>            else:<br>                print(incorrect_ans_reply)<br>        else:<br>            print(incorrect_ans_reply)<br>            break<br><br>except:<br>    KeyboardInterrupt</pre><p>When connecting to the user ‘<strong>player</strong>’, I tried various ways to escalate the account privileges to root but was unable to do so. Therefore, I searched again and noticed that there is a <strong>/root/script.py</strong> file that reads the banner file from the ‘<strong>player</strong>’ user. I also observed that the ‘<strong>player</strong>’ user has full permissions on the banner file. Therefore, I deleted the banner file and created a linked file named ‘<strong>banner</strong>’ that is linked to the <strong>/root/flag.txt</strong> file.</p><pre>player@challenge:~$ rm banner<br>rm banner<br>player@challenge:~$ ln -s /root/flag.txt /home/player/banner<br>ln -s /root/flag.txt /home/player/banner<br>player@challenge:~$ ls -la<br>ls -la<br>total 16<br>drwxr-xr-x 1 player player   20 Apr  2 10:27 .<br>drwxr-xr-x 1 root   root     20 Mar  9 16:39 ..<br>-rw-r--r-- 1 player player  220 Apr  4  2018 .bash_logout<br>-rw-r--r-- 1 player player 3771 Apr  4  2018 .bashrc<br>-rw-r--r-- 1 player player  807 Apr  4  2018 .profile<br>lrwxrwxrwx 1 player player   14 Apr  2 10:27 banner -&gt; /root/flag.txt<br>-rw-r--r-- 1 root   root     13 Feb  7 17:25 text<br></pre><p>Let’s try reading the file. If I can’t read it and request higher permissions, then we are on the right track</p><pre>player@challenge:~$ cat banner<br>cat banner<br>cat: banner: Permission denied</pre><p>Nice :)</p><p>Now let’s exit the server to connect to it again</p><p>And Boooom we got the flag :P</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*ABC8KCbTEZz96OLZQTZy9A.png" /></figure><h3>10-SansAlpha (400 points)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*qxZcy8nz4J4PZCJwAHKWQg.png" /></figure><p>This challenge idea was new to me, so it took a lot of time to collect information and learn through trial and error… I will explain the idea in a simplified way.<br>The server does not accept any commands that contain letters, for example: ABC…Z, abc…z, but it accepts missing numbers and special characters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*LzK-FkvDZuoZ9fC6BpkbXg.png" /></figure><p>I noticed that it is possible to use “?” , “/” and “*” to find the flag path</p><p>I used */????.??? To be searched for */flag.txt I used “?” Place of letters</p><p>*/flag.txt ==&gt; */????.???</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*f3Z-C-8x0CjlYe5bUYol8w.png" /></figure><p>Nice, I got the flag’s path…</p><p>When I was searching I tried to enter <strong>/???/???</strong><br>And output to me “<strong>E: Invalid operation /bin/awk</strong><br>“So an idea came to my mind, which is why not get a tool in the bin folder and use it as print to print the value of the flag.”</p><p>After a long search, I found the most suitable thing for what I wanted, which is<strong> /bin/base64</strong>. Ok, now you will be wondering how this will be used, because it needs options, and if I do not give it options, it will not work, so I used a simple trick.</p><p>It’s a bit of bash magic</p><p>First, we will store the <strong>/bin/base64 </strong>path in an array</p><pre>_13=(/???/????64)</pre><p>Second, we want <strong>base64 </strong>to be implemented through the array, so we will use <strong>{$_420[0]}</strong>.<br>And then the flag path</p><pre>_13=(/???/????64)<br>${_13[0]} */????.???</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*sCFUY5zAT_mhfd600xoPLw.png" /></figure><p>It will succeed and output a base64 encoded value, Let’s decrypt The flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qp1rIZcAVBenBPOZGV-ULQ.png" /></figure><p>Thus, I have completed the solutions to all the challenges of the General Skills section. I hope the writeup will be helpful</p><p>insha- <strong>Allah</strong></p><p>:)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dedc42a2a142" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>