Skip to content
WETNav
SecurityObject AccessIn-depth analysis

Event ID 5145: A network share object access check

Event 5145 is generated when detailed object-level access to network shares is performed, logging which specific files or folders within shares are accessed. This event provides granular visibility beyond Event 5140 (share access) for detecting data exfiltration, ransomware file encryption, and unauthorized access to sensitive documents on file servers.

Channel
Security
Logged by default
No
Written on
Target host
Volume
Very high
Audit subcategory
Detailed File Share
Needs a SACL
No

To have this event

  • Enable Detailed File Share: auditpol /set /subcategory:"Detailed File Share" /success:enable /failure:enable

Key fields

Exact XML field names, as they appear in <Data Name="…"> and in SIEM field extractions.

SubjectUserNameAccount that accessed the file
SubjectDomainNameDomain of the account
SubjectLogonIdLogon ID for correlation
ObjectTypeType of object (File/Folder)
IpAddressSource IP address
IpPortSource port
ShareNameShare name
RelativeTargetNameRelative path and filename within the share
AccessMaskAccess rights (0x1=ReadData, 0x2=WriteData, 0x4=AppendData, 0x80=ReadAttributes)
AccessListTextual representation of access rights
Have one of these events? Paste it into the decoder

In an investigation

Event 5145 provides file-level access visibility within network shares, which is essential for detecting data theft, ransomware encryption, and unauthorized document access. While Event 5140 logs access to shares themselves, Event 5145 captures detailed file and folder operations including read, write, delete, and execute actions on specific objects within shares. This granular visibility enables security teams to detect attackers staging sensitive data for exfiltration, ransomware encrypting files across network shares, or unauthorized users accessing confidential documents. The event includes the user account, source IP, share name, file path, and access mask showing requested permissions. Security teams should enable Event 5145 on file servers containing sensitive data and monitor for unusual access patterns, mass file enumeration, or access to restricted documents by unauthorized accounts.

What it can reveal

  • Data exfiltration detection through monitoring access to sensitive files on file servers by unexpected accounts or from unusual source IPs
  • Ransomware file encryption visible through rapid write/delete operations across thousands of files on network shares
  • Insider threats accessing confidential documents outside their authorized business unit or job role
  • Intellectual property theft detectable through systematic access to design files, source code, or proprietary documents
  • APT groups like APT28 and FIN7 systematically access and stage sensitive files on network shares before exfiltration

How to detect with it

Enable Event 5145 auditing on file servers containing sensitive data, focusing on shares with confidential documents, source code, or personally identifiable information. Alert on access to restricted folders by accounts outside authorized groups. Monitor for mass file access patterns where single users or source IPs access hundreds of files in short timeframes, indicating potential ransomware scanning or data staging. Track first-time access relationships where users access files they've never accessed historically. Correlate Event 5145 with Event 5140 to understand complete access chains from share connection through specific file operations. Monitor for unusual file access during off-hours or from unexpected geolocations. Alert on access to sensitive file types (financial spreadsheets, legal documents, HR records) by accounts outside expected departments.

Attack patterns

  • Ransomware encryption attack pattern: one account and source IP generates a burst of Event 5145 write and delete requests across thousands of files on a file server share within minutes
  • Insider threat data theft: Event 5145 revealed employee systematically accessing 200+ confidential strategy documents from executive share before resignation and competitor employment
  • APT28 exfiltration: Attackers accessed financial planning documents and M&A strategy files on CFO share, generating Event 5145 before data appeared in external threat intelligence feeds
  • FIN7 reconnaissance: Event 5145 showed automated file enumeration across all accessible shares, cataloging file types and locations before targeting payment card data files

Compared withEvent 5145 provides detailed file-level access within shares, while Event 5140 logs share-level access. Event 4663 monitors local file access. Enable both Event 5140 and 5145 together for complete network share access visibility from share connection through file operations.

Pull this event

Retrieval queries for a live host, a collected .evtx file and common SIEMs. Filter further on the key fields above.

Get-WinEvent -LogName 'Security' -FilterXPath "*[System[(EventID=5145)]]" -MaxEvents 50 |
  Select-Object TimeCreated, Id, MachineName, Message

-FilterXPath supports exact matches only. For substring matching, filter in Where-Object.

Where it shows up

Investigations, attack signals and lateral movement techniques that rely on this event.

ATT&CK mapping

Techniques this event can help detect. Most of these depend on specific field values; the event alone does not mean the technique happened.

Also relevant, depending on field values

Common questions

What does Windows event ID 5145 mean?
Event 5145 is generated when detailed object-level access to network shares is performed, logging which specific files or folders within shares are accessed. This event provides granular visibility beyond Event 5140 (share access) for detecting data exfiltration, ransomware file encryption, and unauthorized access to sensitive documents on file servers.
Is event 5145 logged by default?
No. It must be enabled before it is recorded. It is controlled by the "Detailed File Share" Advanced Audit Policy subcategory (Object Access).
Where is event 5145 recorded?
In the Security channel on the target host.

Event 5145 is generated when detailed object-level access to network shares is performed, logging which specific files or folders within shares are accessed.