From b02c5ab801de36993928b732cc6349427d66846f Mon Sep 17 00:00:00 2001 From: nnposter Date: Mon, 31 Oct 2016 01:42:23 +0000 Subject: [PATCH] Adds a fingerprint for Teradici PCoIP Zero Client --- .../http-default-accounts-fingerprints.lua | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/nselib/data/http-default-accounts-fingerprints.lua b/nselib/data/http-default-accounts-fingerprints.lua index d82e6df76..244c65a80 100644 --- a/nselib/data/http-default-accounts-fingerprints.lua +++ b/nselib/data/http-default-accounts-fingerprints.lua @@ -979,6 +979,37 @@ table.insert(fingerprints, { end }) +table.insert(fingerprints, { + -- Version 4.0.0 + name = "PCoIP Zero Client", + category = "virtualization", + paths = { + {path = "/login.html"} + }, + target_check = function (host, port, path, response) + return response.status == 200 + and response.body + and response.body:find("PCoIP® Zero Client", 1, true) + and response.body:find("password_value", 1, true) + end, + login_combos = { + {username = "", password = "Administrator"} + }, + login_check = function (host, port, path, user, pass) + local req = http_post_simple(host, port, url.absolute(path, "cgi-bin/login"), + nil, {password_value=pass, idle_timeout=60}) + -- successful login is a 302-redirect that sets a session cookie with hex value + -- failed login is the same but the cookie contains an error message + if req.status ~= 302 then return false end + for _, ck in ipairs(req.cookies or {}) do + if ck.name:lower() == "session_id" then + -- observed variable cookie length between 37 and 40 digits + return #ck.value > 35 and ck.value:find("^%x+$") end + end + return false + end +}) + --- --Remote consoles ---