internal/skills/catalog/chown/SKILL.md
# chown — File Ownership Management ## Category System Hardening ## License GPLv3+ (GNU coreutils) ## Source https://github.com/coreutils/coreutils (included in all Linux distributions) ## Purpose Change file and directory ownership (user and group). Companion to `chmod` — together they provide complete file access control. ## Use Cases - Restore correct ownership on system files tampered by an attacker - Set ownership on newly created configuration files - Ensure sensitive files (shadow, S
npx skillsauth add ggp1/mitiga internal/skills/catalog/chownInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
System Hardening
GPLv3+ (GNU coreutils)
https://github.com/coreutils/coreutils (included in all Linux distributions)
Change file and directory ownership (user and group). Companion to chmod — together they provide complete file access control.
# Set correct ownership on shadow file
chown mitiga:shadow /etc/shadow
# Fix SSH directory ownership
chown -R mitiga:mitiga /etc/ssh/
# Set ownership on TLS certificates
chown mitiga:ssl-cert /etc/ssl/private/mitiga.key
# Verify current ownership before changing (use stat first)
stat -c '%U:%G %a %n' /etc/shadow
chown mitiga:shadow /etc/shadow
# Recursively fix ownership on a config directory
chown -R mitiga:mitiga /etc/mitiga/
stat before modifying. Log the before-and-after state.-R (recursive) with extreme caution — verify the target path is correct.development
# who / w — Logged-in Users ## Category User & Group Management ## License GPLv3+ (GNU coreutils) / GPLv2 (procps-ng) ## Source Included in all Linux distributions. ## Purpose Show who is currently logged in and what they are doing. ## Use Cases - Detect unauthorized active sessions - Monitor interactive logins in real-time - Identify login sources (IP, terminal) - Review idle times for active sessions ## Examples ```bash # All login information who -a # Currently logged-in users with act
development
# useradd / usermod / userdel — User Account Management ## Category User & Group Management ## License BSD-3-Clause (shadow-utils) ## Source https://github.com/shadow-maint/shadow (included in all Linux distributions) ## Purpose Create, modify, and delete user accounts. ## Use Cases - Create service accounts for Mitiga components - Modify user group memberships - Disable or remove compromised accounts - Audit account configurations ## Examples ```bash # Create a system service account (no
development
# ufw — Uncomplicated Firewall ## Category System Hardening ## License GPLv3 ## Source https://code.launchpad.net/ufw (included in Ubuntu/Debian) ## Purpose Simplified interface for managing iptables/nftables rules. ## Use Cases - Quick firewall status checks - Rule modifications on systems using ufw - Block malicious sources during incident response ## Examples ```bash # Show firewall status and rules ufw status verbose # Block a malicious IP ufw deny from <malicious_ip> # Allow a speci
development
# trivy — Comprehensive Vulnerability Scanner ## Category Vulnerability Scanning ## License Apache 2.0 ## Source https://github.com/aquasecurity/trivy (CNCF project) ## Purpose Scan filesystems, container images, Git repositories, and IaC configurations for known vulnerabilities (CVEs), misconfigurations, and exposed secrets. ## Use Cases - Audit project dependencies for known CVEs - Scan configuration files for misconfigurations - Detect embedded secrets in repositories - Scan container im