Skip to content

Bson-ERR: Getter for 17 not implemented when running mongodb-info script #2393

@digininja

Description

@digininja

Describe the bug

Running the mongodb-info script against a bunch of MongoDB services on a client network I get the following error from every machine:

NSE: [mongodb-info 1.2.3.4:27017] Bson-ERR:Getter for 17 not implemented
NSE: mongodb-info against 1.2.3.4:27017 threw an error!
/usr/bin/../share/nmap/nselib/mongodb.lua:244: table index is nil
stack traceback:
        /usr/bin/../share/nmap/nselib/mongodb.lua:244: in upvalue '_elements_to_dict'
        /usr/bin/../share/nmap/nselib/mongodb.lua:290: in function 'mongodb.fromBson'
        /usr/bin/../share/nmap/nselib/mongodb.lua:586: in function 'mongodb.query'
        /usr/bin/../share/nmap/scripts/mongodb-info.nse:104: in function </usr/bin/../share/nmap/scripts/mongodb-info.nse:70>
        (...tail calls...)

To Reproduce

nmap -p 27017 --script mongodb-info -iL mongodb_ips -oA mongo_info -d      

Expected behavior
No errors.

Version info (please complete the following information):

  • OS: [e.g. Linux 4.15, Windows 10 1909]

Kali with all packages updated.

  • Output of nmap --version:
Nmap version 7.91 ( https://nmap.org )
Platform: x86_64-pc-linux-gnu
Compiled with: liblua-5.3.3 openssl-1.1.1g libssh2-1.8.0 libz-1.2.11 libpcre-8.39 nmap-libpcap-1.7.3 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: epoll poll select

I'm on a client box so can't easily build the latest version of nmap from source but could give it a go. Should easily be able to try a new script though.

  • Output of nmap --iflist

n/a

Additional context

Internal network, no firewall or limits that I know of on the network itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions