[General] How to Prevent Deleting a file ?

Discussion in 'Scripting' started by Seven7i, Feb 22, 2011.

  1. Seven7i

    Seven7i MDL Novice

    Sep 21, 2010
    2
    0
    0
    Hello every one

    This is my first topic here, I dont know this is the right place to start this topic or not. if not mods plz move/del this topic

    I have a .dll file in my C:\Program files\ which is getting deleted my anti virus right after every restart. even I have added this to exclusion list it getting deleted.

    I wanted this file to be existed at any cost. I have trying by changing owner s**t / permissions etc but no use.

    Can someone pls suggest me a way to protect a .dll file which is getting deleted (any chances using windows registry or group policy >)

    Thanks in advance
    Seven7i
     
  2. shani0610

    shani0610 MDL Novice

    Mar 29, 2010
    2
    0
    0
    #2 shani0610, Sep 10, 2011
    Last edited by a moderator: Apr 20, 2017
    make it system file. may be that will whitelist the file automatically and antivirus cant delete it. :p

    lets say your .dll file "plz_dnt_dlt_me.dll" is located at c: drive. i.e its location is "c:\plz_dnt_dlt_me.dll"

    To make it system file, goto command prompt and type
    Code:
    attrib +s c:\plz_dnt_dlt_me.dll"
    Let me know as soon as you successfully saved the dll.
     
  3. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,803
    45,297
    150
    If its getting nuked by AV, its probably not going to be able to stop that unless you exclude it.

    The change permissions, hide/system file, and all those techiques are so commonly used by viruses, and any AV worth a crap will bypass them (note that the AV is hooked deep into the system and likely has drivers to kill the file even if in use).

    Unless you code some kind of rootkit that defeats all AV and hides that file, you are going to have to exclude the file.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,519
    7,108
    120
    Try encrypt dll assemblies ...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...