<?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 Pawanrawat on Medium]]></title>
        <description><![CDATA[Stories by Pawanrawat on Medium]]></description>
        <link>https://medium.com/@pawan_rawat?source=rss-af43feed15aa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*F0TTcjTD_kmZ3rYP</url>
            <title>Stories by Pawanrawat on Medium</title>
            <link>https://medium.com/@pawan_rawat?source=rss-af43feed15aa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 14:34:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pawan_rawat/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[Exposing Millions of Haryana Bijli Vibhag Consumer’s Details]]></title>
            <link>https://medium.com/@pawan_rawat/exposing-millions-of-haryana-bijli-vibhag-consumers-details-5ea2009508d3?source=rss-af43feed15aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ea2009508d3</guid>
            <dc:creator><![CDATA[Pawanrawat]]></dc:creator>
            <pubDate>Sat, 21 Dec 2024 17:15:45 GMT</pubDate>
            <atom:updated>2024-12-26T10:12:59.724Z</atom:updated>
            <content:encoded><![CDATA[<h3>Exposing Millions of Haryana Electricity Department Consumer’s Details</h3><p>Hello Everyone 👋</p><p><em>Pawan Rawat here, I’m an Ethical Hacker &amp; a Security Researcher from Haryana. This post is about how I found Security Vulnerabilities in Haryana Bijli Vibhag Limited websites which is exposing personal details and documents of their consumers</em>.</p><blockquote><strong>UHBVN &amp; DHBVN ?</strong></blockquote><p><strong>DHBVN (</strong>Dakshin Haryana Bijli Vitran Nigam Limited) is responsible for the distribution and retail supply of electricity in the south zone of Haryana.</p><p><strong>UHBVN</strong> (Uttar Haryana Bijli Vitran Nigam Limited) is responsible for the distribution and retail supply of electricity in Northern Parts of Haryana.</p><p><a href="https://uhbvn.org.in/web/portal/about-uhbvn"><strong><em>UHBVN</em></strong></a> provides services to approx. <strong>35.51 lakh </strong>consumers and <a href="https://dhbvn.org.in/web/portal/about-dhbvn"><strong><em>DHBVN</em></strong></a><strong> </strong>caters to around <strong>41.13 lakh</strong> consumers of various categories of consumers.</p><p>While I was login to my consumer account for checking my connection, I suddenly got an idea to test for vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYkuOG4FquTFqRc2G9j0Lw.jpeg" /></figure><blockquote><strong>Websites-</strong></blockquote><p>https://uhbvn.org.in/</p><p>https://dhbvn.org.in/</p><blockquote><strong>So first vulnerability I test was otp verification bypass.</strong></blockquote><p>Here are the Steps to reproduce:-</p><ol><li>Go to Consumer login</li><li>Then Enter the Application no. <strong>xxx–xxx–xx</strong> and click to generate otp. I intercept the request and found that Consumer mobile no. was also visible in request.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzrOekhOXscdQt23R2AVOA.jpeg" /></figure><p>4. Now enter the wrong otp like 0000 and click on verify otp</p><p>5. Intercept the response of Request</p><p>Request:-</p><pre>POST /GetRecords.asmx/VerifyOTPForTracking HTTP/1.1<br>Host: dhbvn.org.in<br>Cookie: ASP.NET_SessionId=tl0b3gcyqil2i1vjg0zlozzk; <br>Content-Length: 46<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36<br>Referer: https://dhbvn.org.in/ApplicantTracking.aspx<br>Accept-Encoding: gzip, deflate<br>Accept-Language: en-US,en;q=0.9,hi;q=0.8,en-GB;q=0.7<br>Connection: close<br><br>{&quot;ApplicationNumber&quot;:&quot;Fxxxxxxx&quot;,&quot;OTP&quot;:&quot;0000&quot;}</pre><p>6. Here I saw a parameter<br> {<br> “d”:”0&quot;<br> }</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fq0SyrKYeiNF-ngBud7qsA.png" /></figure><p>7. Change the value of 0 to 1 and I’m able to successfully bypass the<br>otp verification in my account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gaSNA-sMg6JrNwNoHZdkQQ.jpeg" /></figure><p>I saw consumer personal details and document attachments. Attachments contain all private documents of electricity connection.</p><p>When I open an attachment, I saw that it contains a <strong>RegNum=</strong> Parameter which is vulnerable to another vulnerability <strong>IDOR.</strong></p><blockquote><strong><em>Steps to reproduce IDOR vulnerability:-</em></strong></blockquote><p>Go to the vulnerable url and Modify the <strong>RegNum=</strong> parameter value randomly.</p><p>https://subdomain.uhbvn.org.in/xxxxxxx.aspx?Rtype=0&amp;&amp;RegNum=xxxx</p><p>For example:- <br>ReNum=xxx9495</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JWcsOMbcjfu16nAr6Oc_Ag.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thYwIiwNmuQYgxg9dx4NGA.jpeg" /></figure><p>You can change ID’s and saw the all other customer’s personal details.</p><p>I confirmed that these two vulnerabilites are present in both websites of UHBVN and DHBVN.</p><p>So, I immediately recorded a POC video &amp; report it to</p><p><strong>incident@cert-in.org.in</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*nNN3uaIsmBcNeNLvvBcyBg.png" /></figure><p>The issue is resolved after sometime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*WnMbS_DRBMv59tYpq0tGNg.png" /></figure><p>Thanks for reading :)</p><p>I hope you like this :) Feel free to DM me your Queries !</p><p>Follow me for more updates:-</p><p><a href="https://twitter.com/PawanRa20262178">https://twitter.com/PawanRa20262178</a></p><p><a href="https://www.linkedin.com/in/pawan-rawat-00111819b">https://www.linkedin.com/in/pawan-rawat-00111819b</a></p><p><a href="https://www.instagram.com/chaudhary_pawan_rawat/">https://www.instagram.com/chaudhary_pawan_rawat/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ea2009508d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub Recon- For Finding Sensitive Information]]></title>
            <link>https://medium.com/@pawan_rawat/github-recon-for-finding-sensitive-information-aecdeb9c9dce?source=rss-af43feed15aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/aecdeb9c9dce</guid>
            <category><![CDATA[github-recon]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[sensitive-data-exposure]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Pawanrawat]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 19:01:14 GMT</pubDate>
            <atom:updated>2025-11-08T14:08:25.585Z</atom:updated>
            <content:encoded><![CDATA[<h3>GitHub Recon- For Finding Sensitive Information-(New Code Search)</h3><figure><img alt="Credit: https://miro.medium.com/v2/resize:fit:1125/0*N1fmHtI8gmkH_2Vu.png" src="https://cdn-images-1.medium.com/max/1024/1*biIy42Cn4Bnu0IkpUW1Zew.png" /></figure><p>Hello Hackers, Myself <strong>Pawan Rawat </strong>and this is my first blog. So this post is about my approach to GitHub recon.</p><blockquote><strong>GitHub ?</strong></blockquote><p>GitHub is a developer platform that allows developers to create, store, manage and share their code. Apart from this it also contains API keys, passwords, customer data etc. Basically it contains a lots of sensitive information which can be useful for an hacker. This sensitive information leaks can cost a company thousand dollars of damage.</p><blockquote><strong>What’s the new update in GitHub Search ?</strong></blockquote><p>GitHub remove the sorting feature and it’s just showing 5 pages of old code search in new update. You can read more about it here <a href="https://github.blog/changelog/2022-11-09-introducing-an-all-new-code-search-and-code-browsing-experience/">https://github.blog/changelog/2022-11-09-introducing-an-all-new-code-search-and-code-browsing-experience/</a></p><p>I will be covering Manual way of GitHub Dorking :</p><blockquote><strong>Manual Code Search OR GitHub Dorking</strong></blockquote><p>GitHub Code Search is a quite powerful and useful feature that can be used to search for sensitive data like passwords, API keys, , credentials, auth tokens, database files etc on repositories using GitHub dorks. We can search for code within a particular repository or organization.</p><p>To search for code across all public repositories, we must be signed in to a GitHub account. Apart from repositories we can also check for code, commits, issues, discussions, packages, wikis and users.</p><p>It’s not easy to find sensitive information on GitHub we need to spend a lot of time and need to check for each repository of a particular company or user. GitHub Dorking reduces your effort of searching sensitive information.</p><p>We have to use boolean operators like <strong>OR NOT AND</strong> and we Can also use <strong>Regex</strong> for finding leaks in GitHub Repos.</p><blockquote><strong>How to use ?</strong></blockquote><ol><li>Use specialized qualifiers, such as path: , language: user: path: org:and repo:</li></ol><p>To search for an exact string we can surround the string in quotes , use Regex or we can also use quoted strings in qualifiers. we can filter out demo or example data using multiple NOT operator like NOT example NOT guest NOT localhost NOT fake NOT 1234 NOT 127.0.0.1 NOT test.</p><p>path:**/.npmrc _auth <br>path:*/*config.sh password abc.com NOT example.com<br>path:*.pem private key<br>path:src/*.js<br>language:Python<br>owner:octocat abc<br>repo:repo owner name</p><p><strong>For example:-</strong></p><p><strong>path:*.env</strong> ( NOT homestead NOT root NOT example NOT gmail NOT sample NOT localhost NOT marutise) <strong>password</strong> <strong>outlook.com</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q4WRhvy3rL_ZykD23XMvyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*KdET3mlu04nMAf0ZWEf6Aw.png" /></figure><p>We can craft our search query according to our needs and use any keywords with it like password,authtoken,pwd and we can also search for other files.</p><p><strong>For example:-</strong></p><p>(path:*.xml OR path:*.json OR path:*.properties OR path:*.txt OR path:*.log path:*.config OR path:*.conf OR path:*.cfg OR path:*.env OR path:*.envrc OR path:*.prod OR path:*.secret OR path:*.private OR path:*.key) AND (access_key OR secret_key OR access_token OR api_key OR apikey OR api_secret OR auth_token OR authsecret) AND (“sk-” AND (openai OR gpt))</p><p>For more info:- <a href="https://gist.github.com/win3zz/0a1c70589fcbea64dba4588b93095855">https://gist.github.com/win3zz/0a1c70589fcbea64dba4588b93095855</a></p><p><strong>You can read more about Github Code search Syntax here</strong> <a href="https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax">https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax</a></p><p><strong>2. Using regular expressions (Regex)</strong></p><p>We can use some regex to craft a pattern that will match our string or keyword by surrounding the regex in slashes.</p><p>Here are some example:-</p><p>For stripe keys<br>/([srp]k_live_[0–9a-zA-Z]{24})/</p><p>/sk_live_[0–9a-zA-Z]{24}/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vDzaJQc541O3RtoP1Osumg.png" /></figure><p>For Slack <br>/https:\/\/hooks\.slack\.com\/services\/T[a-zA-Z0–9_]+\/B[a-zA-Z0–9_]+\/[a-zA-Z0–9_]+/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsJ14PoQyy2TfvKYdEgFQA.png" /></figure><p>For domain search<br>/https:\/\/[A-Za-z0–9-_]+\.dell\.com\/+/</p><p>For searching password<br>/password=[A-Za-z0–9-_]+/</p><p>/:password=[A-Za-z0–9-_]+/ NOT example NOT guest NOT localhost NOT fake NOT 1234 NOT xxx NOT 127.0.0.1 NOT test</p><p>for finding ip ranges<br>/35\.21\.[0–9]{1,3}\.[0–9]{1,3}/</p><p><strong><em>We can also use regular expressions with many qualifiers or boolean operators to search.</em></strong></p><p>For example:-</p><p>/:password=[A-Za-z0–9-_]+/ NOT example NOT guest NOT localhost NOT fake NOT 1234 NOT xxx NOT 127.0.0.1 NOT test <strong>traget.com</strong></p><p>/access_token=[A-Za-z0–9-_]+/ NOT example NOT guest NOT localhost NOT fake NOT 1234</p><p>We can craft regex according to our needs. We can use regular expressions to search for exact strings that contain characters that you can’t type into the search bar.</p><p><strong>You can look for usefull regex here:-</strong> <a href="https://github.com/databricks/security-bucket-brigade/blob/3f25fe0908a3969b325542906bae5290beca6d2f/Tools/s3-secrets-scanner/rules.json?ref=sshell.co">https://github.com/databricks/security-bucket-brigade/blob/3f25fe0908a3969b325542906bae5290beca6d2f/Tools/s3-secrets-scanner/rules.json</a></p><p>I have received this question many times:-</p><blockquote><strong>Ques:- How to perform GitHub recon more accurately after the recent update of 5 pages ?</strong></blockquote><p>Many times we will get a 100+ or 1k+ code search result, and we only have access to 5 pages in the new GitHub update. On one page we see 20 Repos, which only means 100 GitHub repos on 5 pages. For reducing the code , I used more <strong>operators</strong> with <strong>regex</strong> to filter out more useful information. We can also filter out using <strong>language: </strong>qualifiers like what language we want or not like If I don’t want markdown or html code in search result I used this- NOT <strong>language:Markdown</strong>, NOT<strong> language:html</strong></p><p>I hope you understand it !</p><p>For key Exploitation Must check <strong>Keyhack</strong> repo-<a href="https://github.com/streaak/keyhacks">https://github.com/streaak/keyhacks</a></p><p><strong>Reference:-</strong><br><a href="https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax#using-regular-expressions">https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax#using-regular-expressions</a></p><p><a href="https://www.sshell.co/github-code-search/">https://www.sshell.co/github-code-search</a></p><p><a href="https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax">https://docs.github.com/en/search-github/github-code-search/understanding-github-code-search-syntax</a></p><p>I hope you like this :) Feel free to DM me your Queries !</p><p>Thanks to all !</p><p>Follow me for more updates:-</p><p><a href="https://twitter.com/PawanRa20262178">https://twitter.com/PawanRa20262178</a></p><p><a href="https://www.linkedin.com/in/pawan-rawat-00111819b">https://www.linkedin.com/in/pawan-rawat-00111819b</a></p><p><a href="https://www.instagram.com/chaudhary_pawan_rawat/">https://www.instagram.com/chaudhary_pawan_rawat/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aecdeb9c9dce" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>