49
Presented By: 9/23/2010 Where PI geeks meet… Bryan Owen Paul Combellick PI System Security: 5 Secrets You Should Know

PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Presented By:

9/23/2010 Where PI geeks meet…

Bryan Owen

Paul Combellick

PI System Security:

5 Secrets You Should Know

Page 2: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Secret Weapons

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 2

Authentication Least Privilege Securing

Network Traffic Host Hardening

Auditing and Monitoring

Page 3: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Authentication Tips

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 3

• PI SDK Buffering CTP

– Domain App Server

– Workgroup

• PI System 2010

– PI AFLink service

– AF Server to SQL Server

– AF External Tables

App Server

Active Directory

Domain Services

Workgroup or

Non-trusting Domain

Kerberos/NTLM

AF ServerPI Server

NTLM

PI Buffer Subsystem using Identical Accounts

Page 4: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Domain Group for PIbufss

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 4

1. NET GROUP PI-BufferNodes /ADD

2. NET GROUP PI-BufferNodes R2STD2$ /ADD

Page 5: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Identity Mapping on PI Server

• Map to built-in PI identity: piadmins

– Full access permissions (default)

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 5

Page 6: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Voilà! PIbufss using Kerberos

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 7

What if NTLM was used? See:

• Technical Support Newsletter (April 2010) – Windows Security Requirements for PI

• KB00100: Configure PI WebParts or PI Web Services for – Windows Authentication that Relies on Kerberos Delegation

• Configure Kerberos authentication (SharePoint Server 2010) – http://technet.microsoft.com/en-us/library/ee806870.aspx

• TechNet Blogs > Ask the Directory Services Team – Understanding Kerberos Double Hop

Page 7: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Authentication of Buffer Subsystem

from non-Trusting Domain

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 8

NET USER PI-InterfaceNode1 * /ADD /EXPIRES:never /PASSWORDCHG:no /TIMES:all

NET LOCALGROUP PI-BufferNodes /ADD

NET LOCALGROUP PI-BufferNodes /ADD PI-InterfaceNode1

Page 8: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Identity Mapping on PI Server

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 9

• Map to built-in PI identity: piadmins

– Full access permissions (default)

Page 9: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Identical User on Interface Node

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 10

NET USER PI-InterfaceNode1 * /ADD /EXPIRES:never /PASSWORDCHG:no /TIMES:all

sc config pibufss obj= ".\PI-InterfaceNode1" password= "********"

icacls "%PIHOME%\DAT" /grant ".\PI-InterfaceNode1":(OI)(CI)F

Page 10: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PIbufss using NTLM

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 11

• Domain and Workgroup scenarios support

Windows Integrated Authentication

Now it’s time to…

Page 11: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Raise PI Server Security Level

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 12

PI Buffer Subsystem

and all PI SDK apps using

Windows Authentication only

Page 12: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PI AFLink to AF Server

• PI AFLink service runs on PI Server

– Default Log On is NETWORK SERVICE

– MDB to AF wizard creates group on AF Server

• AF Link to PI – PIServer

• PI Server Computer Account is a member

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 13

Page 13: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Least Privilege Tips

SQL Server

AF Server

PI Server

PI Interfaces

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 14

Page 14: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

AF SQL Permissions Demo

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 15

Page 15: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

AF Server to SQL Server

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 16

Page 16: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

AF SQL Permissions Summary

• AF DB install requires SysAdmin privilege

- Can install DB manually

• Run as account with minimum privilege

– Don’t run as Local System or Administrator

• Connect to SQL with minimum privilege

– Don’t connect with SysAdmin privilege

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 17

Page 17: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PI System Explorer:

Least Privilege for Admins

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 18

• Only members of Admin group should have full privileges

Page 18: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PI System Explorer:

Least Privilege for Everyone

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 19

• Everyone group (i.e. World) should have read-only access

Page 19: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PI System Explorer:

Least Privilege for Windows Groups

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 20

• Create domain groups to grant specific, least privileges

Page 20: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Default Access Patterns

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 21

0

10

20

30

40

50

60

piadmin PIadmins PIWorld

PI Server Tasks

* Configuring PI Server Security

Appendix A: Task-Based Access Permissions Reference

Page 21: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 22

0

10

20

30

40

50

60

piadmin PIadmins PIContributor PIWorld

PI Server Tasks

* Configuring PI Server Security

Appendix A: Task-Based Access Permissions Reference

PIadmins vs PIContributor

Page 22: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Implement “PI-Contributor”

• Create AD group

– Domain Users

– PI Administrators

– PI Buffer nodes

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 23

Page 23: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Configure PI Identity

• Create Matching ID

• Map to AD Group

• Add PI Trusts

– Only for API applications

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 24

Page 24: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

25 Where PI geeks meet… ©2010 OSIsoft, LLC. All

Rights Reserved

PI 2010 Default:

PIWorld

Access Revoked

Page 25: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Tag and Module Permissions

