SharkFest 16 Europe. Windows Filesharing De-Mystified: SMB with a Eureka! Effect. Eddi Blenkers. October 19th packethunter.

Similar documents
DISTRIBUTED FILE SYSTEMS & NFS

SMB Analysis OPSEC 2016

SMB / CIFS TRANSACTIONS PERFORMANCE ANALYSIS. Performance Vision 2015

Chapter 5.6 Network and Multiplayer

These selected protocol definitions are extremely helpful in learning the

Operating Systems. Week 13 Recitation: Exam 3 Preview Review of Exam 3, Spring Paul Krzyzanowski. Rutgers University.

CS 416: Operating Systems Design April 22, 2015

SMB 3.0 (Because 3 > 2) David Kruse Microsoft

Networking interview questions

EMC VNX Series: Introduction to SMB 3.0 Support

Microsoft Office Live Meeting from Global Crossing Frequently Asked Questions (FAQs)

Implementing, Managing, and Maintaining a Microsoft Windows Server 2003 Network Infrastructure

Distributed Systems. Distributed File Systems. Paul Krzyzanowski

Washington State University CptS 455 Sample Final Exam (corrected 12/11/2011 to say open notes) A B C

Exam : SCNS_EN. Title : SCNS SCNS Tactical Perimeter Defense. Version : Demo

Deployment of Cisco IP Mobility Solution on Enterprise Class Teleworker Network

Lab - Using Wireshark to Examine a UDP DNS Capture

Vendor: Riverstone. Exam Code: Exam Name: Riverbed Certified Solutions Associate. Version: Demo

This tutorial shows how to use ACE to Identify the true causes of poor response time Document the problems that are found

Dameware ADMINISTRATOR GUIDE. Version Last Updated: October 18, 2017

COMMON INTERNET FILE SYSTEM PROXY

IxLoad Common Internet File System (CIFS)

1100 Dexter Avenue N Seattle, WA NetMotion Mobility Architecture A Look Under the Hood

Talon FAST User Guide. Date Version Author Comments. November 15, Jaap van Duijvenbode Final Release

Data Communication and Network. Introducing Networks

COMS3200/7201 Computer Networks 1 (Version 1.0)

Distributed Systems. Hajussüsteemid MTAT Distributed File Systems. (slides: adopted from Meelis Roos DS12 course) 1/25

Cisco Cisco Certified Network Associate (CCNA)

15-441: Computer Networks Homework 3

Remote Access VPN. Remote Access VPN Overview. Licensing Requirements for Remote Access VPN

Adding Distribution Settings to a Job Profile (CLUI)

Set Up a Remote Access Tunnel (Client to Gateway) for VPN Clients on RV016, RV042, RV042G and RV082 VPN Routers

20-CS Cyber Defense Overview Fall, Network Basics

CMSC 332 Computer Networking Web and FTP

Zmanda Cloud Backup FAQ

Identify the features of network and client operating systems (Windows, NetWare, Linux, Mac OS)

ITEC 3800 Data Communication and Network. Introducing Networks

interface Question 1. a) Applications nslookup/dig Web Application DNS SMTP HTTP layer SIP Transport layer OSPF ICMP IP Network layer

Operating Systems Design 16. Networking: Remote File Systems

ACL Rule Configuration on the WAP371

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers

Copyleft 2005, Binnur Kurt. Objectives

Recent Operating System Class notes 10 Administrative Tools (Part three) April 21, 2004

Compatibility and Support Information Nasuni Corporation Boston, MA

CCNA 1 v5.0 R&S ITN Final Exam 2014

Daedalus/GloMop Architectural Walkthrough

1. IPv6 is the latest version of the TCP/IP protocol. What are some of the important IPv6 requirements?

Lecture #9 Introduction to communication networks

Lecture (02) Network Protocols and Standards

WiNG 5.x How-To Guide

Configuring WAFS. About File Services CHAPTER

Web, HTTP and Web Caching

THE OSI MODEL. Application Presentation Session Transport Network Data-Link Physical. OSI Model. Chapter 1 Review.

R M S N e t w o r k :

SYSTEMS ADMINISTRATION USING CISCO (315)

WINDOWS GUEST GUIDE. Remote Support & Management PC Mac Tablet Smartphone Embedded device. WiseMo Host module on your computer or device

SMB 2.0 Next Generation CIFS protocol in Data ONTAP

