<?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>DEV Community: Michal Biesiada</title>
    <description>The latest articles on DEV Community by Michal Biesiada (@mbiesiad).</description>
    <link>https://dev.to/mbiesiad</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%2F382234%2Fa010410c-7720-40a1-b193-a257a9b46515.png</url>
      <title>DEV Community: Michal Biesiada</title>
      <link>https://dev.to/mbiesiad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mbiesiad"/>
    <language>en</language>
    <item>
      <title>CTF Writeup — Hackme CTF</title>
      <dc:creator>Michal Biesiada</dc:creator>
      <pubDate>Wed, 15 Nov 2023 12:30:35 +0000</pubDate>
      <link>https://dev.to/mbiesiad/ctf-writeup-hackme-ctf-2i7m</link>
      <guid>https://dev.to/mbiesiad/ctf-writeup-hackme-ctf-2i7m</guid>
      <description>&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;This time I want to present you CTF without time pressure — you can play it as long, as you want. 🎉&lt;/p&gt;

&lt;p&gt;Referring to the &lt;em&gt;&lt;a href="https://web.archive.org/" rel="noopener noreferrer"&gt;Wayback Machine&lt;/a&gt;&lt;/em&gt;, it looks that first edition of this CTF was released on 2014. Now is 2023 so almost 10y later and it is still alive, so cool!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lmlmuznnizy7oy9y92i.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9lmlmuznnizy7oy9y92i.PNG" alt="Captured flags — HackmeCTF, source: https://ctf.uw-team.org/" width="730" height="519"&gt;&lt;/a&gt; &lt;code&gt;Captured flags — HackmeCTF, source: https://ctf.uw-team.org/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Text there is not written in English, but it’s not an issue for us — we can use many &lt;a href="https://translate.google.com/" rel="noopener noreferrer"&gt;tools&lt;/a&gt; to translate the content (our goal is focused on the flags!).&lt;br&gt;
Visiting the site &lt;a href="https://ctf.uw-team.org/" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/&lt;/a&gt; we can get to know that flags are with &lt;em&gt;&lt;strong&gt;FLG-XXXXXX&lt;/strong&gt;&lt;/em&gt; format, and… flags can be &lt;em&gt;everywhere&lt;/em&gt;! This should be enough for us. Uh, yeah, one more thing, &lt;em&gt;the rules&lt;/em&gt; — please notice info that automated scanners are forbidden.&lt;/p&gt;

&lt;p&gt;At first, visit mentioned before site of &lt;strong&gt;HackmeCTF&lt;/strong&gt;: &lt;a href="https://ctf.uw-team.org" rel="noopener noreferrer"&gt;https://ctf.uw-team.org&lt;/a&gt;&lt;br&gt;
We don’t need to register in, etc. It’s quite convenient in my opinion.&lt;br&gt;
Please keep in mind that thanks to writeups many things looks obvious, but the best fun is just be a participant, so I encourage you to take a part!&lt;br&gt;
There can be different ways to get the same flag in some cases. 🍀&lt;/p&gt;

