Skip to main content

Overview

The Registry Autoruns check identifies registry entries that automatically execute programs at system startup or user logon, where the executable files have weak permissions. This allows an attacker to replace legitimate autorun binaries with malicious ones for privilege escalation or persistence.

How It Works

SharpUp checks multiple autorun registry locations: HKLM Locations:
  • SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  • SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
  • SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run
  • SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce
  • SOFTWARE\Microsoft\Windows\CurrentVersion\RunService
  • SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceService
  • SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunService
  • SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnceService
For each entry:
  1. Extracts the executable path using regex
  2. Checks if the current user can modify the executable
  3. Reports modifiable autorun binaries

Example Output

Exploitation

Method 1: Replace Autorun Binary

Method 2: Persistence

Remediation

1

Identify Modifiable Autoruns

2

Secure Autorun Binaries

3

Remove Unnecessary Autoruns

Hijackable Paths

Writable folders in system PATH

Modifiable Scheduled Task

Scheduled tasks with weak permissions