OSCP-CPTS NOTES
TwitterGithubLinkedinInstagramDiscord
  • oscp-cpts-notes
  • Pivoting & Tunneling
    • Local Port Forwarding
    • Remote Port Forwarding
    • Dynamic Port Forwarding
    • Ligolo-ng
  • Linux Privilege Escalation
    • Gathering Information of the System
    • Capabilities
    • Group Based
    • SUID Privilege Escalation
    • Cron Job
    • Exploiting NFS weak Permission
    • Sudo + LD_PRELOAD (Shared Libraries)
    • Shared Object Manipulation
    • Python Library Hijacking
  • Windows Privilege Escalation
    • Gathering Information of the System
    • User Privileges
      • SeImpersonatePrivilege and SeAssignPrimaryToken
      • SeDebugPrivilege
      • SeTakeOwnershipPrivilege
    • Group Privileges
      • Backup Operators
      • DnsAdmins
      • Server Operators
      • Always Install Elevated
      • Print Operators
      • Event Log Readers
      • Hyper-V Administrators
    • Credential Theft
  • Active Directory Attacks
    • Enumeration
    • Initial Foothold
    • Gathering Users & Password Policies
    • Password Spraying
    • Credentialed Enumeration From Linux
    • Credentialed Enumeration From Windows
    • Kerberoasting - From Linux
    • Kerberoasting - From Windows
  • Beyond OSCP - CPTS
    • RED TEAMING
      • Windows Local Persistence
        • Tampering With Unprivileged Accounts
        • Backdooring Files
        • Abusing Services
        • Abusing Scheduled Tasks
        • Logon Triggered Persistence
        • Backdooring the Login Screen / RDP
        • Persisting Through Existing Services
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Windows Privilege Escalation
  2. Group Privileges

Print Operators

PreviousAlways Install ElevatedNextEvent Log Readers

Last updated 8 months ago

Was this helpful?

Overview

The Print Operators group in Windows is designed for users who need the ability to manage printers and print jobs. Members of this group can perform tasks like configuring printers, managing print queues, and performing print server tasks. While these permissions are focused on printing functionalities, they can potentially be exploited for privilege escalation on a Windows system.

Privilege Escalation via Print Operators Group and Capcom.sys Driver

The Print Operators group is a highly privileged group in Windows that grants its members several significant permissions, including:

  • SeLoadDriverPrivilege: Allows members to load and manage system drivers.

  • The ability to manage, create, share, and delete printers connected to a Domain Controller.

  • The ability to log on locally to a Domain Controller and shut it down.

Given these privileges, members of this group can load system drivers, enabling them to exploit the system further.

Using Capcom.sys for Privilege Escalation

The Capcom.sys driver is a well-known driver that allows users to execute shell code with system privileges. This driver can be particularly useful for escalating privileges in a Windows environment.

  1. Download the Capcom.sys Driver:

    • The Capcom.sys driver can be downloaded from the following GitHub repository:

    • Additionally, you can find useful tools such as LoadDriver.exe and ExploitCapcom.exe in the following repository:

  2. Create a Malicious Executable:

    • Using Metasploit, create a malicious executable (e.g., rev.exe) that will provide a reverse shell when executed. This executable will be run with elevated privileges after loading the Capcom.sys driver.

  3. Load the Capcom.sys Driver:

    • Use the LoadDriver.exe tool to load the Capcom.sys driver. The command syntax is as follows:

      .\LoadDriver.exe System\CurrentControlSet\MyService C:\Users\Test\Capcom.sys
    • Upon successful execution, this command should return NTSTATUS: 00000000, WinError: 0. If it does not, check the location of Capcom.sys or ensure that you are executing LoadDriver.exe from the correct directory.

  4. Execute the Malicious Executable:

    • After successfully loading the driver, use ExploitCapcom.exe to execute your malicious executable with elevated privileges:

      .\ExploitCapcom.exe C:\Windows\Place\to\reverseshell\rev.exe
    • This command runs the rev.exe file with system privileges, providing the attacker with a reverse shell.

Conclusion

By leveraging the permissions granted to members of the Print Operators group, especially the ability to load drivers, an attacker can use the Capcom.sys driver to execute malicious code with system privileges. Understanding these techniques is crucial for securing Windows environments and preventing unauthorized access.

Capcom-Rootkit - Capcom.sys
SeLoadDriverPrivilege - Josh Morrison