Guide
Endpoint DLP: USB, printing and sensitive files
Not released yet. Logthread Agent can watch the three ways data leaves a Windows server unnoticed: files copied to a USB drive, documents sent to a printer, and sensitive content sitting in the folders you name. It records who did it and on which host, raises detections, and puts everything on one page, Security → DLP. When you choose, it can also block USB storage or printing on selected servers, with two admins approving.
This is detection first. Nothing is blocked unless you turn on enforcement on a host and approve each change.
What you get#
| Channel | What is recorded | Field dlp.channel |
|---|---|---|
| USB | A storage device was connected, and files were written to, read from or deleted on a removable drive: user, host, device vendor, product and serial, file name | usb |
| A document was printed: user, printer, document name, pages, size | print | |
| Content scan | A file in a folder you chose holds card numbers, Aadhaar numbers, PAN, an IFSC code with an account number, or secrets such as keys and tokens | content |
| Microsoft Purview | The DLP matches Microsoft reports, when you have connected Microsoft 365 | none |
The content scan never sends what it finds. Only the file name, the types found and how many of each leave the host. The card number, the Aadhaar number or the secret itself is never sent, stored or written to the agent's log. The scan reads only files that changed since the last scan, stops after two seconds on any one file, and skips very large and binary files.
What you need#
- The Logthread Agent on Windows Server 2016 or later, set up from Integrations → Windows server. See Set up a Windows server.
- The admin role in Logthread, to turn on enforcement. The member role is enough to look at the DLP page.
- Local administrator rights on the server, to run the install command.
Turn on removable media auditing#
- Open Integrations → Windows server. Tick DLP (removable media, printing, content scan). Three sub-ticks appear:
- Removable media is on by default.
- Printing.
- Scan folders for sensitive content. Give the folders to scan, for example
D:\Shares\Finance. Up to ten. - Run the install or upgrade command the setup gives you, in PowerShell as Administrator. The agent turns on the Windows event logs it needs (
Microsoft-Windows-DriverFrameworks-UserMode/Operationaland, for printing,Microsoft-Windows-PrintService/Operational), because Windows has them off. - Turn on the two audit subcategories that report device and file activity. The install command does this with
auditpol. To do it by hand, in PowerShell as Administrator:
``powershell auditpol /set /subcategory:"{0CCE9245-69AE-11D9-BED3-505054503030}" /success:enable /failure:enable auditpol /set /subcategory:"{0CCE9248-69AE-11D9-BED3-505054503030}" /success:enable ``
The first is Removable Storage, the second Plug and Play Events. If a domain Group Policy sets the Advanced Audit Policy, it overrides auditpol at its next refresh. Set the same two subcategories in that policy: Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Object Access > Audit Removable Storage, and Detailed Tracking > Audit PNP Activity. The setup then shows a numbered list. Its last steps are the check below and the detections.
Check#
The check step counts the DLP records of the last 24 hours by channel: usb, print and content. To see them at once, plug in a USB drive, copy a small file to it and wait a minute. In Explore:
event.dataset:dlp | stats count() by dlp.channel, event.actionPrinting a page to the Microsoft Print to PDF printer produces a document_printed record. A file that holds a test card number such as 4111 1111 1111 1111 in a scanned folder produces a sensitive_content_found record with the type card and a count, and never the number.
If a channel stays at zero, see Troubleshooting.
The DLP page#
Open Security → DLP. Choose a period of 1, 7 or 30 days.
- Channel cards for USB, Print, Content scan and Microsoft Purview. A card whose source is not set up shows the link to set it up.
- Who and where. Activity by user, by host and by channel.
- Incidents and Detections on: which of the detections below are turned on.
- Recent activity, newest first, each row opening in Explore.
- Policy state per host. For each server, whether USB and printing are enforced: Enforced, Not enforced, Not enforced (changed on host), Managed by Group Policy or Not set.
Detections#
Open Alerts → Detections and search for dlp.
| Detection | Fires on |
|---|---|
| Large copy to USB storage | One user writes 200 or more files to removable drives on a server within an hour |
| Printing in bulk | One user prints 200 or more pages within an hour |
| New USB storage device on a production server | A USB storage device the server has not seen in the last 7 days, on a server with env prd, prod or production. It is checked per closed hour, and a server's first day teaches it what is normal, so it is not news |
Windows does not report a size for a file written to a removable drive, so "large copy" counts files.
Sensitive files copied to USB storage is not available yet. Windows records a file written to a removable drive (event 4663) with the drive's device path and no size, and the content scan reports sensitive data in the folders it scans. Telling that a file written to USB holds sensitive data means matching the two by file name on the server, which the agent does not do yet. Until it does, Logthread does not offer this detection; the content scan's findings and the USB writes are both on the DLP page, by user and host.
Enforce from Logthread#
Enforcement is off until you turn it on, host by host, and then for each change you approve. It can block two things:
- USB storage. Logthread sets the Windows Removable Storage Access policy on the server: block (deny reading and writing), read-only (deny writing) or allow.
- Printing. Logthread stops and disables the Print Spooler service, or puts it back.
Nothing else on the host is touched, and the agent never runs commands that Logthread sends.
1. Opt each host in, on the host. In Integrations → Windows server, tick Let Logthread enforce DLP policy on this host (it needs Manage this agent from Logthread). The command it gives you sets LOGTHREAD_RESPONSE_ACTIONS=usb_policy,print_policy on the server and pins your workspace's response public key. This is a choice made on the server. A setting pushed from Logthread can never turn it on, so no one who reaches your Logthread account can opt a host in.
2. Block from the DLP page. Choose Block USB on these servers:
- Choose the policy. USB: block, read-only or allow. Printing: block or allow.
- Choose the servers by label, for example
env=prd. - Preview. Each server shows its current state and whether the policy would change it. Servers that have not opted in, or whose policy a Group Policy manages, are listed with the reason and left out.
- Request. Give a reason and prove it is you again: your password and an authenticator code, or a passkey. Two-factor sign-in is required.
- Approve. A second admin, one who has been an admin or owner for at least seven days, approves within 15 minutes. You cannot approve your own request.
An approval covers at most 50 servers. Each server gets its own action, signed with your workspace's key and bound to that server, with a one-time number and an expiry. A server refuses anything with a wrong signature or server, an old or repeated number or an unlisted action. Every owner is emailed when a request is made and when it is decided, and each step is in the audit log.
Undo. Choose Allow for the same servers. It is a new request, approved the same way. Each host first records its values before Logthread's first change, and Allow puts those back, so a server that already blocked something for its own reasons ends up as it was.
Drift. After applying a policy, and on every configuration check, the agent reads it back. If Group Policy, Intune or a person changes it later, the server shows Not enforced (changed on host) and a finding is raised. Logthread does not fight it.
Enforcement is switched off for the whole service until its security review is approved. Detection, the DLP page and the previews work without it. Isolating a host and ending a process are not available.
Group Policy and Intune#
Use these when you do not opt hosts in, or when a policy already manages the setting. If Group Policy or Intune sets a value, the agent refuses to change it and the DLP page says Managed by Group Policy: change it there.
Group Policy (domain):
- Open the Group Policy Management Console and edit a GPO linked to the servers.
- Go to Computer Configuration > Administrative Templates > System > Removable Storage Access.
- Set Removable Disks: Deny write access (and Deny read access to block fully) to Enabled. All Removable Storage classes: Deny all access blocks every class.
- Run
gpupdate /forceon a server and check it withGet-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices\*'.
Intune:
- Open Devices > Configuration > Create > New policy, platform Windows 10 and later, profile type Settings catalog.
- Add Administrative Templates > System > Removable Storage Access and set the same settings as above.
- For rules by device, such as "allow only these USB drives", use Endpoint security > Attack surface reduction > Device Control, or Microsoft Defender Device Control. The Removable Storage Access policy applies to a whole class of device and has no per-device exceptions, which is why Logthread does not offer them.
Logthread still detects copies and shows the state of each server. A policy set this way shows on the DLP page as Managed by Group Policy.
Troubleshooting#
- No
usbrecords. Check the two audit subcategories withauditpol /get /subcategory:"Removable Storage","Plug and Play Events". A domain Advanced Audit Policy overrides local settings: set them there. Check theMicrosoft-Windows-DriverFrameworks-UserMode/Operationallog is on withwevtutil gl Microsoft-Windows-DriverFrameworks-UserMode/Operational. - No
printrecords. Runwevtutil sl "Microsoft-Windows-PrintService/Operational" /e:true, and print a test page. Printing on a user's own PC through a print server shows on the print server. - No
contentrecords. The scan reads only folders you named and only files that changed, so a new file appears after the next scan. A file over the size limit or a binary file is skipped, and the scan's summary record says how many. - A server shows "Not set". It has not reported its policy. It reports once enforcement is turned on for it.
- A request lists a server as left out. The reason is shown: the host has not opted in, a Group Policy manages the key, the values were set on the host outside Logthread, or the agent is too old. Upgrade it from Upgrade agents from Logthread.
- A server shows "Not enforced (changed on host)". A Group Policy, Intune or a person changed the value after Logthread set it. Find who with the policy's own tools, then request the change again if it is still wanted.
Price#
Nothing extra. DLP records are billed as data ingested, like any other data. See Prices.