<?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: Gaurav Raj</title>
    <description>The latest articles on DEV Community by Gaurav Raj (@thehackersbrain).</description>
    <link>https://dev.to/thehackersbrain</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%2F843789%2Ff82ca679-841e-4c75-9e31-7bf2249e56dc.png</url>
      <title>DEV Community: Gaurav Raj</title>
      <link>https://dev.to/thehackersbrain</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/thehackersbrain"/>
    <language>en</language>
    <item>
      <title>Create a Hacking Lab on Cloud using Docker for free</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Wed, 02 Apr 2025 00:00:00 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/create-a-hacking-lab-on-cloud-using-docker-for-free-1egk</link>
      <guid>https://dev.to/thehackersbrain/create-a-hacking-lab-on-cloud-using-docker-for-free-1egk</guid>
      <description>&lt;p&gt;Learn how to create a free hacking lab on the cloud using Docker and Kali Linux. This guide covers setting up a secure, free environment for pentest and cybersecurity experiments.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create an Image Steganography Program in Python</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Fri, 28 Mar 2025 00:00:00 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/create-an-image-steganography-program-in-python-389k</link>
      <guid>https://dev.to/thehackersbrain/create-an-image-steganography-program-in-python-389k</guid>
      <description>&lt;p&gt;Discover how to create an image steganography tool in Python. Learn to securely hide and extract data within PNG images using PIL and cryptography modules.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Unveiling the Dangers of Insecure Deserialization!</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Tue, 25 Mar 2025 00:00:00 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/unveiling-the-dangers-of-insecure-deserialization-3399</link>
      <guid>https://dev.to/thehackersbrain/unveiling-the-dangers-of-insecure-deserialization-3399</guid>
      <description>&lt;p&gt;Insecure deserialization in web apps is a critical vuln that allows attackers to exploit serialized objects for code execution.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Comprehensive Guide to Finding and Exploiting SSRF Vulnerabilities</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Thu, 11 Jul 2024 00:00:00 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/comprehensive-guide-to-finding-and-exploiting-ssrf-vulnerabilities-4od3</link>
      <guid>https://dev.to/thehackersbrain/comprehensive-guide-to-finding-and-exploiting-ssrf-vulnerabilities-4od3</guid>
      <description>&lt;p&gt;Explore an in-depth guide on finding and exploiting Server-Side Request Forgery (SSRF) vulnerabilities.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Navigating the Cloud - The Crucial Role of Security Researchers in Understanding Development and Deployment Process (Cloud...</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Wed, 01 May 2024 00:00:00 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/navigating-the-cloud-the-crucial-role-of-security-researchers-in-understanding-development-and-1ip2</link>
      <guid>https://dev.to/thehackersbrain/navigating-the-cloud-the-crucial-role-of-security-researchers-in-understanding-development-and-1ip2</guid>
      <description>&lt;p&gt;Explore the critical role of security researchers in understanding development and deployment processes within cloud environments. Dive into real-world scenarios, expert insights, and how Cybercraft Labs Pvt Ltd. empowers researchers for cybersecurity excellence. Read now!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Importance of Secure Coding Practices - Cybercraft Labs</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Wed, 27 Mar 2024 00:00:00 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/the-importance-of-secure-coding-practices-cybercraft-labs-558j</link>
      <guid>https://dev.to/thehackersbrain/the-importance-of-secure-coding-practices-cybercraft-labs-558j</guid>
      <description>&lt;p&gt;Secure coding is the practice of writing code that is designed to be secure from the outset. It involves following a set of best practices and guidelines that are designed to prevent common security vulnerabilities from being introduced into your code.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Difference between The Surface Web, Deep web and The Dark Web</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Thu, 01 Sep 2022 17:31:00 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/difference-between-the-surface-web-deep-web-and-the-dark-web-4hn9</link>
      <guid>https://dev.to/thehackersbrain/difference-between-the-surface-web-deep-web-and-the-dark-web-4hn9</guid>
      <description>&lt;h1&gt;
  
  
  Internet and The Web
&lt;/h1&gt;

&lt;p&gt;The Internet is very vast and what we use on a daily basis, is just a chunk of it. The Internet is much more than that but first, we are going to take a quick look at what is the difference between the &lt;strong&gt;Internet&lt;/strong&gt; and the &lt;strong&gt;Web&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Internet&lt;/strong&gt;: The Internet is a collection of various smaller networks where each node can be a server, a laptop, a pc, a smartphone e.tc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web&lt;/strong&gt;: In the earlier days of the Internet, data was used to transfer across the Internet or the network but no Web existed at that time, but in 1989, &lt;em&gt;Tim Berners-Lee&lt;/em&gt; introduced a web called &lt;em&gt;World Wide Web&lt;/em&gt; (&lt;em&gt;WWW&lt;/em&gt;) which can be used to access hyperlinked text or web pages all across the Internet. So basically, the &lt;em&gt;Web&lt;/em&gt; is a piece of software that allows us to access hyperlinked text or web pages over the Internet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Parts of the Web
&lt;/h2&gt;

&lt;p&gt;But the web doesn't only include sites like Facebook, Instagram, Google, etc. The websites or the part of the web which we are easily able to surf is just 4-6% of the whole composition of the web. There are parts of the web. Which are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Surface Web&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deep Web&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dark Web&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fweb-composition.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fweb-composition.png" alt="composition of the world wide web" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Surface Web
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Surface Web&lt;/strong&gt; (also called the &lt;strong&gt;Visible Web&lt;/strong&gt;, &lt;strong&gt;Indexed Web&lt;/strong&gt;, &lt;strong&gt;Indexable Web&lt;/strong&gt; or &lt;strong&gt;Lightnet&lt;/strong&gt;) is the portion of the &lt;em&gt;World Wide Web&lt;/em&gt; that is readily available to the general public and searchable with standard web search engines. It is the opposite of the &lt;em&gt;deep web&lt;/em&gt;, the part of the web indexed by &lt;em&gt;web search engines&lt;/em&gt;. It is the part of the web which we can access directly via the browser, like Google, Instagram, Facebook, and many of the other sites which you may visit. As we can see from the image above the &lt;em&gt;Surface Web&lt;/em&gt; only consists of 4-6% of the Information available on the Internet. However, the composition is not fixed to 4 or 6%, It varies from time to time. The Surface Web is made with a collection of public Web pages on a server accessible by any search engine. Basically, It is the part of the Internet that we can access normally using any web browser, like Facebook, Instagram, Twitter, and any of our favorite sites.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deep Web
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Deep Web&lt;/strong&gt;, &lt;strong&gt;invisible web&lt;/strong&gt;, or &lt;strong&gt;hidden web&lt;/strong&gt; are the parts of the &lt;em&gt;Web&lt;/em&gt; that are not indexed by any search engines. The contents of the &lt;em&gt;deep web&lt;/em&gt; are hidden behind login forms, and includes uses such as webmail, online banking, restricted access social-media pages and profiles, some web forums and code language that require registration and authorization for viewing contents, and paywalled services such as video on demand and some online magazines and newspapers. On the &lt;em&gt;deep web&lt;/em&gt; we can find an awesome list of books and other types of resources for everything ranging from education to entertainment and useful to harmful. &lt;/p&gt;

&lt;p&gt;So, as we know that the contents of the &lt;em&gt;deep web&lt;/em&gt; are not indexed by any search engines, then how can we access such contents, if we are not able to find it on any search engines?&lt;/p&gt;

&lt;p&gt;The Contents of the &lt;em&gt;deep web&lt;/em&gt; can be located and accessed by a direct URL or the IP address but may require a password or any kind of authorization or authentication or other security access to get past public pages.&lt;/p&gt;

&lt;h4&gt;
  
  
  Indexing
&lt;/h4&gt;

&lt;p&gt;Methods that prevent web pages from being indexed by traditional search engines may be categorized as one or more of the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Contextual web&lt;/strong&gt;: pages with content varying for different access contexts (e.g., ranges of client IP addresses or previous navigation sequence).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Content&lt;/strong&gt;: dynamic pages which are generated by any scripting (i.e. generated by PHP or JS)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Limited Access Content&lt;/strong&gt;: Pages that use authentication or authorization to verify if a user is allowed to access the specific page or not (i.e banking applications, applications with paid subscriptions, web mails, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-HTML / Text Content&lt;/strong&gt;: textual content encoded in multimedia (i.e images or videos) files or specific file formats that are not handled by the search engines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private Web&lt;/strong&gt;: Sites or applications that require registration or login (password-protected contents) i.e. pages of social media sites like Facebook, and Instagram, Pages of Banking applications, admin panel of applications&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scripted Content&lt;/strong&gt;: pages that are only accessible through links produced by JavaScript as well as contents dynamically downloaded from Web Servers via Flash or Ajax solutions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Software&lt;/strong&gt;: certain content is intentionally hidden from the regular Internet, accessible only with special software, Tor, I2P, Tails, or other darknet software. For example, Tor allows users to access websites using the &lt;em&gt;.onion&lt;/em&gt; server address anonymously, hiding their real IP address.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unlinked Content&lt;/strong&gt;: pages that are not linked by other pages, which may prevent web crawling programs from accessing the contents. This content is referred to as pages without backlinks (also known as inlinks). Also, search engines do not always detect all the backlinks of the search or indexed web pages.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web Archives&lt;/strong&gt;: Web archival services such as &lt;em&gt;Wayback Machine&lt;/em&gt; enables the user to access the archived version of the web across time, including websites that are no longer accessible and are not indexed by search engines like Google.
&amp;gt; The &lt;em&gt;Wayback Machine&lt;/em&gt; may be called a program for viewing the &lt;em&gt;deep web&lt;/em&gt;, as the web archives that are not from the present cannot be indexed by search engines, as past versions of websites are impossible to view through a search. All websites are updated at some point, which is why &lt;em&gt;web archives&lt;/em&gt; are considered as &lt;em&gt;Deep Web&lt;/em&gt; Content.
{: .prompt-info }&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, most of the people wonders that, Is The &lt;em&gt;Deep Web&lt;/em&gt; illegal to surf or visit?&lt;/p&gt;

&lt;p&gt;So answering that question, the answer is No, It's not. Surfing or visiting the &lt;em&gt;Deep Web&lt;/em&gt; or even the &lt;em&gt;Dark Web&lt;/em&gt; is not illegal in most of the places. It depends on the place from where you are accessing it. As we know China has banned the most famous sites from the &lt;em&gt;surface web&lt;/em&gt; like Google, Facebook, YouTube, etc. So, for the people living in China or let's say Koria, Yes, It's illegal, even surfing on the &lt;em&gt;surface web&lt;/em&gt; sites mentioned above. So it depends but for most the places, It is not illegal to surf or visit the &lt;em&gt;deep web&lt;/em&gt;. Unless you do something illegal on that. I mean if you are surfing the &lt;em&gt;deep web&lt;/em&gt; or the &lt;em&gt;dark web&lt;/em&gt; out of curiosity or for educational purposes. It's perfectly fine but, If you're trying to do anything bad or things that are prohibited to do on the Internet. yes, it will be illegal then. So it totally depends on you.&lt;/p&gt;

&lt;p&gt;Enough talking about the &lt;em&gt;deep web&lt;/em&gt;, now let's explore what the &lt;em&gt;dark web&lt;/em&gt; is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dark Web
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Dark Web&lt;/strong&gt; is the &lt;em&gt;World Wide Web&lt;/em&gt; content that exists on &lt;em&gt;darknets&lt;/em&gt;: overlay networks that use the Internet but requires specific software, configurations, or authorization to access. Through the &lt;em&gt;dark web&lt;/em&gt; private computer networks can communicate and conduct business anonymously without disclosing identifying information, such as the user's location. The &lt;em&gt;dark web&lt;/em&gt; forms a small part of the &lt;em&gt;deep web&lt;/em&gt;, The part of the web which is not indexed by any search engines, although sometimes the term &lt;em&gt;deep web&lt;/em&gt; is mistakenly used to refer specifically to the term &lt;em&gt;dark web&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;darknet&lt;/em&gt; which constitutes the &lt;em&gt;dark web&lt;/em&gt; includes small, &lt;em&gt;friend-to-friend peer-to-peer&lt;/em&gt; networks, as well as large, popular networks such as &lt;em&gt;Tor, FreeNet, I2P&lt;/em&gt; and &lt;em&gt;Riffle&lt;/em&gt; operated by public organizations and individuals. Users of the &lt;em&gt;dark web&lt;/em&gt; refer to the regular web (&lt;em&gt;surface web&lt;/em&gt; websites) as &lt;em&gt;Clearnet&lt;/em&gt; due to its unencrypted nature. The Tor &lt;em&gt;dark web&lt;/em&gt; or &lt;em&gt;onionland&lt;/em&gt; or &lt;em&gt;darknet&lt;/em&gt; uses the traffic anonymization technique of onion routing under the network's &lt;em&gt;top-level&lt;/em&gt; domain with the suffix &lt;em&gt;.onion&lt;/em&gt; or In other words, the &lt;strong&gt;URL&lt;/strong&gt; or the &lt;strong&gt;Domain&lt;/strong&gt; of the &lt;em&gt;dark web&lt;/em&gt; websites uses &lt;em&gt;.onion&lt;/em&gt; as suffix instead of &lt;em&gt;.com&lt;/em&gt;, &lt;em&gt;.org&lt;/em&gt;, &lt;em&gt;.in&lt;/em&gt;, &lt;em&gt;.xyz&lt;/em&gt; suffix used in &lt;em&gt;surface web&lt;/em&gt; or &lt;em&gt;Clearnet&lt;/em&gt; websites.&lt;/p&gt;

&lt;h4&gt;
  
  
  More on Dark Web
&lt;/h4&gt;

&lt;p&gt;The &lt;em&gt;dark web&lt;/em&gt; is often confused with the term &lt;em&gt;deep web&lt;/em&gt;, the parts of the web which are not indexed by the search engines. The &lt;em&gt;dark web&lt;/em&gt; is a small part of the &lt;em&gt;deep web&lt;/em&gt;, both the &lt;em&gt;deep web&lt;/em&gt; nor the &lt;em&gt;dark web&lt;/em&gt; is not indexed by any search engines but we can surf or visit the &lt;em&gt;deep web&lt;/em&gt; with normal browsers, and maybe in some cases if the websites we are trying to surf is banned in your area, you may need to use any &lt;strong&gt;VPN&lt;/strong&gt; (Virtual Private Network) or any proxy in order to access them, but in the case of &lt;em&gt;dark web&lt;/em&gt;, it requires specific software, configuration or authorization to access it. The term &lt;em&gt;dark web&lt;/em&gt; is first emerged in 2009, however, It is unknown when it &lt;em&gt;dark web&lt;/em&gt; first emerged. Don't get confused here, the term &lt;em&gt;dark web&lt;/em&gt; was emerged in 2009. but no one knows from when the &lt;em&gt;dark web&lt;/em&gt; is existing. The confusion of the terms &lt;em&gt;deep web&lt;/em&gt; and the &lt;em&gt;dark web&lt;/em&gt; dates back to at least 2009. Since then, especially in reporting on &lt;strong&gt;Silk Road&lt;/strong&gt; (Silk Road was an online black market, and the first modern &lt;em&gt;darknet&lt;/em&gt; market.), these two terms were conflated (combined) despite the recommendations that they should be distinguished.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;dark web&lt;/em&gt; also known as the &lt;em&gt;darknet&lt;/em&gt; websites, are accessible only through networks such as &lt;strong&gt;Tor&lt;/strong&gt; ('The Onion Routing' project) that are specially created for the &lt;em&gt;dark web&lt;/em&gt;. &lt;em&gt;Tor-accessible&lt;/em&gt; are widely used among the &lt;em&gt;darknet&lt;/em&gt; users and can be identified by the domain "&lt;em&gt;.onion&lt;/em&gt;"&lt;/p&gt;

&lt;p&gt;For those who are wondering what is available on the &lt;em&gt;dark web&lt;/em&gt;, what are its contents?&lt;/p&gt;

&lt;h5&gt;
  
  
  Contents of the Dark Web
&lt;/h5&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ransomware&lt;/strong&gt;: The &lt;em&gt;dark web&lt;/em&gt; is also used in certain extortion-related processes. Indeed, It is common to observe data from ransomware attacks on several &lt;em&gt;dark web&lt;/em&gt; sites (i.e data sales sites, public repository sites)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Botnets&lt;/strong&gt;: Botnets are often structured with their &lt;em&gt;command-and-control&lt;/em&gt; or &lt;em&gt;C2&lt;/em&gt; servers based on censorship-resistant hidden service, creating a large amount of bot-related traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Darknet Markets&lt;/strong&gt;: &lt;em&gt;Darknet&lt;/em&gt; markets where you can buy illegal items such as &lt;em&gt;Arms&lt;/em&gt;, Ammos, &lt;em&gt;Grenades&lt;/em&gt;, even &lt;em&gt;Rocket Launchers&lt;/em&gt;, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bitcoin Services&lt;/strong&gt;: Bitcoin Services like buying them at cheap prices or selling them etc. &lt;em&gt;dark web&lt;/em&gt; heavily utilizes bitcoin as their main currency as bitcoin transactions are not stored anywhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hacking Groups and Services&lt;/strong&gt;: Hacking services like, hiring hackers for doing any illegal tasks, also you can meet many hackers there but may or may not be good or bad.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Financing and Fraud&lt;/strong&gt;: You can buy Credit cards, Currencies and can also get scammed as there are many fraudsters are grooming around the &lt;em&gt;dark web&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Illegal Pornography&lt;/strong&gt;: You can find illegal pornography content such as leaked videos or child pornography content, also you can buy them on the &lt;em&gt;darknet&lt;/em&gt; markets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Social Media&lt;/strong&gt;: There are also social media available on the &lt;em&gt;dark web&lt;/em&gt;. and also Facebook has its own version of &lt;em&gt;dark web&lt;/em&gt; social media if I'm not mistaken.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hoaxes and Unverified Contents&lt;/strong&gt;: As it is anonymous, people can post whatever they want without taking the risk of any type of action against them, so there are videos of people murdering anyone, and torturing someone. basically, all types of uncensored content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lots of Information&lt;/strong&gt;: Despite the fact that there are bad things on the &lt;em&gt;dark web&lt;/em&gt; there are also some good things like you can find information about literally anything you can think of. From educational to destructional, like you can find even books about how to mark bombs and such things.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now one question still arrives, &lt;strong&gt;Is it illegal to surf or visit the &lt;em&gt;dark web&lt;/em&gt;?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As answered previously, No, It's not, it depends on what you do. Let's take an example you have a knife, you can use it to cut vegetables, use it in the kitchen, and other kinds of stuff but as you have the knife in your hand, you can also use it to hurt someone or murder someone. So let's assume the &lt;em&gt;dark web&lt;/em&gt; or &lt;em&gt;deep web&lt;/em&gt; is the knife, you can either use it for your own gain, for informational or educational purposes or you can use it to do some really bad or illegal stuffs. &lt;/p&gt;

&lt;p&gt;So, the thing is the knife (in our case, the &lt;em&gt;dark web&lt;/em&gt; or the &lt;em&gt;deep web&lt;/em&gt;) is not illegal but rather the actions you take with it are legal or illegal.&lt;/p&gt;

&lt;p&gt;Another question, &lt;strong&gt;Is it safe to surf the &lt;em&gt;dark web&lt;/em&gt; or &lt;em&gt;deep web&lt;/em&gt;?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This question does not have any straight answer, I mean, It is and at the same time It's not. Like there are lots of scammers, black-hat hackers, and fraudsters are grooming around them. So, again it's your actions that will make you safe and unsafe. like talking in that sense, The &lt;em&gt;surface web&lt;/em&gt; or &lt;em&gt;Clearnet&lt;/em&gt; is also not safe, like there are so many scammers, hackers and fraudsters are on the &lt;em&gt;surface web&lt;/em&gt;. as the majority of the Internet users are on the &lt;em&gt;surface web&lt;/em&gt;, so the hackers, scammers, and other bad threat actors are more active on &lt;em&gt;surface web&lt;/em&gt;. So, again it's your consciousness and actions, which makes you safe and unsafe.&lt;/p&gt;

</description>
      <category>tech</category>
      <category>security</category>
      <category>web</category>
      <category>internet</category>
    </item>
    <item>
      <title>Oh My WebServer TryHackMe Machine Writeup and Walkthrough</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Thu, 07 Apr 2022 18:20:40 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/oh-my-webserver-tryhackme-machine-writeup-and-walkthrough-d0a</link>
      <guid>https://dev.to/thehackersbrain/oh-my-webserver-tryhackme-machine-writeup-and-walkthrough-d0a</guid>
      <description>&lt;h2&gt;
  
  
  Original Blog Post
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.gauravraj.xyz/posts/biteme-tryhackme-detailed-writeup-and-walkthrough/" rel="noopener noreferrer"&gt;Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Target Machine
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Oh My WebServer&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Target IP
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;IP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;10.10.237.191
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Enumeration
&lt;/h2&gt;

&lt;p&gt;First of all let's get started by a &lt;strong&gt;Nmap&lt;/strong&gt; Scan.&lt;/p&gt;

&lt;h3&gt;
  
  
  Nmap
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Nmap 7.92 scan initiated Sat Mar 12 23:33:44 2022 as: nmap -sC -sV -A -v -oA nmap/initial 10.10.237.191&lt;/span&gt;
Nmap scan report &lt;span class="k"&gt;for &lt;/span&gt;10.10.237.191
Host is up &lt;span class="o"&gt;(&lt;/span&gt;0.40s latency&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
Not shown: 998 filtered tcp ports &lt;span class="o"&gt;(&lt;/span&gt;no-response&lt;span class="o"&gt;)&lt;/span&gt;
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.3 &lt;span class="o"&gt;(&lt;/span&gt;Ubuntu Linux&lt;span class="p"&gt;;&lt;/span&gt; protocol 2.0&lt;span class="o"&gt;)&lt;/span&gt;
| ssh-hostkey:
|   3072 e0:d1:88:76:2a:93:79:d3:91:04:6d:25:16:0e:56:d4 &lt;span class="o"&gt;(&lt;/span&gt;RSA&lt;span class="o"&gt;)&lt;/span&gt;
|   256 91:18:5c:2c:5e:f8:99:3c:9a:1f:04:24:30:0e:aa:9b &lt;span class="o"&gt;(&lt;/span&gt;ECDSA&lt;span class="o"&gt;)&lt;/span&gt;
|_  256 d1:63:2a:36:dd:94:cf:3c:57:3e:8a:e8:85:00:ca:f6 &lt;span class="o"&gt;(&lt;/span&gt;ED25519&lt;span class="o"&gt;)&lt;/span&gt;
80/tcp open  http    Apache httpd 2.4.49 &lt;span class="o"&gt;((&lt;/span&gt;Unix&lt;span class="o"&gt;))&lt;/span&gt;
| http-methods:
|   Supported Methods: HEAD GET POST OPTIONS TRACE
|_  Potentially risky methods: TRACE
|_http-title: Consult - Business Consultancy Agency Template | Home
|_http-favicon: Unknown favicon MD5: 02FD5D10B62C7BC5AD03F8B0F105323C
|_http-server-header: Apache/2.4.49 &lt;span class="o"&gt;(&lt;/span&gt;Unix&lt;span class="o"&gt;)&lt;/span&gt;
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Aggressive OS guesses: Crestron XPanel control system &lt;span class="o"&gt;(&lt;/span&gt;90%&lt;span class="o"&gt;)&lt;/span&gt;, ASUS RT-N56U WAP &lt;span class="o"&gt;(&lt;/span&gt;Linux 3.4&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;87%&lt;span class="o"&gt;)&lt;/span&gt;, Linux 3.1 &lt;span class="o"&gt;(&lt;/span&gt;87%&lt;span class="o"&gt;)&lt;/span&gt;, Linux 3.16 &lt;span class="o"&gt;(&lt;/span&gt;87%&lt;span class="o"&gt;)&lt;/span&gt;, Linux 3.2 &lt;span class="o"&gt;(&lt;/span&gt;87%&lt;span class="o"&gt;)&lt;/span&gt;, HP P2000 G3 NAS device &lt;span class="o"&gt;(&lt;/span&gt;87%&lt;span class="o"&gt;)&lt;/span&gt;, AXIS 210A or 211 Network Camera &lt;span class="o"&gt;(&lt;/span&gt;Linux 2.6.17&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;87%&lt;span class="o"&gt;)&lt;/span&gt;, Linux 2.6.32 &lt;span class="o"&gt;(&lt;/span&gt;86%&lt;span class="o"&gt;)&lt;/span&gt;, Linux 2.6.32 - 3.1 &lt;span class="o"&gt;(&lt;/span&gt;86%&lt;span class="o"&gt;)&lt;/span&gt;, Linux 2.6.39 - 3.2 &lt;span class="o"&gt;(&lt;/span&gt;86%&lt;span class="o"&gt;)&lt;/span&gt;
No exact OS matches &lt;span class="k"&gt;for &lt;/span&gt;host &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;test &lt;/span&gt;conditions non-ideal&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;
Uptime guess: 42.513 days &lt;span class="o"&gt;(&lt;/span&gt;since Sat Jan 29 11:15:21 2022&lt;span class="o"&gt;)&lt;/span&gt;
Network Distance: 2 hops
TCP Sequence Prediction: &lt;span class="nv"&gt;Difficulty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;265 &lt;span class="o"&gt;(&lt;/span&gt;Good luck!&lt;span class="o"&gt;)&lt;/span&gt;
IP ID Sequence Generation: All zeros
Service Info: OS: Linux&lt;span class="p"&gt;;&lt;/span&gt; CPE: cpe:/o:linux:linux_kernel
TRACEROUTE &lt;span class="o"&gt;(&lt;/span&gt;using port 80/tcp&lt;span class="o"&gt;)&lt;/span&gt;
HOP RTT       ADDRESS
1   510.90 ms 10.8.0.1
2   511.02 ms 10.10.237.191
Read data files from: /usr/bin/../share/nmap
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="c"&gt;# Nmap done at Sat Mar 12 23:34:41 2022 -- 1 IP address (1 host up) scanned in 57.44 seconds&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  HTTP Port (80)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;HTTP&lt;/strong&gt; Server is just running a simple single page application.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313131812.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313131812.png" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
After enumerating the &lt;strong&gt;HTTP&lt;/strong&gt; Server for a while, running &lt;strong&gt;gobuster&lt;/strong&gt;, &lt;strong&gt;nikto&lt;/strong&gt;, checking for other services, nothing worked.&lt;br&gt;
After that looking for Services for vulnerability finds out that the &lt;strong&gt;Apache2 2.4.49&lt;/strong&gt; is vulnerable to &lt;strong&gt;LFI &amp;amp; RCE&lt;/strong&gt; vulnerabilties with &lt;strong&gt;CVE-2021-41773&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313132233.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313132233.png" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
After studing, what was the flaw a written a custom &lt;strong&gt;exploit&lt;/strong&gt; for this specific &lt;strong&gt;CVE&lt;/strong&gt; which will give us &lt;strong&gt;RCE&lt;/strong&gt; on the server, you can find that exploit &lt;a href="https://github.com/thehackersbrain/CVE-2021-41773" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Initial Access
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Reverse Shell
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313133014.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313133014.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Running the exploit and got &lt;strong&gt;RCE&lt;/strong&gt; on the machine.&lt;/li&gt;
&lt;li&gt;Executing Reverse Shell Payload on the machine via &lt;strong&gt;RCE&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Listening for new connection via &lt;strong&gt;nc&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Got Reverse shell on the box as user &lt;strong&gt;daemon&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Looking at the &lt;strong&gt;hostname&lt;/strong&gt; of the machine, we can assume it is some kind of container, probably &lt;strong&gt;docker&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313133435.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313133435.png" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
Stablizing the unstable reverse shell to a fully stable &lt;strong&gt;tty bash shell&lt;/strong&gt; using &lt;strong&gt;python3&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313133604.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313133604.png" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
As we can see from the above image that &lt;strong&gt;.dockerenv&lt;/strong&gt; file is present in the &lt;strong&gt;/&lt;/strong&gt; filesystem. it is definitely a &lt;strong&gt;docker&lt;/strong&gt; container. So, now we have to somehow break through the container to get a shell to the main filesystem.&lt;/p&gt;
&lt;h4&gt;
  
  
  User Flag
&lt;/h4&gt;

&lt;p&gt;While enumerating the machine, found that the machine have &lt;strong&gt;/usr/bin/python3.7&lt;/strong&gt; with &lt;strong&gt;cap_setuid+ep&lt;/strong&gt; capbility.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;daemon@4a70924bafa0:/bin&lt;span class="nv"&gt;$ &lt;/span&gt;getcap &lt;span class="nt"&gt;-r&lt;/span&gt; / 2&amp;gt;/dev/null
/usr/bin/python3.7 &lt;span class="o"&gt;=&lt;/span&gt; cap_setuid+ep
daemon@4a70924bafa0:/bin&lt;span class="nv"&gt;$ &lt;/span&gt;python3.7 &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s1"&gt;'import os; os.setuid(0); os.system("/bin/sh")'&lt;/span&gt;
&lt;span class="c"&gt;# id&lt;/span&gt;
&lt;span class="nv"&gt;uid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0&lt;span class="o"&gt;(&lt;/span&gt;root&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nv"&gt;gid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1&lt;span class="o"&gt;(&lt;/span&gt;daemon&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;groups&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1&lt;span class="o"&gt;(&lt;/span&gt;daemon&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313142216.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313142216.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Checking the machine for any &lt;strong&gt;capbilities&lt;/strong&gt; that we can use&lt;/li&gt;
&lt;li&gt;Here we found that &lt;strong&gt;/usr/bin/python3.7&lt;/strong&gt; have &lt;strong&gt;cap_setuid+ep&lt;/strong&gt; capbilty.&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;/usr/bin/python3.7&lt;/strong&gt;'s &lt;strong&gt;cap_setuid+ep&lt;/strong&gt; capbility for getting root shell.&lt;/li&gt;
&lt;li&gt;Here we got shell as &lt;strong&gt;root&lt;/strong&gt; but in the &lt;strong&gt;docker&lt;/strong&gt; container.&lt;/li&gt;
&lt;li&gt;And here we got the user flag in &lt;strong&gt;/root/user.txt&lt;/strong&gt; file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now next thing we have to do is break out of the &lt;strong&gt;docker&lt;/strong&gt; container and get shell as the root user in the main filesystem.&lt;br&gt;
So after enumerating the &lt;strong&gt;docker&lt;/strong&gt; container for a while, checked the &lt;strong&gt;Network Interfaces&lt;/strong&gt; and their assigned &lt;strong&gt;IP Addresses&lt;/strong&gt;. Here&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@4a70924bafa0:/root# ifconfig
eth0: &lt;span class="nv"&gt;flags&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4163&amp;lt;UP,BROADCAST,RUNNING,MULTICAST&amp;gt;  mtu 1500
        inet 172.17.0.2  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:ac:11:00:02  txqueuelen 0  &lt;span class="o"&gt;(&lt;/span&gt;Ethernet&lt;span class="o"&gt;)&lt;/span&gt;
        RX packets 392  bytes 26852 &lt;span class="o"&gt;(&lt;/span&gt;26.2 KiB&lt;span class="o"&gt;)&lt;/span&gt;
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 292  bytes 80805 &lt;span class="o"&gt;(&lt;/span&gt;78.9 KiB&lt;span class="o"&gt;)&lt;/span&gt;
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
lo: &lt;span class="nv"&gt;flags&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;73&amp;lt;UP,LOOPBACK,RUNNING&amp;gt;  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  &lt;span class="o"&gt;(&lt;/span&gt;Local Loopback&lt;span class="o"&gt;)&lt;/span&gt;
        RX packets 0  bytes 0 &lt;span class="o"&gt;(&lt;/span&gt;0.0 B&lt;span class="o"&gt;)&lt;/span&gt;
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 &lt;span class="o"&gt;(&lt;/span&gt;0.0 B&lt;span class="o"&gt;)&lt;/span&gt;
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
root@4a70924bafa0:/root#
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here as we can see that the interface &lt;strong&gt;eth0&lt;/strong&gt; have the &lt;strong&gt;IP Address&lt;/strong&gt;: &lt;strong&gt;172.17.0.2&lt;/strong&gt;, so as we know that this is the &lt;strong&gt;docker&lt;/strong&gt; container and then the machine's or the host's IP will be &lt;strong&gt;172.17.0.1&lt;/strong&gt;. Let's verify that we are on the correct path by pinging the host.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313144458.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313144458.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Checking the Network Interfaces&lt;/li&gt;
&lt;li&gt;On the &lt;strong&gt;eth0&lt;/strong&gt; we have a &lt;strong&gt;IP&lt;/strong&gt; assigned to that.&lt;/li&gt;
&lt;li&gt;So the &lt;strong&gt;IP&lt;/strong&gt; of the container is &lt;strong&gt;172.17.0.2&lt;/strong&gt; which means the &lt;strong&gt;IP&lt;/strong&gt; of the host machine will be &lt;strong&gt;172.17.0.1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Let's check our assumption by pinging the host.&lt;/li&gt;
&lt;li&gt;As we can see &lt;strong&gt;ping&lt;/strong&gt; command is not available, so using &lt;strong&gt;curl&lt;/strong&gt; to check if our assumption is correct.&lt;/li&gt;
&lt;li&gt;And voila, we were right.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now let's scan for open ports on the host machine, for that also, we can use &lt;strong&gt;curl&lt;/strong&gt; as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;root@4a70924bafa0:/root# curl http://172.17.0.1:22
SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.3
Invalid SSH identification string.
curl: &lt;span class="o"&gt;(&lt;/span&gt;56&lt;span class="o"&gt;)&lt;/span&gt; Recv failure: Connection reset by peer
root@4a70924bafa0:/root# curl http://172.17.0.1:80 &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 57985  100 57985    0     0  18.4M      0 &lt;span class="nt"&gt;--&lt;/span&gt;:--:-- &lt;span class="nt"&gt;--&lt;/span&gt;:--:-- &lt;span class="nt"&gt;--&lt;/span&gt;:--:-- 18.4M
root@4a70924bafa0:/root# curl http://172.17.0.1:5985
curl: &lt;span class="o"&gt;(&lt;/span&gt;7&lt;span class="o"&gt;)&lt;/span&gt; Failed to connect to 172.17.0.1 port 5985: Connection refused
root@4a70924bafa0:/root# curl http://172.17.0.1:5986
curl: &lt;span class="o"&gt;(&lt;/span&gt;56&lt;span class="o"&gt;)&lt;/span&gt; Recv failure: Connection reset by peer
root@4a70924bafa0:/root#
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313161152.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313161152.png" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
So here we do have 4 ports open.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;S.No&lt;/th&gt;
&lt;th&gt;Port&lt;/th&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;SSH&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;80&lt;/td&gt;
&lt;td&gt;HTTP&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;5985&lt;/td&gt;
&lt;td&gt;WinRM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;5986&lt;/td&gt;
&lt;td&gt;Wsmans&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;After enumerating the host machine's services for a while, found that &lt;strong&gt;WinRM&lt;/strong&gt; service, commonly on ports &lt;strong&gt;5985&lt;/strong&gt;, &lt;strong&gt;5986&lt;/strong&gt; is vulnerable with the &lt;strong&gt;CVE-2021-38647&lt;/strong&gt;, exploit can be found &lt;a href="https://github.com/AlteredSecurity/CVE-2021-38647" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
This exploit is against the &lt;code&gt;OHMIGOD&lt;/code&gt; service, commonly runnnig on ports as &lt;code&gt;5986&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Let's exploit that and get a reverse shell as root.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313163922.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.gauravraj.xyz%2Fassets%2Fimages%2Fohmyweb%2FPasted%2520image%252020220313163922.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;So ran that exploit with the specified arguments and got the root flag&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So here we completed our machine, hope you all enjoyed it. Don't forget to share if you liked.&lt;/p&gt;

</description>
      <category>python</category>
      <category>docker</category>
      <category>curl</category>
      <category>setuid</category>
    </item>
    <item>
      <title>Bite Me TryHackMe Detailed Writeup and Walkthrough</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Thu, 17 Mar 2022 07:28:30 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/bite-me-tryhackme-detailed-writeup-and-walkthrough-4c9h</link>
      <guid>https://dev.to/thehackersbrain/bite-me-tryhackme-detailed-writeup-and-walkthrough-4c9h</guid>
      <description>&lt;p&gt;Information Target IP export IP=10.10.73.114 Enumeration Nmap Scan # Nmap 7.92 scan initiated Mon Mar 14 15:35:58 2022 as: nmap -sC -sV -A -v -oA nmap/initial 10.10.73.114 Nmap scan report for 10.10.73.114 Host is up (0.34s latency). Not shown: 998 closed tcp ports (reset) PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 7.6p1 Ubuntu 4ubuntu0.6 (Ubuntu Linux; protocol 2.0) | ssh-...&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>tryhackme</category>
    </item>
    <item>
      <title>Oh My WebServer TryHackMe Machine Writeup and Walkthrough</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Sun, 13 Mar 2022 16:05:30 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/oh-my-webserver-tryhackme-machine-writeup-and-walkthrough-4gb7</link>
      <guid>https://dev.to/thehackersbrain/oh-my-webserver-tryhackme-machine-writeup-and-walkthrough-4gb7</guid>
      <description>&lt;p&gt;Introduction Target Machine Oh My WebServer Target IP export IP=10.10.237.191 Enumeration First of all let’s get started by a Nmap Scan. Nmap # Nmap 7.92 scan initiated Sat Mar 12 23:33:44 2022 as: nmap -sC -sV -A -v -oA nmap/initial 10.10.237.191 Nmap scan report for 10.10.237.191 Host is up (0.40s latency). Not shown: 998 filtered tcp ports (no-response) PORT STATE SERVICE VERSION ...&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>tryhackme</category>
    </item>
    <item>
      <title>PlottedCMS TryHackMe Machine Writeup and Walkthrough</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Tue, 22 Feb 2022 10:10:00 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/plottedcms-tryhackme-machine-writeup-and-walkthrough-3a3i</link>
      <guid>https://dev.to/thehackersbrain/plottedcms-tryhackme-machine-writeup-and-walkthrough-3a3i</guid>
      <description>&lt;p&gt;Introduction TryHackMe Easy Level Machine Target export IP=10.10.230.183 Enumeration First of all let’s start by running our Nmap Scan Nmap # Nmap 7.92 scan initiated Sat Feb 19 14:01:42 2022 as: nmap -sC -sV -A -v -oA nmap/initial 10.10.230.183 Increasing send delay for 10.10.230.183 from 0 to 5 due to 257 out of 855 dropped probes since last increase. Increasing send delay for 10....&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>tryhackme</category>
    </item>
    <item>
      <title>Plugins with vim-plug in NeoVim</title>
      <dc:creator>Gaurav Raj</dc:creator>
      <pubDate>Fri, 22 Oct 2021 08:24:30 +0000</pubDate>
      <link>https://dev.to/thehackersbrain/plugins-with-vim-plug-in-neovim-2h0f</link>
      <guid>https://dev.to/thehackersbrain/plugins-with-vim-plug-in-neovim-2h0f</guid>
      <description>&lt;p&gt;Hello There Everyone, Myself Gaurav Raj, a cyber security student learning to secure things while breaking them ;). I’ve using Arch Linux for about a year now and It’s been an awesome journey. And as you all know if you’re interested in Cyber Security or any kind of tech-related field, you all would be familiar that how important it is to have experience with Linux systems. and somehow we like ...&lt;/p&gt;

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