 Originally Posted by Ynot
A "program" is not a single thing
it's a composite entity that ends up with the CPU executing one or more instructions
think of it like a complete person - has many parts
A "virus" is just a set of CPU instructions
it is not a program
think of it as some blood - it is not a complete person
A program contains, amongst other things, a set of instructions for the CPU to execute
these instructions need to know where they are in memory
When a Windows "program" is executed,
the first thing it does is ask Windows "Where am I?, and where can I store internal variables?, by the way, I am 100 bytes in size"
Windows will answer, "You are loaded at memory address 1000 through 1099, you are allowed to use 1100 through 1199 for storing variables"
"Great", says the program, "based on this information, I will now execute my payload"
A virus contained within a program will disrupt and manipulate this communication in order to infect other files
it will misinform Windows of it's hosts attributes
and in doing so, gain write access to areas of memory outside of it's hosts actual footprint
All "programs" follow the same design, so the viral code "knows" what to do, and what to change, in order to copy itself to another program
The virus has just altered another executable in memory
It has replicated
Your talking to a guy who occasionally programs in asm, I know how a program sets itself up and communicated with the OS.
What you described sounds like a worm, which is only one type of virus. Viruses come in many forms, some install software and dlls. Usually they do it two at a time, so if you end one process, the other one will restart it.
|
|
Bookmarks