Skip to content

Checks for null session and guest account on a machine. Uses impacket to enumerate SMB.

License

Notifications You must be signed in to change notification settings

fjfinch/smbsessioncheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smbsessioncheck

Small python script that checks for a null session and an active guest account on a Windows machine. Great for initial enumeration without using a password. It uses the SMB protocol with RPC to enumerate the machine. (Can also enumerate Linux through Samba).

Note for Windows: can't ping the box? Then probably 'File and printer sharing' is disabled on the machine and you can't use this script.

Install dependencies

It uses the impacket library to connect to a remote machine:

pip install impacket

or

apt install python3-impacket

Run

This script requires an IP address as input:

python3 smbsessioncheck <IP>

Output:

NetBIOS computer name	: FINCH-PC
NetBIOS domain name	: -
DNS host name		: finch-PC
DNS domain name		: -

Null session		: NO
Guest logon		: YES

ToDo

  • Output what registries/policies/smb.conf have been set to disable null/guest
  • Guest check can fail with a different language (ex. the string 'Anonymous Logon' can be different)

About

Checks for null session and guest account on a machine. Uses impacket to enumerate SMB.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages