1. Resources
  2. Detection sources
  3. Event ID 5145

Event ID 5145: A network share object was checked to see whether client can be granted desired access

Written for every access check on a file, folder or named pipe reached through a share, with the account, source address, share, path and rights. Very busy on domain controllers; the source of the SYSVOL, NETLOGON and coercion rules.

Log source
Windows Security log
Detection value
Essential
Volume
High
Last updated
Audit subcategory
Audit Detailed File Share (Object Access, Success and Failure)
Logged on
All Windows computers
Event versions
0
Detects
6 attacks (5 rules · 2 detection logic)
MITRE ATT&CK
6 techniques in 4 tactics
Threat groups
27 groups that MITRE ATT&CK records using these techniques
Fields the rules read
SubjectUserNameShareNameRelativeTargetNameAccessList

When it is written

Windows writes 5145 on the computer that hosts the share each time a client reaches a file, folder or named pipe through a network share and the share-level access check runs, if Audit Detailed File Share is on. Shares have no SACLs: with the subcategory on, every access to every share of the computer is logged. Microsoft's event page speaks of files and folders and names IPC$ only as a share without a path; IPC$ is the share through which named pipes are opened, so expect a remote program opening a pipe to write the event too, with the pipe name as the target.

A success is written when access is granted. Microsoft notes that a failure is written only when the share permissions deny access; access denied by NTFS permissions writes no 5145. The event records the rights the client asked for and the result of the check, not what the client did afterwards. A file changed locally on the server, not through a share, writes nothing.

How to turn it on

Advanced audit policy subcategory Audit Detailed File Share, Success and Failure. Set it in a Group Policy object linked to the computers that write the event:

Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Object Access > Audit Detailed File Share
Microsoft's recommendation per computer role
ComputerAuditNote
Domain controllersFailureNot Success in either baseline, because SYSVOL access makes it very busy. Failure is recommended in both; its volume should be low, and it shows who could not reach a file or folder on a share.
Member serversSuccess if needed and FailureSuccess only if needed, in both baselines. On a server with busy shares (a file server) it can be high volume; Audit File System is the alternative, though without the client address. Failure is recommended in both; its volume should be low outside file servers.
WorkstationsSuccess if needed and FailureSuccess only if needed, in both baselines. A workstation with busy shared folders can produce many events; Audit File System is the alternative, though without the client address. Failure is recommended in both; its volume should be low.
Check the current setting
auditpol /get /subcategory:"Detailed File Share"
Based on vendor documentation.
Turn it on (local policy; a domain GPO overrides it)
auditpol /set /subcategory:"Detailed File Share" /success:enable /failure:enable
Based on vendor documentation.
The same on a Windows in another display language
auditpol /get /subcategory:"{0CCE9244-69AE-11D9-BED3-505054503030}"
Based on vendor documentation.

Run the commands in an elevated prompt on a computer that writes the event. Subcategory settings take effect only when the security option Audit: Force audit policy subcategory settings (Windows Vista or later) to override audit policy category settings is enabled (the default), and a Group Policy object that sets advanced audit policy replaces local changes at its next refresh. Microsoft's advanced audit policy reference

There is no SACL to set: the subcategory covers every share of the computer. What matters is the outcome. The rules on this page read successful access (a pipe opened, a file opened for writing or reading), so Success must be on for the domain controllers and, for the coercion pipes, for the other Tier 0 servers. Microsoft's baselines leave Success off on domain controllers because of the volume, so plan the collection filters in the tuning advice before you turn it on.

Fields

In Event Viewer order. The field names are those of the event XML, from the event template that ships with Windows.

