How I Took Over an Instagram Account Using Broken Link Hijacking
The target's website linked to an Instagram profile with a username that was not registered, allowing an attacker to register that username and take over the link. The attacker also found open redirects on login and registration pages that redirected users to an external site after authentication.
Published on medium.com
Today, I’m bringing you something new and interesting. This is not a typical bug bounty article; instead, I’m going to share some security loopholes I came across during penetration testing as part of my day job.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the website linked to an unregistered social media username, and its login and registration pages accepted an external URL in a redirect parameter without validation.
Impact
An attacker could take over the social media link to impersonate the company, and the open redirects could be used to send users to a malicious site after login or registration.
What the attacker needed
Target links to an unregistered social media username; attacker can register that username; victim clicks a crafted login or registration link
How it was found
- Find a subdomain with a social media link in the footer.
- Click the link and see it leads to a non-existent Instagram profile.
- Register an Instagram account with the same username.
- Return to the subdomain and click the link again to confirm the redirect.
- Test the login page's return_to parameter with an external URL.
- Test the registration page's next parameter with an external URL.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A broken link hijacking happens when a website links to an account on another service (like Instagram) that no longer exists or was never created. An attacker can sign up for that same username and effectively control where the link goes. Separately, an open redirect lets a website send you to a different site after you log in, which can be used for phishing.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.