เนื่องด้วยช่วงนี้ต้องไปพัวพันกับ NetBIOS บ่อยๆ ก็เลยหาข้อมูลมาอ่าน ทีนี้อ่านไปอ่านมากลัวลืมก็เลยแปลมาแปะไว้ในนี้ก็แล้วกันครับ
NETBIOS (Network Basic Input/output System)
NetBIOS คือ service ที่ใช้ในการคุยกันระหว่างเครื่องและ application เช่น Printer, เครื่องอื่นๆ เป็นต้น ผ่าน NetBIOS Name ตัว NetBIOS Name จะมีความยาว 16 ตัวอักษรและจะถูก assign ให้กับ computer ใดๆใน workgroup โดยใช้ WINS service สำหรับการทำ name resolving จาก IP กลายเป็น NetBIOS Name
NetBIOS มี 3 ส่วนหลักๆคือ
- Name service (NetBIOS-NS) สำหรับการ register และการ resolving NetBIOS Name ใช้ port 137.
- Datagram distribution service (NetBIOS-DGM) ใช้สำหรับ communication แบบ connectionless ใช้ port 138.
- Session service (NetBIOS-SSN) ใช้สำหรับ communication แบบ connection-oriented communicationใช้ port 139.
Port | Protocol | Service |
135 | TCP | MS-RPC endpoint mapper |
137 | UDP | NetBIOS Name Service |
138 | UDP | NetBIOS Datagram Service |
139 | TCP | NetBIOS Session Service |
445 | TCP | SMB Protocol |
Port 135: ใช้สำหรับ Microsoft Remote Procedure Call สำหรับการคุย query ระหว่าง client และ server โดยปกติแล้วใช้สำหรับการคุยระหว่าง client- client และ server -client
Port 137: ตัวจัดการเรื่องแบบ NetBIOS Name แบบที่เป็น UDP
- Add name – registers a NetBIOS name.
- Add group name – registers a NetBIOS “group” name.
- Delete name – un-registers a NetBIOS name or group name.
- Find name – looks up a NetBIOS name on the network.
Port 138: ใช้สำหรับการ detection และ recovery.การทำงานเป็นแบบ datagram UDP port 138 ใช้สำหรับทำดังนี้
- Send Datagram – send a datagram to a remote NetBIOS name.
- Send Broadcast Datagram – send a datagram to all NetBIOS names on the network.
- Receive Datagram – wait for a packet to arrive from a Send Datagram operation.
- Receive Broadcast Datagram – wait for a packet to arrive from a Send Broadcast Datagram operation.
Port 139: Session mode ใช้สำหรับให้เครื่อง 2 เครื่องคุยกันโดยมีส่วนการทำ error detection และ recovery ด้วย (เพราะเป็น TCP) ใช้สำหรับ
- Call – opens a session to a remote NetBIOS name.
- Listen – listen for attempts to open a session to a NetBIOS name.
- Hang Up – close a session.
- Send – sends a packet to the computer on the other end of a session.
- Send No Ack – like Send, but doesn’t require an acknowledgment.
- Receive – wait for a packet to arrive from a Send on the other end of a session.
Port 445: ใช้สำหรับ SMB protocol (server message block) ในการ share file, Authentication AD, psexec
Source:: HackingArticle