42
How to Secure Mainframe TCP/IP Stu Henderson [email protected] 5702 Newington Road www.stuhenderson.com Bethesda, MD 20816 (301) 229-7187

How to Secure Mainframe TCP/IP - Stu · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson [email protected] 5702 Newington Road Bethesda, MD 20816

  • Upload
    vucong

  • View
    223

  • Download
    2

Embed Size (px)

Citation preview

Page 1: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

How to Secure Mainframe TCP/IP

Stu Henderson [email protected]

5702 Newington Road www.stuhenderson.com

Bethesda, MD 20816 (301) 229-7187

Page 2: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

2

Most mainframe data centers now have at

least one mainframe connected to TCP/IP, often with

some connection to the Internet. While the z/OS

software gives a large number of tools to secure

these connections, these tools often are not used. (If

you think you don't use TCP/IP with your z/OS

systems, try issuing the TSO command NETSTAT.)

In this session, Stu explains IP and TCP

clearly, describes the security risks and the security

tools you already have for free with z/OS, and shows

you how to go about implementing the tools. You will

learn why z/OS is considered the "most securable

TCP/IP platform available". You will also learn how to

make yours effectively secured.

ABSTRACT

Page 3: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

3

1. Introduction

2. The Risks

3. The Protections

4. Summary: Call to Action

AGENDA

Page 4: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

1. Introduction

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

4

TCP/IP is:

How a program on one

computer shares data with a

program on a different

computer

Transmission Control Protocol

/ Internet Protocol

Page 5: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

An IP Address Is

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

5

A number like: 206.188.192.243

Contained within each TCP/IP message

Used to route each message to its destination computer

Often mapped to a DNS name like www.stuhenderson.com

Page 6: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

IP Address Routes the

Message to a Computer

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

6

IP ADDRESS

206.188.192.243

Page 7: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

IP Address Routes the

Message

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

7

IP ADDRESS

206.188.192.243

Page 8: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

You Can’t Control

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

8

The route your message takes as it is

passed from computer to computer

over the Internet.

Anyone in charge of any of those

computers is able to view your

message as it gets passed on.

Page 9: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Length of IP Message

To IP Address

From IP Address

IP Message Layout

IP Message

Data

Page 10: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

The Port Number

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

10

Identifies an application like email

or FTP

Is contained in the message itself

Is used to route the message once

it arrives at its destination

computer

Page 11: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

To Port #

From Port #

IP Message & TCP Packet

Layout

IP Message

Data

TCP

Data

IP MESSAGE

TCP PACKET

Page 12: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

To Port #

From Port #

IP Message Data

Contains TCP Packet Data

IP Message

Data

TCP

Data

Page 13: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

13

25 Email

Port

23 Remote

Login

Port

20 FTP

Port

# Other 1

TCP Ports

# Other 2

Page 14: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

To Port 25

IP Message

Arrives

TCP

Data

25 Email

23 Remote Login

20 FTP

TCP PACKET

Page 15: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

IP Address and DNS

Name

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

15

An IP Address is a number used to

route an IP message to a given

computer:

192.168.1.1

Can often be mapped to a DNS

name like www.stuhenderson.com

Page 16: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Port Number

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

16

Routes a message to the correct application (like email or file transfer)

For example, port 25 is often used for email.

Once an IP message arrives at the computer it is addressed to, TCP looks at the Port Number and hands the message to the program that handles that port number

Page 17: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

17

Overall Flow

www.stuhenderson.com to

206.188.192.243

25 Email

23 Remote Login

20 FTP

Page 18: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

How to Learn What’s Up

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

18

The TSO command NETSTAT will

tell you what TCP/IP connections

are running

Tells you:

To and from IP addresses

To and from Ports

Program names (such as DB2,

CICS, FTP, TN3270 MQ Series)

Page 19: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Are Mainframes at Risk?

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

19

Peter Hager notes a website with

over 700 mainframes providing

TN3270 access over the Internet.

Every day more IP addresses are

added

More than half allow access

without encryption

Page 20: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Is Your Mainframe Here?

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

20

Other mainframes listed on this

website enable logons with clear

text connection

(Peter’s website has more info on

risks of BYOD, letting users connect

to your mainframe from their

smartphones over TCP/IP)

Page 21: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

2. The Risks

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

21

Copying Sensitive Data

Unauthorized Port Opening

Port Scanning

DOS (Denial of Service)

Hijacking a Session

Page 22: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Copying Sensitive Data

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

22

Passwords, PII, PCI, HIPAA…

You can’t control the route your

