u1timate
Published on 2021-06-20 / 862 Visits
0

Goby API

0x01 获取任务列表

POST: 127.0.0.1:8361/api/v1/tasks
response:

{
    "statusCode": 200,
    "messages": "",
    "data": [
        {
            "taskId": "20210609141741",
            "name": "",
            "created_time": "2021-06-09 14:17:41",
            "end_time": "2021-06-09 14:21:05",
            "targets": "192.168.18.0/24",
            "ports": "21,22,23,25,53,U:53,80,81,110,111,123,U:123,135,U:137,139,U:161,389,443,445,465,500,515,U:520,U:523,548,623,636,873,902,1080,1099,1433,1521,U:1604,U:1645,U:1701,1883,U:1900,2049,2181,2375,2379,U:2425,3128,3306,3389,4730,U:5060,5222,U:5351,U:5353,5432,5555,5601,5672,U:5683,5900,5938,5984,6000,6379,7001,7077,8080,8081,8443,8545,8686,9000,9001,9042,9092,9100,9200,9418,9999,11211,27017,37777,50000,50070,61616",
            "state": 4,
            "progress": 34,
            "memo": "{\"taskName\":\"\",\"taskId\":null,\"asset\":{\"ips\":[\"192.168.18.0/24\"],\"ports\":\"21,22,23,25,53,U:53,80,81,110,111,123,U:123,135,U:137,139,U:161,389,443,445,465,500,515,U:520,U:523,548,623,636,873,902,1080,1099,1433,1521,U:1604,U:1645,U:1701,1883,U:1900,2049,2181,2375,2379,U:2425,3128,3306,3389,4730,U:5060,5222,U:5351,U:5353,5432,5555,5601,5672,U:5683,5900,5938,5984,6000,6379,7001,7077,8080,8081,8443,8545,8686,9000,9001,9042,9092,9100,9200,9418,9999,11211,27017,37777,50000,50070,61616\"},\"vulnerability\":{\"type\":\"0\",\"pocs_hosts\":null},\"options\":{\"queue\":0,\"rate\":100,\"random\":true,\"interface\":\"\",\"portScanMode\":0,\"proxy\":\"\",\"connectionSize\":100,\"screenshot\":false,\"screenshotRDP\":false,\"extractHost\":false,\"disableMdns\":null,\"disableUpnp\":null,\"fofaFetchSubdomainEnabled\":false,\"bruteforceSubdomainEnabled\":false,\"fofaKey\":\"\",\"fofaEmail\":\"\",\"fofaFetchSize\":100,\"pingFirst\":false,\"pingCheckSize\":10,\"pingConcurrent\":2,\"pingSendCount\":2,\"deepAnalysis\":true,\"scanICMP\":false,\"scanTreck\":false,\"checkHoneyPot\":false,\"enableCrawler\":false,\"crawlerScope\":0,\"crawlerConcurrent\":5,\"crawlerMaxLinks\":50,\"crawlerMaxCrawlLinks\":1000}}",
            "total": {
                "assets": 38,
                "ips": 101,
                "ports": 30,
                "vulnerabilities": 0,
                "allassets": 260,
                "allips": 101,
                "allports": 220,
                "allvulnerabilities": 0,
                "scan_ips": 0,
                "scan_ports": 82
            },
            "agenttaskid": ""
        }
    ]
}
  • state: 4表示暂停,1表示正在扫描,0表示没有,2表示完成 3表示正在暂停
  • progress: 表示扫描进度
  • total:表示当前扫描数据统计

0x02 恢复扫描

POST: 127.0.0.1:8361/api/v1/resumeScan

  • request:
{
    "taskID": "20210609141741"
}

  • response:
{
    "statusCode": 200,
    "messages": "",
    "data": null
}

0x03 停止扫描任务

POST: 127.0.0.1:8361/api/v1/stopScan

  • request:
{
    "taskID": "20210609141741"
}
  • response:
{
    "statusCode": 200,
    "messages": "",
    "data": null
}

{
    "statusCode": 500,
    "messages": "taskid is not same as active task",
    "data": null
}

0x04 获取任务扫描进度

POST: 127.0.0.1:8361/api/v1/getProgress

  • request:
{
    "taskID": "20210609141741"
}
  • response:
{
    "statusCode": 200,
    "messages": "",
    "data": {
        "logs": null,
        "progress": 70,
        "state": 1
    }
}


0x05 删除停止的任务

POST: 127.0.0.1:8361/api/v1/deleteTask

  • request:
{
    "taskID":"20210610153635"
}

0x06 开始一个任务

