<?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: ternera</title>
    <description>The latest articles on DEV Community by ternera (@ternera).</description>
    <link>https://dev.to/ternera</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%2F1187485%2F0945ebce-0231-4fef-88f3-82dd01781723.jpg</url>
      <title>DEV Community: ternera</title>
      <link>https://dev.to/ternera</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ternera"/>
    <language>en</language>
    <item>
      <title>Hacker101 CTF — Micro-CMS v2</title>
      <dc:creator>ternera</dc:creator>
      <pubDate>Sat, 13 Jan 2024 21:41:07 +0000</pubDate>
      <link>https://dev.to/ternera/hacker101-ctf-micro-cms-v2-2nfl</link>
      <guid>https://dev.to/ternera/hacker101-ctf-micro-cms-v2-2nfl</guid>
      <description>&lt;p&gt;In the Micro-CMS V2 CTF by Hackerone, we are given the following hints for the first flag:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regular users can only see public pages&lt;/li&gt;
&lt;li&gt;Getting admin access might require a more perfect union&lt;/li&gt;
&lt;li&gt;This immediately made me think about SQL Injection UNION attacks, which you can learn about here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I began by checking for some basic SQL Injection vulnerabilities with a&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;‘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;admin’
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JRmlsUJW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2A_6GWah2C6DvE-OztGnTJtw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JRmlsUJW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2A_6GWah2C6DvE-OztGnTJtw.png" alt="Image 1" width="591" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These returned errors, but did not provide any useful information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GzCstP5_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AWeFgg9-MUkzV1kGxF2REJg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GzCstP5_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AWeFgg9-MUkzV1kGxF2REJg.png" alt="Image 1" width="720" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I considered opening Burpsuite Intruder and attempting to brute force the username/password combination, but assumed it would be a difficult combination because of the union hint.&lt;/p&gt;

&lt;p&gt;I tried a few different payloads, but struggled to blindly guess what the name of the table name was. Eventually, I did some cheating and checked online to see if I could learn the name of the table. I found a writeup saying that the table name was&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;admins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final payload I used was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;' UNION SELECT 'pass' AS password FROM admins WHERE '1' = '1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And for the password field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pass
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z8O0d1mz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2Ag3l70O6ae8WNMAEDoN-pvA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z8O0d1mz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2Ag3l70O6ae8WNMAEDoN-pvA.png" alt="Image 1" width="583" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Submitting that gave me message saying that I was logged in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GjoKR78U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AlGEwkNgZj8jZ0dVW2_z3wA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GjoKR78U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:640/format:webp/1%2AlGEwkNgZj8jZ0dVW2_z3wA.png" alt="Image 1" width="551" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clicking on the link to the Private Page displayed the flag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ccqv0eg7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AvU_B9UgFj-voMGM1jKeXvg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ccqv0eg7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AvU_B9UgFj-voMGM1jKeXvg.png" alt="Image 1" width="718" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The hint for the next flag said: What actions could you perform as a regular user on the last level, which you can’t now?&lt;/p&gt;

&lt;p&gt;The “changelog” for page 1 also said: “This version fixed the multitude of security flaws and general functionality bugs that plagued v1. Additionally, we added user authentication; we’re still not sure why we didn’t think about that the first time, but hindsight is 20/20. By default, users need to be an admin to add or edit pages now.”&lt;/p&gt;

&lt;p&gt;I used Burpsuite to modify requests and was unable to find an answer that way. Later, I learned that you can send different HTTP request methods using Curl from the command line using the “-X POST” argument. My final command was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -X POST https://7b44997630caaec756ff4da81538e9c9.ctf.hacker101.com/page/edit/1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This immediately gave the second flag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KmlBBEwb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AF6Ewk16HVoFad3gF8qOGwA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KmlBBEwb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AF6Ewk16HVoFad3gF8qOGwA.png" alt="Image 1" width="720" height="103"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The hint for the last flag was: Credentials are secret, flags are secret. Coincidence? I ended up using Burpsuite for this flag as well. My plan was to brute force the username and password, hoping it wasn’t too complex. I recalled from doing this in the past that the username and password were first names. In the past, I had used &lt;a href="https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt"&gt;rockyou.txt&lt;/a&gt;, but that took quite a while.&lt;/p&gt;

