<?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: oshrat</title>
    <description>The latest articles on DEV Community by oshrat (@oshrat).</description>
    <link>https://dev.to/oshrat</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%2F611162%2F9b630bda-10d4-4950-9fda-37b9b2d70a97.png</url>
      <title>DEV Community: oshrat</title>
      <link>https://dev.to/oshrat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oshrat"/>
    <language>en</language>
    <item>
      <title>Fun With Flags!</title>
      <dc:creator>oshrat</dc:creator>
      <pubDate>Mon, 09 Aug 2021 18:47:36 +0000</pubDate>
      <link>https://dev.to/oshrat/fun-with-flags-28e8</link>
      <guid>https://dev.to/oshrat/fun-with-flags-28e8</guid>
      <description>&lt;p&gt;Welcome!&lt;br&gt;
This blog is all about CTFs!&lt;br&gt;
CTF stands for Capture The Flag, a game in which your goal is to find an actual flag (in the original physical game), or a virtual flag - which can be a string, gaining access etc.&lt;br&gt;
There are many types of CTF challenges: Web, Low Level, Reverse Engineering, network and so on.&lt;br&gt;
In this blog I am going to present several types of CTF challenges, and even how to solve them!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why?&lt;/strong&gt;&lt;br&gt;
CTFs are a GREAT way to learn! &lt;br&gt;
It combines many knowledge fields and skills, it's a game, a puzzle, a time consumer, a head breaker - but most of all IT IS FUN!&lt;br&gt;
If you are not convinced yet, I highly recommend reading &lt;a href="https://blog.usejournal.com/why-you-should-start-doing-ctfs-1c5e88eacabc"&gt;this great(!) post&lt;/a&gt; by the excellent Oryan De Paz.&lt;br&gt;
If you do - read it anyway ;)&lt;/p&gt;

&lt;p&gt;The first posts will deal with Web challenges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web Challenges Foundations&lt;/strong&gt;&lt;br&gt;
There are 5 stages in web hacking:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reconnaissance&lt;/li&gt;
&lt;li&gt;Scanning and Enumeration&lt;/li&gt;
&lt;li&gt;Gaining Access&lt;/li&gt;
&lt;li&gt;Maintaining Access&lt;/li&gt;
&lt;li&gt;Covering and Clearing Tracks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this blog we are not going to talk about stages 4+5, simply because in CTFs, they are usually irrelevant.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recon - Part 1&lt;/strong&gt;&lt;br&gt;
Today we are going to talk about Reconnaissance (Recon).&lt;br&gt;
Recon is the phase of gathering all the information you can find: footprints, web pages, parameters, site mapping and really anything- you don't know what will end up helping you.&lt;/p&gt;

&lt;p&gt;So, how do I get that info?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Know your HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Browser's Developer Tools:
&lt;/h5&gt;

&lt;p&gt;Say hello to "inspect". This tool allows you to take a closer look at an element on the web page without the need to search for it.&lt;br&gt;
Access it by clicking F12 or Ctrl+Shift+I or by selecting "Inspect" in the right-click menu:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--55qCeCzQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tm53kybwccnp1kqwma8s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--55qCeCzQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tm53kybwccnp1kqwma8s.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gCVSJExf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8h16jx83i9kvv1asl1rz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gCVSJExf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8h16jx83i9kvv1asl1rz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the arrow on the top-left corner (it turns blue if selected). &lt;/li&gt;
&lt;li&gt;Choose an element from the web page you would like to inspect&lt;/li&gt;
&lt;li&gt;Take a look at the client code you've got!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note that you are in a tab called "Elements" (green).&lt;br&gt;
There are more useful tabs - but most of them will have to wait till some other time.&lt;/p&gt;

&lt;p&gt;The next tab we'll review is "Sources":&lt;br&gt;
Here you'll find all the files needed to display the web page.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6gU8X1QH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vc4w6yrc2t702kxo8fik.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6gU8X1QH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vc4w6yrc2t702kxo8fik.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Believe it or not (I'm walking on air) - now you know enough to practice!&lt;/p&gt;

&lt;p&gt;Try these challenges before you continue reading:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;natas levels 1, 2:
&lt;a href="https://overthewire.org/wargames/natas/natas0.html"&gt;https://overthewire.org/wargames/natas/natas0.html&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;hackthissite*, basic missions, 1:
&lt;a href="https://www.hackthissite.org/missions/basic/1/"&gt;https://www.hackthissite.org/missions/basic/1/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;hacker101*, A little something to get you started:
&lt;a href="http://35.190.155.168/0611fabbc9/"&gt;http://35.190.155.168/0611fabbc9/&lt;/a&gt;
*you have to sign up for these ones, but it is totally worth it!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thanks for coming back- let's keep on learning!&lt;/p&gt;

&lt;p&gt;So, "inspect element" is an essential tool and you will probably  use it &lt;strong&gt;all the time&lt;/strong&gt;,&lt;br&gt;
but sometimes there is a lot of spam and distractions and it's more disturbing than helpful..&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QYH25CF9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y3qpe5446wpb4w01w9km.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QYH25CF9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y3qpe5446wpb4w01w9km.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At times like these, consider seeing the big picture - namely, the source code for the whole page - by checking the "View page source" (right-click menu/Ctrl+U).&lt;/p&gt;

&lt;p&gt;Another trick that might help you get the orientation you'll need:&lt;br&gt;
Sometimes there is an interesting data you don't see because it marked as "hidden":&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jkxzfQkx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ytgnfp6h1w99as5k2mt8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jkxzfQkx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ytgnfp6h1w99as5k2mt8.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
(Not necessarily "input" data, it can be any type).&lt;br&gt;
So first, you can use the search option (Ctrl+F) to find all the hidden stuff, and then you can delete it and the hidden info will appear!&lt;br&gt;
Don't be afraid to delete anything from the HTML code, it's all reversible and you can simply restore it by reloading the web page (F5).&lt;/p&gt;

&lt;p&gt;Moving on!&lt;/p&gt;

&lt;h5&gt;
  
  
  URL = U Really (should) Look in there!
&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Dirlist: if you find a new webpage/picture, check the path in the URL, sometimes you'll see a new path (domain, directories, an hierarchy) that can help you get some understanding about the website structure, or even better:&lt;br&gt;
GET ACCESS TO SOME SENSITIVE INFO!&lt;br&gt;
For example:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;File names and extensions:&lt;br&gt;
By looking at a file name, we can get a better understanding of the site mapping (we'll talk about mapping in a separate post).&lt;br&gt;
If the dirlist is protected, we can try to get to new web pages by guessing their names.&lt;br&gt;
For example: if there's a webpage called "index3.php" maybe there's a webpage called "index2.php".&lt;br&gt;
Needless to say: if you encounter a new file- try access it!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Notice the file's extension is also important - we'll discuss this when we'll review web attacks.&lt;/p&gt;

&lt;p&gt;A little more practice:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;hackthissite*, basic missions, 2, 3, 4:
&lt;a href="https://www.hackthissite.org/missions/basic/"&gt;https://www.hackthissite.org/missions/basic/&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To sum up, when dealing with web challenges, the first step is gather all the information you can. &lt;br&gt;
Today we saw a few ways to do that: Inspect, Sources, file names, and extensions.&lt;/p&gt;

&lt;p&gt;Sorry for your new addiction and good luck ;)&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>security</category>
      <category>cybersecurity</category>
      <category>ctf</category>
    </item>
  </channel>
</rss>
