You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Broken Link Hijacking - How expired links can be exploited.
# Broken Link Hijacking - How expired links can be exploited.
Broken Link Hijacking (BLH) exists whenever a target links to an expired domain or page. Broken Link Hijacking comes in two forms, reflected and stored. This issue has been exploited in the wild numerous times, but surprisingly few researchers actively look for broken links in bug bounty programs.
This post aims to give you a basic overview of the different issues that could possibly arise if a target links to an expired endpoint.
# Stored Broken Link Hijacking
### Impersonation
# Stored Broken Link Hijacking
### Impersonation
When a company deletes their social media account they might forget to remove the link from their website. An attacker can create an account on the social media platform with that username and impersonate the company.
### External JS File Hijacking
EdOverflow
revised
this gist Sep 3, 2017.
1 changed file
with
1 addition
and
1 deletion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Broken Link Hijacking - How expired links can be exploited.
Broken Link Hijacking (BLH) exists whenever a target links to an expired domain or page. Broken Link Hijacking comes in two forms, reflected and stored. This issue has been exploited in the wild numerous times, but surprisingly few researchers actively look for broken links in bug bounty programs.
This post aims to give you a basic overview of the different issues that could possibly arise if a target links to an expired endpoint.
# Stored Broken Link Hijacking
### Impersonation
When a company deletes their social media account they might forget to remove the link from their website. An attacker can create an account on the social media platform with that username and impersonate the company.
### External JS File Hijacking
If a target has an external JS file and that domain/page is expired, you can claim it and then you essentially have stored XSS.
Say for instance example.edu has an external JS file hosted on example.com and example.com has expired.
```html
<!DOCTYPE html>
<html>
<head>
<metacharset="utf-8">
<metaname="viewport"content="width=device-width">
<title>Broken Link Hijacking</title>
</head>
<body>
<scriptsrc="//example.com/script.js"></script>
</body>
</html>
```
Now you can takeover example.com and can control the JS file on example.edu.
### Information Leakage
Hijacking broken links which are missing the `rel="nofollow"` attribute could leak information to the attacker-controlled page. [[1]][Cure53]
Also sometimes companies still link to expired analytics pages. If the attacker can hijack that expired page, they can monitor traffic and possibly gather valuable information about the target's users. Someone actually once found one of these on Gratipay's program: https://hackerone.com/reports/111078.
### Content Hijacking
An attacker can hijack the content of a page by taking over the expired domain/page. A good example of this can be seen in [@MisterCh0c](https://twitter.com/MisterCh0c)'s blog post ["How I hijacked top celebrities tweets including Katy Perry, Shakira…"](https://hackernoon.com/how-i-hijacked-top-celebrities-tweets-including-katy-perry-shakira-fca3a0e751c6).
You know that feeling when you think you have reflected XSS, but cannot break out of the `href` or `src` attributes?
If the link is a CDN or a file hosting service, you can construct a malicious link and host that file on the service. Admittedly, these are very rare, but definitely something to keep in mind in case you come across this issue in the future.
### Example Scenario
http://example.edu/?version=1.0.0 returns a specific version of the JS file being hosted on cdn.example.