POST: 127.0.0.1:8361/api/v1/startScan

  • request:
{
    "taskName": "",
    "asset": {
        "ips": [
            "192.168.18.0/24"
        ],
        "ports": "21,22,23,25,53,U:53,80,81,110,111,123,U:123,135,U:137,139,U:161,389,443,445,465,500,515,U:520,U:523,548,623,636,873,902,1080,1099,1433,1521,U:1604,U:1645,U:1701,1883,U:1900,2049,2181,2375,2379,U:2425,3128,3306,3389,4730,U:5060,5222,U:5351,U:5353,5432,5555,5601,5672,U:5683,5900,5938,5984,6000,6379,7001,7077,8080,8081,8443,8545,8686,9000,9001,9042,9092,9100,9200,9418,9999,11211,27017,37777,50000,50070,61616"
    },
    "vulnerability": {
        "type": "-1",
        "pocs_hosts": null
    },
    "options": {
        "queue": 0,
        "random": true,
        "rate": 100,
        "portscanmode": 0,
        "CheckHoneyPot": false,
        "enableCrawler": false,
        "crawlerScope": 0,
        "crawlerConcurrent": 5,
        "crawlerMaxLinks": 50,
        "crawlerMaxCrawlLinks": 1000,
        "connectionSize": 100,
        "screenshotRDP": true,
        "screenshot": true,
        "deepAnalysis": true,
        "extracthost": false,
        "fofaFetchSubdomainEnabled": false,
        "fofaEmail": "",
        "fofaKey": "",
        "fofaFetchSize": 100,
        "pingFirst": false,
        "pingCheckSize": 10,
        "pingConcurrent": 2,
        "pingSendCount": 2
    }
}
  • type: 1表示暴力破解 -1 表示禁用扫描,0表示全部漏洞

  • response:

{
    "statusCode": 200,
    "messages": "",
    "data": {
        "taskId": "20210610153635"
    }
}


//依据扫描目标判断
{
    "statusCode": 500,
    "messages": "task launch failed, instance already running",
    "data": null
}

0x07 任务数据查询

POST: /api/v1/getStatisticsData

  • request
{"taskId":"20210609141741"}
  • response:
{
    "statusCode": 200,
    "messages": "",
    "data": {
        "taskId": "20210609141741",
        "total": {
            "assets": 47,
            "ips": 120,
            "ports": 34,
            "vulnerabilities": 1,
            "allassets": 398,
            "allips": 120,
            "allports": 330,
            "allvulnerabilities": 4,
            "scan_ips": 0,
            "scan_ports": 0
        },
        "software_products": [
            {
                "name": "Windows",
                "value": 87,
                "source": null
            },
            {
                "name": "IIS",
                "value": 68,
                "source": null
            },
            {
                "name": "Windows-Remote-Connection",
                "value": 50,
                "source": null
            },
            {
                "name": "VMware-Certification-Services",
                "value": 34,
                "source": null
            },
            {
                "name": "MySQL",
                "value": 27,
                "source": null
            }
        ],
        "software_companies": [
            {
                "name": "Microsoft Corporation",
                "value": 87,
                "source": null
            },
            {
                "name": "VMware, Inc.",
                "value": 34,
                "source": null
            },
            {
                "name": "Oracle Corporation",
                "value": 27,
                "source": null
            },
            {
                "name": "Other",
                "value": 18,
                "source": null
            },
            {
                "name": "Redis Labs",
                "value": 9,
                "source": null
            }
        ],
        "hardware_products": [
            {
                "name": "Yealink-Video-Conferencing",
                "value": 2,
                "source": null
            },
            {
                "name": "DELL_Device",
                "value": 1,
                "source": null
            }
        ],
        "hardware_companies": [
            {
                "name": "yealink",
                "value": 2,
                "source": null
            },
            {
                "name": "DELL",
                "value": 1,
                "source": null
            }
        ],
        "vulnerabilities": [
            {
                "name": "Redis unauthorized",
                "value": 4
            }
        ],
        "parent_category": [
            {
                "name": "Software System",
                "value": 104,
                "source": null
            },
            {
                "name": "Support System",
                "value": 90,
                "source": null
            },
            {
                "name": "Enterprise Application",
                "value": 76,
                "source": null
            },
            {
                "name": "Network Security",
                "value": 5,
                "source": null
            },
            {
                "name": "IoT Device",
                "value": 2,
                "source": null
            }
        ],
        "favicons": [
            {
                "name": "-1162630024",
                "value": 3,
                "source": {
                    "imgpath": "/screenshots/20210609141741/192.168.18.195-80-f.ico",
                    "imgsize": 3283
                }
            },
            {
                "name": "1852668582",
                "value": 1,
                "source": {
                    "imgpath": "/screenshots/20210609141741/192.168.18.39-8081-f.png",
                    "imgsize": 1121
                }
            },
            {
                "name": "1278323681",
                "value": 1,
                "source": {
                    "imgpath": "/screenshots/20210609141741/192.168.18.39-1080-f.png",
                    "imgsize": 1611
                }
            },
            {
                "name": "953884272",
                "value": 1,
                "source": {
                    "imgpath": "/screenshots/20210609141741/192.168.18.39-443-f.ico",
                    "imgsize": 4905
                }
            },
            {
                "name": "-297069493",
                "value": 1,
                "source": {
                    "imgpath": "/screenshots/20210609141741/192.168.18.52-8080-f.ico",
                    "imgsize": 21630
                }
            }
        ],
        "ips": [
            {
                "name": "192.168.18.39",
                "value": 10
            },
            {
                "name": "192.168.18.46",
                "value": 9
            },
            {
                "name": "192.168.18.154",
                "value": 9
            },
            {
                "name": "192.168.18.14",
                "value": 8
            },
            {
                "name": "192.168.18.13",
                "value": 8
            }
        ],
        "ports": [
            {
                "name": "80",
                "value": 78,
                "source": null
            },
            {
                "name": "3389",
                "value": 54,
                "source": null
            },
            {
                "name": "443",
                "value": 38,
                "source": null
            },
            {
                "name": "902",
                "value": 35,
                "source": null
            },
            {
                "name": "3306",
                "value": 27,
                "source": null
            }
        ]
    }
}

