This addresses #17402 - listing OS information when the target doesn't support SMBv1.
There is information in the NTLM negotiation (os_version) that can be used to fingerprint this. On Windows this works well; on Samba servers, it's not entirely clear to me what it's supposed to be presenting (e.g. my Samba 4.6.2 on Ubuntu 20.04 reported a version of 6.1.0).
The approach I took was to look at our list of known Windows versions, and if we get an exact match, report it as Windows, with a meaningful name. If we can't match it as a Windows version, rather than saying that it's Windows, just report the version listed.
Verification
List the steps needed to make sure this thing works
[ ] Start msfconsole
[ ] use exploit/windows/smb/ms08_067_netapi
[ ] ...
[ ] Verify the thing does what it should
[ ] Verify the thing does not do what it should not
This addresses #17402 - listing OS information when the target doesn't support SMBv1.
There is information in the NTLM negotiation (
os_version
) that can be used to fingerprint this. On Windows this works well; on Samba servers, it's not entirely clear to me what it's supposed to be presenting (e.g. my Samba 4.6.2 on Ubuntu 20.04 reported a version of 6.1.0).The approach I took was to look at our list of known Windows versions, and if we get an exact match, report it as Windows, with a meaningful name. If we can't match it as a Windows version, rather than saying that it's Windows, just report the version listed.
Verification
List the steps needed to make sure this thing works
msfconsole
use exploit/windows/smb/ms08_067_netapi
Demo
Server 2022:
Samba:
Win 2008 SP2:
Windows 10: