NSE Script to enumerate Kubernetes Version GitHub PR # 1564

Jon Mosco <[email protected]> Fri, 3 May 2019 10:31:35 -0400
Newsgroups gmane.comp.security.nmap.devel
Message-ID <CA+1N84--15s8KfgcEuT3AXZwUzfJArc01bz2fMxrRk92BMeBLg@mail.gmail.com>
--===============3128594716210935570==
Content-Type: multipart/alternative; boundary="0000000000000a837b0587fc9cba"

--0000000000000a837b0587fc9cba
Content-Type: text/plain; charset="UTF-8"

Early version of NSE script to obtain version of Kubernetes API. Any
suggestions/help would be appreciated. This is my first NSE script and
would love to get some feedback.

Sample output:

$ nmap --script ./kubernetes-version.nse 192.168.39.225
Starting Nmap 7.70 ( https://nmap.org ) at 2019-04-20 08:20 EDT
Nmap scan report for 192.168.39.225
Host is up (0.00012s latency).
Not shown: 994 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
111/tcp  open  rpcbind
443/tcp  open  https
2049/tcp open  nfs
8443/tcp open  kubernetes-api
| kubernetes-version:
|   goVersion: go1.12.1
|   buildDate: 2019-03-25T15:45:25Z
|   gitVersion: v1.14.0
|   compiler: gc
|   major: 1
|   gitCommit: 641856db18352033a0d96dbc99153fa3b27298e5
|   gitTreeState: clean
|   minor: 14
|_  platform: linux/amd64

Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds

--0000000000000a837b0587fc9cba
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">
<p>Early version of NSE script to obtain version of Kubernetes API.  Any
 suggestions/help would be appreciated.  This is my first NSE script and wo=
uld love to get some feedback. =C2=A0<br></p>
<p>Sample output:</p>
<pre><code>$ nmap --script ./kubernetes-version.nse 192.168.39.225
Starting Nmap 7.70 ( <a href=3D"https://nmap.org">https://nmap.org</a> ) at=
 2019-04-20 08:20 EDT
Nmap scan report for 192.168.39.225            =20
Host is up (0.00012s latency).                                        =20
Not shown: 994 closed ports                                        =20
PORT     STATE SERVICE                        =20
22/tcp   open  ssh                       =20
80/tcp   open  http                                =20
111/tcp  open  rpcbind                            =20
443/tcp  open  https                                 =20
2049/tcp open  nfs                                =20
8443/tcp open  kubernetes-api                 =20
| kubernetes-version:                     =20
|   goVersion: go1.12.1                                    =20
|   buildDate: 2019-03-25T15:45:25Z           =20
|   gitVersion: v1.14.0                                            =20
|   compiler: gc                              =20
|   major: 1                                                              =
=20
|   gitCommit: 641856db18352033a0d96dbc99153fa3b27298e5               =20
|   gitTreeState: clean                       =20
|   minor: 14                                 =20
|_  platform: linux/amd64                                   =20
                                              =20
Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds
</code></pre>

</div>

--0000000000000a837b0587fc9cba--

--===============3128594716210935570==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/
--===============3128594716210935570==--