Spoofing the Referer during a Web Request

by Robert Chartier by Robert Chartier

Contributed by
Rating: 4 stars4 stars4 stars4 stars4 stars / 11
February 15, 2001
Rate this Article:
MEH MEH++


SEARCH ASP FREE
TOOLS YOU CAN USE

advertisement
This is accomplished fairly easily. During the communication from the client to the server when it makes a simple GET request from the server, there are headers which are optionally sent with that request. One of these headers is the "Referer" header.

Give this a shot, and see how easy it is to spoof the Referer during a Web Request:
0. Start, Run, Telnet <enter>
1. Terminal, Preferences...
2. Make sure that "Local Echo" is checked
3. Connect, Remote System...
4. Host Name: www.learnasp.com
5. Port: 80
6. <connect>
7.
8.
9.
10. Type in (exactly):
11. GET /learn/test/servereach.asp HTTP/1.1<enter>
12. Host: www.learnasp.com<enter>
13. Referer: http://www.aspfree.com/devlinks<enter><enter>
14.
15.

If you type it in correctly, you should see the response from the server in the form of HTML. You should notice right away that it reports the HTTP_REFERER:http://www.aspfree.com/devlinks. Now try the exact same thing, but change te Referer to anything you wish. Notice the ouput of the page also changes to reflect this new referer.



Bottom line, never trust the Referer server variable.






References:


Copy Source:
blog comments powered by Disqus
ASP CODE ARTICLES

- ASP Forms
- ASP: The Beginning
- Getting Remote Files With ASP Continued
- Inbox and Outbox Manipulation in ASP
- Relational DropDownList Using VB.NET
- Ad Tracking URL Hits
- Use ViewState to display one record per page...
- Send Email using ASP.NET formatted in HTML
- ASP File Explorer
- ASP/XML Interview questions by Srivatsan Sri...
- Pressing RETURN won't submit the form
- This shows how you get the TEXT of a combo r...
- Group Data by Adrian Forbes
- Multiple checkbox select sample
- Multiple checkbox select with all values sam...

ASP Web Hosting ASP.Net Web Hosting Windows Web Hosting
 
 
 

ASP Free Forums 
 RSS  Tutorials RSS
 RSS  Forums RSS
 RSS  All Feeds
Site Map 
Request Media Kit
Write For Us Get Paid 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Privacy Policy 
Support 


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap
Most Popular Topics
All ASP.Net Tutorials