<?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 Daniel Marte on Medium]]></title>
        <description><![CDATA[Stories by Daniel Marte on Medium]]></description>
        <link>https://medium.com/@masonhck357?source=rss-60f3902e08c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*1l6qCblVMDxkAT-w.jpg</url>
            <title>Stories by Daniel Marte on Medium</title>
            <link>https://medium.com/@masonhck357?source=rss-60f3902e08c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 11:14:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@masonhck357/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 $16,000 Dev Mistake]]></title>
            <link>https://medium.com/@masonhck357/the-16-000-dev-mistake-13e516e86be6?source=rss-60f3902e08c------2</link>
            <guid isPermaLink="false">https://medium.com/p/13e516e86be6</guid>
            <category><![CDATA[computer-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Daniel Marte]]></dc:creator>
            <pubDate>Sat, 07 May 2022 14:12:04 GMT</pubDate>
            <atom:updated>2022-05-08T00:33:36.588Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello all!</p><p>Its been a while since my last write up. As a-lot of you know, last year I joined the Bugcrowd team as an Application Security Engineer. Since then, my full-time hacking has taken quite the backseat as I transitioned into a full-time role with Bugcrowd. Towards the end of the year, I decided to put my focus onto 1 program only as every assets that they own was in scope!</p><p>So this is going to be a writeup on how I located some AWS keys with Recon, How I was able to leverage it to find out roles and permissions as well as digging deeper to different services to really solidify the impact.</p><h3><strong>Tools used:</strong></h3><ol><li>Burp Suite Pro</li></ol><p>2. JSminer Extension</p><p>3. DataExtractor Extension</p><p>4. FFUF</p><p>5. KiteRunner</p><p>6. Assetnote Wordlists</p><p>7. AWS cli</p><p>8. Shodan</p><h3><strong>Recon</strong></h3><p>As you know, any good vulnerability story starts with some solid recon. So I decided to go through Shodan and look for anything thats promising. So by making the query, “<strong>ssl:”{{Org name}}”</strong>”, I was able to pull all scanned Assets belonging to the organization by making that query but I needed to start filtering it as there were MANY assets, so just like i used the query <strong>ssl:”{{Org name}}”, </strong>I started filtering out different assets by prepending a “-” on my queries.</p><p>So now I have <strong>ssl:”{{Org name}}” </strong>results and I want to remove the results of all assets belonging to example1.com My query will be the following:</p><blockquote><strong>ssl:”{{Org name}} -</strong>Ssl.cert.subject.CN:”example1.com”</blockquote><p>I also wanted to remove any asset that was served by AkamaiGhost so I also added -AkamaiGhost†</p><p>Ok! now I see some interesting assets and IP addresses that I have never seen. I open up Burp and Firefox to start hitting the new assets. I discovered a Burp extension the day before called JSminer that runs through a list of regex and patterns and posts it as a severity.</p><p>[Post JSMiner screenshot]</p><p>I also have another tool made by Gwendolyn that also will pull data based on a list of regex that is user-suppled. Here is the link to the github repo. These 2 extensions both work via passive scanning, although JSMiner does have an active scan module to look for .map files.</p><p>Now that all tools are setup on a fresh new Burp Project. I started by extracting JS files from GAU and Wayback and saved them into a file called J<em>surls.txt</em>. Then by using TomNomNom <a href="https://github.com/tomnomnom/unfurl">Unfurl</a> tool. I took that file, Extracted the list of hosts and put that in one file called<em> Domains.txt</em>. I then, extracted all the paths of the urls and saved it on another file called J<em>spaths.txt.</em> As you know, some brute-forcing is coming your way but FIRST, I want to be a bit more thorough on <em>how</em> I am brute-forcing. So I decided to revisit my <em>JSurls.txt</em> file to extract the url up to the first subdirectory(without the js files) and put that into my <em>Domains.txt</em> file. I then pulled in URLs with 2nd level subdirectories, and then 3rd level subdirectories and added them to my <em>Domains.txt </em>file. From there it was time to utilize the FFUF tool to start the content discovery. I ran a simple FFUF one-liner to run all Javascript paths that I scraped from GAU/Wayback against all subdomains/subdirectories. From there, I had FFUF proxy the results returning ‘200’ to BURP. BURP will then start a live passive scan which will include utilizing <em>JSMiner and DataExtractor </em>extension.</p><p>Within a couple of minutes, I had several hits for an AWS key in a dev subdomain. It seems like adding 2nd level subdirectories was the key here. Final result for the Javascript file was <a href="https://tre-uat-euw1.redacted.com/assets/Javascript/config/config.js.">https://tre-uat-euw1.redacted.com/assets/Javascript/config/config.js.</a> The path “/Javascript/config/config.js” was the key path here. After pulling the AWS Access Key and AWS Secret Key. I dove straight to AWSCLI to see how we can ensure max impact.</p><h3><strong>Exploitation</strong></h3><p>AWS CLI is <strong>a tool that pulls all the AWS services together in one central console</strong>, giving you easy control of multiple AWS services with a single tool. The acronym stands for Amazon Web Services Command Line Interface because, as its name suggests, users operate it from the command line. Utilizing this tool, it allows us to take the keys we find and explore what services we have access too. So OFF we go:</p><blockquote>First, we should create a profile using this <em>one-liner</em>:<br>aws configure — profile {whatevername}</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9alRQSbCGO2vtDq2sbQilA.png" /></figure><p>By creating this profile, we can call awscli commands utilizing the credentials located in the Javascript file. Now that the profile is created, its time to figure out exactly how permissive these keys really are.</p><p>I ran the following command:</p><blockquote>aws — profile {whatevername} sts get-caller-identity</blockquote><p>This command gives you Userid, Account ID, and arn(which includes the username). By calling this command, it can provide you with crucial information, like the username, to pivot and continue exploring further. Although this information in sensitive in nature, this wouldn&#39;t be considered maximum impact. Sometimes, program owners need to know how impactful certain vulnerabilities can be. This can determine the difference between a 9.0 critical and a 10.0 critical(max pay) We can determine more impact with the following Awscli commands.</p><p>The command above will give you policy information associated with the username inputted into the command like. As you can see below, The policy name associated with the username located is AdministratorAccess.</p><blockquote>aws iam list-attached-user-policies — profile {whatevername} — user-name {username}</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*70gY1vgZurC_eofO37kjZQ.png" /></figure><p>This command above will provide you with crucial information about the Policy that the user is under. A policy in AWS terms is a role or “group”. Which is essentially a permission set that allows a user to gain access to certain services with <em>C.R.U.D</em> permissions. Based on the screenshot above, we can assume that these keys have admin privileges. Now we need to find out what AWS services does this user have access too and if this user has full admin access to the services.</p><p>Finally, the last command I wanted to run to understand the full scope of the keys was to run the following command:</p><blockquote>aws iam get-policy-version — profile redacted — policy-arn arn:aws:iam::aws:policy/AdministratorAccess — version-id v1</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lHGm49DeT3hc_QeI3ZJUFA.png" /></figure><p>This was exactly what I needed! This gave me two VERY important points of interest. As you can tell, there is a wildcard asterisk value next to the Action and Resource key. This indicates that I can perform ANY action with the AWS keys and I have access to all resources. What exactly does this mean?</p><h3>IMPACT</h3><p>To reiterate the impact, I have full access to all AWS services as an Admin with the ability to perform all actions. Meaning I can create, read, update and delete anything belonging to the company.</p><ul><li>I had full access to all their EC2 snapshots</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AmAgjN0bIRardMbWcxTJxQ.png" /></figure><ul><li>Full access to their Lambda functions</li><li>Full access to all S3 buckets.</li></ul><p>Once reported, this was taken down within 30 minutes and triaged by the program manager on a Saturday. Within a week, I received my first 5 digit payout at $16,000.</p><p>As the cool bounty hunters say: <em>BOOM!</em></p><p><strong>Takeaways:</strong></p><ul><li>Take time to understand a company and how they do things. Part of recon, besides gathering data, is trying to understand the pattern. Every program has a pattern, wether its the way they name their subdomains, to how they structure their directories.</li><li>Once you identify patterns, start getting creative.</li><li>Be thorough on your impact. I truly felt that if I submitted this vulnerability without digging deeper for more impact, it would not have been considered for a high bounty.</li></ul><p>Thanks all for reading! If you have any questions, feel free to reach out on <strong>Twitter</strong> at <a href="https://twitter.com/Masonhck3571">https://twitter.com/Masonhck3571</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13e516e86be6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chains on Chains: Chaining multiple low-level vulns into a Critical.]]></title>
            <link>https://medium.com/@masonhck357/chains-on-chains-chaining-multiple-low-level-vulns-into-a-critical-8b88db29738e?source=rss-60f3902e08c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b88db29738e</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Daniel Marte]]></dc:creator>
            <pubDate>Sat, 26 Sep 2020 17:30:10 GMT</pubDate>
            <atom:updated>2020-09-26T17:30:10.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*69osbEsLrdar_P7zNUFz7Q.jpeg" /></figure><p>Hello! Hope all is well. I know it has been a while since my last writeup! Just a quick little introduction for those who do not know me. My name is Daniel but the hacking community knows me as Masonhck357. I have been hacking for a little over a year, mainly with Bugcrowd. I am currently Top 300 and continuing the grind! I want to share a vulnerability in which I leveraged several misconfigurations and low-medium vulns for a Critical bug! <br> <br> <br> <strong>Background on the program.</strong></p><p>The program is an app that provides an online service directory that connects consumers to local businesses in the home improvement trade industry. They also have a separate new feature for Government entities. For the sake of the article, we will call the app. <a href="https://www.work.com/"><strong><em>https://www.work.com</em></strong></a> :D <br> <br> <br> <strong>The Recon:</strong></p><p>The first thing I do when performing recon on an app is to fingerprint. I typically use Wappalyzer’s chrome extension which will do the trick. I was happy to see that this was an app written in PHP. I then proceeded to spend a couple of hours using the webapp as intended. I first created a “consumer” account and used the app as that role, then switched to a “worker” account and did the same. I wrote down everything that I thought was interesting to avoid getting stuck in the rabbit hole. Towards the end of my day, I was reviewing my Burp Proxy history and I noticed that the session cookie did not have the Httponly or Secure flag. I COULD report this immediately and make a quick $100 but I decided to exploit it further. <br> <br> <strong><em>Sidenote:</em></strong> I also ended up locating an AJAX directory that contained PHP files like <a href="https://work.com/api/ajax/dir/file.php"><strong><em>https://work.com/api/ajax/dir/file.php</em></strong></a>. I decided to FUZZ that PHP endpoint for more PHP files and came across a hidden file called JWT.php When making this call, I would just receive a JWT token, similar to the same token I would use for certain API calls. I also noticed that this JWT token does NOT expire. Definitely seems interesting but not worth reporting just yet.</p><p><strong>The XSS:</strong></p><p>So I want to exploit the session cookie. The first thing I do is look for XSS. If I can locate an XSS, I can call document.cookie and retrieve the victim’s session token. I already reported an XSS on the program the day before so I didn’t want to use the same XSS on this report. I start going through every endpoint I came across that contained a parameter.NO LUCK! I did some content discovery to find some new assets but no luck. I decided to use GAU(<a href="https://github.com/lc/gau">https://github.com/lc/gau</a>) and see if there were any other endpoints that I haven’t come across from that have been cached. I came across an endpoint: <a href="https://work.com/dir/app-detection.php">https://work.com/dir/app-detection.php</a>. The page was still live but pretty useless. I decided to parameter Bruteforce the endpoint and I found a parameter that that was vulnerable to XSS. Immediately throw in a payload to see that I get stopped by the Content Security Policy.</p><p><strong>The CSP Bypass:</strong></p><p>To bypass this I ended up injecting an iframe and using the “srcdoc” attribute to bypass CSP and execute the HTML that’s inputted as the value of srcdoc(which would be a script making a call to BXSS URL) So now I have the victim’s session token! SUCCESS! I am still not finished though. I want to confirm that I can maximize the severity of this. <br> <br> <br> <strong>The Final exploitation</strong></p><p>I immediately head to Burp and start searching for endpoints that expose sensitive information in the response body AND used the session token. I found some interesting sensitive information but nothing that would warrant max severity. I then thought….<strong>”<em>What about that JWT.php file I found earlier?”</em></strong> I immediately throw that endpoint into Burp, replace the session cookie, and <em>voila</em>, a JSON web token on behalf of my victim that does not expire! I immediately take that token and start exploring with it. As expected, I was able to access much more sensitive data from my victim. If my victim was a government asset, I would be able to see highly sensitive documents that were uploaded to the app. I am also able to generate a payment JSON web token and make payments on behalf of the victim! <br> <br> <br> <strong><em>Conclusion:</em></strong></p><p>Lets recap! Here are the following misconfigurations/vulnerabilities that were chained:<br> <br> 1. Lack of proper security flags on cookies<br> 2. Blind XSS with CSP bypass<br> 3. Hidden PHP file generating JWT token<br> 4. Lack of rate-limiting allowing me to content discover with ease. <br> 5. Sensitive information disclosure</p><p>Fun right? Always continue to push for the highest severity you can and always ask yourself if you can do more. Don’t sell yourself short and always aim for the top. I hope you all enjoyed the writeup! If you have any questions feel free to reach out on here or on my Twitter @masonhck3571.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b88db29738e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chains on Chains!! Chaining several IDOR’s into Account Takeover(PART ONE)]]></title>
            <link>https://medium.com/@masonhck357/chains-on-chains-chaining-several-idors-into-account-takeover-part-one-373627f2910f?source=rss-60f3902e08c------2</link>
            <guid isPermaLink="false">https://medium.com/p/373627f2910f</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Daniel Marte]]></dc:creator>
            <pubDate>Fri, 15 Nov 2019 14:29:29 GMT</pubDate>
            <atom:updated>2022-03-01T13:45:32.330Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EuEHhaDDf-m4Ud9dU_KOug.jpeg" /></figure><p>Hello Everybody,</p><p>Welcome to my FIRST writeup! Just to give you some background, My name is Daniel, I started hacking about 4 months ago and can’t stop! I’ve really been enjoying learning and exploiting some bugs! :D This writeup will be about how I achieved my first Account Takeover by chaining a couple of IDORS and taking advantage of leaked information.</p><p>Background on the program: The program is a utility company that provides services to a state. Within this program, you can signup for several services using the same credentials. We will call it https://gas.com/</p><p>So I was doing some content discovery and I located a service that gas.com uses. let us call this service “utility”(<a href="https://customer.cngc.com/propertyportal/">https://gas.com/utility/</a>)</p><p><strong><em>*Do Note*</em></strong>: I do have an account set up on gas.com and now I will be enrolling in the “utility” services utilizing the same account information as gas.com</p><p>So I am able to enroll in “Utility” as long as I had my accountID and 4-digit pin.</p><p><strong>Step 1</strong>: Input AccountID and pin</p><p><strong>Step 2</strong>: It asked me to confirm the email address associated with the AccountID yet the email address was already prepopulated (<strong>remember this</strong>)</p><p><strong>Step 3</strong>: Then gives you the option to set your username(also prepopulated) and password.</p><p>Once logged in, you can create an agreement to submit which prepopulates sensitive information when you are ready to submit(name, phone number, employer, address, first and last name)</p><p>In the profile section of “utility”, I am able to change the email address, username, and password.</p><p>Ok, so cool, everything working as intended, right? How am I supposed to retrieve a user’s Account ID’s, 4- digit pins AND email addresses?</p><h3><strong>How Can I capture the victims AccountID?</strong></h3><p>Well, let&#39;s go back to Step 1 of enrollment, when I input the AccountID, the server automatically calls this endpoint to validate <a href="https://customer.cngc.com/propertyportal/account/check/%7b%7bAccountID%7d%7d">https://gas.com/utility/account/check/{{AccountID}}</a> that returns a True or false.</p><p>So I ended up looking at the account ID’s for both of my accounts and I found something interesting! Both AccountID’s were only different on the first 6 digits! It definitely looks like the AccountID endpoint is able to be enumerated very easily via brute force if you only try and brute-force the first 6 digits of the accountID followed by 4 zeros and a single digit (1–9) with no problem. For example. My account ID number is 12345600007. ‘123456’ is what I will brute force. The 4 zero’s following it stay the same and the ‘7’ can be changed between 0–9. I was able to enumerate several account ID’s just running the brute force for about 15 minutes(Disclaimer: I did NOT take additional action with those accounts!!!) I can also verify if that account has been enrolled by calling this endpoint: <a href="https://customer.cngc.com/propertyportal/enrolled/check/%7b%7bAccountID%7d%7d">https://gas.com/utility/enrolled/check/{{AccountID}}</a> which will return a True or False if it been enrolled or not.</p><h3><strong>Ok, got the victims AccountID but how do I capture the pin number?</strong></h3><p>Once you add the pin, the server does yet another validation, this one is for the pin: <a href="https://customer.cngc.com/propertyportal/pin/check">https://gas.com/utility/pin/check</a> POST sending the following parameters” {“accountNumber”:”12345600007&quot;,”accountPin”:”1234&quot;}” I think we can all agree that brute-forcing a 4 digit pin is very easy and quick. Once I hit the right pin number, it will validate that the account DOES exist, as well as spit out the email address associated with the victim. So now I can use this endpoint to enumerate victim’s Accountpins and email addresses by simply having an AccountID.</p><p><strong>So now I have a victims accountID, accountpin, and email address, now what?</strong></p><p>Ok, back to Step 1 with victim information and let&#39;s enroll them:</p><p><strong>Step 1:</strong> I enrolled using victims AccountID and AccountPin and pressed next</p><p><strong>Step 2</strong>: It asked to enter victims email address and confirm it(remember its already populated) so I press next</p><p><strong>Step 3:</strong> Confirm username(already populated) and set password</p><p><strong>Now, I have officially enrolled the victim in the property portal. So what do I see?</strong></p><p>Well, I can act on behalf of the victim in any action I take now that I am logged in. If I were to create an agreement on behalf of the victim, It will prepopulate it with sensitive information from its main account(name, phone number, employer, address, first and last name) I am also able to change the email address on the My profile section.</p><p>That was a light switch for me. If these accounts are tied together, what If I were to change the password, would the password change also work on the main account? Unfortunately, that did not work at all BUT I did notice a notification that stated IF I were to change the password here, it will propagate on the main page<br> <br> What this means is that if I change my email address here, It will reflect on the account services as well! This ultimately means that I can now go on ahead an easily change the victim&#39;s password by being able to change the email address in utility and then send the forgot password request on the main page. This allows 100% full takeover of every Account that I can enumerate.</p><p><strong>Conclusion: </strong>How fun was that? I encourage those who test programs to always test for IDOR’s and see what information is leaking. Always ask yourself, can you leverage this information into something impactful? I really hope this helps some beginners while they are developing their methodology. I will be releasing Part Deux this week on how I found another Account Takeover in the same program by parsing Old Javascript files from Wayback archive.</p><p>If you have any questions, feel free to hit the DM <a href="https://twitter.com/Masonhck3571">https://twitter.com/Masonhck3571</a>:D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=373627f2910f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>