/ubuntu-security:malware-scanfrom ubuntu-security
Run an on-demand malware, rootkit or file-integrity scan on Ubuntu with the installed tools — ClamAV (clamdscan / clamscan) over home, a path, or the whole filesystem, plus rkhunter, chkrootkit, Lynis and AIDE — write per-tool reports and a summary, and interpret the results including well-known false positives. Never quarantines or deletes. Use when the user says "scan my system", "scan this folder / file / download for viruses", "run clamav", "run rkhunter", "check for rootkits", "lynis audit", "aide check", or "is this file malicious".
Ships in ubuntu-security. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
| Mode | Targets | Tools (default) | Duration |
|---|---|---|---|
quick (default) | the user's home | ClamAV + rkhunter | minutes |
path | one file/folder the user names | ClamAV | seconds–minutes |
deep | / minus /proc /sys /dev /run /snap | every installed tool | can exceed an hour; warn first |
--tools clamav,rkhunter,chkrootkit,lynis,aide overrides the tool list. Check what is
installed first (command -v clamscan rkhunter chkrootkit lynis aide); if nothing is,
route to av-install. If signatures are more than a few days old
(clamscan --version), run av-update-definitions first.
REPORTS="$(jq -r .reports_dir "${CLAUDE_USER_DATA:-${XDG_DATA_HOME:-$HOME/.local/share}/claude-plugins}/ubuntu-security/config.json" 2>/dev/null || echo ~/security-reports)"
sudo bash "$SCRIPTS/av-scan.sh" --mode quick --out "$REPORTS"
sudo bash "$SCRIPTS/av-scan.sh" --mode path --path ~/Downloads/suspicious.zip --out "$REPORTS"
sudo bash "$SCRIPTS/av-scan.sh" --mode deep --out "$REPORTS"
It prints the summary path and exits 0 clean / 1 something to review / 2 error.
Layout: <reports>/<tool>/<timestamp>.txt and <reports>/_summary/<timestamp>.md.
Long scans: run in the background and report when done.
By hand:
| Tool | Command |
|---|---|
| ClamAV (daemon up) | clamdscan --multiscan --fdpass --infected <path> |
| ClamAV (no daemon) | clamscan -r --infected <path> (add `--exclude-dir='^/(proc |
| rkhunter | sudo rkhunter --check --skip-keypress --report-warnings-only --nocolors |
| chkrootkit | sudo chkrootkit -q |
| Lynis | sudo lynis audit system --quick --no-colors (details in /var/log/lynis-report.dat) |
| AIDE | sudo aide --config /etc/aide/aide.conf --check |
ClamAV exit codes: 0 clean, 1 infected found, 2 error (unreadable files, no signatures). Archives are scanned inside by default.
Put real findings at the top; keep clean results to one line each.
ClamAV
Eicar-Test-Signature is the harmless industry test file.PUA.* hits are "potentially unwanted" (adware, crack tools, password recovery
tools), not necessarily malware; Ubuntu's default config doesn't enable PUA
detection, so seeing them means the user enabled it.Heuristics.* (e.g. Heuristics.Encrypted.Zip, Heuristics.Phishing.Email) are
rule-based flags, often benign on password-protected archives or HTML mail.rkhunter — common benign warnings on Ubuntu:
File properties have changed for binaries right after apt upgrade → the baseline
is older than the upgrade. Confirm with grep -E 'upgrade|install' /var/log/dpkg.log
around that date; then the user may choose sudo rkhunter --propupd./usr/bin/lwp-request script replacement, /etc/.updated, /dev/shm/* files from
PulseAudio/PipeWire/Chrome, hidden dirs like /etc/.java → expected on many systems.PermitRootLogin warnings reflect config, not compromise.chkrootkit — known false positives:
INFECTED: Possible Malicious Linux.Xor.DDoS installed for files in /tmp built
by legitimate tools; check what the file is (file, dpkg -S).bindshell INFECTED on port 465 (SMTPS from a mail server).packet sniffer / PACKET SNIFFER for interfaces in promiscuous mode
(dhclient, NetworkManager, Wireshark, Docker bridges).Searching for suspicious files and dirs listing .gitignore, .build-id,
.document files under /usr/lib.AIDE — changes right after package updates are expected. If the user confirms
the changes are theirs, re-baseline only on request:
sudo aide --config /etc/aide/aide.conf --update && sudo mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db.
Lynis — a hardening score and suggestions, not a malware verdict. Report the index
and warning count; list warnings (grep '^warning' /var/log/lynis-report.dat).
Suggestions only if the user asks.
dpkg -S <path>) or origin; let the user decide.av-scan.sh is in this plugin's scripts/ directory:
SCRIPTS="${CLAUDE_PLUGIN_ROOT}/scripts". If CLAUDE_PLUGIN_ROOT is unset, clone
https://github.com/danielrosehill/Ubuntu-Security (e.g. to
~/.local/share/ubuntu-security-skills) and use its scripts/.
What SKILL.md sets; muted values are Claude Code's defaults
ubuntu-security@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin ubuntu-security18 skills in this plugin
/av-installInstall and initialise malware and rootkit scanning on Ubuntu — the core set (ClamAV engine + clamd daemon + freshclam updater, ClamTk GUI on desktops, rkhunter) and, on request, the advanced layer (Lynis hardening audit, chkrootkit, AIDE file-integrity baseline, debsecan). Detects what is already installed, picks a reports folder, runs the first definitions update and baselines. Use when the user says "install antivirus", "set up clamav", "install rkhunter / lynis / aide / chkrootkit", "set up malware scanning", or when malware-scan finds no scanners installed./av-update-definitionsRefresh signature databases and data for every installed scanner on Ubuntu — freshclam (ClamAV), rkhunter --update, Lynis version check, debsecan CVE list — and report one status line per tool, without re-baselining rkhunter or AIDE. Also explains stale ClamAV signatures (freshclam service down, mirror rate-limiting). Use when the user says "update antivirus definitions", "refresh signatures", "update clamav", "is clamav up to date", or before a scan when signatures are old./complementary-pluginsList and install plugins that complement ubuntu-security: hardware-auth-keys, security-auditor, ubuntu-admin. Use on "related plugins".Other plugins' skills for the same job