Making Wacky Redirect Scripts - Part I
The challenge I posed to myself was to make the redirection scripts look harmless, try out some techniques, and come up with new methods to see if my program could properly analyze it. All of these scripts redirect the browser to Google and were built to work on Firefox.
I’m not breaking new ground here and there’s probably another dozen or so techniques that I haven’t included that people way smarter than me have figured out (please share if you are one of them). The dozen or so scripts I came up with are very simple and straightforward. I didn’t employ any serious obfuscation or countermeasures, in fact, these are brain-dead simple to analyze/reverse but they are unusual and may give my program a headache while it tries to figure it out.
What I did here was take Google’s advertisement code which can be found on just about every website out there and modified it in such a way as to redirect the user to Yahoo.com even though it clearly shows Google’s URL. [This is the only script that redirects to Yahoo.com, the rest redirects to Google.com.]
4. Just like the cookie method above, I’m sure this has been used numerous times before. Here, I replace the browser location history with a URL I want the browser to visit then call it.
5. Using Push and Unshift methods, I formed a redirect in an Array object. I basically start at the center then prepend (push) and append (unshift) characters to form the final script. I also threw in some Pops and Shifts so that the final script formation wouldn’t be that straightforward.