ClipboardMonitor is a Windows background utility focused on clipboard abuse detection and payment-card data loss prevention (DLP).
ClipboardMonitor monitors clipboard text and can:
- Detect suspicious command/script tokens (for example:
powershell,mshta,cmd,msiexec, and toast-notification API terms). - Submit suspicious text to AMSI (Antimalware Scan Interface) for an antivirus verdict.
- Detect payment-card PAN candidates (using brand checks + Luhn validation), then mask and replace clipboard content.
- Correlate risky clipboard activity with suspicious launch behavior (for example, Win + R or Win + X -> I within a 30-second window).
- Log incidents asynchronously to the Windows Event Log.
- Notify users with a Windows toast.
- Clipboard text changes are observed.
- Browser-originated text is evaluated for risky malware-related keywords.
- PAN-like values are evaluated against known card-brand rules and checksum validation.
- Confirmed risky content triggers AMSI scan and/or DLP masking behavior.
- Follow-on user actions are correlated and surfaced through logs + toast notifications.
- Windows (WPF + WinForms interop)
- .NET Framework 4.8.1
- Administrator rights only for install/uninstall of the Event Log source
ClipboardMonitor writes to the Windows Event Log. Registering the log source requires elevation.
-
Open an elevated PowerShell or Command Prompt.
-
Run:
ClipboardMonitor -iSupported install flags:
-i,/i,--install -
Start
ClipboardMonitor.exenormally. -
(Optional) Add it to Startup or Task Scheduler.
Run in an elevated shell:
ClipboardMonitor -uSupported uninstall flags: -u, /u, --uninstall
USAGE: ClipboardMonitor [ARGUMENTS]
-i, /i, --install Register Windows Event Log source (Admin required)
-u, /u, --uninstall Remove Windows Event Log source (Admin required)
-?, -h, /h, --help Show help message
- Risky keyword evaluation is focused on clipboard text copied from common browsers.
- PAN DLP behavior can still apply outside browser-copy scenarios.
- Runtime execution does not require elevation after initial Event Log source setup.
- Correlation window for follow-on launch behavior is 30 seconds.
- Solution:
src/ClipboardMonitor.sln - Main app:
src/ClipboardMonitor(WPF app with some WinForms components) - Tests:
src/ClipboardMonitor.Tests
Open the solution in Visual Studio with the .NET Desktop Development workload installed.
- Tim MalcomVetter for UnstoppableService, which inspired parts of the bootstrap approach (this project is not installed as a Windows service).
- Gérald Barré (Meziantou) for the Using Windows AMSI in .NET article.
- Eric Lawrence for ClipShield and his attack-techniques article.
