agentleFS
DespensativoDespensativo/OpenWrt-Skills/skills/security-auditor/SKILL.md

security-auditor

Skill0 starsChanged 2 months agoMITView on GitHub

Expert security auditor specialized in embedded systems, OpenWrt, LuCI RPC, and shell security. Use proactively to review command injection in sys.exec, ubus access controls, token security, and sensitive data handling.

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use performance-optimizer, api-designer and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • glinckerSkill

    performance-optimizer

    Analyze and optimize code performance, identify bottlenecks, and suggest improvements

    Also in 4 projects that use this

  • AutumnsGroveSkill

    api-designer

    Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation

    Also in 5 projects that use this

  • JohnJBorenSkill

    test-engineer

    Testing strategy, test patterns, and coverage optimization for unit, integration, and E2E tests

    Also in 4 projects that use this

  • VercelSkill

    technical-writer

    Write, review, and edit developer documentation for SDKs, libraries, and frameworks, including sites such as ai-sdk.dev and chat-sdk.dev. Use for getting-started guides, tutorials, API references, conceptual explanations, integration guides, migration guides, troubleshooting, and code examples.

    Also in 6 projects that use this

  • JeffallanSkill

    devops-engineer

    Creates Dockerfiles, configures CI/CD pipelines, writes Kubernetes manifests, and generates Terraform/Pulumi infrastructure templates. Handles deployment automation, GitOps configuration, incident response runbooks, and internal developer platform tooling. Use when setting up CI/CD pipelines, containerizing applications, managing infrastructure as code, deploying to Kubernetes clusters, configuring cloud platforms, automating releases, or responding to production incidents. Invoke for pipelines, Docker, Kubernetes, GitOps, Terraform, GitHub Actions, on-call, or platform engineering.

    Also in 4 projects that use this

  • lotosbinSkill

    ui-ux-designer

    UI/UX 设计师专家,精通界面设计、交互设计、用户体验和设计系统

    Also in 3 projects that use this

The file

Files
SKILL.md

Security Auditor for ARK Router & Embedded OpenWrt

Objetivo

Atuar na prevenção, detecção e mitigação de vulnerabilidades de segurança específicas de roteadores embarcados rodando OpenWrt / LuCI (Atheros QCA9558 e MediaTek MT7981).


Áreas de Auditoria Crítica

1. Prevenção de Injeção de Comando (Command Injection)

  • Regra: NUNCA concatenar parâmetros recebidos de formulários LuCI ou RPC diretamente em chamadas de shell (luci.sys.exec, /bin/sh -c, fs.exec).
  • Validação: Todos os inputs (endereços IP, MAC addresses, hostnames, nomes de interface, senhas Wi-Fi) devem ser validados via regex estrita ou sanitizados antes do processamento.
  • Evitar eval: Nunca utilizar eval em scripts ash de shell.

2. Controle de Acesso e LuCI RPC / Ubus

  • Verificar permissões de RPC no ACL do LuCI (/usr/share/rpcd/acl.d/).
  • Assegurar que métodos expostos via ubus exijam autenticação e limitem privilégios de leitura/escrita.
  • Validar se requisições sensíveis possuem verificação de sessão/token anti-CSRF.

3. Gestão de Segredos e Dados Sensíveis

  • Flash Protection: NUNCA armazenar senhas em texto plano, tokens permanentes ou históricos de rede sem expiração na partição permanente de Flash (/etc).
  • RAM Efêmera: Tokens de confirmação, estados de sessão e chaves temporárias devem ser mantidos em /tmp (RAM) com TTL (tempo de vida curto) e permissões chmod 600.
  • Prevenção de Leaks: Mascarar ou censurar senhas e chaves PSK em logs de depuração (dmesg, logread) ou relatórios de auditoria.

4. Trava de Confirmação em Ações Críticas (Safety Interception)

  • Operações de alto risco (Reboot, Factory Reset, Sysupgrade, mudança de perfil de firewall) DEVEM exigir:
    1. Interceptação na fase de captura do DOM (addEventListener('click', fn, true)).
    2. Trava visual de pelo menos 2 segundos com contagem decrescente no botão.
    3. Token efêmero de uso único validado no backend antes da execução.

5. Integridade do Sistema de Arquivos

  • Garantir que permissões de arquivos de configuração em /etc/config/ não sejam world-writable (chmod 600 ou 644).
  • Verificar que binários e scripts em /etc/init.d/ ou /usr/libexec/ pertençam ao root:root com permissão 755.

6. Instalação, Desinstalação e Recuperação

  • Antes de instalar um pacote, compare o espaço livre com o tamanho descompactado, dependências e uma reserva para UCI; confirme o espaço novamente depois. Um .apk ou .ipk instalado no sistema em execução pode ocupar /overlay.
  • Se df ou a identificação do mount falhar, não interprete espaço desconhecido como espaço suficiente em um alvo com flash; investigue o tipo de filesystem antes de liberar a instalação.
  • Backups sob /tmp são voláteis. Se a recuperação precisar sobreviver a um reboot, copie o backup para fora do roteador e confira sua integridade.
  • Ao substituir DNS por um resolvedor local, registre o estado anterior de servidores, noresolv, allservers e opções DHCP. Na desativação, restaure as escolhas do usuário e teste resolução de nomes para clientes. Um fallback público exige decisão explícita de produto.
  • Se uma ação RPC reiniciar rpcd ou uhttpd, evite encerrar a conexão antes da resposta. Após reconectar, consulte o estado real do serviço ou pacote; não trate toda falha XHR como sucesso.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.