

Log tampering is common practice in hacking because hackers will always want to cover their tracks from the prying eyes of an organization administrator. The retained history of bash commands is found in the file ~/.bash_history. The thing with bash is that it retains the history of entered bash commands, so unless you clear it, the administrator will be able to see that the Shred command above was entered. In some cases, a text editor may be needed to modify logs regardless, it as easy as modifying a Word file. Inexperienced hackers may not, causing wasted time and an increased chance of detection. Knowing is half the battle, and knowing where the logs are in your target system is crucial for any hacker.īeing that you are an ethical hacker working on behalf of your organization, you will already know their location. Just like that, with one command your logged tracks in Linux have been wiped out. To shred and erase the log file on the target system, run the following bash command: To perform this, you want to use the Shred tool. Linux systems have their own process of log clearing. In the left-hand pane, right-click on the type of logs you want to clear and select Clear All Events.
Common log file system windows#
To perform this simple task, first navigate to Event Viewer under Windows Logs in the folder tree. Windows Event ViewerĮven if auditing has been disabled, it is still smart to clear logs in Windows Event Viewer because actions like disabling auditing will display as an event. This will present the ethical hacker with a window stating that all of the security, application and system logs have been cleared. After compromising the system with Metasploit, use a Meterpreter command prompt and enter the following command: Originally created by Metasploit and Matt “Skape” Miller in 2004, this advanced payload is a type of shell that, without getting too technical, will help to clear all logs in a Windows system in newer versions of Meterpreter.
Common log file system windows 10#
If this occurs in a Windows 10 system or Windows Server 2016, event ID 1102(S) will be displayed as an event, and overlooking this is a common error many beginner hackers make. Please note - if the hacker does not remove clearlogs.exe, it will serve as hard evidence of log tampering. To verify if it has worked, open Event Viewer and check the security logs. This will clear security logs on the target system.

To run the file, enter the following into a command line prompt: Once access to the target Windows system is obtained, the file needs to be installed and then run to clear the security logs. One way is to use the clearlogs.exe file, which can be found here. Presented below are the top methods for performing this track-clearing tactic. There are a few ways to clear logs in Windows systems.

Since logs preserve the evidence trail of hacking activities, clearing logs is the logical next step for ethical hackers to know about. This is important because when possible, hackers like to turn off or alter only the logging that captured their activity - making them harder to track. Knowing this will help the hacker see what is logged. In Windows systems, hackers can use the command line favorite, Auditpol, which will not only allow the hacker to disable auditing but will also allow the hacker to see the level of logging that the organization’s system administrator has set. These steps are:ĭisable auditing is a smart first step for hackers because if logging is turned off, there will be no trail of evidence. There is a four-step process to covering your tracks by tamping with logs that hackers know like the back of their hand. Tampering with logs is the equivalent of covering these obvious tracks that administrators use to catch hackers. It would be impossible to even get to the cookie jar without leaving tracks - just as it would be impossible to gain entry to a system without being detected. Now imagine that this cookie jar is surrounded by fresh snow that covers everything around it. Every cookie thief, or hacker, wants to be able to get in there and do what their dirty deeds before getting caught. In terms of analogies, hacking is sort of like stealing cookies from the cookie jar. Please note that this article is intended as an introduction to log tampering for ethical hacking purposes only.