0x08 资产查询

POST: /api/v1/assetSearch
分页是通过IP数量进行的,可通过指定任务数据查询获取扫描出来的IP数据

  • request:
{
    "query": "taskId=\"20210609141741\" && ()",
    "options": {
        "order": {
            "vulnerabilities": "desc",
            "assets": "desc"
        },
        "page": {
            "page": 2,
            "size": 20
        }
    }
}

  • response:
{
    "statusCode": 200,
    "messages": "",
    "data": {
        "taskId": "20210609141741",
        "query_total": {
            "ips": 120,
            "ports": 330,
            "protocols": 406,
            "assets": 398,
            "vulnerabilities": 4,
            "dist_ports": 34,
            "dist_protocols": 26,
            "dist_assets": 47,
            "dist_vulnerabilities": 1
        },
        "total": {
            "assets": 92,
            "ips": 20,
            "ports": 86,
            "vulnerabilities": 0,
            "allassets": 0,
            "allips": 0,
            "allports": 0,
            "allvulnerabilities": 0,
            "scan_ips": 0,
            "scan_ports": 0
        },
        "ips": [
            {
                "ip": "192.168.18.94",
                "mac": "",
                "os": "",
                "hostname": "",
                "honeypot": "0",
                "ports": [
                    {
                        "port": "902",
                        "baseprotocol": "tcp"
                    }
                ],
                "protocols": {
                    "192.168.18.94:123": {
                        "port": "123",
                        "hostinfo": "192.168.18.94:123",
                        "url": "",
                        "product": "NTP",
                        "protocol": "ntp",
                        "json": "",
                        "products": [
                            "NTP"
                        ],
                        "protocols": [
                            "ntp"
                        ]
                    },
                    "192.168.18.94:80": {
                        "port": "80",
                        "hostinfo": "192.168.18.94:80",
                        "url": "",
                        "product": "Windows|IIS",
                        "protocol": "http",
                        "json": "",
                        "products": [
                            "Windows",
                            "IIS"
                        ],
                        "protocols": [
                            "http",
                            "web"
                        ]
                    },
                    "192.168.18.94:902": {
                        "port": "902",
                        "hostinfo": "192.168.18.94:902",
                        "url": "",
                        "product": "VMware-Certification-Services",
                        "protocol": "vmware_authentication_daemon",
                        "json": "",
                        "products": [
                            "VMware-Certification-Services"
                        ],
                        "protocols": [
                            "vmware_authentication_daemon"
                        ]
                    }
                },
                "tags": [
                    {
                        "rule_id": "7206",
                        "product": "VMware-Certification-Services",
                        "company": "VMware, Inc.",
                        "level": "3",
                        "category": "Other Enterprise Application",
                        "parent_category": "Enterprise Application",
                        "soft_hard": "2",
                        "version": "1.10"
                    }
                ],
                 "vulnerabilities": [
                    {
                        "hostinfo": "192.168.18.86:6379",
                        "name": "Redis unauthorized",
                        "filename": "redis_unauthorized.json",
                        "level": "3",
                        "vulurl": "192.168.18.86:6379",
                        "keymemo": "",
                        "hasexp": false
                    }
                ],
                "screenshots": null,
                "favicons": null,
                "hostnames": [
                    ""
                ]
            }
        ],
        "products": {
            "software": {
                "total_assets": 114,
                "risk_assets": 0,
                "lists": [
                    {
                        "name": "Redis",
                        "company": "Redis Labs",
                        "total_assets": 4,
                        "risk_assets": 0
                    }
                ]
            },
            "hardware": {
                "total_assets": 0,
                "risk_assets": 0,
                "lists": null
            }
        },
        "companies": {
            "software": {
                "total_assets": 114,
                "risk_assets": 0,
                "lists": [
                    {
                        "name": "VisualSVN Software Ltd. ",
                        "total_assets": 1,
                        "risk_assets": 0
                    }
                ]
            },
            "hardware": {
                "total_assets": 0,
                "risk_assets": 0,
                "lists": null
            }
        }
    }
}

