# 137,138,139 - Kupima Usalama wa NetBios
Jifunze kuhusu kudukua AWS kutoka mwanzo hadi kuwa bingwa na htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)! Njia nyingine za kusaidia HackTricks: * Ikiwa unataka kuona **kampuni yako ikionekana kwenye HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)! * Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com) * Gundua [**Familia ya PEASS**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) za kipekee * **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.** * **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.
## Huduma ya Jina la NetBios **Huduma ya Jina la NetBIOS** inacheza jukumu muhimu, ikijumuisha huduma mbalimbali kama **usajili na ufumbuzi wa majina**, **usambazaji wa datagram**, na **huduma za kikao**, kwa kutumia bandari maalum kwa kila huduma. [Kutoka kwa Wikidepia](https://en.wikipedia.org/wiki/NetBIOS_over_TCP/IP): * Huduma ya jina kwa usajili na ufumbuzi wa majina (bandari: 137/udp na 137/tcp). * Huduma ya usambazaji wa datagram kwa mawasiliano yasiyo na uhusiano (bandari: 138/udp). * Huduma ya kikao kwa mawasiliano yenye uhusiano (bandari: 139/tcp). ### Huduma ya Jina Ili kifaa kiweze kushiriki katika mtandao wa NetBIOS, lazima kiwe na jina la kipekee. Hii inafanikishwa kupitia **mchakato wa matangazo** ambapo pakiti ya "Utafutaji wa Jina" inatumwa. Ikiwa hakuna pingamizi zinazopokelewa, jina linachukuliwa kuwa lipo. Vinginevyo, **seva ya Huduma ya Jina** inaweza kuulizwa moja kwa moja ili kuthibitisha upatikanaji wa jina au kufumbua jina kuwa anwani ya IP. Zana kama `nmblookup`, `nbtscan`, na `nmap` hutumiwa kwa ajili ya kuhesabu huduma za NetBIOS, kufichua majina ya seva na anwani za MAC. ```bash PORT STATE SERVICE VERSION 137/udp open netbios-ns Samba nmbd netbios-ns (workgroup: WORKGROUP) ``` Kwa kuchunguza huduma ya NetBIOS, unaweza kupata majina ambayo seva inatumia na anwani ya MAC ya seva. ```bash nmblookup -A nbtscan /30 sudo nmap -sU -sV -T4 --script nbstat.nse -p137 -Pn -n ``` ### Huduma ya Usambazaji wa Datagram Datagram za NetBIOS zinaruhusu mawasiliano bila kuunganisha kupitia UDP, zikisaidia ujumbe wa moja kwa moja au utangazaji kwa majina yote ya mtandao. Huduma hii hutumia bandari **138/udp**. ```bash PORT STATE SERVICE VERSION 138/udp open|filtered netbios-dgm ``` ### Huduma ya Kikao Kwa mwingiliano unaotegemea uhusiano, **Huduma ya Kikao** inawezesha mazungumzo kati ya vifaa viwili, ikifaidika na uhusiano wa **TCP** kupitia bandari **139/tcp**. Kikao kinaanza na pakiti ya "Ombi la Kikao" na kinaweza kuanzishwa kulingana na jibu. Huduma hii inasaidia ujumbe mkubwa, ugunduzi wa makosa, na urejeshaji, na TCP inashughulikia udhibiti wa mtiririko na kutuma upya pakiti. Uhamishaji wa data ndani ya kikao unahusisha pakiti za **Ujumbe wa Kikao**, na kikao kinakamilishwa kwa kufunga uhusiano wa TCP. Huduma hizi ni sehemu muhimu ya utendaji wa **NetBIOS**, kuruhusu mawasiliano yenye ufanisi na ushirikiano wa rasilimali kwenye mtandao. Kwa habari zaidi juu ya itifaki za TCP na IP, tafadhali rejea kurasa zao za [TCP Wikipedia](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) na [IP Wikipedia](https://en.wikipedia.org/wiki/Internet_Protocol). ```bash PORT STATE SERVICE VERSION 139/tcp open netbios-ssn Microsoft Windows netbios-ssn ``` **Soma ukurasa ufuatao ili kujifunza jinsi ya kuchanganua huduma hii:** {% content-ref url="137-138-139-pentesting-netbios.md" %} [137-138-139-pentesting-netbios.md](137-138-139-pentesting-netbios.md) {% endcontent-ref %} ## 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} ```
Jifunze kuhusu kudukua AWS kutoka sifuri hadi shujaa na htARTE (Mtaalam wa Timu Nyekundu ya AWS ya HackTricks)! Njia nyingine za kusaidia HackTricks: * Ikiwa unataka kuona **kampuni yako ikionekana katika HackTricks** au **kupakua HackTricks kwa muundo wa PDF** Angalia [**MPANGO WA KUJIUNGA**](https://github.com/sponsors/carlospolop)! * Pata [**swag rasmi ya PEASS & HackTricks**](https://peass.creator-spring.com) * Gundua [**The PEASS Family**](https://opensea.io/collection/the-peass-family), mkusanyiko wetu wa [**NFTs**](https://opensea.io/collection/the-peass-family) ya kipekee * **Jiunge na** 💬 [**Kikundi cha Discord**](https://discord.gg/hRep4RUj7f) au [**kikundi cha telegram**](https://t.me/peass) au **tufuate** kwenye **Twitter** 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**.** * **Shiriki mbinu zako za kudukua kwa kuwasilisha PRs kwenye** [**HackTricks**](https://github.com/carlospolop/hacktricks) na [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repos za github.