Securing SQL Server Integration Services (SSIS)

Published Mar 23 2019 12:23 PM 300 Views
Microsoft
First published on TECHNET on Nov 08, 2011

I was recently asked about securing SQL Server Integration Services, and I knew next to nothing about it. After digging in for a while, here are my notes, mostly for myself, but shared in case they might help someone else.


There are 3 areas that need to be secured:



  1. The SSIS Engine

  2. SSIS Packages

  3. SQL Server



Protecting the SSIS Engine



  • Ensure file-based Access Control List (ACL) permissions are restricted on the SSIS executable (MsDtsSrvr.exe)

  • Use a security tool to monitor for changes to the executable.

  • Limit Windows administrator accounts on the SSIS server.



Protecting SSIS Packages



  • Ensure file-based Access Control List (ACL) permissions are restricted on dtutil.exe.

  • Store packages in a hardened instance of SQL Server (SQL Server stores them in the msdb system database).

  • I haven’t thought of any reason why someone would have to store packages on a file system, but if you must, then set file-based Access Control List (ACL) permissions on the packages.

  • You can store packages in the “Package Store” which uses the file system with permissions managed by SSIS. I haven’t found any detailed documentation for this, but I expect that storing packages in SQL Server is safer, if SQL Server has been hardened.

  • Set the Package Protection Level (PPL) on each package, regardless of where you store them.

  • Limit SQL Server permissions to manage SSIS packages.


The Package Protection Level allows you to determine the package protection method and scope.