&lt;p&gt;This writeup will be more focused on the final results, on showing ‘winning ways’, because of respect your time — many flags to discuss here.&lt;br&gt;
There are usually many lines of thought when solving — in short, you often don’t know at the beginning how you will ultimately get a specific flag. 🚩&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-1] Source code (warm-up)&lt;/strong&gt;&lt;br&gt;
Checking source code during CTF is mostly not a bad idea. Let’s check it!&lt;br&gt;
&lt;em&gt;CTRL+U -&amp;gt; CTRL+F: “FLG-”&lt;/em&gt;. Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dl97xa4jr4zxacsdmkg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dl97xa4jr4zxacsdmkg.PNG" alt="Flag 1 — Source code — HackmeCTF" width="409" height="45"&gt;&lt;/a&gt; &lt;code&gt;Flag 1 — Source code — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-2] Cookies&lt;/strong&gt;&lt;br&gt;
Author/s said that can be everywhere, right? Let’s check the cookies.&lt;br&gt;
&lt;em&gt;F12 -&amp;gt; Application.&lt;/em&gt; Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frtkav1hjxwhoiyl073qn.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frtkav1hjxwhoiyl073qn.PNG" alt="Flag 2—Cookies - HackmeCTF" width="469" height="114"&gt;&lt;/a&gt; &lt;code&gt;Flag 2 — Cookies - HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-3] HEXView&lt;/strong&gt;&lt;br&gt;
Below our form which is used for sending a captured flags, there is some possible interesting image “&lt;strong&gt;TOP SECRET&lt;/strong&gt;”. Let’s take a look closer there.&lt;br&gt;
&lt;em&gt;RMB -&amp;gt; Open in new tab:&lt;/em&gt; &lt;a href="https://ctf.uw-team.org/zerknij.gif" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/zerknij.gif&lt;/a&gt;&lt;br&gt;
Hm, interesting. Why it’s with .gif format? What means the file name?&lt;br&gt;
Meaning is “take a look”, OK. Some kind of a tip.&lt;br&gt;
&lt;em&gt;Download this file. Use some image viewer/editor, ie.: &lt;a href="https://en.wikipedia.org/wiki/IrfanView" rel="noopener noreferrer"&gt;IrfanView&lt;/a&gt;.&lt;br&gt;
Select ‘View’ tab from Menu -&amp;gt; ‘Show HEX view’&lt;/em&gt;. Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qhssaj80ljjktdrp130.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9qhssaj80ljjktdrp130.PNG" alt="Flag 3 — HEXview — HackmeCTF" width="729" height="345"&gt;&lt;/a&gt; &lt;code&gt;Flag 3 — HEXview — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-4] Robots.txt&lt;/strong&gt;&lt;br&gt;
Let’s check what we will get if type something like &lt;a href="https://ctf.uw-team.org/flag" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/flag&lt;/a&gt; Oh, 404 error site — “Not Found”, roger that.&lt;br&gt;
So, let’s check &lt;a href="https://en.wikipedia.org/wiki/Robots.txt" rel="noopener noreferrer"&gt;robots.txt file&lt;/a&gt;. Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff1zfw1kqdqnp7u5lnpdc.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff1zfw1kqdqnp7u5lnpdc.PNG" alt="Flag 4 — robots.txt — HackmeCTF" width="214" height="58"&gt;&lt;/a&gt; &lt;code&gt;Flag 4 — robots.txt — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-5] Directory listing&lt;/strong&gt;&lt;br&gt;
Let’s play again with DevTools — quite useful tool, isn’t it?&lt;br&gt;
&lt;em&gt;F12 -&amp;gt; Sources tab -&amp;gt; images -&amp;gt; select some image -&amp;gt; RMB -&amp;gt; Open in new tab&lt;/em&gt;. For example: &lt;a href="https://ctf.uw-team.org/images/body_bg.png" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/images/body_bg.png&lt;/a&gt; OK, cool, body background:D Let’s check &lt;em&gt;/images&lt;/em&gt;, so remove filename with extension — go to &lt;a href="https://ctf.uw-team.org/images/" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/images/&lt;/a&gt; Some ‘&lt;em&gt;unknown&lt;/em&gt;’ .txt file, we have to check it! Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb082gz4elcedqcmsag5w.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb082gz4elcedqcmsag5w.PNG" alt="Flag 5 — Directory listing — HackmeCTF" width="109" height="45"&gt;&lt;/a&gt; &lt;code&gt;Flag 5 — Directory listing — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-6] Admin&lt;/strong&gt;&lt;br&gt;
Wait a second, do you remember cookies table? Let’s back there for a while.&lt;br&gt;
We are not logged in (even registered:D), why there is ‘admin’ cookie with value ‘0’? Let’s change this to value ‘1’. Refresh. Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv98ch65sfbm54uwuo8jg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv98ch65sfbm54uwuo8jg.PNG" alt="Flag 6— Admin cookie — HackmeCTF" width="225" height="81"&gt;&lt;/a&gt; &lt;code&gt;Flag 6 — Admin cookie — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-7] XSS — Cross-site scripting&lt;/strong&gt;&lt;br&gt;
Quite funny moment from my point of view now. Already collected at least few flags, right? One of the golden rule is “&lt;strong&gt;Never trust user’s input&lt;/strong&gt;”.&lt;br&gt;
Enter XSS payload &lt;em&gt;alert()&lt;/em&gt; to captured flags’ input. Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8vrcwk21difyenfvdso4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8vrcwk21difyenfvdso4.PNG" alt="Flag 7— XSS — HackmeCTF" width="268" height="85"&gt;&lt;/a&gt; &lt;code&gt;Flag 7 — XSS — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-8] Base64&lt;/strong&gt;&lt;br&gt;
A lot of fun. It’s time to use some of site tab. On the page &lt;a href="https://ctf.uw-team.org/?page=kodowanie" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/?page=kodowanie&lt;/a&gt; we can see:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;2023–11–12 00:33 — RkxHLUJBU0U2NA==&lt;br&gt;
2023–11–11 23:16 — dGVzdHVqZQ==&lt;br&gt;
2023–11–10 22:33 — cmF6LCBkd2E=&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It looks like &lt;a href="https://en.wikipedia.org/wiki/Base64" rel="noopener noreferrer"&gt;Base64&lt;/a&gt;. Let’s check the content. &lt;em&gt;DevTools -&amp;gt; Console -&amp;gt; use &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/atob" rel="noopener noreferrer"&gt;atob() function&lt;/a&gt;, so -&amp;gt; atob(‘RkxHLUJBU0U2NA==’)&lt;/em&gt;. Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ejtnvjx9bdyhvoank5s.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ejtnvjx9bdyhvoank5s.PNG" alt="Flag 8— Base64 — HackmeCTF" width="224" height="97"&gt;&lt;/a&gt; &lt;code&gt;Flag 8 — Base64 — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-9] Parameter page=&lt;/strong&gt;&lt;br&gt;
Link for previous task was &lt;a href="https://ctf.uw-team.org/?page=kodowanie" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/?page=kodowanie&lt;/a&gt;&lt;br&gt;
Check site behaviour for other parameter ‘?page=’ value, type at start ‘?page=qwe’. Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1am4dikiwt2p60l6l538.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1am4dikiwt2p60l6l538.PNG" alt="Flag 9— param ?page= — HackmeCTF" width="259" height="88"&gt;&lt;/a&gt; &lt;code&gt;Flag 9 — param ?page= — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-10] CSS — 404err&lt;/strong&gt;&lt;br&gt;
Using DevTools, visit Sources tab -&amp;gt; style.css Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo12zkga5r6896el3yy1l.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo12zkga5r6896el3yy1l.PNG" alt="Flag 10— CSS and 404err — HackmeCTF" width="293" height="76"&gt;&lt;/a&gt; &lt;code&gt;Flag 10 — CSS and 404err — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-11] Response header&lt;/strong&gt;&lt;br&gt;
Have you previously checked Network tab? Not yet? Good time is now!&lt;br&gt;
&lt;em&gt;DevTools -&amp;gt; Network tab -&amp;gt; refresh main site -&amp;gt; check &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Response_header" rel="noopener noreferrer"&gt;Response Headers&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo0o2fbgs5p2zj7o8ej0j.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo0o2fbgs5p2zj7o8ej0j.PNG" alt="Flag 11 — Response header — HackmeCTF" width="340" height="122"&gt;&lt;/a&gt; &lt;code&gt;Flag 11 — Response header — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[FLAG-12] SQLi — SQLite Injection&lt;/strong&gt;&lt;br&gt;
Payload:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;' or 1=1 -- true&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, finally: &lt;a href="https://ctf.uw-team.org/?page=newsy&amp;amp;kod=%27%20or%201=1%20--%20true" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/?page=newsy&amp;amp;kod=%27%20or%201=1%20--%20true&lt;/a&gt;&lt;br&gt;
Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frofhgvei74x49e54f5o0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frofhgvei74x49e54f5o0.PNG" alt="Flag 12 — SQLi — HackmeCTF" width="109" height="59"&gt;&lt;/a&gt; &lt;code&gt;Flag 12 — SQLi — HackmeCTF&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Last flag is for you, please share your solutions! Tip: it is connected with ‘Redirection’ challenge.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoy! 🍀&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sources — HackmeCTF: &lt;a href="https://ctf.uw-team.org/" rel="noopener noreferrer"&gt;https://ctf.uw-team.org/&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Note: Originally published on &lt;a href="https://medium.com/@embossdotar/ctf-writeup-hackme-ctf-720341f061b4" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Best wishes,&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>cybersecurity</category>
      <category>ctfwriteup</category>
      <category>ctfchallenge</category>
    </item>
    <item>
      <title>CTF Writeup — pingCTF 2021 — Steganography</title>
      <dc:creator>Michal Biesiada</dc:creator>
      <pubDate>Wed, 15 Nov 2023 12:08:23 +0000</pubDate>
      <link>https://dev.to/mbiesiad/ctf-writeup-pingctf-2021-steganography-2dc8</link>
      <guid>https://dev.to/mbiesiad/ctf-writeup-pingctf-2021-steganography-2dc8</guid>
      <description>&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;I was wondering whether to write this article for a while. Why? Because it’s from almost two years ago and in general it’s quite easy (if you know what is going on). Moreover, this time I don’t have to many resources for you…&lt;/p&gt;

