Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Configure and execute agentless vulnerability scanning using network protocols, cloud snapshot analysis, and API-based discovery to assess systems without installing endpoint agents.
.claude/skills/performing-agentless-vulnerability-scanning/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 55 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-18 | ✗→✓ | ▲ Improved | — | — |
| case-04 | ✗→✓ | ▲ Improved | — | — |
| case-15 | ✗→✓ | ▲ Improved | — | — |
| case-11 | ✗→✓ | ▲ Improved | — | — |
| case-23 | ✗→✗ | = Same ✗ | — | — |
Agentless vulnerability scanning assesses systems for security weaknesses without requiring endpoint agent installation. This approach leverages existing network protocols (SSH for Linux, WMI for Windows), cloud provider APIs for snapshot-based analysis, and authenticated remote checks. Modern cloud platforms like Microsoft Defender for Cloud, Wiz, Datadog, and Tenable perform out-of-band analysis by taking disk snapshots and examining OS configurations and installed packages offline. The open-source tool Vuls provides agentless scanning based on NVD and OVAL data for Linux/FreeBSD systems. This skill covers configuring agentless scans across on-premises, cloud, and containerized environments.
| Aspect | Agentless | Agent-Based | |--------|-----------|-------------| | Deployment | No software installation needed | Agent install on every endpoint | | Network dependency | Requires network connectivity | Works offline with cloud sync | | Performance impact | Minimal on target systems | Light continuous overhead | | Coverage depth | Depends on protocol/credentials | Deep local access | | Cloud snapshot analysis | Native capability | Not applicable | | Ideal for | Cloud VMs, IoT, legacy systems, OT | Managed endpoints, laptops |
| Method | Protocol | Target OS | Port | Use Case | |--------|----------|-----------|------|----------| | SSH Remote Commands | SSH | Linux/Unix | 22 | Package enumeration, config audit | | WMI Remote Query | WMI/DCOM | Windows | 135, 445 | Hotfix enumeration, registry checks | | WinRM PowerShell | WS-Man | Windows | 5985/5986 | Remote command execution | | SNMP Community | SNMP v2c/v3 | Network devices | 161 | Device fingerprinting, firmware check | | Cloud Snapshot | Provider API | Cloud VMs | N/A | Disk image analysis | | Container Registry | HTTPS | Container images | 443 | Image vulnerability scanning | | API-Based | REST/HTTPS | SaaS/Cloud | 443 | Configuration assessment |
1. Scanner requests disk snapshot via cloud API
2. Cloud provider creates snapshot of VM root + data disks
3. Scanner mounts snapshot in isolated analysis environment
4. Scanner examines OS packages, configurations, file system
5. Snapshot is deleted after analysis (no persistent copies)
6. Results sent to central management consolebash# Create dedicated scan SSH key pair ssh-keygen -t ed25519 -f /opt/scanner/.ssh/scan_key -N "" \ -C "vuln-scanner@security.local" # Deploy public key to targets via Ansible # ansible-playbook deploy_scan_key.yml # Test connectivity to target ssh -i /opt/scanner/.ssh/scan_key -o ConnectTimeout=10 \ scanner@target-host "cat /etc/os-release && dpkg -l 2>/dev/null || rpm -qa"
pythonimport paramiko import json class AgentlessLinuxScanner: """SSH-based agentless vulnerability scanner for Linux systems.""" def __init__(self, key_path): self.key_path = key_path def connect(self, hostname, username="scanner", port=22): """Establish SSH connection to target.""" client = paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) key = paramiko.Ed25519Key.from_private_key_file(self.key_path) client.connect(hostname, port=port, username=username, pkey=key, timeout=30, banner_timeout=30) return client def get_os_info(self, client): """Detect OS type and version.""" _, stdout, _ = client.exec_command("cat /etc/os-release", timeout=10) os_release = stdout.read().decode() info = {} for line in os_release.strip().split("\n"): if "=" in line: key, val = line.split("=", 1) info[key] = val.strip('"') return info def get_installed_packages(self, client): """Enumerate installed packages.""" # Try dpkg (Debian/Ubuntu) _, stdout, _ = client.exec_command( "dpkg-query -W -f='${Package}|${Version}|${Architecture}\\n'", timeout=30 ) output = stdout.read().decode().strip() if output: packages = [] for line in output.split("\n"): parts = line.split("|") if len(parts) >= 2: packages.append({ "name": parts[0], "version": parts[1], "arch": parts[2] if len(parts) > 2 else "", "manager": "dpkg" }) return packages # Try rpm (RHEL/CentOS/Fedora) _, stdout, _ = client.exec_command( "rpm -qa --queryformat '%{NAME}|%{VERSION}-%{RELEASE}|%{ARCH}\\n'", timeout=30 ) output = stdout.read().decode().strip() packages = [] for line in output.split("\n"): parts = line.split("|") if len(parts) >= 2: packages.append({ "name": parts[0], "version": parts[1], "arch": parts[2] if len(parts) > 2 else "", "manager": "rpm" }) return packages def check_kernel_version(self, client): """Get running kernel version.""" _, stdout, _ = client.exec_command("uname -r", timeout=10) return stdout.read().decode().strip() def check_listening_ports(self, client): """Enumerate listening network services.""" _, stdout, _ = client.exec_command( "ss -tlnp 2>/dev/null || netstat -tlnp 2>/dev/null", timeout=10 ) return stdout.read().decode().strip() def scan_host(self, hostname, username="scanner"): """Perform full agentless scan of a host.""" print(f"[*] Scanning {hostname}...") client = self.connect(hostname, username) result = { "hostname": hostname, "os_info": self.get_os_info(client), "kernel": self.check_kernel_version(client), "packages": self.get_installed_packages(client), "listening_ports": self.check_listening_ports(client), } client.close() print(f" [+] Found {len(result['packages'])} packages on {hostname}") return result
pythonimport winrm class AgentlessWindowsScanner: """WinRM-based agentless vulnerability scanner for Windows.""" def __init__(self, username, password, domain=None): self.username = username self.password = password self.domain = domain def connect(self, hostname, use_ssl=True): """Create WinRM session.""" port = 5986 if use_ssl else 5985 transport = "ntlm" user = f"{self.domain}\\{self.username}" if self.domain else self.username session = winrm.Session( f"{'https' if use_ssl else 'http'}://{hostname}:{port}/wsman", auth=(user, self.password), transport=transport, server_cert_validation="ignore" ) return session def get_installed_hotfixes(self, session): """Get installed Windows updates/hotfixes.""" cmd = "Get-HotFix | Select-Object HotFixID,InstalledOn,Description | ConvertTo-Json" result = session.run_ps(cmd) if result.status_code == 0: return json.loads(result.std_out.decode()) return [] def get_installed_software(self, session): """Enumerate installed software from registry.""" cmd = """ $paths = @( 'HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*', 'HKLM:\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\*' ) Get-ItemProperty $paths -ErrorAction SilentlyContinue | Where-Object {$_.DisplayName} | Select-Object DisplayName, DisplayVersion, Publisher | ConvertTo-Json """ result = session.run_ps(cmd) if result.status_code == 0: return json.loads(result.std_out.decode()) return [] def get_os_info(self, session): """Get Windows OS details.""" cmd = "Get-CimInstance Win32_OperatingSystem | Select-Object Caption,Version,BuildNumber,OSArchitecture | ConvertTo-Json" result = session.run_ps(cmd) if result.status_code == 0: return json.loads(result.std_out.decode()) return {} def scan_host(self, hostname): """Perform full agentless scan of Windows host.""" print(f"[*] Scanning {hostname} via WinRM...") session = self.connect(hostname) result = { "hostname": hostname, "os_info": self.get_os_info(session), "hotfixes": self.get_installed_hotfixes(session), "software": self.get_installed_software(session), } print(f" [+] Found {len(result['hotfixes'])} hotfixes, " f"{len(result['software'])} software entries") return result
pythonimport boto3 import time class AWSSnapshotScanner: """AWS EC2 agentless snapshot-based vulnerability scanner.""" def __init__(self, region="us-east-1"): self.ec2 = boto3.client("ec2", region_name=region) def create_snapshot(self, volume_id, description="Security scan snapshot"): """Create EBS snapshot for analysis.""" snapshot = self.ec2.create_snapshot( VolumeId=volume_id, Description=description, TagSpecifications=[{ "ResourceType": "snapshot", "Tags": [ {"Key": "Purpose", "Value": "VulnScan"}, {"Key": "AutoDelete", "Value": "true"}, ] }] ) snapshot_id = snapshot["SnapshotId"] print(f" [*] Creating snapshot {snapshot_id} from {volume_id}...") waiter = self.ec2.get_waiter("snapshot_completed") waiter.wait(SnapshotIds=[snapshot_id]) print(f" [+] Snapshot {snapshot_id} ready") return snapshot_id def delete_snapshot(self, snapshot_id): """Clean up snapshot after analysis.""" self.ec2.delete_snapshot(SnapshotId=snapshot_id) print(f" [+] Deleted snapshot {snapshot_id}") def scan_instance(self, instance_id): """Scan an EC2 instance via snapshot analysis.""" print(f"[*] Agentless scan of instance {instance_id}") instance = self.ec2.describe_instances( InstanceIds=[instance_id] )["Reservations"][0]["Instances"][0] root_volume = None for bdm in instance.get("BlockDeviceMappings", []): if bdm["DeviceName"] == instance.get("RootDeviceName"): root_volume = bdm["Ebs"]["VolumeId"] break if not root_volume: print(" [!] No root volume found") return None snapshot_id = self.create_snapshot(root_volume) try: # Analysis would be performed here # Mount snapshot, examine packages, check configs result = { "instance_id": instance_id, "snapshot_id": snapshot_id, "root_volume": root_volume, "platform": instance.get("Platform", "linux"), "state": instance["State"]["Name"], } return result finally: self.delete_snapshot(snapshot_id)
toml# /etc/vuls/config.toml - Vuls configuration for agentless scanning [servers] [servers.web-server-01] host = "192.168.1.10" port = "22" user = "vuls" keyPath = "/opt/vuls/.ssh/scan_key" scanMode = ["fast"] [servers.db-server-01] host = "192.168.1.20" port = "22" user = "vuls" keyPath = "/opt/vuls/.ssh/scan_key" scanMode = ["fast-root"] [servers.db-server-01.optional] [servers.db-server-01.optional.sudo] password = "" [servers.container-host-01] host = "192.168.1.30" port = "22" user = "vuls" keyPath = "/opt/vuls/.ssh/scan_key" scanMode = ["fast"] containersIncluded = ["${running}"]
bash# Run Vuls agentless scan vuls scan # Generate report vuls report -format-json -to-localfile # View results vuls tui
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-23 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-24 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted, and 23 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +17 percentage points is the difference between those two pass rates over the 23 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.