0x09 获取POC列表

POST:/api/v1/getPOCList

  • request
{
    "query": "vultype=2",
    "options": {
        "reloadPocs": false,
        "order": {
            "vul_nums": "desc",
            "level": "desc",
            "host_nums": "desc"
        },
        "page": {
            "page": 1,
            "size": 1000
        }
    }
}
  • response
{
    "statusCode": 200,
    "messages": "",
    "data": {
        "taskId": "",
        "total": {
            "general": 225,
            "bruteforce": 9
        },
        "lists": [
            {
                "category": "system",
                "pocType": "",
                "fileName": "tongda_OA_swfupload_new_sqli.json",
                "name": "1111",
                "level": "2",
                "host_nums": 0,
                "vul_nums": 0,
                "scanTime": "",
                "hasexp": false
            }
        ],
        "failed": null
    }
}

0x10 增加POC

**POST /api/v1/verifyPoc **

  • request
{
    "jsonContent": "{\"Name\":\"test\",\"Level\":\"3\",\"Tags\":[\"SQL Injection\"],\"GobyQuery\":\"protocol=\\\"tcp\\\"\",\"Description\":\"......\",\"Product\":\"\",\"Homepage\":\"https://gobies.org/\",\"Author\":\"gobysec@gmail.com\",\"Impact\":\"<p>......</p>\",\"Recommandation\":\"<p>......</p>\",\"References\":[\"https://gobies.org/\"],\"ScanSteps\":[\"AND\",{\"Request\":{\"method\":\"GET\",\"uri\":\"/test.php\",\"follow_redirect\":true,\"header\":{},\"data_type\":\"text\",\"data\":\"\"},\"ResponseTest\":{\"type\":\"group\",\"operation\":\"AND\",\"checks\":[{\"type\":\"item\",\"variable\":\"$code\",\"operation\":\"==\",\"value\":\"200\",\"bz\":\"\"},{\"type\":\"item\",\"variable\":\"$body\",\"operation\":\"contains\",\"value\":\"test\",\"bz\":\"\"}]},\"SetVariable\":[]}],\"PostTime\":\"2021-06-10 17:08:08\",\"GobyVersion\":\"1.8.239\"}"
}

POC格式如下

{
	"Name": "test",
	"Level": "3",
	"Tags": ["SQL Injection"],
	"GobyQuery": "protocol="
	tcp "",
	"Description": "......",
	"Product": "",
	"Homepage": "https://gobies.org/",
	"Author": "gobysec@gmail.com",
	"Impact": "<p>......</p>",
	"Recommandation": "<p>......</p>",
	"References": ["https://gobies.org/"],
	"ScanSteps": ["AND", {
		"Request": {
			"method": "GET",
			"uri": "/test.php",
			"follow_redirect": true,
			"header": {},
			"data_type": "text",
			"data": ""
		},
		"ResponseTest": {
			"type": "group",
			"operation": "AND",
			"checks": [{
				"type": "item",
				"variable": "$code",
				"operation": "==",
				"value": "200",
				"bz": ""
			}, {
				"type": "item",
				"variable": "$body",
				"operation": "contains",
				"value": "test",
				"bz": ""
			}]
		},
		"SetVariable": []
	}],
	"PostTime": "2021-06-10 17:08:08",
	"GobyVersion": "1.8.239"
}

  • response
{"statusCode":200,"messages":"ok","data":null}
  • 漏洞信息
    2af681af26abe70a2a616022b1b4ea37.png
  • 测试payload以及参数截图
    a3a2c7fc32a8c0390a3835df6cb293ed.png
    f8df589b047f52b9f7e01bd4a21b6991.png
    29fe628cd312fc23630cbc34b286b4dd.png
    8e8c96098bf212a7d2fd250d412ff532.png

删除POC通过删除golib/exploits/user目录下的*.json文件即可