On Distributed Communications, Rand Report RM-3420-PR, Paul Baran, August 1964

Lab - Using Wireshark to Examine a UDP DNS Capture

Network+ Guide to Networks, Seventh Edition Chapter 2, Solutions

Cisco WAAS Software Command Summary

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Guide to TCP/IP, Third Edition. Chapter 12: TCP/IP, NetBIOS, and WINS

Networking Presented by: Marcin Chady

Traveling Setup Apple Mail

SMB v2.1. David Kruse. Storage Developer Conference Microsoft Corporation. All rights reserved.

CS 421: COMPUTER NETWORKS SPRING FINAL May 16, minutes

VMware User Environment Manager SyncTool Administration Guide

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Server Message Block Protocol (SMB)

VMware User Environment Manager SyncTool Administration Guide. VMware User Environment Manager 9.1

Exam : 1T Title : Network Analysis & Troubleshooting. Version : DEMO

Configuring Web Cache Services By Using WCCP

Deployment Scenarios for Standalone Content Engines

SMB3 Update David Kruse Microsoft

SEN366 (SEN374) (Introduction to) Computer Networks

Cisco Wide Area Application Services: Secure, Scalable, and Simple Central Management

Configuring AVC to Monitor MACE Metrics

Testing and Restoring the Nasuni Filer in a Disaster Recovery Scenario

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

Using Diagnostic Tools

When does it work? Packet Sniffers. INFO Lecture 8. Content 24/03/2009

EXAM Core Solutions of Microsoft Lync Server Buy Full Product.

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Chapter 8. Network Troubleshooting. Part II

User Datagram Protocol

[MS-SMB2]: Server Message Block (SMB) Protocol Versions 2 and 3

Communicating over the Network. Network Fundamentals. ITE PC v4.0 Chapter Cisco Systems, Inc. All rights reserved.

Topexam. 一番権威的な IT 認定試験ウェブサイト 最も新たな国際 IT 認定試験問題集

- Hubs vs. Switches vs. Routers -

H

VLANs Level 3 Unit 9 Computer Networks

HAI Network Communication Protocol Description

VERSION Lab 3: Link Layer

SMB Direct Update. Tom Talpey and Greg Kramer Microsoft Storage Developer Conference. Microsoft Corporation. All Rights Reserved.

Network Security Fundamentals. Network Security Fundamentals. Roadmap. Security Training Course. Module 2 Network Fundamentals

BIG-IP Access Policy Manager : Implementations. Version 12.1

Acceleration Systems Technical Overview. September 2014, v1.4

Internet Load Balancing Guide. Peplink Balance Series. Peplink Balance. Internet Load Balancing Solution Guide

Authenticating Devices

Transcription:

SharkFest 16 Europe Windows Filesharing De-Mystified: SMB with a Eureka! Effect October 19th 2016 #sf16eu Eddi Blenkers packethunter

NetBIOS in the "good old days"

Ethernet: The new Yellow Cable Ethernet: Developed in the 1970s Became IEEE 802.3 in 1980 Unprecedented bandwidth of 10 MBit per second Standardized frame format: DstMAC, SrcMAC, Frame Type Offered nearly instant transfer of data in a building Still bound by the law of physics Bits travel at 2/3 of the speed of light

NetBIOS: Remote File Access Back in the days: BIOS = Basic Input / Output System Among other things, facilitates access to hard disks Operates on a block or sector level: Write 512 bytes to sector 63 The new thing: NetBIOS / SMB Later renamed to CIFS = Common Internet File System Facilitates access to remote disks Operates on a file level: Read / Write / Append for files SMB runs on NetBIOS

SMB was designed as Layer 2 protocol

NetBIOS Frame Format

Selected NetBIOS Messages Name Registration and Resolution Translate hostname to MAC address Ensure hostname is unique Also handles group membership Datagram Service, similar to UDP Session Service, similar to TCP Session setup is similar to TCP, but 2-way instead of 3-way Keep alive messages for sessions Used by SMB for file sharing

Evolution into an upper layer protocol

NetBIOS has moved to upper Layers SMB SMB SMB SMB NetBIOS Header LLC Header NetBIOS Header IPX Header NetBIOS Header TCP Port 139 IP Header NetBIOS Shim TCP Port 445 IP Header Ethernet Ethernet Ethernet Ethernet