&lt;p&gt;But, I decided to show you this Challenge, because it’s quite interesting and can be in different forms (keypoint). So I hope it will be useful for you at all. 🎉&lt;/p&gt;

&lt;p&gt;First, please keep in mind that there wasn’t any info about keyword here — &lt;strong&gt;&lt;em&gt;Steganography&lt;/em&gt;&lt;/strong&gt;. Next, the task/challenge is from &lt;em&gt;pingCTF 2021&lt;/em&gt; (2021-12–19), online form. More info: &lt;a href="https://ctftime.org/team/147266/" rel="noopener noreferrer"&gt;https://ctftime.org/team/147266/&lt;/a&gt; and &lt;a href="https://ctf.knping.pl/ctf" rel="noopener noreferrer"&gt;https://ctf.knping.pl/ctf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Challenge name: &lt;em&gt;Colors&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Description is like here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqkh25mazdoqni2rl6nal.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqkh25mazdoqni2rl6nal.PNG" alt="pingCTF 2021 — Colors, source: https://ctf.knping.pl/ctf" width="438" height="422"&gt;&lt;/a&gt; &lt;code&gt;Image 1 - pingCTF 2021 — Colors, source: https://ctf.knping.pl/ctf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, how to say, not so many tips:D but we can see that we have to download some .bmp file. Then, analyze it. ✨&lt;/p&gt;

