
Note we are trying to enumerate both port numbers. It is a very powerful feature of Nmap and would probably require a separate article to demonstrate it’s usefulness. So what I like to do the first thing is use Nmap scripting engine or commonly known as NSE. That being said, the process of enumeration for SMB is the same for both linux and windows with the exception that in linux, you have to check the samba version as well and check if it is vulnerable or not. I only said samba server because linux is predominantly used by enterprises, around 75% to be precise. Ok ,so how do we enumerate when we find that in our nmap scan port 445 is open with samba server on. This may require additional configuration of your firewall or router. Note: For these services to operate correctly, their ports should remain open. These ports are assigned to a specific service and users must manually open the required ports by adding the port number. So make sure the Samba server is patched. QNAP uses designated ports for communication. Hell, even metasploit houses so many auxillary scanners and exploits for samba server. smb ports 450 140 Restart samba /etc/init. I need to setup new samba server but now I have problem with ports. This samba server is integrated in Alfresco application. Don’t believe me? Just type in google “samba server exploit” and you’ll get a list of publicly available exploits quite easily. I have samba server already running on standard ports(445 and 139). Samba servers are notorious for being tremendously insecure. Admins should make sure to use strong passwords for users who want to access resources using SMB. In a Active Directory Environment, use the. The first obvious flaw is using default credentials or easily guessable and sometimes even no authentication for access of important resources of the server. The following ports must always be open to allow for two way Samba communication in a Microsoft environment: netbios-ns 137/tcp NETBIOS Name Service netbios-ns 137/udp netbios-dgm 138/tcp NETBIOS Datagram Service netbios-dgm 138/udp netbios-ssn 139/tcp NETBIOS session service netbios-ssn 139/udp. So lets talk about the security flaws in this. So it’s not like everyone can access everything, a strong authentication. Obviously some sort of authentication will be in place like a username and password and only certain resources made shareable.
Samba port install#
To make it work for linux, you need to install a samba server because linux natively does not use SMB protocol.


In linux however ,it is a little different.

It is actually natively available in windows, so windows users don’t need to configure anything extra as such besides basic setting up. It primarily runs on port 445 or port 139 depending on the server. It’s a protocol for sharing resources like files, printers, in general any resource which should be retreivable or made available by the server.
Samba port how to#
Before learning how to enumerate SMB, we must first learn what SMB is. SMB enumeration is a very important skill for any pentester.
