4

A local wolf sanctuary had just posted a warning on Facebook to not visit their site because it had been hacked. However, it only sends you to the hacked site when searching through Yahoo.

I was curious as to how this might be working and why it's different?

The site is whar.org (assuming it hasn't been fixed at the time of reading).

Anders
  • 64,406
  • 24
  • 178
  • 215
Lalone
  • 53
  • 5

1 Answers1

5

I have just verified this.

If the request header contains the Referer (which your browser adds after being refered by another site), you are redirected to the fake page.

Request containing referer

This is the response, which causes the "redirect": Response received when HTTP contains referer

Now we modify the request to not contain the REFERER: header: Request without referer

And the correct website is loading. Response without referer

So basically, the "hacker" checks the REFERER header, and if it is set to Yahoo (or possibly others), it will show you the wrong page.

Nomad
  • 2,359
  • 2
  • 11
  • 23