&lt;p&gt;Quick intro: “The BMP file format or bitmap, is a raster graphics image file format used to store bitmap digital images (…)”, source: &lt;a href="https://en.wikipedia.org/wiki/BMP_file_format" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/BMP_file_format&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But, what is ‘Steganography’?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;is the practice of representing information within another message or physical object, in such a manner that the presence of the information is not evident to human inspection. In computing/electronic contexts, a computer file, message, image, or video is concealed within another file, message, image, or video.&lt;br&gt;
Source: &lt;a href="https://en.wikipedia.org/wiki/Steganography" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/Steganography&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We can not see any connected with challenge site, all what we have is some file (image).&lt;/p&gt;

&lt;p&gt;Let’s take a look there! Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv1adb95dpa8z86wnn1cx.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv1adb95dpa8z86wnn1cx.PNG" alt="pingCTF 2021 — colors.bmp file" width="201" height="209"&gt;&lt;/a&gt; &lt;code&gt;Image 2 - pingCTF 2021 — colors.bmp file&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;My first approach was checking metadata (there you can see usually many interesting things) and how it looks with HEX representation and so on, if I’m not mistaken. That was waste of time (this time)…&lt;/p&gt;

&lt;p&gt;Then, I decided to make some of simple changes with mentioned file — changing brightness, contrast and similar. No result.&lt;/p&gt;

