2024-04-02 17:58:48 +05:30
id : minecraft-enum
info :
name : Minecraft - enum
author : pussycat0x
severity : info
description : |
Minecraft server for some basic information about the host.The information that is queried is the Description, Maximum Number of Players, number of Online Players, Version number, and Protocol Number
reference :
- https://github.com/sjhilt/Nmap-NSEs/blob/master/minecraft-info.nse
metadata :
2024-06-07 10:04:29 +00:00
verified : true
2025-05-27 10:39:47 +08:00
max-request : 1
2024-04-02 17:58:48 +05:30
shodan-query : product:"Minecraft"
2024-06-23 11:58:00 +05:30
tags : js,network,minecraft,enum
2024-06-23 11:55:13 +05:30
2024-04-02 17:58:48 +05:30
javascript :
2024-06-23 11:55:13 +05:30
- pre-condition : |
isPortOpen(Host,Port);
2024-04-02 17:58:48 +05:30
- code : |
let data = "fe01"
let c = require("nuclei/net");
let conn = c.Open('tcp', `${Host}:${Port}`);
conn.SendHex(data);
let response = conn.RecvString();
2024-07-16 23:31:51 +05:30
if (response.includes("HTTP/1.1")) {
conn.Close();
} else {
let cleanedResponse = response.replace(/\x00/g, '');
const version = cleanedResponse.slice(16, 30).replace(/(\d+)(\d{1})(\d+)/, "$1.$2.$3");
const description = cleanedResponse.slice(30, -4);
const onlinePlayers = cleanedResponse.slice(-1);
const maxPlayers = cleanedResponse.slice(-3);
Export("Version: ", version , " Description:", description ," Online Players:", onlinePlayers, " Maximum Players:", maxPlayers);
}
2024-04-02 17:58:48 +05:30
args :
Host : "{{Host}}"
Port : 25565
2024-07-16 23:31:51 +05:30
matchers-condition : and
2024-04-02 17:58:48 +05:30
matchers :
- type : dsl
dsl :
- "success == true"
extractors :
- type : dsl
dsl :
- response
2024-12-01 13:57:55 +00:00
# digest: 4b0a00483046022100990bf833d5080b0619d1fe6745e232836353f58344282235bad2a8f97621dbcb02210087d45a7fdcde25310e67e5079fe7c449f42aa300394b431bdbad2e5dde1e5db7:922c64590222798bb761d5b6d8e72950