7 Replies - 2542 Views - Last Post: 09 October 2012 - 07:57 AM Rate Topic: -----

#1 priya24dec  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 9
  • Joined: 13-June 12

code to avoid malicious image being upload in asp.net

Posted 08 October 2012 - 04:17 AM

code to avoid malicious image being upload in asp.net
Is This A Good Question/Topic? 0
  • +

Replies To: code to avoid malicious image being upload in asp.net

#2 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 584
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: code to avoid malicious image being upload in asp.net

Posted 08 October 2012 - 04:18 AM

What code have you tried?
Was This Post Helpful? 0
  • +
  • -

#3 priya24dec  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 9
  • Joined: 13-June 12

Re: code to avoid malicious image being upload in asp.net

Posted 08 October 2012 - 04:28 AM

code to avoid malicious image being upload in asp.net



- actully i want fileuploader using asp.net which upload valid image only..but my fileuploader uploading invalid image like image with malicious code(i.e with extension .exe)means i have check extension and all in my code...but i want simultanous checking of image content,so that hacker will not able to upload malicious image etc..
Was This Post Helpful? 0
  • +
  • -

#4 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 584
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: code to avoid malicious image being upload in asp.net

Posted 08 October 2012 - 04:31 AM

What have you tried? You only get out what you put in.
Was This Post Helpful? 0
  • +
  • -

#5 priya24dec  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 9
  • Joined: 13-June 12

Re: code to avoid malicious image being upload in asp.net

Posted 08 October 2012 - 04:42 AM

View PostDimitriV, on 08 October 2012 - 04:18 AM, said:

What code have you tried?


Actully i have tried many ways,but in that it only checks extension of image and but not checking content of image...so i want to check content of image...so please tell me suggestion..
Was This Post Helpful? 0
  • +
  • -

#6 DimitriV  Icon User is offline

  • They don't think it be like it is, but it do
  • member icon

Reputation: 584
  • View blog
  • Posts: 2,738
  • Joined: 24-July 11

Re: code to avoid malicious image being upload in asp.net

Posted 08 October 2012 - 04:49 AM

For any virus checking thing: you need to have a list of signatures that the viruses in files could potentially hold. Also, I'd suggest looking at the hex values of the files to tell you what type they really are. Just because someone renamed a png to a jpg doesn't make it a jpg. Look at the hex codes to determine what the file type really is.
I'm not giving code for that -- I don't even know if its possible. An expert will probably be alike to help you more…

This post has been edited by DimitriV: 08 October 2012 - 04:53 AM

Was This Post Helpful? 0
  • +
  • -

#7 priya24dec  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 9
  • Joined: 13-June 12

Re: code to avoid malicious image being upload in asp.net

Posted 08 October 2012 - 06:51 AM

Anyways thanks for your reply..


But my question is that my image is with .jpeg extension but after opening its exceutable file(i.e malicious image).and i don't want to upload excutable image(i.e malicious image) with jpeg extension...

and i allready check extension(jpeg,jpg,png)and all.so my code checking only extension,and after cheking extension it allow for malicious image(with jpeg extension) also.

so please tell many idea how to solve it
Was This Post Helpful? 0
  • +
  • -

#8 h4nnib4l  Icon User is offline

  • The Noid
  • member icon

Reputation: 1182
  • View blog
  • Posts: 1,677
  • Joined: 24-August 11

Re: code to avoid malicious image being upload in asp.net

Posted 09 October 2012 - 07:57 AM

Let me explain to you how things work here, before this goes any further. We are not a code writing service. We don't get paid to help you. If you need help with something that you're actively working on, then ask your question, post your code, show us the errors, or tell us why the result isn't what you're hoping for. Research exhaustively so you know what the experts are talking about when you get replies, and so that you can have actual dialog when somebody asks a question or makes a suggestion. But you will get absolutely nowhere asking a question like the one you're asking. If you want somebody's code that effectively blocks malicious uploads from the internet, then you better be ready to pony up the cash, because that's what everybody else who doesn't write their own has to do.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1