Back to skill

Security audit

Optimize-Laptop-Power

Security checks for vulnerabilities and agentic risk

Overview

This is a manual Windows power-saving guide, but it recommends broad Microsoft Defender weakening that users should review carefully before installing or following.

Install only if you understand the Windows security tradeoffs. Treat the diagnostic and power-plan sections as low risk, but avoid following the Defender exclusion and scan-direction commands unless you have measured a real Defender bottleneck, can scope exclusions narrowly, and are prepared to restore the defaults.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:151
Finding

Broad Microsoft Defender Exclusions for Writable Development Directories

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 151-156
Vulnerability Type: Security control weakening through broad antivirus exclusions
Risk Level: High

powershell
Add-MpPreference -ExclusionPath "D:\YourAIProjects"
Add-MpPreference -ExclusionPath "C:\Users\YourName\.openclaw"
Add-MpPreference -ExclusionPath "C:\Users\YourName\.npm"

Get-MpPreference | Select-Object -ExpandProperty ExclusionPath

Technical Analysis

The guide recommends recursively excluding AI project, OpenClaw, and npm directories from Microsoft Defender. These user-writable directories can contain source code, downloaded packages, scripts, native binaries, and other executable content.

A package cache such as .npm is particularly exposed to supply-chain content downloaded from external registries. Agent workspaces and development repositories can likewise receive files from untrusted projects or automated tools. Excluding these directories creates areas where malicious content may receive reduced real-time antivirus inspection.

The commands require administrator privileges and are presented as manual, disclosed operations. The Skill does not execute them automatically. Nevertheless, the recommended exclusions weaken a system security boundary beyond what is necessary for ordinary laptop power optimization.

Attack Path

  1. A user opens an administrator PowerShell session and follows the guide.
  2. The user substitutes real writable directories into the exclusion commands.
  3. Microsoft Defender recursively excludes content under those directories from applicable scanning.
  4. A malicious dependency, compromised repository, generated script, or attacker-controlled file is placed in an excluded directory.
  5. The user, a development tool, or an Agent executes the malicious content.
  6. Defender has fewer opportunities to detect or block the payload because its containing path was excluded.

Impact Assessment

...[truncated 582 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the generic recommendations to exclude .npm, .openclaw, complete source repositories, or other broadly writable directory trees.
  2. Keep Defender's default scanning behavior unless repeatable performance measurements identify a specific bottleneck.
  3. If an exclusion is unavoidable, limit it to the smallest possible path and prefer immutable, non-executable model or data files.
  4. Do not exclude package caches, downloaded dependencies, build-output directories, scripts, binaries, temporary directories, or Agent workspaces that can receive untrusted content.
  5. Document an expiration and review process for every exclusion.
  6. Use Get-MpPreference to audit existing exclusions and remove unnecessary entries with Remove-MpPreference -ExclusionPath.
  7. Recommend Microsoft Defender performance analysis or scheduled scanning adjustments before suggesting permanent path exclusions.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:172
Finding

Microsoft Defender Real-Time Scanning Coverage Is Reduced

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 172
Vulnerability Type: Insecure endpoint-protection configuration
Risk Level: Medium

powershell
Set-MpPreference -RealTimeScanDirection 1

Technical Analysis

The command changes Microsoft Defender's real-time scan direction from its default coverage to monitoring incoming or written files. This can reduce inspection associated with other file operations, including access to content already present on the host.

The operation requires administrator privileges and is explicitly presented as a manual and reversible optimization. It is not silently executed by the Skill. However, weakening antivirus coverage to reduce CPU or disk activity is an unsafe default recommendation for a power-optimization guide, particularly when combined with path exclusions.

Attack Path

  1. The user runs the command from an administrator PowerShell session.
  2. Defender's real-time scan-direction configuration is changed from the default.
  3. Malicious or dormant content already present on the system is subsequently accessed or executed.
  4. The reduced real-time inspection coverage removes or weakens a potential detection opportunity.
  5. If the payload executes successfully, it runs with the privileges of the invoking process.

Exploitation remains conditional: an attacker must first place malicious content on the host or induce the user to access existing malicious content. The configuration change does not itself execute a payload.

Impact Assessment

The direct impact is reduced endpoint-detection coverage across the system rather than acquisition of new privileges. Successful exploitation can result in arbitrary code execution with the current user's privileges. If malicious content is launched by an elevated process, the compromise may obtain administrator-level access.

The scope is system-wide Defender behavior and therefore extends beyond the particular ...[truncated 72 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the recommendation to change RealTimeScanDirection as a routine power-saving measure.
  2. Retain the default configuration:
    powershell
    Set-MpPreference -RealTimeScanDirection 0
    
  3. Diagnose sustained Defender activity before changing security controls, using supported Defender performance-analysis facilities where available.
  4. Prefer non-security-degrading mitigations, such as scheduling scans for powered periods, reducing unnecessary file churn, or optimizing build and cache behavior.
  5. If the option remains documented, place it in a clearly separated high-risk section and require explicit user confirmation that reduced malware detection is acceptable.
  6. Add verification and rollback steps so users can confirm the current value and restore the default immediately after testing.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructional content is presented in Chinese, and the file does not indicate that language selection is optional or that the skill is region-specific. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.