Preventing Image Bandwidth Theft

Discussion in 'ASP .Net Security' started by Med, Jan 21, 2007.

  1. Med

    Med Guest

    Hi,

    Is there a way to detect in asp.net if images are hot-linked from another
    websites? I intend to create a default image and serve that image instead of
    the image requested from another website?


    Kind Regards

    Med
     
    Med, Jan 21, 2007
    #1
    1. Advertising

  2. Med

    Scott M. Guest

    It depends on what you mean by "hot-linked".


    "Med" <> wrote in message
    news:%...
    > Hi,
    >
    > Is there a way to detect in asp.net if images are hot-linked from another
    > websites? I intend to create a default image and serve that image instead
    > of the image requested from another website?
    >
    >
    > Kind Regards
    >
    > Med
    >
     
    Scott M., Jan 21, 2007
    #2
    1. Advertising

  3. Med schreef:
    > Hi,
    >
    > Is there a way to detect in asp.net if images are hot-linked from another
    > websites? I intend to create a default image and serve that image instead of
    > the image requested from another website?


    I can think of following techniques (but they're not 100% reliable)

    - Check if a HTTP_REFERER header exists, and if it's value is an URL in
    your website.

    - Check if a cookie is present (the cookie should be generated on all
    the pages in your website).


    --
    Tim Van Wassenhove <url:http://www.timvw.be/>
     
    Tim Van Wassenhove, Jan 21, 2007
    #3
  4. Hello,

    the problem here is that the image mime types are handled directly by IIS in
    the default configuration. So you'll have to map the image mime types to the
    ASP.NET engine, write a custom IHttpHandler class for those file types and
    register it in the web.config.

    Best regards,
    Henning Krause


    "Tim Van Wassenhove" <> wrote in message
    news:...
    > Med schreef:
    >> Hi,
    >>
    >> Is there a way to detect in asp.net if images are hot-linked from another
    >> websites? I intend to create a default image and serve that image instead
    >> of the image requested from another website?

    >
    > I can think of following techniques (but they're not 100% reliable)
    >
    > - Check if a HTTP_REFERER header exists, and if it's value is an URL in
    > your website.
    >
    > - Check if a cookie is present (the cookie should be generated on all the
    > pages in your website).
    >
    >
    > --
    > Tim Van Wassenhove <url:http://www.timvw.be/>
     
    Henning Krause [MVP - Exchange], Jan 21, 2007
    #4
  5. Med

    Med Guest

    >It depends on what you mean by "hot-linked".

    "Hot-Link" usually refers to the a URL embeded in the html to read a
    file/image from another source/website instead of local file/image on the
    web server's Folder. (i.e. <img
    src="http://www.otherpeopleswebsite.com/images/cat.jpg"> instead of <img
    src="images/cat.jpg">)

    Thank you all for the suggestions. I think the http_referrer is the easier
    option, however writing a custom IHttpHandler seems interesting too.


    Regards

    Med

    "Med" <> wrote in message
    news:%...
    > Hi,
    >
    > Is there a way to detect in asp.net if images are hot-linked from another
    > websites? I intend to create a default image and serve that image instead
    > of the image requested from another website?
    >
    >
    > Kind Regards
    >
    > Med
    >
     
    Med, Jan 21, 2007
    #5
  6. Med

    Scott M. Guest

    Ok, haven't heard that one. I usually just hear folks talk about "external
    links".


    "Med" <> wrote in message
    news:...
    > >It depends on what you mean by "hot-linked".

    >
    > "Hot-Link" usually refers to the a URL embeded in the html to read a
    > file/image from another source/website instead of local file/image on the
    > web server's Folder. (i.e. <img
    > src="http://www.otherpeopleswebsite.com/images/cat.jpg"> instead of <img
    > src="images/cat.jpg">)
    >
    > Thank you all for the suggestions. I think the http_referrer is the
    > easier option, however writing a custom IHttpHandler seems interesting
    > too.
    >
    >
    > Regards
    >
    > Med
    >
    > "Med" <> wrote in message
    > news:%...
    >> Hi,
    >>
    >> Is there a way to detect in asp.net if images are hot-linked from another
    >> websites? I intend to create a default image and serve that image instead
    >> of the image requested from another website?
    >>
    >>
    >> Kind Regards
    >>
    >> Med
    >>

    >
    >
     
    Scott M., Jan 21, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. IAmIronMan

    Beware of scorpion53061(theft)

    IAmIronMan, Dec 24, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    411
    Bob Lehmann
    Dec 24, 2003
  2. Nick Gilbert
    Replies:
    7
    Views:
    437
    Steven Cheng[MSFT]
    May 31, 2004
  3. CB
    Replies:
    9
    Views:
    563
  4. E. Robert Tisdale

    identity theft

    E. Robert Tisdale, Feb 24, 2005, in forum: C Programming
    Replies:
    27
    Views:
    703
    Mark McIntyre
    Feb 28, 2005
  5. M

    Preventing image theft

    M, Jun 2, 2007, in forum: HTML
    Replies:
    6
    Views:
    392
    mr rudeforth
    Jun 4, 2007
Loading...

Share This Page