As for the method, you can choose not to save sensitive data, encrypt only the sensitive data, encrypt all data in the packages (not the data that the packages operate on), or let Windows ACLs protect the entire package. Sensitive data is connection string passwords, some tagged nodes, and some SSIS variables (see http://msdn.microsoft.com/en-us/library/ms141747.aspx ). If you encrypt all data in the package, it will protect hide the logic of the operations, and the server and database sources and targets, in addition to the sensitive data.


The PPL scope allows you to encrypt with a user key or password. If you use a user key, only the user who creates or exports the package can open or run the package. When a package has passed the testing phase, the production team can re-encrypt a package with a maximum-strength password.


Package Protection Levels:



  • Do not save sensitive data

  • Encrypt sensitive data with user key

  • Encrypt sensitive data with password

  • Encrypt all data with user key

  • Encrypt all data with password

  • Rely on server storage and roles for access control


If, and only if, you store SSIS packages in SQL Server, then permissions to manage and run the packages are given only to and through these SSIS database-level roles: db_ssisadmin, db_ssisltduser, and db_ssisoperator. These roles are assigned to a package using SSMS, and they're saved to the msdb system database.


Connecting to the SSIS engine provides the ability to:



  • Check running packages

  • Store packages in MSDB or on a file system

  • Import packages

  • Execute packages

  • Export packages

  • Upgrade packages

  • Organize packages

  • Delete packages

  • Rename packages

  • Set Reader and Writer roles on packages



Protecting SQL Server against Rogue Packages



  • Harden SQL Server

  • Set BlockedSignatureStates to require valid, trusted digital signatures to run any package


The first line of defense against rogue packages is the credentials under which a package makes connections to databases. If SQL Server is hardened to a standard such as the DoD’s Database STIG, an SSIS package should be unable to read or harm any data that the connection credentials don’t have the authority for.



Create a BlockedSignatureStates registry key to prevent SSIS from running packages unless they have digital signatures from a trusted authority (see http://msdn.microsoft.com/en-us/library/ms403378.aspx ).




By default, any user who connects to SSIS via SQL Server Management Studio (SSMS) can see a list of packages, all storage locations, and which of their packages are running. This can be prevented by removing execute permissions on the dts enumeration stored procedures (e.g. sp_enum_dtspackages) from the public role (see http://msdn.microsoft.com/en-us/library/cc645944.aspx ). SQL Server system administrators can see all running packages regardless of other permissions.


SQL Server Management Studio uses the SQL Server service to list running packages. Members of the Windows Administrators group can view and stop all currently running packages. Users who are not members of the Administrators group can view and stop only packages that they started.



As always, if anyone has any suggestions, I’d love to hear them!




%3CLINGO-SUB%20id%3D%22lingo-sub-383945%22%20slang%3D%22en-US%22%3ESecuring%20SQL%20Server%20Integration%20Services%20(SSIS)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-383945%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20TECHNET%20on%20Nov%2008%2C%202011%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EI%20was%20recently%20asked%20about%20securing%20SQL%20Server%26nbsp%3BIntegration%20Services%2C%20and%20I%20knew%20next%20to%20nothing%20about%20it.%20After%20digging%20in%20for%20a%20while%2C%20here%20are%20my%20notes%2C%20mostly%20for%20myself%2C%20but%20shared%20in%20case%20they%20might%20help%20someone%20else.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThere%20are%203%20areas%20that%20need%20to%20be%20secured%3A%3C%2FP%3E%3CBR%20%2F%3E%3COL%3E%3CBR%20%2F%3E%3CLI%3EThe%20SSIS%20Engine%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESSIS%20Packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESQL%20Server%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FOL%3E%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CB%3E%20Protecting%20the%20SSIS%20Engine%20%3C%2FB%3E%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EEnsure%20file-based%20Access%20Control%20List%20(ACL)%20permissions%20are%20restricted%20on%20the%20SSIS%20executable%20(MsDtsSrvr.exe)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EUse%20a%20security%20tool%20to%20monitor%20for%20changes%20to%20the%20executable.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ELimit%20Windows%20administrator%20accounts%20on%20the%20SSIS%20server.%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CB%3E%20Protecting%20SSIS%20Packages%20%3C%2FB%3E%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EEnsure%20file-based%20Access%20Control%20List%20(ACL)%20permissions%20are%20restricted%20on%20dtutil.exe.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EStore%20packages%20in%20a%20hardened%20instance%20of%20SQL%20Server%20(SQL%20Server%20stores%20them%20in%20the%20msdb%20system%20database).%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EI%20haven%E2%80%99t%20thought%20of%20any%20reason%20why%20someone%20would%20have%20to%20store%20packages%20on%20a%20file%20system%2C%20but%20if%20you%20must%2C%20then%20set%20file-based%20Access%20Control%20List%20(ACL)%20permissions%20on%20the%20packages.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EYou%20can%20store%20packages%20in%20the%20%E2%80%9CPackage%20Store%E2%80%9D%20which%20uses%20the%20file%20system%20with%20permissions%20managed%20by%20SSIS.%20I%20haven%E2%80%99t%20found%20any%20detailed%20documentation%20for%20this%2C%20but%20I%20expect%20that%20storing%20packages%20in%20SQL%20Server%20is%20safer%2C%20if%20SQL%20Server%20has%20been%20hardened.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESet%20the%20Package%20Protection%20Level%20(PPL)%20on%20each%20package%2C%20regardless%20of%20where%20you%20store%20them.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ELimit%20SQL%20Server%20permissions%20to%20manage%20SSIS%20packages.%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CP%3EThe%20Package%20Protection%20Level%20allows%20you%20to%20determine%20the%20package%20protection%20method%20and%20scope.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAs%20for%20the%20method%2C%20you%20can%20choose%20not%20to%20save%20sensitive%20data%2C%20encrypt%20only%20the%20sensitive%20data%2C%20encrypt%20all%20data%20in%20the%20packages%20(not%20the%20data%20that%20the%20packages%20operate%20on)%2C%20or%20let%20Windows%20ACLs%20protect%20the%20entire%20package.%20Sensitive%20data%20is%20connection%20string%20passwords%2C%20some%20tagged%20nodes%2C%20and%20some%20SSIS%20variables%20(see%20%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms141747.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms141747.aspx%20%3C%2FA%3E%20).%20If%20you%20encrypt%20all%20data%20in%20the%20package%2C%20it%20will%20protect%20hide%20the%20logic%20of%20the%20operations%2C%20and%20the%20server%20and%20database%20sources%20and%20targets%2C%20in%20addition%20to%20the%20sensitive%20data.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThe%20PPL%20scope%20allows%20you%20to%20encrypt%20with%20a%20user%20key%20or%20password.%20If%20you%20use%20a%20user%20key%2C%20only%20the%20user%20who%20creates%20or%20exports%20the%20package%20can%20open%20or%20run%20the%20package.%20When%20a%20package%20has%20passed%20the%20testing%20phase%2C%20the%20production%20team%20can%20re-encrypt%20a%20package%20with%20a%20maximum-strength%20password.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EPackage%20Protection%20Levels%3A%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EDo%20not%20save%20sensitive%20data%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EEncrypt%20sensitive%20data%20with%20user%20key%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EEncrypt%20sensitive%20data%20with%20password%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EEncrypt%20all%20data%20with%20user%20key%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EEncrypt%20all%20data%20with%20password%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ERely%20on%20server%20storage%20and%20roles%20for%20access%20control%20%3CB%3E%20%3C%2FB%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CP%3EIf%2C%20and%20only%20if%2C%20you%20store%20SSIS%20packages%20in%20SQL%20Server%2C%20then%20permissions%20to%20manage%20and%20run%20the%20packages%20are%20given%20only%20to%20and%20through%20these%20SSIS%20database-level%20roles%3A%20db_ssisadmin%2C%20db_ssisltduser%2C%20and%20db_ssisoperator.%20These%20roles%20are%20assigned%20to%20a%20package%20using%20SSMS%2C%20and%20they're%20saved%20to%20the%20msdb%20system%20database.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EConnecting%20to%20the%20SSIS%20engine%20provides%20the%20ability%20to%3A%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3ECheck%20running%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EStore%20packages%20in%20MSDB%20or%20on%20a%20file%20system%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EImport%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EExecute%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EExport%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EUpgrade%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EOrganize%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EDelete%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ERename%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESet%20Reader%20and%20Writer%20roles%20on%20packages%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CDIV%3E%0A%20%20%3C%2FDIV%3E%3CBR%20%2F%3E%3CP%3E%3CB%3E%20Protecting%20SQL%20Server%20against%20Rogue%20Packages%20%3C%2FB%3E%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EHarden%20SQL%20Server%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ESet%20BlockedSignatureStates%20to%20require%20valid%2C%20trusted%20digital%20signatures%20to%20run%20any%20package%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CP%3EThe%20first%20line%20of%20defense%20against%20rogue%20packages%20is%20the%20credentials%20under%20which%20a%20package%20makes%20connections%20to%20databases.%20If%20SQL%20Server%20is%20hardened%20to%20a%20standard%20such%20as%20the%20DoD%E2%80%99s%20Database%20STIG%2C%20an%20SSIS%20package%20should%20be%20unable%20to%20read%20or%20harm%20any%20data%20that%20the%20connection%20credentials%20don%E2%80%99t%20have%20the%20authority%20for.%3C%2FP%3E%3CBR%20%2F%3E%3CDIV%3E%3CBR%20%2F%3E%3CP%3ECreate%20a%20BlockedSignatureStates%20registry%20key%20to%20prevent%20SSIS%20from%20running%20packages%20unless%20they%20have%20digital%20signatures%20from%20a%20trusted%20authority%20(see%20%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms403378.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fms403378.aspx%20%3C%2FA%3E%20).%3C%2FP%3E%3CBR%20%2F%3E%3C%2FDIV%3E%3CBR%20%2F%3E%3CUL%3E%0A%20%20%3C%2FUL%3E%3CBR%20%2F%3E%3CP%3EBy%20default%2C%20any%20user%20who%20connects%20to%20SSIS%20via%20SQL%20Server%20Management%20Studio%20(SSMS)%20can%20see%20a%20list%20of%20packages%2C%20all%20storage%20locations%2C%20and%20which%20of%20their%20packages%20are%20running.%20This%20can%20be%20prevented%20by%20removing%20execute%20permissions%20on%20the%20dts%20enumeration%20stored%20procedures%20(e.g.%20sp_enum_dtspackages)%20from%20the%20public%20role%20(see%20%3CA%20href%3D%22http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fcc645944.aspx%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fcc645944.aspx%20%3C%2FA%3E%20).%20SQL%20Server%20system%20administrators%20can%20see%20all%20running%20packages%20regardless%20of%20other%20permissions.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3ESQL%20Server%20Management%20Studio%20uses%20the%20SQL%20Server%20service%20to%20list%20running%20packages.%20Members%20of%20the%20Windows%20Administrators%20group%20can%20view%20and%20stop%20all%20currently%20running%20packages.%20Users%20who%20are%20not%20members%20of%20the%20Administrators%20group%20can%20view%20and%20stop%20only%20packages%20that%20they%20started.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAs%20always%2C%20if%20anyone%20has%20any%20suggestions%2C%20I%E2%80%99d%20love%20to%20hear%20them!%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-383945%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20TECHNET%20on%20Nov%2008%2C%202011%20I%20was%20recently%20asked%20about%20securing%20SQL%20Server%26nbsp%3BIntegration%20Services%2C%20and%20I%20knew%20next%20to%20nothing%20about%20it.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-383945%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerSecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Version history
Last update:
‎Mar 23 2019 12:23 PM
Updated by: