none
Making an Antivirus in C# RRS feed

  • Question

  • I have a project of making antivirus software using C#. And the only condition kept is I have to use C# compulsorily. 
    How can I make it. Is there any built in libraries in .NET Framework that have access to the machine level, that can help me in building an Windows operated Antivirus Software in C#. Please give me detailed guidelines, I'm just new to C# language.
    Saturday, July 14, 2018 1:33 PM

All replies

  • If you don't mind me asking, why create your own? 

    Creating such a program is not suited to a windows forms project in the first place, if you were considering this it's unwise. Creating this as a service would be a starting point yet even so there is a huge amount of things to consider when writing such a program. In the time you would take to write this and end up with a solution that does not match retail programs you could have saved a huge amount of time and energy doing something more productive with your time.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Saturday, July 14, 2018 6:02 PM
    Moderator
  • A beginner such as you cannot do it.

    If this is a class assignment (I am sure it is) then you must understand how AV software works, well enough to decide what to do. One very simple thing that an AV might do is to search exe and DLL files for specific binary data that is actually malicious code. You could do that in C#. Something else that an AV would do is to process each file that is changed at the time the file is changed. That would require advanced understanding of Windows and should be considered too advanced for you.

    As a student, to do this project, you should learn about AV software. If this is not a class assignment then just give up trying to do it.



    Sam Hobbs
    SimpleSamples.Info

    Saturday, July 14, 2018 10:19 PM
  • I have a project of making antivirus software using C#. And the only condition kept is I have to use C# compulsorily. 
    How can I make it.  Please give me detailed guidelines, I'm just new to C# language.

    Did you try searching thr web for examples and suggestions?

    If you did, you should have found numerous links such as:

    how to create antivirus program in c# step by step
    https://www.bing.com/videos/search?q=how+to+program+antivrus&docid=607988992975046067&mid=E478ECC568CBA13A1604E478ECC568CBA13A1604&view=detail&FORM=VIREHT

    Visual C# Tutorial - Making a simple "Antivirus" program
    https://www.bing.com/videos/search?q=how+to+program+antivrus&&view=detail&mid=C8D5131B1351B3ED35FFC8D5131B1351B3ED35FF&&FORM=VDRVRV

    You have told us nothing about the context of this assignment. If it's
    a course assignment then your choices are more limited. If it's part
    of a commercial application project (highly unlikely) then you can make
    use of one or more of the API/SDK libraries available for licensing from
    a commercial AV provider. For example Bitdefender's is used by many
    different commercial AV products.

    Another option is to use Google's Virus Total API to create an application
    that scans files by submitting them to Virus Total for scanning by many
    commercial AV products. An example of the type of application which does
    this is:

    VT Hash Check
    http://www.boredomsoft.org/vt-hash-check.bs

    Development of a commercial-grade AV/AM/IS product requires collaboration 
    in a team of a fair number of highly skilled and technically educated
    professional developers. Developing one from scratch and bringing it to
    the level where it is useful and commercially viable can take years.

    - Wayne

    Sunday, July 15, 2018 12:28 AM
  • Wayne, your response is at least more rational. I hope it helps more than mine. It is difficult to know whether Hemant Karekar should be discouraged or encouraged.


    Sam Hobbs
    SimpleSamples.Info

    Sunday, July 15, 2018 1:54 AM
  • I have visited those links already,

    how to create antivirus program in c# step by step

    Which provides to search string "Trojan" or similar virus strings in files, which is not what an actual AV software does.

    Visual C# Tutorial - Making a simple "Antivirus" program
    Is just a high resolution version of above

    Sunday, July 15, 2018 7:46 AM

  • how to create antivirus program in c# step by step

    Which provides to search string "Trojan" or similar virus strings in files, which is not what an actual AV software does.


    On the contrary, signature-based scanning of files is still very much a
    part of most AV products.

    Well. you've never specified *exactly* what you want to do in your
    program.

    What do *you* think an antivirus program does? How do *you* see the
    program you want to write detecting viruses, trojans, worms, etc.?

    Is it going to be a signature-based scan only? How are you going to
    create and maintain an up-to-date database of signatures?

    Is it supposed to do heuristic analysis too?

    Is it supposed to do on-demand scanning only or real-time scanning
    as well? If real-time, will it incorporate a behavior blocker?
    A "sandbox" for virtualized pre-testing of unknown applications which
    are trying to execute? HIPS (Host Intrusion Prevention System)?

    Will it be using and maintaining a whitelist (allowed apps) or a
    blacklist (prohibited apps), or both?

    Is this supposed to be an actual, real AV that can and will be used in
    the "real world"? Or is it just a simulation of how an actual AV may
    work, with no need for actual detection of real threats?

    As previously stated, you have not given any hint about the context of
    this project. If it is an assignment in a first-year programming course
    then the expectations will (should) be far less rigorous and complex
    than what might be expected in the final year of an advanced degree
    computer science program - or an actual commercial product.

    You have also neglected to say what your experience is in programming in
    general, and with which languages you have worked. (Beyond saying that
    you are new to C#.)

    - Wayne

    Sunday, July 15, 2018 9:40 AM
  • I have visited those links already,

    how to create antivirus program in c# step by step

    Which provides to search string "Trojan" or similar virus strings in files, which is not what an actual AV software does.

    Visual C# Tutorial - Making a simple "Antivirus" program
    Is just a high resolution version of above

    You should have said that in your original post. If it is true that you did research then you should have described what you have found. There is very much more you could have said in the original post. To get the best responses, make the question interesting. Asking a very vague question that includes "give me detailed guidelines" will not get the best responses.


    Sam Hobbs
    SimpleSamples.Info

    Sunday, July 15, 2018 5:54 PM