hardening-linux-endpoint-with-cis-benchmark
Faz seu agente reforçar a segurança de computadores Linux seguindo padrões recomendados. Isso reduz as chances de ataques e garante que os sistemas estejam em conformidade.
O que ela faz
Este agente aplica configurações de segurança recomendadas pelo CIS Benchmark em servidores Linux. Ele ajuda a tornar seus servidores mais seguros, seguindo um padrão de segurança reconhecido.
Quando usar
- ✓Ao configurar um novo servidor Linux.
- ✓Para verificar e melhorar a segurança de servidores Linux existentes.
- ✓Para atender a requisitos de segurança de empresas ou órgãos reguladores.
Exemplo do que pedir para a IA
“Configure meu servidor Linux seguindo o CIS Benchmark.”
Quer saber mais? Abra as seções abaixo.
Como usar
O jeito mais fácil: copie a mensagem abaixo e cole no Claude, ChatGPT, Cursor ou outra IA. Ela lê a skill e segue as instruções.
Link da skill
Mensagem pronta para colar
Como funciona
O agente modifica arquivos de configuração do sistema, desabilita serviços desnecessários e ajusta parâmetros de rede. Ele usa ferramentas como OpenSCAP para verificar se as configurações estão corretas.
Instalação
Jeito mais fácil: copie o link da skill e cole no Claude, ChatGPT ou Cursor pedindo para seguir as instruções.
No terminal (Claude Code, Codex, Cursor), na pasta do projeto:
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill hardening-linux-endpoint-with-cis-benchmarkOu baixe só o arquivo:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/hardening-linux-endpoint-with-cis-benchmark/SKILL.md -o SKILL.mdConteúdo técnico (SKILL.md)
Tradução do texto original do autor no GitHub. Os comandos e códigos estão como no original.
Fortalecimento de Endpoints Linux com o CIS Benchmark
Quando Usar
Use esta habilidade quando:
- Estiver fortalecendo servidores Linux (Ubuntu, RHEL, CentOS, Debian) contra os benchmarks do CIS
- Estiver automatizando linhas de base de segurança Linux usando Ansible, OpenSCAP ou scripts shell
- Precisar atender a requisitos de conformidade (PCI DSS, HIPAA, SOC 2) para endpoints Linux
- Estiver remediando descobertas de varreduras de vulnerabilidade ou auditorias de segurança
Não use para fortalecimento de Windows (use hardening-windows-endpoint-with-cis-benchmark).
Pré-requisitos
- Acesso root ou sudo nos endpoints Linux de destino
- PDF do CIS Benchmark para a distribuição de destino (de cisecurity.org)
- OpenSCAP ou CIS-CAT para avaliação automatizada
- Ansible para remediação em escala empresarial (opcional)
Fluxo de Trabalho
Etapa 1: Configuração do Sistema de Arquivos (Seção 1)
# 1.1.1 Disable unused filesystems
cat >> /etc/modprobe.d/CIS.conf << 'EOF'
install cramfs /bin/true
install freevxfs /bin/true
install jffs2 /bin/true
install hfs /bin/true
install hfsplus /bin/true
install squashfs /bin/true
install udf /bin/true
EOF
# 1.1.2 Ensure /tmp is a separate partition with nodev,nosuid,noexec
# /etc/fstab entry:
# tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0
systemctl unmask tmp.mount
systemctl enable tmp.mount
# 1.1.8 Ensure nodev option on /dev/shm
mount -o remount,nodev,nosuid,noexec /dev/shm
echo "tmpfs /dev/shm tmpfs defaults,nodev,nosuid,noexec 0 0" >> /etc/fstab
# 1.4 Secure boot settings
chown root:root /boot/grub/grub.cfg
chmod 600 /boot/grub/grub.cfg
# Set GRUB password
grub-mkpasswd-pbkdf2 # Generate hash, add to /etc/grub.d/40_custom
Etapa 2: Serviços e Rede (Seções 2-3)
# 2.1 Disable unnecessary services
systemctl disable --now avahi-daemon
systemctl disable --now cups
systemctl disable --now rpcbind
systemctl disable --now xinetd
# 2.2 Ensure NTP is configured
apt install chrony -y # or systemd-timesyncd
systemctl enable --now chrony
# 3.1 Network parameters (host only, not router)
cat >> /etc/sysctl.d/99-cis.conf << 'EOF'
net.ipv4.ip_forward = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.default.log_martians = 1
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.tcp_syncookies = 1
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.accept_ra = 0
EOF
sysctl --system
# 3.4 Configure firewall (UFW or firewalld)
ufw enable
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
Etapa 3: Controle de Acesso (Seções 4-5)
# 5.2 SSH Server Configuration (/etc/ssh/sshd_config)
sed -i 's/#Protocol 2/Protocol 2/' /etc/ssh/sshd_config
cat >> /etc/ssh/sshd_config << 'EOF'
LogLevel VERBOSE
MaxAuthTries 4
PermitRootLogin no
PermitEmptyPasswords no
PasswordAuthentication no
X11Forwarding no
MaxStartups 10:30:60
LoginGraceTime 60
AllowTcpForwarding no
ClientAliveInterval 300
ClientAliveCountMax 3
EOF
systemctl restart sshd
# 5.3 Password policy (PAM)
# /etc/security/pwquality.conf
minlen = 14
dcredit = -1
ucredit = -1
ocredit = -1
lcredit = -1
# 5.4 User account settings
# /etc/login.defs
PASS_MAX_DAYS 365
PASS_MIN_DAYS 1
PASS_WARN_AGE 7
# Lock inactive accounts
useradd -D -f 30
Etapa 4: Auditoria e Logs (Seção 4)
# Instalar e configurar o auditd
apt install auditd audispd-plugins -y
systemctl enable --now auditd
# /etc/audit/rules.d/cis.rules
cat > /etc/audit/rules.d/cis.rules << 'EOF'
-w /etc/sudoers -p wa -k scope
-w /etc/sudoers.d/ -p wa -k scope
-w /var/log/sudo.log -p wa -k actions
-a always,exit -F arch=b64 -S adjtimex -S settimeofday -k time-change
-a always,exit -F arch=b64 -S sethostname -S setdomainname -k system-locale
-w /etc/group -p wa -k identity
-w /etc/passwd -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /var/log/faillog -p wa -k logins
-w /var/log/lastlog -p wa -k logins
-a always,exit -F arch=b64 -S chmod -S fchmod -S fchmodat -k perm_mod
-a always,exit -F arch=b64 -S unlink -S rmdir -S rename -k delete
-w /sbin/insmod -p x -k modules
-w /sbin/modprobe -p x -k modules
-e 2
EOF
augenrules --load
# Configurar o rsyslog para logs remotos
…
Perguntas frequentes
O que é CIS Benchmark?
É um conjunto de melhores práticas de segurança para sistemas operacionais e softwares, criado pela Center for Internet Security (CIS).
Preciso ter conhecimento em Linux para usar isso?
Não, o agente automatiza a maior parte do processo. No entanto, ter acesso de administrador (root ou sudo) ao servidor Linux é necessário.
Este agente funciona para qualquer tipo de Linux?
Ele é projetado para distribuições Linux populares como Ubuntu, RHEL e CentOS.
Detalhes
Descrição original do autor
Hardens Linux endpoints using CIS Benchmark recommendations for Ubuntu, RHEL, and CentOS to reduce attack surface, enforce security baselines, and meet compliance requirements. Use when deploying new Linux servers, remediating audit findings, or establishing security baselines for Linux infrastructure. Activates for requests involving Linux hardening, CIS benchmarks for Linux, server security base
Popularidade
- Estrelas no GitHub
- 35 mil
- Posição no ranking
- #5779
- Licença
- Apache-2.0
- Atualizada em
- 31/08/2026
Comentários
- …
Mais skills deste repositório
abusing-dpapi-for-credential-access
Dá ao seu agente de IA instruções prontas para uma tarefa específica, para ele fazer melhor e mais rápido.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Ensina seu agente de IA a escrever textos claros e bem estruturados.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Ajuda seu agente a preparar um ambiente para conformidade com CMMC Nível 2. Ele implementa requisitos de segurança e gerencia a documentação necessária.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Ajuda seu agente a criar cópias exatas de discos rígidos. Isso é útil para garantir que nenhuma informação seja perdida ou alterada durante investigações.
mukul975/Anthropic-Cybersecurity-Skills
Skills parecidas
dashboard-builder
Ajuda seu agente a criar painéis de monitoramento úteis. Ele transforma dados em gráficos que respondem a perguntas importantes sobre o sistema.
affaan-m/ECC
dev-team
Simula uma equipe de desenvolvimento colaborativa, onde diferentes papéis respondem a um problema juntos. É útil para obter múltiplas perspectivas sem trocar de agente manualmente.
affaan-m/ECC
ecc-council
Faz seu agente reunir um conselho de quatro vozes para tomar decisões difíceis. É útil quando há várias opções boas e é preciso debater antes de escolher.
affaan-m/ECC