&lt;p&gt;I decided to use ‘&lt;em&gt;reverse the colors&lt;/em&gt;’ feature (using &lt;em&gt;Gimp&lt;/em&gt; software) — yeah, the flag is there! 🚩 Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkb50gzoflftayxkrucsa.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkb50gzoflftayxkrucsa.PNG" alt="pingCTF 2021 — Colors challenge — flag" width="739" height="227"&gt;&lt;/a&gt; &lt;code&gt;Image 3 - pingCTF 2021 — Colors challenge — flag&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Quite interesting — as mentioned above/before — the flag was there all the time. The point is, I could not see this. Making changes — visually I can grap the flag finally.&lt;/p&gt;

&lt;p&gt;If you will be more familiar with ‘&lt;em&gt;Steganography&lt;/em&gt;’ topic — it’s really interesting in my opinion. As mentioned above — it can be connected with music file, with .pcap and other and other.&lt;/p&gt;

&lt;p&gt;I hope you enjoy! 🍀&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Originally published on &lt;a href="https://medium.com/@embossdotar/ctf-writeup-pingctf-2021-steganography-f4c10d8def03" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Best wishes,&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>ctfwriteup</category>
      <category>cybersecurity</category>
      <category>ctfchallenge</category>
    </item>
    <item>
      <title>CTF Writeup — Fetch the Flag CTF 2023 — Unhackable Andy</title>
      <dc:creator>Michal Biesiada</dc:creator>
      <pubDate>Wed, 15 Nov 2023 11:55:24 +0000</pubDate>
      <link>https://dev.to/mbiesiad/ctf-writeup-fetch-the-flag-ctf-2023-unhackable-andy-2a5o</link>
      <guid>https://dev.to/mbiesiad/ctf-writeup-fetch-the-flag-ctf-2023-unhackable-andy-2a5o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hi All,&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is connected with &lt;strong&gt;OSINT&lt;/strong&gt; at start, and &lt;strong&gt;Command Injection&lt;/strong&gt; at the end. ✨&lt;/p&gt;

&lt;p&gt;Description of the challenge: “Someone might want to let ol’ Andy know the old addage — pride goeth before the fall.” — source: &lt;a href="https://snyk.ctf.games/challenges" rel="noopener noreferrer"&gt;https://snyk.ctf.games/challenges&lt;/a&gt; — &lt;em&gt;Unhackable Andy&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That’s all. Now we have to visit some site: &lt;a href="http://challenge.ctf.games:30900/" rel="noopener noreferrer"&gt;http://challenge.ctf.games:30900/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Site is quite simply. There are two options — Home and Login.&lt;/p&gt;

&lt;p&gt;Referring to my last notices: CTRL+U &amp;amp; F12 are clear. 🎉&lt;/p&gt;

&lt;p&gt;‘&lt;em&gt;Home&lt;/em&gt;’ gives the same site of course, ‘&lt;em&gt;Login&lt;/em&gt;’ gives Login panel. At the main site there is pinned GH GitHub profile of mentioned creator (“&lt;em&gt;Unhackable Andy&lt;/em&gt;”; by the way, text there is quite funny — great job!). Let’s take a look there. &lt;a href="https://github.com/UnhackableAndy" rel="noopener noreferrer"&gt;https://github.com/UnhackableAndy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There we can see two repos: ‘&lt;em&gt;my-awesome-site&lt;/em&gt;’ and ‘&lt;em&gt;my-other-awesome-site&lt;/em&gt;’.&lt;br&gt;
Interesting, right? We even don’t have to fork or clone this — just using features from GitHub — please check Git History.&lt;/p&gt;