• Security Analyzer as a vCampus Challenge?

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 26

Page 26: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Lock Down “Piadmin”

• Disable Mapping

• Disable Trust

• Disable Logon

• Use “piadmins”:

– Trust !Proxy_127!

– Mapping for PI Server

2010 MDB to AF wizard

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 27

Page 27: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PI Interfaces

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 28

• Do NOT authenticate to PI using piadmin

– Trusts for interfaces http://techsupport.osisoft.com/knowledge+center/system+manager+resources

• PI OPC interface

– Configuring DCOM for PI OPC Products OSIsoft “Show me how” Webinar (4/15/2010)

http://training.osisoft.com/Downloads/Webinars/Training_Webinars.htm

• US CERT Control Systems Security Program

– Hardening Guidelines for OPC Host https://www.us-cert.gov/control_systems/practices/documents/OPC%20Security%20WP3.pdf

Page 28: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Securing Network Traffic

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 30

• Traffic protected by default:

– Windows integrated authentication messages

– WCF applications

Service Endpoint Platform Library Port (TCP) Protected

MS SQL Server WinSock 1433

Managed PI Agent WCF 5449

PI Server WinSock 5450

ACE Web Service ASP.NET 5456

AF Server WCF 5457

PI Notifications WCF 5458

AF Server HA WCF 5459

PI SQL Data Access WCF 5461

Page 29: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Configuring Connection Security

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 31

• IP Security is built-in to Windows

– Windows Firewall rule as of Vista/2008

• Deploy by group policy across domain

• In workgroups configure rule on each endpoint

• Use X.509 certificates over internet

– IP Security Policy Management (Server 2003) http://support.microsoft.com/kb/816514

Page 30: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Host Hardening Tips

SQL Server

AF Server

PI Server

PI Interfaces

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 32

Page 31: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

SQL Server Surface Area Config:

SQL Server Services

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 33

• Disable unused services – SSAS, SSIS, SSRS, Search

• SQL Server Agent used by AF Backup and AF Collectives

Page 32: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

SQL Server Surface Area Config:

Least Privilege

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 34

• NEVER run SQL Server as Local System or Administrator

Page 33: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

SQL Server Surface Area Config:

Network Protocols

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 35

• Disable network protocol listeners for remote clients

(default for SQL Express)

Page 34: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

SQL Server Surface Area Config:

Authentication Mode

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 36

• Recommend using Windows authentication mode only

Page 35: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

SQL Server Surface Area Config:

Other Features

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 37

• Disable extended sprocs (xp_*), OLE Automation, SQL Mail

Page 36: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

AFDiag – Linked Table:

AF2.0 Compatibility

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 38

• Disable AF2.0 style external table access

Page 37: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

AFDiag – Linked Table:

User Impersonation

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 39

• Disable non-impersonated access to external tables

Page 38: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Kerberos Delegation

Page 39: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Windows Hardening

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 41

• Windows Server R2 “Server Core”

– Reduced attack surface and less patching

– PI Server is logo certified on Server Core

Enable .Net feature for PI Server 2010

• Security Technical Implementation Guides

– Sites with FISMA compliance http://iase.disa.mil/stigs/stig/index.html

– Windows Security Configuration Wizard

Page 40: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Core is Lean and Mean: Sconfig

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 42

Page 41: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PI Interface Hardening

• Disable outputs from PI

– lock down point cache

• Create Health Points

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 43

Page 42: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Auditing and Monitoring

Audit Settings

Managed PI

MCN Monitor

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 44

Page 43: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

SQL Server Audit Settings

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 45

• Possible to audit SQL Server logins (AF Server account,

PI System Explorer login, AFDiag login)

Page 44: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

AF Audit Settings

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 46

• Can enable AF change audit logging using AFDiag

Page 45: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PI System 2010 Managed PI

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 47

• Managed PI 2.x

– separates the monitoring system from the

production PI System

• PI Agent communication infrastructure

– Built for hardened PI Server 2010 stack and

defense in depth topologies

• email communication channel is no longer available

for PI Server 2010 systems

• Adds AFServer and PIAFlink monitoring

Page 46: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

MCN Monitor

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 48

• Bundled with PI System 2010

• Monitoring templates include MS SQL server

Page 47: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

PI Server Authentication Stats

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 49

• Regulatory Monitoring

– Notification Trigger

– Access Reports

• Up to 12 Tags

– Individual methods

– Overall session

– Use a scaling factor

Page 48: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

2 Major Takeaways

Where PI geeks meet… ©2010 OSIsoft, LLC. All Rights Reserved 50

Page 49: PI System Security: 5 Secrets You Should Knowcdn.osisoft.com/corp/en/media/presentations/2010/vCampusLive2010/PDF/VL2010_D2TR2...Presented By: Where PI geeks meet… 9/23/2010 Bryan

Thank You!

©2010 OSIsoft, LLC. All Rights Reserved

Where PI geeks meet… 51