tl;dr
- Leak admin’s hash using wildcard target origin in postMessage or by calculating
sha256(''). - Create an XSS payload to read
/api/flagand send it to attacker server.
tl;dr
sha256('')./api/flag and send it to attacker server.First of all, a big shoutout to the challenge author. All the challenges in this set are available here.
Going through the challenge source, we can see that two JavaScript files are imported.
| |
arg-1.4.js is a popular library for parsing URL parameters. And main.js has the following content.
| |
We can see that main.js uses Arg library to parse location.hash and uses URLSearchParams to parse query strings.
tl;dr
/gettoken%3fcreditcard=mmm&promocode=FREEWAF to get the token.{"name":"' union select flag, 1, 1, 1 from flag -- -", "name":"x"} to get the flag.Hello everyone, it’s been over a month I have shared something on my blog. I was busy with academic stuff and CTFs. But finally, I have decided to take some time to write a post on my first bug bounty. The bug was small and easy to exploit, however, let this be a motivation to all who haven’t yet found their first bug.
I found the bug on a jewelry website. They did not have any vulnerability disclosure programs, but I was lucky enough to get a positive response from them. It was on a fine evening, after all the “hustle and bustle” of online classes ended, I was scrolling through my Instagram feed and I noticed an advertisement for a jewelry website.
tl;dr
Who let the blacklists out?
| |
user and pass are directly fed into the query and might cause SQL Injection.multi_query function is used.Inserting \ as value for user parameter causes a part of the query to be treated as a string, and the pass parameter can be used for SQL Injection. The query becomes