&lt;p&gt;If you dig deeper there, you will know that mentioned actor made some mistake. We can see this here &lt;a href="https://github.com/unhackableandy/my-awesome-site/commit/d4d664824980d04de78b6aa114f3bac6e27d59d8" rel="noopener noreferrer"&gt;https://github.com/unhackableandy/my-awesome-site/commit/d4d664824980d04de78b6aa114f3bac6e27d59d8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8cryjxnghmc1jh04dl43.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8cryjxnghmc1jh04dl43.PNG" alt="Fetch the Flag CTF 2023 — Unhackable Andy — GitHub repo" width="800" height="532"&gt;&lt;/a&gt; &lt;code&gt;Image 1 - Fetch the Flag CTF 2023 — Unhackable Andy — GitHub repo&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So we can see credentials. Large security issue by Unhackable Andy.&lt;/p&gt;

&lt;p&gt;Let’s check this on actor’s site — it works fine, logged in. ✔&lt;/p&gt;

&lt;p&gt;Here, the site is also quite simple. Endpoint &lt;em&gt;&lt;a href="http://challenge.ctf.games:30900/logout" rel="noopener noreferrer"&gt;/logout&lt;/a&gt;&lt;/em&gt; works like we suppose (logging out). No more interesting features there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnnebnm5e9vn53bda4twj.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnnebnm5e9vn53bda4twj.PNG" alt="Fetch the Flag CTF 2023 — Unhackable Andy — site" width="800" height="552"&gt;&lt;/a&gt; &lt;code&gt;Image 2 - Fetch the Flag CTF 2023 — Unhackable Andy — site&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;But we can see that command ‘shutdown -r’ and btn Submit.&lt;/p&gt;

&lt;p&gt;What if we type there something else? Is is protected? Is it safe?&lt;/p&gt;

&lt;p&gt;Please use there: ls (&lt;a href="https://en.wikipedia.org/wiki/Ls" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/Ls&lt;/a&gt;)&lt;br&gt;
Result:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ofwadbpz7gu3wt10z8b.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ofwadbpz7gu3wt10z8b.PNG" alt="Fetch the Flag CTF 2023 — Unhackable Andy — site — Command Injection" width="734" height="624"&gt;&lt;/a&gt; &lt;code&gt;Image 3 - Fetch the Flag CTF 2023 — Unhackable Andy — site — Command Injection&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We are so close! * Now please just use “cat” &lt;a href="https://en.wikipedia.org/wiki/Cat_(Unix)" rel="noopener noreferrer"&gt;https://en.wikipedia.org/wiki/Cat_(Unix)&lt;/a&gt;&lt;br&gt;
so ‘cat flag.txt’:&lt;/p&gt;

&lt;p&gt;Result — the flag:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhg8gbyewnypb5hyd1s4.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbhg8gbyewnypb5hyd1s4.PNG" alt="Fetch the Flag CTF 2023 — Unhackable Andy — site — Command Injection" width="731" height="657"&gt;&lt;/a&gt; &lt;code&gt;Image 4 - Fetch the Flag CTF 2023 — Unhackable Andy — site — Command Injection&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Funny fact, this flag was achieved in literally the LAST MINUTE before the end. So exciting! 🚀&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you enjoy! 🍀&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: Originally published &lt;a href="https://medium.com/@embossdotar/ctf-writeup-fetch-the-flag-ctf-2023-unhackable-andy-4e5a8dbdbcb0" rel="noopener noreferrer"&gt;on Medium&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Best wishes,&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>cybersecurity</category>
      <category>ctfwriteup</category>
      <category>itsecurity</category>
    </item>
    <item>
      <title>I’ve completed the Hacktoberfest challenge!</title>
      <dc:creator>Michal Biesiada</dc:creator>
      <pubDate>Sun, 18 Oct 2020 19:33:08 +0000</pubDate>
      <link>https://dev.to/mbiesiad/i-ve-completed-the-hacktoberfest-challenge-26g4</link>
      <guid>https://dev.to/mbiesiad/i-ve-completed-the-hacktoberfest-challenge-26g4</guid>
      <description>&lt;h2&gt;
  
  
  What I Learned From Hacktoberfest
&lt;/h2&gt;

&lt;p&gt;Highly recommended to everyone! Great experience &amp;amp; event! 🎉🎉&lt;/p&gt;

</description>
      <category>hacktoberfest</category>
    </item>
  </channel>
</rss>