NetBIOS Services in IP networks UDP 137 NetBIOS Name Service Now registers and resolves to an IP address MAC addresses are handled by ARP UDP 138 NetBIOS Datagram Service TCP 139 NetBIOS Session Service TCP 445 SMB over TCP

SMB or NetBIOS: Remote File Access TCP 139 TCP 445 NetBIOS Session Setup Negotiate Protocol Session Setup Tree Connect File Access Named Pipes

Critical Part: Session Setup NetBIOS Session Setup: Only on Port 139

Negotiate SMB Dialect

SMB Protocol Versions Avoid SMB v1 Designed for 16 bit systems Wfw 3.1, LAN Manager, NT LM 0.12 and other dialects Implementation details can turn a standard task into a night mare Still widely distributed, especially in low cost NAS Prefer SMB v2 or v3 Version 2 was introduced with Windows Vista Version 3 was introduced with Windows 8 Wireshark offers display filters smb and smb2

Advantages in SMB v2 and later Designed for 10 GBit to the desktop Supports larger files Pipelining Lot's of useful features, like branch cache, encryption and more

Authenticating the User Happens with the Session Setup Command Domains need 1 turn, workgroups need 2 turns More turns, if authentication fails Client offers multiple authentication methods Usually NTLMv2 or Kerberos NTLMv2 is challenge/response, Safely ignore the return code "More processing required"

Accessing Files

Get Ready to Access Files Mapping a share is done with "Tree Connect" The explorer will retrieve information about the target directory and stored files A "Create" Request is send when the file is opened Subsequent "Read" or "Write" Requests transfer data from and to the file

The full process to read a file Many TCP Turns hurt WAN users

Multiple IDs make a File unique The server assigns IDs for further reference Process ID references a logon session Tree ID references a share name GUID references a file name The client uses only the IDs in requests Wireshark associates the IDs with names

Locating IDs in SMB Messages Wireshark will show the file names, if the relevant operations were captured Tree Connect defines the Tree ID Create defines the File ID or File GUID

Analyzing SMB Traffic

Most useful Wireshark Commands Use the display filter smb or smb2 Examine the protocol statistics Locate frequent events Locate long transaction times Locate smb errors: smb.error_code > 0 or smb.nt_status > 0 or smb2.nt_status > 0

Protocol Statistics Separate statistics for SMB and SMB2

Identify time consuming Transactions Look out for individual slow transactions smb.time > 0.2 Your definition of "slow" depends on your infrastructure Look out for repeated, maybe useless requests The previous screenshot showed 27.000 write requests At 0.5 milliseconds each, we still spend 16 seconds waiting

Safely ignore Notify Transactions The explorer will ask to be notified when a directory or file changes The response time for the notification depends on user and application behavior

Avoid loading executables from shares Sometimes applications are stored on a file share The Windows prefetcher can load a program, even if the user did not click it Executables are treated like small page files Looong wait for RAS links

Watch out for Opportunistic Locking Files can be shared for reading and writing Clients can reserve a section of the file (lock) The server has to manage conflicting locks Watch out for lock requests send by the server

SMB2 Clients spend I/O Credits Since SMB2 clients have to spend credits for I/O Operations 1 credit for each full 64 kbyte of Data requested plus 1 credit for a fraction of 64 kbyte Cost depends on the number of requested bytes, not on the number of bytes read / written The server will replenish the credits The client will always have at least 1 credit

Charting SMB2 Credits Focus on one server

Windows Branch Cache can reduce WAN load Data from a network share is either cached on a server or distributed to all clients in the branch Data is split into chunks of 64 kbyte Clients first retrieve a hash of the data and then ask in the LAN if someone has that chunk Reasonable secure implementation: cached chunks are encrypted

Considerations for the Branch Cache Caching is triggered by latency Default: 80 msec, can be configured by the domain administrator Adds an extra TCP turn before data is read Not useful for shares with many volatile files Very useful for shares with static data stored in large files Only useful if files are read multiple times

Do it yourself! Join the community on ask.wireshark.org Check out this question: https://goo.gl/rw02jc

Questions?

Famous Last Words Tracefiles used in this presentation have been uploaded to the Wireshark Wiki: https://wiki.wireshark.org/samplecaptures More information on SMB and SMB2 on the Wireshark Wiki: https://wiki.wireshark.org/smb https://wiki.wireshark.org/smb2