29
https://www.isecpartners.com Just Add Kerberos? Really? Andrew Becherer Black Hat USA 2010 Hadoop Security Design?

Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

https://www.isecpartners.com

Just Add Kerberos? Really?

Andrew BechererBlack Hat USA 2010

Hadoop Security Design?

Page 2: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

2

Agenda Conclusion What is Hadoop Old School Hadoop Risks The New Approach to Security Concerns Alternative Strategies A Security Consultant Walks Into a Datacenter

Page 3: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

ConclusionDid Hadoop Get Safer?

Page 4: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

4

Conclusion

Hadoop made significant advances but faces several significant challenges

Page 5: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

What is HadoopMapReduceSimplified ViewWho Is Using It

Page 6: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

6

MapReduce Name Nodes & Data Nodes

Data Access

Job Tracker Job Submission

Task Tracker Work

Optional other services Workflow managers Bulk data distribution

Page 7: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

7

Simplified View

User Job Tracker

Task Tracker

Task

HDFS

Task Tracker

Task

HDFS

Page 8: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

8

Who is Using It

Page 9: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

Hadoop RisksInsufficient Authentication No Privacy & No IntegrityArbitrary Code ExecutionExploit Scenario

Page 10: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

10

Insufficient Authentication Hadoop did not authenticate users Hadoop did not authenticate services

Page 11: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

11

No Privacy & No Integrity Hadoop used insecure network transports Hadoop did not provide message level security

Page 12: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

12

Arbitrary Code Execution Malicious users could submit jobs which would

execute with the permissions of the Task Tracker

Page 13: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

13

Exploit Scenario Alice had access the Hadoop cluster Bob had access the Hadoop cluster Alice and Bob had to trust each other completely If Mallory got access to the cluster Alice and Bob both

died in a fire.

Page 14: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

The New ApproachKerberosDelegation TokensNew Workflow ManagerStated Limitations

Page 15: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

15

Kerberos Users authenticate to the edge of the cluster with

Kerberos (via GSSAPI) Users and group access is maintained in cluster

specific access control lists

Page 16: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

16

Delegation Tokens To prevent bottlenecks at the KDC Hadoop uses

various tokens internally. Delegation Token Job Token Block Access Token

SASL with a RPC Digest mechanism

Page 17: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

17

New Workflow Manager Oozie Users authenticate using some “pluggable”

authentication mechanism Oozie is a superuser and able to communicate with

Job Trackers and Name Nodes on behalf of the user.

Page 18: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

18

Stated Limitations Users cannot have administrator access to nodes in

the cluster HDFS will not transmit data over an untrusted

networks MapReduce will not transmit data over an untrusted

networks Security changes will not impact GridMix

performance by more than 3%.

Page 19: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

ConcernsQuality of Protection (QoP)Massive Scale Symmetric CryptographyPluggable Web UI AuthenticationIP Based Authentication

Page 20: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

20

Quality of Protection (QoP)

AuthenticationIntegrityPrivacy

Page 21: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

21

Symmetric Cryptography Block Access Tokens are used to access data TokenAuthenticator = HMAC-SHA1(key, TokenID) The secret key must be shared between the Name

Nodes and all of the Data Nodes SHARED WITH ALL OF THE DATA NODES!!! That is a

lot of nodes.

Page 22: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

22

Pluggable Web UI Authentication There are multiple web Uis

Oozie Job Tracker Task Tracker

With no standard HTTP authentication mechanism I hope your developers are up to it.

Page 23: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

23

IP Based Authentication HDFS proxies use the HSFTP protocol for bulk data

transfers HDFS proxies are authenticated by IP address

Page 24: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

Alternative StrategiesTahoe

Page 25: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

25

Tahoe - A Least Authority File System Deserves its own talk

Aaron Cordova gave one at Hadoop World NYC 2009

Disk is not trusted Network is not trusted Memory is trusted Intended for use in Infrastructure as a Service cloud

computing environments Write performance is terrible but read performance is

not so bad

Page 26: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

Assessing HadoopTargetsTokens

Page 27: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

27

Targets Oozie is a superuser capable of performing any

operation as any user Name Nodes or Data Nodes can give access to all of

the data stored in HDFS by obtaining the shared “secret key”

Data may be transmitted over insecure transports including HSFTP, FTP and HTTP

Stealing the IP of an HDFS Proxy could allow one to extract large amounts of data quickly

Page 28: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

28

Tokens: Gotta Catch ‘em All Kerberos Ticket Granting Token Delegation Token

Get the Shared Key if Possible

Job Token Get the Shared Key if Possible

Block Access Token Get the Shared Key if Possible

Page 29: Hadoop Security Design? - Black Hat · Oozie is a superuser capable of performing any operation as any user Name Nodes or Data Nodes can give access to all of the data stored in HDFS

29

Thank you for [email protected]