FieldWhat it holdsSince
Security IDSubjectUserSidSubjectSID of the account that asked for access. Event Viewer shows it resolved to an account name when it can.v0
Account NameSubjectUserNameSubjectRead by 1 ruleName of that account. Computer accounts, such as computers applying Group Policy, end with $.v0
Account DomainSubjectDomainNameSubjectDomain of the account, usually as a NetBIOS name, the computer name for a local account, or NT AUTHORITY for well-known principals.v0
Logon IDSubjectLogonIdSubjectHexadecimal ID of the network logon session. It matches the Logon ID of the 4624 event on the same computer.v0
Object TypeObjectTypeNetwork InformationType of object. Microsoft says it is always File for this event.v0
Source AddressIpAddressNetwork InformationAddress of the client (shown as Source Address). IPv6, or an IPv4 address as ::ffff:a.b.c.d; ::1 or 127.0.0.1 means the computer itself.v0
Source PortIpPortNetwork InformationSource port of the client connection. 0 for local access.v0
Share NameShareNameShare InformationRead by 4 rulesName of the share, as \\NAME, for example \\SYSVOL or \*\IPC$.v0
Share PathShareLocalPathShare InformationLocal path of the share on the server (shown as Share Path), as ??\C:\path. Empty for shares without a folder, such as IPC$.v0
Relative Target NameRelativeTargetNameShare InformationRead by 5 rulesPath of the file or folder relative to the share. A single backslash means the share itself. Microsoft describes the field for files and folders only; for an open on IPC$ expect the pipe name, and confirm it on a record of your own.v0
Access MaskAccessMaskAccess Request InformationRights asked for, as the hexadecimal sum of the access bits (0x1 ReadData, 0x2 WriteData, 0x4 AppendData, 0x10000 DELETE and so on).v0
AccessesAccessListAccess Request InformationRead by 2 rulesThe same rights as message codes separated by spaces (shown as Accesses), for example %%4416 ReadData, %%4417 WriteData, %%1537 DELETE. Two rules look for %%4417.v0
AccessReasonResult of the check for each right (shown as Access Check Results), giving the right, then the result code (%%1801 granted by, %%1802 denied by) and the access control entry of the share's security descriptor, in SDDL, that decided it. Microsoft's page names both results and shows only %%1801; %%1802 is read from Windows' own message table.v0

Values to know

Relative Target Name RelativeTargetName

ValueMeaningSignal
efsrpc, spoolss, netdfs or FssagentRpc (on IPC$)Named pipes of RPC interfaces that can make a server authenticate to another hostRead by the coercion rule. On a print server, spoolss access is normal. Microsoft's EFSRPC specification also lets a server answer that interface on the lsarpc pipe, which this list does not cover.Attack signal
Ends with ntds.ditA file named like the Active Directory databaseA copy of the database being read off a domain controller through a share.Attack signal
Groups.xml, ScheduledTasks.xml, Services.xml, DataSources.xml under \Machine\ (on SYSVOL)Group Policy Preferences files that could store a passwordComputers read them with their own account. A read by a user account is reported.Attack signal
scripts.ini, psscripts.ini, ScheduledTasks.xml, Services.xml, Groups.xml or GptTmpl.inf under \Policies\ (on SYSVOL)GPO files that make computers or users run code, install services or change group membership and user rightsA rule reports write access to them (%%4417 in AccessList), as it does for any file in NETLOGON or in the scripts folder of SYSVOL.Attack signal
\The share itselfWorth knowing

Accesses AccessList

ValueMeaningSignal
%%4416ReadData (or ListDirectory)Ordinary reads.Expected
%%4417WriteData (or AddFile)Write access was asked for; the event does not show that data was written. Read by the rules on GPO files in SYSVOL and on files in NETLOGON, where a write changes what computers or users run.Attack signal
%%4418AppendData (or AddSubdirectory or CreatePipeInstance)Worth knowing
%%1537DELETEMicrosoft recommends watching it, especially in failures.Worth knowing
%%1539 or %%1540WRITE_DAC or WRITE_OWNERMicrosoft recommends watching them, especially in failures.Worth knowing

Share Name ShareName

ValueMeaningSignal
\\*\SYSVOLGroup Policy and logon script share of a domain controllerMost of the volume on domain controllers.Expected
\\*\NETLOGONLogon script share of a domain controllerReads are normal; write access is read by a rule.Expected
\\*\IPC$Named pipesRemote RPC calls over SMB.Worth knowing
\\*\C$ or \\*\ADMIN$Administrative sharesReserved for administrators; how files are often copied to and from a server.Worth knowing

Volume and noise

Microsoft rates the volume High on file servers, High on domain controllers because Group Policy reads SYSVOL over the network, and Low on other member servers and workstations. On a domain controller, every computer and user that applies Group Policy reads policy files from SYSVOL, logon scripts are read from NETLOGON, and remote programs open named pipes in IPC$ for their RPC calls. Microsoft says the event is written every time a file or folder on a share is accessed, so the count follows the number of files read, not the number of connections.

Failures are far rarer: Microsoft says their volume should not be high (file servers apart) and recommends them on every computer.

Keeping it manageable

  • The rules need Success on domain controllers, which Microsoft does not recommend there by default because of SYSVOL traffic. Turn it on and reduce at collection, not at the source.
  • On IPC$, keep only the pipes a rule reads: RelativeTargetName efsrpc, spoolss, netdfs or FssagentRpc, compared without regard to case. The other pipe opens are most of the IPC$ volume and no rule on this page reads them.
  • On SYSVOL and NETLOGON, keep every event whose AccessList contains %%4417 (WriteData), whoever the account, and reads by accounts that do not end with $ of Groups.xml, ScheduledTasks.xml, Services.xml and DataSources.xml under a \Machine\ folder. The remaining reads are Group Policy processing and can go.
  • On any share, keep events whose RelativeTargetName ends with ntds.dit, and keep every failure.
  • On file servers, Microsoft recommends Failure and makes Success conditional on a real need to track every successful access. The rules here look at domain controllers and, for the coercion pipes, at other Tier 0 servers; leave Success off elsewhere unless you need it.

Sample event

Version 0, with made-up values.

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
    <EventID>5145</EventID>
    <Version>0</Version>
    <Level>0</Level>
    <Task>12811</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8020000000000000</Keywords>
    <TimeCreated SystemTime="2026-11-18T09:30:12.4567890Z" />
    <EventRecordID>1048576</EventRecordID>
    <Correlation />
    <Execution ProcessID="712" ThreadID="2408" />
    <Channel>Security</Channel>
    <Computer>DC01.corp.example.com</Computer>
    <Security />
  </System>
  <EventData>
    <Data Name="SubjectUserSid">S-1-5-21-1004336348-1177238915-682003330-1104</Data>
    <Data Name="SubjectUserName">alice</Data>
    <Data Name="SubjectDomainName">CORP</Data>
    <Data Name="SubjectLogonId">0x5d3a41</Data>
    <Data Name="ObjectType">File</Data>
    <Data Name="IpAddress">::ffff:10.20.30.41</Data>
    <Data Name="IpPort">50412</Data>
    <Data Name="ShareName">\\*\SYSVOL</Data>
    <Data Name="ShareLocalPath">\??\C:\Windows\SYSVOL\sysvol</Data>
    <Data Name="RelativeTargetName">corp.example.com\Policies\{3F2A1C7E-5B4D-4E8A-9C21-7D0B5E6F4A12}\Machine\Microsoft\Windows NT\SecEdit\GptTmpl.inf</Data>
    <Data Name="AccessMask">0x120089</Data>
    <Data Name="AccessList">%%1538 %%1541 %%4416 %%4419 %%4423</Data>
    <Data Name="AccessReason">%%1538: %%1801 D:(A;;FA;;;AU) %%1541: %%1801 D:(A;;FA;;;AU) %%4416: %%1801 D:(A;;FA;;;AU) %%4419: %%1801 D:(A;;FA;;;AU) %%4423: %%1801 D:(A;;FA;;;AU)</Data>
  </EventData>
</Event>

Attacks this event reveals

Detection rules that read this event:

Detection logic (hypotheses that join this event with others) for:

Frequently asked questions

Why is event 5145 so noisy on domain controllers?

Because Audit Detailed File Share logs every access to every share, and Group Policy reads SYSVOL over the network from every computer and user. Microsoft rates it High on domain controllers for that reason and leaves Success off there in its baselines. Collect it with filters that keep what the rules read.

Why is there no 5145 for an access that was denied?

Microsoft notes that failure events are written only when the share permissions deny access. An access denied by NTFS permissions on the file writes no 5145.

How do I see who wrote a file in SYSVOL or NETLOGON?

Look for 5145 on the domain controllers whose ShareName ends with SYSVOL or NETLOGON and whose AccessList contains %%4417 (WriteData). RelativeTargetName is the file, SubjectUserName the account and IpAddress the client. The event shows that write access was asked for and granted at the share, not that the content changed, so check the file itself to confirm a write. A change made locally on the domain controller does not appear.

Which 5145 events point to authentication coercion?

Opens of the named pipes efsrpc, spoolss, netdfs or FssagentRpc on the IPC$ share of a domain controller or another Tier 0 server. They show that the pipe of an interface that can make the server authenticate elsewhere was opened; whether the coercion worked shows in the server's own authentication right after. Microsoft's EFSRPC specification also allows that interface on the lsarpc pipe, which these four names do not cover.

References