Nmap: Get SSH issue banner message with Nmap

Created on 14 Nov 2018  路  3Comments  路  Source: nmap/nmap

Greetings.

I am trying to get an issue.net message (Welcome or Warning banner message from /etc/issue.net file) from a remote SSH server, this message appears immediately after connecting to the server (before the password login prompt, so we don't need to enter a password - we just need to connect to the SSH server).

For example, it looks looks like this:

user@user-pc:~& ssh root@localhost
Ubuntu 18.04.1 LTS
root@localhost's password: 

As you can see, issue welcome message "Ubuntu 18.04.1 LTS" appears before password prompt.

I wanted to ask if there is a way to get this SSH issue.net banner message with Nmap or maybe with some NSE scripts without login? Can this be done with Nmap?

Thanks in advance.

NSE enhancement

Most helpful comment

This is the SSH_MESSAGE_USERAUTH_BANNER message, which is delivered encrypted during authentication. We rely on libssh2 for SSH communication, and libssh2 does not currently support retrieving the banner. But I did take some time and implement it: libssh2/libssh2#274

I also have some private code to use this in NSE, but I can't release it until I have configure checks and preprocessor guards for the appropriate code, since it wouldn't build against anything but my patched version of libssh2. I hope to find a bit more time to work on this soon. Thanks for the idea!

All 3 comments

This is the SSH_MESSAGE_USERAUTH_BANNER message, which is delivered encrypted during authentication. We rely on libssh2 for SSH communication, and libssh2 does not currently support retrieving the banner. But I did take some time and implement it: libssh2/libssh2#274

I also have some private code to use this in NSE, but I can't release it until I have configure checks and preprocessor guards for the appropriate code, since it wouldn't build against anything but my patched version of libssh2. I hope to find a bit more time to work on this soon. Thanks for the idea!

I'm interested in this feature as well. It looks like this is still pending an update to the libssh2 library -any plans to revisit? Thanks!

I'm also interested on this, is it currently possible?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmiller-nmap picture dmiller-nmap  路  3Comments

dmiller-nmap picture dmiller-nmap  路  6Comments

gpotter2 picture gpotter2  路  5Comments

picnicsecurity picture picnicsecurity  路  5Comments

buden picture buden  路  5Comments