Source Code

Source code found on your system can be infected; usually by adding Trojan code to it.

While rare, it is possible to infect actual programming source code found on your computer.

Source code comes in many forms because of the many different types of compilers and languages available. This is one reason why source code viruses are not particularly common. The other is that so few people actually write programs it becomes difficult for a source code-only virus to find victims to infect.

Also, because of programming style and differing designs that individuals use when they write program code it’s difficult to write a virus that actually spreads via this mechanism. More typically, a source code virus will not infect via source code but simply add Trojan material to existing source code so that when it is compiled and run it does something different than expected.

Die Hard is one example of a type of source code virus. The virus actually spreads by infecting COM and EXE files (a file virus) but, as part of its payload, in drops Trojan code into any ASM (assembly language) and PAS (Pascal) source files as they are accessed (when the virus is resident in memory).

Source code viruses are not common; but be aware they do exist and have been seen in the wild in the past.

Added 28 Aug 2009: This virus type has once more reared its head in the Delphi W32/InducWeb Link virus. This virus is designed to infect the source code of Delphi which is a variant of the Pascal language originally developed by Borland.

Summary

  • Source code viruses add instructions to existing programming code found on your system.
  • They are rare and the code they add is typically a Trojan instead of a full virus.
Up Arrow What Viruses Infect Up Arrow
Prior Page Next Page
Batch Files Visual Basic Files

Comments from original post:

NARAYANA SARMA
Said this on 2009-08-13 At 08:36 am
please give the source of code of antivirous becoze I am in VI semister submitted my project any where i did not got the source code of antivirous in this i search the IE please replay me and code.
#2
DaBoss
Said this on 2009-08-13 At 11:23 am
In reply to #1
CKnow provides no code for viruses or anti-virus software. Anti-virus software is quite complex and I doubt any of the anti-virus software vendors would part with their source code.

#3
christian salacup
Said this on 2009-09-20 At 10:18 pm
please reply me the source code.. tnx
#4
DaBoss
Said this on 2009-09-20 At 10:41 pm
In reply to #3
You’re kidding right? Virus source code is NOT available here – not to you and not to anyone. The world doesn’t need any more virus writers. Too many already. Sorry.

#6
ganesh
Said this on 2009-11-27 At 01:53 am
how does virus inform hacker about the infected one’s data?
#7
DaBoss
Said this on 2009-11-27 At 12:53 pm
In reply to #6
Viruses will use some form of “call home” if they are designed to notify the maker of an infection. The call can go to a website, an FTP address, a chat location, a Twitter account, or any of the other types of sites designed to accept data from the Internet.

#10
ayush rawat
Said this on 2010-02-05 At 02:48 am
hi da boss,
iam in 6th sem i want to make a project…so you please help me in makin a project…… plz tell how can i make a project and in which topic in detail [Sorry, you’ll have to do your own homework. Ask your teacher if you need help. –DaBoss]

#12
reyjans
Said this on 2011-01-03 At 02:12 am
plss give a code for trojan virus we will promise to use it on a educational background only…
[No. –DaBoss]

#13
Hasrat
Said this on 2011-03-05 At 11:20 pm
I need to know that if the trojan virus currupts the data (mostly for USB )…… is there any way to take our data without any kind of infection to run ir safely.

[If a Trojan or virus corrupts data getting that data back is a matter of what sort of corruption happened. If the data are encrypted then if you have or can get the key it can be unencrypted. Or, some service may be able to use brute force techniques to break the encryption. If the data are overwritten due to the nature of how Flash is written a service might be able to recover it. Not certain what the last part of your question asks. –DaBoss]