Порт smb по умолчанию windows 10

применимо к: Windows server 2022, Windows server 2019, Windows Server 2016, Windows Server 2012 r2 и Windows Server 2012, Windows Server 2008 r2
Описание:
Платформа Windows фильтрации заблокировала пакет.

Причина

Эта проблема возникает из-за того, что вредоносные программы Adylkuzz, использующие ту же уязвимость SMBv1, что и Wannacrypt, добавляют политику IPSec с именем NETBC, которая блокирует входящий трафик на SMB-сервере, использующем TCP port 445. Некоторые средства очистки Adylkuzz могут удалять вредоносные программы, но не удаляют политику IPSec. Подробные сведения см. в материале Win32/Adylkuzz.B.

Решение

Для устранения данной проблемы выполните следующие действия.

Установите обновление безопасности MS17-010, соответствующее операционной системе.

Выполните действия на вкладке «Что теперь делать» Win32/Adylkuzz.B.

Проверьте, блокирует ли политика IPSec порт TCP 445 с помощью следующих команд (и ознакомьтесь с приведенными в примерами результатами).

При запуске команд на незараженом сервере политика не существует.

Если политика IPSec существует, удалите ее с помощью одного из следующих методов.

Выполните следующую команду:

Используйте редактор групповой политики (GPEdit.msc):

Локальный редактор групповой политики/конфигурация компьютера/Windows Параметры/security Параметры/IPSec Security

Дополнительная информация

С октября 2016 г. корпорация Майкрософт использует новую модель обслуживания для поддерживаемых версий обновлений Windows Server. Эта новая модель обслуживания для распространения обновлений упрощает решение проблем безопасности и надежности. Корпорация Майкрософт рекомендует поддерживать современные системы, чтобы убедиться, что они защищены и применяются последние исправления.

Эта угроза может запускать следующие команды:

Он также может добавлять правила брандмауэра, чтобы разрешить подключения с помощью этих команд:

Источник

CIFS over SSH штатными средствами Windows 10

Я ленивый и потому люблю когда все организовано удобно, без лишних телодвижений. Иногда перебарываю лень, для того чтобы сделать удобно.

Однажды потребовалось мне организовать доступ к серверу по протоколу SMB и в поиске решения я наткнулся на следующую статью: Mounting your Nikhef home directory using SSH for Windows 8. Это было простое и удобное решение, которое использовало Putty. Чуть позже мне пришлось настраивать это решение на другом компьютере и я понял, что Putty тут лишний с тех пор как в Windows 10 появился встроенный ssh-клиент на основе OpenSSH.

Под катом — идентичная схема, только с использованием OpenSSH под Windows 10.

У меня схема организована следующим образом:

Всё это автоматом – лень торжествует. Безопасно, быстро и нативно выглядит. Любым редактором могу открывать и править файлы на удаленном сервере как у себя на локальном — без проблем с загрузкой правленых файлов и установкой им необходимых разрешений. При этом нет проблем с безопасностью Samba.

Итак – сперва по шагам:

На стороне WINDOWS

Должен быть установлены OpenSSH. В Windows 10 и Windows Server 2019 появился встроенный SSH клиент на основе OpenSSH. Им мы и воспользуемся. Сначала убедимся что он установлен – наберем в командной строке

image loader

Если видим исполнение команды — все «Ок», клиент присутствует в системе.

Шаг 1. Настройка сетевого адаптера

Устанавливаем loopback-адаптер в системе. Мы будем обращаться по адресу к локальному адаптеру.

image loader

Запустится «Мастер установки оборудования» (Здесь я пользуюсь русской Windows 10 Pro).

Уверен, что эти шаги можно сделать из командной строки, но не нашел способ установки драйвера без devcon.exe, потому и не стал заморачиваться с автоматизацией этого шага.

Далее уже в CMD (от имени Администратора).

image loader

Видим появился второй адаптер. У меня он называется Ethernet 2.

Теперь настроим адрес для этого адаптера

image loader

image loader

Или из командной строки:

В результате у нас появился адаптер локально доступный по адресу 10.255.255.1

Теперь проблема в том, что нам необходимо получить доступ к общей папке через TCP-порт 445, но при загрузке Windows этот порт захватывается системным драйвером lanmanserver для всех интерфейсов. Отложив запуск драйвера lanmanserver и установив правило portproxy, мы можем обойти это.

Далее в командной строке от имени администратора меняем режим запуска сетевых служб (пробел после «start=» обязателен. ):

и настраиваем для адаптера с адресом 10.255.255.1 проксирование порта 44445 на локальный порт 445

Теперь необходимо перезагрузиться, чтобы схема перехвата порта у службы lanmanserver сработала.

Проверяем что прослушивание порта осуществляется нашим loopback-адаптером, просмотрев открытые в системе порты

значит все в порядке и порт прослушивается на нужном адресе. Если же мы видим «0.0.0.0:445» — значит в нашей схеме что-то не сработало правильно. Проверить правила переадресации портов можно командой

Шаг 2. Ключ и рабочий скрипт

Создаем папку для вспомогательных файлов. Встроим, так сказать в систему наш способ.

Генерируем ключ для ssh-авторизации (назовем его, например: cifsoversshkey)

В результате будет сгенерирована пара открытого и закрытого ключа. Для того, чтобы OpenSSH не выдавал сообщение UNPROTECTED PRIVATE KEY FILE! нужно изменить права на файл ключа. Задачу мы будем запускать для одного пользователя, от имени которого мы собираемся работать в Windows. Можно через GUI, но мне показалось что картинок уже достаточно. В Windows это сделаем следующей командой:

В результате текущий пользователь будет назначен владельцем, отключено наследование и удалены унаследованные права. Проверить мы это сможем командой

Должны быть права только для текущего пользователя, иначе файл ключа не будет принят программой OpenSSH и соединение не будет подниматься!

Создадим в текущей папке пакетный файл cifsoverssh.cmd следующего содержания:

Где:
user@111.111.111.111пользователь на стороне linux сервера @ адрес удаленного сервера

Шаг 3. Ярлык или задача в планировщике

Для автоматизации запуска при входе в систему можно создать задачу в планировщике:

На стороне клиентского компьютера Windows все приготовления были закончены.

Настройка Linux сервера

Предполагается, что ssh-сервер был предварительно настроен и включена авторизация по ключу.

Подключаемся по ssh из командной строки на windows-машине

В домашней папке пользователя, от имени которого мы будем авторизовываться при создании туннеля ищем файл

/.ssh/authorized_keys (если файл отсутствует – создадим его).

Теперь необходимо в этот файл вставить содержимое нашего файла публичного ключа, созданного на нашей windows-машине (файл %APPDATA%CIFSoverSSHcifsoversshkey.pub). Откроем его в любом редакторе и вставим цепочку ключа с новой строки. Если есть другие ключи, просто вставим его с новой строки.

Устанавливаем Samba (на примере Debian)

Переименовываем старый файл настроек и создаем новый файл

Открываем пустой файл настроек и приводим его к следующему виду:

В последней секции мы настраиваем непосредственно шару. В названии секции указываем имя шары ShareName. Path = путь к файлам, которые мы хотим расшарить. В параметрах force user и force group указываем linux-пользователя, от имени которого будут сохраняться файлы при изменении и создании в шаре. Так как у меня там лежат файлы для веб-сервера – у меня пользователь www-data

Отключаемся и выходим в командную строку Windows

Всё готово. Теперь остается только запустить наш ярлык или выйти из профиля пользователя windows и снова войти (если вы создали задачу в планировщике).

После этого ваша удаленная шара будет доступна по адресу \10.255.255.1ShareName — Можно даже монтировать её как сетевой диск.

Источник

Как включить порт 445 в Windows 10?

Перейдите в Конфигурация компьютера> Политики> Параметры Windows> Параметры безопасности> Брандмауэр Windows в режиме повышенной безопасности> Брандмауэр Windows в режиме повышенной безопасности — LDAP> Правила для входящих подключений. Щелкните правой кнопкой мыши и выберите «Новое правило». Выберите Порт и нажмите Далее. Выберите TCP и на определенных локальных портах введите 135, 445, затем нажмите Далее.

Как открыть порт 445 в Windows 10?

Откройте порты брандмауэра в Windows 10

Как узнать, заблокирован ли мой порт 445?

Узнайте, включен ли ваш порт 445 или нет

Нажмите сочетание клавиш Windows + R, чтобы запустить окно «Выполнить». Введите «cmd», чтобы запустить командную строку. Затем введите: «netstat –na» и нажмите Enter. Команда «netstat –na» означает сканирование всех подключенных портов и отображение в цифрах.

Как открыть порты SMB в Windows 10?

Как временно повторно включить протокол SMBv1 в Windows 10

Должен ли быть открыт порт 445?

SMB — это сетевой протокол обмена файлами, который требует открытого порта на компьютере или сервере для связи с другими системами. Порты SMB обычно имеют номера портов 139 и 445. Порт 445: используется более новыми версиями SMB (после Windows 2000) поверх стека TCP, позволяя SMB обмениваться данными через Интернет.

Для чего обычно используется порт 445?

TCP-порт 445 используется для прямого доступа к сети TCP / IP MS без необходимости в уровне NetBIOS. Эта служба реализована только в более поздних версиях Windows, начиная с Windows 2000 и Windows XP. Протокол SMB (Server Message Block) используется среди прочего для совместного использования файлов в Windows NT / 2K / XP.

Как я могу проверить, открыт ли порт?

Введите «telnet + IP-адрес или имя хоста + номер порта» (например, telnet www.example.com 1723 или telnet 10.17. Xxx. Xxx 5000), чтобы запустить команду telnet в командной строке и проверить состояние порта TCP. Если порт открыт, будет отображаться только курсор.

Как разблокировать порт 445?

Чтобы добавить правило брандмауэра, разрешающее TCP / 445 (SMB / CIFS) и TCP / 135 (RPC): перейдите в Конфигурация компьютера> Политики> Настройки Windows> Настройки безопасности> Брандмауэр Windows в режиме повышенной безопасности> Брандмауэр Windows в режиме повышенной безопасности — LDAP> Входящие правила. Щелкните правой кнопкой мыши и выберите «Новое правило». Выберите Порт и нажмите Далее.

Как узнать, открыт ли порт 443?

Вы можете проверить, открыт ли порт, попытавшись открыть HTTPS-соединение с компьютером, используя его доменное имя или IP-адрес. Для этого вы вводите https://www.example.com в строке URL-адреса вашего веб-браузера, используя фактическое доменное имя сервера, или https://192.0.2.1, используя фактический числовой IP-адрес сервера.

Почему мой порт не открыт?

В некоторых случаях доступ может блокировать брандмауэр на вашем компьютере или маршрутизаторе. Попробуйте временно отключить брандмауэр, чтобы убедиться, что это не вызывает у вас проблем. Чтобы использовать переадресацию портов, сначала определите локальный IP-адрес компьютера. Откройте конфигурацию вашего роутера.

Стоит ли открывать 139 порт?

Если вы находитесь в сети на базе Windows, в которой работает NetBios, совершенно нормально, если порт 139 открыт для поддержки этого протокола. Если вы не находитесь в сети, использующей NetBios, нет причин открывать этот порт.

Использует ли Windows 10 SMB?

В настоящее время Windows 10 также поддерживает SMBv1, SMBv2 и SMBv3. Разным серверам в зависимости от их конфигурации требуется другая версия SMB для подключения к компьютеру. Но если вы используете Windows 8.1 или Windows 7, вы можете проверить, включена ли она у вас.

Как включить SMB v2 в Windows 10?

Чтобы включить SMB2 в Windows 10, вам нужно нажать клавиши Windows + S, начать вводить текст и нажать «Включить или отключить функции Windows». Вы также можете выполнить поиск по той же фразе в меню «Пуск», «Настройки». Прокрутите вниз до SMB 1.0 / CIFS File Sharing Support и установите этот верхний флажок.

Требуется ли порт 139 для SMB?

Что такое порты 139 и 445? SMB всегда был протоколом обмена файлами по сети. Таким образом, SMB требует сетевых портов на компьютере или сервере для обеспечения связи с другими системами. SMB использует IP-порт 139 или 445.

Что такое порт 445?

Наряду с портами 135, 137 и 139 порт 445 является традиционным сетевым портом Microsoft со связями с исходной службой NetBIOS, присутствующей в более ранних версиях ОС Windows. В частности, TCP-порт 445 запускает блок сообщений сервера (SMB) через TCP / IP. Это основное средство связи в локальной сети на базе Microsoft.

Что такое порт 443?

Вы можете понимать порт 443 как порт просмотра веб-страниц, используемый для защиты связи через веб-браузер или HTTPS-сервисов. Более 95% защищенных веб-сайтов используют HTTPS через порт 443 для безопасной передачи данных. … Хотя порт 443 является стандартным портом для трафика HTTPS, порт 443 HTTPS также может поддерживать сайты HTTP.

Источник

Как открыть и пробросить порт в Windows 10 и роутере

router 12

Проводя время в онлайн-играх или программах, скачивая файлы или работая в интернете, можно столкнуться с тем, что система попросит добавить порт. Но перед тем как порт можно будет использовать, его необходимо создать. Также иногда необходимо вручную пробросить порты на роутере.

Зачем нужен порт

При работе с интернетом вы как отдаёте, так и получаете данные из сети. Образно говоря, создаются туннели между вашим компьютером и модемом или роутером, отвечающим за передачу и приём информации. Чтобы создать новый туннель, нужно открыть порт. У каждого туннеля свои особенности и характеристики, зависящие от того, какой порт развернут.

В системе заранее определены номера портов. С помощью них определяется, за что отвечает данный порт. Например, увидев номер 443, система поймёт, что используется протокол повышенной безопасности. Порт с номером 80 отвечает за HTTP-соединение, а оно используется при каждом подключении к интернету, так как практически все сайты работают по HTTP-протоколу. Более полный список наиболее часто пригождающихся портов вы можете изучить в пункте «Список портов и их задач».

Проверка состояния портов

Чтобы узнать, в каком состоянии находятся все порты (открыты, закрыты, используются или отключены), можно использовать встроенные средства Windows 10.

Есть четыре вида состояния:

Открываем порт в Windows 10

Есть два способа, позволяющих открыть порт: использовать встроенные возможности Windows или стороннюю программу. Неважно, какой из них вы используете, результат будет один. Если какой-то из способов не работает, воспользуйтесь другим методом.

При помощи брандмауэра (firewall)

Брандмауэр (второе название — Firewall) – антивирус в мире интернета. Эта программа защищает компьютер от вторжений, исходящих со стороны сети. Поскольку порты передают данные по интернету, брандмауэр обязан следить за ними.

Стандартный брандмауэр встроен в Windows и является частью защитника — антивируса, по умолчанию вшитого в операционную систему. Если у вас установлен сторонний антивирус, то у него, скорее всего, будет свой брандмауэр. Но не всегда у внешних брандмауэров есть функция, позволяющая открыть порт, поэтому воспользуемся стандартным.

Учтите, сторонний интернет-защитник может перекрывать действия встроенного. Отключите его на время использования порта. Если порт нужен долгое время, выполните нижеописанные действия через сторонний, а не встроенный брандмауэр (смотреть пункт «При помощи антивируса»).

Готово, после окончания операции в списке правил появится новый пункт, имеющий имя, придуманное вами. Порт открыт, можно начинать им пользоваться.

Для программы или игры

Если вам нужно открыть порт для приложения или игры, но вы не знаете, какой именно порт вам нужен, то выполните нижеописанные действия:

При помощи антивируса

Если у вас установлен сторонний антивирус, вы можете открыть порт через него. Некоторые компании не встраивают функции по работе с портами в свой антивирус, некоторые делают её платной. Но вы можете проверить, есть ли данная возможность в вашем антивирусе, выполнив нижеописанные действия, приведённые на примере антивируса Kaspersky:

Готово, порт открыт. Можно начинать проброс при помощи настроек роутера.

При помощи сторонней программы

Существует множество программ, упрощающих процесс открытия портов. Например, можно воспользоваться бесплатным и максимально простым приложением UPnP Wizard. Скачать его можно с официального сайта разработчика — https://www.xldevelopment.net/upnpwiz.php.

Готово, порт открыт и готов к пробросу через настройки роутера. Если он не откроется или откажется передавать данные, стоит проверить, не заблокирован ли он встроенным или сторонним брандмауэром.

Видео: открываем порт в Windows 10

Пробрасываем порт

Проброс порта — это соединение роутера и компьютера по открытому порту. Вышеописанные способы позволяли открыть порт на компьютере. После того как вы это сделаете, можно указать роутеру, что порт готов к работе и к нему можно подключиться. Есть два способа, позволяющих это сделать: автоматический и ручной. Первый потребует от вас минимум усилий: выбрать устройство для подключения и назначить имя виртуального сервера. Второй способ позволит выполнить настройку более детально.

