Anti-Cheat & Lockdown
Overview of Proctoring Mechanics
The ProctorAI platform employs a multi-layered approach to ensure examination integrity. The "Anti-Cheat & Lockdown" engine combines hardware-level checks, browser API monitoring, and behavioral analysis to create a secure testing environment.
This section covers the core enforcement logic used during the active examination phase.
Environment Lockdown
To prevent unauthorized resource access, the exam interface implements strict environment controls.
Fullscreen Enforcement
Upon starting an exam, the system requests mandatory fullscreen mode. The application monitors the fullscreenchange event to detect when a student attempts to exit the secure view.
- Behavior: Exiting fullscreen triggers an immediate modal warning and logs a high-severity event.
- Re-entry: Students must re-enable fullscreen mode to continue interacting with the exam content.
Input & Clipboard Restrictions
The platform restricts standard OS-level shortcuts and mouse behaviors to prevent content leakage and external assistance.
- Copy/Paste/Cut: All clipboard operations are disabled via
onCopy,onPaste, andonCutevent listeners. - Context Menu: Right-click functionality is globally suppressed to prevent access to browser inspection tools or image saving.
- Keyboard Shortcuts: Common "cheat" shortcuts (e.g.,
Ctrl+C,Ctrl+V,Alt+Tab,Cmd+R) are intercepted and blocked.
// Example of the input restriction logic applied to the exam container
const handleKeyDown = (e) => {
if ((e.ctrlKey || e.metaKey) && ['c', 'v', 'x', 'j'].includes(e.key.toLowerCase())) {
e.preventDefault();
toast.error("Action restricted: Copy/Paste is disabled.");
}
};
Activity & Visibility Monitoring
The system tracks user focus to ensure the student remains on the exam task.
Tab-Switch Detection
Using the Page Visibility API, the platform detects whenever the browser tab loses focus.
- Detection: If
document.visibilityState === 'hidden', atab_switchevent is generated. - Thresholds: Frequent tab switching increases the session's aggregate Risk Score.
- Logging: Every instance of tab switching is timestamped and recorded in the proctor's live alert feed.
Window Blur Tracking
The engine monitors the window.blur event to detect if the student has opened a separate application or window, even if the browser tab remains visible.
System Integrity Checks
Before an exam begins, the platform executes a mandatory Setup Phase to verify the hardware and software environment.
| Check | Description | Fail Condition | | :--- | :--- | :--- | | Browser Compatibility | Verifies WebRTC support and modern API availability. | Incompatible or legacy browser. | | Network Stability | Tests RTT (Round Trip Time) and connection status. | Offline or high-latency connection. | | Webcam/Mic Access | Requests permissions and verifies active streams. | Permission denied or hardware failure. | | Identity Verification | Performs a biometric snapshot to match the student record. | Face not detected or mismatch. |
AI-Powered Behavioral Analysis
During the session, the platform processes real-time telemetry to identify suspicious patterns.
Gaze Tracking & Face Presence
The system uses the device camera to monitor the student's presence and focus.
- Face Absence: If the camera fails to detect a face for a sustained period, a warning is issued.
- Gaze Deviation: Sustained looking away from the screen (detected via canvas pixel analysis) triggers a low-to-medium severity alert.
- Multi-face Detection: If more than one person is detected in the frame, a critical flag is raised.
Audio Intelligence
Background audio is analyzed via the Web Audio API to detect unauthorized communication.
- Audio Level Visualization: A real-time waveform shows current decibel levels.
- Anomaly Detection: Sustained noise or voice patterns (whispering, speaking) are flagged as
audio_anomaly.
Risk Scoring & Alerts
All violations are aggregated into a dynamic Risk Score (0-100) visible on the proctor dashboard.
- Event Severity: Alerts are categorized as
low(head movement),medium(tab switch), orhigh(identity mismatch). - Cumulative Impact: Repeated violations of the same type exponentially increase the risk score.
- Proctor Notification: High-risk scores trigger visual "flags" in the dashboard, moving the student to the top of the proctor's review queue.