&lt;p&gt;This time, I used a &lt;a href="https://raw.githubusercontent.com/ternera/hacker101-ctf/main/names.txt"&gt;wordlist&lt;/a&gt; with only first names in hopes that the challenge was still configured that way. I used Burpsuite’s intercept proxy and then sent the request to the intruder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_2Nv4hKr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2APkaaf2gPQt_8h7Uq8K0U2Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_2Nv4hKr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2APkaaf2gPQt_8h7Uq8K0U2Q.png" alt="Image 1" width="720" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After configuring positions and uploading my wordlist, I began the attack and found that the username was “betsy”, seeing it had a different length than the rest of the responses.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--I77PxHNz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2ADC18q3DTBfvqYoUw5SDqEQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I77PxHNz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2ADC18q3DTBfvqYoUw5SDqEQ.png" alt="Image 1" width="720" height="280"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Trying the username “betsy” with a random password returned an “Invalid password” error, so that showed me that I was on the correct track.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AR_RkfpQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AkX_K-9Te1BzUKxzoFEX6Wg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AR_RkfpQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AkX_K-9Te1BzUKxzoFEX6Wg.png" alt="Image 1" width="720" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running the attack for a few more minutes, the password “teresa” also returned a different length.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2AYWlc0A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2ACE85jLkCq_xYNIVMMpmCvg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2AYWlc0A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2ACE85jLkCq_xYNIVMMpmCvg.png" alt="Image 1" width="720" height="291"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using the username “betsy” and password “teresa” authenticated me and immediately returned the flag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aepBF9cm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AtBh2F2DedcKKlxlvUp2wXg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aepBF9cm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AtBh2F2DedcKKlxlvUp2wXg.png" alt="Image 1" width="720" height="71"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That means this challenge has been completely solved. Be sure to view some of my other Hacker101 CTF writeups!&lt;/p&gt;

</description>
      <category>hackerone</category>
      <category>hacker101</category>
      <category>ctf</category>
      <category>writeup</category>
    </item>
    <item>
      <title>Hacker101 CTF — Micro-CMS v1</title>
      <dc:creator>ternera</dc:creator>
      <pubDate>Sat, 13 Jan 2024 21:38:51 +0000</pubDate>
      <link>https://dev.to/ternera/hacker101-ctf-micro-cms-v1-11fe</link>
      <guid>https://dev.to/ternera/hacker101-ctf-micro-cms-v1-11fe</guid>
      <description>&lt;p&gt;Upon launching this challenge in the CTF, we are met with three links, labeled: Testing, Markdown Test, and Create a new page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sIseEzEJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2ARlwQNGGgZl4ELTaWIbzUFg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sIseEzEJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2ARlwQNGGgZl4ELTaWIbzUFg.png" alt="Image 1" width="720" height="147"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first hint suggests to try creating a new page. The new page creation page says that &lt;a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet"&gt;Markdown&lt;/a&gt; is supported, but scripts are not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--71RYk1ek--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AdwLIdQIU7jYQFDx2lE4j0g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--71RYk1ek--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AdwLIdQIU7jYQFDx2lE4j0g.png" alt="Image 1" width="720" height="338"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating a new page, I noticed something interesting. It was assigned the number 12. I wondered if I could modify the URL and possibly find some information in pages with other numbers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QcL1ZNVL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2Af1kLgtJaKGKKb0gBNofXMQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QcL1ZNVL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2Af1kLgtJaKGKKb0gBNofXMQ.png" alt="Image 1" width="720" height="189"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Page 7 returned a Forbidden error. That’s interesting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fUP9ETm3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AD-MkAHr9-26Wp9MzHWHTtw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fUP9ETm3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AD-MkAHr9-26Wp9MzHWHTtw.png" alt="Image 1" width="720" height="141"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It looked like the only pages I could access were 1, 2, and 12. 1 and 2 had already been created and 12 was the page that I created. After taking a closer look at the existing pages, I noticed there was an edit button on these pages. I opened the editing page for page 2.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3SSDJ9Pn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2A8JOfarDKJMHr3Wv3Q1HRTw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3SSDJ9Pn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2A8JOfarDKJMHr3Wv3Q1HRTw.png" alt="Image 1" width="720" height="328"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similar to the “A little something to get you started” challenge, I found that you could change the page number to edit the protected page 7.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EhaqdiXc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AirYtwuF4jsCWqO41Flz3zw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EhaqdiXc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AirYtwuF4jsCWqO41Flz3zw.png" alt="Image 1" width="720" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This revealed the first flag from this challenge. For the second flag, the only hint given said to tamper with every input. After playing with the text box, I directed my attention back to the URL. Originally, I tried appending ‘1=1 to the URL, but found that simply adding one ‘ at the end of the URL would reveal the second flag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Cei7lbx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AVQlexFPuqGsBz9WlqDwLIw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Cei7lbx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AVQlexFPuqGsBz9WlqDwLIw.png" alt="Image 1" width="720" height="75"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next flag was found before some others, but I am putting it here to keep things in order. I wanted to try some &lt;a href="https://github.com/cujanovic/Markdown-XSS-Payloads/blob/master/Markdown-XSS-Payloads.txt"&gt;Markdown XSS&lt;/a&gt; because I noticed that the message “&lt;a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet"&gt;Markdown&lt;/a&gt; is supported, but scripts are not” was shown when creating a new page. Unfortunately, I looked over something important here. The body of the text area says it doesn’t support scripts, but the title does not mention anything about it. I found this out accidentally after using the following from the &lt;a href="https://github.com/cujanovic/Markdown-XSS-Payloads/blob/master/Markdown-XSS-Payloads.txt"&gt;Markdown XSS&lt;/a&gt; repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;javascript:prompt(document.cookie)&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HasyvzWr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2ANH2h4EGvvawr8rKbusG9BQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HasyvzWr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2ANH2h4EGvvawr8rKbusG9BQ.png" alt="Image 1" width="648" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After saving, this is what I saw on the page:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FkIGGQUE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2A0vc24PUNuDr2r5ZwdJJxAg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FkIGGQUE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2A0vc24PUNuDr2r5ZwdJJxAg.png" alt="Image 1" width="720" height="199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clicking the “Go Home” link returned a popup with the flag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--itLzY5Tj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AAwn9MhEbAntq6LT9dGAZFQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--itLzY5Tj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AAwn9MhEbAntq6LT9dGAZFQ.png" alt="Image 1" width="720" height="161"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The hint for the final flag says that “Scripts are great, but what other options do you have?” This made me circle back around to my original thought of using some markdown XSS. This didn’t get me anywhere, so I did a quick Google search for “how to add xss to other tags” to see if I could find any articles that would shed some light on the matter. I found this &lt;a href="https://security.stackexchange.com/a/24910"&gt;helpful post&lt;/a&gt; on Stack Overflow that shows how to modify a div tag to execute a script. I copied and pasted their div tag into the body of the text box.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div onmouseover="alert(1)" style="position:fixed;left:0;top:0;width:9999px;height:9999px;"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KC9zvmac--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AKly-1HAfVWPBsw3pRybkKQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KC9zvmac--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AKly-1HAfVWPBsw3pRybkKQ.png" alt="Image 1" width="720" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Immediately after creating the page, I was met with a popup with a value of 1.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BCVrIn_t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AIxqY2nrKzLhcK4kV2biTPw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BCVrIn_t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AIxqY2nrKzLhcK4kV2biTPw.png" alt="Image 1" width="720" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I didn’t find the flag on the homepage like the previous flag, but instead it was hidden in the source code of the page I created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LJFZQiom--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AnLc_plyFrACwoPz4AaiMKQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LJFZQiom--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://miro.medium.com/v2/resize:fit:720/format:webp/1%2AnLc_plyFrACwoPz4AaiMKQ.png" alt="Image 1" width="720" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That wraps up this CTF challenge, see you in the next one!&lt;/p&gt;

