137,138,139 - Pentesting NetBios
Reading time: 4 minutes
tip
Jifunze na fanya mazoezi ya AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Jifunze na fanya mazoezi ya GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Angalia mpango wa usajili!
- Jiunge na 💬 kikundi cha Discord au kikundi cha telegram au tufuatilie kwenye Twitter 🐦 @hacktricks_live.
- Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa HackTricks na HackTricks Cloud repos za github.
NetBios Name Service
NetBIOS Name Service ina jukumu muhimu, ikihusisha huduma mbalimbali kama usajili wa majina na ufumbuzi, usambazaji wa datagram, na huduma za kikao, ikitumia bandari maalum kwa kila huduma.
- Huduma ya jina kwa usajili wa majina na ufumbuzi (bandari: 137/udp na 137/tcp).
- Huduma ya usambazaji wa datagram kwa mawasiliano yasiyo na muunganisho (bandari: 138/udp).
- Huduma ya kikao kwa mawasiliano yenye muunganisho (bandari: 139/tcp).
Name Service
Ili kifaa kiweze kushiriki katika mtandao wa NetBIOS, lazima kiwe na jina la kipekee. Hii inapatikana kupitia mchakato wa matangazo ambapo pakiti ya "Name Query" inatumwa. Ikiwa hakuna pingamizi zinazopokelewa, jina linachukuliwa kuwa linapatikana. Vinginevyo, seva ya Huduma ya Jina inaweza kuulizwa moja kwa moja ili kuangalia upatikanaji wa jina au kutatua jina kuwa anwani ya IP. Zana kama nmblookup
, nbtscan
, na nmap
zinatumika kwa kuorodhesha huduma za NetBIOS, zikifunua majina ya seva na anwani za MAC.
PORT STATE SERVICE VERSION
137/udp open netbios-ns Samba nmbd netbios-ns (workgroup: WORKGROUP)
Kuhesabu huduma ya NetBIOS unaweza kupata majina ambayo seva inatumia na anwani ya MAC ya seva.
nmblookup -A <IP>
nbtscan <IP>/30
sudo nmap -sU -sV -T4 --script nbstat.nse -p137 -Pn -n <IP>
Huduma ya Usambazaji wa Datagram
NetBIOS datagrams huruhusu mawasiliano yasiyo na muunganiko kupitia UDP, ikisaidia ujumbe wa moja kwa moja au matangazo kwa majina yote ya mtandao. Huduma hii inatumia bandari 138/udp.
PORT STATE SERVICE VERSION
138/udp open|filtered netbios-dgm
Huduma ya Kikao
Kwa mwingiliano unaotegemea muunganisho, Huduma ya Kikao inarahisisha mazungumzo kati ya vifaa viwili, ikitumia muunganisho wa TCP kupitia bandari 139/tcp. Kikao kinaanza na pakiti ya "Ombi la Kikao" na kinaweza kuanzishwa kulingana na jibu. Huduma hii inasaidia ujumbe wakubwa, kugundua makosa, na urejeleaji, huku TCP ikishughulikia udhibiti wa mtiririko na urejeleaji wa pakiti.
Uhamasishaji wa data ndani ya kikao unahusisha Pakiti za Ujumbe wa Kikao, ambapo vikao vinamalizika kwa kufunga muunganisho wa TCP.
Huduma hizi ni muhimu kwa utendaji wa NetBIOS, zikihakikisha mawasiliano bora na ushirikiano wa rasilimali katika mtandao. Kwa maelezo zaidi kuhusu protokali za TCP na IP, rejelea kurasa zao za TCP Wikipedia na IP Wikipedia.
PORT STATE SERVICE VERSION
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
Soma ukurasa ujao kujifunza jinsi ya kuhesabu huduma hii:
{{#ref}} 137-138-139-pentesting-netbios.md {{#endref}}
Amri za Kiotomatiki za HackTricks
Protocol_Name: Netbios #Protocol Abbreviation if there is one.
Port_Number: 137,138,139 #Comma separated if there is more than one.
Protocol_Description: Netbios #Protocol Abbreviation Spelled out
Entry_1:
Name: Notes
Description: Notes for NetBios
Note: |
Name service for name registration and resolution (ports: 137/udp and 137/tcp).
Datagram distribution service for connectionless communication (port: 138/udp).
Session service for connection-oriented communication (port: 139/tcp).
For a device to participate in a NetBIOS network, it must have a unique name. This is achieved through a broadcast process where a "Name Query" packet is sent. If no objections are received, the name is considered available. Alternatively, a Name Service server can be queried directly to check for name availability or to resolve a name to an IP address.
https://book.hacktricks.xyz/pentesting/137-138-139-pentesting-netbios
Entry_2:
Name: Find Names
Description: Three scans to find the names of the server
Command: nmblookup -A {IP} &&&& nbtscan {IP}/30 &&&& nmap -sU -sV -T4 --script nbstat.nse -p 137 -Pn -n {IP}
tip
Jifunze na fanya mazoezi ya AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Jifunze na fanya mazoezi ya GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Angalia mpango wa usajili!
- Jiunge na 💬 kikundi cha Discord au kikundi cha telegram au tufuatilie kwenye Twitter 🐦 @hacktricks_live.
- Shiriki mbinu za udukuzi kwa kuwasilisha PRs kwa HackTricks na HackTricks Cloud repos za github.