cddmp / enum4linux-ng

A next generation version of enum4linux (a Windows/Samba enumeration tool) with additional features like JSON/YAML export. Aimed for security professionals and CTF players.
GNU General Public License v3.0
1.18k stars 125 forks source link

Samba server version #27

Closed jrmdev closed 2 years ago

jrmdev commented 2 years ago

Great tool.

Some samba servers return their software version just upon connection. I made a standalone script that gets just that. Would it be possible to integrate it in enum4linux-ng?

from impacket import smb

s = smb.SMB('*SMBSERVER',sys.argv[1], sess_port=139)
s.login('','')

print("Server version:", s._SMB__server_lanman)

Returns (example):

Server version: Samba 2.2.7a

Cheers.

cddmp commented 2 years ago

Ah, the author of mitm_relay. :) Thanks for your request. Strange, this is already implemented.

Here is an example output from a recent HTB machine:

2022-07-09_09-04

And this is from a THM machine: grafik

As you wrote, for Samba it should show the version. Is the machine you are testing publicly available? The info should be shown if only the IP/hostname is given, or if -A, -As or -O are used. If the machine is not publicly available, could you pipe the tool output for me into a file and provide it?

jrmdev commented 2 years ago

Hey, Thanks for the reply. Something must have gone wrong before, but as you said, after re-running it, I can now see it in the output as expected. Apologies :)

cddmp commented 2 years ago

No problem, you're welcome!