</description>
      <category>hackerone</category>
      <category>hacker101</category>
      <category>ctf</category>
      <category>writeup</category>
    </item>
    <item>
      <title>Hacker101 CTF — A little something to get you started</title>
      <dc:creator>ternera</dc:creator>
      <pubDate>Sat, 13 Jan 2024 21:37:26 +0000</pubDate>
      <link>https://dev.to/ternera/hacker101-ctf-a-little-something-to-get-you-started-207e</link>
      <guid>https://dev.to/ternera/hacker101-ctf-a-little-something-to-get-you-started-207e</guid>
      <description>&lt;p&gt;Welcome to my writeup series about the Hacker101 CTF by Hackerone! This challenge is called “A little something to get you started” and it is in the trivial category.&lt;/p&gt;

&lt;p&gt;Upon launching this challenge, we are met with the text “Welcome to level 0. Enjoy your stay.”&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%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A4800%2Fformat%3Awebp%2F1%2AYFPnNl41MyRx53if153thw.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%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A4800%2Fformat%3Awebp%2F1%2AYFPnNl41MyRx53if153thw.png" alt="Image 1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Checking the page source reveals some CSS that uses a background image called background.png.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;style&amp;gt; body { background-image: url(“background.png”); } &amp;lt;/style&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;We can manually append /background.png to the URL, which reveals 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%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A4800%2Fformat%3Awebp%2F1%2Aj78sG9rMVnVWdeR7pG4-0Q.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%2Fmiro.medium.com%2Fv2%2Fresize%3Afit%3A4800%2Fformat%3Awebp%2F1%2Aj78sG9rMVnVWdeR7pG4-0Q.png" alt="Image 2"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hackerone</category>
      <category>hacker101</category>
      <category>ctf</category>
      <category>writeup</category>
    </item>
  </channel>
</rss>
