MrKaplan is a tool aimed to help red teamers to stay hidden and clear as much as traces possible. It works by saving information such as the time it ran, under which user and “reverting” the computer to look like before MrKaplan ran.
- Stopping event logging.
- Clearing files artifacts.
- Clearing registry artifacts.
- Can run for multiple users.
- Can run as user and as admin (Highly recommended to run as admin).
- Can save timestamps of files.
- Can exclude certian operations and leave artifacts to blue teams.
- Before you start your operations on the computer, run MrKaplan with
beginflag and whenever your finish run it again with
- DO NOT REMOVE
MrKaplan-Config.jsonfile until you rerun with the
endflag, otherwise MrKaplan will not be able to use the information.
Switches and their Meaning
As you saw from the help command, there are few options that MrKaplan can run with:
- -Users: This option cannot be run with -RunAsUser, the users option allows to delete artifacts for another users on the current PC (the current user comes by default and there is no need to add it).
- -RunAsUser: This option cannot be run with -Users, the RunAsUsers option allows to delete artifact with only user privileges.
- -EtwBypassMethod: This option cannot be run with -RunAsUser, the EtwBypassMethod option allows to choose which method will be selected to stop event logging (You can read more about it in the Event Logging bypass section).
- -Exclusions: This option allows you to control what evidence won’t be cleaned. Current supported evidences:
- eventlogs => Do not stop ETW
- pshistory => Do not overwrite PowerShell history
- userassist => Do not clear UserAssist registry key
- bamkey => Do not clear the BAM registry key.
- inetcache => Do not clear the INet cache folder.
- windowshistory => Do not clear the windows history folder.
- officehistory => Do not clear the office history folder.
- cryptnetcache => Do not clear the CryptNetUrlCache folder.
- prefetch => Do not clear prefetches.
begin: When you want to start your operation use this command with the switches above and MrKaplan will create the fitting config file.
end: When you want to clean up evidences and finished your operation, run this command with the config file in your current directory.
timestomp: When you want to timestomp a file in the end of your operations use this command with -StompedFilePath to save the required information.
- Powershell process that access to the artifacts mentioned in the wiki page.
- Powershell importing weird base64 blob.
- Powershell process that performs Token Manipulation.
- MrKaplan’s config and the YARA rule.
MrKaplan (this link opens in a new window) by Idov31 (this link opens in a new window)
MrKaplan is a tool aimed to help red teamers to stay hidden by clearing evidence of execution.