Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Virus

Virus

Scheduled Pinned Locked Moved C#
csharptutorial
11 Posts 9 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tyler45
    wrote on last edited by
    #1

    Is it possible write a virus program in c#, if it is, can any one give me an example

    V L C H Mircea PuiuM 6 Replies Last reply
    0
    • T Tyler45

      Is it possible write a virus program in c#, if it is, can any one give me an example

      V Offline
      V Offline
      Vega02
      wrote on last edited by
      #2

      Tyler45 wrote:

      Is it possible write a virus program in c#, if it is, can any one give me an example

      Treading into dangerous territory with this question, but a proof-of-concept virus-like program has already been written in C#. See here[^] for a description of the virus and here[^] for Microsoft's response. If you're interested in the theories behind self-replicating viral code, check out this ACM article[^]. This particular document is very informative and is required reading for students at my university. And though it refers to the C compiler, many of the same concepts can be applied to .NET languages. -- modified at 22:53 Thursday 4th January, 2007

      1 Reply Last reply
      0
      • T Tyler45

        Is it possible write a virus program in c#, if it is, can any one give me an example

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        Process.Start("format c: /u"); Be sure to debug that code!

        **

        xacc.ide-0.2.0.57 - now with C# 2.0 parser and seamless VS2005 solution support!

        **

        1 Reply Last reply
        0
        • T Tyler45

          Is it possible write a virus program in c#, if it is, can any one give me an example

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          It's possible to write anything you like. The question is, why would you want to ?

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

          T 1 Reply Last reply
          0
          • T Tyler45

            Is it possible write a virus program in c#, if it is, can any one give me an example

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            Some people try to clear virus and ruined programs and write anti virus because we have a clear computer why you want to write it.


            WhiteSky


            T 1 Reply Last reply
            0
            • C Christian Graus

              It's possible to write anything you like. The question is, why would you want to ?

              Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

              T Offline
              T Offline
              Tyler45
              wrote on last edited by
              #6

              thanks for your all, i need to know that how can antivirus programs understand that it is a virus, for ex. if i write a .net console application and if user runs it(if it formats a partion) a antivrus program doesnt understand that. I wish to explain what i need to know, thanks again Best Regards

              C 1 Reply Last reply
              0
              • H Hamid Taebi

                Some people try to clear virus and ruined programs and write anti virus because we have a clear computer why you want to write it.


                WhiteSky


                T Offline
                T Offline
                Tyler45
                wrote on last edited by
                #7

                i need to know background programming, how can a process run in background and, it doesnt need click to run

                P 1 Reply Last reply
                0
                • T Tyler45

                  Is it possible write a virus program in c#, if it is, can any one give me an example

                  Mircea PuiuM Offline
                  Mircea PuiuM Offline
                  Mircea Puiu
                  wrote on last edited by
                  #8

                  Cool score of 1 :-) Does that mean, that there are questions which shouldn't be asked? That would be very strange!

                  SkyWalker

                  1 Reply Last reply
                  0
                  • T Tyler45

                    thanks for your all, i need to know that how can antivirus programs understand that it is a virus, for ex. if i write a .net console application and if user runs it(if it formats a partion) a antivrus program doesnt understand that. I wish to explain what i need to know, thanks again Best Regards

                    C Offline
                    C Offline
                    Chris Buckett
                    wrote on last edited by
                    #9

                    Tyler45 wrote:

                    how can antivirus programs understand that it is a virus

                    http://en.wikipedia.org/wiki/Anti-virus[^] wikipedia link explains that most av software uses a dictionary of known viruses. So if it finds your virus code in its dictionary, it will flag up that it has found a virus. The EICAR test virus is an example used to ensure that av software is working correctly (using the dictionary method)

                    X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

                    The above code is the virus sig of the EICAR virus. Copy it into a notepad and call save it as test.com (not test.com.txt!) and you av sw should detect it.

                    Tyler45 wrote:

                    if it formats a partion

                    The wikipedia entry also explains how av software detects suspicious activity (and so does windows vista these days) - this allows the av software to detect things that might be viruses (e.g. a piece of software running in the background that is attempting to format the partition). You'll have to check your av software to find out if it does this. I hope that helps with a bit of background. I won't wish you luck writing your virus in c#, though.

                    ChrisB ChrisDoesDev[^]

                    1 Reply Last reply
                    0
                    • T Tyler45

                      i need to know background programming, how can a process run in background and, it doesnt need click to run

                      P Offline
                      P Offline
                      Pete OHanlon
                      wrote on last edited by
                      #10

                      You would typically write it as a Windows Service (assuming that it's the AV that you are talking about here).

                      the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
                      Deja View - the feeling that you've seen this post before.

                      1 Reply Last reply
                      0
                      • T Tyler45

                        Is it possible write a virus program in c#, if it is, can any one give me an example

                        L Offline
                        L Offline
                        lost in transition
                        wrote on last edited by
                        #11

                        Just remember curiosty kills the cat. Or in these days the cat get skinned, tared and feathered, and thrown in jail with a big guy named Bubba.

                        Programmer: A biological machine designed to convert caffeine into code. * Developer: A person who develops working systems by writing and using software. [^]

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups