Server Auditのロゴ

Server Audit

コミュニティ
Firstp1ck
server-audit

Agents should invoke this skill for Linux server security reviews, SSH hardening, firewall/open-port audits, user/permission checks, exposed services, or host hardening requests. Produces severity-rated findings and practical remediation steps.

概要

公開者Firstp1ck
リポジトリpi-coding-agent-forge
スキル名server-audit
スター
93
フォーク
22
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    Firstp1ckがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Server Audit」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-skill-server-audit/skills/server-audit
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forge.git /tmp/pi-coding-agent-forge
mkdir -p .claude/skills
cp -r /tmp/pi-coding-agent-forge/pi-skill-server-audit/skills/server-audit .claude/skills/server-audit
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでServer Auditを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にServer Auditを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Server Auditは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Server Audit

Security auditing and hardening for Linux systems. Covers SSH, firewalls, ports, users, and general hardening.

Quick Start

Run a Quick Security Audit

Check the essentials in order:

bash
# 1. Open ports
ss -tlnp

# 2. SSH config
grep -E "^(PasswordAuthentication|PermitRootLogin|PubkeyAuthentication)" /etc/ssh/sshd_config

# 3. Firewall status
sudo ufw status verbose   # Ubuntu/Debian
sudo firewall-cmd --list-all  # RHEL/Arch (firewalld)
sudo iptables -L -n        # Raw iptables

# 4. Failed login attempts (last 24h)
journalctl -u sshd --since "24 hours ago" | grep -c "Failed password"

# 5. Users with login shells
grep -v "nologin\|false" /etc/passwd | cut -d: -f1

SSH Hardening

Audit Checklist

CheckCommandExpectedSeverity
Root login disabledgrep PermitRootLogin /etc/ssh/sshd_confignoCritical
Password auth disabledgrep PasswordAuthentication /etc/ssh/sshd_confignoHigh
Key auth enabledgrep PubkeyAuthentication /etc/ssh/sshd_configyesHigh
Non-standard portgrep "^Port" /etc/ssh/sshd_configNot 22 (optional)Medium
Max auth triesgrep MaxAuthTries /etc/ssh/sshd_config3 or lessMedium
Idle timeoutgrep ClientAliveInterval /etc/ssh/sshd_configSet (e.g., 300)Low
Protocol 2 onlygrep Protocol /etc/ssh/sshd_config2 (default in modern)Low
Allowed users setgrep AllowUsers /etc/ssh/sshd_configSpecific users listedMedium

Recommended SSH Config

# /etc/ssh/sshd_config — hardened
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
ClientAliveInterval 300
ClientAliveCountMax 2
X11Forwarding no
AllowTcpForwarding no

After SSH Changes

bash
# Validate config before restarting
sudo sshd -t

# Restart SSH
sudo systemctl restart sshd

Firewall Audit

UFW (Ubuntu/Debian)

bash
# Status
sudo ufw status verbose

# List rules with numbers
sudo ufw status numbered

# Check default policies
sudo ufw show raw | head -20

Expected defaults:

  • Incoming: DENY
  • Outgoing: ALLOW
  • Only required ports open (22/SSH, 80/443 if web server, etc.)

Firewalld (Arch/RHEL)

bash
# Active zone and rules
sudo firewall-cmd --list-all

# List all zones
sudo firewall-cmd --get-active-zones

# Check specific port
sudo firewall-cmd --query-port=8080/tcp

Iptables (Raw)

bash
# List all rules
sudo iptables -L -n -v

# Check for wide-open rules
sudo iptables -L -n | grep "0.0.0.0/0.*ACCEPT"

Open Port Audit

Discover Listening Ports

bash
# All listening TCP ports with process names
ss -tlnp

# All listening UDP ports
ss -ulnp

# Combined with process info (requires root for all)
sudo ss -tlnp

Evaluate Open Ports

PortServiceShould Be Open?Notes
22SSHYes (if needed)Consider non-standard port
53DNS (Pi-hole)Yes (local only)Should not face internet
80/443HTTP/HTTPSDependsOnly if serving web content
3000GiteaYes (local only)Should not face internet
9222NAS SSHYes (local only)Non-standard port, good
11434OllamaYes (local only)AI inference endpoint

Scan from External Perspective

bash
# Scan a host from this machine
nmap -sT -O <target-ip>

# Quick scan common ports
nmap -F <target-ip>

# Scan specific port range
nmap -p 1-1024 <target-ip>

User and Permission Audit

Check Users

bash
# Users with login shells (potential interactive users)
grep -v "nologin\|false" /etc/passwd | cut -d: -f1

# Users with UID 0 (root-level)
awk -F: '$3 == 0 {print $1}' /etc/passwd

# Users in sudo group
getent group sudo | cut -d: -f4
getent group wheel | cut -d: -f4  # Arch/RHEL

Check Permissions

bash
# World-writable files (security risk)
find / -type f -perm -o+w 2>/dev/null | head -20

# SUID binaries (potential privilege escalation)
find / -type f -perm -4000 2>/dev/null

# Check home directory permissions
ls -la /home/

Check Sudoers

bash
# View sudoers (never edit directly, use visudo)
sudo cat /etc/sudoers
sudo ls -la /etc/sudoers.d/

Fail2ban Integration

Check Status

bash
# Fail2ban status
sudo fail2ban-client status

# SSH jail specifically
sudo fail2ban-client status sshd

# Banned IPs
sudo fail2ban-client get sshd banip --with-time

Recommended Jail Config

ini
# /etc/fail2ban/jail.local
[sshd]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
maxretry = 5
bantime = 3600
findtime = 600

Severity Ratings

When reporting audit findings, rate each item:

SeverityMeaningAction
CriticalActively exploitable, immediate riskFix now
HighSignificant risk, should fix soonFix within 24h
MediumModerate risk, best practice violationFix within a week
LowMinor improvement, defense-in-depthFix when convenient
InfoObservation, no action neededDocument only

Audit Report Format

When delivering an audit, structure it as:

  1. Executive Summary — Overall health rating, critical findings count
  2. Critical Findings — Items that need immediate attention
  3. Recommendations — Prioritized list with severity, fix commands, and reasoning
  4. What's Good — Positive findings (acknowledge what's already well-configured)

Kai skill — Security auditing and server hardening

よくある質問

AIスキル「Server Audit」では何ができますか?

Agents should invoke this skill for Linux server security reviews, SSH hardening, firewall/open-port audits, user/permission checks, exposed services, or host hardening requests. Produces severity-rated findings and practical remediation steps.

TypingMindでServer Auditを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Server Auditはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにServer Auditをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-skill-server-audit/skills/server-auditを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Server Auditを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Server Auditで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもServer Auditを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Server Audit」は無料ですか?

はい。Firstp1ckがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