Back to skill

Security audit

windows-region-exact-record

Security checks for vulnerabilities and agentic risk

Overview

ClawScan classifies this screen region recording skill as benign with medium confidence: the reported findings appear mostly tied to its recording functions, though one timing mismatch and incomplete scan coverage leave some uncertainty.

The verdict is benign, not risk-free. Before installing, consider whether you are comfortable with the detected environment, file, and shell capabilities and with the reported diagnostic file write. The exact recording duration may differ from the requested length. Skillspector marked its analysis partial because a referenced local path was missing, so some evidence remains incomplete.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (10)

YARA rule 'keylogger_indicators': Keylogger functionality in scripts or source code [malware]

High
Category
YARA Match
Confidence
70% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · scripts/pick_region.py (reported line 55)May include surrounding context.

python
(2)  # PROCESS_PER_MONITOR_DPI_AWARE
        return "per-monitor"
    except Exception:
        pass
    try:
        ctypes.windll.user32.SetProcessDPIAware()
        return "system"
    except Exception:
        return "unaware"


def cursor_pos():
    p = POINT()
    ctypes.windll.user32.GetCursorPos(ctypes.byref(p))
    return p.x, p.y


def button_down():
    return bool(ctypes.windll.user32.GetAsyncKeyState(VK_LBUTTON) & 0x8000)


def esc_pressed():
    if msvcrt is None:
        return False
    try:
        if msvcrt.kbhit():
            return msvcrt.getch() in (b"\x1b",)
    except Exception:
        # no attached console (launched from a script/pipe) - ESC abort unavailable
        return False
    return False


def wait_click(label, timeout=120.0):
    """Wait for a fresh left click, release, then return the cursor position."""
    t0 = time.time()
    while button_down():  # wait until any stale press is released
        if time.time() - t0 > timeout:
            return N

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/rec_region.py (reported line 125)May include surrounding context.

python
if a.check:
        cmd = common + ["-show_region", "1", "-i", "desktop", "-t", "3", "-f", "null", "-"]
        print("check   : the capture box will blink on screen for 3s ...")
        return subprocess.call(cmd)

    out = pathlib.Path(a.out) if a.out else (
        pathlib.Path(a.outdir)

Tainted flow: 'cmd' from os.environ.get (line 137, credential/environment) → subprocess.call (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/rec_region.py (reported line 125)May include surrounding context.

python
if a.check:
        cmd = common + ["-show_region", "1", "-i", "desktop", "-t", "3", "-f", "null", "-"]
        print("check   : the capture box will blink on screen for 3s ...")
        return subprocess.call(cmd)

    out = pathlib.Path(a.out) if a.out else (
        pathlib.Path(a.outdir)

Tainted flow: 'cmd' from os.environ.get (line 137, credential/environment) → subprocess.call (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/rec_region.py (reported line 145)May include surrounding context.

python
"-y", str(out),
    ]
    print("recording exactly %gs ..." % a.sec, flush=True)
    rc = subprocess.call(cmd)
    if rc == 0 and out.exists():
        print("")
        print("OK  %s  (%.2f MB)" % (out, out.stat().st_size / 1048576))

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/rec_region.py (reported line 145)May include surrounding context.

python
"-y", str(out),
    ]
    print("recording exactly %gs ..." % a.sec, flush=True)
    rc = subprocess.call(cmd)
    if rc == 0 and out.exists():
        print("")
        print("OK  %s  (%.2f MB)" % (out, out.stat().st_size / 1048576))

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/region_rec_gui.py (reported line 460)May include surrounding context.

python
"-c:v", "libx264", "-preset", "veryfast", "-crf", "18",
               "-pix_fmt", "yuv420p", "-movflags", "+faststart", "-y", str(out)]
        try:
            self.proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, creationflags=CREATE_NO_WINDOW)
        except OSError as e:
            self.proc = None
            self._status("启动 ffmpeg 失败: %s" % e)

Tainted flow: 'cmd' from os.environ.get (line 453, credential/environment) → subprocess.Popen (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/region_rec_gui.py (reported line 460)May include surrounding context.

python
"-c:v", "libx264", "-preset", "veryfast", "-crf", "18",
               "-pix_fmt", "yuv420p", "-movflags", "+faststart", "-y", str(out)]
        try:
            self.proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, creationflags=CREATE_NO_WINDOW)
        except OSError as e:
            self.proc = None
            self._status("启动 ffmpeg 失败: %s" % e)

The manifest promises exact-length recordings, but the script implements only an approximate wall-clock stop.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The ffmpeg command at L453–L460 has no output-duration or frame-count constraint. Instead, L666–L669 stop recording through a GUI timer scheduled every 200 ms (L479), measuring time from process launch rather than captured media time (L465); startup latency and timer delays therefore prevent the promised exact recording length and can allow capture beyond the requested interval.

Content

No source excerpt is available for this finding.

The GUI silently writes diagnostic system information to last_run.txt without disclosure.

Low
Category
Output Handling
Confidence
95% confidence
Finding

On startup, _write_facts() creates or overwrites last_run.txt beside the script with timestamps, display dimensions, and DPI information. Unlike the disclosed video output, this additional file write has no explanatory comment, docstring, confirmation, or user-facing notice in the supplied file.

Content

No source excerpt is available for this finding.