[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7558FWJHX4TN1KMY5VT6C2R":3,"skill-same:01M7558FWJHX4TN1KMY5VT6C2R":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":38,"commitSha":39,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":6,"updatedAt":43,"install":44,"resources":57},"01M7558FWJHX4TN1KMY5VT6C2R","performing-agentless-vulnerability-scanning",null,"Configure and execute agentless vulnerability scanning using network protocols, cloud snapshot analysis, and API-based discovery to assess systems without installing endpoint agents.","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: performing-agentless-vulnerability-scanning\ndescription: Configure and execute agentless vulnerability scanning using network protocols, cloud snapshot analysis, and API-based discovery to assess systems without installing endpoint agents.\ndomain: cybersecurity\nsubdomain: vulnerability-management\ntags: [agentless-scanning, vulnerability-assessment, cloud-security, ssh, wmi, snapshot-analysis, vuls, tenable]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\n---\n# Performing Agentless Vulnerability Scanning\n\n## Overview\nAgentless 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\u002FFreeBSD systems. This skill covers configuring agentless scans across on-premises, cloud, and containerized environments.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing agentless vulnerability scanning\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n- SSH key-based authentication configured on Linux\u002FUnix targets\n- WMI\u002FWinRM access on Windows targets with appropriate credentials\n- Cloud provider API credentials (AWS IAM, Azure RBAC, GCP IAM)\n- Network access from scanner to target systems on required ports\n- Service account with read-only access to target system configurations\n- Python 3.8+ for custom scanning automation\n\n## Core Concepts\n\n### Agentless vs Agent-Based Scanning\n\n| Aspect | Agentless | Agent-Based |\n|--------|-----------|-------------|\n| Deployment | No software installation needed | Agent install on every endpoint |\n| Network dependency | Requires network connectivity | Works offline with cloud sync |\n| Performance impact | Minimal on target systems | Light continuous overhead |\n| Coverage depth | Depends on protocol\u002Fcredentials | Deep local access |\n| Cloud snapshot analysis | Native capability | Not applicable |\n| Ideal for | Cloud VMs, IoT, legacy systems, OT | Managed endpoints, laptops |\n\n### Agentless Scanning Methods\n\n| Method | Protocol | Target OS | Port | Use Case |\n|--------|----------|-----------|------|----------|\n| SSH Remote Commands | SSH | Linux\u002FUnix | 22 | Package enumeration, config audit |\n| WMI Remote Query | WMI\u002FDCOM | Windows | 135, 445 | Hotfix enumeration, registry checks |\n| WinRM PowerShell | WS-Man | Windows | 5985\u002F5986 | Remote command execution |\n| SNMP Community | SNMP v2c\u002Fv3 | Network devices | 161 | Device fingerprinting, firmware check |\n| Cloud Snapshot | Provider API | Cloud VMs | N\u002FA | Disk image analysis |\n| Container Registry | HTTPS | Container images | 443 | Image vulnerability scanning |\n| API-Based | REST\u002FHTTPS | SaaS\u002FCloud | 443 | Configuration assessment |\n\n### Cloud Snapshot Analysis Flow\n```\n1. Scanner requests disk snapshot via cloud API\n2. Cloud provider creates snapshot of VM root + data disks\n3. Scanner mounts snapshot in isolated analysis environment\n4. Scanner examines OS packages, configurations, file system\n5. Snapshot is deleted after analysis (no persistent copies)\n6. Results sent to central management console\n```\n\n## Workflow\n\n### Step 1: SSH-Based Agentless Scanning (Linux)\n\n```bash\n# Create dedicated scan SSH key pair\nssh-keygen -t ed25519 -f \u002Fopt\u002Fscanner\u002F.ssh\u002Fscan_key -N \"\" \\\n  -C \"vuln-scanner@security.local\"\n\n# Deploy public key to targets via Ansible\n# ansible-playbook deploy_scan_key.yml\n\n# Test connectivity to target\nssh -i \u002Fopt\u002Fscanner\u002F.ssh\u002Fscan_key -o ConnectTimeout=10 \\\n  scanner@target-host \"cat \u002Fetc\u002Fos-release && dpkg -l 2>\u002Fdev\u002Fnull || rpm -qa\"\n```\n\n```python\nimport paramiko\nimport json\n\nclass AgentlessLinuxScanner:\n    \"\"\"SSH-based agentless vulnerability scanner for Linux systems.\"\"\"\n\n    def __init__(self, key_path):\n        self.key_path = key_path\n\n    def connect(self, hostname, username=\"scanner\", port=22):\n        \"\"\"Establish SSH connection to target.\"\"\"\n        client = paramiko.SSHClient()\n        client.set_missing_host_key_policy(paramiko.AutoAddPolicy())\n        key = paramiko.Ed25519Key.from_private_key_file(self.key_path)\n        client.connect(hostname, port=port, username=username, pkey=key,\n                       timeout=30, banner_timeout=30)\n        return client\n\n    def get_os_info(self, client):\n        \"\"\"Detect OS type and version.\"\"\"\n        _, stdout, _ = client.exec_command(\"cat \u002Fetc\u002Fos-release\", timeout=10)\n        os_release = stdout.read().decode()\n        info = {}\n        for line in os_release.strip().split(\"\\n\"):\n            if \"=\" in line:\n                key, val = line.split(\"=\", 1)\n                info[key] = val.strip('\"')\n        return info\n\n    def get_installed_packages(self, client):\n        \"\"\"Enumerate installed packages.\"\"\"\n        # Try dpkg (Debian\u002FUbuntu)\n        _, stdout, _ = client.exec_command(\n            \"dpkg-query -W -f='${Package}|${Version}|${Architecture}\\\\n'\",\n            timeout=30\n        )\n        output = stdout.read().decode().strip()\n        if output:\n            packages = []\n            for line in output.split(\"\\n\"):\n                parts = line.split(\"|\")\n                if len(parts) >= 2:\n                    packages.append({\n                        \"name\": parts[0],\n                        \"version\": parts[1],\n                        \"arch\": parts[2] if len(parts) > 2 else \"\",\n                        \"manager\": \"dpkg\"\n                    })\n            return packages\n\n        # Try rpm (RHEL\u002FCentOS\u002FFedora)\n        _, stdout, _ = client.exec_command(\n            \"rpm -qa --queryformat '%{NAME}|%{VERSION}-%{RELEASE}|%{ARCH}\\\\n'\",\n            timeout=30\n        )\n        output = stdout.read().decode().strip()\n        packages = []\n        for line in output.split(\"\\n\"):\n            parts = line.split(\"|\")\n            if len(parts) >= 2:\n                packages.append({\n                    \"name\": parts[0],\n                    \"version\": parts[1],\n                    \"arch\": parts[2] if len(parts) > 2 else \"\",\n                    \"manager\": \"rpm\"\n                })\n        return packages\n\n    def check_kernel_version(self, client):\n        \"\"\"Get running kernel version.\"\"\"\n        _, stdout, _ = client.exec_command(\"uname -r\", timeout=10)\n        return stdout.read().decode().strip()\n\n    def check_listening_ports(self, client):\n        \"\"\"Enumerate listening network services.\"\"\"\n        _, stdout, _ = client.exec_command(\n            \"ss -tlnp 2>\u002Fdev\u002Fnull || netstat -tlnp 2>\u002Fdev\u002Fnull\",\n            timeout=10\n        )\n        return stdout.read().decode().strip()\n\n    def scan_host(self, hostname, username=\"scanner\"):\n        \"\"\"Perform full agentless scan of a host.\"\"\"\n        print(f\"[*] Scanning {hostname}...\")\n        client = self.connect(hostname, username)\n\n        result = {\n            \"hostname\": hostname,\n            \"os_info\": self.get_os_info(client),\n            \"kernel\": self.check_kernel_version(client),\n            \"packages\": self.get_installed_packages(client),\n            \"listening_ports\": self.check_listening_ports(client),\n        }\n\n        client.close()\n        print(f\"  [+] Found {len(result['packages'])} packages on {hostname}\")\n        return result\n```\n\n### Step 2: WinRM-Based Agentless Scanning (Windows)\n\n```python\nimport winrm\n\nclass AgentlessWindowsScanner:\n    \"\"\"WinRM-based agentless vulnerability scanner for Windows.\"\"\"\n\n    def __init__(self, username, password, domain=None):\n        self.username = username\n        self.password = password\n        self.domain = domain\n\n    def connect(self, hostname, use_ssl=True):\n        \"\"\"Create WinRM session.\"\"\"\n        port = 5986 if use_ssl else 5985\n        transport = \"ntlm\"\n        user = f\"{self.domain}\\\\{self.username}\" if self.domain else self.username\n        session = winrm.Session(\n            f\"{'https' if use_ssl else 'http'}:\u002F\u002F{hostname}:{port}\u002Fwsman\",\n            auth=(user, self.password),\n            transport=transport,\n            server_cert_validation=\"ignore\"\n        )\n        return session\n\n    def get_installed_hotfixes(self, session):\n        \"\"\"Get installed Windows updates\u002Fhotfixes.\"\"\"\n        cmd = \"Get-HotFix | Select-Object HotFixID,InstalledOn,Description | ConvertTo-Json\"\n        result = session.run_ps(cmd)\n        if result.status_code == 0:\n            return json.loads(result.std_out.decode())\n        return []\n\n    def get_installed_software(self, session):\n        \"\"\"Enumerate installed software from registry.\"\"\"\n        cmd = \"\"\"\n        $paths = @(\n            'HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall\\\\*',\n            'HKLM:\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall\\\\*'\n        )\n        Get-ItemProperty $paths -ErrorAction SilentlyContinue |\n            Where-Object {$_.DisplayName} |\n            Select-Object DisplayName, DisplayVersion, Publisher |\n            ConvertTo-Json\n        \"\"\"\n        result = session.run_ps(cmd)\n        if result.status_code == 0:\n            return json.loads(result.std_out.decode())\n        return []\n\n    def get_os_info(self, session):\n        \"\"\"Get Windows OS details.\"\"\"\n        cmd = \"Get-CimInstance Win32_OperatingSystem | Select-Object Caption,Version,BuildNumber,OSArchitecture | ConvertTo-Json\"\n        result = session.run_ps(cmd)\n        if result.status_code == 0:\n            return json.loads(result.std_out.decode())\n        return {}\n\n    def scan_host(self, hostname):\n        \"\"\"Perform full agentless scan of Windows host.\"\"\"\n        print(f\"[*] Scanning {hostname} via WinRM...\")\n        session = self.connect(hostname)\n\n        result = {\n            \"hostname\": hostname,\n            \"os_info\": self.get_os_info(session),\n            \"hotfixes\": self.get_installed_hotfixes(session),\n            \"software\": self.get_installed_software(session),\n        }\n\n        print(f\"  [+] Found {len(result['hotfixes'])} hotfixes, \"\n              f\"{len(result['software'])} software entries\")\n        return result\n```\n\n### Step 3: Cloud Snapshot Scanning (AWS)\n\n```python\nimport boto3\nimport time\n\nclass AWSSnapshotScanner:\n    \"\"\"AWS EC2 agentless snapshot-based vulnerability scanner.\"\"\"\n\n    def __init__(self, region=\"us-east-1\"):\n        self.ec2 = boto3.client(\"ec2\", region_name=region)\n\n    def create_snapshot(self, volume_id, description=\"Security scan snapshot\"):\n        \"\"\"Create EBS snapshot for analysis.\"\"\"\n        snapshot = self.ec2.create_snapshot(\n            VolumeId=volume_id,\n            Description=description,\n            TagSpecifications=[{\n                \"ResourceType\": \"snapshot\",\n                \"Tags\": [\n                    {\"Key\": \"Purpose\", \"Value\": \"VulnScan\"},\n                    {\"Key\": \"AutoDelete\", \"Value\": \"true\"},\n                ]\n            }]\n        )\n        snapshot_id = snapshot[\"SnapshotId\"]\n        print(f\"  [*] Creating snapshot {snapshot_id} from {volume_id}...\")\n\n        waiter = self.ec2.get_waiter(\"snapshot_completed\")\n        waiter.wait(SnapshotIds=[snapshot_id])\n        print(f\"  [+] Snapshot {snapshot_id} ready\")\n        return snapshot_id\n\n    def delete_snapshot(self, snapshot_id):\n        \"\"\"Clean up snapshot after analysis.\"\"\"\n        self.ec2.delete_snapshot(SnapshotId=snapshot_id)\n        print(f\"  [+] Deleted snapshot {snapshot_id}\")\n\n    def scan_instance(self, instance_id):\n        \"\"\"Scan an EC2 instance via snapshot analysis.\"\"\"\n        print(f\"[*] Agentless scan of instance {instance_id}\")\n\n        instance = self.ec2.describe_instances(\n            InstanceIds=[instance_id]\n        )[\"Reservations\"][0][\"Instances\"][0]\n\n        root_volume = None\n        for bdm in instance.get(\"BlockDeviceMappings\", []):\n            if bdm[\"DeviceName\"] == instance.get(\"RootDeviceName\"):\n                root_volume = bdm[\"Ebs\"][\"VolumeId\"]\n                break\n\n        if not root_volume:\n            print(\"  [!] No root volume found\")\n            return None\n\n        snapshot_id = self.create_snapshot(root_volume)\n        try:\n            # Analysis would be performed here\n            # Mount snapshot, examine packages, check configs\n            result = {\n                \"instance_id\": instance_id,\n                \"snapshot_id\": snapshot_id,\n                \"root_volume\": root_volume,\n                \"platform\": instance.get(\"Platform\", \"linux\"),\n                \"state\": instance[\"State\"][\"Name\"],\n            }\n            return result\n        finally:\n            self.delete_snapshot(snapshot_id)\n```\n\n### Step 4: Vuls Open-Source Agentless Scanner\n\n```toml\n# \u002Fetc\u002Fvuls\u002Fconfig.toml - Vuls configuration for agentless scanning\n\n[servers]\n\n[servers.web-server-01]\nhost = \"192.168.1.10\"\nport = \"22\"\nuser = \"vuls\"\nkeyPath = \"\u002Fopt\u002Fvuls\u002F.ssh\u002Fscan_key\"\nscanMode = [\"fast\"]\n\n[servers.db-server-01]\nhost = \"192.168.1.20\"\nport = \"22\"\nuser = \"vuls\"\nkeyPath = \"\u002Fopt\u002Fvuls\u002F.ssh\u002Fscan_key\"\nscanMode = [\"fast-root\"]\n[servers.db-server-01.optional]\n  [servers.db-server-01.optional.sudo]\n    password = \"\"\n\n[servers.container-host-01]\nhost = \"192.168.1.30\"\nport = \"22\"\nuser = \"vuls\"\nkeyPath = \"\u002Fopt\u002Fvuls\u002F.ssh\u002Fscan_key\"\nscanMode = [\"fast\"]\ncontainersIncluded = [\"${running}\"]\n```\n\n```bash\n# Run Vuls agentless scan\nvuls scan\n\n# Generate report\nvuls report -format-json -to-localfile\n\n# View results\nvuls tui\n```\n\n## Best Practices\n1. Use SSH key-based authentication instead of passwords for Linux scanning\n2. Create dedicated service accounts with minimal read-only privileges for scanning\n3. Always clean up cloud snapshots after analysis to avoid storage costs and data exposure\n4. Combine agentless scanning with agent-based for comprehensive coverage\n5. Schedule scans during low-activity periods to minimize any performance impact\n6. Rotate scanning credentials regularly and store in a secrets vault\n7. Test scanner connectivity before scheduling production scans\n8. Use SNMPv3 with authentication and encryption for network device scanning\n\n## Common Pitfalls\n- Using shared credentials across multiple environments without proper segmentation\n- Not cleaning up temporary snapshots in cloud environments\n- Assuming agentless scanning has zero performance impact (network and CPU are used)\n- Missing WinRM\u002FSSH firewall rules causing scan failures on new deployments\n- Not accounting for SSH host key changes causing authentication failures\n- Scanning OT\u002FICS devices with protocols they cannot safely handle\n\n## Related Skills\n- implementing-rapid7-insightvm-for-scanning\n- implementing-wazuh-for-vulnerability-detection\n- deploying-osquery-for-endpoint-monitoring\n- performing-remediation-validation-scanning\n","# Performing Agentless Vulnerability Scanning\n\n## Overview\nAgentless 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\u002FFreeBSD systems. This skill covers configuring agentless scans across on-premises, cloud, and containerized environments.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing agentless vulnerability scanning\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n- SSH key-based authentication configured on Linux\u002FUnix targets\n- WMI\u002FWinRM access on Windows targets with appropriate credentials\n- Cloud provider API credentials (AWS IAM, Azure RBAC, GCP IAM)\n- Network access from scanner to target systems on required ports\n- Service account with read-only access to target system configurations\n- Python 3.8+ for custom scanning automation\n\n## Core Concepts\n\n### Agentless vs Agent-Based Scanning\n\n| Aspect | Agentless | Agent-Based |\n|--------|-----------|-------------|\n| Deployment | No software installation needed | Agent install on every endpoint |\n| Network dependency | Requires network connectivity | Works offline with cloud sync |\n| Performance impact | Minimal on target systems | Light continuous overhead |\n| Coverage depth | Depends on protocol\u002Fcredentials | Deep local access |\n| Cloud snapshot analysis | Native capability | Not applicable |\n| Ideal for | Cloud VMs, IoT, legacy systems, OT | Managed endpoints, laptops |\n\n### Agentless Scanning Methods\n\n| Method | Protocol | Target OS | Port | Use Case |\n|--------|----------|-----------|------|----------|\n| SSH Remote Commands | SSH | Linux\u002FUnix | 22 | Package enumeration, config audit |\n| WMI Remote Query | WMI\u002FDCOM | Windows | 135, 445 | Hotfix enumeration, registry checks |\n| WinRM PowerShell | WS-Man | Windows | 5985\u002F5986 | Remote command execution |\n| SNMP Community | SNMP v2c\u002Fv3 | Network devices | 161 | Device fingerprinting, firmware check |\n| Cloud Snapshot | Provider API | Cloud VMs | N\u002FA | Disk image analysis |\n| Container Registry | HTTPS | Container images | 443 | Image vulnerability scanning |\n| API-Based | REST\u002FHTTPS | SaaS\u002FCloud | 443 | Configuration assessment |\n\n### Cloud Snapshot Analysis Flow\n```\n1. Scanner requests disk snapshot via cloud API\n2. Cloud provider creates snapshot of VM root + data disks\n3. Scanner mounts snapshot in isolated analysis environment\n4. Scanner examines OS packages, configurations, file system\n5. Snapshot is deleted after analysis (no persistent copies)\n6. Results sent to central management console\n```\n\n## Workflow\n\n### Step 1: SSH-Based Agentless Scanning (Linux)\n\n```bash\n# Create dedicated scan SSH key pair\nssh-keygen -t ed25519 -f \u002Fopt\u002Fscanner\u002F.ssh\u002Fscan_key -N \"\" \\\n  -C \"vuln-scanner@security.local\"\n\n# Deploy public key to targets via Ansible\n# ansible-playbook deploy_scan_key.yml\n\n# Test connectivity to target\nssh -i \u002Fopt\u002Fscanner\u002F.ssh\u002Fscan_key -o ConnectTimeout=10 \\\n  scanner@target-host \"cat \u002Fetc\u002Fos-release && dpkg -l 2>\u002Fdev\u002Fnull || rpm -qa\"\n```\n\n```python\nimport paramiko\nimport json\n\nclass AgentlessLinuxScanner:\n    \"\"\"SSH-based agentless vulnerability scanner for Linux systems.\"\"\"\n\n    def __init__(self, key_path):\n        self.key_path = key_path\n\n    def connect(self, hostname, username=\"scanner\", port=22):\n        \"\"\"Establish SSH connection to target.\"\"\"\n        client = paramiko.SSHClient()\n        client.set_missing_host_key_policy(paramiko.AutoAddPolicy())\n        key = paramiko.Ed25519Key.from_private_key_file(self.key_path)\n        client.connect(hostname, port=port, username=username, pkey=key,\n                       timeout=30, banner_timeout=30)\n        return client\n\n    def get_os_info(self, client):\n        \"\"\"Detect OS type and version.\"\"\"\n        _, stdout, _ = client.exec_command(\"cat \u002Fetc\u002Fos-release\", timeout=10)\n        os_release = stdout.read().decode()\n        info = {}\n        for line in os_release.strip().split(\"\\n\"):\n            if \"=\" in line:\n                key, val = line.split(\"=\", 1)\n                info[key] = val.strip('\"')\n        return info\n\n    def get_installed_packages(self, client):\n        \"\"\"Enumerate installed packages.\"\"\"\n        # Try dpkg (Debian\u002FUbuntu)\n        _, stdout, _ = client.exec_command(\n            \"dpkg-query -W -f='${Package}|${Version}|${Architecture}\\\\n'\",\n            timeout=30\n        )\n        output = stdout.read().decode().strip()\n        if output:\n            packages = []\n            for line in output.split(\"\\n\"):\n                parts = line.split(\"|\")\n                if len(parts) >= 2:\n                    packages.append({\n                        \"name\": parts[0],\n                        \"version\": parts[1],\n                        \"arch\": parts[2] if len(parts) > 2 else \"\",\n                        \"manager\": \"dpkg\"\n                    })\n            return packages\n\n        # Try rpm (RHEL\u002FCentOS\u002FFedora)\n        _, stdout, _ = client.exec_command(\n            \"rpm -qa --queryformat '%{NAME}|%{VERSION}-%{RELEASE}|%{ARCH}\\\\n'\",\n            timeout=30\n        )\n        output = stdout.read().decode().strip()\n        packages = []\n        for line in output.split(\"\\n\"):\n            parts = line.split(\"|\")\n            if len(parts) >= 2:\n                packages.append({\n                    \"name\": parts[0],\n                    \"version\": parts[1],\n                    \"arch\": parts[2] if len(parts) > 2 else \"\",\n                    \"manager\": \"rpm\"\n                })\n        return packages\n\n    def check_kernel_version(self, client):\n        \"\"\"Get running kernel version.\"\"\"\n        _, stdout, _ = client.exec_command(\"uname -r\", timeout=10)\n        return stdout.read().decode().strip()\n\n    def check_listening_ports(self, client):\n        \"\"\"Enumerate listening network services.\"\"\"\n        _, stdout, _ = client.exec_command(\n            \"ss -tlnp 2>\u002Fdev\u002Fnull || netstat -tlnp 2>\u002Fdev\u002Fnull\",\n            timeout=10\n        )\n        return stdout.read().decode().strip()\n\n    def scan_host(self, hostname, username=\"scanner\"):\n        \"\"\"Perform full agentless scan of a host.\"\"\"\n        print(f\"[*] Scanning {hostname}...\")\n        client = self.connect(hostname, username)\n\n        result = {\n            \"hostname\": hostname,\n            \"os_info\": self.get_os_info(client),\n            \"kernel\": self.check_kernel_version(client),\n            \"packages\": self.get_installed_packages(client),\n            \"listening_ports\": self.check_listening_ports(client),\n        }\n\n        client.close()\n        print(f\"  [+] Found {len(result['packages'])} packages on {hostname}\")\n        return result\n```\n\n### Step 2: WinRM-Based Agentless Scanning (Windows)\n\n```python\nimport winrm\n\nclass AgentlessWindowsScanner:\n    \"\"\"WinRM-based agentless vulnerability scanner for Windows.\"\"\"\n\n    def __init__(self, username, password, domain=None):\n        self.username = username\n        self.password = password\n        self.domain = domain\n\n    def connect(self, hostname, use_ssl=True):\n        \"\"\"Create WinRM session.\"\"\"\n        port = 5986 if use_ssl else 5985\n        transport = \"ntlm\"\n        user = f\"{self.domain}\\\\{self.username}\" if self.domain else self.username\n        session = winrm.Session(\n            f\"{'https' if use_ssl else 'http'}:\u002F\u002F{hostname}:{port}\u002Fwsman\",\n            auth=(user, self.password),\n            transport=transport,\n            server_cert_validation=\"ignore\"\n        )\n        return session\n\n    def get_installed_hotfixes(self, session):\n        \"\"\"Get installed Windows updates\u002Fhotfixes.\"\"\"\n        cmd = \"Get-HotFix | Select-Object HotFixID,InstalledOn,Description | ConvertTo-Json\"\n        result = session.run_ps(cmd)\n        if result.status_code == 0:\n            return json.loads(result.std_out.decode())\n        return []\n\n    def get_installed_software(self, session):\n        \"\"\"Enumerate installed software from registry.\"\"\"\n        cmd = \"\"\"\n        $paths = @(\n            'HKLM:\\\\SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall\\\\*',\n            'HKLM:\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall\\\\*'\n        )\n        Get-ItemProperty $paths -ErrorAction SilentlyContinue |\n            Where-Object {$_.DisplayName} |\n            Select-Object DisplayName, DisplayVersion, Publisher |\n            ConvertTo-Json\n        \"\"\"\n        result = session.run_ps(cmd)\n        if result.status_code == 0:\n            return json.loads(result.std_out.decode())\n        return []\n\n    def get_os_info(self, session):\n        \"\"\"Get Windows OS details.\"\"\"\n        cmd = \"Get-CimInstance Win32_OperatingSystem | Select-Object Caption,Version,BuildNumber,OSArchitecture | ConvertTo-Json\"\n        result = session.run_ps(cmd)\n        if result.status_code == 0:\n            return json.loads(result.std_out.decode())\n        return {}\n\n    def scan_host(self, hostname):\n        \"\"\"Perform full agentless scan of Windows host.\"\"\"\n        print(f\"[*] Scanning {hostname} via WinRM...\")\n        session = self.connect(hostname)\n\n        result = {\n            \"hostname\": hostname,\n            \"os_info\": self.get_os_info(session),\n            \"hotfixes\": self.get_installed_hotfixes(session),\n            \"software\": self.get_installed_software(session),\n        }\n\n        print(f\"  [+] Found {len(result['hotfixes'])} hotfixes, \"\n              f\"{len(result['software'])} software entries\")\n        return result\n```\n\n### Step 3: Cloud Snapshot Scanning (AWS)\n\n```python\nimport boto3\nimport time\n\nclass AWSSnapshotScanner:\n    \"\"\"AWS EC2 agentless snapshot-based vulnerability scanner.\"\"\"\n\n    def __init__(self, region=\"us-east-1\"):\n        self.ec2 = boto3.client(\"ec2\", region_name=region)\n\n    def create_snapshot(self, volume_id, description=\"Security scan snapshot\"):\n        \"\"\"Create EBS snapshot for analysis.\"\"\"\n        snapshot = self.ec2.create_snapshot(\n            VolumeId=volume_id,\n            Description=description,\n            TagSpecifications=[{\n                \"ResourceType\": \"snapshot\",\n                \"Tags\": [\n                    {\"Key\": \"Purpose\", \"Value\": \"VulnScan\"},\n                    {\"Key\": \"AutoDelete\", \"Value\": \"true\"},\n                ]\n            }]\n        )\n        snapshot_id = snapshot[\"SnapshotId\"]\n        print(f\"  [*] Creating snapshot {snapshot_id} from {volume_id}...\")\n\n        waiter = self.ec2.get_waiter(\"snapshot_completed\")\n        waiter.wait(SnapshotIds=[snapshot_id])\n        print(f\"  [+] Snapshot {snapshot_id} ready\")\n        return snapshot_id\n\n    def delete_snapshot(self, snapshot_id):\n        \"\"\"Clean up snapshot after analysis.\"\"\"\n        self.ec2.delete_snapshot(SnapshotId=snapshot_id)\n        print(f\"  [+] Deleted snapshot {snapshot_id}\")\n\n    def scan_instance(self, instance_id):\n        \"\"\"Scan an EC2 instance via snapshot analysis.\"\"\"\n        print(f\"[*] Agentless scan of instance {instance_id}\")\n\n        instance = self.ec2.describe_instances(\n            InstanceIds=[instance_id]\n        )[\"Reservations\"][0][\"Instances\"][0]\n\n        root_volume = None\n        for bdm in instance.get(\"BlockDeviceMappings\", []):\n            if bdm[\"DeviceName\"] == instance.get(\"RootDeviceName\"):\n                root_volume = bdm[\"Ebs\"][\"VolumeId\"]\n                break\n\n        if not root_volume:\n            print(\"  [!] No root volume found\")\n            return None\n\n        snapshot_id = self.create_snapshot(root_volume)\n        try:\n            # Analysis would be performed here\n            # Mount snapshot, examine packages, check configs\n            result = {\n                \"instance_id\": instance_id,\n                \"snapshot_id\": snapshot_id,\n                \"root_volume\": root_volume,\n                \"platform\": instance.get(\"Platform\", \"linux\"),\n                \"state\": instance[\"State\"][\"Name\"],\n            }\n            return result\n        finally:\n            self.delete_snapshot(snapshot_id)\n```\n\n### Step 4: Vuls Open-Source Agentless Scanner\n\n```toml\n# \u002Fetc\u002Fvuls\u002Fconfig.toml - Vuls configuration for agentless scanning\n\n[servers]\n\n[servers.web-server-01]\nhost = \"192.168.1.10\"\nport = \"22\"\nuser = \"vuls\"\nkeyPath = \"\u002Fopt\u002Fvuls\u002F.ssh\u002Fscan_key\"\nscanMode = [\"fast\"]\n\n[servers.db-server-01]\nhost = \"192.168.1.20\"\nport = \"22\"\nuser = \"vuls\"\nkeyPath = \"\u002Fopt\u002Fvuls\u002F.ssh\u002Fscan_key\"\nscanMode = [\"fast-root\"]\n[servers.db-server-01.optional]\n  [servers.db-server-01.optional.sudo]\n    password = \"\"\n\n[servers.container-host-01]\nhost = \"192.168.1.30\"\nport = \"22\"\nuser = \"vuls\"\nkeyPath = \"\u002Fopt\u002Fvuls\u002F.ssh\u002Fscan_key\"\nscanMode = [\"fast\"]\ncontainersIncluded = [\"${running}\"]\n```\n\n```bash\n# Run Vuls agentless scan\nvuls scan\n\n# Generate report\nvuls report -format-json -to-localfile\n\n# View results\nvuls tui\n```\n\n## Best Practices\n1. Use SSH key-based authentication instead of passwords for Linux scanning\n2. Create dedicated service accounts with minimal read-only privileges for scanning\n3. Always clean up cloud snapshots after analysis to avoid storage costs and data exposure\n4. Combine agentless scanning with agent-based for comprehensive coverage\n5. Schedule scans during low-activity periods to minimize any performance impact\n6. Rotate scanning credentials regularly and store in a secrets vault\n7. Test scanner connectivity before scheduling production scans\n8. Use SNMPv3 with authentication and encryption for network device scanning\n\n## Common Pitfalls\n- Using shared credentials across multiple environments without proper segmentation\n- Not cleaning up temporary snapshots in cloud environments\n- Assuming agentless scanning has zero performance impact (network and CPU are used)\n- Missing WinRM\u002FSSH firewall rules causing scan failures on new deployments\n- Not accounting for SSH host key changes causing authentication failures\n- Scanning OT\u002FICS devices with protocols they cannot safely handle\n\n## Related Skills\n- implementing-rapid7-insightvm-for-scanning\n- implementing-wazuh-for-vulnerability-detection\n- deploying-osquery-for-endpoint-monitoring\n- performing-remediation-validation-scanning\n",{"name":5,"tags":25,"author":34,"domain":35,"license":15,"version":36,"subdomain":37,"description":7},[26,27,28,29,30,31,32,33],"agentless-scanning","vulnerability-assessment","cloud-security","ssh","wmi","snapshot-analysis","vuls","tenable","mahipal","cybersecurity","1.0","vulnerability-management","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill performing-agentless-vulnerability-scanning",{"tool":50,"command":51},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill performing-agentless-vulnerability-scanning",{"tool":53,"command":54},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill performing-agentless-vulnerability-scanning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002FSKILL.md",true,[58,64,68,74,78,82,88],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"assets\u002Ftemplate.md","ASSET","资产文件",993,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002Fassets\u002Ftemplate.md",{"path":65,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fapi-reference.md","REFERENCE","参考文档",3050,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002Freferences\u002Fapi-reference.md",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fstandards.md",1260,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002Freferences\u002Fstandards.md",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fworkflows.md",2664,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002Freferences\u002Fworkflows.md",{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Fagent.py","SCRIPT","脚本",6754,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002Fscripts\u002Fagent.py",{"path":89,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fprocess.py",7739,"https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fperforming-agentless-vulnerability-scanning\u002Fscripts\u002Fprocess.py",[93,101,108,115,122,129],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":20},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":97,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]