Kong Admin Rest API 的根目录 banner 包含了很多明显的特征,根据这些特征可以比较容易的获取到开放在外网的 Admin Rest API,同时也有很标准的 server response header:
Server: kong/0.10.3
,例如:
HTTP/1.1 200 OK
Date: Wed, 15 Apr 2020 03:03:16 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Access-Control-Allow-Origin: *
Server: kong/2.0.2
Content-Length: 8312
X-Kong-Admin-Latency: 2
{
"plugins": {
"enabled_in_cluster": [],
"available_on_server": {}
},
"tagline": "Welcome to kong",
"configuration": {
"...": "...",
"kong_env": "/usr/local/kong/.kong_env",
"cassandra_schema_consensus_timeout": 10000,
"log_level": "notice",
"admin_ssl_cert_key_default": "/usr/local/kong/ssl/admin-kong-default.key",
"real_ip_recursive": "off",
"proxy_error_log": "/dev/stderr",
"ssl_cipher_suite": "intermediate",
"router_consistency": "strict",
"pg_port": 5432,
"cassandra_keyspace": "kong",
"ssl_cert_default": "/usr/local/kong/ssl/kong-default.crt",
"nginx_http_ssl_session_timeout": "1d",
"error_default_type": "text/plain",
"role": "traditional",
"admin_ssl_enabled": false,
"trusted_ips": {}
},
"version": "2.0.2",
"node_id": "0bfe4d56-c5f3-4df0-9af1-4fabb0cba108",
"lua_version": "LuaJIT 2.1.0-beta3",
"prng_seeds": {
"pid: 22": 772511031151,
"pid: 1": 431556103185
},
"timers": {
"pending": 9,
"running": 0
},
"hostname": "72f74e7bd339"
}
我们使用知道创宇的 ZoomEye 快速对目前公网上的 Kong 资产进行检索,可以找到 5 万多个 kong 服务在公网开放,根据上述特征可以发现有 3 千多个 Admin Rest API 未鉴权对外;ZoomEye 在网络空间搜索能力上的优越性极大的帮助了我们对此风险的整体评估和分析。