Thread: how to deactivate TSR ,how could we restore partition table

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    10

    Unhappy how to deactivate TSR ,how could we restore partition table

    hi there

    i am working on boot sector viruses and antiviruses and making an TSR antivirus using C.
    but i have a problem
    i can easily make my antivirus reside but how to deactivate it from memory????


    one more question..
    if a virus destroyes/overwrites/appends/copy anywhere the partition table,how could i restore it back.

    thanks.
    Last edited by sadat; 03-27-2002 at 01:09 AM.

  2. #2
    Patent Pending GSLR's Avatar
    Join Date
    Sep 2001
    Posts
    134

    Umm

    Hi

    Not to sure if you can restore a partition table once it is removed, but check out microsofts web site.
    They should have something there, I found the asm to remove any partition there.











    And To All Those Opposed, Mmm Well

  3. #3
    Im a Capricorn vsriharsha's Avatar
    Join Date
    Feb 2002
    Posts
    192

    Thumbs up

    Hi there,
    I havent worked with removing the TSR's from memory but for the other part... You have the partition table located on the disk in some bytes (I would refer my book and get back on it) and what u do is, create a backup copy of those bytes in a file or something. When you need to restore ur partition table, simply re-dump those bytes into their original location.
    I hope this would solve the second part of ur problem.

    A possibility for the first part of the problem,....

    First you reset the Interrupt so that it points to the default interrupt handler (removing ur functions address there) and then use a function like free or something to remove ur program from memory.

    Best Regards

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  2. extra word printing
    By kashifk in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2003, 04:03 PM
  3. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM
  4. hardware interaction in c
    By vineetwadwekar in forum C Programming
    Replies: 6
    Last Post: 03-29-2002, 09:01 AM
  5. REad partition table?
    By Nutshell in forum C Programming
    Replies: 0
    Last Post: 03-29-2002, 07:57 AM