Repository navigation
Detect and block virtual displays during SEB sessions - #1548
Open
suryanshvermaa wants to merge 1 commit into
Open
suryanshvermaa wants to merge 1 commit into
suryanshvermaa wants to merge 1 commit into
Conversation
…afeExamBrowser#1547) Prevents students from using virtual display adapters (e.g., SpaceDesk, Duet Display, Miracast) to bypass SEB security by mirroring or extending the exam screen. - Added IsVirtual to Display to check for MiraCast and IndirectWired WMI video output technologies. - Updated DisplayMonitor.ValidateConfiguration to immediately reject active configurations containing virtual displays. - Dynamically triggers the SEB display configuration lock screen if a virtual display is connected mid-session.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1548 +/- ##
==========================================
+ Coverage 26.40% 26.41% +0.01%
==========================================
Files 576 576
Lines 30238 30245 +7
Branches 3283 3284 +1
==========================================
+ Hits 7983 7990 +7
- Misses 21950 21952 +2
+ Partials 305 303 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
Thank you very much for the contribution, it is much appreciated! We'll review and potentially merge it in the upcoming days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Resolves #1547.
This PR extends SEB's existing display validation to detect and reject active
virtual displays. This addresses the reported SpaceDesk scenario where a
virtual display can be used to extend or mirror the SEB desktop to another
device.
Problem
Issue #1547 reports that SpaceDesk can be used during an SEB session to create
an additional virtual display.
SEB already validates the number and type of active displays, but the existing
validation does not distinguish virtual displays from physical external
displays.
As a result, a virtual display may pass the existing display validation rules.
Solution
The fix extends the existing Windows WMI display detection mechanism to
identify virtual display technologies.
Rather than adding a SpaceDesk-specific executable or service to a blacklist,
the change detects the underlying display technology reported by Windows.
Changes
Display.IsVirtualto identifyMiraCastandIndirectWireddisplay technologies.
ValidationResult.HasVirtualDisplay.DisplayMonitor.ValidateConfiguration()to reject an active displayconfiguration when a virtual display is detected.
Detection
SEB already queries
WmiMonitorConnectionParamsand readsVideoOutputTechnologywhen loading display information.The new
IsVirtualproperty uses the existingVideoOutputTechnologyenumeration and currently considers:
MiraCastIndirectWiredas virtual display technologies.
This allows the validation to operate at the display layer rather than
depending on a specific SpaceDesk process or service name.
Behaviour
When an active virtual display is detected:
display-change monitoring causes the configuration to be validated again.
Compatibility
The existing display validation rules remain unchanged for physical displays.
In particular:
AllowedDisplayscontinues to be enforced.InternalDisplayOnlycontinues to be enforced.Testing
Code Review / Static Validation
The implementation was reviewed against the existing display monitoring and
validation flow.
The change is limited to:
SafeExamBrowser.Monitoring.Contracts/Display/ValidationResult.csSafeExamBrowser.Monitoring/Display/Display.csSafeExamBrowser.Monitoring/Display/DisplayMonitor.csBuild / Runtime Testing
I was not able to perform a local build or runtime test because the required
SEB build environment exceeds the resources available on my development
machine.
Therefore, I have not claimed a successful runtime test with SpaceDesk.
The intended validation scenario is:
technology.
behaviour.
Scope
The changes are limited to addressing the virtual-display scenario described
in #1547.
No SpaceDesk-specific process blacklist has been introduced.