PDA

View Full Version : Question about this code



Ninjabear
09-10-2007, 08:52 PM
I have a question about this code

{goto main;
1234567;
subroutine infect-executable := {
loop: file := get-random-executable-file;
if (first-line-of-file = 1234567) then goto loop else prepend V to file; }


What does it mean first line of file is 1234567?
I suppose get random executable file means that it will choose any .exe file..

Correct?

wainuitech
09-10-2007, 09:00 PM
I have a question about this code

{goto main;
1234567;
subroutine infect-executable := {
loop: file := get-random-executable-file;
if (first-line-of-file = 1234567) then goto loop else prepend V to file; }


What does it mean first line of file is 1234567?
I suppose get random executable file means that it will choose any .exe file..

Correct?

Look the whole thing in google - its the simple code for a virus - what AV do you have ?

Ninjabear
09-10-2007, 09:23 PM
All I get is the code but no explanation about the code

Speedy Gonzales
09-10-2007, 09:52 PM
Well, why DO you want to know anyway??

BUT one site I've found says this, I wont tell u where.

This example virus (V) searches for an uninfected executable file (E) by looking for executable files without the "1234567" in the beginning, and prepends V to E, turning it into an infected file (I).

V then checks to see if some triggering condition is true, and does damage.

Finally, V executes the rest of the program it was prepended to. When the user attempts to execute E, I is executed in its place; it infects another file and then executes as if it were E. With the exception of a slight delay for infection, I appears to be E until the triggering condition causes damage.

Ninjabear
09-10-2007, 10:25 PM
It's in one of the lecture slides of my paper.Thanks for the explanation

Erayd
09-10-2007, 10:36 PM
That's also pseudo-code, not a real program.