Security Experts:

Event Logs Manipulated With NSA Hacking Tool Recoverable

Researchers at security firm Fox-IT have developed a tool that allows investigators to detect the use of specific NSA-linked malware and recover event log data it may have deleted from a machine.

The group calling itself Shadow Brokers has published several tools and exploits stolen from the Equation Group, cyberspies believed to be working for the U.S. National Security Agency (NSA). One of the tools leaked by the Shadow Brokers in April is DanderSpritz, a post-exploitation framework that allows hackers to harvest data, bypass and disable security systems, and move laterally within a compromised network.

An interesting DanderSpritz plugin is EventLogEdit, which is designed for manipulating Windows Event Log files to help attackers cover their tracks. While hacker tools that modify event logs are not unheard of, EventLogEdit is more sophisticated compared to others as it allows removal of individual entries from the Security, Application and System logs without leaving any obvious clues that the files had been edited.

“While we understand that event logs can be cleared and event logging stopped, surgically editing event logs is usually considered to be a very advanced capability (if possible at all),” Jake Williams, founder of Rendition Infosec and an expert in Shadow Broker leaks, said after news of the tool emerged. “Knowing that some attackers apparently have the ability to edit event logs can be a game changer for an investigation.”

Since the tool has been made public by the Shadow Brokers, it gives less sophisticated actors the opportunity to cover their tracks and hamper forensic investigations.

Fortunately, Fox-IT researchers have found a way to determine if EventLogEdit has been used on a system, and even recover the event log entries that it removed.

“When eventlogedit is used, the to-be-removed event record itself isn’t edited or removed at all: the record is only unreferenced. This is achieved by manipulation of the record header of the preceding record. Eventlogedit adds the size of the to-be-removed-record to the size of the previous record, thereby merging the two records. The removed record including its record header is now simply seen as excess data of the preceding record,” researchers explained. “You might think that an event viewer would show this excess or garbage data, but no. Apparently, all tested viewers parse the record binXml message data until the first end-tag and then move on to the next record.”

Experts pointed out that the removed records should be seen by organizations that send logs on the fly to a central server, but sophisticated attackers are likely to hijack that machine as well in an effort to hide their activities.

However, since the EventLogEdit tool leaves the removed record and record header in their original state, full recovery of the data is possible.

Fox-IT has released an open source Python script that identifies and exports removed event log records, allowing organizations to check if they have been targeted by the NSA or other threat actor that may be leveraging EventLogEdit. Users who don’t want to bother with compiling the code themselves can download a version of the tool provided as a Windows executable.

Related: Kaspersky May Have Found How Russian Hackers Stole NSA Data

Related: 'Shadow Brokers' Threaten to Dox Former NSA Hacker

view counter
Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.