Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
digininja opened this issue Nov 8, 2021 · 2 comments
Closed
Labels

Comments

@digininja
Copy link

@digininja digininja commented Nov 8, 2021

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.

@digininja digininja added the Nmap label Nov 8, 2021
@dmiller-nmap
Copy link

@dmiller-nmap dmiller-nmap commented Nov 10, 2021

Looks like we don't have a fully-functional BSON parser, since it can't handle type 17 (timestamp), and the failure mode is to simply crash. I'll put in a quick fix to avoid crashing, but it might not result in usable output from the scripts until we get parsers for the other types implemented.

@digininja
Copy link
Author

@digininja digininja commented Nov 10, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants