Security · Object access
5145 · A network share object was checked to see whether client can be granted desired access
Logged on the share-hosting machine each time a client's access to a specific file, folder or named pipe within a share is checked. It is extremely noisy but shows exactly what was touched, such as a service binary written to ADMIN$ or the svcctl pipe opened over IPC$, which is how PsExec-style remote service creation looks on the wire.
Where it is logged
Key fields to read
| Field | What it tells you |
|---|---|
| ShareName | Share involved, e.g. \\*\IPC$ or \\*\ADMIN$. |
| RelativeTargetName | File or pipe within the share, e.g. svcctl, PSEXESVC.exe, Finance\payroll.xlsx. |
| AccessMask | Requested rights; 0x2 (WriteData) or 0x12019f indicate write access, 0x1/0x120089 read. |
| AccessList | Human-readable rights requested, e.g. %%4417 WriteData. |
| IpAddress | Source IP of the client. |
| SubjectUserName | Account performing the access. |
| Keywords | Audit Success vs Audit Failure; failures show denied attempts, e.g. during share enumeration. |
Sample event
Log Name: Security
EventID: 5145
TimeCreated: 2026-11-20T23:11:47.315Z
Computer: NW-FIN-WS07.northwind.local
Keywords: Audit Success
SubjectUserName: adm.jkim
SubjectDomainName: NORTHWIND
SubjectLogonId: 0x5F0B11A
IpAddress: 10.20.30.57
ShareName: \\*\IPC$
ShareLocalPath:
RelativeTargetName: svcctl
AccessMask: 0x3
AccessList: %%4416 %%4417How to triage it
- 1Identify the share and
RelativeTargetName: is it a named pipe (svcctl,atsvc,samr,lsarpc) or a file? - 2For
ADMIN$/C$, check for write access (AccessMaskwith WriteData) to.exe,.dll,.bator.ps1files. - 3Correlate
svcctlaccess with 7045/4697 on the same host seconds later (remote service creation) andatsvcwith 4698 (remote scheduled task). - 4Validate the source IP and account: management servers are expected; user workstations are not.
- 5Scope: check the same source and account across other hosts for the same pattern.
Benign vs suspicious
Usually benign
- Endpoint management, backup and monitoring tools using
IPC$pipes and admin shares. - Users opening documents on file shares (huge volume on file servers).
- Domain logon processing reading
SYSVOL/NETLOGONon DCs.
Red flags
- An executable written to
ADMIN$followed by\PIPE\svcctlaccess overIPC$from the same source: PsExec-style remote service creation. - Access to
atsvc(remote scheduled task) orwinregfrom a workstation. - Mass read access to many files on a file server by one account in minutes (data staging or exfiltration).
- Many access failures across shares from one source (share enumeration).
Hunt for it: Splunk & KQL
index=wineventlog EventCode=5145
((ShareName="\\*\IPC$" RelativeTargetName IN ("svcctl", "atsvc")) OR
(ShareName="\\*\ADMIN$" (RelativeTargetName="*.exe" OR RelativeTargetName="*.dll" OR RelativeTargetName="*.bat")))
| stats values(ShareName) AS shares values(RelativeTargetName) AS targets min(_time) AS first max(_time) AS last BY host, IpAddress, SubjectUserName
| convert ctime(first) ctime(last)// Sentinel SecurityEvent: remote service creation pattern (ADMIN$ binary write + svcctl pipe)
SecurityEvent
| where TimeGenerated > ago(1d)
| where EventID == 5145
| where (ShareName endswith @"\IPC$" and RelativeTargetName in~ ("svcctl", "atsvc"))
or (ShareName endswith @"\ADMIN$" and RelativeTargetName matches regex @"(?i)\.(exe|dll|bat|ps1)$")
| summarize Targets = make_set(RelativeTargetName), Shares = make_set(ShareName) by Computer, IpAddress, SubjectUserName, bin(TimeGenerated, 5m)
| where array_length(Shares) >= 2Field names depend on your add-on and table. More translations in the Splunk vs KQL cheat sheet.
Interview question
“How does PsExec-style lateral movement appear in Windows logs on the target?”
✓ Strong answer sketch
On the target I would expect a 4624 type 3 network logon, then 5140 connections to ADMIN$ and IPC$. With detailed file share auditing, 5145 shows the service binary (for example PSEXESVC.exe or a random name) written to ADMIN$ and the svcctl named pipe opened over IPC$, which is how the Service Control Manager is driven remotely. Seconds later the System log records 7045 for the new service (and 4697 if Security System Extension auditing is on), and the payload runs as a child of services.exe. Matching the same source IP and logon ID across those events turns individually noisy logs into a clear lateral movement story.
Frequently asked questions
Why is Event 5145 so noisy?
It is logged for every access check on files, folders and pipes within a share, not once per session like 5140. On busy file servers that can mean millions of events per day.
What is the svcctl named pipe?
svcctl is the RPC endpoint of the Service Control Manager. Remote access to it over IPC$ is how tools create and start services on another machine.
Which audit policy enables 5145?
Audit Detailed File Share under Object Access in Advanced Audit Policy, on the machine hosting the share.