CyberKit

sudoers Configuration

Also called /etc/sudoers, sudoers.d, sudo rules.

Policy file granting privileged command execution; a prime privilege-escalation target.

What it is

The /etc/sudoers file and its /etc/sudoers.d drop-ins define which users and groups may run which commands as other users (commonly root), with options like NOPASSWD and command restrictions. The policy is edited safely with visudo to avoid syntax lockouts.

Where it lives

/etc/sudoers and /etc/sudoers.d/

Why it matters

Overly broad or tampered rules (a user granted NOPASSWD ALL, or a drop-in file added to sudoers.d) are a direct route to root and a frequent post-exploitation modification. Comparing the current policy against a known baseline quickly exposes such grants.

In practice

A one-line file dropped into /etc/sudoers.d gave a low-privilege web account NOPASSWD: ALL, neatly explaining how the attacker reached root without cracking a password.

What to look for

  • NOPASSWD entries for users or wildcards.
  • New files in /etc/sudoers.d.
  • Rules allowing editors or interpreters that can spawn shells.

Common mistake

Allowing a command that can launch a shell. vi, less, find and many others give root through sudo.

Practice it nearby

CyberKit has no tool for this term itself. These are the closest places to practice it.

In the field

Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.

  • osquery Open source

    Exposes Linux and macOS system state as SQL tables you can query.

  • Velociraptor Open source

    Collects Linux artifacts such as logs, cron and shell history at scale. Our notes.

  • Falco Open source

    Watches system calls at runtime and alerts on suspicious behavior.

  • Wazuh Open source

    Collects Linux logs and checks file integrity on each host.

Read next

Sources