ApduWebMonitor is a small ASP.NET Core interactive Blazor application for monitoring APDU (smart-card) traffic. It hosts a background ETW listener that receives APDU events and displays parsed APDU commands and responses in a web UI. The UI uses Blazor Interactive Server with MudBlazor components.
Key responsibilities:
- Listen for APDU events from an ETW session and parse them into APDU command/response objects.
- Maintain an in-memory store of APDU exchanges for display in the UI.
- Provide utilities for formatting APDU data into readable and hex representations.
Windows OS required. This project extends an already existing app APDUTrace. You should start it before running ApduWebMonitor. APDUTrace is needed to create the ETW session and smart-card driver service.
Notes:
- APDUTrace is not included in this repository.
- ApduWebMonitor should be started with admin rights (for ETW and pnputil).
- The ETW session name is configurable in
appsettings.json(eitherAPDUTraceorAPDUTraceLive).
- APDUTrace emits ETW events into an ETW session.
EtwDataLoader(a hosted background service) attaches to that session and receives events.- APDU strings are parsed into byte arrays, then converted to PC/SC
CommandApduandResponseApduobjects and stored inApduStore. - The Blazor UI reads from
ApduStoreand displays the exchanged APDUs in a web interface.
- Send custom APDU commands
- Describe meanngful bytes according to ISO/IEC 7816-4
- ...
