Event ID 5145: detailed file share and named pipe access
Event ID 5145, "A network share object was checked to see whether client can be granted desired access", is written to the Security log of the computer hosting a share each time a file, folder or named pipe inside the share is accessed, with the account, source address, share name, the relative path of the object and the access requested.
What event 5145 records
Where 5140 says "this account opened this share", 5145 says what it touched inside: Relative Target Name is the path within the share (Users\a.berg\Documents\q4.xlsx, or a pipe name such as svcctl on IPC$), and Accesses lists the rights requested (ReadData, WriteData, DELETE and so on). Microsoft documents that it is generated every time a file or folder on a share is accessed. Failures are written only when access is refused at the share level; NTFS permission failures appear elsewhere.
This detail makes 5145 the only built-in Windows event that shows the individual files moved over SMB and the named pipes used for remote administration. It also makes it one of the noisiest events Windows can produce, which is why it is off by default and often left off.
Named pipes on IPC$: the remote execution signal
Most remote administration on Windows runs over named pipes on the IPC$ share, so 5145 records which interface a remote host used, even when nothing was copied. These Relative Target Names are worth knowing:
| Pipe (Relative Target Name) | Interface | Seen with |
|---|---|---|
| svcctl | Service Control Manager | Remote service creation: PsExec, sc \\host create, Impacket smbexec and psexec |
| PSEXESVC, PSEXESVC-<host>-<pid>-stdin/stdout/stderr | PsExec's own service | Sysinternals PsExec sessions (renamed with -r) |
| atsvc | Task Scheduler | Remote scheduled tasks: schtasks /s, Impacket atexec |
| winreg | Remote Registry | Remote registry reads and writes, credential dumping from hives |
| samr | Security Account Manager | Account and group enumeration: net user /domain, BloodHound |
| lsarpc | Local Security Authority | SID lookups and policy queries; also coercion techniques |
| srvsvc | Server service | Share and session enumeration: net view, net session |
| spoolss | Print spooler | Authentication coercion and print spooler exploits |
A workstation opening svcctl on another workstation, followed by a 7045 on the target, is remote service execution almost by definition. The PsExec forensics guide shows the whole sequence on both hosts.
Making 5145 usable
- Enable it where it pays. File servers holding sensitive data, and a sample of workstations, rather than every domain controller, where SYSVOL and NETLOGON reads swamp everything else.
- Filter by share first. Drop SYSVOL and NETLOGON, then review admin shares and IPC$ separately from business shares.
- Count, then read. Group by account, source address and share, and look at the outliers: one account reading thousands of files in an hour, or one host opening
svcctlon many machines. - Watch write access. On business shares, Accesses containing WriteData, AppendData or DELETE across many files in seconds is what ransomware encrypting over SMB looks like from the file server.
Event 5145 fields
The fields an investigator reads first, what they mean, and where Arcsentry stores them.
| Field | Meaning | Arcsentry field |
|---|---|---|
| Subject: Account Name, Account Domain, Logon ID | The account and its network logon session. | user_name, event_log_logon_id |
| Source Address, Source Port | The client host. | source_ip |
| Share Name, Share Path | The share (\\*\IPC$, \\*\Finance) and its local folder. | event_log_share_name, $sharelocalpath |
| Relative Target Name | The file, folder or pipe inside the share. | event_log_share_relative_target |
| Access Mask, Accesses | The rights requested: ReadData, WriteData, DELETE, ReadAttributes and so on, kept as Windows message codes (%%4417 is WriteData, %%1537 is DELETE). | $accesslist, $accessmask |
| Access Check Results | Which permission granted or refused each right (XML name AccessReason). | event data |
What event 5145 proves, and what it does not
It shows
- That this account, from this address, requested this access to this file, folder or pipe on the share.
- For pipes on IPC$, which remote administration interface a host used.
It does not show
- That a file was read in full, or written successfully. It records the access check, not the bytes.
- Local access on the host. Only access through the share is logged.
- Anything when Detailed File Share auditing is off, which is the default.
Attacker activity it reveals
Remote service execution
IPC$ access to svcctl, often after ADMIN$ access to write a binary, followed by a new service on the target. PsExec adds its own PSEXESVC pipes. MITRE ATT&CK T1569.002
Mass encryption over SMB
Ransomware run on one host can encrypt shares on a file server. The file server sees thousands of 5145s with write and delete access from one account and address in minutes. MITRE ATT&CK T1486
Bulk collection
One account reading large parts of a business share it rarely uses, especially into an archive tool, before exfiltration. MITRE ATT&CK T1039
Finding event 5145 in Arcsentry
Arcsentry parses every channel in Windows\System32\winevt\Logs, whether it comes from an Arcsentry Collector archive, a KAPE or Velociraptor collection, or a disk image. Security log records are the event type evtx_security. In Hunt, with that event type selected:
filter event_code == "5145"
derive {share = event_log_share_name, target = event_log_share_relative_target, acct = user_name}
filter share ~= "(?i)IPC\\$$" && target ~= "(?i)^(svcctl|atsvc|winreg|psexesvc)"
select {timestamp, acct, source_ip, target}
sort {timestamp} Remote service, task and registry pipes opened on IPC$, with who opened them and from where.
Or ask in plain English, for example "show event 5145 on every host, oldest first", and Arcsentry shows the AQL it wrote before it runs. The AQL reference lists the operators used here, and the AI investigator reads the same events, citing each one by its event ID when it reports a finding.
Related event IDs
- Event ID 5140: Network share accessed
- Event ID 7045: Service installed
- Event ID 4697: Service installed (Security log)
- Event ID 4624: Successful logon
- Event ID 4688: Process created
All events by investigation question: Windows security event IDs for incident response. Logon types in full: Windows logon types. The log files themselves: Windows event logs.
Frequently asked
What does event ID 5145 mean?
A file, folder or named pipe inside a network share was accessed. It records the account, source address, share, the relative path of the object and the rights requested, once per access check.
Why is event ID 5145 so noisy?
Because it is written for every access check on every object in a share, including Group Policy reads from SYSVOL on domain controllers. Enable it on the servers where file-level detail matters and filter by share.
How do I detect PsExec with event 5145?
Look for IPC$ access with Relative Target Name svcctl and PSEXESVC pipes from a remote address, usually after ADMIN$ access writing PSEXESVC.exe, followed by a 7045 service install on the same host.
How do I enable event ID 5145?
Enable "Audit Detailed File Share" under Advanced Audit Policy Configuration › Object Access, through Group Policy or with auditpol. It is off by default.
Sources
- Microsoft Learn: 5145(S, F) A network share object was checked to see whether client can be granted desired access; Audit Detailed File Share
- Microsoft Learn: PsExec (Sysinternals)
- MITRE ATT&CK: T1021.002 SMB/Windows Admin Shares; T1569.002 Service Execution; T1486 Data Encrypted for Impact
Checked 2 December 2026 by Venema Labs against Microsoft's audit documentation and, where an example is shown, the named lab case. Field availability varies by Windows version.
Find event 5145 across every host in minutes.
Load your collections, ask what happened, and check every finding against the event behind it. Free for 7 days.
Request a trial