Showing posts with label coding. Show all posts
Showing posts with label coding. Show all posts

Monday, August 16, 2010

How to make a simple virus/malware scanner

88 comments
Making a working antivirus is a very hard thing because of several reason:
  1. You need to get virus/malware sample which is not easy to get.
  2. Most virus infect the executable file and some use polymorphism making it harder to detect.
  3. Most antivirus use heuristics scan which analyze the file and if the file look suspicious it will flag it and ask the user what to do. This is hard to implement and poor heuristics scan can result many false-positive.
  4. Need a driver which will monitor the system like file read/write.
  5. etc...

Today, I'm going to show you how to make a simple malware scanner (not antivirus) in MSVC2008 C/C++ which use hash to compare file with database. This methods only works on some kind of malware, eg. worm, trojan, or any file which doesn't change itself because we will hash the whole file content.

Read More...