На роутерах от разных производителей установлены различные прошивки. Также прошивки могут отличать в зависимости от их версии и модели роутера. В основном различие заключается во внешнем виде, то есть пункты и разделы в вашем случае могут располагаться и называться немного по-другому. Несмотря на это, процесс проброса порта на любом роутере выполняется практически одинаково.

Автоматический способ

Если вам не нужны дополнительные настройки, то выполните нижеописанные шаги. В примере используется прошивка роутера TP-Link.

Как только вписанные данные будут сохранены, начнётся проброс порта. После окончания процесса можно начинать пользоваться портом.

Ручной способ

Для более детальной настройки необходимо выполнить нижеописанные действия. Для примера взята прошивка роутера D-Link:

Сохранив настройки, вы пробросите порт. Им можно будет начинать пользоваться.

Таблица: список портов и их задач

Порт Задача
53 Обеспечение DNS
110 Приём почты
123 Синхронизация времени
443 HTTPS-соединение
5900 Virtual Network Computing (VNC)
5432 PostgreSQL
119 (Network News Transfer Protocol) — используется для отправки сообщений новостных рассылок

Полный список портов, осуществляющих интернет-соединение, можно увидеть в Wikipedia — https://ru.wikipedia.org/wiki/Список_портов_TCP_и_UDP.

Открывать порт необходимо для того, чтобы создать новый туннель передачи и получения данных через интернет. Каждый порт имеет свои характеристики и работает по своему протоколу. Открыть порт можно как через стандартный брандмауэр Windows, так и через сторонний антивирус или специальную программу. Проброс порта осуществляется через учётную запись настройки роутера.

Источник

Adblock
detector

Если вы из Windows 10 или 11 не можете открыть сетевые папки на других сетевых устройствах (NAS, Samba сервера Linux) или на компьютерах со старыми версиями Windows (Windows 7/ XP /2003), скорее всего проблема связана с тем, что в вашей версии Windows отключена поддержка устаревших и небезопасных версий протокола SMB (используется в Windows для доступа к общим сетевым папкам и файлам). В современных версиях Windows 10 и в Windows 11 по-умолчанию отключен протокол SMBv1 и анонимный (гостевой) доступ к сетевым папкам по протоколу SMBv2 и SMBv3.

Microsoft планомерно отключает старые и небезопасные версии протокола SMB во всех последний версиях Windows. Начиная с Windows 10 1709 и Windows Server 2019 (как в Datacenter так и в Standard редакциях) в операционной системе по умолчанию отключен протокол SMBv1 (помните атаку шифровальщика WannaCry, которая как раз и реализовалась через дыру в SMBv1).

Конкретные действия, которые нужно предпринять зависят от ошибки, которая появляется в Windows при доступе к общей сетевой папке и от настроек удаленного SMB сервера, на котором хранятся общие папки.

Содержание:

  • Вы не можете получить гостевой доступ к общей папке без проверки подлинности
  • Вашей системе необходимо использовать SMB2 или более позднюю
  • Нет доступа к сетевой папке, у вас нет прав доступа
  • Дополнительные способы проверки доступа к сетевой папке в Windows

Вы не можете получить гостевой доступ к общей папке без проверки подлинности

Начиная с версии Windows 10 1709 (Fall Creators Update) Enterprise и Education пользователи стали жаловаться, что при попытке открыть сетевую папку на соседнем компьютере стала появляться ошибка:

Вы не можете получить доступ к этой общей папке, так как политики безопасности вашей организации блокируют гостевой доступ без проверки подлинности. Эти политики помогают защитить ваш компьютер от небезопасных или вредоносных устройств в сети.
An error occurred while reconnecting Y: to
\nas1share Microsoft Windows Network: You can’t access this shared folder because your organization’s security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.

Вы не можете получить доступ к этой общей папке, так как политики безопасности вашей организации блокируют гостевой доступ без проверки подлинности

При этом на других компьютерах со старыми версиями Windows 8.1/7 или на Windows 10 с билдом до 1709, эти же сетевые каталоги открываются нормально. Причина в том, что в современных билдах Windows 10 (начиная с 1709) по умолчанию запрещен сетевой доступ к сетевым папкам под гостевой учетной записью по протоколу SMBv2 (и ниже). Гостевой (анонимный) доступ подразумевают доступ к сетевой папке без аутентификации. При доступе под гостевым аккаунтом по протоколу SMBv1/v2 не применяются такие методы защиты трафика, как SMB подписывание и шифрование, что делает вашу сессию уязвимой против MiTM (man-in-the-middle) атак.

При попытке открыть сетевую папку под гостем по протоколу SMB2, в журнале клиента SMB (Microsoft-Windows-SMBClient) фиксируется ошибка:

Log Name: Microsoft-Windows-SmbClient/Security Source: Microsoft-Windows-SMBClient Event ID: 31017  

Rejected an insecure guest logon.

Данная ошибка говорит о том, что ваш компьютер (клиент) блокирует не аутентифицированный доступ под аккаунтом guest.

Чаще всего с этой проблемой можно столкнуться при использовании старых версий NAS (обычно для простоты настройки на них включают гостевой доступ) или при доступе к сетевым папкам на старых версиях Windows 7/2008 R2 или Windows XP /2003 с настроенным анонимным (гостевым) доступом (см. таблицу поддерживаемых версий SMB в разных версиях Windows).

Microsoft рекомендует изменить настройки на удаленном компьютере или NAS устройстве, который раздает сетевые папки. Желательно переключить сетевой ресурс в режим SMBv3. А если поддерживается только протокол SMBv2, тогда нужно настроить доступ с аутентификацией. Это самый правильный и безопасный способ исправить проблему.

В зависимости от устройства, на котором хранятся сетевые папки, вы должны отключить на них гостевой доступ.

  • NAS устройство – отключите гостевой доступ в настройках вашего NAS устройства (зависит от модели);
  • Samba сервер на Linux — если вы раздаете SMB папку с Linux, добавьте в в секции [global] конфигурационного файла smb.conf строку:
    map to guest = never

    А в секции с описанием сетевой папки запретить анонимный доступ:
    guest ok = no
  • В Windows вы можете включить общий доступ к сетевым папкам и принтерам с парольной защитой в разделе Control PanelAll Control Panel ItemsNetwork and Sharing CenterAdvanced sharing settings. Для All Networks (Все сети) в секции “Общий доступ с парольной защитой” (Password Protected Sharing) измените значение на “Включить общий доступ с парольной защитой” (Turn on password protected sharing). В этом случае анонимный (гостевой) доступ к папкам будет отключен и вам придется создать локальных пользователей, предоставить им доступ к сетевым папкам и принтерам и использовать эти аккаунты для сетевого доступа к общим папкам на этом компьютере.. Windows 10 Включить общий доступ с парольной защитой

Есть другой способ – изменить настройки вашего SMB клиента и разрешить доступ с него на сетевые папки под гостевой учетной записью.

Этот способ нужно использовать только как временный (!!!), т.к. доступ к папкам без проверки подлинности существенно снижает уровень безопасности ваших данных.

Чтобы разрешить гостевой доступ с вашего компьютера, откройте редактор локальных групповых политик (gpedit.msc) и перейдите в раздел: Конфигурация компьютера -> Административные шаблоны -> Сеть -> Рабочая станция Lanman (Computer Configuration ->Administrative templates -> Network (Сеть) -> Lanman Workstation). Включите политику Enable insecure guest logons (Включить небезопасные гостевые входы).

Windows 10 политика Включить небезопасные гостевые входы

Обновите настройки групповых политик в Windows с помощью команды:

gpupdate /force

В Windows 10 Home, в которой нет редактора локальной GPO,вы можете внести аналогичное изменение через редактор реестра вручную::

HKLMSYSTEMCurrentControlSetServicesLanmanWorkstationParameters “AllowInsecureGuestAuth”=dword:1

Или такими командами:

reg add HKLMSYSTEMCurrentControlSetServicesLanmanWorkstationParameters /v AllowInsecureGuestAuth /t reg_dword /d 00000001 /f
reg add HKLMSoftwarePoliciesMicrosoftWindowsLanmanWorkstation /v AllowInsecureGuestAuth /t reg_dword /d 00000001 /f

Вашей системе необходимо использовать SMB2 или более позднюю

Другая возможная проблема при доступе к сетевой папке из Windows 10 – поддержка на стороне сервера только протокола SMBv1. Т.к. клиент SMBv1 по умолчанию отключен в Windows 10, то при попытке открыть шару или подключить сетевой диск вы можете получить ошибку:

Не удалось выполнить сопоставление сетевого диска из-за следующей ошибки.
Вы не можете подключиться к общей папке, так как она небезопасна. Эта общая папка работает по устаревшему протоколу SMB1, который небезопасен и может подвергнуть вашу систему риску атаки.
Вашей системе необходимо использовать SMB2 или более позднюю версию.
You can’t connect to the file share because it’s not secure. This share requires the obsolete SMB1 protocol, which is unsafe and could expose your system to attack. Your system requires SMB2 or higher.

Эта общая папка работает по устаревшему протоколу SMB1, который небезопасен и может подвергнуть вашу систему риску атаки. Вашей системе необходимо использовать SMB2 или более позднюю версию

При этом соседние устройства SMB могут не отображаться в сетевом окружении и при открытии сетевых папок по UNC пути может появляться ошибка 0x80070035.

Сообщение об ошибки явно указывает, что сетевая папка поддерживает только SMBv1 для доступа к файлам. В этом случае нужно попытаться перенастроить удаленное SMB устройство для поддержки как минимум SMBv2 (правильный и безопасный путь).

Если сетевые папки раздает Samba сервер на Linux, вы можете указать минимально поддерживаемую версию SMB в файле smb.conf так:

[global]
server min protocol = SMB2_10
client max protocol = SMB3
client min protocol = SMB2_10
encrypt passwords = true
restrict anonymous = 2

В Windows 7/Windows Server 2008 R2 вы можете отключить SMBv1 и разрешить SMBv2 так через реестр:
Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesLanmanServerParameters" SMB1 -Type DWORD -Value 0 –Force

Set-ItemProperty -Path "HKLM:SYSTEMCurrentControlSetServicesLanmanServerParameters" SMB2 -Type DWORD -Value 1 –Force

В Windows 8.1 отключите SMBv1, разрешите SMBv2 и SMBv3 и проверьте что для вашего сетевого подключения используется частный или доменный профиль:

Disable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol"
Set-SmbServerConfiguration –EnableSMB2Protocol $true

Если ваше сетевое устройство (NAS, Windows XP, Windows Server 2003), поддерживает только протокол SMB1, в Windows 10 вы можете включить отдельный компонент SMB1Protocol-Client. Но это не рекомендуется!!!

Если удаленное устройство требует использовать SMBv1 для подключения, и этот протокол отключен в вашем устройстве Windows, в Event Viewer появляется ошибка:

Log Name: Microsoft-Windows-SmbClient/Security
Source: Microsoft-Windows-SMBClient
Event ID: 32000
Description:  SMB1 negotiate response received from remote device when SMB1 cannot be negotiated by the local computer.

Запустите консоль PowerShell и проверьте, что SMB1Protocol-Client отключен (
State: Disabled
):

Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client

Включите поддержку протокола SMBv1 (потребуется перезагрузка):

Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client

powershell - Enable-WindowsOptionalFeature SMB1Protocol-Client

Также вы можете включить/отключить SMBv1 в Windows 10 и 11 из меню
optionalfeatures.exe
-> SMB 1.0/CIFS File Sharing Support –> SMB 1.0/CIFS Client.

включить клиент smbv1 в windows 11

В Windows 10 1709 и выше клиент SMBv1 автоматически удаляется, если он не использовался более 15 дней (за это отвечает компонент SMB 1.0/CIFS Automatic Removal).

В этом примере я включил только SMBv1 клиент. Не включайте компонент SMB1Protocol-Server, если ваш компьютер не используется устаревшими клиентами в качестве сервера для хранения общих папок.

После установке клиента SMBv1, вы должны без проблем подключиться к общей сетевой папке или принтеру. Однако, нужно понимать, что использование данного обходного решения не рекомендовано, т.к. подвергает снижает уровень безопасности.

Нет доступа к сетевой папке, у вас нет прав доступа

При подключении к сетевой папке на другом компьютере может появится ошибка:

Нет доступа к \ComputerNameShare. Возможно у вас нет прав на использование этого сетевого ресурса. Обратитесь к системному администратору этого сервера для получения соответствующих прав доступа.
Network Error
Windows cannot access \PC12Share
You do not have permissions to access \PC12Share. Contact your network administrator to request access.

windows не открывается сетевая папка нет доступа

При появлении это ошибки нужно:

  1. Убедиться, что пользователю, под которым вы подключаетесь к сетевой папке, предоставлены права доступа на сервере. Откройте свойства общей папке на сервере и убедитесь что у вашего пользователя есть права доступа.
    Проверьте разрешения сетевой шары на сервере с помощью PowerShell:
    Get-SmbShareAccess -Name "tools"

    Затем проверьте NTFS разрешения:
    get-acl C:tools |fl

    проверьте разрешения доступа на сетевую папку с помощью powershell
    Если нужно, отредактируйте разрешения в свойствах папки.
  2. Проверьте, что вы используете правильные имя пользователя и пароль для доступа к сетевой папки. Если имя и пароль не запрашиваются, попробуйте удалить сохраненные пароли для доступа к сетевой папке в диспетчере учетных записей Windows. Выполните команду
    rundll32.exe keymgr.dll, KRShowKeyMgr
    и удалите сохраненные учетные данные для доступа к сетевой папке.очистити сохраненные пароли для доступа к сетевым папкам
    При следующем подключении к сетевой папки появится запрос имени и пароля. Укажите имя пользователя для доступа к папке. Можете сохранить его в Credential Manager или добавить вручную.

Дополнительные способы проверки доступа к сетевой папке в Windows

В этом разделе указаны дополнительные способы диагностики при проблема с открытием сетевые папок в Windows:

 locked

По какому протоколу осуществляется доступ к общим папкам?

RRS feed

  • Вопрос

  • Не знал к какому разделу отнести этот вопрос и решил разместить здесь. Меня интересут какой протокол используется в Windows 7 и Windows XP для доступа к общим папкам и принетрам, какие при этом используются порты?

Ответы

    • Помечено в качестве ответа
      Egor Lukin
      26 октября 2010 г. 12:41

