[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EPMA0757TDBB43W29B6RKF":3,"skill-same:01M7EPMA0757TDBB43W29B6RKF":88},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M7EPMA0757TDBB43W29B6RKF","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.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fperforming-agentless-vulnerability-scanning\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-agentless-vulnerability-scanning\ndescription: Configure and execute agentless vulnerability scanning using network\n  protocols, cloud snapshot analysis, and API-based discovery to assess systems without\n  installing endpoint agents.\ndomain: cybersecurity\nsubdomain: vulnerability-management\ntags:\n- agentless-scanning\n- vulnerability-assessment\n- cloud-security\n- ssh\n- wmi\n- snapshot-analysis\n- vuls\n- tenable\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_ai_rmf:\n- GOVERN-1.1\n- MEASURE-2.7\n- MANAGE-3.1\nnist_csf:\n- ID.RA-01\n- ID.RA-02\n- ID.IM-02\n- ID.RA-06\nmitre_attack:\n- T1190\n- T1203\n- T1068\n- T1078.004\n- T1530\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":24,"author":33,"domain":34,"license":15,"version":35,"nist_csf":36,"subdomain":41,"description":7,"nist_ai_rmf":42,"mitre_attack":46},[25,26,27,28,29,30,31,32],"agentless-scanning","vulnerability-assessment","cloud-security","ssh","wmi","snapshot-analysis","vuls","tenable","mahipal","cybersecurity","1.0",[37,38,39,40],"ID.RA-01","ID.RA-02","ID.IM-02","ID.RA-06","vulnerability-management",[43,44,45],"GOVERN-1.1","MEASURE-2.7","MANAGE-3.1",[47,48,49,50,51],"T1190","T1203","T1068","T1078.004","T1530","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fperforming-agentless-vulnerability-scanning",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill performing-agentless-vulnerability-scanning",{"tool":66,"command":67},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill performing-agentless-vulnerability-scanning",{"tool":69,"command":70},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill performing-agentless-vulnerability-scanning","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fperforming-agentless-vulnerability-scanning\u002FSKILL.md",true,[74,80,84],{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fapi-reference.md","REFERENCE","参考文档",3050,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fperforming-agentless-vulnerability-scanning\u002Freferences\u002Fapi-reference.md",{"path":81,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fstandards.md",1260,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fperforming-agentless-vulnerability-scanning\u002Freferences\u002Fstandards.md",{"path":85,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":86,"sourceHtmlUrl":87},"references\u002Fworkflows.md",2664,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fperforming-agentless-vulnerability-scanning\u002Freferences\u002Fworkflows.md",[89,98,103,110,117,124],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":97},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":99,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":97},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":97},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":97},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":97},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":97},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]