0x11 获取资产详细信息

POST /api/v1/getIPInfo

  • request
{"taskId":"20210609141741","ip":"192.168.18.86"}
  • response
{
    "statusCode": 200,
    "messages": "",
    "data": {
        "taskId": "20210609141741",
        "ip": "192.168.18.86",
        "os": "Windows",
        "hostname": "ZHAOTUO-4865",
        "honeypot": "0",
        "ports": [
            {
                "port": "3389",
                "baseprotocol": "tcp"
            },
            {
                "port": "1433",
                "baseprotocol": "tcp"
            },
            {
                "port": "123",
                "baseprotocol": "udp"
            },
            {
                "port": "80",
                "baseprotocol": "tcp"
            },
            {
                "port": "6379",
                "baseprotocol": "tcp"
            },
            {
                "port": "443",
                "baseprotocol": "tcp"
            },
            {
                "port": "902",
                "baseprotocol": "tcp"
            }
        ],
        "protocols": {
            "192.168.18.86:123": {
                "port": "123",
                "hostinfo": "192.168.18.86:123",
                "url": "",
                "product": "NTP",
                "protocol": "ntp",
                "json": "{\"protocol\":\"ntp\",\"notretry\":false,\"base_protocol\":\"udp\",\"status\":\"success\",\"banner\":\"Version: 3\\nClose stratum: 4\\nPolling Interval: 4\\nRoot Delay: 0.0993499755859375\\nRoot Dispersion: 0.07916259765625\\nReference ID: 169745682\\nReference Timestamp: 16459207431400142827\\n\",\"structinfo\":\"\",\"dbs\":{\"Count\":0,\"Records\":0,\"DbSize\":0},\"ip\":\"192.168.18.86\",\"port\":\"123\",\"time\":\"2021-06-09 14:19:18 +0800\"}\n",
                "products": [
                    "NTP"
                ],
                "protocols": [
                    "ntp"
                ]
            },
            "192.168.18.86:1433": {
                "port": "1433",
                "hostinfo": "192.168.18.86:1433",
                "url": "",
                "product": "Microsoft-SQL-Server",
                "protocol": "mssql",
                "json": "{\"protocol\":\"mssql\",\"notretry\":false,\"base_protocol\":\"tcp\",\"status\":\"success\",\"banner\":\"MSSQL Server\\nVersion: 201328592 (0xc0007d0)\\nSub-Build: 0\\nEncryption:Not available\\n\",\"structinfo\":\"\",\"dbs\":{\"Count\":0,\"Records\":0,\"DbSize\":0},\"ip\":\"192.168.18.86\",\"port\":\"1433\",\"time\":\"2021-06-09 14:19:03 +0800\"}\n",
                "products": [
                    "Microsoft-SQL-Server"
                ],
                "protocols": [
                    "mssql"
                ]
            },
            "192.168.18.86:3389": {
                "port": "3389",
                "hostinfo": "192.168.18.86:3389",
                "url": "",
                "product": "Windows-Remote-Connection",
                "protocol": "rdp",
                "json": "{\"protocol\":\"rdp\",\"notretry\":false,\"base_protocol\":\"tcp\",\"status\":\"success\",\"banner\":\"Remote Desktop Protocol\\n\\\\x03\\\\x00\\\\x00\\\\x13\\\\x0e\\\\xd0\\\\x00\\\\x00\\\\x124\\\\x00\\\\x03\\\\x00\\\\x08\\\\x00\\\\x05\\\\x00\\\\x00\\\\x00\\n\\nFlag: PROTOCOL_SSL | PROTOCOL_RDSTLS\\nTarget_Name: TKOFFICE\\nProduct_Version: 10.0.14393 Ntlm 15\\nOS: Windows 10\\nNetBIOS_Domain_Name: TKOFFICE\\nNetBIOS_Computer_Name: ZHAOTUO-4865\\nDNS_Domain_Name: TKOffice.local\\nDNS_Computer_Name: zhaotuo-4865.TKOffice.local\\nMsvAvDnsTreeName: TKOffice.local\\nSystem_Time: 2021-06-09 06:17:55 +0000 UTC\\n\\n\",\"structinfo\":\"\",\"dbs\":{\"Count\":0,\"Records\":0,\"DbSize\":0},\"ip\":\"192.168.18.86\",\"port\":\"3389\",\"time\":\"2021-06-09 14:17:51 +0800\",\"cert\":\"Version:  v3\\nSerial Number: 158664158618884166538543332903966121448\\nSignature Algorithm: SHA256-RSA\\n\\nIssuer:\\n  CommonName: zhaotuo-4865.TKOffice.local\\n\\nValidity:\\n  Not Before: 2021-01-12 01:23 UTC\\n  Not After : 2021-07-14 01:23 UTC\\n\\nSubject:\\n  CommonName: zhaotuo-4865.TKOffice.local\\n\\nSubject Public Key Info:\\n  Public Key Algorithm: RSA\\n  Public Key:\\n    Exponent: 65537\\n    Public Key Modulus: (2048 bits) :\\n      89:56:74:FF:34:A3:8C:84:E8:F5:52:32:67:62:44:2D:\\n      74:69:DC:62:C1:E4:D6:69:E5:54:AA:CA:D4:8A:DB:BF:\\n      95:45:60:66:E5:21:04:66:02:DB:62:DA:95:C2:7E:F8:\\n      12:2F:F8:A4:08:8E:21:51:13:7A:24:3D:B5:EA:BA:1C:\\n      42:87:5D:22:25:D7:8A:43:F7:17:3F:05:A2:FC:5D:E7:\\n      53:CB:BF:5F:CA:71:EC:7E:9D:66:E7:D2:B8:DD:01:E8:\\n      A3:FF:0F:2B:F7:07:DA:B3:0B:D7:7A:3E:2E:16:93:A4:\\n      BA:84:6D:85:9D:48:B7:84:F5:6E:DF:7B:75:0C:94:79:\\n      0C:A8:7E:7F:B0:B6:FB:1B:A6:53:CC:BC:6E:A0:3B:F9:\\n      F0:3E:7B:33:02:A7:B3:60:2A:68:49:DD:01:68:79:49:\\n      AB:72:18:AA:73:C7:D4:A8:4B:94:E4:8E:8C:01:26:42:\\n      64:A2:2B:DD:77:1D:CC:B3:75:38:1A:D5:BD:E9:B3:66:\\n      F1:5B:12:05:68:8F:ED:31:B3:11:AB:73:AF:01:49:97:\\n      56:04:94:8D:CD:09:4E:4A:00:F1:97:23:AC:8D:83:F2:\\n      FC:DE:E9:62:41:D3:6F:7B:9F:77:0C:78:1C:9D:A3:E8:\\n      4B:B5:F7:D8:41:66:D1:42:F6:69:1D:1C:BA:7E:BE:AD\\n\\nKey Usage:\\n  Key Encipherment\\n  Data Encipherment\\n\\nExtended Key Usage:\\n  Server Auth\\n\\nCertificate Signature Algorithm: SHA256-RSA\\nCertificate Signature:\\n  5B:AF:3B:2C:EF:18:2D:6C:95:CD:E2:7C:98:C9:94:CF:\\n  D1:AA:13:0F:2D:FD:AF:A1:AC:36:EC:C9:1A:90:47:07:\\n  47:43:9C:1B:AE:8E:F6:97:DF:6C:AB:1D:40:75:F2:CB:\\n  BC:C9:11:20:0C:DE:8D:77:71:00:93:BE:E9:F2:0B:B1:\\n  B4:BE:A7:F9:7E:99:2E:BC:EC:B7:B0:07:66:D7:B5:C1:\\n  7A:E9:81:98:42:70:A1:89:EF:D7:67:1C:36:E4:8E:44:\\n  E8:93:0F:65:53:4E:C4:72:EC:83:76:6A:50:E7:EF:5E:\\n  E7:E1:C4:97:60:F9:07:80:AD:97:EA:5F:B6:E7:48:4B:\\n  B1:D1:A1:D7:6C:F1:75:61:D3:F4:F0:C8:0D:09:7C:81:\\n  B4:F4:41:AB:AD:25:99:78:5B:34:65:D6:A5:2F:62:04:\\n  CC:20:A3:69:BC:E1:29:47:1E:DF:4B:E2:4B:D0:D7:44:\\n  D4:95:8C:F5:6A:06:49:31:B1:C2:0C:99:2B:A6:4B:56:\\n  B7:84:48:5D:41:34:54:F0:6B:CD:23:4A:45:8C:BB:DA:\\n  AD:D3:84:74:20:F9:73:B8:98:69:4D:65:B0:BD:6E:78:\\n  70:7C:33:0A:52:EE:80:6C:73:8C:D6:0C:6A:76:1D:3A:\\n  EB:00:C7:D4:F5:10:79:D1:8C:92:BE:94:66:63:6F:5E\"}\n",
                "products": [
                    "Windows-Remote-Connection"
                ],
                "protocols": [
                    "rdp"
                ]
            },
            "192.168.18.86:6379": {
                "port": "6379",
                "hostinfo": "192.168.18.86:6379",
                "url": "",
                "product": "Redis",
                "protocol": "redis",
                "json": "{\"protocol\":\"redis\",\"notretry\":false,\"base_protocol\":\"tcp\",\"status\":\"success\",\"banner\":\"-ERR unknown command 'help'\\r\\n$1903\\r\\n# Server\\r\\nredis_version:3.0.504\\r\\nredis_git_sha1:00000000\\r\\nredis_git_dirty:0\\r\\nredis_build_id:a4f7a6e86f2d60b3\\r\\nredis_mode:standalone\\r\\nos:Windows  \\r\\narch_bits:64\\r\\nmultiplexing_api:WinSock_IOCP\\r\\nprocess_id:2756\\r\\nrun_id:4e91f3371eab5993823d2fb913ed29cd9debd3d7\\r\\ntcp_port:6379\\r\\nuptime_in_seconds:16751\\r\\nuptime_in_days:0\\r\\nhz:10\\r\\nlru_clock:12606860\\r\\nconfig_file:C:\\\\Program Files\\\\Redis\\\\redis.windows-service.conf\\r\\n\\r\\n# Clients\\r\\nconnected_clients:1\\r\\nclient_longest_output_list:0\\r\\nclient_biggest_input_buf:0\\r\\nblocked_clients:0\\r\\n\\r\\n# Memory\\r\\nused_memory:693104\\r\\nused_memory_human:676.86K\\r\\nused_memory_rss:634456\\r\\nused_memory_peak:693104\\r\\nused_memory_peak_human:676.86K\\r\\nused_memory_lua:36864\\r\\nmem_fragmentation_ratio:0.92\\r\\nmem_allocator:jemalloc-3.6.0\\r\\n\\r\\n# Persistence\\r\\nloading:0\\r\\nrdb_changes_since_last_save:0\\r\\nrdb_bgsave_in_progress:0\\r\\nrdb_last_save_time:1623202845\\r\\nrdb_last_bgsave_status:ok\\r\\nrdb_last_bgsave_time_sec:-1\\r\\nrdb_current_bgsave_time_sec:-1\\r\\naof_enabled:0\\r\\naof_rewrite_in_progress:0\\r\\naof_rewrite_scheduled:0\\r\\naof_last_rewrite_time_sec:-1\\r\\naof_current_rewrite_time_sec:-1\\r\\naof_last_bgrewrite_status:ok\\r\\naof_last_write_status:ok\\r\\n\\r\\n# Stats\\r\\ntotal_connections_received:1\\r\\ntotal_commands_processed:0\\r\\ninstantaneous_ops_per_sec:0\\r\\ntotal_net_input_bytes:12\\r\\ntotal_net_output_bytes:29\\r\\ninstantaneous_input_kbps:0.00\\r\\ninstantaneous_output_kbps:0.00\\r\\nrejected_connections:0\\r\\nsync_full:0\\r\\nsync_partial_ok:0\\r\\nsync_partial_err:0\\r\\nexpired_keys:0\\r\\nevicted_keys:0\\r\\nkeyspace_hits:0\\r\\nkeyspace_misses:0\\r\\npubsub_channels:0\\r\\npubsub_patterns:0\\r\\nlatest_fork_usec:0\\r\\nmigrate_cached_sockets:0\\r\\n\\r\\n# Replication\\r\\nrole:master\\r\\nconnected_slaves:0\\r\\nmaster_repl_offset:0\\r\\nrepl_backlog_active:0\\r\\nrepl_backlog_size:1048576\\r\\nrepl_backlog_first_byte_offset:0\\r\\nrepl_backlog_histlen:0\\r\\n\\r\\n# CPU\\r\\nused_cpu_sys:0.08\\r\\nused_cpu_user:0.11\\r\\nused_cpu_sys_children:0.00\\r\\nused_cpu_user_children:0.00\\r\\n\\r\\n# Cluster\\r\\ncluster_enabled:0\\r\\n\\r\\n# Keyspace\\r\\n\\r\\n\",\"structinfo\":\"\",\"dbs\":{\"Count\":0,\"Records\":0,\"DbSize\":0},\"ip\":\"192.168.18.86\",\"port\":\"6379\",\"time\":\"2021-06-09 14:19:52 +0800\"}\n",
                "products": [
                    "Redis"
                ],
                "protocols": [
                    "redis"
                ]
            },
            "192.168.18.86:80": {
                "port": "80",
                "hostinfo": "192.168.18.86:80",
                "url": "",
                "product": "Windows|IIS",
                "protocol": "http",
                "json": "{\"protocol\":\"http\",\"notretry\":false,\"base_protocol\":\"tcp\",\"status\":\"success\",\"banner\":\"HTTP/1.1 404 Not Found\\r\\nServer: Microsoft-IIS/10.0\\r\\nDate: Wed, 09 Jun 2021 06:19:51 GMT\\r\\nConnection: close\\r\\nContent-Length: 0\",\"structinfo\":\"\",\"dbs\":{\"Count\":0,\"Records\":0,\"DbSize\":0},\"ip\":\"192.168.18.86\",\"port\":\"80\",\"time\":\"2021-06-09 14:19:46 +0800\"}\n",
                "products": [
                    "Windows",
                    "IIS"
                ],
                "protocols": [
                    "http",
                    "web"
                ]
            },
            "192.168.18.86:902": {
                "port": "902",
                "hostinfo": "192.168.18.86:902",
                "url": "",
                "product": "VMware-Certification-Services",
                "protocol": "vmware_authentication_daemon",
                "json": "{\"protocol\":\"vmware_authentication_daemon\",\"notretry\":false,\"base_protocol\":\"tcp\",\"status\":\"success\",\"banner\":\"220 VMware Authentication Daemon Version 1.10: SSL Required, ServerDaemonProtocol:SOAP, MKSDisplayProtocol:VNC , , NFCSSL supported/t\\r\\n\",\"structinfo\":\"\",\"dbs\":{\"Count\":0,\"Records\":0,\"DbSize\":0},\"ip\":\"192.168.18.86\",\"port\":\"902\",\"time\":\"2021-06-09 14:20:12 +0800\"}\n",
                "products": [
                    "VMware-Certification-Services"
                ],
                "protocols": [
                    "vmware_authentication_daemon"
                ]
            }
        },
        "tags": [
            {
                "rule_id": "7220",
                "product": "Windows",
                "company": "Microsoft Corporation",
                "level": "2",
                "category": "Operating System",
                "parent_category": "Software System",
                "soft_hard": "2",
                "version": "10.0.14393 Ntlm 15"
            },
            {
                "rule_id": "7203",
                "product": "Windows-Remote-Connection",
                "company": "Microsoft Corporation",
                "level": "3",
                "category": "Other Enterprise Application",
                "parent_category": "Enterprise Application",
                "soft_hard": "2",
                "version": ""
            },
            {
                "rule_id": "7205",
                "product": "Microsoft-SQL-Server",
                "company": "Microsoft Corporation",
                "level": "3",
                "category": "Database System",
                "parent_category": "Software System",
                "soft_hard": "2",
                "version": "201328592"
            },
            {
                "rule_id": "17291",
                "product": "NTP",
                "company": "Other",
                "level": "3",
                "category": "Other Support System",
                "parent_category": "Support System",
                "soft_hard": "0",
                "version": ""
            },
            {
                "rule_id": "208",
                "product": "IIS",
                "company": "Microsoft Corporation",
                "level": "3",
                "category": "Service",
                "parent_category": "Support System",
                "soft_hard": "2",
                "version": "10.0"
            },
            {
                "rule_id": "7208",
                "product": "Redis",
                "company": "Redis Labs",
                "level": "3",
                "category": "Database System",
                "parent_category": "Software System",
                "soft_hard": "2",
                "version": "3.0.504"
            },
            {
                "rule_id": "7206",
                "product": "VMware-Certification-Services",
                "company": "VMware, Inc.",
                "level": "3",
                "category": "Other Enterprise Application",
                "parent_category": "Enterprise Application",
                "soft_hard": "2",
                "version": "1.10"
            }
        ],
        "vulnerabilities": [
            {
                "hostinfo": "192.168.18.86:6379",
                "name": "Redis unauthorized",
                "filename": "redis_unauthorized.json",
                "level": "3",
                "vulurl": "192.168.18.86:6379",
                "keymemo": "",
                "hasexp": false
            }
        ],
        "screenshots": [{
			"hostinfo": "192.168.18.63:80",
			"imgpath": "/screenshots/20210611170534/192.168.18.63-80.png",   //在golib目录下的
			"imgsize": "2792",
			"phash": "-9223372036854775808"
		}],
        "hostnames": [
            ""
        ]
    }
}
  • 服务原始详细信息格式
{
	"protocol": "mssql",
	"notretry": false,
	"base_protocol": "tcp",
	"status": "success",
	"banner": "MSSQL Server\nVersion: 201328592 (0xc0007d0)\nSub-Build: 0\nEncryption:Not available\n",
	"structinfo": "",
	"dbs": {
		"Count": 0,
		"Records": 0,
		"DbSize": 0
	},
	"ip": "192.168.18.86",
	"port": "1433",
	"time": "2021-06-09 14:19:03 +0800"
}

想要获取服务的版本信息,可通过banner字段的Version获取,\n分割