Results 1 to 8 of 8

Thread: virus's written in assembler?

  1. #1

    virus's written in assembler?

    Since I am incredibly stupid when it comes to computers, i thought assembler was a programming language like C or C++ and could run on any machine. Only recently did I discover that the Assembler language changes by which computer you are using it, so that it is much harder for comptuers to trade programs and source code with each other. This brings me to virus's, which I have read to be sometimes written in assembler. My question is, how does a program written in a particular version of a programming language infect a computer which cannot understand it?

  2. #2
    Junior Member
    Join Date
    Mar 2003
    Posts
    14
    It's about the same for any programming language. A virus written to infect windows probably will not affect linux. The filesystems are different and if a virus affects a regular user in linux it cannot affect any files outside of that users permissions without using some kind of exploit for the OS itself.

  3. #3
    Even with C/C++ is not portable across every OS or architecture. The Win API is diferent from the Linux API, so if you make a program in Win that uses Win API calls, then that program will probably not work somewhere else.

    As for assembler, not all assembler code works for all machines. Virus writers try to use code they know will work for a large number of machines, and use the interrupts, flags and routines that will work with DOS or Win. However, not all virii work for every wintel box. For instance , the CIH family will not work with WinNT, but Win95/DOS.

    If you want more help, PM me.

  4. #4
    Actually you'll find that the includes are often slightly different also when viewing the actual source. But you think of "portable" as being a very standardised syntax which takes very little to almost nothing to slightly modify to suit the needs of another OS. Don't confuse this with grabing a compiler, createing a .exe, then watching it instantly jump platform or something like that.

    "programming language infect a computer which cannot understand it?"

    I have once seen a windows virus which searched for ELF files, then placed another entirely different virus inside them which was designed to suit the needs to do various things under a *nix platform. I forgot the name but It was created by Benny I beleave. But even then you can also in some ways be tied down to what distro the user has. But lets not forget scripts... one of the major things which limits those are mainly differences in command/file structure but its nothing that a bunch of if then statements couldn't fix.

    Its funny you should mention virii. Been reading a few VX e-zines have we? I myself have recently grabed an assembler a few days ago except I have no interest in malware. I'd go for MASM if I were you... you could compair it to HLA becuase of the tools but MASM is much easier to fallow along and understand I think. I've found waaaaay more (and better) examples, help, and stuff to fallow with MASM rather than anything else if im stumped or lazy.

  5. #5
    Yup. Read the stuff over at 29A they are ****ing geniuses. Benny and Zombie are very, very good. As stated API calls are not cross platform. However the problem with ASM as compared to C is that it only runs on certain types of processors I believe. Like you probably can't get a x86 running on a non-x86 related box. Pure C++ is cross platform although I don't think it would do much because it ends up being compiled in a format that is readible by the operating system it is compiled on.

    -Cheers-

  6. #6
    Senior Member nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,188
    My question is, how does a program written in a particular version of a programming language infect a computer which cannot understand it?
    Another thing to bear in mind is that a virus is an EXECUTABLE, that is it is an "object" NOT source code. For example, a virus written in Delphi will probably run on your machine, even though you do not have Delphi.

    For example, look at the programs to install new hard drives.........they will boot into something like Caldera DOS, then run quite happily?

    Cheers

  7. #7
    For example, a virus written in Delphi will probably run on your machine, even though you do not have Delphi.
    If you compile an EXE out of pure C++ it won't run on linux. If you compiled the same source on linux it would only work on something that can read the binary.

    -Cheers-

  8. #8
    Senior Member nihil's Avatar
    Join Date
    Jul 2003
    Location
    United Kingdom: Bridlington
    Posts
    17,188
    PM8228,

    That is true, just as stuff that works on *nix will not run on a mainframe or IBM midrange? and vice versa, the file systems are also a problem? but programs written for DOS/Windows will tend to work.

    Just look at viruses and what they will run on?

    Assembler is a pretty universal language, so runs on quite a variety of OSes, file system permitting.

    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •