Results 1 to 8 of 8
  1. #1
    TonyMane()'s Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    3ncrypted
    Posts
    258
    Reputation
    168
    Thanks
    4,575
    My Mood
    Amused

    How would I go about doing this?

    I'm at the ending of a little project I'm working on. The tool is deleting itself after it runs, before it deletes I want to damage the file and then have it delete. So I need to make a file shredder. I was reading online about how you can write to it as a text file, but it was not working for me.
    Last edited by TonyMane(); 09-10-2015 at 07:52 PM.

  2. #2
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    Deleting bytes of the file you mean?
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  3. The Following User Says Thank You to Mayion For This Useful Post:

    TonyMane() (09-11-2015)

  4. #3
    R3DDOT's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    C://Windows/system32
    Posts
    347
    Reputation
    38
    Thanks
    2,366
    My Mood
    Cheerful
    Quote Originally Posted by TonyMane() View Post
    I'm at the ending of a little project I'm working on. The tool is deleting itself after it runs, before it deletes I want to damage the file and then have it delete. So I need to make a file shredder. I was reading online about how you can write to it as a text file, but it was not working for me.
    So you're trying to make the program delete itself. But why do you want it to "damage" the file before deleting itself lol?

  5. The Following User Says Thank You to R3DDOT For This Useful Post:

    TonyMane() (09-11-2015)

  6. #4
    TonyMane()'s Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    3ncrypted
    Posts
    258
    Reputation
    168
    Thanks
    4,575
    My Mood
    Amused
    Quote Originally Posted by R3DDOT View Post


    So you're trying to make the program delete itself. But why do you want it to "damage" the file before deleting itself lol?
    Well, I don't want ANYONE to recover it. It's important man, basically all I need before I can call it done..

    - - - Updated - - -

    Quote Originally Posted by Mayion View Post
    Deleting bytes of the file you mean?
    Anything that would make it less recoverable.

  7. #5
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    Quote Originally Posted by TonyMane() View Post
    Well, I don't want ANYONE to recover it. It's important man, basically all I need before I can call it done..

    - - - Updated - - -



    Anything that would make it less recoverable.
    By deleting or damaging the file's data won't matter if the user recovered the previous version of the executable.
    Your best bet would be damaging the file, deleting it and possibility making a registry key to deny the file from opening. (If registryKey "xx" = True : Application.Exit : functionDelete()) something like that.
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  8. #6
    TonyMane()'s Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    3ncrypted
    Posts
    258
    Reputation
    168
    Thanks
    4,575
    My Mood
    Amused
    Quote Originally Posted by Mayion View Post


    By deleting or damaging the file's data won't matter if the user recovered the previous version of the executable.
    Your best bet would be damaging the file, deleting it and possibility making a registry key to deny the file from opening. (If registryKey "xx" = True : Application.Exit : functionDelete()) something like that.
    Okay, and How would I go about damaging the file?

  9. #7
    R3DDOT's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Location
    C://Windows/system32
    Posts
    347
    Reputation
    38
    Thanks
    2,366
    My Mood
    Cheerful
    Quote Originally Posted by TonyMane() View Post
    Okay, and How would I go about damaging the file?
    I don't think the registry key will do anything.
    About "damaging" the file, idk I guess you could delete the PE headers of each module to make reversing harder, but I don't know much about this, maybe @Hitokiri~ could shed some light over this matter.
    Last edited by R3DDOT; 09-11-2015 at 08:28 AM.

  10. The Following User Says Thank You to R3DDOT For This Useful Post:

    TonyMane() (09-11-2015)

  11. #8
    殺す必要がある唯一のものは殺されるために準備され人 々である。
    Premium Member
    Hitokiri~'s Avatar
    Join Date
    Oct 2012
    Gender
    female
    Location
    Cancer.
    Posts
    1,201
    Reputation
    24
    Thanks
    937
    My Mood
    Bitchy
    Quote Originally Posted by R3DDOT View Post


    I don't think the registry key will do anything.
    About "damaging" the file, idk I guess you could delete the PE headers of each module to make reversing harder, but I don't know much about this, maybe @Hitokiri~ could shed some light over this matter.
    Code:
    // "Damaging" a file really won't do anything. What you want to do is prevent recovery tools from retrieving the file after it is permanently deleted.
    // Read this: https://lifehacker.com/what-really-ha...our-1659889380
    
    // So essentially what you want to do AFTER you delete your file is to fill all these gaps where your file USED to reside on your HDD/SSD.
    // To do that, just do a large amount of write operations. ( File Shredders work the same way )
    
    // Using: https://msdn.microsof*****m/en-us/lib...(v=vs.85).aspx ( CreateFile )
    // https://msdn.microsof*****m/en-us/lib...(v=vs.85).aspx ( WriteFile )
    // https://msdn.microsof*****m/en-us/lib...(v=vs.85).aspx ( CloseHandle )
    
    // Some pseudocode:
    for( var i = 0; i < maxNumFilesToCreate; i++ )
       var sz = GetRandomFileSizeMB( 30 ); // 30 MB max per file
       var path =
    Code:
    GetRandomFilePath();
       var file = CreateFile( path );
       WriteFile( file, RandomBuffer( sz ) );
       CloseHandle( file );
       // Delete the file after.
       DeleteFile( path );
    endfor
    


    More advanced implementations would actually read the file journel and overwrite the sectors on the disk directly. This method merely attempts to "guess" that it's overwriting a file segment. Doing it enough times will make the file unrecoverable but file-journal reading is far more accurate.
    Last edited by Hitokiri~; 09-11-2015 at 01:42 PM.

  12. The Following 2 Users Say Thank You to Hitokiri~ For This Useful Post:

    Sazor98 (09-21-2015),TonyMane() (09-11-2015)

Similar Threads

  1. [Help Request] How would one go about doing so?
    By CJacko in forum Realm of the Mad God Help & Requests
    Replies: 0
    Last Post: 04-23-2014, 08:29 AM
  2. [Help Request] How would I go about this
    By Mvan12 in forum Visual Basic Programming
    Replies: 20
    Last Post: 02-04-2014, 03:17 AM
  3. [Help] How would I go about making this?
    By xBear Grylls in forum Visual Basic Programming
    Replies: 1
    Last Post: 03-19-2013, 02:31 PM
  4. [Help] How would you make sense of this to change it?
    By ballin299 in forum Android / iOS Programming
    Replies: 4
    Last Post: 08-14-2012, 06:55 PM
  5. How would i go about doing this
    By TJC20207 in forum Combat Arms Mod Discussion
    Replies: 1
    Last Post: 04-25-2010, 04:20 PM