message takes over the Internet

Protection: Encryption

Page 23: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Unauthorized Port

Opening

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

23

Unauthorized program opens a

port, listens for invites

The mainframe Internet hack in

Europe

Protection: Block the Ports and

Packet Filtering

Page 24: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Port Scanning

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

24

Hacker maps your system by

pinging every port to see what

software is behind it

Finds port backed by insecure

software

Protection: Intrusion Detection

(Recognizes Patterns) and

Software Quality

Page 25: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

DOS (Denial of Service)

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

25

Two Types:

Flood Attacks (Protection: Powerful

Computer, Intrusion Detection)

Buffer Overflow (Protection:

Software Quality Assurance)

Page 26: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Hijacking a Session

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

26

You can’t predict the route your message takes over the Internet

You think you’re talking to the other computer, but you’re actually talking to the hacker’s computer.

Protection: Encryption and Digital Certificates

Page 27: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

3. The Protections

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

27

Configuration Files

SERVAUTH

Encryption / Digital Certificates

PAGENT (Policy Agent)

Page 28: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Configuration Files

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

28

For TCP/IP itself

For FTP, Policy Agent, others

Provide for:

Blocking of ports

SERVAUTH calls

Encryption

Client authentication

Intrusion detection

Page 29: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

SERVAUTH

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

29

Resource Class with RACF, ACF2,

TopSecret

Restricts access to:

Ports and IP addresses

FTP

TCP/IP itself

TN3270

Other

Specified in configuration files

Page 30: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

Encryption / Digital

Certificates

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

30

SSL / TLS application transparent

(Any application can invoke it

based on configuration file)

Protects Data, Also: Client

Authentication, Non-Repudiation

Digital Certificates should be in

RACF, ACF2, TopSecret

Page 31: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

PAGENT (Policy Agent)

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

31

A Firewall For the Mainframe

Free with z/OS

Page 32: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

PAGENT Functions

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

32

IPSEC (Port Blocking and VPN)

Encryption

Intrusion Detection

Packet Filtering

Page 33: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

4. Summary: Call to

Action

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

33

Use TSO NETSTAT to learn what is

running

Is PAGENT running?

What else is running?

Page 34: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

4. Summary: Call to

Action

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

34

Review configuration files:

DB2: DSNZPARM

CICS: DFHSIT, TCPIPSERVICE

TCP/IP: PROFILE, TCPDATA

FTP: FTPDATA

TN3270 same as TCP/IP

Change control on configuration files (NewEra’s Image Focus and The Control Editor)

Page 35: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

4. Summary: Call to

Action

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

35

Who decides what data to

encrypt?

How do they decide?

What knowledge is relevant?

Page 36: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

4. Summary: Call to

Action

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

36

Review Policy Agent configuration

file

It points to other configuration files

for specific functions

Which functions do you want?

Page 37: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

4. Summary: Call to

Action

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

37

Review port control

How do you block the ports?

Who decides?

Page 38: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

4. Summary: Call to

Action

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

38

Watch red flags for auditors:

No baseline documents

DSO doesn’t know how TCP/IP is secured

No encryption over passwords

No change control

No risk assessment

Not using PAGENT

Digital certificates not in RACF, ACF2, TopSecret

Page 39: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

4. Summary: Call to

Action

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

39

Review the risks listed above

Use the tools listed above to manage the risks

Ensure change control

Clarify who is responsible, who has authority

Page 40: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

For More Information

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

40

ACF2, TopSecret Manuals from CA Technologies

RACF and z/OS Communications Server Manuals (www.ibm.com/servers/eserver/zseries/zos/bkserv/ )

Articles on FTP Security and SERVAUTH and Other Topics at www.stuhenderson.com/XARTSTXT.HTM

Page 41: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

For More Information

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

41

Mainframe Audit News and RACF User News at www.stuhenderson.com/Newsletters-Archive.html

Website listing mainframes accessible over the Internet http://mainframesproject.tumblr.com/

Page 42: How to Secure Mainframe TCP/IP - Stu  · PDF fileHow to Secure Mainframe TCP/IP Stu Henderson stu@stuhenderson.com 5702 Newington Road   Bethesda, MD 20816

For More Information

Stuart Henderson (c) 2014 www.stuhenderson.com 301-229-7187

42

Peter Hager’s website (BYOD and mainframe TCPIP) www.net-q.com

NewEra’s website (change control tools for configuration files) www.newera.com

Thanks for Your Kind Attention.

Questions to Stu Henderson

(301) 229-7187 [email protected]