Все ответы

  • очень просто — запустите встроенный брандмауэр и посмотрите правила для группы «Общий доступ…». Все порты там указаны. Они и используются :-)

    А нюансы — в зависимости от того, используется или нет NetBIOS через TCP/IP…

  • пярм сейчас глянуть нет возможности. но меня поразила одна вещь. я всегда думал что это происходит по протоколу NetBIOS. Вот выдержка из Википедии «Клиенты соединяются с сервером, используя протоколы
    TCP/IP (а точнее
    NetBIOS через
    TCP/IP), …» Я защел в свойства TCP/IP и в закладке WINS отключил NetBIOS поерх TCP/IP, но я всерано имел возможность заходить в общие папки. Я конечно займусь дальнейшим расследованием
    :) Но если кто занет точно я буду благодарен за информацию.

  • Порты, насколько я помню:

    TCP 135-139, 445.

    UDP 135-139.

    Через 445 работают MDS (Microsoft Directory Services) или SMB (Server Message Blocks over IP).


    In pivo veritas… t.G. — испокон и вовеки. Want to believe… It’s a magic…

  • но меня поразила одна вещь. я всегда думал что это происходит по протоколу NetBIOS.

    с этого бы и начинали :-))

    Вы правы. Но наполовину. :-) Происходит. Но — не всегда! более защищенно — через SMB (TCP 445)

    (а старые системы по SMB могут и не заработать!… я уж не помню, когда это всё началось… :-))

    • Изменено
      Aleksey Tchekmarev
      26 октября 2010 г. 7:12

  • 445 порт принадлежит microsoft-ds, а этот пор предназнаен, если я не ошибаюсь, для службы каталогов AD,а не для общих папок и принтеров. SMB — это целый комплекс протоволов, которы включает также netBIOS. попровте, если я не прав.

    • Предложено в качестве ответа
      dr4g0nfl7
      28 декабря 2018 г. 4:20

    • Помечено в качестве ответа
      Egor Lukin
      26 октября 2010 г. 12:41
  • 445 порт принадлежит microsoft-ds, а этот пор предназнаен, если я не ошибаюсь, для службы каталогов AD

    AD данный порт нужен исключительно для работы с sysvol…

  • 445 порт принадлежит microsoft-ds, а этот пор предназнаен, если я не ошибаюсь, для службы каталогов AD,а не для общих папок и принтеров. SMB — это целый комплекс протоволов, которы включает также netBIOS. попровте, если я не прав.

    Вы бы всё-таки заглянули в правила брандмаэура… меньше бы сомневались :-))

    сейчас SMB — это SMB, а NetBIOS — это NetBIOS.
    «SMB was originally designed to run on top of the NetBIOS/NetBEUI API (typically implemented with NBF, NetBIOS over IPX/SPX, or NBT).
    Since Windows 2000, SMB by default runs directly on top of TCP — a feature known as «direct host SMB» where the server listens on TCP port 445.»

    «Windows supports file and printer sharing traffic by using the Server Message Block (SMB) protocol directly hosted on TCP. This differs from earlier operating systems, in which SMB traffic requires the NetBIOS
    over TCP (NBT) protocol to work on a TCP/IP transport.» (выделения мои)http://support.microsoft.com/kb/204279

  • 445    TCP       Да              Enable   SMB поверх TCP / Общий доступ к файлам и принтерам

    Пруфлинки:

    http://wiki.compowiki.info/SetevyeNeispravnosti

    http://www.oszone.net/3962/Troubleshooting_Windows_Firewall

    Вот вам про SMB:

    http://ru.wikipedia.org/wiki/SMB

    «SMB — это протокол, основанный на технологии клиент-сервер, который предоставляет клиентским приложениям простой способ
    для чтения и записи файлов, а также запроса служб у серверных программ в различных типах сетевого окружения»


    In pivo veritas… t.G. — испокон и вовеки. Want to believe… It’s a magic…

    первые 2 ссылки это не пруф линки. пруф линком может быть сайт msdn или technet, а тем сатайтам, на которые вы дали ссылки я доверяю не больше,чем своему соседу. по поводу ссылки на вики, то читайте дальше.

    Это откуда «445    TCP       Да              Enable   SMB поверх TCP / Общий доступ к
    файлам и принтерам
    «?

    У кого нить есть ссылка на msdn или technet, где это описывается?

  • если сосед говорит «на улице дождь», то не нужно бежать за справкой в метеоцентр :-)

    надо ж понимать — какая информация общеизвестна до банальности, а какая требует «нотариального подтверждения» ;-)

  • если сосед говорит «на улице дождь», то не нужно бежать за справкой в метеоцентр :-)

    надо ж понимать — какая информация общеизвестна до банальности, а какая требует «нотариального подтверждения» ;-)

    Плохой пример. Меня не интересут что-то временное или субъективное. Меня интересует

    протокол для доступа к общим папкам и принетрам в сетях microsoft. Как показывает практика, это не общеизвесная информация. Спасибо за ссылку, это пока самое полезное что я видел.

  • хороший пример! ;-)

    на Ваш вопрос уже давно ответили и не один раз (ответы стоит смотреть тщательнЕЕ ;-))

    вот еще http://support.microsoft.com/kb/832017

    вообще, такого найти в 5 секунд можно сколько угодно на сайтах Microsoft, с помощью хитрой строки поиска «smb tcp ports» ;-)

    (брандмауэр — лучший «критерий оценки»! куда достовернее любых ссылок… закройте
    все порты — и посмотрите, по какому будет работать ;-)) и всего делов. практика — критерий истины… изучить систему можно руками, а не по статьям… достовернее будет :-))

  • У меня навернео не получается донести основну суть дела… Какие протоколы используют какие порты натйи не проблема. Проблема найти документ, в котором будет написано по каким протоколам в Windows XP или Windows 7 осуществляется доступ к общим папкам. То
    что там используется толи NetBIOS толи еще что-то это понятно. Хотелось бы конкретно знать и желатьльно с примерами. Пишите про SMB, а почему не CIFS?

  • Парни, из приведённых вами материалов, по-моему даже мёртвый уже должен понять, какие порты и протоколы используются для шар и т.д. Респект вам ребята.

  • «В среде AD RMS TCP-порт 445 используется для подготовки к работе сервера AD RMS,
    но он также служит для совместного использования файлов компьютерами, работающими под управлением Microsoft Windows 2000 или более поздних версий. Если нет особой необходимости предоставлять доступ к этому порту для других компьютеров
    в сети, необходимо ограничить эту область, чтобы доступ к TCP-порту 445 на сервере базы данных AD RMS имел только кластер AD RMS.»

    «Системная служба сервера обеспечивает поддержку удаленного вызова процедур, а также совместное использование файлов, принтеров и именованных каналов в сети. Служба сервера позволяет организовать совместное использование локальных ресурсов, например дисков
    и принтеров, чтобы к ним могли получать доступ другие пользователи сети, а также обмен данными по именованным каналам между программами на локальном и удаленных компьютерах. Обмен данными по именованному каналу представляет собой память, зарезервированную
    для результатов выполнения одного процесса, которые будут использованы в качестве входных данных для другого процесса. Принимающий данные процесс не обязательно должен быть запущен на локальном компьютере.

    Примечание. Если имя компьютера разрешается в несколько IP-адресов при использовании службы WINS или в результате сбоя этой службы имя компьютера разрешается при помощи DNS, то NetBIOS через TCP/IP (NetBT) будет проверять IP-адреса или адреса
    файлового сервера. Обмен данными через порт 130 зависит от эхо-сообщений протокола управляющих сообщений Интернета (ICMP). Если протокол IPv6 (протокол Интернета версии 6) не установлен, то разрешение имен для обмена данными через порт 445 также будет зависеть
    от ICMP. Предварительно загруженные записи Lmhosts будут обходить механизм разрешения DNS. Если на компьютере под управлением Windows Server 2003 или Windows XP протокол IPv6 установлен, то обмен данными через порт 445 не вызовет запросов ICMP.»

    И т.д. это всё из приведённых статей.

  • если сосед говорит «на улице дождь», то не нужно бежать за справкой в метеоцентр :-)

    надо ж понимать — какая информация общеизвестна до банальности, а какая требует «нотариального подтверждения» ;-)

    Плохой пример. Меня не интересут что-то временное или субъективное. Меня интересует

    протокол для доступа к общим папкам и принетрам в сетях microsoft. Как показывает практика, это не общеизвесная информация. Спасибо за ссылку, это пока самое полезное что я видел.

    Как начальная точка подойдет эта ссылка
    http://msdn.microsoft.com/en-us/library/Aa365233

    Там же можно сделать поиск по слову SMB


    http://www.podgoretsky.com

  • Леня что такое AD RMS ?

    http://samba.anu.edu.au/cifs/docs/what-is-smb.html там про SMB, а не о том какой протокол используется в Windows Xp или Windows 7. список ос к которым
    относится эта статья представлен в конце это не маловважно. меня не интересует windows 98 или samba.

    Я хочу узнать (внимание еще раз!) — Какой протол используется в Windows XP и Windows 7 для доступа к общим папкам и принтерам? (пруфлинк).

    На левом сайте школьника самоучки может быть написанно что угодно. Почитать о CIFS или SMB я знаю где. Мне нужен ответ на мой вопрос.

  • 1. Здесь никто не обязан отвечать вам, это не коммерческий форум. Если мы отвечаем, это лишь наша добрая воля и ничего больше. Если вам кажется, что мы вам что-то должны, мне жаль, но это заблуждение.

    2. На ваш вопрос ответ дан уже многократно. Вышеуказанные ссылки на ресурсы компании Microsoft в полной мере описывают решение этого вопроса. 


    In pivo veritas… t.G. — испокон и вовеки. Want to believe… It’s a magic…

  • Ты хочешь что бы прочитали вслух и с выражением?

    На левом сайте школьника самоучки может быть написанно что угодно. Почитать о CIFS или SMB я знаю где. Мне нужен ответ на мой вопрос.


    http://www.podgoretsky.com

  • Merlin_t_G спасибо
    за ссылку на вики по SMB. Читал между строк и пропусти, что хотел.

  • Стоп флуд.

    Egor Lukin, что конкретно вам непонятно в приведенных статьях? Особенно в статье KB, где перечислены все протоколы, используемые Windows с объяснением, что к чему и почему?


    Мнения, высказанные здесь, являются отражением моих личных взглядов, а не позиции корпорации Microsoft. Вся информация предоставляется «как есть» без каких-либо гарантий
    Follow MSTechnetForum on Twitter

    Посетите Блог Инженеров Доклады на Techdays:
    http://www.techdays.ru/speaker/Vinokurov_YUrij.html

  • Разве это протокол не называется SMB (можно еще назвать такие имена как LanMan, NetBios)? (сейчас CIFS — Common Internet File System)/

    Может я неточно понимаю твой вопрос, но информации в Интернет, не то что много, а очень много, на любом языке.

    «CIFS, Common Internet File System (formerly SMB) is the file sharing protocol used by Microsoft Windows 95, 98, ME, NT, 2000, and XP operating systems to share files and printers across the network.»

    Перевод — CIFS это протокол совместного использование файлов и папок

    По моему это законченый ответ.

    Подробности можно найти на msdn.microsoft.com но там очень много.

    И извини, что пошутил насчет чтения вслух.

    я ни кого не заставляю отвечать.

    Анатолий, мне никто не дал ответ на то, что я хотел, за исключением портов. Ваша начальная точка эквивалентна
    www.google.ru. Мне накидали ссылки на спецификацию по SMB и samba. Мне нужно было — Я хочу узнать (внимание еще раз!) — Какой протол используется в Windows XP и Windows 7 для доступа к общим папкам и принтерам? (пруфлинк).

    Вот ответ, который я ждал.

    http://ru.wikipedia.org/wiki/SMB

    В Windows 2000 впервые появился SMB непосредственно поверх
    TCP (без NetBIOS); для этого используется
    порт 445 (SMB поверх
    NetBIOS over TCP/IP использовал порт 139).

    В Windows Vista появилась новая версия протокола —
    SMB 2.0.

    Я не в одной стать не нашел ответа на вопрос. Если я ошибаюсь линканите.

    Я в любом случае благодарен каждом за помощь.


    http://www.podgoretsky.com

  • Вопрос по поводу CIFS меня тоже мучает. Хочу найти способ, узнать точно CIFS или SMB. Пока все сводится к SMB, но в некоторых источниках пишут про CIFS. Причем эти протоколы, как я понимаю, не одно и тоже.

    Я пропускал некоторые ссылки, которые мне давали, пока искал/читал и обовлял эту страницу форума.

    Один немаловажный момент. У меня все началось с того, что возник вопрос — почему я могу обратится к общим папкам из другой подсети, если netbios не маршрутизируемый протокол. С этого вопроса начались
    мои иследования. По этому ответ типа -для доступа к общим ресурсам используется порт 139, меня не устраивает.

  • CIFS подмножество SMB, в последней цитате сказано (ранее SMB)

    Чистый NETBIOS не используется, а инкапсулирован как NETBIOS over TCP/IP, а этот уже маршрутизируемый.

    Вопрос по поводу CIFS меня тоже мучает. Хочу найти способ, узнать точно CIFS или SMB. Пока все сводится к SMB, но в некоторых источниках пишут про CIFS. Причем эти протоколы, как я понимаю, не одно и тоже.

    Я пропускал некоторые ссылки, которые мне давали, пока искал/читал и обовлял эту страницу форума.

    Опять же! Как понимаю Windows XP и Windows 7 может работать как по SMB, так и по NetBIOS over TCP/IP. Если у кого есть статья о том, как происходит выбор протоколов и т.п. буду благодарен.

    Один не маловажный момент. У меня все началось с того, что возник вопрос — почему я могу обратится к общим папкам из другой подсети, если netbios не маршрутизируемый протокол. С этого вопроса начались мои иследования. По этому ответ типа -для доступа к общим
    ресурсам используется порт 139 меня не устраивает.


    http://www.podgoretsky.com

  • Продолжая нашу приятную беседу :)

    Я вот установил сегодня Windows 2008. Настроил ip из своей подсети и удостоверился, что в Netwrok and Sharing Center опция File sharing выключена. Попробовал зайти на общие папки другого компьютера и все прошло замечательно, папки открылись после ввода логина
    и пароля. Потом глянул в свойства фаервола и теперь не понимаю, почему я подключился в общим папкам другого компьютера? Вроде как SMB заблокирван. В чем я ошибаюсь?

    Входящие правила

    Name	Group	Profile	Enabled	Action	Override	Program	Local Address	Remote Address	Protocol	Local Port	Remote Port	Allowed Users	Allowed Computers	
    File and Printer Sharing (Echo Request - ICMPv4-In)	File and Printer Sharing	Private	No	Allow	No	Any	Any	Any	ICMPv4	Any	Any	Any	Any	
    File and Printer Sharing (Echo Request - ICMPv4-In)	File and Printer Sharing	Domain, Public	No	Allow	No	Any	Any	Any	ICMPv4	Any	Any	Any	Any	
    File and Printer Sharing (Echo Request - ICMPv6-In)	File and Printer Sharing	Private	No	Allow	No	Any	Any	Any	ICMPv6	Any	Any	Any	Any	
    File and Printer Sharing (Echo Request - ICMPv6-In)	File and Printer Sharing	Domain, Public	No	Allow	No	Any	Any	Any	ICMPv6	Any	Any	Any	Any	
    File and Printer Sharing (NB-Datagram-In)	File and Printer Sharing	Domain, Public	No	Allow	No	System	Any	Any	UDP	138	Any	Any	Any	
    File and Printer Sharing (NB-Datagram-In)	File and Printer Sharing	Private	No	Allow	No	System	Any	Any	UDP	138	Any	Any	Any	
    File and Printer Sharing (NB-Name-In)	File and Printer Sharing	Domain, Public	No	Allow	No	System	Any	Any	UDP	137	Any	Any	Any	
    File and Printer Sharing (NB-Name-In)	File and Printer Sharing	Private	No	Allow	No	System	Any	Any	UDP	137	Any	Any	Any	
    File and Printer Sharing (NB-Session-In)	File and Printer Sharing	Private	No	Allow	No	System	Any	Any	TCP	139	Any	Any	Any	
    File and Printer Sharing (NB-Session-In)	File and Printer Sharing	Domain, Public	No	Allow	No	System	Any	Any	TCP	139	Any	Any	Any	
    File and Printer Sharing (SMB-In)	File and Printer Sharing	Private	No	Allow	No	System	Any	Any	TCP	445	Any	Any	Any	
    File and Printer Sharing (SMB-In)	File and Printer Sharing	Domain, Public	No	Allow	No	System	Any	Any	TCP	445	Any	Any	Any	
    File and Printer Sharing (Spooler Service - RPC)	File and Printer Sharing	Domain, Public	No	Allow	No	%SystemRoot%system32spoolsv.exe	Any	Any	TCP	Dynamic RPC	Any	Any	Any	
    File and Printer Sharing (Spooler Service - RPC)	File and Printer Sharing	Private	No	Allow	No	%SystemRoot%system32spoolsv.exe	Any	Any	TCP	Dynamic RPC	Any	Any	Any	
    File and Printer Sharing (Spooler Service - RPC-EPMAP)	File and Printer Sharing	Domain, Public	No	Allow	No	Any	Any	Any	TCP	RPC Endpoint Mapper	Any	Any	Any	
    File and Printer Sharing (Spooler Service - RPC-EPMAP)	File and Printer Sharing	Private	No	Allow	No	Any	Any	Any	TCP	RPC Endpoint Mapper	Any	Any	Any	
    

    Исходящие правила

    Name	Group	Profile	Enabled	Action	Program	Local Address	Remote Address	Protocol	Local Port	Remote Port	Allowed Computers	
    File and Printer Sharing (Echo Request - ICMPv4-Out)	File and Printer Sharing	Private	No	Allow	Any	Any	Any	ICMPv4	Any	Any	Any	
    File and Printer Sharing (Echo Request - ICMPv4-Out)	File and Printer Sharing	Domain, Public	No	Allow	Any	Any	Any	ICMPv4	Any	Any	Any	
    File and Printer Sharing (Echo Request - ICMPv6-Out)	File and Printer Sharing	Private	No	Allow	Any	Any	Any	ICMPv6	Any	Any	Any	
    File and Printer Sharing (Echo Request - ICMPv6-Out)	File and Printer Sharing	Domain, Public	No	Allow	Any	Any	Any	ICMPv6	Any	Any	Any	
    File and Printer Sharing (NB-Datagram-Out)	File and Printer Sharing	Private	No	Allow	System	Any	Any	UDP	Any	138	Any	
    File and Printer Sharing (NB-Datagram-Out)	File and Printer Sharing	Domain, Public	No	Allow	System	Any	Any	UDP	Any	138	Any	
    File and Printer Sharing (NB-Name-Out)	File and Printer Sharing	Private	No	Allow	System	Any	Any	UDP	Any	137	Any	
    File and Printer Sharing (NB-Name-Out)	File and Printer Sharing	Domain, Public	No	Allow	System	Any	Any	UDP	Any	137	Any	
    File and Printer Sharing (NB-Session-Out)	File and Printer Sharing	Private	No	Allow	System	Any	Any	TCP	Any	139	Any	
    File and Printer Sharing (NB-Session-Out)	File and Printer Sharing	Domain, Public	No	Allow	System	Any	Any	TCP	Any	139	Any	
    File and Printer Sharing (SMB-Out)	File and Printer Sharing	Domain, Public	No	Allow	System	Any	Any	TCP	Any	445	Any	
    File and Printer Sharing (SMB-Out)	File and Printer Sharing	Private	No	Allow	System	Any	Any	TCP	Any	445	Any	
    
  • В чем я ошибаюсь? 

    в первую очередь — форумом. (если речь о Windows Server 2008…)

    (к тому же, это ядро «поколения» Висты, а не Win7… совершенно другая тема)

  • В чем я ошибаюсь? 

    в первую очередь — форумом. (если речь о Windows Server 2008…)

    (к тому же, это ядро «поколения» Висты, а не Win7… совершенно другая тема)

    Объясните пожалуйста…

The SMB port number is TCP 445. If you’ve heard people saying the port number is 139, they could be partially correct. Let’s understand the SMB ports 445, 139, 138, and 137 in detail.

  • Author
  • Recent Posts

Surender Kumar has more than twelve years of experience in server and network administration. His fields of interest are Windows Servers, Active Directory, PowerShell, web servers, networking, Linux, virtualization, and penetration testing. He loves writing for his blog.

Latest posts by Surender Kumar (see all)

  • Extending LVM space in Ubuntu — Thu, Feb 2 2023
  • Backup in Proxmox VE — Thu, Jan 26 2023
  • Snapshots in Proxmox VE — Wed, Jan 25 2023

Admins need to know the SMB port number when it comes to setting up firewalls in Windows networks. The earlier version of SMB (SMB 1.0) was originally designed to operate on NetBIOS over TCP/IP (NBT), which uses port TCP 139 for session services, port TCP/UDP 137 for name services, and port UDP 138 for datagram services. (Read my previous comprehensive overview of the SMB protocol.

By default, NBT is installed and enabled in Windows for backwards compatibility, but it is known for exposing file shares and other information to everyone on the network. While it is not a big problem in local networks, it could be a security risk if exposed to the Internet. Man-in-the-middle (MITM) and NetBIOS name service (NBNS) spoofing attacks are common with NTB-enabled networks—particularly if the related ports are not properly safeguarded.

How are SMB and NBT related?

NetBIOS over TCP/IP (NBT) is a completely independent service from SMB, and it doesn’t depend on SMB for anything. The SMB protocol, on the other hand, may rely on NetBIOS to communicate with old devices that do not support the direct hosting of SMB over TCP/IP.

Therefore, the SMB protocol relies on port 139 while operating over NBT. However, normally, for direct SMB over TCP/IP, the SMB port number is TCP 445. By the way, if both NetBIOS over TCP/IP and directly hosted SMB over TCP/IP are available (that is, if ports 445 and 139 are both listening), Windows tries both options at the same time. Whichever responds first is used for communication.

The SMB 2.0 that was introduced with Windows Vista and Windows Server 2008 can operate solely on TCP port 445, and you can safely disable NBT for improved security and reduced network overhead caused by NetBIOS broadcasts.

To see the status of ports 139 and 445 in your system, use the following PowerShell command:

Get-NetTCPConnection -LocalPort 139,445 -ea 0 | select Local*, Remote*, State, @{n="ProcessName";e={(Get-Process -Id $_.OwningProcess).ProcessName}} | ft -Auto

Viewing the status of ports TCP 139 and 445 using PowerShell

Viewing the status of ports TCP 139 and 445 using PowerShell

The above screenshot shows that both ports TCP 139 and 445 are in the listening state by default.

If you’re interested in disabling the NBT, it needs to be done on each network interface individually. See the following screenshot for disabling it using the GUI on each network adapter:

Disabling NBT on a network interface using GUI

Disabling NBT on a network interface using GUI

Disabling NBT using the GUI becomes tedious if you’ve got more than one network adapter. The following PowerShell command can help you disable it on all network interfaces at once:

$adapters = (Get-WmiObject Win32_NetworkAdapterConfiguration | where {$_.IPEnabled -eq $true})

Foreach ($adapter in $adapters){
  $adapter.SetTcpipNetbios(2)
}

where the value «2» with the SetTcpipNetbios method is used to disable NBT. By the way, the value «1» means enable NBT, and «0» means configure NBT by DHCP.

Disabling NetBios on all network interfaces at once using PowerShell

Disabling NetBios on all network interfaces at once using PowerShell

After disabling it, if you view the status of TCP ports, you will notice that port 139 is no longer listening on your system.

Subscribe to 4sysops newsletter!

Confirming that TCP port 139 is no longer listening

Confirming that TCP port 139 is no longer listening

If you do not have any old clients in your network, it is a good idea to block other ports, except for TCP 445 in the Windows Defender firewall.

avatar

Перейдите в Конфигурация компьютера> Политики> Параметры Windows> Параметры безопасности> Брандмауэр Windows в режиме повышенной безопасности> Брандмауэр Windows в режиме повышенной безопасности — LDAP> Правила для входящих подключений. Щелкните правой кнопкой мыши и выберите «Новое правило». Выберите Порт и нажмите Далее. Выберите TCP и на определенных локальных портах введите 135, 445, затем нажмите Далее.

Как включить порт 445?

Перейдите Пуск> Панель управления> Брандмауэр Windows и найдите слева Дополнительные настройки. 2. Щелкните Правила для входящих подключений> Новое правило. Затем во всплывающем окне выберите «Порт»> «Далее»> «TCP»> «Определенные локальные порты», введите 445 и нажмите «Далее».

Как открыть порты SMB в Windows 10?

[Сетевое окружение (Samba) Share] Как получить доступ к файлам на сетевых устройствах с помощью SMBv1 в Windows 10?

  1. Откройте панель управления на вашем ПК / ноутбуке.
  2. Нажмите на Программы.
  3. Щелкните ссылку Включить или отключить функции Windows.
  4. Разверните параметр «Поддержка общего доступа к файлам SMB 1.0 / CIFS».
  5. Отметьте опцию клиента SMB 1.0 / CIFS.
  6. Нажмите кнопку ОК.

25 ян. 2021 г.

Порт 445 открыт по умолчанию?

Если на сервере включен NBT, он прослушивает порты UDP 137 и 138 и порты TCP 139 и 445.… Все четыре порта открыты по умолчанию во всех версиях Windows, включая Windows 10 и Windows Server 2019.

Как мне проверить свой порт SMB?

Чтобы определить порты и сетевые интерфейсы, которые прослушивает член домена Samba, выполните: # netstat -tulpn | egrep «smbd | nmbd | winbind» tcp 0 0 127.0.

Для чего обычно используется порт 445?

TCP-порт 445 используется для прямого доступа к сети TCP / IP MS без необходимости в уровне NetBIOS. Эта служба реализована только в более поздних версиях Windows, начиная с Windows 2000 и Windows XP. Протокол SMB (Server Message Block) используется, помимо прочего, для совместного использования файлов в Windows NT / 2K / XP.

Стоит ли открывать порт 139?

Если вы находитесь в сети на базе Windows, в которой работает NetBios, совершенно нормально, если порт 139 открыт для поддержки этого протокола. Если вы не находитесь в сети, использующей NetBios, нет причин открывать этот порт.

Что такое порт 443?

Вы можете понимать порт 443 как порт просмотра веб-страниц, используемый для защиты связи через веб-браузер или HTTPS-сервисов. Более 95% защищенных веб-сайтов используют HTTPS через порт 443 для безопасной передачи данных. … Хотя порт 443 является стандартным портом для трафика HTTPS, порт 443 HTTPS также может поддерживать сайты HTTP.

Для чего обычно используется порт 139?

Порт 139 используется для общего доступа к файлам и принтерам, но оказывается самым опасным портом в Интернете. Это потому, что он оставляет жесткий диск пользователя уязвимым для хакеров.

Использует ли Windows 10 SMB?

В настоящее время Windows 10 также поддерживает SMBv1, SMBv2 и SMBv3. Разным серверам в зависимости от их конфигурации требуется другая версия SMB для подключения к компьютеру. Но если вы используете Windows 8.1 или Windows 7, вы можете проверить, включена ли она у вас.

Как проверить, открыт ли порт 139?

Для проверки порта 139 попробуйте использовать IP-адрес сервера, NetBIOS или полное доменное имя. Вы можете использовать команду telnet или инструменты PortQuery.

Как включить SMB v2 в Windows 10?

Чтобы включить SMB2 в Windows 10, вам нужно нажать клавиши Windows + S, начать вводить текст и нажать «Включить или выключить функции Windows». Вы также можете выполнить поиск по той же фразе в меню «Пуск», «Настройки». Прокрутите вниз до SMB 1.0 / CIFS File Sharing Support и установите этот верхний флажок.

Требуется ли порт 139 для SMB?

Что такое порты 139 и 445? SMB всегда был протоколом обмена файлами по сети. Таким образом, SMB требует сетевых портов на компьютере или сервере для обеспечения связи с другими системами. SMB использует IP-порт 139 или 445.

Стоит ли закрыть порт 445?

Мы также рекомендуем заблокировать порт 445 на внутренних брандмауэрах для сегментации вашей сети — это предотвратит внутреннее распространение программы-вымогателя. Обратите внимание, что блокировка TCP 445 предотвратит совместное использование файлов и принтеров — если это требуется для бизнеса, вам может потребоваться оставить порт открытым на некоторых внутренних брандмауэрах.

445 TCP или UDP?

Информация о порте 445

Порт (ы) протокол Сервис
445 TCP майкрософт-дс
445 TCP
445 UDP
445 TCP троянец

Server Message Block (SMB) is a communication protocol[1] originally developed in 1983 by Barry A. Feigenbaum at IBM[2] and intended to provide shared access to files and printers across nodes on a network of systems running IBM’s OS/2. It also provides an authenticated inter-process communication (IPC) mechanism. In 1987, Microsoft and 3Com implemented SMB in LAN Manager for OS/2, at which time SMB used the NetBIOS service atop the NetBIOS Frames protocol as its underlying transport. Later, Microsoft implemented SMB in Windows NT 3.1 and has been updating it ever since, adapting it to work with newer underlying transports: TCP/IP and NetBT. SMB implementation consists of two vaguely named Windows services: «Server» (ID: LanmanServer) and «Workstation» (ID: LanmanWorkstation).[3] It uses NTLM or Kerberos protocols for user authentication.

In 1996, Microsoft published a version of SMB 1.0[4] with minor modifications under the Common Internet File System (CIFS ) moniker. CIFS was compatible with even the earliest incarnation of SMB, including LAN Manager’s.[4] It supports symbolic links, hard links, and larger file size, but none of the features of SMB 2.0 and later.[4][5] Microsoft’s proposal, however, remained an Internet Draft and never achieved standard status.[6] Microsoft has since discontinued use of the CIFS moniker but continues developing SMB and making subsequent specifications publicly available.

Features[edit]

Server Message Block (SMB) enables file sharing, printer sharing, network browsing, and inter-process communication (through named pipes) over a computer network. SMB serves as the basis for Microsoft’s Distributed File System implementation.

SMB relies on the TCP and IP protocols for transport. This combination potentially allows file sharing over complex, interconnected networks, including the public Internet. The SMB server component uses TCP port 445. SMB originally operated on NetBIOS over IEEE 802.2 — NetBIOS Frames or NBF — and over IPX/SPX, and later on NetBIOS over TCP/IP (NetBT), but Microsoft has since deprecated these protocols. On NetBT, the server component uses three TCP or UDP ports: 137 (NETBIOS Name Service), 138 (NETBIOS Datagram Service), and 139 (NETBIOS Session Service).

In Microsoft Windows, two vaguely named Windows services implement SMB. The «Server» service (ID: LanmanServer) is in charge of serving shared resources. The «Workstation» service (ID: LanmanWorkstation) maintains the computer name and helps access shared resources on other computers.[3] SMB uses the Kerberos protocol to authenticate users against Active Directory on Windows domain networks. On simpler, peer-to-peer networks, SMB uses the NTLM protocol.

Windows NT 4.0 SP3 and later can digitally sign SMB messages to prevent some man-in-the-middle attacks.[7][8][9] SMB signing may be configured individually for incoming SMB connections (by the «LanmanServer» service) and outgoing SMB connections (by the «LanmanWorkstation» service). The default setting for Windows domain controllers running Windows Server 2003 and later is to not allow unsigned incoming connections.[10] As such, earlier versions of Windows that do not support SMB signing from the get-go (including Windows 9x) cannot connect to a Windows Server 2003 domain controller.[8]

SMB supports opportunistic locking (see below) on files in order to improve performance. Opportunistic locking support has changed with each Windows Server release.

Opportunistic locking[edit]

In the SMB protocol, opportunistic locking is a mechanism designed to improve performance by controlling caching of network files by the client.[11] Unlike traditional locks, opportunistic lock (OpLocks) are not strictly file locking or used to provide mutual exclusion.

There are four types of opportunistic locks.

Batch Locks
Batch OpLocks were created originally to support a particular behavior of DOS batch file execution operation in which the file is opened and closed many times in a short period, which is a performance problem. To solve this, a client may ask for an OpLock of type «batch». In this case, the client delays sending the close request and if a subsequent open request is given, the two requests cancel each other.[12]
Level-1 OpLocks / Exclusive Locks
When an application opens in «shared mode» a file hosted on an SMB server which is not opened by any other process (or other clients) the client receives an exclusive OpLock from the server. This means that the client may now assume that it is the only process with access to this particular file, and the client may now cache all changes to the file before committing it to the server. This is a performance improvement, since fewer round-trips are required in order to read and write to the file. If another client/process tries to open the same file, the server sends a message to the client (called a break or revocation) which invalidates the exclusive lock previously given to the client. The client then flushes all changes to the file.
Level-2 OpLocks
If an exclusive OpLock is held by a client and a locked file is opened by a third party, the client has to relinquish its exclusive OpLock to allow the other client’s write/read access. A client may then receive a «Level 2 OpLock» from the server. A Level 2 OpLock allows the caching of read requests but excludes write caching.
Filter OpLocks
Added in Windows NT 4.0, Filter Oplocks are similar to Level 2 OpLocks but prevent sharing-mode violations between file open and lock reception. Microsoft advises use of Filter OpLocks only where it is important to allow multiple readers and Level 2 OpLocks in other circumstances. Clients holding an OpLock do not really hold a lock on the file, instead they are notified via a break when another client wants to access the file in a way inconsistent with their lock. The other client’s request is held up while the break is being processed.
Breaks
In contrast with the SMB protocol’s «standard» behavior, a break request may be sent from server to client. It informs the client that an OpLock is no longer valid. This happens, for example, when another client wishes to open a file in a way that invalidates the OpLock. The first client is then sent an OpLock break and required to send all its local changes (in case of batch or exclusive OpLocks), if any, and acknowledge the OpLock break. Upon this acknowledgment the server can reply to the second client in a consistent manner.

Performance[edit]

The use of the SMB protocol has often correlated with a significant increase in broadcast traffic on a network. However the SMB itself does not use broadcasts—the broadcast problems commonly associated with SMB actually originate with the NetBIOS service location protocol.[clarification needed] By default, a Microsoft Windows NT 4.0 server used NetBIOS to advertise and locate services. NetBIOS functions by broadcasting services available on a particular host at regular intervals. While this usually makes for an acceptable default in a network with a smaller number of hosts, increased broadcast traffic can cause problems as the number of hosts on the network increases. The implementation of name resolution infrastructure in the form of Windows Internet Naming Service (WINS) or Domain Name System (DNS) resolves this problem. WINS was a proprietary implementation used with Windows NT 4.0 networks, but brought about its own issues and complexities in the design and maintenance of a Microsoft network.

Since the release of Windows 2000, the use of WINS for name resolution has been deprecated by Microsoft, with hierarchical Dynamic DNS now configured as the default name resolution protocol for all Windows operating systems. Resolution of (short) NetBIOS names by DNS requires that a DNS client expand short names, usually by appending a connection-specific DNS suffix to its DNS lookup queries. WINS can still be configured on clients as a secondary name resolution protocol for interoperability with legacy Windows environments and applications. Further, Microsoft DNS servers can forward name resolution requests to legacy WINS servers in order to support name resolution integration with legacy (pre-Windows 2000) environments that do not support DNS.

Network designers have found that latency has a significant impact on the performance of the SMB 1.0 protocol, that it performs more poorly than other protocols like FTP. Monitoring reveals a high degree of «chattiness» and a disregard of network latency between hosts.[13] For example, a VPN connection over the Internet will often introduce network latency. Microsoft has explained that performance issues come about primarily because SMB 1.0 is a block-level rather than a streaming protocol, that was originally designed for small LANs; it has a block size that is limited to 64K, SMB signing creates an additional overhead and the TCP window size is not optimized for WAN links.[14] Solutions to this problem include the updated SMB 2.0 protocol,[15] Offline Files, TCP window scaling and WAN optimization devices from various network vendors that cache and optimize SMB 1.0[16] and 2.0.[17]

History[edit]

SMB 1.0[edit]

Barry Feigenbaum originally designed SMB at IBM in early 1983 with the aim of turning DOS INT 21h local file access into a networked file system.[2] Microsoft made considerable modifications to the most commonly used version and implemented the SMB protocol in the LAN Manager operating system it had started developing for OS/2 with 3Com around 1990, and continued to add features to the protocol in Windows for Workgroups (c. 1992) and in later versions of Windows. LAN Manager authentication was implemented based on the original legacy SMB specification’s requirement to use IBM «LAN Manager» passwords, but implemented DES in a flawed manner that allowed passwords to be cracked.[18] Later, Kerberos authentication was also added. The Windows domain logon protocols initially used 40-bit encryption outside of the United States, because of export restrictions on stronger 128-bit encryption[19] (subsequently lifted in 1996 when President Bill Clinton signed Executive Order 13026[20]).

SMB 1.0 (or SMB1) was originally designed to run on NetBIOS Frames (NetBIOS over IEEE 802.2). Since then, it has been adapted to NetBIOS over IPX/SPX (NBX), and NetBIOS over TCP/IP (NetBT). Also, since Windows 2000, SMB runs on TCP using TCP port 445, a feature known as «direct host SMB».[21] There is still a thin layer (similar to the Session Message packet of NetBT’s Session Service) between SMB and TCP.[21] Windows Server 2003, and legacy NAS devices use SMB1 natively.

SMB1 is an extremely chatty protocol, which is not such an issue on a local area network (LAN) with low latency. It becomes very slow on wide area networks (WAN) as the back and forth handshake of the protocol magnifies the inherent high latency of such a network. Later versions of the protocol reduced the high number of handshake exchanges. One approach to mitigating the inefficiencies in the protocol is to use WAN optimization products such as those provided by Riverbed, Silver Peak, or Cisco. A better approach is to upgrade to a later version of SMB. This includes upgrading both NAS devices as well as Windows Server 2003. The most effective method to identify SMB1 traffic is with a network analyzer tool, such as Wireshark. Microsoft also provides an auditing tool in Windows Server 2016 to track down devices that use SMB1.[22]

Microsoft has marked SMB1 as deprecated in June 2013.[23] Windows Server 2016 and Windows 10 version 1709 do not have SMB1 installed by default.[24]

CIFS[edit]

In 1996, when Sun Microsystems announced WebNFS,[25] Microsoft launched an initiative to rename SMB to Common Internet File System (CIFS)[2] and added more features, including support for symbolic links, hard links, larger file sizes, and an initial attempt at supporting direct connections over TCP port 445 without requiring NetBIOS as a transport (a largely experimental effort that required further refinement). Microsoft submitted some partial specifications as Internet Drafts to the IETF.[6] These submissions have since expired.

SMB 2.0[edit]

Microsoft introduced a new version of the protocol (SMB 2.0 or SMB2) in 2006 with Windows Vista and Windows Server 2008.[26] Although the protocol is proprietary, its specification has been published to allow other systems to interoperate with Microsoft operating systems that use the new protocol.[27]

SMB2 reduces the ‘chattiness’ of the SMB 1.0 protocol by reducing the number of commands and subcommands from over a hundred to just nineteen.[13] It has mechanisms for pipelining, that is, sending additional requests before the response to a previous request arrives, thereby improving performance over high-latency links. It adds the ability to compound multiple actions into a single request, which significantly reduces the number of round-trips the client needs to make to the server, improving performance as a result.[13] SMB1 also has a compounding mechanism—known as AndX—to compound multiple actions, but Microsoft clients rarely use AndX.[citation needed] It also introduces the notion of «durable file handles»: these allow a connection to an SMB server to survive brief network outages, as are typical in a wireless network, without having to incur the overhead of re-negotiating a new session.

SMB2 includes support for symbolic links. Other improvements include caching of file properties, improved message signing with HMAC SHA-256 hashing algorithm and better scalability by increasing the number of users, shares and open files per server among others.[13] The SMB1 protocol uses 16-bit data sizes, which amongst other things, limits the maximum block size to 64K. SMB2 uses 32- or 64-bit wide storage fields, and 128 bits in the case of file-handles, thereby removing previous constraints on block sizes, which improves performance with large file transfers over fast networks.[13]

Windows Vista/Server 2008 and later operating systems use SMB2 when communicating with other machines also capable of using SMB2. SMB1 continues in use for connections with older versions of Windows, as well various vendors’ NAS solutions. Samba 3.5 also includes experimental support for SMB2.[28] Samba 3.6 fully supports SMB2, except the modification of user quotas using the Windows quota management tools.[29]

When SMB2 was introduced it brought a number of benefits over SMB1 for third party implementers of SMB protocols. SMB1, originally designed by IBM, was reverse engineered, and later became part of a wide variety of non-Windows operating systems such as Xenix, OS/2 and VMS (Pathworks). X/Open standardized it partially; Microsoft had submitted Internet-Drafts describing SMB2 to the IETF, partly in response to formal IETF standardization of version 4 of the Network File System in December 2000 as IETF RFC 3010.[30]; however, those SMB-related Internet-Drafts expired without achieving any IETF standards-track approval or any other IETF endorsement. (See http://ubiqx.org/cifs/Intro.html for historical detail.) SMB2 is also a relatively clean break with the past. Microsoft’s SMB1 code has to work with a large variety of SMB clients and servers. SMB1 features many versions of information for commands (selecting what structure to return for a particular request) because features such as Unicode support were retro-fitted at a later date. SMB2 involves significantly reduced compatibility-testing for implementers of the protocol. SMB2 code has considerably less complexity since far less variability exists (for example, non-Unicode code paths become redundant as SMB2 requires Unicode support).

Apple migrated to SMB2 (from their own Apple Filing Protocol, now legacy) starting with OS X 10.9 «Mavericks».[31] This transition was fraught with compatibility problems though.[32][33] Non-default support for SMB2 appeared in fact in OS X 10.7, when Apple abandoned Samba in favor of its own SMB implementation called SMBX.[31] Apple switched to its own SMBX implementation after Samba adopted GPLv3.[34][35] MacOS also has supported the IETF Network File System (NFS) for many years (and continues to do so as of 2021).

The Linux kernel’s CIFS client file system has SMB2 support since version 3.7.[36]

SMB 2.1[edit]

SMB 2.1, introduced with Windows 7 and Server 2008 R2, introduced minor performance enhancements with a new opportunistic locking mechanism.[37]

SMB 3.0[edit]

SMB 3.0 (previously named SMB 2.2)[38] was introduced with Windows 8[38] and Windows Server 2012.[38] It brought several significant changes that are intended to add functionality and improve SMB2 performance,[39] notably in virtualized data centers:

  • the SMB Direct Protocol (SMB over remote direct memory access [RDMA])
  • SMB Multichannel (multiple connections per SMB session),[40][41]
  • SMB Transparent Failover[42][43]

It also introduces several security enhancements, such as end-to-end encryption and a new AES based signing algorithm.[44][45]

SMB 3.0.2[edit]

SMB 3.0.2 (known as 3.02 at the time) was introduced with Windows 8.1 and Windows Server 2012 R2;[46][47] in those and later releases, the earlier SMB version 1 can be optionally disabled to increase security.[48][49]

SMB 3.1.1[edit]

SMB 3.1.1 was introduced with Windows 10 and Windows Server 2016.[50] This version supports AES-128 GCM encryption in addition to AES-128 CCM encryption added in SMB3, and implements pre-authentication integrity check using SHA-512 hash. SMB 3.1.1 also makes secure negotiation mandatory when connecting to clients using SMB 2.x and higher.[citation needed]

Specifications[edit]

The specifications for the SMB are proprietary and were initially closed, thereby forcing other vendors and projects to reverse-engineer the protocol to interoperate with it. The SMB 1.0 protocol was eventually published some time after it was reverse engineered, whereas the SMB 2.0 protocol was made available from Microsoft’s Open Specifications Developer Center from the outset.[51]

Third-party implementations[edit]

Samba[edit]

This section needs to be updated. Please help update this article to reflect recent events or newly available information. (April 2016)

In 1991, Andrew Tridgell started the development of Samba, a free-software re-implementation (using reverse engineering) of the SMB/CIFS networking protocol for Unix-like systems, initially to implement an SMB server to allow PC clients running the DEC Pathworks client to access files on SunOS machines.[2][52] Because of the importance of the SMB protocol in interacting with the widespread Microsoft Windows platform, Samba became a popular free software implementation of a compatible SMB client and server to allow non-Windows operating systems, such as Unix-like operating systems, to interoperate with Windows.

As of version 3 (2003), Samba provides file and print services for Microsoft Windows clients and can integrate with a Windows NT 4.0 server domain, either as a Primary Domain Controller (PDC) or as a domain member. Samba4 installations can act as an Active Directory domain controller or member server, at Windows 2008 domain and forest functional levels.[53]

Package managers in Linux distributions can search for the cifs-utils package. The package is from the Samba maintainers.

Netsmb[edit]

NSMB (Netsmb and SMBFS) is a family of in-kernel SMB client and server[54] implementations in BSD operating systems. It was first contributed to FreeBSD 4.4 by Boris Popov, and is now found in a wide range of other BSD systems including NetBSD and macOS.[55] The implementations have diverged significantly ever since.[56]

The macOS version of NSMB is notable for its now-common scheme of representing symlinks. This «Minshall-French» format shows symlinks as textual files with a .symlink extension and a Xsymn magic number, always 1067 bytes long. This format is also used for storing symlinks on naive SMB servers or unsupported filesystems. Samba supports this format with an mfsymlink option.[57] Docker on Windows also seems to use it.[citation needed]

NQ[edit]

NQ is a family of portable SMB client and server implementations developed by Visuality Systems, an Israel-based company established in 1998 by Sam Widerman, formerly the CEO of Siemens Data Communications. The NQ family comprises an embedded SMB stack (written in C), a Pure Java SMB Client, and a storage SMB Server implementation. All solutions support the latest SMB 3.1.1 dialect. NQ for Linux, NQ for WinCE, iOS, Android, VxWorks and other real-time operating systems are all supported by the configurable NQ solution.

MoSMB[edit]

MoSMB is a proprietary SMB implementation for Linux and other Unix-like systems, developed by Ryussi Technologies. It supports only SMB 2.x and SMB 3.x.[58]

[edit]

Fusion File Share by Tuxera is a proprietary SMB server implementation developed by Tuxera that can be run either in kernel or user space.[59] It supports SMB 3.1.1 and all previous versions, additionally advanced SMB features like continuous availability (persistent handles) scale-out, RDMA (SMB Direct), SMB multichannel, transparent compression, shadow copy.

Likewise[edit]

Likewise developed a CIFS/SMB implementation (versions 1.0, 2.0, 2.1 and NFS 3.0) in 2009 that provided a multiprotocol, identity-aware platform for network access to files used in OEM storage products built on Linux/Unix based devices. The platform could be used for traditional NAS, Cloud Gateway, and Cloud Caching devices for providing secure access to files across a network. Likewise was purchased by EMC Isilon in 2012.

CIFSD[edit]

CIFSD is an open source in-kernel CIFS/SMB server implementation for the Linux kernel. It has the following advantages over user-space implementations: it provides better performance, and it makes it easier to implement some features such as SMB Direct. It supports SMB 3.1.1 and previous versions.

Security[edit]

Over the years, there have been many security vulnerabilities in Microsoft’s implementation of the protocol or components on which it directly relies.[60][61] Other vendors’ security vulnerabilities lie primarily in a lack of support for newer authentication protocols like NTLMv2 and Kerberos in favor of protocols like NTLMv1, LanMan, or plaintext passwords. Real-time attack tracking[62] shows that SMB is one of the primary attack vectors for intrusion attempts,[63] for example the 2014 Sony Pictures attack,[64] and the WannaCry ransomware attack of 2017.[65] In 2020, two SMB high-severity vulnerabilities were disclosed and dubbed as SMBGhost (CVE-2020-0796) and SMBleed (CVE-2020-1206), which when chained together can provide RCE (Remote Code Execution) privilege to the attacker.[66]

See also[edit]

  • List of products that support SMB
  • Administrative share
  • Shared file access
  • AppleTalk
  • Network File System (protocol)
  • Remote File System
  • WebDAV
  • Uniform Naming Convention
  • Network Neighborhood

References[edit]

  1. ^ «Microsoft SMB Protocol and CIFS Protocol Overview». Microsoft. October 22, 2009. Archived from the original on August 2, 2016. Retrieved April 10, 2019.
  2. ^ a b c d Tridgell, Andrew. «Myths About Samba». Archived from the original on October 20, 2017. Retrieved January 3, 2016.
  3. ^ a b «Lan Manager Networking Concepts». Support. Microsoft. Archived from the original on December 30, 2012. Retrieved September 18, 2014.
  4. ^ a b c «Common Internet File System». Windows 2000 Web and Application Services Technical Overview. Microsoft. 18 July 2012 – via Microsoft Docs.
  5. ^ Coulter, David; Satran, Michael; Batchelor, Drew (8 January 2021). «Microsoft SMB Protocol and CIFS Protocol Overview». Windows App Development. Microsoft – via Microsoft Docs.
  6. ^ a b See:
    • Heizer, I.; Leach, P.; Perry, D. (June 13, 1996). «Common Internet File System Protocol (CIFS/1.0)». Archived from the original on August 8, 2019.
    • Leach, Paul J.; Naik, Dilip C. (January 3, 1997). «CIFS Logon and Pass Through Authentication».
    • Leach, Paul J.; Naik, Dilip C. (January 10, 1997). «CIFS/E Browser Protocol».
    • Leach, Paul J.; Naik, Dilip C. (January 31, 1997). «CIFS Printing Specification».
    • Leach, Paul J.; Naik, Dilip C. (February 26, 1997). «CIFS Remote Administration Protocol».
    • Leach, Paul J.; Naik, Dilip C. (December 19, 1997). «A Common Internet File System (CIFS/1.0) Protocol».

  7. ^ «Overview of Server Message Block signing». Windows Server troubleshooting. Microsoft. 24 November 2021 – via Microsoft Docs.
  8. ^ a b Johansson, Jesper M. (20 May 2005). «How to Shoot Yourself in the Foot with Security, Part 1». Security Guidance. Microsoft – via Microsoft Docs. This article addresses […] Server Message Block (SMB) message signing.
  9. ^ Barreto, Jose (1 December 2010). «The Basics of SMB Signing (covering both SMB1 and SMB2)». Jose Barreto’s Blog Archive. Microsoft. Archived from the original on 2 December 2012 – via Microsoft Docs. This security mechanism in the SMB protocol helps avoid issues like tampering of packets and «man in the middle» attacks. […] SMB signing is available in all currently supported versions of Windows, but it’s only enabled by default on Domain Controllers. This is recommended for Domain Controllers because SMB is the protocol used by clients to download Group Policy information. SMB signing provides a way to ensure that the client is receiving genuine Group Policy.
  10. ^ «MSKB887429: Overview of Server Message Block signing». Microsoft. November 30, 2007. Archived from the original on November 20, 2010. Retrieved October 24, 2012. By default, SMB signing is required for incoming SMB sessions on Windows Server 2003-based domain controllers.
  11. ^ «Opportunistic Locks». Microsoft. May 31, 2018. Retrieved August 19, 2021.
  12. ^ «All About Opportunistic Locking». Sphere IT. 2014. Retrieved August 19, 2021.
  13. ^ a b c d e Jose Barreto (December 9, 2008). «SMB2, a Complete Redesign of the Main Remote File Protocol for Windows». Microsoft Server & Management Blogs. Archived from the original on January 12, 2013. Retrieved November 1, 2009.
  14. ^ Neil Carpenter (October 26, 2004). «SMB/CIFS Performance Over WAN Links». Microsoft. Archived from the original on February 13, 2020. Retrieved February 13, 2020.
  15. ^ «What’s New in SMB in Windows Server». Microsoft. Archived from the original on February 11, 2017. Retrieved 6 February 2017.
  16. ^ Mark Rabinovich, Igor Gokhman. «CIFS Acceleration Techniques» (PDF). Storage Developer Conference, SNIA, Santa Clara 2009. Retrieved July 6, 2020.
  17. ^ Mark Rabinovich. «Accelerating SMB2» (PDF). Storage Developer Conference, SNIA, Santa Clara 2011. Retrieved July 6, 2020.
  18. ^ Christopher Hertel (1999). «SMB: The Server Message Block Protocol». Archived from the original on March 10, 2010. Retrieved November 1, 2009.
  19. ^ «Description of Microsoft Windows Encryption Pack 1». Microsoft. November 1, 2006. Archived from the original on October 2, 2009. Retrieved November 1, 2009.
  20. ^ «US Executive Order 13026» (PDF). United States Government. 1996. Archived (PDF) from the original on October 10, 2009. Retrieved November 1, 2009.
  21. ^ a b «Direct hosting of SMB over TCP/IP». Microsoft. October 11, 2007. Archived from the original on March 26, 2011. Retrieved November 1, 2009.
  22. ^ Kyttle, Ralph (13 May 2017). «SMB1 – Audit Active Usage using Message Analyzer». Microsoft TechNet. Microsoft. Archived from the original on March 28, 2019. Retrieved 28 March 2019.
  23. ^ «The Deprecation of SMB1 – You should be planning to get rid of this old SMB dialect – Jose Barreto’s Blog». blogs.technet.microsoft.com. Archived from the original on May 21, 2017. Retrieved 2019-10-09.
  24. ^ «SMBv1 is not installed by default in Windows 10 Fall Creators Update and Windows Server, version 1709 and later versions». support.microsoft.com. Archived from the original on October 10, 2019. Retrieved 2019-10-09.
  25. ^ «WebNFS — Technical Overview». Archived from the original on 2007-05-18.
  26. ^ Navjot Virk and Prashanth Prahalad (March 10, 2006). «What’s new in SMB in Windows Vista». Chk Your Dsks. Microsoft. Archived from the original on May 5, 2006. Retrieved May 1, 2006.
  27. ^ Server Message Block (SMB) Protocol Versions 2 and 3. Windows Protocols. Open Specifications (Technical report). Microsoft Docs. Microsoft. MS-SMB2. Retrieved 2020-11-29.
  28. ^ «Samba 3.5.0 Available for Download». Archived from the original on July 24, 2011. Retrieved July 8, 2011.
  29. ^ «Samba 3.6.0 Available for Download». Archived from the original on September 24, 2011. Retrieved August 10, 2011.
  30. ^ «http://www.ietf.org/rfc/rfc3010.txt»
  31. ^ a b Eran, Daniel (June 11, 2013). «Apple shifts from AFP file sharing to SMB2 in OS X 10.9 Mavericks». Appleinsider.com. Archived from the original on February 12, 2017. Retrieved January 12, 2014.
  32. ^ Vaughan, Steven J. (October 28, 2013). «Mavericks’ SMB2 problem and fixes». ZDNet. Archived from the original on January 5, 2014. Retrieved January 12, 2014.
  33. ^ MacParc. «10.9: Switch the SMB stack to use SMB1 as default». Mac OS X Hints. macworld.com. Archived from the original on January 12, 2014. Retrieved January 12, 2014.
  34. ^ Topher Kessler (March 23, 2011). «Say adios to Samba in OS X». CNET. Archived from the original on January 15, 2014. Retrieved January 12, 2014.
  35. ^ Thom Holwerda (March 26, 2011). «Apple Ditches SAMBA in Favour of Homegrown Replacement». Archived from the original on November 2, 2013. Retrieved January 12, 2014.
  36. ^ «Linux 3.7 — Linux Kernel Newbies». Archived from the original on September 11, 2016. Retrieved September 4, 2016.
  37. ^ «Implementing an End-User Data Centralization Solution». Microsoft. October 21, 2009. pp. 10–11. Archived from the original on September 6, 2010. Retrieved November 2, 2009.
  38. ^ a b c Jeffrey Snover (April 19, 2012). «SMB 2.2 is now SMB 3.0». Windows Server Blog. Retrieved July 6, 2020.
  39. ^ Chelsio Communications. «40G SMB Direct». Archived from the original on September 7, 2013. Retrieved June 18, 2013.
  40. ^ Jose Barreto (October 19, 2012). «SNIA Tutorial on the SMB Protocol» (PDF). Storage Networking Industry Association. Archived (PDF) from the original on June 3, 2013. Retrieved November 28, 2012.
  41. ^ Thomas Pfenning. «The Future of File Protocols: SMB 2.2 in the Datacenter» (PDF). Archived from the original (PDF) on 2012-07-20.
  42. ^ Joergensen, Claus (2012-06-07). «SMB Transparent Failover – making file shares continuously available». Microsoft TechNet. Archived from the original on January 11, 2019. Retrieved February 1, 2017.
  43. ^ Savill, John (2012-08-21). «New Ways to Enable High Availability for File Shares». Windows IT Pro. Archived from the original on November 27, 2016. Retrieved February 1, 2017.
  44. ^ «SMB Security Enhancements». Microsoft Technet. January 15, 2014. Archived from the original on October 9, 2014. Retrieved June 18, 2014.
  45. ^ Jose Barreto (May 5, 2013). «Updated Links on Windows Server 2012 File Server and SMB 3.0». Microsoft TechNet Server & Management Blogs. Archived from the original on August 3, 2016. Retrieved August 14, 2016.
  46. ^ Jose Barreto (July 7, 2014). «Updated Links on Windows Server 2012 R2 File Server and SMB 3.02». Microsoft TechNet Server & Management Blogs. Archived from the original on August 26, 2016. Retrieved August 14, 2016.
  47. ^ Jose Barreto (December 12, 2013). «Storage Developer Conference – SDC 2013 slides now publicly available. Here are the links to Microsoft slides…». Microsoft TechNet Server & Management Blogs. Archived from the original on August 26, 2016. Retrieved August 14, 2016.
  48. ^ Eric Geier (December 5, 2013). «WindowsNetworking.com: Improvements in the SMB 3.0 and 3.02 Protocol Updates». WindowsNetworking.com. Archived from the original on April 9, 2015. Retrieved April 6, 2015.
  49. ^ Jose Barreto (April 30, 2015). «SMB3 Networking Links for Windows Server 2012 R2». Microsoft TechNet Server & Management Blogs. Archived from the original on August 26, 2016. Retrieved August 14, 2016.
  50. ^ Jose Barreto (May 5, 2015). «What’s new in SMB 3.1.1 in the Windows Server 2016 Technical Preview 2». Microsoft TechNet Server & Management Blogs. Archived from the original on October 8, 2016. Retrieved August 14, 2016.
  51. ^ «Windows Protocols». Archived from the original on September 26, 2009. Retrieved October 13, 2009.
  52. ^ Tridgell, Andrew (June 27, 1997). «A bit of history and a bit of fun». Archived from the original on July 17, 2011. Retrieved July 26, 2011.
  53. ^ «Samba 4 functional levels». February 25, 2011. Archived from the original on July 29, 2014. Retrieved January 12, 2014.
  54. ^ «SMB (Server Message Block): definitions, tasks, and applications». IONOS Digitalguide. Retrieved 2022-04-27.
  55. ^ «netsmb(4)». NetBSD 8.0 manual pages. Retrieved 5 January 2020.
  56. ^ nsmb.conf(5) – FreeBSD File Formats Manual.
  57. ^ «UNIX Extensions». SambaWiki. Archived from the original on June 12, 2020. Retrieved March 15, 2020.
  58. ^ Dr. Sunu Engineer. «Building a Highly Scalable and Performant SMB Protocol Server» (PDF). Archived (PDF) from the original on September 27, 2016. Retrieved September 25, 2016.
  59. ^ «Microsoft and Tuxera strengthen partnership through Tuxera SMB Server». Microsoft. Microsoft News Center. 14 September 2016. Archived from the original on November 17, 2016. Retrieved 6 February 2017.
  60. ^ «MS02-070: Flaw in SMB Signing May Permit Group Policy to Be Modified». Microsoft. December 1, 2007. Archived from the original on October 8, 2009. Retrieved November 1, 2009.
  61. ^ «MS09-001: Vulnerabilities in SMB could allow remote code execution». Microsoft. January 13, 2009. Archived from the original on October 5, 2009. Retrieved November 1, 2009.,
  62. ^ «Sicherheitstacho.eu». Deutsche Telekom. March 7, 2013. Archived from the original on March 8, 2013. Retrieved March 7, 2013.
  63. ^ «Alert (TA14-353A) Targeted Destructive Malware». US-CERT. Archived from the original on December 20, 2014. Retrieved December 20, 2014.
  64. ^ «Sony Hackers Used Server Message Block (SMB) Worm Tool». Archived from the original on December 20, 2014. Retrieved December 20, 2014.
  65. ^ «WannaCry Ransomware Attack Hits Victims With Microsoft SMB Exploit». eWeek. Retrieved 13 May 2017.
  66. ^ «SMBleedingGhost Writeup: Chaining SMBleed (CVE-2020-1206) with SMBGhost». ZecOps Blog. 2020-06-09. Retrieved 2020-11-19.

Further reading[edit]

SMB specifications[edit]

  • «[MS-CIFS]: Common Internet File System (CIFS) Protocol». Open Specifications. Microsoft. 30 October 2020.
    • Specifies the Common Internet File System (CIFS) Protocol, a cross-platform, transport-independent protocol that provides a mechanism for client systems to use file and print services made available by server systems over a network
  • «[MS-SMB]: Server Message Block (SMB) Protocol». Open Specifications. Microsoft. 25 June 2021.
    • Specifies the Server Message Block (SMB) Protocol, which defines extensions to the existing Common Internet File System (CIFS) specification that have been implemented by Microsoft since the publication of the CIFS specification.
  • «[MS-SMB2]: Server Message Block (SMB) Protocol Versions 2 and 3». Open Specifications. Microsoft. 14 December 2021.
    • Specifies the Server Message Block (SMB) Protocol Versions 2 and 3, which support the sharing of file and print resources between machines and extend the concepts from the Server Message Block Protocol.
  • «[MS-SMBD]: SMB2 Remote Direct Memory Access (RDMA) Transport Protocol». Open Specifications. Microsoft. 25 June 2021.
    • Specifies the SMB2 Remote Direct Memory Access (RDMA) Transport Protocol, a wrapper for the existing SMB2 protocol that allows SMB2 packets to be delivered over RDMA-capable transports such as iWARP or Infiniband while utilizing the direct data placement (DDP) capabilities of these transports. Benefits include reduced CPU overhead, lower latency, and improved throughput.

Miscellaneous[edit]

  • Hertel, Christopher (2003). Implementing CIFS – The Common Internet FileSystem. Prentice Hall. ISBN 0-13-047116-X. (Text licensed under the Open Publication License, v1.0 or later, available from the link above.)
  • Steven M. French, A New Network File System is Born: Comparison of SMB2, CIFS, and NFS, Linux Symposium 2007
  • Steve French, The Future of File Protocols: SMB2 Meets Linux, Linux Collaboration Summit 2012

External links[edit]

  • DFS section in «Windows Developer» documentation
  • the NT LM 0.12 dialect of SMB. In Microsoft Word format

Server Message Block (SMB) is a communication protocol[1] originally developed in 1983 by Barry A. Feigenbaum at IBM[2] and intended to provide shared access to files and printers across nodes on a network of systems running IBM’s OS/2. It also provides an authenticated inter-process communication (IPC) mechanism. In 1987, Microsoft and 3Com implemented SMB in LAN Manager for OS/2, at which time SMB used the NetBIOS service atop the NetBIOS Frames protocol as its underlying transport. Later, Microsoft implemented SMB in Windows NT 3.1 and has been updating it ever since, adapting it to work with newer underlying transports: TCP/IP and NetBT. SMB implementation consists of two vaguely named Windows services: «Server» (ID: LanmanServer) and «Workstation» (ID: LanmanWorkstation).[3] It uses NTLM or Kerberos protocols for user authentication.

In 1996, Microsoft published a version of SMB 1.0[4] with minor modifications under the Common Internet File System (CIFS ) moniker. CIFS was compatible with even the earliest incarnation of SMB, including LAN Manager’s.[4] It supports symbolic links, hard links, and larger file size, but none of the features of SMB 2.0 and later.[4][5] Microsoft’s proposal, however, remained an Internet Draft and never achieved standard status.[6] Microsoft has since discontinued use of the CIFS moniker but continues developing SMB and making subsequent specifications publicly available.

Features[edit]

Server Message Block (SMB) enables file sharing, printer sharing, network browsing, and inter-process communication (through named pipes) over a computer network. SMB serves as the basis for Microsoft’s Distributed File System implementation.

SMB relies on the TCP and IP protocols for transport. This combination potentially allows file sharing over complex, interconnected networks, including the public Internet. The SMB server component uses TCP port 445. SMB originally operated on NetBIOS over IEEE 802.2 — NetBIOS Frames or NBF — and over IPX/SPX, and later on NetBIOS over TCP/IP (NetBT), but Microsoft has since deprecated these protocols. On NetBT, the server component uses three TCP or UDP ports: 137 (NETBIOS Name Service), 138 (NETBIOS Datagram Service), and 139 (NETBIOS Session Service).

In Microsoft Windows, two vaguely named Windows services implement SMB. The «Server» service (ID: LanmanServer) is in charge of serving shared resources. The «Workstation» service (ID: LanmanWorkstation) maintains the computer name and helps access shared resources on other computers.[3] SMB uses the Kerberos protocol to authenticate users against Active Directory on Windows domain networks. On simpler, peer-to-peer networks, SMB uses the NTLM protocol.

Windows NT 4.0 SP3 and later can digitally sign SMB messages to prevent some man-in-the-middle attacks.[7][8][9] SMB signing may be configured individually for incoming SMB connections (by the «LanmanServer» service) and outgoing SMB connections (by the «LanmanWorkstation» service). The default setting for Windows domain controllers running Windows Server 2003 and later is to not allow unsigned incoming connections.[10] As such, earlier versions of Windows that do not support SMB signing from the get-go (including Windows 9x) cannot connect to a Windows Server 2003 domain controller.[8]

SMB supports opportunistic locking (see below) on files in order to improve performance. Opportunistic locking support has changed with each Windows Server release.

Opportunistic locking[edit]

In the SMB protocol, opportunistic locking is a mechanism designed to improve performance by controlling caching of network files by the client.[11] Unlike traditional locks, opportunistic lock (OpLocks) are not strictly file locking or used to provide mutual exclusion.

There are four types of opportunistic locks.

Batch Locks
Batch OpLocks were created originally to support a particular behavior of DOS batch file execution operation in which the file is opened and closed many times in a short period, which is a performance problem. To solve this, a client may ask for an OpLock of type «batch». In this case, the client delays sending the close request and if a subsequent open request is given, the two requests cancel each other.[12]
Level-1 OpLocks / Exclusive Locks
When an application opens in «shared mode» a file hosted on an SMB server which is not opened by any other process (or other clients) the client receives an exclusive OpLock from the server. This means that the client may now assume that it is the only process with access to this particular file, and the client may now cache all changes to the file before committing it to the server. This is a performance improvement, since fewer round-trips are required in order to read and write to the file. If another client/process tries to open the same file, the server sends a message to the client (called a break or revocation) which invalidates the exclusive lock previously given to the client. The client then flushes all changes to the file.
Level-2 OpLocks
If an exclusive OpLock is held by a client and a locked file is opened by a third party, the client has to relinquish its exclusive OpLock to allow the other client’s write/read access. A client may then receive a «Level 2 OpLock» from the server. A Level 2 OpLock allows the caching of read requests but excludes write caching.
Filter OpLocks
Added in Windows NT 4.0, Filter Oplocks are similar to Level 2 OpLocks but prevent sharing-mode violations between file open and lock reception. Microsoft advises use of Filter OpLocks only where it is important to allow multiple readers and Level 2 OpLocks in other circumstances. Clients holding an OpLock do not really hold a lock on the file, instead they are notified via a break when another client wants to access the file in a way inconsistent with their lock. The other client’s request is held up while the break is being processed.
Breaks
In contrast with the SMB protocol’s «standard» behavior, a break request may be sent from server to client. It informs the client that an OpLock is no longer valid. This happens, for example, when another client wishes to open a file in a way that invalidates the OpLock. The first client is then sent an OpLock break and required to send all its local changes (in case of batch or exclusive OpLocks), if any, and acknowledge the OpLock break. Upon this acknowledgment the server can reply to the second client in a consistent manner.

Performance[edit]

The use of the SMB protocol has often correlated with a significant increase in broadcast traffic on a network. However the SMB itself does not use broadcasts—the broadcast problems commonly associated with SMB actually originate with the NetBIOS service location protocol.[clarification needed] By default, a Microsoft Windows NT 4.0 server used NetBIOS to advertise and locate services. NetBIOS functions by broadcasting services available on a particular host at regular intervals. While this usually makes for an acceptable default in a network with a smaller number of hosts, increased broadcast traffic can cause problems as the number of hosts on the network increases. The implementation of name resolution infrastructure in the form of Windows Internet Naming Service (WINS) or Domain Name System (DNS) resolves this problem. WINS was a proprietary implementation used with Windows NT 4.0 networks, but brought about its own issues and complexities in the design and maintenance of a Microsoft network.

Since the release of Windows 2000, the use of WINS for name resolution has been deprecated by Microsoft, with hierarchical Dynamic DNS now configured as the default name resolution protocol for all Windows operating systems. Resolution of (short) NetBIOS names by DNS requires that a DNS client expand short names, usually by appending a connection-specific DNS suffix to its DNS lookup queries. WINS can still be configured on clients as a secondary name resolution protocol for interoperability with legacy Windows environments and applications. Further, Microsoft DNS servers can forward name resolution requests to legacy WINS servers in order to support name resolution integration with legacy (pre-Windows 2000) environments that do not support DNS.

Network designers have found that latency has a significant impact on the performance of the SMB 1.0 protocol, that it performs more poorly than other protocols like FTP. Monitoring reveals a high degree of «chattiness» and a disregard of network latency between hosts.[13] For example, a VPN connection over the Internet will often introduce network latency. Microsoft has explained that performance issues come about primarily because SMB 1.0 is a block-level rather than a streaming protocol, that was originally designed for small LANs; it has a block size that is limited to 64K, SMB signing creates an additional overhead and the TCP window size is not optimized for WAN links.[14] Solutions to this problem include the updated SMB 2.0 protocol,[15] Offline Files, TCP window scaling and WAN optimization devices from various network vendors that cache and optimize SMB 1.0[16] and 2.0.[17]

History[edit]

SMB 1.0[edit]

Barry Feigenbaum originally designed SMB at IBM in early 1983 with the aim of turning DOS INT 21h local file access into a networked file system.[2] Microsoft made considerable modifications to the most commonly used version and implemented the SMB protocol in the LAN Manager operating system it had started developing for OS/2 with 3Com around 1990, and continued to add features to the protocol in Windows for Workgroups (c. 1992) and in later versions of Windows. LAN Manager authentication was implemented based on the original legacy SMB specification’s requirement to use IBM «LAN Manager» passwords, but implemented DES in a flawed manner that allowed passwords to be cracked.[18] Later, Kerberos authentication was also added. The Windows domain logon protocols initially used 40-bit encryption outside of the United States, because of export restrictions on stronger 128-bit encryption[19] (subsequently lifted in 1996 when President Bill Clinton signed Executive Order 13026[20]).

SMB 1.0 (or SMB1) was originally designed to run on NetBIOS Frames (NetBIOS over IEEE 802.2). Since then, it has been adapted to NetBIOS over IPX/SPX (NBX), and NetBIOS over TCP/IP (NetBT). Also, since Windows 2000, SMB runs on TCP using TCP port 445, a feature known as «direct host SMB».[21] There is still a thin layer (similar to the Session Message packet of NetBT’s Session Service) between SMB and TCP.[21] Windows Server 2003, and legacy NAS devices use SMB1 natively.

SMB1 is an extremely chatty protocol, which is not such an issue on a local area network (LAN) with low latency. It becomes very slow on wide area networks (WAN) as the back and forth handshake of the protocol magnifies the inherent high latency of such a network. Later versions of the protocol reduced the high number of handshake exchanges. One approach to mitigating the inefficiencies in the protocol is to use WAN optimization products such as those provided by Riverbed, Silver Peak, or Cisco. A better approach is to upgrade to a later version of SMB. This includes upgrading both NAS devices as well as Windows Server 2003. The most effective method to identify SMB1 traffic is with a network analyzer tool, such as Wireshark. Microsoft also provides an auditing tool in Windows Server 2016 to track down devices that use SMB1.[22]

Microsoft has marked SMB1 as deprecated in June 2013.[23] Windows Server 2016 and Windows 10 version 1709 do not have SMB1 installed by default.[24]

CIFS[edit]

In 1996, when Sun Microsystems announced WebNFS,[25] Microsoft launched an initiative to rename SMB to Common Internet File System (CIFS)[2] and added more features, including support for symbolic links, hard links, larger file sizes, and an initial attempt at supporting direct connections over TCP port 445 without requiring NetBIOS as a transport (a largely experimental effort that required further refinement). Microsoft submitted some partial specifications as Internet Drafts to the IETF.[6] These submissions have since expired.

SMB 2.0[edit]

Microsoft introduced a new version of the protocol (SMB 2.0 or SMB2) in 2006 with Windows Vista and Windows Server 2008.[26] Although the protocol is proprietary, its specification has been published to allow other systems to interoperate with Microsoft operating systems that use the new protocol.[27]

SMB2 reduces the ‘chattiness’ of the SMB 1.0 protocol by reducing the number of commands and subcommands from over a hundred to just nineteen.[13] It has mechanisms for pipelining, that is, sending additional requests before the response to a previous request arrives, thereby improving performance over high-latency links. It adds the ability to compound multiple actions into a single request, which significantly reduces the number of round-trips the client needs to make to the server, improving performance as a result.[13] SMB1 also has a compounding mechanism—known as AndX—to compound multiple actions, but Microsoft clients rarely use AndX.[citation needed] It also introduces the notion of «durable file handles»: these allow a connection to an SMB server to survive brief network outages, as are typical in a wireless network, without having to incur the overhead of re-negotiating a new session.

SMB2 includes support for symbolic links. Other improvements include caching of file properties, improved message signing with HMAC SHA-256 hashing algorithm and better scalability by increasing the number of users, shares and open files per server among others.[13] The SMB1 protocol uses 16-bit data sizes, which amongst other things, limits the maximum block size to 64K. SMB2 uses 32- or 64-bit wide storage fields, and 128 bits in the case of file-handles, thereby removing previous constraints on block sizes, which improves performance with large file transfers over fast networks.[13]

Windows Vista/Server 2008 and later operating systems use SMB2 when communicating with other machines also capable of using SMB2. SMB1 continues in use for connections with older versions of Windows, as well various vendors’ NAS solutions. Samba 3.5 also includes experimental support for SMB2.[28] Samba 3.6 fully supports SMB2, except the modification of user quotas using the Windows quota management tools.[29]

When SMB2 was introduced it brought a number of benefits over SMB1 for third party implementers of SMB protocols. SMB1, originally designed by IBM, was reverse engineered, and later became part of a wide variety of non-Windows operating systems such as Xenix, OS/2 and VMS (Pathworks). X/Open standardized it partially; Microsoft had submitted Internet-Drafts describing SMB2 to the IETF, partly in response to formal IETF standardization of version 4 of the Network File System in December 2000 as IETF RFC 3010.[30]; however, those SMB-related Internet-Drafts expired without achieving any IETF standards-track approval or any other IETF endorsement. (See http://ubiqx.org/cifs/Intro.html for historical detail.) SMB2 is also a relatively clean break with the past. Microsoft’s SMB1 code has to work with a large variety of SMB clients and servers. SMB1 features many versions of information for commands (selecting what structure to return for a particular request) because features such as Unicode support were retro-fitted at a later date. SMB2 involves significantly reduced compatibility-testing for implementers of the protocol. SMB2 code has considerably less complexity since far less variability exists (for example, non-Unicode code paths become redundant as SMB2 requires Unicode support).

Apple migrated to SMB2 (from their own Apple Filing Protocol, now legacy) starting with OS X 10.9 «Mavericks».[31] This transition was fraught with compatibility problems though.[32][33] Non-default support for SMB2 appeared in fact in OS X 10.7, when Apple abandoned Samba in favor of its own SMB implementation called SMBX.[31] Apple switched to its own SMBX implementation after Samba adopted GPLv3.[34][35] MacOS also has supported the IETF Network File System (NFS) for many years (and continues to do so as of 2021).

The Linux kernel’s CIFS client file system has SMB2 support since version 3.7.[36]

SMB 2.1[edit]

SMB 2.1, introduced with Windows 7 and Server 2008 R2, introduced minor performance enhancements with a new opportunistic locking mechanism.[37]

SMB 3.0[edit]

SMB 3.0 (previously named SMB 2.2)[38] was introduced with Windows 8[38] and Windows Server 2012.[38] It brought several significant changes that are intended to add functionality and improve SMB2 performance,[39] notably in virtualized data centers:

  • the SMB Direct Protocol (SMB over remote direct memory access [RDMA])
  • SMB Multichannel (multiple connections per SMB session),[40][41]
  • SMB Transparent Failover[42][43]

It also introduces several security enhancements, such as end-to-end encryption and a new AES based signing algorithm.[44][45]

SMB 3.0.2[edit]

SMB 3.0.2 (known as 3.02 at the time) was introduced with Windows 8.1 and Windows Server 2012 R2;[46][47] in those and later releases, the earlier SMB version 1 can be optionally disabled to increase security.[48][49]

SMB 3.1.1[edit]

SMB 3.1.1 was introduced with Windows 10 and Windows Server 2016.[50] This version supports AES-128 GCM encryption in addition to AES-128 CCM encryption added in SMB3, and implements pre-authentication integrity check using SHA-512 hash. SMB 3.1.1 also makes secure negotiation mandatory when connecting to clients using SMB 2.x and higher.[citation needed]

Specifications[edit]

The specifications for the SMB are proprietary and were initially closed, thereby forcing other vendors and projects to reverse-engineer the protocol to interoperate with it. The SMB 1.0 protocol was eventually published some time after it was reverse engineered, whereas the SMB 2.0 protocol was made available from Microsoft’s Open Specifications Developer Center from the outset.[51]

Third-party implementations[edit]

Samba[edit]

This section needs to be updated. Please help update this article to reflect recent events or newly available information. (April 2016)

In 1991, Andrew Tridgell started the development of Samba, a free-software re-implementation (using reverse engineering) of the SMB/CIFS networking protocol for Unix-like systems, initially to implement an SMB server to allow PC clients running the DEC Pathworks client to access files on SunOS machines.[2][52] Because of the importance of the SMB protocol in interacting with the widespread Microsoft Windows platform, Samba became a popular free software implementation of a compatible SMB client and server to allow non-Windows operating systems, such as Unix-like operating systems, to interoperate with Windows.

As of version 3 (2003), Samba provides file and print services for Microsoft Windows clients and can integrate with a Windows NT 4.0 server domain, either as a Primary Domain Controller (PDC) or as a domain member. Samba4 installations can act as an Active Directory domain controller or member server, at Windows 2008 domain and forest functional levels.[53]

Package managers in Linux distributions can search for the cifs-utils package. The package is from the Samba maintainers.

Netsmb[edit]

NSMB (Netsmb and SMBFS) is a family of in-kernel SMB client and server[54] implementations in BSD operating systems. It was first contributed to FreeBSD 4.4 by Boris Popov, and is now found in a wide range of other BSD systems including NetBSD and macOS.[55] The implementations have diverged significantly ever since.[56]

The macOS version of NSMB is notable for its now-common scheme of representing symlinks. This «Minshall-French» format shows symlinks as textual files with a .symlink extension and a Xsymn magic number, always 1067 bytes long. This format is also used for storing symlinks on naive SMB servers or unsupported filesystems. Samba supports this format with an mfsymlink option.[57] Docker on Windows also seems to use it.[citation needed]

NQ[edit]

NQ is a family of portable SMB client and server implementations developed by Visuality Systems, an Israel-based company established in 1998 by Sam Widerman, formerly the CEO of Siemens Data Communications. The NQ family comprises an embedded SMB stack (written in C), a Pure Java SMB Client, and a storage SMB Server implementation. All solutions support the latest SMB 3.1.1 dialect. NQ for Linux, NQ for WinCE, iOS, Android, VxWorks and other real-time operating systems are all supported by the configurable NQ solution.

MoSMB[edit]

MoSMB is a proprietary SMB implementation for Linux and other Unix-like systems, developed by Ryussi Technologies. It supports only SMB 2.x and SMB 3.x.[58]

[edit]

Fusion File Share by Tuxera is a proprietary SMB server implementation developed by Tuxera that can be run either in kernel or user space.[59] It supports SMB 3.1.1 and all previous versions, additionally advanced SMB features like continuous availability (persistent handles) scale-out, RDMA (SMB Direct), SMB multichannel, transparent compression, shadow copy.

Likewise[edit]

Likewise developed a CIFS/SMB implementation (versions 1.0, 2.0, 2.1 and NFS 3.0) in 2009 that provided a multiprotocol, identity-aware platform for network access to files used in OEM storage products built on Linux/Unix based devices. The platform could be used for traditional NAS, Cloud Gateway, and Cloud Caching devices for providing secure access to files across a network. Likewise was purchased by EMC Isilon in 2012.

CIFSD[edit]

CIFSD is an open source in-kernel CIFS/SMB server implementation for the Linux kernel. It has the following advantages over user-space implementations: it provides better performance, and it makes it easier to implement some features such as SMB Direct. It supports SMB 3.1.1 and previous versions.

Security[edit]

Over the years, there have been many security vulnerabilities in Microsoft’s implementation of the protocol or components on which it directly relies.[60][61] Other vendors’ security vulnerabilities lie primarily in a lack of support for newer authentication protocols like NTLMv2 and Kerberos in favor of protocols like NTLMv1, LanMan, or plaintext passwords. Real-time attack tracking[62] shows that SMB is one of the primary attack vectors for intrusion attempts,[63] for example the 2014 Sony Pictures attack,[64] and the WannaCry ransomware attack of 2017.[65] In 2020, two SMB high-severity vulnerabilities were disclosed and dubbed as SMBGhost (CVE-2020-0796) and SMBleed (CVE-2020-1206), which when chained together can provide RCE (Remote Code Execution) privilege to the attacker.[66]

See also[edit]

  • List of products that support SMB
  • Administrative share
  • Shared file access
  • AppleTalk
  • Network File System (protocol)
  • Remote File System
  • WebDAV
  • Uniform Naming Convention
  • Network Neighborhood

References[edit]

  1. ^ «Microsoft SMB Protocol and CIFS Protocol Overview». Microsoft. October 22, 2009. Archived from the original on August 2, 2016. Retrieved April 10, 2019.
  2. ^ a b c d Tridgell, Andrew. «Myths About Samba». Archived from the original on October 20, 2017. Retrieved January 3, 2016.
  3. ^ a b «Lan Manager Networking Concepts». Support. Microsoft. Archived from the original on December 30, 2012. Retrieved September 18, 2014.
  4. ^ a b c «Common Internet File System». Windows 2000 Web and Application Services Technical Overview. Microsoft. 18 July 2012 – via Microsoft Docs.
  5. ^ Coulter, David; Satran, Michael; Batchelor, Drew (8 January 2021). «Microsoft SMB Protocol and CIFS Protocol Overview». Windows App Development. Microsoft – via Microsoft Docs.
  6. ^ a b See:
    • Heizer, I.; Leach, P.; Perry, D. (June 13, 1996). «Common Internet File System Protocol (CIFS/1.0)». Archived from the original on August 8, 2019.
    • Leach, Paul J.; Naik, Dilip C. (January 3, 1997). «CIFS Logon and Pass Through Authentication».
    • Leach, Paul J.; Naik, Dilip C. (January 10, 1997). «CIFS/E Browser Protocol».
    • Leach, Paul J.; Naik, Dilip C. (January 31, 1997). «CIFS Printing Specification».
    • Leach, Paul J.; Naik, Dilip C. (February 26, 1997). «CIFS Remote Administration Protocol».
    • Leach, Paul J.; Naik, Dilip C. (December 19, 1997). «A Common Internet File System (CIFS/1.0) Protocol».

  7. ^ «Overview of Server Message Block signing». Windows Server troubleshooting. Microsoft. 24 November 2021 – via Microsoft Docs.
  8. ^ a b Johansson, Jesper M. (20 May 2005). «How to Shoot Yourself in the Foot with Security, Part 1». Security Guidance. Microsoft – via Microsoft Docs. This article addresses […] Server Message Block (SMB) message signing.
  9. ^ Barreto, Jose (1 December 2010). «The Basics of SMB Signing (covering both SMB1 and SMB2)». Jose Barreto’s Blog Archive. Microsoft. Archived from the original on 2 December 2012 – via Microsoft Docs. This security mechanism in the SMB protocol helps avoid issues like tampering of packets and «man in the middle» attacks. […] SMB signing is available in all currently supported versions of Windows, but it’s only enabled by default on Domain Controllers. This is recommended for Domain Controllers because SMB is the protocol used by clients to download Group Policy information. SMB signing provides a way to ensure that the client is receiving genuine Group Policy.
  10. ^ «MSKB887429: Overview of Server Message Block signing». Microsoft. November 30, 2007. Archived from the original on November 20, 2010. Retrieved October 24, 2012. By default, SMB signing is required for incoming SMB sessions on Windows Server 2003-based domain controllers.
  11. ^ «Opportunistic Locks». Microsoft. May 31, 2018. Retrieved August 19, 2021.
  12. ^ «All About Opportunistic Locking». Sphere IT. 2014. Retrieved August 19, 2021.
  13. ^ a b c d e Jose Barreto (December 9, 2008). «SMB2, a Complete Redesign of the Main Remote File Protocol for Windows». Microsoft Server & Management Blogs. Archived from the original on January 12, 2013. Retrieved November 1, 2009.
  14. ^ Neil Carpenter (October 26, 2004). «SMB/CIFS Performance Over WAN Links». Microsoft. Archived from the original on February 13, 2020. Retrieved February 13, 2020.
  15. ^ «What’s New in SMB in Windows Server». Microsoft. Archived from the original on February 11, 2017. Retrieved 6 February 2017.
  16. ^ Mark Rabinovich, Igor Gokhman. «CIFS Acceleration Techniques» (PDF). Storage Developer Conference, SNIA, Santa Clara 2009. Retrieved July 6, 2020.
  17. ^ Mark Rabinovich. «Accelerating SMB2» (PDF). Storage Developer Conference, SNIA, Santa Clara 2011. Retrieved July 6, 2020.
  18. ^ Christopher Hertel (1999). «SMB: The Server Message Block Protocol». Archived from the original on March 10, 2010. Retrieved November 1, 2009.
  19. ^ «Description of Microsoft Windows Encryption Pack 1». Microsoft. November 1, 2006. Archived from the original on October 2, 2009. Retrieved November 1, 2009.
  20. ^ «US Executive Order 13026» (PDF). United States Government. 1996. Archived (PDF) from the original on October 10, 2009. Retrieved November 1, 2009.
  21. ^ a b «Direct hosting of SMB over TCP/IP». Microsoft. October 11, 2007. Archived from the original on March 26, 2011. Retrieved November 1, 2009.
  22. ^ Kyttle, Ralph (13 May 2017). «SMB1 – Audit Active Usage using Message Analyzer». Microsoft TechNet. Microsoft. Archived from the original on March 28, 2019. Retrieved 28 March 2019.
  23. ^ «The Deprecation of SMB1 – You should be planning to get rid of this old SMB dialect – Jose Barreto’s Blog». blogs.technet.microsoft.com. Archived from the original on May 21, 2017. Retrieved 2019-10-09.
  24. ^ «SMBv1 is not installed by default in Windows 10 Fall Creators Update and Windows Server, version 1709 and later versions». support.microsoft.com. Archived from the original on October 10, 2019. Retrieved 2019-10-09.
  25. ^ «WebNFS — Technical Overview». Archived from the original on 2007-05-18.
  26. ^ Navjot Virk and Prashanth Prahalad (March 10, 2006). «What’s new in SMB in Windows Vista». Chk Your Dsks. Microsoft. Archived from the original on May 5, 2006. Retrieved May 1, 2006.
  27. ^ Server Message Block (SMB) Protocol Versions 2 and 3. Windows Protocols. Open Specifications (Technical report). Microsoft Docs. Microsoft. MS-SMB2. Retrieved 2020-11-29.
  28. ^ «Samba 3.5.0 Available for Download». Archived from the original on July 24, 2011. Retrieved July 8, 2011.
  29. ^ «Samba 3.6.0 Available for Download». Archived from the original on September 24, 2011. Retrieved August 10, 2011.
  30. ^ «http://www.ietf.org/rfc/rfc3010.txt»
  31. ^ a b Eran, Daniel (June 11, 2013). «Apple shifts from AFP file sharing to SMB2 in OS X 10.9 Mavericks». Appleinsider.com. Archived from the original on February 12, 2017. Retrieved January 12, 2014.
  32. ^ Vaughan, Steven J. (October 28, 2013). «Mavericks’ SMB2 problem and fixes». ZDNet. Archived from the original on January 5, 2014. Retrieved January 12, 2014.
  33. ^ MacParc. «10.9: Switch the SMB stack to use SMB1 as default». Mac OS X Hints. macworld.com. Archived from the original on January 12, 2014. Retrieved January 12, 2014.
  34. ^ Topher Kessler (March 23, 2011). «Say adios to Samba in OS X». CNET. Archived from the original on January 15, 2014. Retrieved January 12, 2014.
  35. ^ Thom Holwerda (March 26, 2011). «Apple Ditches SAMBA in Favour of Homegrown Replacement». Archived from the original on November 2, 2013. Retrieved January 12, 2014.
  36. ^ «Linux 3.7 — Linux Kernel Newbies». Archived from the original on September 11, 2016. Retrieved September 4, 2016.
  37. ^ «Implementing an End-User Data Centralization Solution». Microsoft. October 21, 2009. pp. 10–11. Archived from the original on September 6, 2010. Retrieved November 2, 2009.
  38. ^ a b c Jeffrey Snover (April 19, 2012). «SMB 2.2 is now SMB 3.0». Windows Server Blog. Retrieved July 6, 2020.
  39. ^ Chelsio Communications. «40G SMB Direct». Archived from the original on September 7, 2013. Retrieved June 18, 2013.
  40. ^ Jose Barreto (October 19, 2012). «SNIA Tutorial on the SMB Protocol» (PDF). Storage Networking Industry Association. Archived (PDF) from the original on June 3, 2013. Retrieved November 28, 2012.
  41. ^ Thomas Pfenning. «The Future of File Protocols: SMB 2.2 in the Datacenter» (PDF). Archived from the original (PDF) on 2012-07-20.
  42. ^ Joergensen, Claus (2012-06-07). «SMB Transparent Failover – making file shares continuously available». Microsoft TechNet. Archived from the original on January 11, 2019. Retrieved February 1, 2017.
  43. ^ Savill, John (2012-08-21). «New Ways to Enable High Availability for File Shares». Windows IT Pro. Archived from the original on November 27, 2016. Retrieved February 1, 2017.
  44. ^ «SMB Security Enhancements». Microsoft Technet. January 15, 2014. Archived from the original on October 9, 2014. Retrieved June 18, 2014.
  45. ^ Jose Barreto (May 5, 2013). «Updated Links on Windows Server 2012 File Server and SMB 3.0». Microsoft TechNet Server & Management Blogs. Archived from the original on August 3, 2016. Retrieved August 14, 2016.
  46. ^ Jose Barreto (July 7, 2014). «Updated Links on Windows Server 2012 R2 File Server and SMB 3.02». Microsoft TechNet Server & Management Blogs. Archived from the original on August 26, 2016. Retrieved August 14, 2016.
  47. ^ Jose Barreto (December 12, 2013). «Storage Developer Conference – SDC 2013 slides now publicly available. Here are the links to Microsoft slides…». Microsoft TechNet Server & Management Blogs. Archived from the original on August 26, 2016. Retrieved August 14, 2016.
  48. ^ Eric Geier (December 5, 2013). «WindowsNetworking.com: Improvements in the SMB 3.0 and 3.02 Protocol Updates». WindowsNetworking.com. Archived from the original on April 9, 2015. Retrieved April 6, 2015.
  49. ^ Jose Barreto (April 30, 2015). «SMB3 Networking Links for Windows Server 2012 R2». Microsoft TechNet Server & Management Blogs. Archived from the original on August 26, 2016. Retrieved August 14, 2016.
  50. ^ Jose Barreto (May 5, 2015). «What’s new in SMB 3.1.1 in the Windows Server 2016 Technical Preview 2». Microsoft TechNet Server & Management Blogs. Archived from the original on October 8, 2016. Retrieved August 14, 2016.
  51. ^ «Windows Protocols». Archived from the original on September 26, 2009. Retrieved October 13, 2009.
  52. ^ Tridgell, Andrew (June 27, 1997). «A bit of history and a bit of fun». Archived from the original on July 17, 2011. Retrieved July 26, 2011.
  53. ^ «Samba 4 functional levels». February 25, 2011. Archived from the original on July 29, 2014. Retrieved January 12, 2014.
  54. ^ «SMB (Server Message Block): definitions, tasks, and applications». IONOS Digitalguide. Retrieved 2022-04-27.
  55. ^ «netsmb(4)». NetBSD 8.0 manual pages. Retrieved 5 January 2020.
  56. ^ nsmb.conf(5) – FreeBSD File Formats Manual.
  57. ^ «UNIX Extensions». SambaWiki. Archived from the original on June 12, 2020. Retrieved March 15, 2020.
  58. ^ Dr. Sunu Engineer. «Building a Highly Scalable and Performant SMB Protocol Server» (PDF). Archived (PDF) from the original on September 27, 2016. Retrieved September 25, 2016.
  59. ^ «Microsoft and Tuxera strengthen partnership through Tuxera SMB Server». Microsoft. Microsoft News Center. 14 September 2016. Archived from the original on November 17, 2016. Retrieved 6 February 2017.
  60. ^ «MS02-070: Flaw in SMB Signing May Permit Group Policy to Be Modified». Microsoft. December 1, 2007. Archived from the original on October 8, 2009. Retrieved November 1, 2009.
  61. ^ «MS09-001: Vulnerabilities in SMB could allow remote code execution». Microsoft. January 13, 2009. Archived from the original on October 5, 2009. Retrieved November 1, 2009.,
  62. ^ «Sicherheitstacho.eu». Deutsche Telekom. March 7, 2013. Archived from the original on March 8, 2013. Retrieved March 7, 2013.
  63. ^ «Alert (TA14-353A) Targeted Destructive Malware». US-CERT. Archived from the original on December 20, 2014. Retrieved December 20, 2014.
  64. ^ «Sony Hackers Used Server Message Block (SMB) Worm Tool». Archived from the original on December 20, 2014. Retrieved December 20, 2014.
  65. ^ «WannaCry Ransomware Attack Hits Victims With Microsoft SMB Exploit». eWeek. Retrieved 13 May 2017.
  66. ^ «SMBleedingGhost Writeup: Chaining SMBleed (CVE-2020-1206) with SMBGhost». ZecOps Blog. 2020-06-09. Retrieved 2020-11-19.

Further reading[edit]

SMB specifications[edit]

  • «[MS-CIFS]: Common Internet File System (CIFS) Protocol». Open Specifications. Microsoft. 30 October 2020.
    • Specifies the Common Internet File System (CIFS) Protocol, a cross-platform, transport-independent protocol that provides a mechanism for client systems to use file and print services made available by server systems over a network
  • «[MS-SMB]: Server Message Block (SMB) Protocol». Open Specifications. Microsoft. 25 June 2021.
    • Specifies the Server Message Block (SMB) Protocol, which defines extensions to the existing Common Internet File System (CIFS) specification that have been implemented by Microsoft since the publication of the CIFS specification.
  • «[MS-SMB2]: Server Message Block (SMB) Protocol Versions 2 and 3». Open Specifications. Microsoft. 14 December 2021.
    • Specifies the Server Message Block (SMB) Protocol Versions 2 and 3, which support the sharing of file and print resources between machines and extend the concepts from the Server Message Block Protocol.
  • «[MS-SMBD]: SMB2 Remote Direct Memory Access (RDMA) Transport Protocol». Open Specifications. Microsoft. 25 June 2021.
    • Specifies the SMB2 Remote Direct Memory Access (RDMA) Transport Protocol, a wrapper for the existing SMB2 protocol that allows SMB2 packets to be delivered over RDMA-capable transports such as iWARP or Infiniband while utilizing the direct data placement (DDP) capabilities of these transports. Benefits include reduced CPU overhead, lower latency, and improved throughput.

Miscellaneous[edit]

  • Hertel, Christopher (2003). Implementing CIFS – The Common Internet FileSystem. Prentice Hall. ISBN 0-13-047116-X. (Text licensed under the Open Publication License, v1.0 or later, available from the link above.)
  • Steven M. French, A New Network File System is Born: Comparison of SMB2, CIFS, and NFS, Linux Symposium 2007
  • Steve French, The Future of File Protocols: SMB2 Meets Linux, Linux Collaboration Summit 2012

External links[edit]

  • DFS section in «Windows Developer» documentation
  • the NT LM 0.12 dialect of SMB. In Microsoft Word format

Всем привет! Сегодня столкнулся с такой проблемой. При построении локальной сети с двумя компьютерами первый (Windows 10) наотрез отказывается видеть другой комп (Windows 7). Все настройки я произвел правильно и открыл общий доступ. Но как потом оказалось, вся проблема в специальном сетевом протоколе SMB 1. Дело в том, что это старый протокол, который работает на олдскульных ОС. И он есть в десятке, но на последних обновлениях операционной системы Microsoft решила его отключить (во имя безопасности).

SMB Windows 10: настройка и как включить SMB1 и SMB2

Симптомы достаточно простые. Вы выполнили все нужные настройки, заходите в раздел сети, а там ничего кроме вашего маршрутизатора не отображается. Бывает такое, что компьютер вы видите, и даже можете на него зайти, но вот при попытке открыть расшаренную папку можно лицезреть вот такое вот сообщение:

«Вы не можете подключиться к общей папке, так как она небезопасна. Эта общая папка работает по устаревшему протоколу SMB1, который не безопасен и может подвергнуть вашу систему риску атаки.»

SMB Windows 10: настройка и как включить SMB1 и SMB2

Может быть еще вот такой текст ошибки: «Не удалось выполнить сопоставление сетевого диска из-за следующей ошибки». Ну и дальше все в том же духе.

SMB Windows 10: настройка и как включить SMB1 и SMB2

Кстати, некоторые старые роутеры, также исползают устаревший SMB1 протокол – поэтому если у вас еще наблюдается проблема с доступом к жесткому диску или флешке, которые подключены к роутеру, то дальнейшие инструкции вам также будут полезны. Что мы будем делать? – нам нужно просто включить протокол SMBv1, и проблема будет решена. Поехали!

Содержание

  1. Включения SMB1 на Windows 10
  2. Проверка настроек
  3. Включение SMB2
  4. Ничего не помогло, папку или компьютер не видно, ничего не работает
  5. Задать вопрос автору статьи

Открываем меню «Пуск» и в поисковой строке вводим «Включение и отключение компонентов Windows». Можете просто ввести не полное слово «компонент». Вы также можете зайти туда через «Панель управления» (нажимаем кнопки «Win» и «R» – вводим команду: control). Далее заходим в «Программы и компоненты» и слева выбираем тот же самый пункт с отключением и включением компонентов.

SMB Windows 10: настройка и как включить SMB1 и SMB2

Находим раздел с упоминанием нашего любимого протокола и включаем в папке все галочки. В самом конце нажимаем «ОК», чтобы изменения были приняты.

SMB Windows 10: настройка и как включить SMB1 и SMB2

После этого SMB-1 в Windows 10 будет включено, и проблемы с сетью возникнуть не должны. Я бы на всякий случай перезагрузил компьютер. Но если вы все равно не видите какой-то компьютер в сети, или есть проблемы с доступом, смотрим следующую главу.

Проверка настроек

Нам нужно посмотреть настройки общего доступа и есть ли они у вас вообще.

  1. В «Пуске» нажмите по шестеренке.

SMB Windows 10: настройка и как включить SMB1 и SMB2

  1. Заходим в раздел «Сеть и Интернет».

SMB Windows 10: настройка и как включить SMB1 и SMB2

  1. Тут же на первой странице (вкладка «Состояние») откройте «Свойства» того подключения, которое вы используете для коннекта с роутером. Если вы подключены по кабелю, то выбираем «Ethernet», если вы подключены по «Wi-Fi», то выбираема второе подключение. На старых версиях нужно открыть ссылку «Изменить свойства подключения».

SMB Windows 10: настройка и как включить SMB1 и SMB2

  1. Убедитесь, чтобы тип сетевого профиля был как «Частный». Вернитесь обратно, нажав по стрелки влево.

SMB Windows 10: настройка и как включить SMB1 и SMB2

  1. Пролистните чуть ниже и откройте «Центр управления сетями…». Этот раздел может также называться как «Параметры общего доступа». Поэтому можете ориентироваться по значку или найти раздел со словами «Общий доступ».

SMB Windows 10: настройка и как включить SMB1 и SMB2

  1. Слева выбираем третий пункт для изменения параметров.

SMB Windows 10: настройка и как включить SMB1 и SMB2

  1. Так как мы уже изменили текущий профиль на частный, то открываем его.

SMB Windows 10: настройка и как включить SMB1 и SMB2

  1. Теперь открываем раздел «Все сети» и включаем сетевое обнаружение для папок. Шифрование должно стоять в нужной позиции, но если это не так, то включите 128-и битное шифрование. Обязательно отключите параметр, который будет запрашивать у вас пароль при заходе в общую папку или при запросе к этому компьютеру.

SMB Windows 10: настройка и как включить SMB1 и SMB2

  1. В самом конце сохраняем изменения.

Включение SMB2

Сначала давайте проверим статус SMBv2. Для это откройте «PowerShell» с правами админа, нажав ПКМ по кнопке «Пуск».

SMB Windows 10: настройка и как включить SMB1 и SMB2

Введите команду:

Get-SmbServerConfiguration | Select EnableSMB2Protocol

14

Если вы видите значение «True», то значит протокол работает. Если стоит значение «False», то включить параметр можно также с помощью команды:

Set-SmbServerConfiguration -EnableSMB2Protocol $true

ПРИМЕЧАНИЕ! Таким же образом можно включить или выключить SMB1 – просто замените в команде одну цифру (2 на 1).

Далее кликаем по «Y» и на «Enter», чтобы подтвердить свои действия. Если же вы хотите отключить SMB2, то вместо «true» ставим «false». В конце не забываем перезагрузить систему.

Ничего не помогло, папку или компьютер не видно, ничего не работает

Если проблема остается, то есть несколько вариантов – от неправильных сетевых настроек до проблем с некоторыми службами в самой операционной системе. Все решения я уже описал в отдельной статье, и с ней вы можете ознакомиться по этой ссылке. То, что описано там, должно помочь.

Понравилась статья? Поделить с друзьями:
  • Порт rdp по умолчанию windows server 2012
  • Порт pci express root windows 10
  • Порт hdmi не видит монитор windows 10
  • Порт 3389 не прослушивается windows 7
  • Порог увеличения производительности процессора windows 10