CompTIA® Security+™ Review Guide

CompTIA® Security+™ Review Guide

CompTIA

®

Security+

Review Guide

CompTIA

®

Security+

Review Guide

James Michael Stewart

Senior Acquisitions Editor: Jeff Kellum

Development Editor: Amy Breguet

Technical Editors: Josh More and Buzz Murphy

Production Editor: Christine O’Connor

Copy Editor: Tiffany Taylor

Editorial Manager: Pete Gaughan

Vice President and Executive Group Publisher: Richard Swadley

Associate Publisher: Chris Webb

Media Project Manager 1: Laura Moss-Hollister

Media Associate Producer: Josh Frank

Media Quality Assurance: Doug Kuhn

Book Designers: Judy Fung and Bill Gibson

Proofreader: Louise Watson and Jenn Bennett, Word One New York

Indexer: Nancy Guenther

Project Coordinator, Cover: Todd Klemme

Cover Designer: Wiley

Copyright © 2014 by John Wiley & Sons, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-1-118-90137-3

ISBN: 978-1-118-90142-7 (ebk.)

ISBN: 978-1-118-92290-3 (ebk.)

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections

107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood

Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201)

748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services or to obtain technical support, please contact our

Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317)

572-4002.

Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.

Library of Congress Control Number: 2014930404

TRADEMARKS: Wiley and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission is a registered trademark of. CompTIA and Security+ are trademarks or registered trademarks of Computing Technology Industry Association, Inc. All other trademarks are the property of their respective owners. John Wiley &

Sons, Inc. is not associated with any product or vendor mentioned in this book.

10 9 8 7 6 5 4 3 2 1

Dear Reader,

Thank you for choosing CompTIA Security+ Review Guide. This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching.

Sybex was founded in 1976. More than 30 years later, we’re still committed to producing consistently exceptional books. With each of our titles, we’re working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best books available.

I hope you see all that refl ected in these pages. I’d be very interested to hear your comments and get your feedback on how we’re doing. Feel free to let me know what you think about this or any other Sybex book by sending me an email at

[email protected]

. If you think you’ve found a technical error in this book, please visit

http://sybex.custhelp.com

. Customer feedback is critical to our efforts at Sybex.

Chris Webb

Associate Publisher, Sybex

To Catharine Renee Stewart: Aw, it’s a helluva ride … Yeah, it’s a helluva life.

Acknowledgments

Thanks to all those at Sybex who continue to allow me to do what I enjoy most—impart knowledge to others. Thanks to Jeff Kellum, acquisitions editor, and the whole Sybex crew for professional juggling services adequately rendered. Thanks to my editors: developmental editor, Amy Breguet, and technical editor, Josh More. To my parents: Dave—Dad, I miss you; and Johnnie—Mom, thanks for your love and consistent support. To Mark: I have been and always shall be your friend. And fi nally, as always, to Elvis: you were pioneering in recognizing that everything is better with bacon!

About the Author

James Michael Stewart has been working with computers and technology since 1983

(although offi cially as a career since 1994). His work focuses on Windows, certifi cation, and security. Recently, Michael has been teaching job skill and certifi cation courses, such as CISSP, CEH, CHFI, and Security+. Michael has contributed to many Security+ focused materials, including exam preparation guides, practice exams, DVD video instruction, and courseware. In addition, Michael has co-authored numerous books on other security and IT certifi cation and administration topics. He has developed certifi cation courseware and training materials as well as presented these materials in the classroom. Michael holds numerous certifi cations, including Sec+, CISSP, and CEH. Michael graduated in 1992 from the

University of Texas at Austin with a bachelor’s degree in philosophy. Despite his degree, his computer knowledge is self-acquired, based on seat-of-the-pants, hands-on “street smarts” experience. You can reach Michael by email at [email protected]

.

Contents at a Glance

Introduction

Chapter

1 Network

Chapter

2

Chapter

3

Chapter

4

Chapter

5

Compliance and Operational Security

Threats and Vulnerabilities

Application, Data, and Host Security

Access Control and Identity Management

Chapter

6 Cryptography

Appendix

A

Appendix

B

Answers to Review Questions

About the Additional Study Tools page

Index xxv

1

69

155

225

267

299

359

367

371

Contents

Introduction xxv

Chapter 1 Network 1

1.1 Implement security configuration parameters on

network devices and other technologies 5

Firewalls 5

Routers 8

Switches 9

Load balancers 10

Proxies 11

Web security gateways

VPN concentrators

11

11

NIDS and NIPS

Protocol analyzers

Spam filter

All-in-one security appliances

Web application firewall vs. network firewall

Application aware devices

Exam Essentials

1.2 Given a scenario, use secure network

12

18

18

19

19

20

20

administration principles

Rule-based management

Firewall rules

VLAN management

Secure router configuration

Access control lists

23

24

Port security 24

802.1x 25

22

22

23

23

Flood guards

Loop protection

Implicit deny

Network separation

Log analysis

Unified Threat Management

Exam Essentials

1.3 Explain network design elements and components

DMZ 27

Subnetting 29

VLAN 31

NAT 32

Remote access 33

26

27

27

27

25

25

26

26

xiv

Contents

Chapter 2

Telephony 35

NAC 36

Virtualization 37

Cloud computing 37

Layered security / Defense in depth

Exam Essentials

39

39

1.4 Given a scenario, implement common protocols

and services 40

Protocols 40

Ports 51

OSI relevance 52

Exam Essentials

1.5 Given a scenario, troubleshoot security issues related

53

to wireless networking 56

WPA 59

WPA2 60

WEP 60

EAP 60

PEAP 61

LEAP 61

MAC filter 61

Disable SSID broadcast 61

TKIP 61

CCMP 62

Antenna placement 62

Power level controls

Captive portals

Antenna types

Site surveys

VPN (over open wireless)

Exam Essentials

Review Questions

62

63

63

63

64

64

66

Compliance and Operational Security 69

2.1 Explain the importance of risk-related concepts

Control types

False positives

False negatives

Importance of policies in reducing risk

Risk calculation

78

82

Quantitative vs. qualitative 85

Vulnerabilities 86

Threat vectors

Probability/threat likelihood

76

77

78

78

87

87

Contents

xv

Risk avoidance, transference, acceptance, mitigation,

deterrence 87

Risks associated with Cloud Computing

and Virtualization 89

Recovery time objective and recovery point objective 89

90 Exam Essentials

2.2 Summarize the security implications of

integrating systems and data with third parties

On-boarding/off-boarding business partners

Social media networks and/or applications

Interoperability agreements

92

92

93

93

Privacy considerations

Risk awareness

Unauthorized data sharing

Data ownership

Data backups

94

94

94

94

95

95 Follow security policy and procedures

Review agreement requirements to verify compliance

and performance standards

Exam Essentials

2.3 Given a scenario, implement appropriate risk-

mitigation strategies

95

95

Change management

Incident management

User rights and permissions reviews

Perform routine audits

Enforce policies and procedures to prevent data

loss or theft

96

96

98

99

99

Enforce technology controls

Exam Essentials

2.4 Given a scenario, implement basic forensic procedures

Order of volatility

Capture system image

Network traffic and logs

100

100

101

101

102

102

103

Capture video

Record time offset

103

103

Take hashes 104

Screenshots 104

Witnesses 104

Track man hours and expense

Chain of custody

Big data analysis

Exam Essentials

104

105

105

105

xvi

Contents

2.5 Summarize common incident response procedures 106

Preparation 106

Incident identification

Escalation and notification

106

107

Mitigation steps

Lessons learned

107

108

Reporting 108

Recovery/reconstitution procedures 108

First responder

Incident isolation

Data breach

Damage and loss control

Exam Essentials

2.6 Explain the importance of security-related

awareness and training

Security policy training and procedures

108

109

109

110

110

Role-based training

Personally identifiable information

Information classification

Data labeling, handling and disposal

Compliance with laws, best practices, and standards

User habits

New threats and new security trends/alerts

Use of social networking and P2P

111

112

113

113

113

117

118

118

120

121

Follow up and gather training metrics to

validate compliance and security posture

Exam Essentials

2.7 Compare and contrast physical security and

environmental controls

Environmental controls

Physical security

Control types

121

122

Exam Essentials

2.8 Summarize risk-management best practices

Business continuity concepts

Fault tolerance

Disaster recovery concepts

Exam Essentials

144

146

2.9 Given a scenario, select the appropriate control to

meet the goals of security 148

Confidentiality 148

Integrity 149

123

123

124

132

134

135

136

142

Contents

xvii

Chapter 3

Availability 150

Safety 151

Exam Essentials

Review Questions

152

153

Threats and Vulnerabilities 155

3.1 Explain types of malware 161

Adware 161

Virus 161

Spyware 162

Trojan 163

Rootkits 163

Backdoors 164

Logic bomb 165

Botnets 165

Ransomware 166

Polymorphic malware

Armored virus

166

166

Exam Essentials

3.2 Summarize various types of attacks

166

167

Man-in-the-middle 168

DDoS 168

DoS 170

Replay 172

Smurf attack 173

Spoofing 173

Spam 174

Phishing 174

Spim 175

Vishing 175

Spear phishing

Xmas attack

175

175

Pharming 176

Privilege escalation 176

Malicious insider threat

DNS poisoning and ARP poisoning

Transitive access

Client-side attacks

176

177

179

179

Password attacks

Typo squatting/URL hijacking

Watering hole attack

Exam Essentials

179

181

181

182

xviii

Contents

3.3 Summarize social engineering attacks and

the associated effectiveness with each attack

Shoulder surfing

Dumpster diving

184

185

185

Tailgating 186

Impersonation 186

Hoaxes 186

Whaling 186

Vishing 186

Principles (reasons for effectiveness)

Exam Essentials

186

188

3.4 Explain types of wireless attacks

Rogue access points

188

189

Jamming/Interference 189

Evil twin 191

War driving 191

Bluejacking 191

Bluesnarfing 192

War chalking 192

IV attack

Packet sniffing

Near field communication

Replay attacks

WEP/WPA attacks

WPS attacks

Exam Essentials

3.5 Explain types of application attacks

Cross-site scripting

SQL injection

LDAP injection

XML injection

195

195

196

196

Directory traversal/command injection

Buffer overflow

197

197

Integer overflow 198

Zero-day 198

192

193

193

193

193

193

194

194

Cookies and attachments

LSO (Locally Shared Objects)

Flash Cookies

Malicious add-ons

Session hijacking

Header manipulation

Arbitrary code execution/remote code execution

Exam Essentials

198

199

199

199

199

200

200

201

Contents

xix

Chapter 4

3.6 Analyze a scenario and select the appropriate

type of mitigation and deterrent techniques

Monitoring system logs

201

201

Hardening 202

Network security

Security posture

206

207

Reporting 209

Detection controls vs. prevention controls 210

Exam Essentials

3.7 Given a scenario, use appropriate tools and

211 techniques to discover security threats and vulnerabilities

Interpret results of security assessment tools

211

211

Tools 212

Risk calculations 215

Assessment types

Assessment technique

Exam Essentials

3.8 Explain the proper use of penetration

215

216

217 testing versus vulnerability scanning

Penetration testing

Vulnerability scanning

Black box

White box

Gray box

Exam Essentials

Review Questions

217

217

220

221

222

222

222

223

Application, Data, and Host Security 225

4.1 Explain the importance of application

security controls and techniques 229

Fuzzing 229

Secure coding concepts

Cross-site scripting prevention

229

230

Cross-site Request Forgery (XSRF) prevention

Application configuration baseline (proper settings)

Application hardening

Application patch management

230

231

231

231

NoSQL databases vs. SQL databases

Server-side vs. Client-side validation

Exam Essentials

4.2 Summarize mobile security concepts and technologies

Device security

Application security

232

234

234

235

236

239

xx

Contents

Chapter 5

BYOD concerns

Exam Essentials

241

244

4.3 Given a scenario, select the appropriate solution to

establish host security

Operating system security and settings

OS hardening

244

244

245

Anti-malware 245

Patch management

Whitelisting vs. blacklisting applications

Trusted OS

Host-based firewalls

246

246

246

246

Host-based intrusion detection

Hardware security

Exam Essentials

4.4 Implement the appropriate controls to

247

247

Host software baselining 249

Virtualization 249

250

ensure data security

Cloud storage

251

251

SAN 251

Handling big data 251

Data encryption

Hardware-based encryption devices

251

254

Data in transit, Data at rest, Data in use 255

Permissions/ACL 255

Data policies

Exam Essentials

256

257

4.5 Compare and contrast alternative methods to

mitigate security risks in static environments 257

Environments 257

Methods 260

Exam Essentials 262

Review Questions 263

Access Control and Identity Management 267

5.1 Compare and contrast the function and

purpose of authentication services 270

RADIUS 270

TACACS+ 271

Kerberos 271

LDAP 273

XTACACS 274

Contents

xxi

SAML 274

Secure LDAP 275

Exam Essentials

5.2 Given a scenario, select the appropriate

275 authentication, authorization, or access control

Identification vs. authentication vs. authorization

275

276

Authorization 276

Authentication 280

Authentication factors 285

Identification 285

Federation 287

Transitive trust/authentication 287

Exam Essentials

5.3 Install and configure security controls when

287

289 performing account management, based on best practices

Mitigate issues associated with users with

multiple account/roles and/or shared accounts

Account policy enforcement

Group-based privileges

User-assigned privileges

User access reviews

Continuous monitoring

Exam Essentials

Review Questions

290

291

294

294

294

294

295

296

Chapter 6 Cryptography 299

6.1 Given a scenario, utilize general cryptography concepts

Symmetric vs. asymmetric

Session keys

In-band vs. out-of-band key exchange

302

304

307

308

Fundamental differences and encryption methods

Transport encryption

308

309

Non-repudiation 315

Hashing 315

Key escrow 319

Steganography 323

Digital signatures

Use of proven technologies

323

324

Elliptic curve and quantum cryptography

Ephemeral key

Perfect forward secrecy

Exam Essentials

325

325

325

326

xxii

Contents

Appendix A

6.2 Given a scenario, use appropriate cryptographic methods 331

WEP vs. WPA/WPA2 and preshared key 331

MD5 331

SHA 332

RIPEMD 333

AES 333

DES 334

3DES 335

HMAC 336

RSA 336

Diffie-Hellman 336

RC4 336

One-time pads 337

NTLM 337

NTLMv2 338

Blowfish 338

PGP/GPG 338

Twofish 338

DHE 338

ECDHE 339

CHAP 339

PAP 340

Comparative strengths and performance of algorithms

Use of algorithms/protocols with transport encryption

340

340

Cipher suites

Key stretching

Exam Essentials

6.3 Given a scenario, use appropriate PKI,

341

342

343

certificate management, and associated components

Certificate authorities and digital certificates

344

344

PKI 350

Recovery agent 350

Public key

Private key

350

350

Registration 351

Key escrow 351

Trust models

Exam Essentials

Review Questions

351

353

356

Answers to Review Questions

Chapter 1: Network Security

Chapter 2: Compliance and Operational Security

Chapter 3: Threats and Vulnerabilities

359

360

360

361

Contents

xxiii

Appendix B

Index

Chapter 4: Application, Data, and Host Security

Chapter 5: Access Control and Identity Management

Chapter 6: Cryptography

362

363

364

About the Additional Study Tools 367

Additional Study Tools

Sybex Test Engine

Electronic Flashcards

PDF of Glossary of Terms

368

368

368

368

Adobe Reader

System Requirements

368

369

Using the Study Tools 369

Troubleshooting 369

Customer Care 370

371

Introduction

The Security+ certifi cation program was developed by the Computer Technology Industry

Association (CompTIA) to provide an industry-wide means of certifying the competency of computer service technicians in the basics of computer security. The Security+ certifi cation is granted to those who have attained the level of knowledge and security skills that show a basic competency with security needs of both personal and corporate computing environments. CompTIA’s exam objectives are periodically updated to keep their exams applicable to the most recent developments. The most recent update, labeled as SY0–401, occurred in spring 2014. This book focuses on these newly revised certifi cation objectives.

What Is Security+ Certification?

The Security+ certifi cation was created to offer an introductory step into the complex world of IT security. You only need to pass a single exam to become Security+ certifi ed. However, obtaining this certifi cation doesn’t mean you can provide realistic security services to a company. In fact, this is just the fi rst step toward true security knowledge and experience.

By obtaining Security+ certifi cation, you should be able to acquire more security experience in order to pursue more complex and in-depth security knowledge and certifi cation.

For the latest pricing on the exam and updates to the registration procedures, please visit www.vue.com

. If you have further questions about the scope of the exams or related

CompTIA programs, refer to the CompTIA website at www.comptia.org.

Is This Book for You?

CompTIA Security+ Review Guide: SY0-401 is designed to be a succinct, portable exam review guide. It can be used in conjunction with a more complete Security+

2014 study guide, such as Sybex’s CompTIA Security+ Study Guide: SY0-401 (ISBN:

9781118875070), computer-based training (CBT) courseware, and a classroom/lab environment; or as an exam review for those who don’t feel the need for more extensive test preparation. It isn’t our goal to give away the answers, but rather to identify those topics on which you can expect to be tested and to provide suffi cient coverage of these topics.

Perhaps you’ve been working with information technologies for years. The thought of paying lots of money for a specialized IT exam-preparation course probably doesn’t sound appealing. What can they teach you that you don’t already know, right? Be careful, though—many experienced network administrators have walked confi dently into the test center only to walk sheepishly out of it after failing an IT exam. After you’ve fi nished reading this book, you should have a clear idea of how your understanding of the technologies involved matches up with the expectations of the Security+ test makers.

Or perhaps you’re relatively new to the world of IT, drawn to it by the promise of challenging work and higher salaries. You’ve just waded through an 800-page study guide or taken a week-long class at a local training center. Lots of information to keep track of, isn’t there? Well, by organizing this book according to CompTIA’s exam objectives, and by

xxvi

Introduction breaking up the information into concise, manageable pieces, we’ve created what we think is the handiest exam review guide available. Throw it in your briefcase and carry it to work with you. As you read the book, you’ll be able to quickly identify those areas you know best and those that require a more in-depth review.

How Is This Book Organized?

This book is organized according to the offi cial objectives list prepared by CompTIA for the Security+ exam. The chapters correspond to the six major domains of objective and topic groupings. The exam is weighted across these six domains (topical areas) as follows:

1.0: Network Security (20%)

2.0: Compliance and Operational Security (18%)

3.0: Threats and Vulnerabilities (20%)

4.0: Application, Data, and Host Security (15%)

5.0: Access Control and Identity Management (15%)

6.0: Cryptography (12%)

Within each chapter, the top-level exam objectives from each domain are addressed in turn. In addition to a thorough review of each objective, every chapter includes two specifi c features: Exam Essentials and Review Questions.

Exam Essentials At the end of each top-level objective section, you’re given a short list of topics that you should explore fully before taking the test. Included in the Exam Essentials areas are notations of the key information you should have taken from that section, or from the corresponding content in the CompTIA Security+ Study Guide.

Review Questions This feature ends every chapter and provides 10 questions to help you gauge your mastery of the chapter.

How to Use the Companion Website

We’ve included several additional test-preparation features on the companion website.

These tools will help you retain vital exam content as well as prepare you to sit for the actual exams:

You can download the study tools at www.sybex.com/go/securityplusrg.

Test Engine We’ve also included the Sybex Test Engine. Using this custom test engine, you can identify weak areas up front and then develop a solid studying strategy using each of these robust testing features. Our thorough readme fi le will walk you through the quick, easy installation process. There are two practice exams. Take these practice exams just as if you were taking the actual exam (without any reference material). When you’ve fi nished the fi rst exam, move on to the next one to solidify your test-taking skills. If you get more than

90 percent of the answers correct, you’re ready to take the certifi cation exams.

Introduction

xxvii

Electronic Flashcards You’ll fi nd fl ashcards for on-the-go review. These are short questions and answers, just like the fl ashcards you probably used to study in school. You can answer them on your PC or download them onto a portable device for quick and convenient reviewing.

Glossary of Terms in PDF From the companion website, we have included a very useful glossary of terms in PDF format so you can easily read it on any computer. If you have to travel and brush up on any key terms, you can do so with this useful resource.

Minimum System Requirements

You should have a minimum of Windows XP or higher, 45 MB of disk space, and 500 MB of RAM in order to use the Sybex Test Engine. You will also need Adobe Reader (downloadable from www.adobe.com

) for the glossary.

Tips for Taking the Security+ Exams

Here are some general tips for taking your exams successfully:

Bring two forms of ID with you. One must be a photo ID, such as a driver’s license. The other can be a major credit card or a passport. Both forms must include a signature.

Arrive early at the exam center so you can relax and review your study materials, particularly tables and lists of exam-related information.

Read the questions carefully. Don’t be tempted to jump to an early conclusion. Make sure you know exactly what the question is asking.

You can move forward and backward through the exam, but only one question at a time. You can only move forward once you have given the current question an answer.

Only after seeing the Review Page after the last question can you jump around questions at random.

Don’t leave any unanswered questions. Unanswered questions give you no opportunity for guessing correctly and scoring more points. Watch your clock: If you have not seen your last question when you have 5 minutes left, guess at the remaining questions.

There will be questions with multiple correct responses. When there is more than one correct answer, a message on the screen will prompt you to either “Choose two” or “Choose all that apply.” Be sure to read the messages displayed so you know how many correct answers you must choose.

Questions needing only a single correct answer will use radio buttons to select an answer, whereas those needing two or more answers will use check boxes.

When answering multiple-choice questions you’re not sure about, use a process of elimination to get rid of the obviously incorrect answers first. Doing so will improve your odds if you need to make an educated guess.

xxviii

Introduction

For the latest pricing on the exams and updates to the registration procedures, visit

CompTIA’s website at www.comptia.org

.

Performance-Based Questions

CompTIA has begun to include performance-based questions on its exams. These differ from the traditional multiple-choice questions, in that the candidate is expected to perform a task or series of tasks. Tasks could include fi lling in a blank, answering questions based on a video or an image, reorganizing a set into an order, or fi lling in fi elds based on a given situation or set of conditions. Don’t be surprised if on the exams you are presented with a scenario and asked to complete a task. For an offi cial description of performance-based questions from CompTIA, visit http://certification.comptia.org/news/2012/10/09/

What_Is_A_Performance-Based_Question.aspx

.

Exam Specifics

The Security+ SY0-401 exam consists of up to 90 questions with a time allotment of 90 minutes for the exam itself. Additional time is provided for the pre-exam elements, such as the NDA, and the post-exam survey. To pass, you must score at least 750 points on a scale of 100–900. At the completion of your test, you will receive a printout of your test results. This report will show your score and the objective topics about which you missed a question.

These details are subject to change. For current information, please consult the CompTIA website: www.comptia.org.

How to Contact the Publisher

Sybex welcomes feedback on all of its titles. Visit the Sybex website at www.sybex.com

for book updates and additional certifi cation information. You’ll also fi nd forms you can use to submit comments or suggestions regarding this or any other Sybex title.

The Security+ Exam Objectives

For easy reference and clarifi cation, the following is a complete listing of Security+ objectives. Also, we organized this book to correspond with the offi cial objectives list. We use the objective list’s order and organization throughout the book. Each domain is covered in one chapter. Each sub-objective is a heading within a chapter.

Exam objectives are subject to change at any time without prior notice and at CompTIA’s sole discretion. Please visit the Security+ Certification page of CompTIA’s website ( www.comptia.org

) for the most current listing of exam objectives.

Introduction

xxix

Domain 1.0 Network Security

1.1 Implement security confi guration parameters on network devices and other technologies.

Firewalls

Routers

Switches

Load balancers

Proxies

Web security gateways

VPN concentrators

NIDS and NIPS

Behavior-based

Signature-based

Anomaly-based

Heuristic

Protocol analyzers

Spam filter

All-in-one security appliances

URL filter

Content inspection

Malware inspection

Web application firewall vs. network firewall

Application aware devices

Firewalls

IPS

IDS

Proxies

1.2 Given a scenario, use secure network administration principles.

Rule-based management

Firewall rules

VLAN management

Secure router configuration

Access control lists

xxx

Introduction

Port security

802.1x

Flood guards

Loop protection

Implicit deny

Network separation

Log analysis

Unified Threat Management

1.3 Explain network design elements and components.

DMZ

Subnetting

VLAN

NAT

Remote access

Telephony

NAC

Virtualization

Cloud computing

Platform as a service

Software as a service

Infrastructure as a service

Private

Public

Hybrid

Community

Layered security/Defense in depth

1.4 Given a scenario, implement common protocols and services.

Protocols

IPSec

SNMP

SSH

DNS

TLS

SSL

Introduction

xxxi

NetBIOS

Ports

21

22

25

53

80

110

139

143

443

3389

OSI relevance

TCP/IP

FTPS

HTTPS

SCP

ICMP

IPv4

IPv6 iSCSI

Fibre Channel

FCoE

FTP

SFTP

TFTP

TELNET

HTTP

1.5 Given a scenario, troubleshoot security issues related to wireless networking.

WPA

WPA2

WEP

EAP

xxxii

Introduction

PEAP

LEAP

MAC filter

Disable SSID broadcast

TKIP

CCMP

Antenna placement

Power level controls

Captive portals

Antenna types

Site surveys

VPN (over open wireless)

Domain 2.0 Compliance and Operational Security

2.1 Explain the importance of risk related concepts.

Control types

Technical

Management

Operational

False positives

False negatives

Importance of policies in reducing risk

Privacy policy

Acceptable use

Security policy

Mandatory vacations

Job rotation

Separation of duties

Least privilege

Risk calculation

Likelihood

ALE

Impact

Introduction

xxxiii

SLE

ARO

MTTR

MTTF

MTBF

Quantitative vs. qualitative

Vulnerabilities

Threat vectors

Probability/threat likelihood

Risk-avoidance, transference, acceptance, mitigation, deterrence

Risks associated with Cloud Computing and Virtualization

Recovery time objective and recovery point objective

2.2 Summarize the security implications of integrating systems and data with third parties.

On-boarding/off-boarding business partners

Social media networks and/or applications

Interoperability agreements

SLA

BPA

MOU

ISA

Privacy considerations

Risk awareness

Unauthorized data sharing

Data ownership

Data backups

Follow security policy and procedures

Review agreement requirements to verify compliance and performance standards

2.3 Given a scenario, implement appropriate risk mitigation strategies.

Change management

Incident management

User rights and permissions reviews

Perform routine audits

xxxiv

Introduction

Enforce policies and procedures to prevent data loss or theft

Enforce technology controls

Data Loss Prevention (DLP)

2.4 Given a scenario, implement basic forensic procedures.

Order of volatility

Capture system image

Network traffic and logs

Capture video

Record time offset

Take hashes

Screenshots

Witnesses

Track man hours and expense

Chain of custody

Big data analysis

2.5 Summarize common incident response procedures.

Preparation

Incident identification

Escalation and notification

Mitigation steps

Lessons learned

Reporting

Recovery/reconstitution procedures

First responder

Incident isolation

Quarantine

Device removal

Data breach

Damage and loss control

2.6 Explain the importance of security-related awareness and training.

Security policy training and procedures

Role-based training

Introduction

xxxv

Personally identifiable information

Information classification

High

Medium

Low

Confidential

Private

Public

Data labeling, handling, and disposal

Compliance with laws, best practices, and standards

User habits

Password behaviors

Data handling

Clean-desk policies

Prevent tailgating

Personally owned devices

New threats and new security trends/alerts

New viruses

Phishing attacks

Zero-day exploits

Use of social networking and P2P

Follow up and gather training metrics to validate compliance and security posture

2.7 Compare and contrast physical security and environmental controls.

Environmental controls

HVAC

Fire suppression

EMI shielding

Hot and cold aisles

Environmental monitoring

Temperature and humidity controls

Physical security

Hardware locks

Mantraps

xxxvi

Introduction

Video Surveillance

Fencing

Proximity readers

Access list

Proper lighting

Signs

Guards

Barricades

Biometrics

Protected distribution (cabling)

Alarms

Motion detection

Control types

Deterrent

Preventive

Detective

Compensating

Technical

Administrative

2.8 Summarize risk-management best practices.

Business continuity concepts

Business impact analysis

Identification of critical systems and components

Removing single points of failure

Business continuity planning and testing

Risk assessment

Continuity of operations

Disaster recovery

IT contingency planning

Succession planning

High availability

Redundancy

Tabletop exercises

Introduction

xxxvii

Fault tolerance

Hardware

RAID

Clustering

Load balancing

Servers

Disaster recovery concepts

Backup plans/policies

Backup execution/frequency

Cold site

Hot site

Warm site

2.9 Given a scenario, select the appropriate control to meet the goals of security.

Confidentiality

Encryption

Access controls

Steganography

Integrity

Hashing

Digital signatures

Certificates

Non-repudiation

Availability

Redundancy

Fault tolerance

Patching

Safety

Fencing

Lighting

Locks

CCTV

Escape plans

xxxviii

Introduction

Drills

Escape routes

Testing controls

Domain 3.0 Threats and Vulnerabilities

3.1 Explain types of malware.

Adware

Virus

Spyware

Trojan

Rootkits

Backdoors

Logic bomb

Botnets

Ransomware

Polymorphic malware

Armored virus

3.2 Summarize various types of attacks.

Man-in-the-middle

DDoS

DoS

Replay

Smurf attack

Spoofing

Spam

Phishing

Spim

Vishing

Spear phishing

Xmas attack

Pharming

Privilege escalation

Malicious insider threat

Introduction

xxxix

DNS poisoning and ARP poisoning

Transitive access

Client-side attacks

Password attacks

Brute force

Dictionary attacks

Hybrid

Birthday attacks

Rainbow tables

Typo squatting/URL hijacking

Watering hole attack

3.3 Summarize social engineering attacks and the associated effectiveness with each attack.

Shoulder surfing

Dumpster diving

Tailgating

Impersonation

Hoaxes

Whaling

Vishing

Principles (reasons for effectiveness)

Authority

Intimidation

Consensus/Social proof

Scarcity

Urgency

Familiarity/liking

Trust

3.4 Explain types of wireless attacks.

Rogue access points

Jamming/interference

Evil twin

War driving

xl

Introduction

Bluejacking

Bluesnarfing

War chalking

IV attack

Packet sniffing

Near field communication

Replay attacks

WEP/WPA attacks

WPS attacks

3.5 Explain types of application attacks.

Cross-site scripting

SQL injection

LDAP injection

XML injection

Directory traversal/command injection

Buffer overflow

Integer overflow

Zero-day

Cookies and attachments

LSO (Locally Shared Objects)

Flash cookies

Malicious add-ons

Session hijacking

Header manipulation

Arbitrary code execution/remote code execution

3.6 Analyze a scenario and select the appropriate type of mitigation and deterrent techniques.

Monitoring system logs

Event logs

Audit logs

Security logs

Access logs

Introduction

xli

Hardening

Disabling unnecessary services

Protecting management interfaces and applications

Password protection

Disabling unnecessary accounts

Network security

MAC limiting and filtering

802.1x

Disabling unused interfaces and unused application service ports

Rogue machine detection

Security posture

Initial baseline configuration

Continuous security monitoring

Remediation

Reporting

Alarms

Alerts

Trends

Detection controls vs. prevention controls

IDS vs. IPS

Camera vs. guard

3.7 Given a scenario, use appropriate tools and techniques to discover security threats and vulnerabilities.

Interpret results of security assessment tools

Tools

Protocol analyzer

Vulnerability scanner

Honeypots

Honeynets

Port scanner

xlii

Introduction

Passive vs. active tools

Banner grabbing

Risk calculations

Threat vs. likelihood

Assessment types

Risk

Threat

Vulnerability

Assessment technique

Baseline reporting

Code review

Determine attack surface

Review architecture

Review designs

3.8 Explain the proper use of penetration testing versus vulnerability scanning.

Penetration testing

Verify a threat exists

Bypass security controls

Actively test security controls

Exploiting vulnerabilities

Vulnerability scanning

Passively testing security controls

Identify vulnerability

Identify lack of security controls

Identify common misconfigurations

Intrusive vs. non-intrusive

Credentialed vs. non-credentialed

False positive

Black box

White box

Gray box

Introduction

xliii

Domain 4.0 Application, Data, and Host Security

4.1 Explain the importance of application security controls and techniques.

Fuzzing

Secure coding concepts

Error and exception handling

Input validation

Cross-site scripting prevention

Cross-site Request Forgery (XSRF) prevention

Application configuration baseline (proper settings)

Application hardening

Application patch management

NoSQL databases vs. SQL databases

Server-side vs. Client-side validation

4.2 Summarize mobile security concepts and technologies.

Device security

Full device encryption

Remote wiping

Lockout

Screen locks

GPS

Application control

Storage segmentation

Asset tracking

Inventory control

Mobile device management

Device access control

Removable storage

Disabling unused features

Application security

Key management

Credential management

Authentication

Geo-tagging

xliv

Introduction

Encryption

Application whitelisting

Transitive trust/authentication

BYOD concerns

Data ownership

Support ownership

Patch management

Antivirus management

Forensics

Privacy

On-boarding/off-boarding

Adherence to corporate policies

User acceptance

Architecture/infrastructure considerations

Legal concerns

Acceptable use policy

On-board camera/video

4.3 Given a scenario, select the appropriate solution to establish host security.

Operating system security and settings

OS hardening

Anti-malware

Antivirus

Anti-spam

Anti-spyware

Pop-up blockers

Patch management

Whitelisting vs. blacklisting applications

Trusted OS

Host-based firewalls

Host-based intrusion detection

Hardware security

Cable locks

Safe

Locking cabinets

Introduction

xlv

Host software baselining

Virtualization

Snapshots

Patch compatibility

Host availability/elasticity

Security control testing

Sandboxing

4.4 Implement the appropriate controls to ensure data security.

Cloud storage

SAN

Handling big data

Data encryption

Full disk

Database

Individual files

Removable media

Mobile devices

Hardware-based encryption devices

TPM

HSM

USB encryption

Hard drive

Data in transit, Data at rest, Data in use

Permissions/ACL

Data policies

Wiping

Disposing

Retention

Storage

4.5 Compare and contrast alternative methods to mitigate security risks in static environments.

Environments

SCADA

Embedded (printer, Smart TV, HVAC control)

xlvi

Introduction

Android iOS

Mainframe

Game consoles

In-vehicle computing systems

Methods

Network segmentation

Security layers

Application firewalls

Manual updates

Firmware version control

Wrappers

Control redundancy and diversity

Domain 5.0 Access Control and Identity Management

5.1 Compare and contrast the function and purpose of authentication services.

RADIUS

TACACS+

Kerberos

LDAP

XTACACS

SAML

Secure LDAP

5.2 Given a scenario, select the appropriate authentication, authorization or access control.

Identification vs. authentication vs. authorization

Authorization

Least privilege

Separation of duties

ACLs

Mandatory access

Discretionary access

Rule-based access control

Introduction

xlvii

Role-based access control

Time of day restrictions

Authentication

Tokens

Common access card

Smart card

Multifactor authentication

TOTP

HOTP

CHAP

PAP

Single sign-on

Access control

Implicit deny

Trusted OS

Authentication factors

Something you are

Something you have

Something you know

Somewhere you are

Something you do

Identification

Biometrics

Personal identification verification card

Username

Federation

Transitive trust/authentication

5.3 Install and confi gure security controls when performing account management, based on best practices.

Mitigate issues associated with users with multiple account/roles and/or shared accounts

Account policy enforcement

Credential management

Group policy

xlviii

Introduction

Password complexity

Expiration

Recovery

Disablement

Lockout

Password history

Password reuse

Password length

Generic account prohibition

Group-based privileges

User-assigned privileges

User access reviews

Continuous monitoring

Domain 6.0 Cryptography

6.1 Given a scenario, utilize general cryptography concepts.

Symmetric vs. asymmetric

Session keys

In-band vs. out-of-band key exchange

Fundamental differences and encryption methods

Block vs. stream

Transport encryption

Non-repudiation

Hashing

Key escrow

Steganography

Digital signatures

Use of proven technologies

Elliptic curve and quantum cryptography

Ephemeral key

Perfect forward secrecy

Introduction

xlix

6.2 Given a scenario, use appropriate cryptographic methods.

WEP vs. WPA/WPA2 and preshared key

MD5

SHA

RIPEMD

AES

DES

3DES

HMAC

RSA

Diffie-Hellman

RC4

One-time pads

NTLM

NTLMv2

Blowfish

PGP/GPG

TwoFish

DHE

ECDHE

CHAP

PAP

Comparative strengths and performance of algorithms

Use of algorithms/protocols with transport encryption

SSL

TLS

IPSec

SSH

HTTPS

Cipher suites

Strong vs. weak ciphers

l

Introduction

Key stretching

PBKDF2

Bcrypt

6.3 Given a scenario, use appropriate PKI, certifi cate management, and associated components.

Certificate authorities and digital certificates

CA

CRLs

OCSP

CSR

PKI

Recovery agent

Public key

Private key

Registration

Key escrow

Trust models

Security+ Acronyms

Here are the acronyms of security terms that CompTIA deems important enough that they’re included in the objectives list for the exam. We’ve repeated them here exactly as listed by CompTIA.

3DES—Triple Digital Encryption Standard

AAA—Authentication, Authorization, and Accounting

ACL—Access Control List

AES—Advanced Encryption Standard

AES256—Advanced Encryption Standards 256bit

AH—Authentication Header

ALE—Annualized Loss Expectancy

AP—Access Point

API—Application Programming Interface

ARO—Annualized Rate of Occurrence

Introduction

li

ARP—Address Resolution Protocol

ASP—Application Service Provider

AUP—Acceptable Use Policy

BAC—Business Availability Center

BCP—Business Continuity Planning

BIA—Business Impact Analysis

BIOS—Basic Input / Output System

BPA—Business Partners Agreement

BYOD—Bring Your Own Device

CA—Certifi cate Authority

CAC—Common Access Card

CAN—Controller Area Network

CAPTCHA—Completely Automated Public Turning Test to Tell Computers and

Humans Apart

CCMP—Counter-Mode/CBC-Mac Protocol

CCTV—Closed-circuit television

CERT—Computer Emergency Response Team

CHAP—Challenge Handshake Authentication Protocol

CIO—Chief Information Offi cer

CIRT—Computer Incident Response Team

COOP—Continuity of Operation Planning

CP—Contingency Planning

CRC—Cyclical Redundancy Check

CRL—Certifi cation Revocation List

CSR—Control Status Register

CSU—Channel Service Unit

CTO—Chief Technology Offi cer

DAC—Discretionary Access Control

DDOS—Distributed Denial of Service

DEP—Data Execution Prevention

DES—Digital Encryption Standard

DHCP—Dynamic Host Confi guration Protocol

DHE—Data-Handling Electronics

DLL—Dynamic Link Library

lii

Introduction

DLP—Data Loss Prevention

DMZ—Demilitarized Zone

DNAT—Destination Network Address Transaction

DNS—Domain Name Service (Server)

DOS—Denial of Service

DRP—Disaster Recovery Plan

DSA—Digital Signature Algorithm

DSL—Digital Subscriber line

DSU—Data Service Unit

EAP—Extensible Authentication Protocol

ECC—Elliptic Curve Cryptography

ECDHE—Elliptic Curve Diffi e-Hellman Key Exchange

EFS—Encrypted File System

EMI—Electromagnetic Interference

ESN—Electronic Serial Number

ESP—Encapsulated Security Payload

FTP—File Transfer Protocol

FTPS—Secured File Transfer Protocol

GPG—Global Property Guide

GPO—Group Policy Object

GPS—Global Positioning System

GPU—Graphic Processing Unit

GRE—Generic Routing Encapsulation

HDD—Hard Disk Drive

HIDS—Host Based Intrusion Detection System

HIPS—Host Based Intrusion Prevention System

HMAC—Hashed Message Authentication Code

HOTP—HMAC based One Time Password

HSM—Hardware Security Module

HTML—HyperText Markup Language

HTTP—Hypertext Transfer Protocol

HTTPS—Hypertext Transfer Protocol over SSL

HVAC—Heating, Ventilation Air Conditioning

IaaS—Infrastructure as a Service

Introduction

liii

ICMP—Internet Control Message Protocol

ID—Identifi cation

IDS—Intrusion Detection System

IKE—Internet Key Exchange

IM—Instant messaging

IMAP4—Internet Message Access Protocol v4

IP—Internet Protocol

IPSEC—Internet Protocol Security

IRC—Internet Relay Chat

IRP—Incident Response Procedure

ISA—Interconnection Security Agreement

ISP—Internet Service Provider

ISSO—Information Systems Security Offi cer

ITCP—IT Contingency Plan

IV—Initialization Vector

KDC—Key Distribution Center

L2TP—Layer 2 Tunneling Protocol

LAN—Local Area Network

LDAP—Lightweight Directory Access Protocol

LEAP—Lightweight Extensible Authentication Protocol

MaaS—Monitoring as a Service

MAC—Mandatory Access Control/Media Access Control

MAC—Message Authentication Code

MAN—Metropolitan Area Network

MBR—Master Boot Record

MD5—Message Digest 5

MOU—Memorandum of Understanding

MPLS—Multi-Protocol Layer Switch

MSCHAP—Microsoft Challenge Handshake Authentication Protocol

MTBF—Mean Time Between Failures

MTTR—Mean Time to Recover

MTTF—Mean Time to Failure

MTU—Maximum Transmission Unit

NAC—Network Access Control

liv

Introduction

NAT—Network Address Translation

NDA—Non-Disclosure Agreement

NIDS—Network Based Intrusion Detection System

NIPS—Network Based Intrusion Prevention System

NIST—National Institute of Standards & Technology

NOS—Network Operating System

NTFS—New Technology File System

NTLM—New Technology LANMAN

NTP—Network Time Protocol

OCSP—Online Certifi cate Status Protocol

OLA—Open License Agreement

OS—Operating System

OVAL—Open Vulnerability Assessment Language

P2P—Peer to Peer

PAM—Pluggable Authentication Modules

PAP—Password Authentication Protocol

PAT—Port Address Translation

PBKDF2—Password-Based Key Derivation Function 2

PBX—Private Branch Exchange

PCAP—Packet Capture

PEAP—Protected Extensible Authentication Protocol

PED—Personal Electronic Device

PGP—Pretty Good Privacy

PII—Personally Identifi able Information

PIV—Personal Identity Verifi cation

PKI—Public Key Infrastructure

POTS—Plain Old Telephone Service

PPP—Point-to-point Protocol

PPTP—Point-to-Point Tunneling Protocol

PSK—Pre-Shared Key

PTZ—Pan-Tilt-Zoom

RA—Recovery Agent

RAD—Rapid application development

RADIUS—Remote Authentication Dial-in User Server

Introduction

lv

RAID—Redundant Array of Inexpensive Disks

RAS—Remote Access Server

RBAC—Role-Based Access Control

RBAC—Rule-Based Access Control

RC4—RSA Variable Key Size Encryption Algorithm

RIPEMD—RACE Integrity Primitives Evaluation Message Digest

ROI—Return of Investment

RPO—Recovery Point Objective

RSA—Rivest, Shamir, & Adleman

RTO—Recovery Time Objective

RTP—Real-Time Transport Protocol

S/MIME—Secure/Multipurpose Internet Mail Extensions

SAML—Security Assertions Markup Language

SaaS—Software as a Service

SAN—Storage Area Network

SCADA—System Control and Data Acquisition

SCAP—Security Content Automation Protocol

SCEP—Simple Certifi cate Enrollment Protocol

SCSI—Small Computer System Interface

SDLC—Software Development Life Cycle

SDLM—Software Development Life Cycle Methodology

SEH—Structured Exception Handler

SFTP—Secured File Transfer Protocol

SHA—Secure Hashing Algorithm

SHTTP—Secure Hypertext Transfer Protocol

SIEM—Security Information and Event Management

SIM—Subscriber Identity Module

SLA—Service Level Agreement

SLE—Single Loss Expectancy

SMS—Short Message Service

SMTP—Simple Mail Transfer Protocol

SNMP—Simple Network Management Protocol

SOAP—Simple Object Access Point

SONET—Synchronous Optical Network Technologies

lvi

Introduction

SPIM—Spam over Internet Messaging

SQL—Structured Query Language

SSD—Solid State Drive

SSH—Secure Shell

SSL—Secure Sockets Layer

SSO—Single Sign On

STP—Shielded Twisted Pair

TACACS+—Terminal Access Controller Access Control System

TCP/IP—Transmission Control Protocol/Internet Protocol

TKIP—Temporal Key Integrity Protocol

TLS—Transport Layer Security

TOTP—Top of the Page

TPM—Trusted Platform Module

TSIG—Transaction Signature

UAT—User Acceptance Testing

UEFI—Unifi ed Extensible Firmware Interface

UDP—User Datagram Protocol

UPS—Uninterruptable Power Supply

URI—Uniform Resource Identifi er

URL—Universal Resource Locator

USB—Universal Serial Bus

UTM—Unifi ed Threat Management

UTP—Unshielded Twisted Pair

VDI—Virtualization Desktop Infrastructure

VLAN—Virtual Local Area Network

VoIP—Voice over IP

VPN—Virtual Private Network

VTC—Video Teleconferencing

WAF—Web-Application Firewall

WAP—Wireless Access Point

WEP—Wired Equivalent Privacy

WIDS—Wireless Intrusion Detection System

WIPS—Wireless Intrusion Prevention System

WPA—Wireless Protected Access

WPA2—WiFi Protected Access 2

WPS—WiFi Protected Setup

WTLS—Wireless TLS

XML—Extensible Markup Language

XSRF—Cross-Site Request Forgery

XSS—Cross-Site Scripting

Introduction

lvii

Chapter

1

Network Security

COMPTIA SECURITY+ EXAM OBJECTIVES

COVERED IN THIS CHAPTER INCLUDE THE

FOLLOWING:

1.1 Implement security configuration parameters on

network devices and other technologies.

Firewalls

Routers

Switches

Load balancers

Proxies

Web security gateways

VPN concentrators

NIDS and NIPS

Behavior-based

Signature-based

Anomaly-based

Heuristic

Protocol analyzers

Spam filter

All-in-one security appliances

URL filter

Content inspection

Malware inspection

Web application firewall vs. network firewall

Application aware devices

Firewalls

IPS

IDS

Proxies c01.indd 21/04/2014 Page 1

1.2 Given a scenario, use secure network administration

principles.

Rule-based management

Firewall rules

VLAN management

Secure router configuration

Access control lists

Port security

802.1x

Flood guards

Loop protection

Implicit deny

Network separation

Log analysis

Unified Threat Management

1.3 Explain network design elements and components.

DMZ

Subnetting

VLAN

NAT

Remote access

Telephony

NAC

Virtualization

Cloud computing

Platform as a service

Software as a service

Infrastructure as a service

Private

Public

Hybrid c01.indd 21/04/2014 Page 2

Community

Layered security / Defense in depth

1.4 Given a scenario, implement common protocols and

services.

Protocols

IPSec

SNMP

SSH

DNS

TLS

SSL

TCP/IP

FTPS

HTTPS

SCP

ICMP

IPv4

IPv6

■ iSCSI

Fibre Channel

FCoE

FTP

SFTP

TFTP

TELNET

HTTP

NetBIOS

Ports

21

22

25

53

80 c01.indd 21/04/2014 Page 3

110

139

143

443

3389

OSI relevance

1.5 Given a scenario, troubleshoot security issues related

to wireless networking.

WPA

WPA2

WEP

EAP

PEAP

LEAP

MAC filter

Disable SSID broadcast

TKIP

CCMP

Antenna placement

Power level controls

Captive portals

Antenna types

Site surveys

VPN (over open wireless) c01.indd 21/04/2014 Page 4

1.1 Implement security configuration parameters

5

The Security+ exam will test your basic IT security skills— those skills you need to effectively secure networked systems both for the home offi ce and in corporate environments. To pass the test and be effective in implementing security, you need to understand the basic concepts and terminology related to network security as detailed in this chapter.

1.1 Implement security configuration parameters on network devices and other technologies

Network devices are present in a network infrastructure for a variety of reasons. These include traffi c management, network segmentation, and network security. In this section,

I explore several security functions and purposes of network devices and technologies.

Firewalls

A fi rewall is a hardware or software component designed to protect one network from another (see Figure 1.1). Firewalls are deployed between areas of high and low trust, like a private network and a public network (such as the Internet), or between two networks that belong to the same organization but are from different departments. Firewalls provide protection by controlling traffi c entering and leaving a network.

F I G U R E 1 .1 A proxy firewall blocking network access from external networks

External

Network

Internal

Network

Proxy c01.indd 21/04/2014 Page 5

6

Chapter 1

Network Security

Firewalls manage traffi c using fi lters. A fi lter is just a rule or set of rules. Firewalls usually have lots of fi lters, which are defi ned in a priority order. If a packet meets the identifi cation criteria of a rule, then the action of that rule is applied. If a packet doesn’t meet the criteria of a rule, then no action from that rule is applied, and the next rule is checked.

The action of a fi lter rule is commonly allow, deny, or log. Many fi rewalls use a fi rstmatch mechanism when applying rules. Allow enables the packet to continue toward its destination. Deny blocks the packet from going any further (effectively discarding it). Log records information about the packet into a log fi le. However, some fi rewalls (such as iptables) allow for multiple rule matches.

Filter lists are created with the most specifi c and detailed rules fi rst, followed by successively more general rules, until a fi nal default universal rule is reached, which often specifi es a denial.

Therefore, if a packet fails to meet the criteria of any earlier rule, the last denial rule is always used. This way, only packets meeting the custom-defi ned fi lters or rules are allowed to cross the security barrier. In other words, most fi rewalls are deny-by-default security tools. However, some fi rewalls are used to supplement intrusion detection system (IDS) / intrusion prevention system (IPS) technologies and thus are run in an allow-by-default mode so as to only block malicious traffi c.

There are four basic types of fi rewalls:

Packet Filter A packet fi lter fi rewall fi lters traffi c based on basic identifi cation items found in a network packet’s header. This includes source and destination address, port numbers, and protocols used. Packet-fi ltering fi rewalls operate at the Network layer (Layer 3) and the

Transport layer (Layer 4) of the Open Systems Interconnect (OSI) model. They can also be called common routers.

Circuit-Level Gateway A circuit-level gateway fi rewall fi lters traffi c by fi ltering on the connection between an internal trusted host and an external untrusted host. This monitoring occurs at either the Network layer (Layer 3) or the Session layer (Layer 5) of the OSI model. This type of fi rewall ensures that the packets involved in establishing and maintaining the circuit (a virtual circuit or session) are valid and used in the proper manner. Once a circuit-level gateway allows a connection, no further fi ltering on that communication is performed.

Application-Level Gateway An application-level gateway fi rewall fi lters traffi c based on user access, group membership, the application or service used, or even the type of resources being transmitted. This type of fi rewall operates at the Application layer (Layer

7) of the OSI model. Such a fi rewall can be called a proxy. Application-level gateways are focused on the aspects of a specifi c appliance and protocol combination as well as the actual content of the conversation.

Stateful Inspection Firewall A stateful inspection fi rewall is aware that any valid outbound communication (especially related to TCP) will trigger a corresponding response or reply from the external entity. Thus, this type of fi rewall automatically creates a response rule for the replay on the fl y. But that rule exists only as long as the conversation is taking place. This is unlike the static packet fi lter fi rewall, which requires that both an outbound rule and an inbound rule be defi ned at all times.

c01.indd 21/04/2014 Page 6

1.1 Implement security configuration parameters

7

Additionally, stateful inspection fi rewalls can retain knowledge of previous packets in a conversation in order to detect unwanted or malicious traffi c that isn’t noticeable or detectable when evaluating only individual packets. This is known as context analysis or

contextual analysis.

A stateful inspection fi rewall may also perform deep packet inspection, which is the analysis of the payload or content of a packet. This could even include virtual reassembly of the original (or fi nal) payload through the recombination of the payloads across multiple packets.

Thus, a stateful inspection fi rewall can make more intelligent and complex fi ltering decisions based on higher-order information. One of the key functions of this type of fi rewall is to ensure that each packet is part of an established Transmission Control Protocol (TCP) communication session. All rogue, or unassociated, packets are blocked.

The fi rst step in effectively designing, deploying, and implementing a fi rewall is to design or develop a fi rewall policy: a security policy that focuses on the purposes, uses, functions, and security of the fi rewalls in an organization. This policy clearly defi nes how the fi rewall should fi lter traffi c and the types of traffi c that should be blocked or allowed.

Most fi rewalls are deployed with at least two network interfaces. Such fi rewalls are called dual-homed (see Figure 1.2) or multihomed (for two or more NICs). Dual- or multihomed fi rewalls provide a clear security distinction between one network and another; thus packets must successfully pass the fi lters of a fi rewall in order to move from one network to another. In this manner, fi rewalls provide strong and reliable security.

F I G U R E 1 . 2 A dual-homed firewall segregating two networks from each other

NIC Card

Network A Network B

NIC A NIC B

Make sure routing or IP forwarding is disabled in operating system.

Some fi rewalls with three or more network interfaces can manage access to multiple networks simultaneously. A common deployment uses one of these additional network interfaces to connect to a demilitarized zone (DMZ). The DMZ hosts publicly accessible servers, such as web or File Transfer Protocol (FTP). The fi rewall provides secured but public access to the

DMZ, but it prevents unauthorized access to the private network. If such a multihomed fi rewall is compromised, only the systems in the DMZ are directly threatened or exposed.

c01.indd 21/04/2014 Page 7

8

Chapter 1

Network Security

When a port is opened in a fi rewall to allow a virtual private network (VPN) connection to take place, keep in mind that all encrypted data will pass through the fi rewall without being inspected or fi ltered. Unless the fi rewall can see the unencrypted data, perhaps as a

VPN termination point, it can’t inspect the communication and, therefore, can’t provide security.

An ingress fi lter is a traffi c fi lter on packets coming into a secured area from outside

(that is, inbound communications). An egress fi lter is a traffi c fi lter on packets leaving a secured area toward the outside (outbound communications). Common ingress and egress fi lters perform the following functions:

Blocking inbound packets claiming to have an internal source address

Blocking outbound packets claiming to have an external source address

Blocking packets with source or destination addresses listed on a block list (a list of known malicious IPs)

Blocking packets that have source or destination addresses from the local area network

(LAN) but haven’t been officially assigned to a host

Additional fi rewall rules are added to these common spoofi ng-prevention and commonsense protections based on the needs of the organization and the design of the infrastructure.

Routers

A router (see Figure 1.3) is used to connect several network segments. Routers enable traffi c from one network segment to traverse into another network segment (see Figure 1.4).

However, the traffi c must pass through the router’s fi lters in order to make the transition.

A router with access control lists (ACLs) can be considered a simple fi rewall.

Routers direct traffi c based on a routing table and grant or deny access using ACLs, such as rules or fi lters. The routing table informs the router which direction to transmit a received packet based on the best-known pathway (route).

F I G U R E 1 . 3 A router connecting two networks, such as a LAN to a WAN

Network 1

A router physically isolates these two networks.

Network 2 c01.indd 21/04/2014 Page 8

1.1 Implement security configuration parameters

9

F I G U R E 1 . 4 A corporate network implementing routers for segmentation and security

Internal

Private

Networks

Internet

Internal

Private

Networks

Border

Router

Internal

Private

Networks

Routers can manage traffi c for both inbound and outbound communications. The router’s collection of information about the network is stored in a routing table. The routing table can be managed statically or by dynamic routing protocols.

Switches

A switch (see Figure 1.5) is a networking device used to connect many other devices together and potentially implement traffi c management on their communications.

F I G U R E 1 . 5 Switching between two systems

Switch

Private Circuit Private Circuit

PC PC

Switches generally link individual hosts, but they can also be used to link networks together. Switches receive signals in one port and transmit them out the port where the intended recipient is connected. Switches accomplish this traffi c-control task by maintaining a table of the media access control (MAC) addresses of devices located off each switch port. The switch examines the source MAC address of each packet it receives and records the MAC address and the related port in its MAC table. Thus the MAC table is dynamic and is constantly being updated. The switch analyzes the header of each packet it receives to determine the destination MAC address and then transmits each packet only out the port where that MAC address is known to reside. If a MAC address is encountered that isn’t known (it’s not in the MAC table), the unknown destination packet is transmitted out all ports except the ingress port.

c01.indd 21/04/2014 Page 9

10

Chapter 1

Network Security

Switches are good defenses against sniffi ng attacks from random clients within a network. Sniffi ng is the act of capturing network traffi c for analysis. Sniffi ng attacks occur when sniffi ng is done without authorization. Switches transmit messages only on those specifi c network links between the source and destination systems.

A sniffer can only intercept traffi c that happens to be transmitted on the segment it’s connected to. Thus, using switches instead of hubs is a great defense against sniffi ng.

However, there are logical and physical attacks to overcome this protection. If a hacker can gain physical access, he can connect to the audit/monitor/mirror ports or reconfi gure the switch to obtain full access to all data it sees. If a hacker has only logical (network) access to the switch, then a MAC fl ooding attack can overload a switch’s MAC table in order to drop valid MAC addresses and populate the table with invalid MAC addresses.

When this attack is successful, the switch may revert to a hub-like fault-tolerance mode, transmitting data out all ports instead of only a single port. This type of attack is often called active sniffi ng, because the hacker has to attack the switch (or sometimes hosts on the network with Address Resolution Protocol [ARP] fl ooding attacks) to obtain access to all network traffi c. Advanced switches have native IDS-like detection and defense features to prevent MAC fl ooding attacks from being successful.

Load balancers

A load balancer is used to spread or distribute network traffi c load across several network links or network devices. The purpose of load balancing is to obtain more optimal infrastructure utilization, minimize response time, maximize throughput, reduce overloading, and eliminate bottlenecks. Although load balancing can be used in a variety of situations, a common implementation is spreading a load across multiple members or a server farm or cluster. A load balancer might use a variety of techniques to perform load distribution, as described in Table 1.1.

TA B L E 1 .1 Common load-balancing techniques

Technique Description

Random choice Each packet or connection is assigned a destination randomly.

Round robin Each packet or connection is assigned the next destination in order, such as 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, and so on.

Load monitoring Each packet or connection is assigned a destination based on the current load or capacity of the targets. The device/path with the lowest current load receives the next packet or connection.

Preferencing Each packet or connection is assigned a destination based on a subjective preference or known capacity difference. For example, suppose system 1 can handle twice the capacity of systems 2 and 3; in this case, preferencing would look like 1, 2, 1, 3, 1, 2, 1, 3, 1, and so on.

c01.indd 21/04/2014 Page 10

1.1 Implement security configuration parameters

11

Load balancing can be a software service or a hardware appliance. Load balancing can also incorporate many other features, depending on the protocol or application, including caching, Secure Sockets Layer (SSL) offl oading, compression, buffering, error checking, fi ltering, and even fi rewall and IDS capabilities.

Proxies

A proxy server is a variation of an application fi rewall or circuit-level fi rewall. A proxy server is used as a proxy or middleman between clients and servers. Often a proxy serves as a barrier against external threats to internal clients. This is usually performed by utilizing network address translation (NAT). NAT hides the Internet Protocol (IP) confi guration of internal clients and substitutes the IP confi guration of the proxy server’s own public external network interface card (NIC) in outbound requests. This effectively prevents external hosts from learning the internal confi guration of the network. A proxy server typically has the default setting to ignore all external queries and only manage communications that are responses from previous queries. In addition to features such as NAT, proxy servers can provide caching and site or content fi ltering.

Web security gateways

A web security gateway is a web-content fi lter (often URL and content keyword based) that also supports malware scanning. In most cases, a web security gateway is implemented by an organization to provide better enforcement of employee web activity policies. Some web security gateways incorporate non-web features as well, including instant messaging (IM) fi ltering, email fi ltering, spam blocking, and spoofi ng detection.

VPN concentrators

A virtual private network (VPN) is a communication tunnel between two entities across an intermediary network. In most cases, the intermediary network is an untrusted network, such as the Internet, and therefore the communication tunnel is also encrypted. VPNs are discussed further in Chapter 6, under “Transport encryption.”

A VPN concentrator is a dedicated hardware device designed to support a large number of simultaneous VPN connections, often hundreds or thousands. It provides high availability, high scalability, and high performance for secure VPN connections. With the ever-increasing need for secured communications, VPNs have become an essential communications security tool for securing communications traversing private networks and the

Internet.

A VPN concentrator is often used as a specifi c product name but can also be called a

VPN server, a VPN gateway, a VPN fi rewall, a VPN remote access server (RAS), a VPN device, a VPN proxy, or a VPN appliance.

c01.indd 21/04/2014 Page 11

12

Chapter 1

Network Security

NIDS and NIPS

Intrusion detection is an important security capability. Intrusion detection systems

(IDSs) are designed to detect the presence of an unauthorized intruder or unwanted activity. Generally, IDSs are used in a passive manner: they detect problems rather than eliminate them. Intrusion prevention systems (IPSs) are designed to detect attempts to gain unauthorized access and stop the attempts from becoming successful. IPSs are generally used more actively: they interact and interfere with communications of unwanted entities.

IDS and IPS security solutions are considered complementary to fi rewalls (see Figure

1.6). IDS and IPS systems can be two independent solutions, or one combined product.

F I G U R E 1 . 6 An IDS and a firewall working together to secure a network

Network

Internet

Router

Firewall

Prevents

Access

IDS System

Monitors

Intruders

Video Camera

Safe

There are two primary types of IDS/IPS: network (NIDS/NIPS) and host (HIDS/HIPS).

A NIDS can detect malicious activity that occurs within the network (it doesn’t cross the fi rewall) and activity that is able to pass through the fi rewall. A HIDS can detect malicious activity that occurs on a single host.

The most common problem with an IDS/IPS, excluding misconfi guration, is the occurrence of false positives. A false positive occurs when legitimate traffi c or user activity is mistaken for intruder activity.

A network-based IDS/IPS watches network traffi c in real time (see Figure 1.7). It monitors network traffi c patterns, scans packet header information, and may examine the contents of packets to detect security violations or attacks. A network-based IDS/

IPS is reliable for detecting network-focused attacks, such as bandwidth-based denialof-service (DoS) attacks. A NIDS/NIPS monitors network traffi c, looking for any c01.indd 21/04/2014 Page 12

1.1 Implement security configuration parameters

13

abnormal or malicious content. Based on what it detects and how it’s confi gured, it can react in real time to interfere with any attack or intrusion attempts before they’re successful against the network or any internal targets. Most commonly, the response to malicious packets is to drop them, thus rendering their payloads ineffective. However,

NIDS/NIPS can also be confi gured to disconnect sessions and reconfi gure fi rewalls, as well as initiate alerts, expand monitoring, and quarantine intruders in honeypots or padded cells. A honeypot is a fi ctitious environment designed to fool attackers and intruders and lure them away from the private secured network (see the section

“Honeypots” in Chapter 3). A padded cell is a containment area that is activated only when an intrusion is detected.

F I G U R E 1 . 7 A network-based IDS/IPS placement in a network determines what data will be analyzed.

Shared

Network Segment

Internet

Private

Network

Router

Firewall

Secured

Management Channel

IDS

Event Data

NOC

A host-based IDS/IPS watches the audit trails and log fi les of a host system (see

Figure 1.8). This type of IDS/IPS is limited to the auditing and logging capabilities of the host system (which includes the OS and installed applications and services). A hostbased IDS/IPS can detect problems only if suffi cient information is captured by the host’s auditing capabilities. It’s reliable for detecting attacks directed against a host, whether they originate from an external source or are perpetrated by a user locally logged in to the host.

Common examples of HIDSs are antivirus software, anti-spyware scanners, and security anomaly detectors.

An IDS/IPS with active detection and response is designed to take the quickest action to reduce the potential damage caused by an intruder (see Figure 1.9). This response may include shutting down the server or just the affected service or disconnecting suspicious connections (see Figure 1.10 and Figure 1.11).

c01.indd 21/04/2014 Page 13

14

Chapter 1

Network Security

F I G U R E 1 . 8 A host-based IDS/IPS interacting with the OS

Network

Host

IDS O/S

Logging

Service

IDS Database Event Database

F I G U R E 1 . 9 The components of an IDS/IPS working together to provide network monitoring

Data

Source

Activity

Activity

Event

Active

Response

Sensor

Event Analyzer Alert

Security

Policy

Administrator

Manager

Security

Policy

Trending and Reporting

Security

Policy

Notification

Operator c01.indd 21/04/2014 Page 14

1.1 Implement security configuration parameters

15

F I G U R E 1 .1 0 IDS/IPS instructing TCP to reset all connections

Firewall

Sensor

IDS/IPS Forcing TCP Reset

1

Network Attack

3

Client

TCP

Client

TCP/IP

Protocol Suite

IDS/IPS Command (Reset TCP)

IDS/IPS

Alert Detected

2

1

2

3

Attack Detected

IDS/IPS Analysis/Response

TCP Reset Command

F I G U R E 1 .11 IDS/IPS instructing the firewall to close port 80 for 60 seconds to thwart an Internet Information Services (IIS) attack

IDS/IPS Closing Port 80 for 60 Seconds

Internet

1

Port 80 Attack

Firewall

Sensor

3

Client

IDS/IPS Command (Close 80, 60 Seconds)

Alert Detected

IDS/IPS

2

1

2

3

Attack Occurs

IDS/IPS Analysis/Response

Port 80 Closed c01.indd 21/04/2014 Page 15

16

Chapter 1

Network Security

An IDS/IPS with passive detection and response takes no direct action against the intruder; instead it may increase the amount of data being audited and recorded and notify administrators about the intrusion. An IDS/IPS is good at detecting DoS attacks; exploiting bugs, fl aws, or hidden features; and port scanning. It isn’t reliable for detecting spoofed email. Passive IDS/IPS responses are usually unseen by intruders and don’t directly affect the violating activity, whereas active IDS/IPS responses are seen by intruders because they directly interrupt and interfere with violating activities.

Many tools are used for monitoring and overseeing the activities within the complex infrastructures of networks and systems, such as performance monitors, system monitors,

IDSs, protocol analyzers, and so on. Many of these tools also support one or more methodologies of monitoring. These methodologies determine how a tool knows when a measurement or event is normal, abnormal, benign, malicious, and so on.

Behavior-based

A behavior-based monitoring or detection method relies on the establishment of a baseline or a defi nition of normal and benign. Behavior-based monitoring is a form of anomaly detection, but instead of using a database of rules to determine anomalies, a recording of real production activity is used. Once this baseline is established, the monitoring tool is able to detect activities that vary from that standard of normal. The strength of a behaviorbased system is that it can detect any type of change or difference, including previously unseen and unknown issues such as zero-day intrusion attacks. However, the weaknesses of behavior-based attacks include the fact that defi ning what is normal is a very diffi cult challenge. Determining what is benign or malicious when nonstandard activity occurs is also not easy or often possible with an automated behavior-based tool.

Signature-based

Signature-based detection (see Figure 1.12) compares event patterns against known attack patterns (signatures) stored in the IDS/IPS database. The strength of a signature-based system is that it can quickly and accurately detect any event from its database of signatures.

However, the primary weakness of a signature-based system is that it’s unable to detect new and unknown activities or events. Thus, new zero-day attacks are unseen by a signature-based system. As new attacks are discovered and the pattern database is improved, the deployed signature-based tools need to have their local databases updated.

Anomaly-based

Anomaly-based detection (see Figure 1.13) watches the ongoing activity in the environment and looks for abnormal occurrences. An anomaly-based monitoring or detection method relies on defi nitions of all valid forms of activity. This database of known valid activity allows the tool to detect any and all anomalies. Anomaly-based detection is commonly used for protocols. Because all the valid and legal forms of a protocol are known and can be defi ned, any variations from those known valid constructions are seen as anomalies. c01.indd 21/04/2014 Page 16

1.1 Implement security configuration parameters

17

Anomaly detection is very effective at stopping abnormal events. However, just because traffi c or events fall within normal values doesn’t necessarily mean the contents of that event or traffi c aren’t malicious in nature.

F I G U R E 1 .1 2 A signature-detection IDS/IPS in action

Firewall

3

Network

1

1

2

3

Attack Under Way

IDS Analysis

Response

Looks for Misuse or Known Attack

Signatures

2

IDS

Attack Signature

&

Misuse Database

F I G U R E 1 .1 3 An anomaly-detection IDS/IPS using expert system technology to evaluate risks

Firewall

Network

3

Manager

2

1

1

2

3

Attack

Analysis

Notification

Uses Artificial

Intelligence and

Network History

IDS

Network

History Database

Heuristic

Heuristic analysis functions by comparing suspicious or new programs against known examples of malware. This can be accomplished in many ways. One method is to run the suspicious program in a sandbox or virtual machine and watch its activities. If it exhibits activities similar enough to those of known malicious code, then it’s classifi ed as malicious.

Another method is to decompile the new program and look for known malicious subroutines or duplicates of code sections from known malware. This method is known as static

analysis.

c01.indd 21/04/2014 Page 17

18

Chapter 1

Network Security

Protocol analyzers

A protocol analyzer is a tool used to examine the contents of network traffi c. Commonly known as a sniffer, a protocol analyzer can be a dedicated hardware device or software installed onto a typical host system. In either case, a protocol analyzer is fi rst a packetcapturing tool that can collect network traffi c and store it in memory or onto a storage device. Once a packet is captured, it can be analyzed either with complex automated tools and scripts or manually. A protocol analyzer usually places the NIC into promiscuous mode in order to see and capture all packets on the local network segment rather than just those with the destination MAC address of the computer’s local NIC. In promiscuous mode, the

NIC ignores the destination MAC addresses of packets and collects each one it sees.

Once a network packet is collected, it’s either saved to the hard drive in a log fi le or retained in memory in a buffer. The protocol analyzer can examine individual packets down to the binary level. Most analyzers or sniffers automatically parse out the contents of the header into an expandable outline form. Any confi guration or setting can be easily seen in the header details. The payload of packets is often displayed in both hexadecimal and

ASCII.

Sniffers typically offer both capture fi lters and display fi lters. A capture fi lter is a set of rules to govern which packets are saved into the capture fi le or buffer and which are discarded. Capture fi lters are used to collect only packets of interest and keep the number of retained packets to a minimum. A display fi lter is used to show only those packets from the packet fi le or buffer that match your requirements. Display fi lters act like search queries to locate packets of interest.

Protocol analyzers vary from simple raw packet-capturing tools to fully automated analysis engines. There are both open-source (such as Wireshark) and commercial (such as

OmniPeek and NetScout) options.

Protocol analyzers can be used to discover communication problems caused by hardware and software issues. They can detect protocol anomalies that may be due to misconfi guration, malfunction, or malicious intent. Often, when security administrators attempt to track down a network communication problem or discover the source of an attack, they use a protocol analyzer.

Sniffer may either be a synonym for protocol analyzer or may mean a distinct type of product. A sniffer is generally a packet- (or frame-) capturing tool, whereas a protocol analyzer is able to decode and interpret packet/frame contents.

Spam filter

A spam fi lter is a software or hardware tool whose primary purpose is to identify and block/fi lter/remove unwanted messages (that is, spam). Spam is most commonly associated with email, but spam also exists in instant messaging (IM), short message service (SMS),

Usenet, and web discussions/forums/comments/blogs. Because spam consumes about 89 percent of all email traffi c (see the Intelligence Reports at www.messagelabs.com

), it’s essential to fi lter and block spam at every opportunity. Failing to block spam allows it to waste c01.indd 21/04/2014 Page 18

1.1 Implement security configuration parameters

19

resources, consume bandwidth, and distract workers from productive activities. Spam can also be a common source of malware infections via links and attachments.

All-in-one security appliances

An all-in-one security appliance is a hardware device designed to operate inline between an

Internet connection and a network. Its goal is to detect and fi lter all manner of malicious, wasteful, or otherwise unwanted traffi c. These devices can be called security gateways or unifi ed threat management (UTM) systems. They’re implemented to perform fi rewall, IDS,

IPS, and NATing functions and to provide DoS protection, spam fi ltering, virus scanning, privacy protection, web fi ltering, spyware blocking, and activity tracking. Some all-in-one security appliances also provide server-side services for hosting web applications and wireless security features.

For some organizations, a single product that provides so many features is a cost-saving measure. In other environments, especially larger enterprises, it may not be the optimum choice.

URL filter

URL fi ltering, also known as web fi ltering, is the act of blocking access to a site based on all or part of the URL used to request access. URL fi ltering can focus on all or part of a fully qualifi ed domain name (FQDN), specifi c path names, specifi c fi lenames, specifi c fi le extensions, or entire specifi c URLs. Many URL-fi ltering tools can obtain updated master

URL block lists from vendors as well as allow administrators to add or remove URLs from a custom list.

Content inspection

Content inspection is the security-fi ltering function where the contents of the application protocol payload are inspected. Often such inspection is based on keyword matching. A master blacklist of unwanted terms, addresses, or URLs is used to control what is or isn’t allowed to reach a user.

Malware inspection

Malware inspection is the use of a malware scanner (aka antivirus scanner or spyware scanner) to detect unwanted software content in network traffi c. If malware is detected, it can be blocked or logged and/or trigger an alert.

Many fi rewalls, especially application fi rewalls and proxies, include URL fi ltering, content inspection, and malware inspection as additional security features.

Web application firewall vs. network firewall

A web application fi rewall is a device, server add-on, virtual service, or system fi lter that defi nes a strict set of communication rules for a website and all visitors. It’s intended to be c01.indd 21/04/2014 Page 19

20

Chapter 1

Network Security an application-specifi c fi rewall to prevent cross-site scripting, SQL injection, and other web application attacks. A network fi rewall is a hardware device, typically called an appliance, designed for general network fi ltering. A network fi rewall is designed to provide broad protection for an entire network.

Both of these types of fi rewalls are important and may be relevant in many situations.

Every network needs a network fi rewall. Many web servers need a web application fi rewall.

However, the use of a web application fi rewall generally doesn’t negate the need for a network fi rewall. Both fi rewalls should be used in a series to complement each other, rather than being seen as competitive solutions.

Application aware devices

Application aware devices are security devices, such as fi rewalls, IDSs, IPSs, and proxies, that operate at the higher layers of the protocol stack in order to provide focused security fi ltering and analysis of the content of specifi c communications. Such devices are designed around a specifi c application or service, such as the Web, email, IM, fi le transfers, database interactions, and so on. Often, application aware devices are able to provide deep content inspection and fi ltering based on their focus on specifi c applications and protocols.

Firewalls

An application aware fi rewall provides fi ltering services for specifi c applications.

IPS

An application aware IPS provides intrusion and compromise prevention for specifi c applications.

IDS

An application aware IDS provides detection and analysis for specifi c applications.

Proxies

An application aware proxy provides fi ltering, content caching, forwarding, and other related services for specifi c applications.

Exam Essentials

Understand firewalls Firewalls provide protection by controlling traffi c entering and leaving a network. They manage traffi c using fi lters or rules.

Understand types of firewalls The three basic types of fi rewalls are packet fi ltering, circuit-level gateway, and application-level gateway. A fourth type combines features from these three and is called a stateful inspection fi rewall.

c01.indd 21/04/2014 Page 20

1.1 Implement security configuration parameters

21

Understand routers Routers enable traffi c from one network segment to traverse into another network segment. However, the traffi c must pass through the router’s fi lters in order to make the transition.

Understand switches A switch is a networking device used to connect other devices together and potentially implement traffi c management on their communications. It receives signals in one port and transmits them out the port where the intended recipient is connected. Switches are often used to create virtual local area networks (VLANs).

Understand load balancers A load balancer is used to spread or distribute network traffi c load across several network links or network devices. The purpose of load balancing is to obtain optimal infrastructure utilization, minimize response time, maximize throughput, reduce overloading, and eliminate bottlenecks.

Understand proxy A proxy server is a variation of an application-level fi rewall or circuitlevel fi rewall. A proxy server is used as a proxy or middleman between clients and servers.

Understand IDS An intrusion detection system (IDS) is an automated system that either watches activity in real time or reviews the contents of audit logs in order to detect intrusions or security policy violations. The two types of IDS are network-based and host-based.

Understand NIDS A network-based IDS (NIDS) watches network traffi c in real time. It’s reliable for detecting network-focused attacks, such as bandwidth-based DoS attacks.

Understand HIDS A host-based IDS (HIDS) watches the audit trails and log fi les of a host system. It’s reliable for detecting attacks directed against a host, whether they originate from an external source or are being perpetrated by a user locally logged in to the host.

Understand detection mechanisms Signature detection compares event patterns against known attack patterns (signatures) stored in the IDS database. Anomaly detection watches the ongoing activity in the environment and looks for abnormal occurrences.

Understand response methods An IDS with active detection and response is designed to take the quickest action to reduce potential damage caused by an intruder. This response may include shutting down the server or the affected service or disconnecting suspicious connections. An IDS with passive detection and response takes no direct action against the intruder; instead it may increase the amount of data being audited and recorded and notify administrators about the intrusion.

Understand behavior-based detection A behavior-based monitoring or detection method relies on the establishment of a baseline or a defi nition of normal and benign. Once this baseline is established, the monitoring tool is able to detect activities that vary from that standard of normal.

Understand signature-based detection A signature-based monitoring or detection method relies on a database of signatures or patterns of known malicious or unwanted activity. The strength of a signature-based system is that it can quickly and accurately detect any event from its database of signatures.

c01.indd 21/04/2014 Page 21

22

Chapter 1

Network Security

Understand anomaly-based detection An anomaly-based monitoring or detection method relies on defi nitions of all valid forms of activity. This database of known valid activity allows the tool to detect any and all anomalies.

Understand protocol analyzers A protocol analyzer is a tool used to examine the contents of network traffi c.

Understand spam Spam is undesired or unsolicited email. It’s a problem for numerous reasons. First, spam can be the carrier for malicious code such as viruses, logic bombs, and

Trojan horses. Second, spam can be the carrier of a social-engineering attack (hoax email).

Third, unwanted email wastes your time while you’re sorting through it looking for legitimate messages. Fourth, spam wastes Internet resources such as storage capacity, computing cycles, and throughput.

Understand application aware devices Application aware devices are security devices, such as fi rewalls, IDSs, IPSs, and proxies, that operate at the higher layers of the protocol stack in order to provide focused security fi ltering and analysis of the content of specifi c communications.

1.2 Given a scenario, use secure network administration principles

It takes more than just having the right hardware and software installed to make a secure network. You also need proper confi guration and ongoing maintenance. This is known as

network administration. The following items are secure network administration principles.

Rule-based management

Rule-based management is the concept of controlling the security of communications and

IT events through rule- or fi lter-driven systems. Firewalls, proxies, routers, IDSs, IPSs, antivirus software, and more are examples of rule-based security management tools. Each of these systems has a set of rules. Each rule is either an explicit allow or deny. If an event or a packet doesn’t match any rule, it should be denied by default.

Rule-based management are one method of implementing a whitelist security management concept. This is the idea that there are a fi nite number of allowed events or activities, but there may be infi nite unwanted or malicious events or activities. Attempting to block the bad, using a blacklist concept, is often a no-win situation. In a whitelist security-management system, if the event or activity doesn’t match an allow rule, it’s denied by default. Even new zero-day attacks are blocked using a whitelist management system.

c01.indd 21/04/2014 Page 22

1.2 Given a scenario, use secure network administration principles

23

Firewall rules

A fi rewall follows the fi rst-match-apply rule system. The fi nal rule in a fi rewall rule set should be a default deny. In this way, anything that isn’t specifi cally allowed or that was not explicitly denied by an earlier rule is always blocked by default. Firewall rules are a great example of a whitelist security-management system.

Depending on the type of fi rewall, separate inbound and outbound rules must be created (unless the fi rewall supports stateful inspection). It’s important to review fi rewall rules carefully to ensure that they’re ordered properly and don’t inadvertently create security loopholes.

VLAN management

A virtual local area network (VLAN) is a hardware-imposed network segmentation created by switches. By default, all ports on a switch are part of VLAN 1. But as the switch administrator changes the VLAN assignment on a port-by-port basis, various ports can be grouped together and be distinct from other VLAN port designations.

VLANs are used for traffi c management. Communications between ports within the same VLAN occur without hindrance, but communications between VLANs require a routing function. This routing function can be provided by an external router or by the switch’s internal software (hence one reason for the term multilayer switch). VLANs are treated like subnets but aren’t subnets. VLANs are created by switches. Subnets are created by IP address and subnet mask assignments.

VLAN management is the use of VLANs to control traffi c for security or performance reasons. VLANs can be used to isolate traffi c between network segments. This can be accomplished by not defi ning a route between different VLANs or by specifying a deny fi lter between certain VLANs (or certain members of a VLAN). Any network segment that doesn’t need to communicate with another in order to accomplish a work task/function shouldn’t be able to do so. Use VLANs to allow what is necessary, but block/deny anything that isn’t necessary. Remember, “deny by default; allow by exception” isn’t a guideline just for fi rewall rules, but for security in general.

Secure router configuration

A secure router confi guration is one where malicious or unauthorized route changes are prevented. This can be done using a few simple settings:

Set the router’s administrator password to something unique and secret.

Set the router to ignore all Internet Control Message Protocol (ICMP) type 5 redirect messages.

Use a secure routing protocol that requires authentication and data encryption to exchange route data. c01.indd 21/04/2014 Page 23

24

Chapter 1

Network Security

Preconfigure the IP addresses of other trusted routers with which routing data can be exchanged.

Configure management interfaces to operate only on internal interfaces, use secure protocols, and potentially be accessible only on dedicated networks.

With these simple precautions, you can make the router confi guration secure.

Access control lists

Access control lists (ACLs) are used to defi ne who is allowed to or denied permission to perform a specifi ed activity or action. ACLs are commonly associated with object access but also apply to communications. In many cases, fi rewalls, routers, and even switches can use

ACLs as a method of security management. In fact, the rules of these devices can be called

ACLs or fi lters. It’s all roughly the same concept. As with many other security-control mechanisms, ACLs deny by default and allow by exception. If a user/IP/device is present in an ACL (specifi cally an access control entry [ACE], which is a single line in an ACL), then the specifi ed action or activity is specifi cally either allowed or denied.

Port security

Port security in IT can mean several things. It can mean the physical control of all connection points, such as RJ-45 wall jacks or device ports, so that no unauthorized users or unauthorized devices can attempt to connect into an open port. This can be accomplished by locking down the wiring closet and server vaults and then disconnecting the workstation run from the patch panel (or punch-down block) that leads to a room’s wall jack. Any unneeded or unused wall jacks can (and should) be physically disabled in this manner.

Another option is to use a smart patch panel that can monitor the MAC address of any device connected to each and every wall port across a building and detect not just when a new device is connected to an empty port, but also when a valid device is disconnected or replaced by an invalid device.

Another meaning for port security is the management of TCP and User Datagram

Protocol (UDP) ports. If a service is active and assigned to a port, then that port is open.

All the other 65,535 ports (of TCP or UDP) are closed if a service isn’t actively using them.

Hackers can detect the presence of active services by performing a port scan. Firewalls,

IDSs, IPSs, and other security tools can detect this activity and either block it or send back false/misleading information. This measure is a type of port security that makes port scanning less effective.

Port security can also refer to port knocking. Port knocking is a security system in which all ports on a system appear closed. However, if the client sends packets to a specifi c set of ports in a certain order, a bit like a secret knock, then the desired service port becomes open and allows the client software to connect to the service. Port knocking doesn’t prevent a hacker from eavesdropping on the portknocking sequence and c01.indd 21/04/2014 Page 24

1.2 Given a scenario, use secure network administration principles

25

repeating it, but it does defeat the use of port scanners that randomly target Internetfacing systems.

802.1x

802.1x is a port-based authentication mechanism. It’s based on Extensible Authentication

Protocol (EAP) and is commonly used in closed-environment wireless networks.

However, 802.1x isn’t exclusively used on wireless access points (WAPs); it can also be used on fi rewalls, proxies, VPN gateways, and other locations where an authentication handoff service is desired. Think of 802.1x as an authentication proxy. When you wish to use an existing authentication system rather than confi gure another, 802.1x lets you do that.

When 802.1x is in use, it makes a port-based decision about whether to allow or deny a connection based on the authentication of a user or service. 802.1x was initially used to compensate for the weaknesses of Wired Equivalent Privacy (WEP), but today it’s often used as a component in more complex authentication and connection-management systems, including Remote Authentication Dial-In User Service (RADIUS), Diameter, Cisco System’s

Terminal Access Controller Access-Control System Plus (TACACS+), and Network Access

Control (NAC).

Like many technologies, 802.1x is vulnerable to man-in-the-middle and hijacking attacks because the authentication mechanism occurs only when the connection is established.

Flood guards

A fl ood guard is a defense against fl ooding or massive-traffi c DoS attacks. The purpose of a fl ood guard is to detect fl ooding activity and then automatically begin blocking it. This prevents this type of malicious traffi c from entering a private network.

Floodguard is also a formal command in the Cisco IOS that is used to enable or disable

Flood Defender, the Cisco solution that addresses fl ooding attacks.

Loop protection

A loop in networking terms is a transmission pathway that repeats itself. It’s the network equivalent of going around in a circle. The problem with looping in a network environment is that it wastes resources, specifi cally network throughput capacity. Loops can occur at

Layer 2 and at Layer 3, typically related to Ethernet and IP, respectively.

Ethernet looping is resolved using Spanning Tree Protocol (STP) on the bridges and switches of a network. STP learns all available paths and then makes traffi c-management decisions that prevent looping pathways. Effectively, STP erects transmission blockades to prevent loops from being created.

c01.indd 21/04/2014 Page 25

26

Chapter 1

Network Security

IP resolves looping using a different technique. Instead of preventing the use of pathways that cause looping, IP controls the distance a packet travels before it’s discarded. So, instead of preventing loops, IP minimizes the amount of looping before packets are terminated.

This is controlled using a countdown timer in the IP header, specifi cally the time-to-live

(TTL) value. The TTL is set at an initial OS-specifi c default (for example, the Windows

TTL is now 128 but was 32 in some older versions, whereas the TTL on Linux systems ranges from 64 to 255), and then each router decrements the TTL as it retransmits the IP packet. When a router receives a TTL that has a value of 1, that router stops forwarding the packet toward its destination and sends it back to the source address with an error message

(“ICMP Type 11—Timeout Exceeded”).

Implicit deny

Implicit deny is the default security stance that says if you aren’t specifi cally granted access or privileges for a resource, you’re denied access by default. A default-deny statement is implicit in the permission-management system and doesn’t need to be specifi cally defi ned.

This is usually different on fi rewall and router access rule sets, where a default deny-all rule must be included as the last rule. Implicit deny is the default response when an explicit allow or deny isn’t present.

Network separation

Bridging between networks can be a desired feature of network design. Network bridging is self-confi guring, is inexpensive, maintains collision-domain isolation, is transparent to Layer

3+ protocols, and avoids the 5-4-3 rule’s Layer 1 limitations (see https://en.wikipedia

.org/wiki/5-4-3_rule

). However, network bridging isn’t always desirable. It doesn’t limit or divide broadcast domains, doesn’t scale well, can cause latency, and can result in loops.

In order to eliminate these problems, you can implement network separation or segmentation. There are two means to accomplish this. First, if communication is necessary between network segments, you can implement IP subnets and use routers. Second, you can create physically separate networks that don’t need to communicate. This can also be accomplished later using fi rewalls instead of routers to implement secured fi ltering and traffi c management.

Log analysis

Log analysis is the art and science of reviewing audit trails, log fi les, or other forms of computer-generated records for evidence of policy violations, malicious events, downtimes, bottlenecks, or other issues of concern. Log analysis should be a regularly occurring activity in every network environment. Some log analysis can be performed automatically by various analysis engines, such as IDS/IPS. But often, manual analysis is necessary to see and understand the details of events.

c01.indd 21/04/2014 Page 26

1.3 Explain network design elements and components

27

Unified Threat Management

See the earlier section “All-in-one security appliances.”

Exam Essentials

Understand rule-based management Rule-based management is the concept of controlling the security of communications and IT events through rule- or fi lter-driven systems.

Firewalls, proxies, routers, IDSs, IPSs, antivirus software, and more are examples of rule-based security management tools.

Understand access control lists Access control lists (ACLs) are used to defi ne who is allowed or denied permission to perform a specifi ed activity or action. ACLs are commonly associated with object access but also apply to communications. In many cases, fi rewalls, routers, and switches use ACLs as a method of security management.

Understand 802.1x 802.1x is a port-based authentication mechanism. It’s based on EAP and is commonly used in closed-environment wireless networks. However, 802.1x isn’t exclusively used on WAPs; it can also be used on fi rewalls, proxies, VPN gateways, and other locations where an authentication handoff service is desired. Think of 802.1x as an authentication proxy.

Understand loop protection A loop in networking terms is a transmission pathway that repeats itself. Loop protection includes STP for Ethernet and the IP header TTL value.

Understand implicit deny Implicit deny is the default security stance that says if you aren’t specifi cally granted access to or privileges for a resource, you’re denied access by default.

1.3 Explain network design elements and components

When crafting a network infrastructure, it’s important to understand the various design elements and components available to you. Maximizing function while maintaining security is a top priority.

DMZ

A demilitarized zone (DMZ) is a special-purpose subnet. However, I need to discuss a few foundational ideas before I can properly address the topic of DMZs. First, a network comprises networking components (such as cables and switches) and hosts (such as clients and servers). Often, large networks are logically and physically subdivided into smaller c01.indd 21/04/2014 Page 27

28

Chapter 1

Network Security interconnected networks. These smaller networks are known as subnets. Subnets are usually fairly generic, but some have special uses and/or confi gurations.

A second important topic is security zones. Security zones are logical and/or physical divisions or segments of a LAN that allow for supplementary layers of security and control

(see Figure 1.14). Each security zone is an area of a network that has a single defi ned level of security. That security may focus on encoding authorized access, preventing access, protecting confi dentiality and integrity, or limiting traffi c fl ow. Different security zones usually host different types of resources with different levels of sensitivity.

F I G U R E 1 .1 4 A typical LAN connection to the Internet

Internet

LAN

Router

By combining the ideas of subnets and security zones, several new types of network elements emerge: namely DMZs and extranets.

A DMZ is an area of a network that is designed specifi cally for public users to access

(see Figure 1.15). Access to a DMZ is usually controlled or restricted by a fi rewall and router system. The DMZ acts as a buffer network between the public untrusted Internet and the private trusted LAN. If the DMZ (as a whole or as individual systems within the

DMZ) is compromised, the private LAN isn’t necessarily affected or compromised.

A DMZ gives an organization the ability to offer information services, such as web browsing, FTP, and email, to both the public and internal clients without compromising the security of the private LAN. Often a DMZ is deployed through the use of a multihomed fi rewall. Such a fi rewall has three interfaces: one to the Internet, one to the private LAN, and one to the DMZ.

An extranet (see Figure 1.16) is a privately controlled network segment or subnet that functions as a DMZ for business-to-business transactions. It allows an organization to offer specialized services to business partners, suppliers, distributors, or customers.

Extranets are based on TCP/IP and often use the common Internet information services, such as web browsing, FTP, and email. Extranets aren’t accessible to the general public.

They often require outside entities to connect using a VPN. This restricts unauthorized access and ensures that all communications with the extranet are secured. Another important security concern with extranets is that companies that are partners today may c01.indd 21/04/2014 Page 28

1.3 Explain network design elements and components

29

be competitors tomorrow. Thus, you should never place data into an extranet that you’re unwilling to let a future competitor have access to.

F I G U R E 1 .1 5 A typical DMZ

DMZ

Web Servers

Firewall

Private

Network

F I G U R E 1 .1 6 A typical extranet between two organizations

Internet

MyCo

Private Connection or

VPN on Internet

Corporate

LAN

Corporate

LAN

YourCo

Subnetting

Subnetting is a divisioning process used on networks to divide larger groups of hosts into smaller collections. The act of subnetting may be mandated by the maximum size of a subnet based on desired IP class restrictions, physical limitations, differentiation of business functions, or other concerns. Subnetting is mainly a logical activity, but it can be used to direct or guide physical divisioning. In fact, many large organizations mimic their logical subnetting infrastructure in their physical deployment for easier troubleshooting and maintenance.

c01.indd 21/04/2014 Page 29

30

Chapter 1

Network Security

Subnet size is no longer strictly limited to the IP class range restrictions, such as only 254 hosts per Class C network, if Classless Inter-Domain

Routing (CIDR) subnetting is used. This topic isn’t directly relevant to Security+, because it’s a Net+ topic, so please search for the term CIDR on the

Internet for more information.

Ultimately, in the TCP/IP v4 protocol, subnetting is defi ned by the assigned host IP address and its related subnet mask. The subnet mask is a 32-bit binary number that indicates which portions of a host IP address (also a 32-bit binary number, at least for TCP/IP v4) defi ne the network ID (or subnet ID) and which portions defi ne the host ID. Network and subnet IDs are unique within each organization’s private network or across the public

Internet. Host IDs are unique only within the local subnet. In much the same way that an area code defi nes the general area where a phone number resides, a network ID defi nes where a subnet resides. Within one area code and another, there are duplicate seven-digit phone numbers, and within multiple subnets there are duplicate host IDs. However, unlike phone numbers, IP addresses are always presented with their entire complement of numbers and, when necessary or important, their related subnet mask.

IP address 193.25.172.56 with a subnet mask of 255.255.0.0 can be converted from this dotted decimal notation to binary as follows:

IP Address

11000001000110011010110000111000

Subnet Mask

Network ID

Host ID

11111111111111110000000000000000

11000001000110010000000000000000

00000000000000001010110000111000

By reading only the portions of the IP address marked or masked by the 1s from the subnet mask, the network ID is revealed: 11000001000110010000000000000000 or

193.25.0.0.

By reading only the portions of the IP address marked or masked by the 0s from the subnet mask, the host ID is revealed: 00000000000000001010110000111000 or 0.0.172.56.

A host within a subnet is able to communicate directly with any other host in that same subnet. However, to communicate with hosts in other subnets, traffi c must be directed out of the subnet toward the destination host’s subnet. This is done by sending the data stream to the default gateway of the local subnet. The default gateway is just the interface of a router in your local subnet. The router then reads the destination IP address and directs the traffi c toward its destination subnet.

You can use subnetting to control communications, block access, divide security zones, and much more. This is only a general and generic overview of the topic. If you aren’t already familiar with how to subnet TCP/IP, please consult Network+ study materials or search for this content online.

c01.indd 21/04/2014 Page 30

1.3 Explain network design elements and components

31

VLAN

A VLAN consists of subnets that are logically created out of a single physical network.

They’re often created using switches (see Figure 1.17). Basically, the ports on a switch are numbered; each port is assigned the designation VLAN1 by default. By assigning ports other designations, such as VLAN2 or VLAN3, you can create additional virtual networks.

F I G U R E 1 .17 A typical segmented VLAN

Corporate Network

Computers and users are grouped logically instead of physically.

Router

VLANs function in much the same way as traditional subnets. In order for communications to travel from one VLAN to another, the switch operates as a router to control and fi lter traffi c between its VLANs.

VLANs are used to logically segment a network without altering its physical topology.

They’re easy to implement, have little administrative overhead, and are a hardware-based solution.

c01.indd 21/04/2014 Page 31

32

Chapter 1

Network Security

VLANs let you control and restrict broadcast traffi c and reduce a network’s vulnerability to sniffers. This is due to the fact that a switch treats each VLAN as a separate subnet.

In order to communicate between subnets, the switch must provide a routing function. It’s the routing function that blocks broadcasts between subnets and VLANs, because a router

(or devices performing Layer 3 routing functions) doesn’t forward broadcasts. This feature of a switch blocking broadcasts between VLANs helps protect against broadcast storms.

A broadcast storm is a fl ood of unwanted broadcast network traffi c.

NAT

In order for systems to communicate across the Internet, they must have an Internetcapable TCP/IP address. Unfortunately, leasing a suffi cient number of public IP addresses to assign one to every system on a network is expensive. Plus, assigning public IP addresses to every system on the network means those systems can be accessed (or at least addressed) directly by external benign and malicious entities. One way around this issue is to use net-

work address translation (NAT) (see Figure 1.18).

F I G U R E 1 .1 8 A typical Internet connection to a local network

Internal Network

(Private Class Address)

Firewall

External Network

(Real Address)

Router

Link to ISP

NAT converts the private IP addresses of internal systems found in the header of network packets into public IP addresses. It performs this operation on a one-to-one basis: thus, a single leased public IP address can allow a single internal system to access the

Internet. Because Internet communications aren’t usually permanent or dedicated connections, a single public IP address could effectively support three or four internal systems if they never needed Internet access simultaneously. So, when NAT is used, a larger network only needs to lease a small number of public IP addresses.

NAT provides the following benefi ts:

It hides the IP addressing scheme and structure from external entities.

It serves as a basic firewall by only allowing incoming traffic that is in response to an internal system’s request.

c01.indd 21/04/2014 Page 32

1.3 Explain network design elements and components

33

It reduces expense by requiring fewer leased public IP addresses.

It allows the use of private IP addresses (RFC 1918).

RFC 1918

RFC 1918 defi nes the ranges of private IP addresses that aren’t routable across the Internet. These ranges of addresses were specifi cally reserved for use by private networks.

Anyone can use them at no expense; however, a NAT gateway must be deployed in order for systems using RFC 1918 addresses to communicate with the Internet. The ranges of IP addresses reserved for this purpose by RFC 1918 are as follows:

10.0.0.0–10.255.255.255 (10.0.0.0 /8 subnet): 1 Class A range

172.16.0.0–172.31.255.255 (172.16.0.0 /12 subnet): 16 Class B ranges

192.168.0.0–192.168.255.255 (192.168.0.0 /16 subnet): 256 Class C ranges

Closely related to NAT is port address translation (PAT), which allows a single public

IP address to host up to 65,536 simultaneous communications from internal clients (a theoretical maximum; in practice you should limit the number to 10 or fewer in most cases).

Instead of mapping IP addresses on a one-to-one basis, PAT uses the TCP port numbers to host multiple simultaneous communications across each public IP address.

The use of the term NAT in the IT industry has come to include the concept of PAT.

Thus, when you hear or read about NAT, you can assume that the material is referring to

PAT. This is true for most OSs and services; it’s also true of the Security+ exam.

Another issue to be familiar with is that of NAT traversal (NAT-T). Traditional NAT doesn’t support IPSec VPNs due to the requirements of the IPSec protocol and the changes

NAT makes to packet headers. However, NAT-T was designed specifi cally to support

IPSec and other tunneling VPN protocols, such as Layer 2 Tunneling Protocol (L2TP), so organizations can benefi t from both NAT and VPNs across the same border device/ interface.

As the conversion from IPv4 to IPv6 takes place, there will be a need for NATing between these two IP structures. V4-to-v6 gateways or NAT servers will become more prevalent as the migration gains momentum, in order to maintain connectivity between legacy IPv4 networks and updated IPv6 networks. Once a majority of systems are using IPv6, the number of v4-to-v6 NATing systems will decline.

Remote access

A remote access server (RAS) is a network server that supports connections from distant users or systems. RAS systems often support modem banks, VPN links, and even terminal services connections.

A modem (see Figure 1.19) is a device that creates a network communication link between two computers (or networks) over a telephone line. Modems are one of the slowest remote-connection methods still widely supported by OSs. Most connections are limited to c01.indd 21/04/2014 Page 33

34

Chapter 1

Network Security a maximum throughput of 56 Kbps. However, because portable systems can use them to connect to corporate offi ces using any available telephone line, modems will probably be around for years to come.

F I G U R E 1 .1 9 A RAS connection between a remote workstation and a Windows server using modems

Modem

Modem

POTS Connection

Workstation or Server

Running Remote Access

A common security protection added to dial-up modems is callback: a feature that disconnects the remote user immediately after authentication and then calls back the remote user at a predefi ned number. Callback ensures that the authenticated user is located at the correct phone number before access to the network is granted.

War dialing is a common attack against dial-up modems on a company network. Such an attack dials all the numbers in a prefi x range in order to locate modems connected to computer systems. Once attackers locate a modem that answers a computer call, they can focus their efforts on breaking through the logon security barrier.

As networks grow, it becomes more common for them to support remote connections, whether dial-up, wireless wide area networks (WWANs), or virtual private networks

(VPNs). The access-control and -protection issues involved in managing and administering remote access connections are generally called communications security.

Networks exist to share resources. In order to share resources, all entities on a network must share a common protocol. But in order for the protocol to function, a communication medium must be in place to provide support for the transfer of that protocol and its hosted communication data between one system and another. Often that medium is a network cable, such as a Cat5e (also known as twisted-pair cabling).

However, the communication medium could be wireless, a VPN link, a dial-up link, a terminal services link, or even a remote-control link. In any case, understanding the technology and the security implications of each of these communication media is an essential part of administering an environment.

One mechanism often used to help control the complexities of remote connectivity is a remote access policy. Remote access server policies (RAS policies) are additional gauntlets c01.indd 21/04/2014 Page 34

1.3 Explain network design elements and components

35

of requirements that remote users must be in compliance with to gain access to the internal resources of the LAN. RAS policies can require specifi c OSs and patch levels, restrict time and date access, mandate authentication mechanisms, and confi rm the caller ID and/ or MAC address of the remote client. After a connection is established, RAS policies can be used to enforce idle timeout disconnects, defi ne the maximum connect time, mandate minimal encryption levels, enforce IP packet fi lters, defi ne IP address parameters, and force specifi c routing paths.

Remote authentication is a catchphrase that refers to any mechanism used to verify the identity of remote users. Several well-known examples of remote authentication include

RADIUS, TACACS, 802.1x, and Challenge-Handshake Authentication Protocol (CHAP).

Originally, remote authentication referred to solutions that supported authentication mechanisms for dial-up telecommuters. Today, it includes any authentication technology that can be used for remote users, whether connecting over dial-up, VPN, or wireless.

Telephony

Telephony is the collection of methods by which telephone services are provided to an organization or the mechanisms by which an organization uses telephone services for either voice and/or data communications. Traditionally, telephony included plain old telephone service (POTS) or public switched telephone network (PSTN) service combined with modems. However, this has expanded to include PBX, VoIP, and VPN.

A private branch exchange (PBX) (also known as telecom), shown in Figure 1.20, is a computer- or network-controlled telephone system. PBXs are deployed in large organizations; they offer a wide range of telephone services, features, and capabilities, including conference calls, call forwarding, paging, call logging, voicemail, call routing, and remote calling.

Remote calling is the ability to dial in to a PBX system from outside and then access a dial tone in order to place a call. The second call can be long distance, and all toll charges are accumulated on the PBX system, not on the user’s telephone. This is a commonly attacked feature of PBX systems.

Methods to secure PBX systems include the following:

Disabling maintenance features

Changing all default passwords, accounts, and access codes

Enabling logging

Restricting long-distance calling

User awareness and training

Voice over IP (VoIP) is a tunneling mechanism used to transport voice and/or data over a TCP/IP network. VoIP has the potential to replace or supplant PSTN because it’s often less expensive and offers a wider variety of options and features. VoIP can be used as a direct telephone replacement on computer networks as well as mobile devices. However, VoIP is able to support video and data transmission to allow video conferencing and remote collaboration on projects. VoIP is available in both commercial and open-source options. Some VoIP solutions require specialized hardware to either replace traditional telephone handsets/base c01.indd 21/04/2014 Page 35

36

Chapter 1

Network Security stations or allow these to connect to and function over the VoIP system. Some VoIP solutions are software only, such as Skype, and allow the user’s existing speakers, microphone, or headset to replace the traditional telephone handset. Others are more hardware-based, such as magicJack, which allows the use of existing PSTN phone devices plugged in to a

USB adapter to take advantage of VoIP over the Internet. Often, VoIP-to-VoIP calls are free

(assuming the same or compatible VoIP technology), whereas VoIP-to-land-line calls are usually charged a per-minute fee.

F I G U R E 1 . 2 0 A modern digital PBX system integrating voice and data onto a single network connection

Analog

Voice

Interface

Digital

Voice

Interface

Digital

Switch

T1

Central

Office

Data

Interface

Data

Storage

NAC

Network Access Control (NAC) involves controlling access to an environment through strict adherence to and implementation of security policy. The goals of NAC are to prevent/ reduce zero-day attacks, enforce security policy throughout the network, and use identities to perform access control. These goals can be achieved through the use of strong, detailed security policies that defi ne all aspects of security control; and fi ltering, prevention, detection, and response for every device from client to server and for every internal or external communication. NAC is meant to be an automated detection and response system that can react in real time to stop threats as they occur and before they cause damage or a breach.

Originally, 802.1x was thought to embody NAC, but most supporters feel that 802.1x is only a simple form of NAC or one component in a complete NAC solution.

NAC can be implemented with a pre-admission philosophy or a post-admission philosophy. Using the pre-admission philosophy, a system must meet all current security requirements (such as patch application and antivirus updates) before it’s allowed to communicate c01.indd 21/04/2014 Page 36

1.3 Explain network design elements and components

37

with the network. The post-admission philosophy says that allow/deny decisions are made based on user activity, which is based on a predefi ned authorization matrix. NAC can also be deployed with aspects of both of these philosophies.

Other issues related to NAC include using a client/system agent versus overall network monitoring (agentless); out-of-band versus in-band monitoring; and resolving any remediation, quarantine, or captive portal strategies.

Many organizations have released products with the NAC concept in mind (often in the title of their offering), such as Cisco, McAfee, Symantec, and so on. There are many opensource solutions as well.

Virtualization

Virtualization technology is used to host one or more OSs in the memory of a single host computer. This mechanism allows virtually any OS to operate on any hardware. It also lets multiple OSs work simultaneously on the same hardware. Common examples include

VMware, Microsoft’s Virtual PC or Hyper-V, VirtualBox, and Apple’s Parallels.

Virtualization offers several benefi ts, such as being able to launch individual instances of servers or services as needed, real-time scalability, and the ability to run the exact OS version required for a certain application. Virtualized servers and services are indistinguishable from traditional servers and services from a user’s perspective. Additionally, recovery from damaged, crashed, or corrupted virtual systems is often quick: you simply replace the virtual system’s main hard-drive fi le with a clean backup version, and then relaunch the affected virtual system.

With regard to security, virtualization offers several benefi ts. It’s often easier and faster to make backups of entire virtual systems rather than the equivalent native hardware installed system. Plus, when there is an error or problem, the virtual system can be replaced by a backup in minutes. Malicious code compromises of virtual systems rarely affect the host OS. This allows for safer testing and experimentation.

Cloud computing

Cloud computing is a popular term that refers to performing processing and storage elsewhere, over a network connection, rather than locally. Cloud computing is often thought of as Internet-based computing. Ultimately, processing and storage occur on computers somewhere, but the distinction is that the local operator no longer needs to have that capacity or capability locally. Thus more users can use cloud resources on an on-demand basis. From the end users’ perspective, all the work of computing is performed “in the cloud,” so the complexity is isolated from them.

Cloud computing is a natural extension and evolution of virtualization, the Internet, distributed architecture, and the need for ubiquitous access to data and resources. However, it does have some issues: privacy concerns, regulation compliance diffi culties, use of open-/ closed-source solutions, adoption of open standards, and whether cloud-based data is actually secured (or even securable).

c01.indd 21/04/2014 Page 37

38

Chapter 1

Network Security

Platform as a service

Platform as a service is the concept of providing a computing platform and software solution stack to a virtual or cloud-based service. Essentially, it involves paying for a service that provides all the aspects of a platform (that is, OS and complete solution package). The primary attraction of platform as a service is that you don’t need to purchase and maintain high-end hardware and software locally.

Software as a service

Software as a service is a derivative of platform as a service. It provides on-demand online access to specifi c software applications or suites without the need for local installation (and with no local hardware and OS requirements, in many cases). Software as a service can be implemented as a subscription service, a pay-as-you-go service, or a free service. A great free example is Google Docs. A subscription example is Microsoft Offi ce 365.

Infrastructure as a service

Infrastructure as a service takes the platform as a service model another step forward and provides not just on-demand operating solutions but complete outsourcing options.

These can include utility or metered computing services, administrative task automation, dynamic scaling, virtualization services, policy implementation and management services, and managed/fi ltered Internet connectivity. Ultimately, infrastructure as a service allows an enterprise to quickly scale up new software- or data-based services/solutions through cloud systems quickly and without having to install massive hardware locally.

Private

A private cloud is a cloud service within a corporate network and isolated from the

Internet. The private cloud is for internal use only.

A virtual private cloud is a service offered by a public cloud provider that provides an isolated subsection of a public or external cloud for exclusive use by an organization internally. It outsources the private cloud to an external provider.

Public

A public cloud is a cloud service that is accessible to the general public, typically over an

Internet connection. Public cloud services often require some form of subscription or pay per use, rather than being offered for free.

Hybrid

A hybrid cloud is a mixture of private and public cloud components. For example, an organization could host a private cloud for exclusive internal use but distribute some resources onto a public cloud for the public, business partners, customers, the external sales force, and so on. c01.indd 21/04/2014 Page 38

1.3 Explain network design elements and components

39

Community

A community cloud is a cloud environment maintained, used, and paid for by a group of users or organizations for their shared benefi t, such as collaboration and data exchange. This may allow for some cost savings versus accessing private or public clouds independently.

Layered security / Defense in depth

Defense in depth is the use of multiple types of access controls in literal or theoretical concentric circles or layers. This form of layered security helps an organization avoid a monolithic security stance. A monolithic mentality is the belief that a single security mechanism is all that is required to provide suffi cient security.

Unfortunately, no security mechanism is perfect. Every individual security mechanism has a fl aw or a workaround just waiting to be discovered and abused by a hacker.

Only through the intelligent combination of countermeasures can you construct a defense that will resist signifi cant and persistent attempts at compromise. Intruders or attackers would need to overcome multiple layers of defense to reach the protected assets.

Exam Essentials

Understand DMZs A demilitarized zone (DMZ) is an area of a network that is designed specifi cally for public users to access. The DMZ is a buffer network between the public untrusted Internet and the private trusted LAN. Often a DMZ is deployed through the use of a multihomed fi rewall.

Understand extranets An extranet is an intranet that functions as a DMZ for business-tobusiness transactions. Extranets let organizations offer specialized services to business partners, suppliers, distributors, or customers.

Understand subnetting Subnetting is a divisioning process used on networks to divide larger groups of hosts into smaller collections.

Understand VLANs Switches are often used to create virtual LANs (VLANs)—logical creations of subnets out of a single physical network. VLANs are used to logically segment a network without altering its physical topology. They’re easy to implement, have little administrative overhead, and are a hardware-based solution.

Understand NAT NAT converts the IP addresses of internal systems found in the header of network packets into public IP addresses. It hides the IP addressing scheme and structure from external entities. NAT serves as a basic fi rewall by only allowing incoming traffi c that is in response to an internal system’s request. It reduces expense by requiring fewer leased public IP addresses, and it allows the use of private IP addresses (RFC 1918).

Understand RFC 1918 RFC 1918 defi nes the ranges of private IP addresses that aren’t routable across the Internet: 10.0.0.0–10.255.255.255 (10.0.0.0 /8 subnet), 1 Class A range; c01.indd 21/04/2014 Page 39

40

Chapter 1

Network Security

172.16.0.0–172.31.255.255 (172.16.0.0 /12 subnet), 16 Class B ranges; and 192.168.0.0–

192.168.255.255 (192.168.0.0 /16 subnet), 256 Class C ranges.

Understand remote access A remote access server (RAS) is a network server that supports connections from distant users or systems. RAS systems often support modem banks, VPN links, and terminal services connections.

Understand telephony Telephony is the collection of methods by which telephone services are provided to an organization or the mechanisms by which an organization uses telephone services for either voice and/or data communications. Traditionally, telephony included POTS or PSTN services combined with modems. However, this has expanded to include PBX, VoIP, and VPN.

Understand NAC Network Access Control (NAC) means controlling access to an environment through strict adherence to and implementation of security policies. The goals of

NAC are to prevent/reduce zero-day attacks, enforce security policy throughout the network, and use identities to perform access control.

Understand virtualization technology Virtualization technology is used to host one or more OSs within the memory of a single host computer.

Understand cloud computing Cloud computing involves performing processing and storage elsewhere, over a network connection, rather than locally. Cloud computing is often thought of as Internet-based computing.

Understand defense in depth Defense in depth or layered security is the use of multiple types of access controls in literal or theoretical concentric circles or layers.

1.4 Given a scenario, implement common protocols and services

Literally thousands of protocols are supported in the TCP/IP stack/suite. However, only a few of them are related to security, have native security features/benefi ts, and are included on the CompTIA Security+ exam.

Protocols

The following material focuses on those protocols specifi ed in the offi cial Security+ objectives list.

IPSec

Internet Protocol Security (IPSec) is both a stand-alone VPN protocol and a module that can be used with L2TP. You can use IPSec in dial-up or network-to-network connections. When it’s employed over dial-up, it usually functions as the encryption protocol in an L2TP link. c01.indd 21/04/2014 Page 40

1.4 Given a scenario, implement common protocols and services

41

IPSec by itself is more suitable for network-to-network connections across normal LAN connections, high-speed WAN links, and the Internet.

IPSec isn’t a single protocol but rather a collection of protocols. Two of the primary protocols of IPSec are Authentication Header (AH) and Encapsulating Security Payload

(ESP). AH provides authentication of the sender’s data; ESP provides encryption of the transferred data as well as limited authentication.

IPSec can operate in two modes: tunnel mode and transport mode. In tunnel mode,

IPSec provides encryption protection for both the payload and message header by encapsulating the entire original LAN protocol packet and adding its own temporary IPSec header

(see Figure 1.21). In transport mode, IPSec provides encryption protection for just the payload and leaves the original message header intact (see Figure 1.22). You should use tunnel mode when you’re connecting over an untrusted network.

F I G U R E 1 . 2 1 IPSec’s encryption of a packet in tunnel mode

Unencrypted

IPSec

Header

IP Header Data Payload

Encrypted

F I G U R E 1 . 2 2 IPSec’s encryption of a packet in transport mode

Unencrypted

IP Header

IPSec

Header

Data Payload

Encrypted

IPSec provides for encryption security using symmetric cryptography. This means communication partners use shared secret keys to encrypt and decrypt traffi c over the IPSec

VPN link. One of the mechanisms used by IPSec to manage cryptography is Internet Key

Exchange (IKE); it ensures the secure exchange of secret keys between communication partners in order to establish the encrypted VPN tunnel.

IPSec also uses Internet Security Association and Key Management Protocol (ISAKMP), which is known as a security association manager. A security association is the agreed-on method of authentication used by two entities. Without a common method of authentication, a VPN link can’t be established. So, ISAKMP is used to negotiate and provide authenticated keying material (a common method of authentication) for security associations in a secured manner. The four major functional components of ISAKMP are as follows:

Authentication of communications peers

Threat mitigation c01.indd 21/04/2014 Page 41

42

Chapter 1

Network Security

Security association creation and management

Cryptographic key establishment and management

SNMP

Simple Network Management Protocol (SNMP) is a standard network-management protocol supported by most network devices and TCP/IP-compliant hosts. These include routers, switches, bridges, WAPs, fi rewalls, VPN appliances, modems, printers, and so on.

Through the use of a management console, you can use SNMP to interact with various network devices to obtain status information, performance data, statistics, and confi guration details. Some devices support the modifi cation of confi guration settings through SNMP.

Early versions of SNMP relied on plaintext transmission of community strings as authentication. Communities were named collections of network devices that SNMP management consoles could interact with. The original default community names were public and private. The latest version of SNMP provides for encrypted communications between devices and the management console, as well as authentication protection.

SNMP operates over UDP ports 161 and 162. UDP port 161 is used by the SNMP agent

(that is, network device) to receive requests, and UDP port 162 is used by the management console to receive responses and notifi cations (aka trap messages).

SSH

Secure Shell (SSH) is a more secure replacement for Telnet, rlogon, rsh, and rcp. SSH can be called a remote access or remote terminal solution. It consists of an SSH server component and an SSH client component.

SSH offers a means by which a command-line, text-only interface connection with a server, router, switch, or similar device can be established over any distance. You can perform any command-line or scriptable activities through the SSH connection, as shown in

Figure 1.23.

SSH transmits both authentication traffi c and data in a secured encrypted form. Thus, no information is exchanged in clear text. This makes SSH a secure alternative to Telnet, which transmits both authentication credentials and data in clear text. SSH operates over

TCP port 22.

DNS

Domain name system (DNS) is the hierarchical naming scheme used in both public and private networks. DNS links IP addresses and human-friendly fully qualifi ed domain names

(FQDNs) together. A FQDN consists of three main parts:

Top-level domain (TLD)—The com

in www.google.com

Registered domain name—The google

in www.google.com

Subdomain(s) or hostname—The www

in www.google.com

c01.indd 21/04/2014 Page 42

1.4 Given a scenario, implement common protocols and services

43

F I G U R E 1 . 2 3 A Unix version of SSH, showing a list of available command-line options

The TLD can be any number of offi cial options, including six of the original seven

TLDs— com

, org

, edu

, mil

, gov

, and net

—as well as many newer ones, such as info

, museum

, telephone

, mobi

, biz

, and so on. There are also country variations known as

country codes. (See www.iana.org/domains/root/db/

for details on current TLDs and country codes.)

The registered domain name must be offi cially registered with one of any number of approved domain registrars, such as Network Solutions or GoDaddy.com.

The far-left section of a FQDN can be either a single hostname, such as www

, ftp

, and so on, or a multisectioned subdomain designation, such as server1.group3.bldg5

.mycompany.com

.

The total length of a FQDN can’t exceed 253 characters (including the dots). Any single section can’t exceed 63 characters. FQDNs can only contain letters, numbers, and hyphens.

Every registered domain name has an assigned authoritative name server. The authoritative name server hosts the original zone fi le for the domain. A zone fi le is the collection of resource records or details about the specifi c domain. There are dozens of possible resource records (see http://en.wikipedia.org/wiki/List_of_DNS_record_types

), but the most common are listed in Table 1.2.

c01.indd 21/04/2014 Page 43

44

Chapter 1

Network Security

TA B L E 1 . 2 Common resource records

Record

A

AAAA

PTR

CNAME

MX

NS

SOA

Type

Address record

Address record

Pointer record

Description

Links a FQDN to an IPv4 address

Links a FQDN to an IPv6 address

Links an IP address to a FQDN (for reverse lookups)

Canonical name Links a FQDN alias to another FQDN

Mail exchange Links a mail- and messaging-related FQDN to an IP address

Name server record

Designates the FQDN and IP address of an authorized name server

Start of authority record

Specifies authoritative information about the zone file, such as primary name server, serial number, timeouts, and refresh intervals

Originally, DNS was handled by a static local fi le known as the HOSTS fi le. This fi le still exists, but a dynamic DNS query system has mostly replaced it, especially for large private networks as well as the Internet. When client software points to a FQDN, the protocol stack initiates a DNS query in order to resolve the name into an IP address that can be used in the construction of the IP header. The resolution process fi rst checks the local DNS cache to see if the answer is already known. The DNS cache consists of preloaded content from the local HOSTS fi le plus any DNS queries performed during the current boot session (that haven’t timed out). If the needed answer isn’t in the cache, a DNS query is sent to the DNS server indicated in the local IP confi guration. The process of resolving the query is interesting and complex, but most of it isn’t relevant to the Sec+ exam. To explore DNS in more detail, see http://en.wikipedia.org/wiki/Domain_Name_System

and http://unixwiz

.net/techtips/iguide-kaminsky-dns-vuln.html

.

DNS operates over TCP and UDP port 53. TCP port 53 is used for zone transfers. These are zone fi le exchanges between DNS servers, special manual queries, or used when a response exceeds 512 bytes. UDP port 53 is used for most typical DNS queries.

TLS

Transport Layer Security (TLS) is the updated replacement for the Netscape Corporation’s

SSL (see the next section). TLS is generally the same as SSL, but it uses more secure cryptographic protocols and algorithms. It’s currently the preferred protocol for securing a wide variety of Layer 5+ protocol–based communications.

c01.indd 21/04/2014 Page 44

1.4 Given a scenario, implement common protocols and services

45

SSL

Secure Sockets Layer (SSL) and Transport Layer Security (TLS) are used to encrypt traffi c between a web browser and a web server. Through the use of SSL or TLS, web surfers can make online purchases, interact with banks, and access private information without disclosing the contents of their communications. SSL and TLS can make web transactions private and secure. Although they aren’t true VPN protocols, SSL and TLS operate in much the same manner as VPNs.

SSL was originally developed by Netscape, but it quickly became an Internet standard and has been replaced by TLS (although some say it was just renamed). TLS is based on

SSL, but the two aren’t interoperable. SSL operates over TCP port 443, whereas TLS can operate over either of the default TCP ports, 443 and 80 (as does HTTP).

SSL/TLS can also be used to provide encrypted sessions for other Application layer protocols, such as Telnet, FTP, and email. SSL/TLS functions at the top of Layer 4 (the

Transport layer) of the OSI model. Thus, any protocol in Layers 5–7 can be secured using SSL/TLS.

When you use SSL/TLS to secure communications between a web browser and web server, a multistep handshake process must be completed to establish the secured session:

1.

The client requests a secure connection.

2.

The server responds with its certificate, the name of its certificate authority (issuing

CA), and its public key.

3.

The client verifies the server’s certificate, produces a session (symmetric) encryption key, encrypts the key with the server’s public key, and sends the encrypted key to the server.

4.

The server unpacks the session key and sends a summary of the session details to the client, encrypted with the session key.

5.

The client reviews the summary and sends its own summary back to the server, likewise encrypted with the session key.

6.

After both entities receive a matching session summary, secured SSL communications are initiated.

SSL/TLS uses symmetric keys as the session keys. The session keys available for SSL included 40-bit and 128-bit strengths. TLS session keys can currently span between 128 bit and 256 bit.

TCP/IP

TCP/IP is the primary protocol suite in use on the Internet and most private networks across the planet. TCP/IP is a protocol suite that wasn’t originally designed around a global network concept; nor was security a primary feature. However, it has succeeded as the primary protocol used on the Internet, and many security protocols and add-on features are supported by IP and TCP.

c01.indd 21/04/2014 Page 45

46

Chapter 1

Network Security

General knowledge of the TCP/IP suite is necessary for the Security+ exam, but it’s assumed to be a prerequisite knowledge base primarily derived from the CompTIA

Network+ certifi cation. If you aren’t generally versed in TCP/IP, please consult Network+ study materials or research TCP/IP online.

FTPS

FTPS is FTP Secure or FTP SSL, which indicates that it’s a variation of FTP secured by

SSL (or now TLS). This is an FTP service variation distinct from SSH-secured FTP (SFTP).

Although in general use they’re similar, in that both provide for cryptographically protected fi le transfers, they aren’t interoperable.

FTPS is supported by FTP servers in either an implicit or an explicit mode (FTPIS or

FTPES, respectively). Implicit implies that the client must specifi cally challenge the FTPS server with a TLS/SSL ClientHello message. This assumes that only FTPS clients will connect.

In order to allow traditional FTP clients to continue to operate over ports 20 (data channel) and 21 (control channel), FTPS is delegated to ports 990 (control channel) and 989 (data channel). It’s important, however, to note that implicit mode is now considered deprecated.

Explicit (FTPES) mode implies that the FTPS client must specifi cally request an FTPS connection on ports 20 and 21; otherwise, an insecure FTP connection will be attempted.

More information regarding explicit mode is available in RFC 2228 and RFC 4218.

HTTPS

The World Wide Web is a vast, global, ad hoc collection of online information and storefronts. The primary protocol that supports the Web is Hypertext Transfer Protocol

(HTTP). HTTP enables the transmission of Hypertext Markup Language (HTML) documents (the base page elements of a website) and embedded multimedia components such as graphics and mobile code (see Figure 1.24). Without HTTP, there would be no Web.

However, HTTP is an insecure protocol: it doesn’t offer anything in the way of secure authentication or data encryption for web communications. Fortunately, numerous addon protocols and mechanisms provide these and other security services to the information superhighway.

F I G U R E 1 . 2 4 A web server providing streaming video, animations, and HTML data to a client

Adobe Flash

Internet

QuickTime

Client

Web Server

Java c01.indd 21/04/2014 Page 46

1.4 Given a scenario, implement common protocols and services

47

HTTP operates over TCP port 80. It’s a plaintext or cleartext communication protocol; thus it offers no security or privacy to transactions. When SSL or TLS is used to secure transactions, this is known as Hypertext Transfer Protocol over SSL (HTTPS) or

Hypertext Transfer Protocol Secured (HTTPS). You can recognize when secure web communications are occurring using SSL or TLS because the URL begins with

HTTPS

and a locked padlock icon appears in the status bar at the bottom of the browser window.

It’s important not to confuse HTTPS with a similar protocol, Secure HTTP (S-HTTP).

S-HTTP isn’t in widespread use. The primary differences are that S-HTTP doesn’t use SSL; it encrypts individual web page elements rather than the entire web communication session, and it can only be used to support HTTP. Overall, S-HTTP is less secure than HTTPS.

In addition to web pages, SSL can also be used to secure FTP, Network News Transfer

Protocol (NNTP), Telnet, and other Application layer TCP/IP protocols. However, when

SSL is used for protecting other application protocols, the destination port is different than that of HTTPS, which uses 443; other examples include SMTP over SSL at 465 and POP3 over SSL at 995. S-HTTP is unable to protect anything other than web traffi c.

SCP

Secure Copy Protocol (SCP) is a secure fi le-transfer facility based on SSH and Remote Copy

Protocol (RCP). SCP is commonly used on Linux and Unix platforms, although Windows versions are available. It’s generally used as a command-line tool, but many graphical user interface (GUI) fi le-transfer clients include SCP support.

ICMP

Internet Control Message Protocol (ICMP) is a network health and link-testing protocol.

ICMP operates in Layer 3 as the payload of an IP packet. It’s the protocol commonly used by tools such as ping, traceroute, and pathping. Most uses of ICMP revolve around its echo-request to echo-reply system. ICMP is also used for error announcement or transmission. However, ICMP only provides information when a packet is actually received. If

ICMP request queries go unanswered, or ICMP replies are lost or blocked, then ICMP provides no information.

ICMP is also a protocol commonly used for network scanning and malicious attacks.

When it’s used as a network-scanning protocol, ping sweeps are used to identify the IP addresses in use. However, because ICMP can be ignored or blocked, this makes it an unreliable host-discovery tool. As for malicious attacks, ICMP abuses include Ping of Death,

Smurf, and Loki.

Ping of Death creates multiple packet fragments that are “re-”assembled on the target to create an ICMP/IP packet that is larger than the maximum valid size of 65,535 bytes. On unprotected systems, this can cause freezing or rebooting.

Smurf abuses ICMP by using it in a fl ooding attack. An attacker sends ICMP echo requests to the directed broadcast address of numerous networks with insecure Internetaccessible router/fi rewall interfaces. These requests are spoofed so they appear to come from the victim’s IP address. Each recipient of the echo request sends back an echo reply to the victim, causing a fl ood of traffi c to DoS the victim.

c01.indd 21/04/2014 Page 47

48

Chapter 1

Network Security

Loki is a tool that uses ICMP as an encapsulation or tunnel protocol. Effectively, Loki uses ICMP like a non-encrypted VPN. It operates across network boundaries that allow outbound ICMP echo requests and their corresponding inbound echo replies.

ICMP functions or operates around a signaling system known as Type and Code.

There are roughly 40 defi ned Types for ICMP; the fi ve most common (and relevant for the

Security+ exam) are listed in Table 1.3.

TA B L E 1 . 3 Common ICMP types

8

11

ICMP Type

0

3

5

Description

Echo request

Echo reply

Time exceeded

Destination unreachable

Redirect

Some types have further detailed designations using Codes. For example, Type 3 destination unreachable has 14 Codes used to provide more specifi c detail as to the reason or cause of the Type. A common example, Type 3, Code 3—which means destination unreachable, destination port unreachable—is the standard response from a closed UDP port when packets are sent to it.

IPv4

Currently, IPv4 is in widespread use with a 32-bit addressing scheme. Most of the public network is still IPv4-based. Available public IPv4 addresses are scarce. IPv4 (as well as

IPv6) operates at the Network layer or Layer 3 of the OSI protocol stack.

IPv6

IPv6 was fi nalized in RFC 2460 in 1998. It uses a 128-bit addressing scheme, eliminates broadcasts and fragmentation, and includes native communication-encryption features.

IPv6 is growing in use worldwide but has yet to make a signifi cant impact on the Internet in general. It was enabled offi cially on the Internet on June 6, 2012. The move to IPv6 is still occurring slowly, but the pace is beginning to increase.

iSCSI

Internet Small Computer System Interface (iSCSI) is a networking storage standard based on IP. This technology can be used to enable location-independent fi le storage, c01.indd 21/04/2014 Page 48

1.4 Given a scenario, implement common protocols and services

49

transmission, and retrieval over LAN, WAN, or public Internet connections. iSCSI is often viewed as a low-cost alternative to Fibre Channel.

Fibre Channel

Fibre Channel is a form of network data-storage solution (storage area network [SAN]) or network-attached storage [NAS]) that allows for high-speed fi le transfers at upward of 16

Gbps. It was designed to be operated over fi ber-optic cables; support for copper cables was added later to offer less expensive options. Fibre Channel typically requires its own dedicated infrastructure (separate cables). However, Fibre Channel over Ethernet (FCoE) can be used to support it over the existing network infrastructure.

FCoE

FCoE is used to encapsulate Fibre Channel communications over Ethernet networks. It typically requires 10 Gbps Ethernet in order to support the Fibre Channel protocol. With this technology, Fibre Channel operates as a Network layer or OSI Layer 3 protocol, replacing

IP as the payload of a standard Ethernet network.

FTP

The antiquated protocol of fi le transfer or exchange is File Transfer Protocol (FTP). This protocol is often used to move fi les between one system and another either over the Internet or within private networks. Understanding the basics of FTP and the secured alternative fi le-transfer solutions is important for the Security+ exam.

FTP is an in-the-clear fi le-exchange protocol. It’s supported by any computer system that uses TCP/IP. An FTP server system is confi gured to allow authenticated or anonymous FTP clients to log on in order to upload or download fi les. FTP employs TCP ports 20 and 21 to establish and maintain client-to-server communications, and it then often uses a randomly selected higher port (above 1023) for fi le transfers.

The exchange of fi les is a common practice on the Internet, intranets, and extranets.

FTP is an independent platform and thus makes fi le exchanges between different OSs simple. It’s one of the common services deployed in a DMZ—an extension of a private network where Internet users can access services such as the Web and email—in order to provide controlled public access to company resources while still allowing internal clients to access the services.

Because all FTP traffi c is transmitted in the clear, it’s vulnerable to packet sniffi ng and other forms of eavesdropping. It’s important not to use the same user account and password on FTP that you use in a secure environment. Otherwise, if an attacker captures your FTP logon traffi c, they also obtain the logon credentials needed to log in to your secured network. Always use a separate and distinct user account for FTP logons. Sniffers and protocol analyzers are discussed in the “Protocol analyzers” section earlier in this chapter.

Anonymous FTP is a form of nameless logon to an FTP server. Usually, visitors to an

FTP site who wish to log on anonymously use the word anonymous as the logon name. c01.indd 21/04/2014 Page 49

50

Chapter 1

Network Security

They’re then prompted to provide their email address as the password, but any text string suffi ces.

Site administrators should carefully confi gure FTP servers that allow anonymous access. Anonymous users shouldn’t be able to download (or, in many cases, view) any fi les uploaded by anonymous users. Anonymous upload and download should be enabled only if absolutely necessary. When possible, don’t allow both authenticated and anonymous FTP logons on the same FTP site. Most FTP servers have anonymous FTP enabled by default, so usually it must be specifi cally disabled in order to limit access to authenticated users.

If FTP upload is allowed—especially when anonymous FTP uploading is allowed— ensure that it isn’t possible to access upload folders from a web URL. If you don’t take this precaution, web visitors may be able to download fi les from the FTP site through HTTP, or they may be able to execute uploaded fi les. Both of these tactics are commonly used by hackers in a wide variety of intrusion attacks.

Blind FTP is a confi guration of anonymous FTP or authenticated FTP where uploaded fi les are unseen and unreadable by visitors. Thus, users can upload fi les but not see the resulting uploads. Additionally, even if a user knows the exact pathname and fi lename of a fi le deposited onto your blind FTP site, the deposited fi les are write-only, and thus reading or downloading isn’t possible. This ensures that your FTP site isn’t overrun by fi le swappers using your system as a fi le-exchange point. File swappers often exchange illegal (unlicensed) copies of software, music, and movies through unsecured FTP servers. Uploaded fi les on a blind FTP server become accessible only after the administrator has either changed the fi les’ permissions or moved them into a folder confi gured to allow downloads.

SFTP

Secure FTP (SFTP) is a secured alternative to standard FTP. Standard FTP sends all data, including authentication traffi c, in the clear. Thus, there is no confi dentiality protection. SFTP encrypts both authentication and data traffi c between the client and server by employing SSH to provide secure FTP communications. Thus, SFTP provides protection for both the authentication traffi c as well as the data transfer occurring between a client and server.

No matter what secure FTP solution is employed, both the server and the client must have the same solution. The client and the server must have compatible or interoperable

FTP tools in order to establish a connection and support the exchange of fi les. Otherwise,

FTP session establishment and subsequent fi le-transfer communications won’t be possible.

TFTP

Trivial File Transfer Protocol (TFTP) is a simple fi le-exchange protocol that doesn’t require authentication. It has fewer commands and capabilities than FTP. TFTP operates on UDP port 69. It can be used to host device-confi guration fi les. This allows those devices to download their confi guration if it’s lost, such as due to a power failure. Thus essential network devices can self-restore quickly.

c01.indd 21/04/2014 Page 50

1.4 Given a scenario, implement common protocols and services

51

TELNET

Telnet is a terminal-emulation network application that supports remote connectivity for executing commands and running applications but doesn’t support transfer of fi les. Telnet uses TCP port 23. Because it’s a cleartext protocol and service, it should be avoided and replaced with SSH.

HTTP

See the earlier section “HTTPS,” which includes discussion of HTTP.

NetBIOS

NetBIOS comprises three distinct services; each uses a different port. NetBIOS over TCP/IP

(NBT) uses UDP port 137. NetBIOS Session service uses TCP port 139. NetBIOS Datagram service uses UDP port 138. Sometimes TCP/UDP port 445 is linked to NetBIOS, although it’s used by the Microsoft directory service to support Server Message Block (SMB) fi le sharing.

Ports

Layer 4, the Transport layer, uses ports to indicate the protocol that is to receive the payload/content of the TCP or UDP packet. Ports also assist in supporting multiple simultaneous connections or sessions over a single IP address. There are 65,535 potential ports. See www.iana.org/assignments/port-numbers

for a current complete list of ports and protocol associations.

There are a number of common protocol default ports you need to know for this exam.

Those specifi ed on the offi cial CompTIA Security+ objectives are listed here. All listed ports are default ports, meaning custom confi gurations can use alternate port selections.

21

FTP uses TCP ports 20 (data) and 21 (control).

22

SSH uses TCP port 22. All protocols encrypted by SSH also use TCP port 22, such as

SFTP, SHTTP, SCP, SExec, and slogin.

25

SMTP uses TCP port 25.

53

DNS uses TCP and UDP port 53. TCP port 53 is used for zone transfers, whereas UDP port

53 is used for queries. c01.indd 21/04/2014 Page 51

52

Chapter 1

Network Security

80

HTTP uses TCP port 80 or TCP port 8080.

110

Post Offi ce Protocol v3 (POP3) uses TCP port 110.

139

NetBIOS Session service uses TCP port 139.

143

Internet Message Access Protocol v4 (IMAP4) uses TCP port 143.

443

HTTPS uses TCP port 443 (or TCP port 80 in some confi gurations of TLS).

3389

Remote Desktop Protocol (RDP) uses TCP port 3389.

OSI relevance

The OSI model (ISO/IEC 7498-1) was developed over three decades ago as a conceptual reference model for describing protocols, as well as potentially to guide their design. But over the years, protocols were not designed to adhere to the OSI model, so its relevance has waned. Many IT professionals still use OSI as a standard reference. Most discussions of protocols and hardware continue to use its seven-layer model as a point of reference in order to maintain clear communications and to be able to relate more easily to existing documentation and prior technology. However, using the OSI model as a protocol reference is a bit like using Imperial units (United States customary/standard units) of measurement while the rest of the world uses metric.

The most widely used protocol in the world today is TCP/IP (which is in fact a protocol suite rather than an individual protocol). TCP/IP operates on a four-layer basis rather than on the seven layers of the OSI model. This four-layer model is also referred to as the

DARPA model or the DoD model. Here is a quick cross-reference between the two models:

TCP/IP Model

Process layer (4)

Host-to-host layer (3)

OSI Model

Application layer (7)

Presentation layer (6)

Session layer (5)

Transport layer (4) c01.indd 21/04/2014 Page 52

1.4 Given a scenario, implement common protocols and services

53

TCP/IP Model

Internetworking layer (2)

Link layer (1)

OSI Model

Network layer (3)

Data Link layer (2)

Physical layer (1)

On the Security+ exam, when a layer name or number is mentioned, assume that it means the OSI model. Only if the exam uses one of the TCP/IP-specifi c layer names or calls out the four-layer model directly is it referencing the TCP/IP model.

Exam Essentials

Understand IPSec Internet Protocol Security (IPSec) is both a stand-alone VPN protocol and a module that can be used with L2TP. IPSec can be used in dial-up or network-to-network connections. It operates at OSI model Layer 3 (the Network layer).

Understand AH and ESP IPSec isn’t a single protocol but rather a collection of protocols.

Two of the primary protocols of IPSec are Authentication Header (AH) and Encapsulating

Security Payload (ESP). AH provides authentication of the sender’s data; ESP provides encryption of the transferred data as well as limited authentication.

Understand tunnel mode and transport mode In tunnel mode, IPSec provides encryption protection for both the payload and the message header by encapsulating the entire original LAN protocol packet and adding its own temporary IPSec header. In transport mode,

IPSec provides encryption protection for just the payload and leaves the original message header intact.

Understand IKE Internet Key Exchange (IKE) ensures the secure exchange of secret keys between communication partners in order to establish an encrypted VPN tunnel.

Understand ISAKMP Internet Security Association and Key Management Protocol

(ISAKMP) is used to negotiate and provide authenticated keying material (a common method of authentication) for security associations in a secured manner. The four major functional components of ISAKMP are authentication of communications peers, threat mitigation, security association creation and management, and cryptographic key establishment and management.

Understand SNMP Simple Network Management Protocol (SNMP) is a standard network-management protocol supported by most network devices and TCP/IP-compliant hosts. These include routers, switches, bridges, WAPs, fi rewalls, VPN appliances, modems, printers, and so on.

Understand SSH Secure Shell (SSH) is a secure replacement for Telnet, rlogon, rsh, and

RCP. It can be called a remote-access or remote-terminal solution. SSH encrypts authentication and data traffi c, and it operates over TCP port 22.

c01.indd 21/04/2014 Page 53

54

Chapter 1

Network Security

Understand DNS DNS is the hierarchical naming scheme used in both public and private networks. It links IP addresses and human-friendly fully qualifi ed domain names (FQDNs) together.

Understand TLS Transport Layer Security (TLS) is the updated replacement for the

Netscape Corporation’s SSL. It’s generally the same as SSL, but it uses more secure cryptographic protocols and algorithms.

Understand SSL Secure Sockets Layer (SSL) and Transport Layer Security (TLS) are used to encrypt traffi c between a web browser and a web server. Through the use of SSL or TLS, web surfers can make online purchases, interact with banks, and access private information without disclosing the contents of their communications. SSL and TLS can make web transactions private and secure.

Understand TCP/IP TCP/IP is the primary protocol suite in use on the Internet and most private networks across the planet.

Understand FTPS FTPS is FTP Secure or FTP SSL, which indicates it’s a variation of FTP secured by SSL (or now TLS). This FTP service variation is distinct from SFTP, which is

SSH-secured FTP.

Understand HTTPS When SSL or TLS is used to secure transactions, it’s known as

Hypertext Transfer Protocol over SSL or Hypertext Transfer Protocol Secured (HTTPS).

Understand SCP Secure Copy Protocol (SCP) is a secure fi le-transfer facility based on SSH and RCP.

Understand ICMP Internet Control Messaging Protocol (ICMP) is a network health and link-testing protocol. It operates in Layer 3 as the payload of an IP packet. ICMP is the protocol commonly used by tools such as ping, traceroute, and pathping.

Understand IPv4 IPv4 is in widespread use with a 32-bit addressing scheme and operates at the Network layer or Layer 3 of the OSI protocol stack.

Understand IPv6 IPv6 uses a 128-bit addressing scheme, eliminates broadcasts and fragmentation, and includes native communication-encryption features.

Understand iSCSI Internet Small Computer System Interface (iSCSI) is a networking storage standard based on IP.

Understand Fibre Channel Fibre Channel is a form of network data-storage solution

(SAN or NAS) that allows for high-speed fi le transfers.

Understand FCoE Fibre Channel over Ethernet (FCoE) is used to encapsulate Fibre

Channel communications over Ethernet networks.

Understand FTP File Transport Protocol (FTP) is an in-the-clear fi le-exchange solution.

An FTP server system is confi gured to allow authenticated or anonymous FTP clients to log on in order to upload or download fi les. FTP employs TCP ports 20 and 21.

c01.indd 21/04/2014 Page 54

1.4 Given a scenario, implement common protocols and services

55

Understand anonymous FTP Anonymous FTP is a form of nameless logon to an FTP server. Site administrators should carefully confi gure FTP servers that allow anonymous access.

Understand blind FTP Blind FTP is a confi guration of anonymous FTP or authenticated

FTP where uploaded fi les are unseen and unreadable by visitors. Thus, users can upload fi les but cannot see the resulting uploads.

Understand FTP vulnerabilities Because all FTP traffi c is transmitted in the clear, it’s vulnerable to packet sniffi ng and other forms of eavesdropping.

Understand SFTP Secure FTP (SFTP) is a secured alternative to standard or basic FTP that encrypts both authentication and data traffi c between the client and server. SFTP employs SSH to provide secure FTP communications.

Understand TFTP Trivial File Transfer Protocol (TFTP) is a simple fi le-exchange protocol that doesn’t require authentication. It operates on UDP port 69.

Understand Telnet Telnet is a terminal-emulation network application that supports remote connectivity for executing commands and running applications but doesn’t support transfer of fi les. Telnet uses TCP port 23.

Understand NetBIOS NetBIOS comprises three distinct services, each of which uses a different port. NetBIOS over TCP/IP (NBT) uses UDP port 137. NetBIOS Session service uses

TCP port 139. NetBIOS Datagram service uses UDP port 138. Sometimes TCP/UDP port

445 is linked to NetBIOS, although it’s used by the Microsoft directory service to support

Server Message Block (SMB) fi le sharing.

Understand ports Layer 4, the Transport layer, uses ports to indicate the protocol that is to receive the payload/content of the TCP or UDP packet. Ports also assist in supporting multiple simultaneous connections or sessions over a single IP address. There are 65,535 potential ports.

Understand port numbers

FTP uses TCP ports 20 (data) and 21 (control).

SSH uses TCP port 22. All protocols encrypted by SSH also use TCP port 22, such as

SFTP, SHTTP, SCP, SExec, and slogin.

SMTP uses TCP port 25.

DNS uses TCP and UDP port 53. TCP port 53 is used for zone transfers, whereas UDP port 53 is used for queries.

HTTP uses TCP port 80 or TCP port 8080.

POP3 uses TCP port 110.

NetBIOS Session service uses TCP port 139.

c01.indd 21/04/2014 Page 55

56

Chapter 1

Network Security

IMAP4 uses TCP port 143.

HTTPS uses TCP port 443 (or TCP port 80 in some confi gurations of TLS).

RDP uses TCP port 3389.

Understand OSI Relevance The Open Systems Interconnection (OSI) model (ISO/IEC

7498-1) was developed over three decades ago as a conceptual reference model for describing protocols, as well as potentially to guide their design. However, over the years protocols were not designed to adhere to the OSI model, so its relevance has waned.

1.5 Given a scenario, troubleshoot security issues related to wireless networking

Wireless networking has become common on both corporate and home networks. Properly managing wireless networking for reliable access as well as security isn’t always an easy or straightforward proposition. This section examines various wireless security issues.

Wireless cells are the areas in a physical environment where a wireless device can connect to a wireless access point. Wireless cells can leak outside the secured environment and allow intruders easy access to the wireless network. You should adjust the strength of the wireless access point (WAP) to maximize authorized user access and minimize intruder access. Doing so may require unique placement of WAPs, shielding, and noise transmission.

802.11 is the IEEE standard for wireless network communications. Various versions

(technically called amendments) of the standard have been implemented in wireless networking hardware, including 802.11a, 802.11b, 802.11g, and 802.11n. 802.11x is sometimes used to collectively refer to all of these specifi c implementations as a group; however,

802.11 is preferred because 802.11x is easily confused with 802.1x, which is an authentication technology independent of wireless. Each version or amendment of the 802.11 standard has offered slightly better throughput: 2 Mbps, 11 Mbps, 54 Mbps, and 200+ Mbps, respectively, as described in Table 1.4. The 802.11 standard also defi nes Wired Equivalent

Privacy (WEP), which provides eavesdropping protection for wireless communications.

TA B L E 1 . 4 802.11 wireless networking amendments

Amendment

802.11

802.11a

Speed

2 Mbps

54 Mbps

Frequency

2.4 GHz

5 GHz c01.indd 21/04/2014 Page 56

1.5 Given a scenario, troubleshoot security issues

57

Amendment

802.11b

802.11g

802.11n

Speed

11 Mbps

54 Mbps

200+ Mbps

Frequency

2.4 GHz

2.4 GHz

2.4 GHz or 5 GHz

Wireless networking has made networking more versatile than ever before. Workstations and portable systems are no longer tied to a cable but can roam freely around an offi ce or environment—anywhere within the signal range of the deployed WAPs. However, this freedom comes at the cost of additional vulnerabilities. Wireless networks are subject to the same vulnerabilities, threats, and risks as any cabled network, plus there are the additional issues of distance eavesdropping and packet sniffi ng as well as new forms of DoS and intrusion.

When you’re deploying wireless networks, you should deploy WAPs confi gured to use

infrastructure mode rather than ad hoc mode. Ad hoc mode means that any two wireless networking devices, including two wireless network interface cards (NICs), can communicate without a centralized control authority. Infrastructure mode means that a WAP is required, wireless NICs on systems can’t interact directly, and the restrictions of the WAP for wireless network access are enforced.

Infrastructure mode includes several variations, including stand-alone, wired extension, enterprise extended, and bridge. A stand-alone mode infrastructure occurs when there is a WAP connecting wireless clients to each other, but not to any wired resources. The WAP serves as a wireless hub exclusively. A wired extension mode infrastructure occurs when the WAP acts as a connection point to link the wireless clients to the wired network. An

enterprise extended mode infrastructure occurs when multiple WAPs are used to connect a large physical area to the same wired network. Each WAP uses the same extended service set identifi er (ESSID) so clients can roam the area while maintaining network connectivity, even if their wireless NICs change associations from one WAP to another. A bridge mode infrastructure occurs when a wireless connection is used to link two wired networks. This often uses dedicated wireless bridges and is used when wired bridges are inconvenient, such as when linking networks between fl oors or buildings.

The term SSID (which stands for service set identifier) is typically misused to indicate the name of a wireless network. Technically there are two types of SSIDs: extended service set identifier (ESSID) and basic service set identifier (BSSID). An ESSID is the name of a wireless network when a wireless base station or WAP is used (that is, infrastructure mode). A BSSID is the name of a wireless network when in ad hoc or peer-to-peer mode (that is, when a base station or WAP isn’t used). However, when operating in infrastructure mode, the BSSID is the MAC address of the base station hosting the ESSID, in order to differentiate multiple base stations supporting a single extended wireless network.

c01.indd 21/04/2014 Page 57

58

Chapter 1

Network Security

Wireless Channels

There are many topics within wireless networking that I’m not addressing due to space limitations and because they’re not covered on the exam. For instance, you may want to learn more about wireless channels. Within the assigned frequency of the wireless signal are subdivisions of that frequency known as channels. Think of channels as lanes on the same highway. In the United States, there are 11 channels; in Europe, there are 13; and in

Japan, there are 17. The differences stem from local laws regulating frequency management (think international versions of the United States’ Federal Communications Commission).

Wireless communications take place between a client and WAP over a single channel.

However, when two or more WAPs are relatively close to each other physically, signals on one channel can interfere with signals on another channel. One way to avoid this is to set the channels of physically close WAPs as differently as possible, to minimize channeloverlap interference. For example, if a building has four WAPs arranged in a line along the length of the building, the channel settings could be 1, 11, 1, and 11. But if the building is square, and a WAP is in each corner, the channel settings may need to be 1, 4, 8, and 11.

Think of the signal within a single channel as being like a wide-load truck in a lane on the highway. The wide-load truck is using part of each lane on either side of it, thus making passing the truck in those lanes dangerous. Likewise, wireless signals in adjacent channels will interfere with each other.

Wireless networks are assigned an SSID (either BSSID or ESSID) to differentiate one wireless network from another. If multiple base stations or WAPs are involved in the same wireless network, an ESSID is defi ned. The SSID is similar to the name of a workgroup.

If a wireless client knows the SSID, it can confi gure its wireless NIC to communicate with the associated WAP. Knowledge of the SSID doesn’t always grant entry, though, because the WAP can use numerous security features to block unwanted access. SSIDs are defi ned by default by vendors, and because these default SSIDs are well known, standard security practice dictates that the SSID should be changed to something unique before deployment.

The SSID is broadcast by the WAP via a special transmission called a beacon frame.

This allows any wireless NIC within range to see the wireless network and make connecting as simple as possible. However, this default broadcasting of the SSID should be disabled to keep the wireless network secret. Even so, attackers can still discover the SSID with a wireless sniffer, because the SSID must be used in transmissions between wireless clients and the WAP. Thus, disabling SSID broadcasting isn’t a true security mechanism. Instead, use WPA2 as a reliable authentication and encryption solution rather than trying to hide the existence of the wireless network.

One method used to discover areas of a physical environment where unwanted wireless access might be possible is to perform a site survey. A site survey is the process of c01.indd 21/04/2014 Page 58

1.5 Given a scenario, troubleshoot security issues

59

investigating the presence, strength, and reach of WAPs deployed in an environment. This task usually involves walking around with a portable wireless device, taking note of the wireless signal strength, and mapping this on a plot or schematic of the building. Site surveys should be conducted to ensure that suffi cient signal strength is available at all locations that are likely sites for wireless device usage, while at the same time minimizing or eliminating the wireless signal from locations where wireless access shouldn’t be permitted

(public areas, across fl oors, into other rooms, or outside the building). A site survey is useful for evaluating existing wireless network deployments, planning expansion of current deployments, and planning for future deployments.

Data emanation is the transmission of data across electromagnetic signals. Almost all activities within a computer or across a network are performed using some form of data emanation. However, this term is often used to focus on emanations that are unwanted or on data that is at risk due to the emanations.

Emanations occur whenever electrons move. Movement of electrons creates a magnetic fi eld. If you can read that magnetic fi eld, it could be re-created elsewhere in order to reproduce the electron stream. If the original electron stream was used to communicate data, then the re-created electron stream is also a re-creation of the original data. This form of electronic eavesdropping sounds like science fi ction, but it’s science fact. The U.S. government has been researching emanation security since the 1950s under the TEMPEST project.

Protecting against eavesdropping and data theft requires a multipronged effort. First, you must maintain physical access control over all electronic equipment. Second, where unauthorized personnel can still achieve physical access or proximity, use shielded devices and media. Third, always transmit any sensitive data using secure encryption protocols.

The IEEE 802.11 standard defi nes two methods that wireless clients can use to authenticate to WAPs before normal network communications can occur across the wireless link.

These two methods are open system authentication (OSA) and shared key authentication

(SKA). OSA means no real authentication is required. As long as a radio signal can be transmitted between the client and WAP, communications are allowed. It’s also the case that wireless networks using OSA typically transmit everything in cleartext, thus providing no secrecy or security. SKA means that some form of authentication must take place before network communications can occur. The 802.11 standard defi nes one optional technique for SKA known as Wired Equivalent Privacy (WEP).

The following sections aren’t necessarily in an obvious order, because they’re pulled exactly (heading-wise) from the offi cial CompTIA Security+ SY0-401 list.

WPA

An early alternative to WEP (discussed shortly) was WiFi Protected Access (WPA). This technique was an improvement but was itself not fully secure. It’s based on the Lightweight

Extensible Authentication Protocol (LEAP) and Temporal Key Integrity Protocol (TKIP) cryptosystems and employs a secret passphrase. Unfortunately, the use of a single static c01.indd 21/04/2014 Page 59

60

Chapter 1

Network Security passphrase is the downfall of WPA. An attacker can simply run a brute-force guessing attack against a WPA network to discover the passphrase. If the passphrase is 14 characters or more, this is usually a time-prohibitive proposition, but not an impossible one. Additionally, both the LEAP and TKIP encryption options for WPA are now crackable using a variety of cracking techniques. Although doing so is more complex than compromising WEP, WPA no longer provides long-term reliable security.

WPA2

Eventually, two new methods of securing wireless were developed that are still considered secure. First is the amendment known as 802.11i or WPA2. It’s a new encryption scheme known as the Counter Mode with Cipher Block Chaining Message Authentication Code

Protocol (CCMP), which is based on the Advanced Encryption Standard (AES) encryption scheme. To date, no real-world attack has compromised the encryption of a properly confi gured WPA2 wireless network.

The second method is the use of 802.1X, a standard port-based network access control that ensures that clients can’t communicate with a resource until proper authentication has taken place. Effectively, 802.1X is a hand-off system that allows the wireless network to use the existing network infrastructure’s authentication services. Through the use of

802.1X, other techniques and solutions such as RADIUS, TACACS, certifi cates, smart cards, token devices, and biometrics can be integrated into wireless networks.

WEP

Wired Equivalent Privacy (WEP) is defi ned by the IEEE 802.11 standard. WEP uses a predefi ned shared secret key; however, the shared key is static and shared among all WAPs and device interfaces.

WEP was cracked almost as soon as it was released. Today, it’s possible to crack WEP in less than a minute, thus rendering it a worthless security precaution. Fortunately, there are alternatives to WEP: WPA and WPA2.

WEP is based on RC4, but due to fl aws in design and implementation, WEP is weak in several areas, two of which are the use of a static common key and poor implementation of initiation vectors (IVs). When the WEP key is discovered, the attacker can join the network and then listen in on all other wireless client communications.

EAP

Extensible Authentication Protocol (EAP) isn’t a specifi c mechanism of authentication; rather, it’s an authentication framework. Effectively, EAP allows for new authentication technologies to be compatible with existing wireless or point-to-point connection technologies. More than 40 different EAP methods of authentication are widely supported. These include the wireless methods LEAP, EAP-TLS, EAP-SIM, EAP-AKA, and EAP-TTLS.

c01.indd 21/04/2014 Page 60

1.5 Given a scenario, troubleshoot security issues

61

PEAP

Protected Extensible Authentication Protocol (PEAP) encapsulates EAP methods within a TLS tunnel that provides authentication and potentially encryption. Because EAP was originally designed for use over physically isolated channels and hence assumed secured pathways, EAP usually isn’t encrypted. So, PEAP can provide encryption for EAP methods.

LEAP

Lightweight Extensible Authentication Protocol (LEAP) is a Cisco proprietary alternative to TKIP for WPA. It was developed to address defi ciencies in TKIP before the 802.11i/

WPA2 system was ratifi ed as a standard. An attack tool known as Asleap was released in

2004 that could exploit the ultimately weak protection provided by LEAP. LEAP should be avoided when possible; use of EAP-TLS as an alternative is recommended, but if LEAP is used, a complex password is strongly recommended.

MAC filter

A MAC fi lter is a list of authorized wireless client interface MAC addresses that is used by a WAP to block access to all unauthorized devices. Although it’s a useful feature to implement, it can only be used in environments with a small (fewer than 20 wireless devices), static set of wireless clients. Additionally, a hacker with basic wireless hacking tools can discover the MAC address of a valid client and then spoof that address onto their attack wireless client.

Disable SSID broadcast

Wireless networks traditionally announce their SSIDs on a regular basis in a special packet known as the beacon frame. When the SSID is broadcast, any device with an automatic detect and connect feature is able to see the network and can initiate a connection with it.

Network administrators may choose to disable SSID broadcast to hide their network from unauthorized personnel. However, the SSID is still needed to direct packets to and from the base station, so it’s a discoverable value using a wireless packet sniffer. Thus, the SSID should be disabled if the network isn’t for public use. But realize that hiding the SSID isn’t true security, because any hacker with basic wireless knowledge can easily discover it.

TKIP

Temporal Key Integrity Protocol (TKIP) was designed as the replacement for WEP without requiring replacement of legacy wireless hardware. TKIP was implemented into 802.11 wireless networking under the name WPA. TKIP improvements include a key-mixing c01.indd 21/04/2014 Page 61

62

Chapter 1

Network Security function that combines the initialization vector (IV—a random number) with the secret root key before using that key with RC4 to perform encryption; a sequence counter is used to prevent packet-replay attacks; and a strong integrity check named Michael is used.

TKIP and WPA were offi cially replaced by WPA2 in 2004. Additionally, attacks specifi c to WPA and TKIP (coWPAtty and a GPU-based cracking tool) have rendered WPA’s security unreliable.

CCMP

Counter Mode with Cipher Block Chaining Message Authentication Code Protocol

(CCMP) was created to replace WEP and TKIP/WPA. CCMP uses AES with a 128-bit key.

It’s the preferred standard security protocol of 802.11 wireless networking indicated by

802.11i. To date, no attacks have been successful against AES/CCMP encryption.

Antenna placement

Antenna placement should be a concern when you’re deploying a wireless network. Don’t fi xate on a specifi c location before a proper site survey has been performed. Place the WAP and/or its antenna in a likely position, and then test various locations for signal strength and connection quality. Only after you confi rm that a potential antenna placement provides satisfactory connectivity should it be made permanent.

Consider the following guidelines when seeking optimal antenna placement:

Use a central location.

Avoid solid physical obstructions.

Avoid reflective or other flat metal surfaces.

Avoid electrical equipment.

If a base station has an external omnidirectional antenna, typically it should be positioned pointing straight up vertically. If a directional antenna is used, point the focus toward the area of desired use. Keep in mind that wireless signals are affected by interference, distance, and obstructions.

Power level controls

Some WAPs provide a physical or logical adjustment of the antenna power levels. Powerlevel controls are typically set by the manufacturer to a setting that is suitable for most situations. However, if after performing site surveys and adjusting antenna placement, wireless signals are still not satisfactory, you may need to adjust the power levels. Keep in mind that changing channels, avoiding refl ective and signal-scattering surfaces, and reducing interference can often be more signifi cant in terms of improving connectivity reliability.

When adjusting power levels, make minor adjustments instead of attempting to maximize or minimize the setting. Also, take note of the initial/default setting so you can return c01.indd 21/04/2014 Page 62

1.5 Given a scenario, troubleshoot security issues

63

to that setting if desired. After each power-level adjustment, reset/reboot the WAP before re-performing the site survey and quality tests. Sometimes, lowering the power level can improve performance.

Captive portals

A captive portal is an authentication technique that redirects a newly connected wireless web client to a portal access-control page. The portal page may require the user to input payment information, provide logon credentials, or input an access code. A captive portal is also used to display an accessible use policy, a privacy policy, and a tracking policy to the user, who must consent to the policies before being able to communicate across the network.

Captive portals are most often located on wireless networks implemented for public use, such as at hotels, restaurants, bars, airports, libraries, and so on. However, they can also be used on cabled Ethernet connections.

Antenna types

A wide variety of antenna types can be used for wireless clients and base stations. Many devices’ standard antennas can be replaced with stronger (signal-boosting) antennas.

The standard straight or pole antenna is an omnidirectional antenna that can send and receive signals in all directions perpendicular to the line of the antenna itself. This is the type of antenna found on most base stations and some client devices. It’s sometimes also called a base antenna or a rubber duck antenna (due to the fact that most such antennas are covered in a fl exible rubber coating).

Most other types of antennas are directional: they focus their sending and receiving capabilities in one primary direction. Some examples of directional antennas include Yagi, cantenna, panel, and parabolic. A Yagi antenna is similar in structure to a traditional roof

TV antenna; it’s crafted from a straight bar with cross sections to catch specifi c radio frequencies in the direction of the main bar. Cantennas are constructed from tubes with one sealed end. They focus along the direction of the open end of the tube. Some of the fi rst cantennas were crafted from Pringles cans. Panel antennas are fl at devices that focus from only one side of the panel. Parabolic antennas are used to focus signals from very long distances or weak sources.

Site surveys

A site survey is a formal assessment of wireless signal strength, quality, and interference using an RF signal detector. You perform a site survey by placing a wireless base station in a desired location and then collecting signal measurements from the area. The signal measurements are overlaid onto a blueprint of the building to determine whether suffi cient signal is present where needed while minimizing signals outside of the desired location. If the base station is adjusted, then the site survey should be repeated. The goal of a site survey is c01.indd 21/04/2014 Page 63

64

Chapter 1

Network Security to maximize performance in the desired areas (such as within a home or offi ce) while minimizing ease of access in external areas.

VPN (over open wireless)

VPNs are used to provide confi dentiality for network communications between individual systems, multiple networks, or a remote user and a network. VPNs can be created over both wired and wireless connections and over both private and public networks (such as the Internet). Due to the security risks of wireless networks (see the section “Given a scenario, troubleshoot security issues related to wireless networking”), it’s often recommended that you use a VPN to reduce those risks. For more information on VPNs, please see the section “VPN concentrators.”

Exam Essentials

Understand 802.11 and 802.11a, b, g, and n 802.11 is the IEEE standard for wireless network communications. Versions include 802.11a (2 Mbps), 802.11b (11 Mbps), and

802.11g (54 Mbps). The 802.11 standard also defi nes Wired Equivalent Privacy (WEP).

Understand WPA An early alternative to WEP was WiFi Protected Access (WPA). This technique was an improvement but was itself not fully secure. It’s based on the LEAP and

TKIP cryptosystems and employs a secret passphrase.

Understand WPA2 WPA2 is a new encryption scheme known as the Counter Mode with

Cipher Block Chaining Message Authentication Code Protocol (CCMP), which is based on the AES encryption scheme.

Understand WEP Wired Equivalent Privacy (WEP) is defi ned by the IEEE 802.11 standard. It was designed to provide the same level of security and encryption on wireless networks as is found on wired or cabled networks. WEP provides protection from packet sniffi ng and eavesdropping against wireless transmissions. A secondary benefi t of WEP is that it can be confi gured to prevent unauthorized access to the wireless network. WEP uses a predefi ned shared secret key.

Understand EAP Extensible Authentication Protocol (EAP) isn’t a specifi c mechanism of authentication; rather, it’s an authentication framework. Effectively, EAP allows for new authentication technologies to be compatible with existing wireless or point-to-point connection technologies.

Understand PEAP Protected Extensible Authentication Protocol (PEAP) encapsulates EAP methods within a TLS tunnel that provides authentication and potentially encryption.

Understand LEAP Lightweight Extensible Authentication Protocol (LEAP) is a Cisco proprietary alternative to TKIP for WPA. It was developed to address defi ciencies in TKIP before the 802.11i/WPA2 system was ratifi ed as a standard.

c01.indd 21/04/2014 Page 64

1.5 Given a scenario, troubleshoot security issues

65

Understand MAC filters A MAC fi lter is a list of authorized wireless client interface MAC addresses that is used by a WAP to block access to all unauthorized devices.

Understand SSID broadcast Wireless networks traditionally announce their SSIDs on a regular basis in a special packet known as the beacon frame. When the SSID is broadcast, any device with an automatic detect and connect feature can see the network and initiate a connection with the network.

Understand TKIP Temporal Key Integrity Protocol (TKIP) was designed as a replacement for WEP without requiring replacement of legacy wireless hardware. TKIP was implemented into 802.11 wireless networking under the name WiFi Protected Access (WPA).

Understand CCMP Counter Mode with Cipher Block Chaining Message Authentication

Code Protocol (CCMP) was created to replace WEP and TKIP/WPA. It uses AES with a

128-bit key.

Understand captive portals A captive portal is an authentication technique that redirects a newly connected wireless web client to a portal access-control page.

Understand antenna types A wide variety of antenna types can be used for wireless clients and base stations. These include omnidirectional pole antennas as well as many directional antennas such as Yagi, cantenna, panel, and parabolic.

Understand site surveys A site survey is the process of investigating the presence, strength, and reach of WAPs deployed in an environment. This task usually involves walking around with a portable wireless device, taking note of the wireless signal strength, and mapping it on a plot or schematic of the building.

c01.indd 21/04/2014 Page 65

66

Chapter 1

Network Security

Review Questions

You can fi nd the answers in Appendix A.

1. Firewalls provide security through what mechanism?

A. Watching for intrusions

B. Controlling traffic entering and leaving a network

C. Requiring strong passwords

D. Preventing misuse of company resources

2. A network-based IDS is not suitable for detecting or protecting against which of the following?

C. Attacks against the network

D. Attacks against an environment that produces significant traffic

3. Which of the following allows the deployment of a publicly accessible web server without compromising the security of the private network?

A. Intranet

B. DMZ

C. Extranet

D. Switch

4. A switch can be used to prevent broadcast storms between connected systems through the use of what?

A. SSL

B. S/MIME

C. VLANs

D. LDAP

5. Illegal or unauthorized zone transfers are a significant and direct threat to what type of network server?

A. Web

B. DHCP

C. DNS

D. Database c01.indd 21/04/2014 Page 66

Review Questions

67

6. What form of storage or file-transfer technology was originally designed to be operated over an optical network but was adapted to run over a copper network as well?

A. FTP

B. iSCSI

C. SATA

7. What mechanism of loop protection is based on an element in a protocol header?

A. Spanning Tree Protocol

B. Ports

C. Time to live

D. Distance vector protocols

8. A goal of NAC is which of the following?

A. Reduce social engineering threats

B. Map internal private addresses to external public addresses

C. Distribute IP address configurations

D. Reduce zero-day attacks

9. What type of wireless antenna can be used to send or receive signals in any direction?

A. Cantenna

B. Yagi

D. Panel

10. What mechanism of wireless security is based on AES?

A. TKIP

B. CCMP

C. LEAP

D. WEP c01.indd 21/04/2014 Page 67

Chapter

2

Compliance and

Operational Security

COMPTIA SECURITY+ EXAM OBJECTIVES

COVERED IN THIS CHAPTER INCLUDE

THE FOLLOWING:

2.1 Explain the importance of risk-related concepts.

Control types

Technical

Management

Operational

False positives

False negatives

Importance of policies in reducing risk

Privacy policy

Acceptable use

Security policy

Mandatory vacations

Job rotation

Separation of duties

Least privilege

Risk calculation

Likelihood

ALE

Impact

SLE

ARO c02.indd 21/04/2014 Page 69

MTTR

MTTF

MTBF

Quantitative vs. qualitative

Vulnerabilities

Threat vectors

Probability/threat likelihood

Risk-avoidance, transference, acceptance, mitigation,

deterrence

Risks associated with Cloud Computing and

Virtualization

Recovery time objective and recovery point objective

2.2 Summarize the security implications of integrating

systems and data with third parties.

On-boarding/off-boarding business partners

Social media networks and/or applications

Interoperability agreements

SLA

BPA

MOU

ISA

Privacy considerations

Risk awareness

Unauthorized data sharing

Data ownership

Data backups

Follow security policy and procedures

Review agreement requirements to verify compliance and performance standards c02.indd 21/04/2014 Page 70

2.3 Given a scenario, implement appropriate risk

mitigation strategies.

Change management

Incident management

User rights and permissions reviews

Perform routine audits

Enforce policies and procedures to prevent data loss or theft

Enforce technology controls

Data Loss Prevention (DLP)

2.4 Given a scenario, implement basic forensic

procedures.

Order of volatility

Capture system image

Network traffic and logs

Capture video

Record time offset

Take hashes

Screenshots

Witnesses

Track man hours and expense

Chain of custody

Big data analysis

2.5 Summarize common incident response procedures.

Preparation

Incident identification

Escalation and notification

Mitigation steps

Lessons learned

Reporting c02.indd 21/04/2014 Page 71

Recovery/reconstitution procedures

First responder

Incident isolation

Quarantine

Device removal

Data breach

Damage and loss control

2.6 Explain the importance of security-related

awareness and training.

Security policy training and procedures

Role-based training

Personally identifiable information

Information classification

High

Medium

Low

Confidential

Private

Public

Data labeling, handling, and disposal

Compliance with laws, best practices, and standards

User habits

Password behaviors

Data handling

Clean desk policies

Prevent tailgating

Personally owned devices

New threats and new security trends/alerts

New viruses

Phishing attacks c02.indd 21/04/2014 Page 72

Zero-day exploits

Use of social networking and P2P

Follow up and gather training metrics to validate compliance and security posture

2.7 Compare and contrast physical security and

environmental controls.

Environmental controls

HVAC

Fire suppression

EMI shielding

Hot and cold aisles

Environmental monitoring

Temperature and humidity controls

Physical security

Hardware locks

Mantraps

Video Surveillance

Fencing

Proximity readers

Access list

Proper lighting

Signs

Guards

Barricades

Biometrics

Protected distribution (cabling)

Alarms

Motion detection

Control types

Deterrent

Preventive c02.indd 21/04/2014 Page 73

Detective

Compensating

Technical

Administrative

2.8 Summarize risk-management best practices.

Business continuity concepts

Business impact analysis

Identification of critical systems and components

Removing single points of failure

Business continuity planning and testing

Risk assessment

Continuity of operations

Disaster recovery

IT contingency planning

Succession planning

High availability

Redundancy

Tabletop exercises

Fault tolerance

Hardware

RAID

Clustering

Load balancing

Servers

Disaster recovery concepts

Backup plans/policies

Backup execution/frequency

Cold site

Hot site

Warm site c02.indd 21/04/2014 Page 74

2.9 Given a scenario, select the appropriate

control to meet the goals of security.

Confidentiality

Encryption

Access controls

Steganography

Integrity

Hashing

Digital signatures

Certificates

Non-repudiation

Availability

Redundancy

Fault tolerance

Patching

Safety

Fencing

Lighting

Locks

CCTV

Escape plans

Drills

Escape routes

Testing controls c02.indd 21/04/2014 Page 75

The Security+ exam will test your basic IT security skills— those skills you need to effectively secure stand-alone and

networked systems in a corporate environment. To pass the test and be effective in implementing security, you need to understand the basic concepts and terminology related to compliance and operational security as detailed in this chapter.

2.1 Explain the importance of risk-related concepts

Security is aimed at preventing loss or disclosure of data while sustaining authorized access. The possibility that something could happen to damage, destroy, or disclose data or other resources is known as risk.

Managing risk is therefore an element of sustaining a secure environment. Risk management is a detailed process of identifying factors that could damage or disclose data, evaluating those factors in light of data value and countermeasure cost, and implementing cost-effective solutions for mitigating or reducing risk. The overall process of risk management is used to develop and implement information security strategies. The goal of these strategies is to reduce risk and to support the mission of the organization.

Thus, the primary goal of risk management is to reduce risk to an acceptable level. What that level actually is depends on the organization, the value of its assets, the size of its budget, and many other factors. What is deemed acceptable risk to one organization may be a completely unreasonably high level of risk to another. It is impossible to design and deploy a totally risk-free environment; however, signifi cant risk reduction is possible, often with little effort.

Risks to an IT infrastructure are not all computer based. In fact, many risks come from nontechnical sources. It is important to consider all possible risks when performing risk evaluation for an organization. When it fails to properly evaluate and respond to all forms of risk, a company remains vulnerable. Keep in mind that IT security, commonly referred to as logical or technical security, can provide protection only against logical or technical attacks. To protect IT against physical attacks, physical protections must be erected.

The process by which the goals of risk management are achieved is known as risk

analysis. It includes analyzing an environment for risks, evaluating each risk as to its c02.indd 21/04/2014 Page 76

2.1 Explain the importance of risk-related concepts

77

likelihood of occurring and the cost of the damage it would cause if it did occur, assessing the cost of various countermeasures for each risk, and creating a cost/benefi t report for safeguards to present to upper management. In addition to these risk-focused activities, risk management also requires evaluation, assessment, and the assignment of value for all assets within the organization. Without proper asset valuations, it is not possible to prioritize and compare risks with possible losses.

Control types

A control is anything used to implement security. It can be an additional new product, a modifi cation of an existing product, a redesign of the infrastructure, or the removal of something from the environment. Controls are necessary to protect the confi dentiality,

integrity, and availability of objects (and by extension, their information and data).

Confi dentiality addresses access control in the sense that it ensures that only authorized subjects can access objects. Integrity addresses the preservation of information in that unauthorized or unwanted changes to objects are denied (and checked). Availability addresses the ability to obtain access within a reasonable amount of time on request, in the sense that authorized requests for objects must be granted as quickly as system and network parameters allow.

Technical

Technical or logical controls are the IT hardware or software mechanisms used to manage access to resources and systems and also to provide protection for those resources and systems. Examples of logical or technical controls include encryption, smart cards, passwords, biometrics, constrained interfaces, access control lists (ACLs), protocols, fi rewalls, routers, intrusion-detection systems, and clipping levels.

Management

Management or administrative controls are the policies and procedures defi ned by an organization’s security policy to implement and enforce overall access control. Administrative access controls focus on two areas: personnel and business practices (for example, people and policies). Examples of administrative controls include policies, procedures, hiring practices, background checks, data classifi cation, security training, vacation history, reviews, work supervision, personnel controls, and testing.

Operational

Operational controls are the mechanisms and procedures used to ensure or maintain security on a day-to-day basis. Operational controls support security while enabling work tasks to be accomplished. Examples of operational security include password policies, default deny, traffi c and content fi lters, event auditing, confi guration management, incident response, and communications security.

c02.indd 21/04/2014 Page 77

78

Chapter 2

Compliance and Operational Security

False positives

A false positive occurs when an alarm or alert is triggered by benign or normal events. The problem with false positives is they cause security administrators to waste time investigating non-malicious events. Over time, and after repeated false positives, security admins may stop responding to alarms and assume all alerts are false.

False negatives

An even more important issue to address is the false negative. Whereas a false positive is an alarm without a malicious event, a false negative is a malicious event without an alarm.

When false negatives occur, it is assumed that only benign events are occurring; however, malicious activities are actually taking place. This is the equivalent of a building burning without fi re alarms.

A false negative occurs when an alarm or alert is not triggered by malicious or abnormal events. False negatives occur when poor detection technologies are used, when detection databases are not kept current, as well as when an organization is facing a new, unknown zero-day threat. When malicious activities are occurring and are not detected, the victim is unaware of the situation. They are actively being harmed while not being aware that the harm is occurring. Thus, they do not know that they need to make any response or adjustment. This is the realm of the unknown unknown.

In order to reduce the risk of false negatives, organizations should adopt a denyby-default or implicit-deny security stance. This stance centers on the idea that nothing is allowed to occur, such as execution, unless it is specifi cally allowed (placed on a whitelist or an exception list). It is also good practice to keep detection technologies, such as fi rewalls, intrusion detection systems (IDSs), and intrusion prevention systems (IPSs) current in terms of their core engines as well as their rule lists and detection databases.

Importance of policies in reducing risk

Reducing risk is an important goal of security management. Once risk is identifi ed and understood, security policies should be implemented to reduce, mitigate, or eliminate risk.

Privacy policy

A privacy policy specifi es the protections of privacy, or the lack thereof, within an organization. However, privacy can be a diffi cult entity to defi ne. The term is used frequently in numerous contexts without much quantifi cation or qualifi cation. Here are some possible partial defi nitions of privacy:

Active prevention of unauthorized access to information that is personally identifiable

(that is, data points that can be linked directly to a person or an organization)

Freedom from unauthorized access to information deemed personal or confidential

Freedom from being observed, monitored, or examined without consent or knowledge c02.indd 21/04/2014 Page 78

2.1 Explain the importance of risk-related concepts

79

When addressing privacy in the realm of IT, it usually becomes a balancing act between individual rights and the rights or activities of an organization. Some claim that individuals have the right to control whether information can be collected about them and what can be done with it. This often brings up the issue of personally identifi able information (PII). PII is any data item that can be easily and/or obviously traced back to the person of origin or concern.

Others claim that any activity performed in public view, such as most activities performed over the Internet or activities performed on company equipment, can be monitored without knowledge of or permission from the individuals being watched and that the information gathered from such monitoring can be used for whatever purposes an organization deems appropriate or desirable.

On one hand, protecting individuals from unwanted observation, direct marketing, and disclosure of private, personal, or confi dential details is considered a worthy effort. On the other, organizations profess that demographic studies, information gleaning, and focused marketing improve business models, reduce advertising waste, and save money for all parties.

Whatever your personal or organizational stance is on the issue of online privacy, it should be addressed in an organizational policy. Privacy is an issue not just for external visitors to your online offerings but also for your customers, employees, suppliers, and contractors. If you gather any type of information about any person or company, you must address privacy.

In most cases, especially when privacy is being violated or restricted, the individuals and companies must be informed; otherwise, you may face legal ramifi cations. Privacy issues must also be addressed when allowing or restricting personal use of email, retaining email, recording phone conversations, gathering information about surfi ng or spending habits, and so on.

Acceptable use

An acceptable use policy defi nes what is and what is not an acceptable activity, practice, or use for company equipment and resources. The acceptable use policy is specifi cally designed to assign security roles within the organization as well as ensure the responsibilities tied to those roles. This policy defi nes a level of acceptable performance and expectation of behavior and activity. Failure to comply with the policy may result in job action warnings, penalties, or termination.

Not having an acceptable use policy leads many users to the false assumption that any activity is permitted and that they enjoy privacy even on company equipment. However, there is often little to no privacy on company equipment. Although this varies by country, companies often have the right to audit, monitor, and record all activities that occur using their equipment and access services. An acceptable use policy (in addition to the privacy policy) outlines these monitoring tactics, dictates what users can and can’t do, and clearly states that users don’t have privacy. Often, employees must read and sign an acceptable use policy as part of the hiring and training process.

c02.indd 21/04/2014 Page 79

80

Chapter 2

Compliance and Operational Security

Security policy

The top tier of formalizing an organization’s essential protection-plan documentation is known as a security policy. A security policy:

Is a document that defines the scope of security needed by the organization and

discusses the assets that need protection and the extent to which security solutions should go in order to provide the necessary protection

Is the foundational element of any successful security endeavor

Is an overview or generalization of an organization’s security needs

Defines the main security objectives and outlines the security framework of an

organization

Identifies the major functional areas of data processing and clarifies and defines all

relevant terminology

Should clearly define why security is important and what assets are valuable

Is a strategic plan for implementing security

Should broadly outline the security goals and practices that should be employed to

protect the organization’s vital interests

Discusses the importance of security to every aspect of daily business operations and the importance of the support of senior staff for the implementation of security

Is used to assign responsibilities, define roles, specify audit requirements, outline enforcement processes, indicate compliance requirements, and define acceptable risk levels

Is often used as proof that senior management has exercised due care in protecting itself against intrusion, attack, and disaster

Is compulsory

Many organizations employ several types of security policies to defi ne or outline their overall security strategy. An organizational security policy focuses on issues relevant to every aspect of an organization. An issue-specifi c security policy focuses on a specifi c network service, department, function, or other aspect that is distinct from the organization as a whole. A system-specifi c security policy focuses on individual systems or types of systems and prescribes approved hardware and software, outlines methods for locking down a system, and even mandates fi rewalls or other specifi c security controls.

In addition to these focused types of security policies, there are three overall categories of security policies: regulatory, advisory, and informative. A regulatory policy is required whenever industry or legal standards are applicable to your organization. This policy discusses the regulations that must be followed and outlines the procedures that should be used to elicit compliance. An advisory policy discusses behaviors and activities that are acceptable and defi nes consequences of violations. It explains senior management’s desire for security and compliance within an organization. Most policies are advisory. An c02.indd 21/04/2014 Page 80

2.1 Explain the importance of risk-related concepts

81

informative policy is designed to provide information or knowledge about a specifi c subject, such as company goals, mission statements, or how the organization interacts with partners and customers. An informative policy provides support, research, or background information relevant to the specifi c elements of the overall policy.

From the security policies fl ow many other documents or subelements necessary for a complete security solution. Policies are broad overviews, whereas standards, baselines, guidelines, and procedures include more specifi c, detailed information on the actual security solution.

As a standard rule of thumb for security, you should document everything.

Documentation is often seen as a keystone of security. Hence, you need to fully write out all security elements into security policies, standards, baselines, guidelines, and procedures.

Through exhaustive documentation, there will always be a detailed record of confi gurations, actions, procedures, and so on, which will assist you in the event of an incident, a disaster, or an implementation change.

With complete, detailed, exhaustive documentation, every aspect of your environment and every event in your secured environment are known. Documentation can be reviewed and referenced as new incidents or conditions arise. With proper documentation, the security of an organization is easier to maintain.

Mandatory vacations

Mandatory vacations is a form of user peer auditing. The process works by requiring each employee to be on vacation for a minimal amount of time each year (typically one to two weeks). While the employee is away, another worker sits at their desk and performs their work tasks. This process is used to detect fraud, abuse, or incompetence. The technique is often employed in fi nancial environments or where high-value assets are managed.

Job rotation

Job rotation (aka cross-training or rotation of duties) is a counterbalance to the application of separation of duties (see the next section). If all high-level tasks are performed by individual administrators, what happens if one person leaves the organization? If no one else has the knowledge to perform the tasks, the organization suffers. Job rotation is the periodic shifting of assigned work tasks or job descriptions among a small collection of workers.

When job rotation is implemented, multiple people have the knowledge to perform each task. Those people do not always have the permissions to perform those tasks, but they can be called on if needed to perform them once the privileges are granted. This reduces the risk of a person leaving the organization who happens to be the only individual with the proprietary knowledge or know-how of a mission-critical function. The implementation of job rotation reduces the administrative impact to the organization by employing multiple administrators who are cross-trained in their respective job roles. This helps guarantee continued administrative support for a specifi c role or job function in the event of a loss in administrative personnel.

c02.indd 21/04/2014 Page 81

82

Chapter 2

Compliance and Operational Security

Separation of duties

Separation of duties is the division of administrator or privileged tasks into distinct groupings; in turn, each grouping is individually assigned to unique administrators. The application of separation of duties results in no one user having complete access or power over an entire network, server, or system. Each administrator has their own uniquely defi ned area of responsibility and privileges only within that specifi cally assigned area. If an administrator goes rogue or their account is compromised, the entire network is not automatically compromised.

Separation of duties applies the principle of least privilege (see next section) to administrative users. However, it also requires that several administrators work together to perform high-risk, sweeping tasks in an organization. This helps prevent fraud, reduce errors, and prevent confl icts of interest. For example, those who confi gure security should not be the same people who test security; those who are in accounts receivable should not be performing accounts payable; and those who are programmers should not be the same people who test code and approve applications for deployment.

Least privilege

Least privilege (aka the principle of least privilege) is the security stance that users are granted only the minimum necessary access, permissions, and privileges that are required for them to accomplish their work tasks. This ensures that users are unable to perform any task beyond the scope of their assigned responsibilities.

The assignment of privileges, permissions, rights, access, and so on should be periodically reviewed to check for privilege creep or misalignment with job responsibilities.

Privilege creep occurs when a worker accumulates privileges over time as their job responsibilities change. The end result is the worker has more privileges than the principle of least privilege would dictate based on their current job responsibilities.

Risk calculation

Risk identifi cation and risk calculation are essential parts of an organization’s security endeavor. Without performing a risk assessment and analysis, you won’t know what problems your security policy needs to address. Computer systems and networks can never be completely secure. However, that fact shouldn’t prevent you from securing your environment as much as possible. By using asset identifi cation, risk assessment, threat identifi cation, and vulnerability management, you can focus your security endeavors on those areas that pose the greatest threat to your assets.

You don’t know what to protect if you don’t know what you have. A thorough asset inventory must be performed to identify mission-critical systems as well as everyday items

(such as paper clips and sticky notes) that your organization needs to perform its services and produce its products. Once you have a master inventory, you can prioritize your assets.

You can then perform risk assessment for the most important items fi rst; after you provide additional protection for them, you move on to less important items.

c02.indd 21/04/2014 Page 82

2.1 Explain the importance of risk-related concepts

83

The goal of risk assessment, risk management, and risk analysis is to minimize the impact of risks on an organization. This is done through mitigation (applying safeguards or countermeasures), transfer or assignment (outsourcing or obtaining insurance), or accep-

tance (accepting the potential losses). This process identifi es potential threats, evaluates the potential impact of those threats, and weighs the cost in terms of protection mechanisms needed and the potential loss or interruption of business continuity.

Four common formulas are associated with risk assessment and risk analysis:

Exposure Factor (EF) This is the percentage of asset value loss that would occur if a risk was realized (for example, if an attack took place).

Single Loss Expectancy (SLE) This is the potential dollar-value loss from a single riskrealization incident. It’s calculated by multiplying the EF by the asset value.

Annualized Rate of Occurrence (ARO) This number is the statistical probability that a specifi c risk may be realized a certain number of times in a year. It’s obtained from a riskassessment company, from an insurance company, through analyzing internal historical records, or sometimes by guessing.

Annualized Loss Expectancy (ALE) This is the potential dollar value loss per year per risk. It’s calculated by multiplying the SLE by the ARO.

A threat is any person or tool that can take advantage of a vulnerability. Threat identifi cation is a formal process of outlining the potential threats to a system.

A vulnerability is a weakness, an error, or a hole in the security protection of a system, a network, a computer, software, and so on. When a vulnerability exists, threats may exist to exploit it. You can use countermeasures and safeguards to patch vulnerabilities. Once a vulnerability is patched, threats no longer pose a danger to your systems.

Likelihood

Likelihood is the measurement of probability that a threat will become realized within a specifi c period of time. Within the scope of risk assessment, likelihood is measured on a yearly basis. This measurement is called the ARO. See the previous section, “Risk calculation.”

ALE

As explained in the section “Risk calculation,” ALE is the potential dollar value loss per year per risk. It’s calculated by multiplying the SLE by the ARO. Once an ALE is calculated for each asset and related threat to that asset, the ALEs are ordered from biggest to smallest. This establishes a relative measurement of the biggest risk to the organization versus the smallest. From this ordered priority list, security solutions are designed, starting from the top.

Most organizations do not have an unlimited budget, especially in the area of security.

Thus, prioritizing security dollars is important. Security controls should be implemented based on risk. Once an ALE has been calculated for each asset and threat, a priority order of need is established. The combination of asset and threat that produces the largest ALE c02.indd 21/04/2014 Page 83

84

Chapter 2

Compliance and Operational Security is the most important security concern for the organization. A security solution should be selected based on the control with the most favorable cost/benefi t result.

Selecting a countermeasure within the realm of risk management relies heavily on the cost/benefi t analysis results. However, you should consider several other factors:

The cost of the countermeasure should be less than the value of the asset.

The cost of the countermeasure should be less than the benefit of the countermeasure.

The result of the applied countermeasure should make the cost of an attack greater for the perpetrator than the derived benefit from an attack.

The countermeasure should provide a solution to a real and identified problem. (Don’t install countermeasures just because they are available, are advertised, or sound cool.)

The benefit of the countermeasure should not be dependent on its secrecy. This means

“security through obscurity” is not a viable countermeasure and that any viable countermeasure can withstand public disclosure and scrutiny.

The benefit of the countermeasure should be testable and verifiable.

The countermeasure should provide consistent and uniform protection across all users, systems, protocols, and so on.

The countermeasure should have few or no dependencies to reduce cascade failures.

The countermeasure should require minimal human intervention after initial deployment and configuration.

The countermeasure should be tamperproof.

The countermeasure should have overrides accessible to privileged operators only.

The countermeasure should provide fail-safe and/or fail-secure options.

Fortunately, you do not need to select an individual countermeasure for each and every

ALE. As priority ALEs are addressed, those countermeasures will also address numerous lesser ALE concerns. Each time the top ALE asset/threat is resolved, the overall list of remaining issues will shrink.

Impact

Impact is a measurement of the amount of damage or loss that could be or will be caused if a potential threat is ever realized. The impact of a threat is indicated by the EF: the percentage of asset value loss that would occur if a risk was realized (for example, if an attack took place).

SLE

This stands for single loss expectancy. See the earlier section, “Risk calculation.”

ARO

This stands for annualized rate of occurrence. See the earlier section, “Risk calculation.” c02.indd 21/04/2014 Page 84

2.1 Explain the importance of risk-related concepts

85

MTTR

Aging hardware should be scheduled for replacement and/or repair. The schedule for such operations should be based on the mean time to failure (MTTF), mean time between failures (MTBF), and mean time to repair/restore (MTTR) estimates established for each device or on prevailing best organizational practices for managing the hardware life cycle.

MTTF is the expected typical functional lifetime of the device given a specifi c operating environment. MTBF is the expected typical timeframe between failures, such as between the fi rst failure and the second failure. If the MTTF and MTBF are the same values (or nearly so), some manufactures only list the MTBF rating and use it to address both concepts. MTTR is the average length of time required to perform a repair on the device. A device can often undergo numerous repairs before a catastrophic failure is expected. Be sure to schedule all devices to be replaced before their MTTF expires.

When a device is sent out for repairs, you need to have an alternate solution or a backup device to fi ll in for the duration of the repair time. Often, waiting until a minor failure occurs before a repair is performed is satisfactory, but waiting until a complete failure occurs before replacement is a risky security practice.

MTTF

This stands for mean time to failure. See the previous section, “MTTR.”

MTBF

This stands for mean time between failures. See the earlier section, “MTTR.”

Quantitative vs. qualitative

Once you develop a list of threats, you must individually evaluate each threat and its related risk. There are two risk-assessment methodologies: quantitative and qualitative.

Quantitative risk analysis assigns real dollar fi gures to the loss of an asset. Qualitative risk analysis assigns subjective and intangible values to the loss of an asset. Both methods are necessary for a complete risk analysis.

The quantitative method results in concrete probability percentages. That means it creates a report that has dollar fi gures for levels of risk, potential loss, cost of countermeasures, and value of safeguards. This report is usually fairly easy to understand, especially for anyone with knowledge of spreadsheets and budget reports. Think of quantitative analysis as the act of assigning a quantity to risk: in other words, placing a dollar fi gure on each asset and threat. However, a purely quantitative analysis is not possible; not all elements and aspects of the analysis can be quantifi ed, because some are qualitative, subjective, or intangible. The process of quantitative risk analysis starts with asset valuation and threat identifi cation. Next, you estimate the potential and frequency of each risk.

This information is then used to calculate various cost functions that are used to evaluate safeguards.

c02.indd 21/04/2014 Page 85

86

Chapter 2

Compliance and Operational Security

The six major steps or phases in quantitative risk analysis are as follows:

1.

Inventory assets, and assign a value (AV).

2.

Research each asset, and produce a list of all possible threats to each individual asset.

For each listed threat, calculate the EF and SLE.

3.

Perform a threat analysis to calculate the likelihood of each threat being realized within a single year: that is, the ARO.

4.

Derive the overall loss potential per threat by calculating the ALE.

5.

Research countermeasures for each threat, and then calculate the changes to ARO and

ALE based on an applied countermeasure.

6.

Perform a cost/benefit analysis of each countermeasure for each threat for each asset.

Select the most appropriate response to each threat.

Qualitative risk analysis is more scenario-based than it is calculator-based. Rather than assign exact dollar fi gures to possible losses, you rank threats on a scale to evaluate their risks, costs, and effects. The process of performing qualitative risk analysis involves judgment, intuition, and experience. You can use many techniques to perform qualitative risk analysis:

Brainstorming—Collecting spontaneous ideas from a group or individual

Delphi technique—A means by which a group reaches anonymous consensus through the use of blind votes

Storyboarding—Drawing pictures to represent concepts and timelines

Focus groups—Using study, research, or discussion groups centered around a single topic

Surveys—A broad-range data-gathering technique that seeks to pull relevant information from any source

Questionnaires—Asking a series of questions

Checklists—An inventory list that must be assessed against a process, task, or storage

One-on-one meeting—A meeting between peers to discuss a topic

Interview—A face-to-face interaction with subject matter experts or those with direct experience of an event or situation

Determining which mechanism to employ is based on the culture of the organization and the types of risks and assets involved. It is common for several methods to be used simultaneously and for their results to be compared and contrasted in the fi nal risk-analysis report to upper management.

Vulnerabilities

Vulnerabilities are points or aspects of weakness in an asset. A vulnerability allows for harm to occur when a threat is realized. See the earlier section, “Risk calculation.” c02.indd 21/04/2014 Page 86

2.1 Explain the importance of risk-related concepts

87

Threat vectors

A threat vector is the path or means by which an attack can gain access to a target in order to cause harm. This is also known as the attack vector. For more on threats, see the earlier section, “Risk calculation.”

Probability/threat likelihood

Threat probability or threat likelihood is a calculation of the potential for a threat to cause damage to an asset. See the earlier section, “Risk calculation.”

Risk avoidance, transference, acceptance, mitigation, deterrence

The documented results of risk analysis are many:

A complete and detailed valuation of all assets

An exhaustive list of all threats and risks, rates of occurrence, and extent of losses if realized

A list of threat-specific safeguards and countermeasures that identifies their effectiveness and ALE

A cost/benefit analysis of each safeguard

This information is essential for management to make educated, intelligent decisions about safeguard implementation and security policy alterations.

Once the risk analysis is complete, management must address each specifi c risk. There are four possible responses to risk:

Reduce or mitigate

Assign or transfer

Accept

Reject or ignore

Reducing risk, or risk mitigation, is the implementation of safeguards and countermeasures to eliminate vulnerabilities or block threats. Picking the most cost-effective or benefi cial countermeasure is part of risk management, but it is not an element of risk assessment. In fact, countermeasure selection is a post-risk-assessment or post-risk-analysis activity. Another potential variation of risk mitigation is risk avoidance. The risk is avoided by eliminating the risk cause. A simple example is removing FTP from a server to avoid

FTP attacks, and a larger example is to move to an inland location to avoid the risks from hurricanes.

Assigning risk, or transferring risk, is placing the cost of loss that a risk represents onto another entity or organization. Purchasing insurance and outsourcing are common forms of assigning or transferring risk. A variation of assigning risk is risk avoidance. This is the c02.indd 21/04/2014 Page 87

88

Chapter 2

Compliance and Operational Security process of selecting alternate options or activities that have less associated risk than the default, common, expedient, or cheap option. For example, choosing to fl y to a destination instead of drive is a form of risk avoidance. Another example is to locate a business in

Arizona instead of Florida to avoid hurricanes.

Yet another variation on risk assignment or avoidance is risk deterrence. This is the process of implementing deterrents to would-be violators of security and policy. Some examples include implementation of auditing, security cameras, security guards, motion detectors, and strong authentication and making it known that the organization is willing to cooperate with authorities and prosecute those who participate in cybercrime.

Accepting risk is the valuation by management of the cost/benefi t analysis of possible safeguards and the determination that the cost of the countermeasure greatly outweighs the possible cost of loss due to a risk. It also means management has agreed to accept the consequences and the loss if the risk is realized. In most cases, accepting risk requires a clearly written statement that indicates why a safeguard was not implemented, who is responsible for the decision, and who will be responsible for the loss if the risk is realized, usually in the form of a “sign-off” letter. An organization’s decision to accept risk is based on its risk tolerance. Risk tolerance is the ability of an organization to absorb the losses associated with realized risks.

A fi nal but unacceptable possible response to risk is to reject risk or ignore risk. Denying that a risk exists or hoping that it will never be realized is not a valid, prudent, due-care response to risk.

Once countermeasures are implemented, the risk that remains is known as residual risk.

Residual risk comprises any threats to specifi c assets against which upper management chooses not to implement a safeguard. In other words, residual risk is the risk that management has chosen to accept rather than mitigate. In most cases, the presence of residual risk indicates that the cost/benefi t analysis showed that the available safeguards were not costeffective deterrents.

Total risk is the amount of risk an organization would face if no safeguards were implemented. A formula for total risk is threats * vulnerabilities * asset value = total risk. (Note that the * here does not imply multiplication, but a combination function; this is not a true mathematical formula.) The difference between total risk and residual risk is known as the

controls gap: the amount of risk that is reduced by implementing safeguards. A formula for

residual risk is total riskcontrols gap = residual risk.

As with risk management in general, handling risk is not a one-time process. Instead, security must be continually maintained and reaffi rmed. In fact, repeating the risk-assessment and analysis process is a mechanism to assess the completeness and effectiveness of the security program over time. Additionally, it helps locate defi ciencies and areas where change has occurred. Because security changes over time, reassessing on a periodic basis is essential to maintaining reasonable security.

Obviously, there is more to properly managing risk than slapping on a patch. Risk management is a detailed, rigorous process that should be performed periodically to assess the state of an organization’s security.

c02.indd 21/04/2014 Page 88

2.1 Explain the importance of risk-related concepts

89

Risks associated with Cloud Computing and Virtualization

Cloud computing and virtualization, especially when you are virtualizing in the cloud, have serious risks associated with them. Once sensitive, confi dential, or proprietary data leaves the confi nes of the organization, it also leaves the protections imposed by the organizational security policy and resultant infrastructure. Cloud services and their personnel might not adhere to the same security standards as your organization. It is important to investigate the security of a cloud service before adopting it.

With the increased burden of industry regulations, such as the Sarbanes-Oxley Act of

2002 (SOX), Health Insurance Portability and Accountability Act (HIPAA), and Payment

Card Industry Data Security Standards (PCI DSS), it is essential to ensure that a cloud service provides suffi cient protections to maintain compliance. Additionally, cloud service providers may not maintain your data in close proximity to your primary physical location.

In fact, they may distribute your data across numerous locations, some of which may reside outside your country of origin. It may be necessary to add to a cloud service contract a limitation to house your data only within specifi c logical and geographic boundaries.

It is important to investigate the encryption solutions employed by a cloud service. Do you send your data to them pre-encrypted, or is it encrypted only after reaching the cloud?

Where are the encryption keys stored? Is there segregation between your data and that belonging to other cloud users? An encryption mistake can reveal your secrets to the world or render your information unrecoverable.

What is the method and speed of recovery or restoration from the cloud? If you have system failures locally, how do you get your environment back to normal? Also consider whether the cloud service has its own disaster-recovery solution. If it experiences a disaster, what is its plan to recover and restore services and access to your cloud resources?

Other issues include the diffi culty with which investigations can be conducted, concerns over data destruction, and what happens if the current cloud-computing service goes out of business or is acquired by another organization.

Recovery time objective and recovery point objective

The maximum tolerable downtime (MTD) is the maximum length of time a business function can be inoperable without causing irreparable harm to the business. The MTD provides valuable information when you’re performing both business continuity planning

(BCP) and disaster-recovery planning (DRP). Once you have defi ned your recovery objectives, you can design and plan the procedures necessary to accomplish the recovery tasks.

This leads to another metric, the recovery time objective (RTO), for each business function. This is the amount of time in which you think you can feasibly recover the function in the event of a disruption. The goal of the BCP process is to ensure that your RTOs are less than your MTDs, resulting in a situation in which a function should never be unavailable beyond the maximum tolerable downtime.

c02.indd 21/04/2014 Page 89

90

Chapter 2

Compliance and Operational Security

A metric related to RTO is the recovery point objective (RPO). The RPO is a measurement of how much loss can be accepted by the organization when a disaster occurs. This acceptable loss is measured in time. The RPO measurement is independent from RTO. For example, if an organization can survive only two hours of lost data, then the RPO is two hours. The RPO is a measurement of how much data can be lost prior to the point in time of a disaster, whereas the RTO is how much time after the disaster the company has to recover operations. Generally, backup systems are designed to prevent data loss over the

RPO limit, and recovery solutions are designed to return things to normal before the RTO is exceeded.

Exam Essentials

Understand risk management. Risk management is a detailed process of identifying factors that could damage or disclose data, evaluating those factors in light of data value and countermeasure cost, and implementing cost-effective solutions for mitigating or reducing risk.

Understand what a false positive is. A false positive occurs when an alarm or alert is triggered by benign or normal events.

Understand what a false negative is. A false negative occurs when an alarm or alert is not triggered by malicious or abnormal events.

Understand the goal of a privacy policy. A privacy policy has a goal of protecting the confi dentiality of personally identifi able information (PII).

Understand what an acceptable use policy is. An acceptable use policy defi nes what is and what is not an acceptable activity, practice, or use for company equipment and resources.

Understand what a security policy is. A security policy is the overall purpose and direction of security in an environment, as well as the detailed procedural documents that indicate how various activities are to be performed in compliance with security.

Know why job rotation and mandatory vacations are necessary. Job rotation serves two functions: it provides a type of knowledge redundancy, and moving personnel around reduces the risk of fraud, data modifi cation, theft, sabotage, and misuse of information.

Mandatory vacations of one to two weeks are used to audit and verify the work tasks and privileges of employees. This often results in detection of abuse, fraud, or negligence.

Understand the importance of separation of duties. Separation of duties is the division of administrator or privileged tasks into distinct groupings, with each group in turn assigned to unique administrators. The application of separation of duties results in no single user having complete access to or power over an entire network, server, or system.

Know the principle of least privilege. The principle of least privilege is a security rule of thumb that states that users should be granted only the level of access needed for them to accomplish assigned work tasks, and no more. Furthermore, those privileges should be assigned for the shortest time period possible.

c02.indd 21/04/2014 Page 90

2.1 Explain the importance of risk-related concepts

91

Understand risk assessment. The goal of risk assessment is to minimize the impact of risks on an organization. This is done through mitigation, assignment, or acceptance. This process identifi es potential threats, evaluates the potential impact of those threats, and weighs the cost in terms of protection mechanisms needed and the potential loss or interruption of business continuity.

Understand asset identification. A thorough asset inventory must be performed to identify mission-critical systems as well as everyday items (such as paper clips and sticky notes) that your organization needs to perform its services and produce its products. Once you have a master inventory, you can prioritize your assets.

Know the risk-assessment formulas/variables. The different risk-assessment formulas/ variables are exposure factor (EF), single loss expectancy (SLE), annualized rate of occurrence (ARO), and annualized loss expectancy (ALE).

Understand threats. A threat is any person or tool that can take advantage of a vulnerability. Threat identifi cation is a formal process of outlining the potential threats to a system.

Understand vulnerabilities. A vulnerability is a weakness, an error, or a hole in the security protection of a system, a network, a computer, software, and so on. When a vulnerability exists, threats may exist to exploit it. You can use countermeasures and safeguards to patch vulnerabilities.

Understand MTTF, MTBF, and MTTR. Aging hardware should be scheduled for replacement and/or repair. The schedule for such operations should be based on the mean time to failure (MTTF), mean time between failures (MTBF), and mean time to repair/ restore (MTTR) estimates established for each device or on prevailing best organizational practices for managing the hardware life cycle.

Understand quantitative risk analysis. Quantitative risk analysis focuses on hard values and percentages. A complete quantitative analysis is not possible because of the intangible aspects of risk. The process involves assigning value to assets and identifying threats and then determining a threat’s potential frequency and the resulting damage; the result is a cost/benefi t analysis of safeguards.

Understand qualitative risk analysis. Qualitative risk analysis is based more on scenarios than calculations. Exact dollar fi gures are not assigned to possible losses; instead, threats are ranked on a scale to evaluate their risks, costs, and effects. Such an analysis assists those responsible for creating proper risk-management policies.

Know the options for handling risk. Reducing risk, or risk mitigation, is the implementation of safeguards and countermeasures. Assigning risk or transferring a risk places the cost of loss that a risk represents onto another entity or organization. Purchasing insurance is one form of assigning or transferring risk. Accepting risk means management has evaluated the cost/benefi t analysis of possible safeguards and has determined that the cost of the countermeasure greatly outweighs the possible cost of loss due to a risk. It also means management has agreed to accept the consequences and the loss if the risk is realized.

c02.indd 21/04/2014 Page 91

92

Chapter 2

Compliance and Operational Security

Understand the risks associated with cloud computing and virtualization. Cloud computing and virtualization, especially when you are virtualizing in the cloud, have serious risks associated with them. Once sensitive, confi dential, or proprietary data leaves the confi nes of the organization, it also leaves the protections imposed by the organizational security policy and resultant infrastructure. Cloud services and their personnel might not adhere to the same security standards as your organization.

Understand RTO and RPO. Recovery time objective (RTO) is the amount of time in which you think you can feasibly recover the function in the event of a disruption. Recovery point objective (RPO) is a measurement of how much loss can be accepted by the organization when a disaster occurs.

2.2 Summarize the security implications of integrating systems and data with third parties

Whenever a third party is involved in your IT infrastructure, there is an increased risk of data loss, leakage, or compromise. The security implications of integrating systems and data with third parties need to be considered carefully before implementation.

The following sections focus on the areas of concern related to this topic as covered by

Security+.

On-boarding/off-boarding business partners

On-boarding is the process of adding new employees to the identity and access management (IAM) system of an organization. The on-boarding process is also used when an employee’s role or position changes or when they are awarded additional levels of privilege or access.

Off-boarding is thus the reverse of this process. It is the removal of an employee’s identity from the IAM system once they have left the organization.

The procedures for on-boarding and off-boarding should be clearly documented in order to ensure consistency of application as well as compliance with regulations or contractual obligations.

On-boarding can also refer to organizational socialization. This is the process by which new employees are trained in order to be properly prepared for performing their job responsibilities. It can include training, job skill acquisition, and behavioral adaptation in an effort to integrate employees effi ciently into existing organizational processes and procedures. Well-designed on-boarding can result in higher levels of job satisfaction, higher levels of productivity, faster integration with existing workers, a rise in organizational loyalty, stress reduction, and a decreased occurrence of resignation. c02.indd 21/04/2014 Page 92

2.2 Summarize the security implications of integrating systems

93

Social media networks and/or applications

Social media networks such as Facebook, Twitter, and LinkedIn, as well as social media applications such as Instagram, WeChat, and Vine, can be very useful tools for both individuals and organizations. These social media services and software can be used to distribute messages, attract new customers, provide support, increase market exposure, and much more. However, unlike with traditional advertising media, such as print, audio, and video ads, organizations do not have full control over the message received by the public. There is the risk that the public will view a message they don’t agree with or simply use your platform to direct attention to their own areas of interest. When attempting to use social media as an interface to customers, clients, and the public, be cautious; and be prepared when your message gets lost in the noise.

If interacting with current or future customers through Internet-based services is important to your organization, you can choose to brave the risks of public social networks or host your own services. Self-hosted services can include discussion forums, text chats, and video conferencing. When the organization is in full control of the medium as well as the message, it can tamp down any unwanted counter-messages.

Interoperability agreements

An interoperability agreement is a formal contract (or at least a written document) that defi nes some form of arrangement where two entities agree to work with each other in some capacity. It defi nes the specifi cs of an exchange or sharing so there is little room for misunderstanding or for changing the terms of the agreement after the fact. The agreement could be between a supplier and customer or between equals. Such an agreement may discuss the sharing of a single resource or an exchange of resources of equivalent values.

There are a wide range of forms and types of interoperability agreements. Some of these are discussed in the following sections.

SLA

A service-level agreement (SLA) is a contract between a supplier and a customer. The SLA defi nes what is provided for a specifi c cost, barter, or other compensation. It specifi es the range, values, quality, timeframe, performance, and other attributes of the service or product. If the provider does not fulfi ll their obligations, the SLA lists the customer’s options of compensation or recompense. It also defi nes the customer’s penalties in the event of late payment or non-payment.

BPA

A business partners agreement (BPA) is a contract between two entities dictating their business relationship. It clearly defi nes the expectations and obligations of each partner in the endeavor. A BPA should include details about the decision-making process; management style; how business capital is to be allocated; the level of salary, benefi ts, and other c02.indd 21/04/2014 Page 93

94

Chapter 2

Compliance and Operational Security distributions; whether new partners can be added; dispute resolution; outside competing activities/confl icts of interest; and how death or dissolution should be handled.

MOU

A memorandum of understanding (MOU) is an expression of agreement or aligned intent, will, or purpose between two entities. It is not typically a legal agreement or commitment, but rather a more formal form of a reciprocal agreement or handshake (neither of which is typically written down). An MOU can also be called a letter of intent. It is a means to document the specifi cs of an agreement or arrangement between two parties without necessarily legally binding them to the parameters of the document.

ISA

An interconnection security agreement (ISA) is a formal declaration of the security stance, risks, and technical requirements of a link between two organizations’ IT infrastructures.

The goal of an ISA is to defi ne the expectations and responsibilities of maintaining security over a communications path between two networks. Connecting networks can be mutually benefi cial, but it also raises additional risks that need to be identifi ed and addressed. An

ISA is a means to accomplish that.

Privacy considerations

Privacy considerations in relation to integrating systems and data with third parties should be taken seriously. See the earlier section, “Privacy policy.”

Risk awareness

Risk awareness involves evaluating assets, vulnerabilities, and threats in order to clearly defi ne an organization’s risk levels. See the earlier section, “2.1 Explain the importance of risk-related concepts.”

Unauthorized data sharing

Unauthorized data sharing can lead to the disclosure of private, confi dential, or proprietary data to outsiders or non-approved entities. When you work with a third party with regard to data and systems integration, there is an increased risk of unauthorized data sharing.

Data encryption, strong authentication, granular authorization controls, and detailed monitoring of activities are required to reduce and/or eliminate such disclosures.

Data ownership

When a third party is involved in an IT system or data exchange, it is important to clearly establish rules and restrictions regarding data ownership. Does the original possessor of c02.indd 21/04/2014 Page 94

2.2 Summarize the security implications of integrating systems

95

the data retain ownership? Does anyone receiving the data now have ownership? Or does the intermediary supporting network or communications path have potential ownership of transferred data?

Data backups

Data backups are essential because they are the only means of recovering data in the event of loss or corruption. However, when third parties are involved in a data system or information exchange, the issue of what is to be backed up and by whom needs to be addressed.

Which side of a communication stream should be backing up the data? Should both sides be backing up the data? Does data ownership need to be considered during backups? If partnerships are dissolved, how is the comingled data to be handled in archived backups and during restoration activities?

Follow security policy and procedures

When you are integrating systems and data with third parties, be sure to compare and contrast the security stance of each organization. Each side of an agreement or connection should follow security policies and procedures as defi ned by their organization. However, both sides need to ensure that their expectations of security are satisfi ed by the partner’s security infrastructure. If there is a signifi cant gap between the levels of security or even the maturity of security between organizations, then the less-secure entity will put the other entity at greater risk of compromise, in the same way that having one unpatched system puts all other systems in a network at risk.

Review agreement requirements to verify compliance and performance standards

To verify compliance and performance standards, you should review agreement requirements. Both sides should assess or audit their partner for compliance with the mutual agreements as well as compliance with any regulations or contractual obligations. In the event a partner is found in violation of regulations, both partners may be held responsible for the oversight. Even without regulations, it is benefi cial to both parties to assess the other’s security acumen and ability to support reasonable levels of productivity and performance for the purpose of ensuring the mutual benefi t of the BPA or MOU.

Exam Essentials

Understand security implications of integrating systems and data with third parties.

Whenever a third party is involved in your IT infrastructure, there is an increased risk of data loss, leakage, or compromise. The security implications of integrating systems and data with third parties need to be considered carefully before implementation.

c02.indd 21/04/2014 Page 95

96

Chapter 2

Compliance and Operational Security

Understand on-boarding/off-boarding. On-boarding is the process of adding new employees to the organization’s identity and access management (IAM) system. It can also mean organizational socialization, which is the process by which new employees are trained in order to be properly prepared for performing their job responsibilities. Offboarding is the removal of an employee’s identity from the IAM system once they have left the organization.

Understand interoperability agreements. Interoperability agreements are formal contracts

(or at least written documents) that defi ne some form of arrangement where two entities agree to work with each other in some capacity.

Understand SLAs. A service-level agreement (SLA) is a contract between a supplier and a customer.

Understand BPAs. A business partners agreement (BPA) is a contract between two entities, dictating their business relationship.

Understand MOUs. A memorandum of understanding (MOU) is an expression of agreement or aligned intent, will, or purpose between two entities.

Understand ISAs. An interconnection security agreement (ISA) is a formal declaration of the security stance, risks, and technical requirements of a link between two organizations’

IT infrastructures.

2.3 Given a scenario, implement appropriate risk-mitigation strategies

Once a thorough risk assessment has been performed, mitigation, avoidance, assignment, or acceptance solutions need to be selected and implemented. This section discusses several aspects of carrying out appropriate risk-mitigation strategies.

Change management

Change in a secure environment can introduce loopholes, overlaps, missing objects, and oversights that can lead to new vulnerabilities. The only way to maintain security in the face of change is to systematically manage change. Change management usually involves extensive planning, testing, logging, auditing, and monitoring of activities related to security controls and mechanisms. The records of changes to an environment are then used to identify agents of change, whether those agents are objects, subjects, programs, communication pathways, or the network itself.

The goal of change management is to ensure that no change leads to reduced or compromised security. Change management is also responsible for making it possible to roll back c02.indd 21/04/2014 Page 96

2.3 Given a scenario, implement appropriate risk-mitigation strategies

97

any change to a previous secured state. Change management can be implemented on any system despite the level of security. Ultimately, change management improves the security of an environment by protecting implemented security from unintentional, tangential, or affected diminishments. Although an important goal of change management is to prevent unwanted reductions in security, its primary purpose is to make all changes subject to detailed documentation and auditing and thus able to be reviewed and scrutinized by management.

Change management should be used to oversee alterations to every aspect of a system, including hardware confi guration and OS and application software. Change management should be included in design, development, testing, evaluation, implementation, distribution, evolution, growth, ongoing operation, and modifi cation. It requires a detailed inventory of every component and confi guration. It also requires the collection and maintenance of complete documentation for every system component, from hardware to software and from confi guration settings to security features.

The change-control process of confi guration or change management has several goals or requirements:

Implement changes in a monitored and orderly manner. Changes are always

controlled.

A formalized testing process is included to verify that a change produces expected results.

All changes can be reversed.

Users are informed of changes before they occur to prevent loss of productivity.

The effects of changes are systematically analyzed.

The negative impact of changes on capabilities, functionality, and performance is minimized.

One example of a change-management process is a parallel run, which is a type of new system deployment testing where the new system and the old system are run in parallel. Each major or signifi cant user process is performed on each system simultaneously to ensure that the new system supports all required business functionality that the old system supported or provided.

Change is the antithesis of security. In fact, change often results in reduced security.

Therefore, security environments often implement a system of change management to minimize the negative impact of change on security. Change documentation is one aspect of a change-management system: It’s the process of writing out the details of changes to be made to a system, a computer, software, a network, and so on before they’re implemented. Then, the change documentation is transformed into a procedural document that is followed to the letter to implement the desired changes. After the changes are implemented, the system is tested to see whether security was negatively affected. If security has decreased, the change documentation can be used to guide the reversal of the changes to restore the system to a previous state where stronger security was enforced.

c02.indd 21/04/2014 Page 97

98

Chapter 2

Compliance and Operational Security

Incident management

When an incident occurs, you must handle it in a manner that is outlined in your security policy and consistent with local laws and regulations. The fi rst step in incident management or handling an incident properly is recognizing when one occurs. You should understand the following two terms related to incident handling:

Event—Any occurrence that takes place during a certain period of time

Incident—An event that has a negative outcome affecting the confidentiality, integrity, or availability of an organization’s data

The most common reason incidents are not reported is that they are never identifi ed.

You could have many security policy violations occurring each day, but if you don’t have a way of identifying them, you will never know. Therefore, your security policy should identify and list all possible violations and ways to detect them. It’s also important to update your security policy as new types of violations and attacks emerge.

What you do when you fi nd that an incident has occurred depends on the type of incident and the scope of the damage. Laws dictate that some incidents must be reported, such as those that impact government or federal interest computers (a federal interest computer is one that is used by fi nancial institutions or by infrastructure systems such as water and power systems) or certain fi nancial transactions, regardless of the amount of damage. Most

U.S. states now have laws that require organizations that experience an incident involving certain types of personally identifying information (for example, credit card numbers, Social

Security numbers, and driver’s license numbers) to notify affected individuals of the breach.

In addition to laws, many companies have contractual obligations to report different types of security incidents to business partners. For example, the Payment Card Industry

Data Security Standard (PCI DSS) requires any merchant that handles credit card information to report incidents involving that information to their acquiring bank as well as to law enforcement.

An incident occurs when an attack, or other violation of your security policy, is carried out against your system. There are many ways to classify incidents; here is a general list of categories:

Scanning

Data breach

Malicious code

Denial of service

These four areas are the basic entry points for attackers to impact a system. You must focus on each of these areas to create an effective monitoring strategy that detects system incidents. Each incident area has representative signatures that can tip off an alert security administrator that an incident has occurred. Make sure you know your OS environment and where to look for the telltale signs of each type of incident.

Many organizations now have a dedicated team responsible for investigating any computer security incidents that take place. These teams are commonly known as computer c02.indd 21/04/2014 Page 98

2.3 Given a scenario, implement appropriate risk-mitigation strategies

99

incident response teams (CIRTs) or computer security incident response teams (CSIRTs).

When an incident occurs, the response team has four primary responsibilities:

Determine the amount and scope of damage caused by the incident.

Determine whether any confidential information was compromised during the

incident.

Implement any necessary recovery procedures to restore security and recover from incident-related damages.

Supervise the implementation of any additional security measures necessary to improve security and prevent recurrence of the incident.

As part of these duties, the team should facilitate a postmortem review of the incident within a week of the occurrence to ensure that key players in the incident share their knowledge and develop best practices to assist in future incident-response efforts.

When putting together your incident-response team, be sure to design a cross-functional group of individuals who represent the management, technical, and functional areas of responsibility most directly impacted by a security incident.

User rights and permissions reviews

User access and rights reviews often are based on a review of assigned resources privileges.

A privilege is an ability or activity that a user account is granted permission to perform.

User accounts are often assigned privileges based on their work tasks and their normal activities. The principle of least privilege is a security rule of thumb that states that users should be granted only the level of access needed for them to accomplish their assigned work tasks, and no more. Furthermore, those privileges should be assigned for the shortest time period possible.

Exploitation of privileges is known as privilege abuse or privilege escalation. Privilege escalation occurs when a user account is able to obtain unauthorized access to higher levels of privileges, such as a normal user account that can perform administrative functions.

Privilege escalation can occur through the use of a hacker tool or when an environment is incorrectly confi gured. It can also occur when lazy administrators fail to remove older privileges as a user is granted new privileges based on new job descriptions. An accumulation of privileges can be considered a form of privilege escalation.

Auditing and review of access and privilege should be used to monitor and track not just the assignment of privilege and the unauthorized escalation of privilege but also privilege usage. Knowing what users are doing and how often they do it may assist administrators in assigning and managing privileges.

Perform routine audits

Auditing or reviewing system security settings is a standard, routine element of security management. This task should be performed on a regular basis across the entire organization on both logical infrastructure components as well as physical facility elements.

c02.indd 21/04/2014 Page 99

100

Chapter 2

Compliance and Operational Security

Storage and retention policies often revolve around collections of logs and audit trails, security monitoring reports, and backups. Such policies defi ne what types of data sets are to be protected, how they are to be stored, how they are to be secured, how long they will be retained, who will be allowed to access the data, for what purposes the data can be put to use, and how the data will be destroyed at the end of its retention lifetime.

The answers to these items are fully dependent on the organization and its internal and external requirements to follow best business practice, industry standards, rules of law, and protection against lawsuits. Periodic audits of the storage and retention policies as well as the procedures followed to implement the policies will reveal defi ciencies or oversights.

Enforce policies and procedures to prevent data loss or theft

When designing the security infrastructure, you should take care to address concerns of data loss or theft. Precautions, preventions, and deterrents must be implemented that reduce the risk of data theft from external entities as well as internal workers.

Additionally, data loss due to accident, oversight, malicious code, or intentional attack can be prevented with a proper backup and restoration solution. Data loss or data leakage that leads to disclosure of information to unauthorized third parties should be prevented using a data loss prevention (DLP) solution (see the later section, “Data Loss

Prevention (DLP).”

Enforce technology controls

The loss of data or the leakage of data to unauthorized third parties can be reduced or eliminated with a DLP solution. Such a solution often involves the use of a wide range of technology controls to inhibit the risk of data loss and data leakage. On-device storage encryption ensures that even with the physical loss or theft of a device, the data stored on the device is inaccessible. Detailed tracking and logging is used to monitor the subjects who interact with data that has a high level of sensitivity or value. More rigid authentication requirements, such as multifactor authentication, reduce the risk unauthorized entities gaining access via impersonation. Granular authentication limits the accounts that have access to valuable data and thus reduces the risk of exposure. Enforcing technology controls such as these reduces the risk of the loss or leakage of data.

Data Loss Prevention (DLP)

Data loss prevention (DLP) is the idea of systems specifi cally implemented to detect and prevent unauthorized access to, use of, or transmission of sensitive information. DLP can include hardware and software elements designed to support this primary goal. It may involve deep packet inspection, storage and transmission encryption, contextual assessment, monitoring authorizations, and centralized management.

c02.indd 21/04/2014 Page 100

2.4 Given a scenario, implement basic forensic procedures

101

Many regulations, such as HIPAA, the Health Information Technology for Economic and Clinical Health (HITECH) Act, the Gramm-Leach-Bliley Act (GLBA), Basel II, and

PCI DSS, either directly require DLP solutions or strongly imply the need for DLP.

Exam Essentials

Understand change management. The goal of change management is to ensure that change does not lead to reduced or compromised security. Change in a secure environment can introduce loopholes, overlaps, missing objects, and oversights that can lead to new vulnerabilities. The only way to maintain security in the face of change is to systematically manage change. This usually involves extensive planning, testing, logging, auditing, and monitoring of activities related to security controls and mechanisms.

Understand incident management. When an incident occurs, you must handle it in a manner that is outlined in your security policy and consistent with local laws and regulations.

The fi rst step in incident management or handling an incident properly is recognizing when one occurs.

Understand the principle of least privilege. The principle of least privilege is a security rule of thumb that states that users should be granted only the level of access needed for them to accomplish their assigned work tasks, and no more.

Understand privilege escalation. Privilege escalation occurs when a user account is able to obtain unauthorized access to higher levels of privileges, such as a normal user account that can perform administrative functions. Privilege escalation can occur through the use of a hacker tool or when an environment is incorrectly confi gured.

Understand periodic audits. Periodic audits are used to ensure that deployed elements of infrastructure and procedures are in compliance with standards and security policy.

Understand DLP. Data loss prevention (DLP) is the idea of systems specifi cally implemented to detect and prevent unauthorized access to, use of, or transmission of sensitive information. DLP can include hardware and software elements designed to support this primary goal.

2.4 Given a scenario, implement basic forensic procedures

Forensics is the collection, protection, and analysis of evidence from a crime in order to present the facts of the incident in court. One of the most critical aspects of forensics is the initial gathering and protection of evidence. In order for evidence to be admissible in court, you must be able to show that the chain of custody wasn’t broken, that the evidence was properly preserved, and that the evidence was collected properly. One aspect of this is to c02.indd 21/04/2014 Page 101

102

Chapter 2

Compliance and Operational Security perform analysis on copies of evidence and not on the original evidence when the evidence is a storage medium.

Evidence should be protected from alteration, damage, and corruption from the moment of its discovery through the rest of its lifetime, which may be concluded after it’s presented in court. Evidence preservation includes properly managing the chain-of-custody document, collecting the evidence into transportable containers, clearly labeling those containers, and then providing a secure environment for the evidence. A secure environment prevents damage and theft, but it also maintains the proper temperature and humidity while avoiding dust, smoke, debris, magnetic fi elds, and vibrations.

Collection of evidence is the procedure of securing evidence by collecting it. This process is often called bag and tag. Basically, evidence is gathered, placed in a container, and labeled, and then its chain-of-custody document is fi lled out. It’s the responsibility of the crime scene technician to collect evidence.

Order of volatility

When collecting evidence, it is important to consider the volatility of data and resources.

Collection of potential evidence should be prioritized based on the type of event, incident, or crime as well as the order of volatility. Generally, the following is a reliable order of volatility to follow:

Registers, cache

Routing table, ARP cache, process table, kernel statistics, memory

Temporary file systems

Disk

Remote logging and monitoring data that is relevant to the system in question

Physical configuration, network topology

Archival media

This volatility order was taken from RFC 3227: Guidelines for Evidence Collection and

Archiving ( www.faqs.org/rfcs/rfc3227.html

). This is an excellent RFC to read for general knowledge about evidence collection.

Capture system image

Because most computer crime evidence takes the form of bits on magnetic storage devices, it is fairly easy to manipulate and alter. Computers can be used to fabricate and counterfeit almost any form of record or data. In order to preserve data as well as establish and verify the integrity of that data, images are taken of suspect storage devices.

In most cases, a forensic imaging program is used that creates a bit-stream image copy of a storage device. The image copy of the original media is stored onto a forensically clean storage device (aka a zeroized hard drive).

c02.indd 21/04/2014 Page 102

2.4 Given a scenario, implement basic forensic procedures

103

The process of creating the image is not performed without checks and balances. The forensic duplication system performs a hash calculation of the original media before and after the bit-stream image copy is performed. If these hashes match, then the process of duplication did not alter the original during the duplication process. Additionally, the image copy is also hashed. If the imaging process worked properly, the image copy’s hash matches that of the original.

Network traffic and logs

When a computer crime or policy violation takes place, it is important to collect all possible sources of evidence. These can include network traffi c captures as well as network device logs. In some network environments, it may be possible to maintain an ongoing recording of network traffi c. However, because this would result in a massive need for storage capacity, such a recording only maintains a sliding window of recent network activity—often measured in minutes or at most hours. If a violation is detected promptly, the window of network traffi c can be preserved for more detailed offl ine analysis.

Many network devices, including routers, switches, smart patch panels, fi rewalls, proxies, and VPN appliances, can be confi gured to record log fi les of the events, activities, or packets that occur on, over, or through them. These logs need to be collected and preserved in order to use them in an investigation.

Capture video

There are two issues related to video. First, if security cameras are present and video was captured of a security violation, those captured video images need to be preserved as evidence. Video (and audio) recordings may also track inputted sensitive data, such as credit card numbers. In such circumstances, that data must be protected at the same level as or higher than the original data.

Second, while performing an investigation, especially while seeking out physical and/or logical evidence, it can be important to have someone videotape the process. The videoed observation can assist in crime scene reenactments, orientation, and explaining evidence properly during a presentation in court.

In addition to videotaping the act of evidence gathering, it is also a good idea to take copious photographs from multiple angles when moving or disassembling physical objects in association with an investigation.

Record time offset

As an event is recorded into a log fi le, it is encoded with a time stamp. The time stamp is pulled from the clock on the local device where the log fi le is written or sent with the event from the originating device if remote logging is performed. However, it is all too common for the clocks of the devices and computers in a network to be out of time sync to some degree. Thus, it is important to establish a known time standard, such as one of the atomic c02.indd 21/04/2014 Page 103

104

Chapter 2

Compliance and Operational Security clocks accessible through NIST ( http://tf.nist.gov/tf-cgi/servers.cgi

). Then, each time a log fi le is pulled, the clock of the host device is checked and compared to the time standard. The time offset is the difference between the device clock and the standard; it is used to adjust the time of log entries in order to sync events and activities across multiple network devices. Management of log times is essential for the chronological reconstruction of attack or compromise events.

Take hashes

As mentioned in the “Capture system image” section, it is important to take a hash of a storage device before and after image duplication. Additionally, it is important to periodically verify that the hash of the image copy being used for forensic investigation has not changed.

Doing so ensures that the fi ndings from the copy will legally apply to the source original.

Screenshots

When performing a forensic investigation, never trust the software on the suspect’s computer.

Thus, using native screen-capture tools or features is not recommended. Instead, use a camera to take photographs of anything being displayed. This includes monitors, smaller LCD screens (such as on printers), as well as any LEDs that might indicate status or function.

Witnesses

A witness is someone who experienced an event or incident through one or more of their fi ve senses. A witness can provide information about what occurred, where the occurrence took place, and the chronological order of related events. A witness is often called on during an investigation or during a court case to provide testimony of their experiences.

Track man hours and expense

Throughout the implementation of an incident-response procedure, you should document every action taken by end users and the incident-response team. This documentation will serve as an audit trail to retrace the actions taken and the events that occurred during the incident. Learning from the incident’s documentation includes taking precautions to prevent the recurrence of the incident, updating the security policy and related procedural documents, and assessing the overall impact of asset loss, damage, and risk imposed on the environment by the incident.

After an incident has been resolved, disclosure of the details and the results of the incident should be restricted to authorized parties. Often, the authorized parties are limited to senior management, the legal team, and some members of the security staff.

It is also important to review the man hours involved in the response and mediation of an event. This can be used to determine whether the expense of the event was justifi ed.

Such information can be used to adjust budgets or response policies.

c02.indd 21/04/2014 Page 104

2.4 Given a scenario, implement basic forensic procedures

105

Chain of custody

The chain of custody is a document that indicates various details about evidence across its life cycle. It begins with the time and place of discovery and identifi es who discovered the evidence, who secured it, who collected it, who transported it, who protected it while in storage, and who analyzed it. Ultimately, the chain-of-custody document details all persons who had controlling authority over and access to the evidence. Any gaps in this record casts doubt on the integrity of the evidence, because there is a possibility that the evidence was out of authoritative control. The chain of custody must be created and maintained from the moment evidence is discovered through the presentation of the evidence in court.

Big data analysis

Big data refers to collections of data that have become so large that traditional means of analysis or processing are ineffective, ineffi cient, and insuffi cient. Big data involves numerous diffi cult challenges, including collection, storage, analysis, mining, transfer, distribution, and results presentation. Such large volumes of data have the potential to reveal nuances and idiosyncrasies that more mundane sets of data fail to address. The potential to learn from big data is tremendous, but the burdens of dealing with big data are equally great. As the volume of data increases, the complexity of data analysis increases as well. Big data analysis requires high-performance analytics running on massively parallel or distributed processing systems.

With regard to security, organizations are endeavoring to collect an ever more detailed and exhaustive range of event data and access data. This data is collected with the goal of assessing compliance, improving effi ciencies, improving productivity, and detecting violations.

Exam Essentials

Know basic forensic procedures. Forensics is the collection, protection, and analysis of evidence from a crime in order to present the facts of the incident in court. One of the most critical aspects of forensics is the initial gathering and protection of evidence. In order for evidence to be admissible in court, you must be able to show that the chain of custody wasn’t broken, that the evidence was properly preserved, and that the evidence was collected properly. This also includes issues such as the order of volatility, capturing a system image, collecting network traffi c and logs, capturing video, recording time offsets, taking screenshots, interviewing witnesses, and tracking man hours and expenses.

Understand the chain of custody. The chain of custody is a document that indicates various details about evidence across its life cycle. It begins with the time and place of discovery and identifi es who discovered the evidence, who secured it, who collected it, who transported it, who protected it while in storage, and who analyzed it.

Understand evidence preservation. Evidence should be protected from alteration, damage, and corruption from the moment of its discovery through the rest of its lifetime, which may be concluded after it’s presented in court.

c02.indd 21/04/2014 Page 105

106

Chapter 2

Compliance and Operational Security

Understand the collection of evidence. Collection of evidence is the procedure of securing evidence by collecting it. This process is often called bag and tag. Basically, evidence is gathered, placed in a container, and labeled, and its chain-of-custody document is fi lled out. It’s the responsibility of the crime scene technician to collect evidence.

Understand big data analysis. Big data analysis requires high-performance analytics running on massively parallel or distributed processing systems.

2.5 Summarize common incident response procedures

An incident response procedure is to be followed when a security breach or security violation has occurred. One of the most important goals of incident response is containment: the protection and preservation of evidence. This may require taking systems offl ine, duplicating hard drives using imaging software, making photographs of monitor displays, documenting strange conditions or activities, disconnecting a server from the network, and so on.

For end users, the incident response policy is simple and direct: They should step away from their computer system and contact the incident response team. For the computer incident response team (CIRT), the incident response policy is more involved. The following sections discuss the responsibilities or concerns of a CIRT.

Preparation

Preparation is necessary to ensure a successful outcome of unplanned downtime, security breaches, or disasters. Being prepared includes defi ning a procedure to follow in response to incidents, buttressing an environment against incidents, and improving detection methods. Having a plan and preallocating resources to address incidents improves recovery time while minimizing loss and costs. An incident response policy should be developed that addresses the various aspects of handling incidents.

Incident identification

The fi rst step in responding to an incident is to detect and become aware that an incident is occurring. Without detection, incidents would instead be false negatives (the lack of an alarm in the presence of malicious activity)—in other words, unknown unknowns. If an organization is not aware that it is actively being harmed, then it doesn’t know that there is a need to respond or make changes. Thus, improved means of detecting security violations is essential. This includes detailed security logging, use of IDS and IPS systems, as well as monitoring of performance for trends of abnormal activity levels. c02.indd 21/04/2014 Page 106

2.5 Summarize common incident response procedures

107

Once an incident is recognized, data about the incident should be collected and documented. The incident response team should take an account of the status of the environment and attempt to deduce the cause of the incident. This will assist them in determining the scope of the concern. Many other questions may need to be asked as well, such as these:

What systems were affected?

Is the source internal or external?

Is the compromise engorging or concluded?

Was is a network traffic-based attack?

Which subnets were affected?

Which systems may have been accessed by the intruder?

What resources were accessed?

What level of privilege was used?

What information or data was put at risk?

Was the attack from a single source/vector or multiple?

Is this a repeat of a previous attack?

Was malicious code infection involved?

Is the compromise contagious?

Was privacy violated?

Which other systems have similar vulnerabilities?

As these questions are answered, the information should be included in the incident documentation.

Escalation and notification

Once you have a basic understanding of what the incident consists of, you can follow a staged procedure of escalation and notifi cation. Information about security breaches is not to be shared publicly or with the entire employee base. Instead, only those in specifi c positions of authority or responsibility should receive notifi cation of breaches. This may include legal, PR, IT staff, security staff, human resources, and so on. If the incident is related to a criminal event, then contacting law enforcement is in order. As the details of an incident are uncovered, the depth, complexity, or level of damage caused may increase, thus requiring an escalation of personnel and response.

Mitigation steps

Once the parameters of an incident are understood, the next step is containment. Containment prevents the further spread of a problem to other yet-to-be-affected systems. c02.indd 21/04/2014 Page 107

108

Chapter 2

Compliance and Operational Security

When the potential for additional damage has been eliminated (or at least signifi cantly reduced), the process of mitigation can take place. Mitigation is the act of responding to the incident in order to reduce risk, prevent reoccurrence, and start the process of recovery. The steps involved in mitigation depend on what violations occurred and what technologies are already deployed in the organization.

Lessons learned

A fi nal step in incident response is to evaluate the response plan and procedures and improve them as necessary. This review can also serve as a means to extract or clarify lessons learned during an incident response. Often things go wrong during a response, and learning from errors or mistakes will improve future responses.

Reporting

After an incident has been contained, the incident response team is responsible for fully documenting the incident and making recommendations about how to improve the environment to prevent a recurrence. The documentation or reporting of an incident is used to provide a record of the incident (for use internally or to share with outsiders), provide support for due care and due diligence defense, serve as support for security decisions, and assist with training incident response team members.

Recovery/reconstitution procedures

Recovery is the process of removing any damaged elements from the environment and replacing them. This can apply to corrupted data being restored from backup and to malfunctioning hardware or software being replaced with updated or new versions. In some cases, entire computer systems need to be reconstituted (rebuilt from new parts) in order to eradicate all elements of compromise and return into production a functioning and trustworthy system.

The recovery and reconstitution procedures can also include alterations of confi guration settings and adding new security features or components. This is especially important if a vulnerability remains that could be exploited to cause the incident to reoccur.

First responder

When a security breach or perimeter violation is detected, incident response must be initiated by the fi rst responders. The goal of a planned and documented incident response is to limit the amount of damage caused by the incident, to recover the environment as quickly as possible, and to gather information about the incident and the perpetrator in order to prevent a recurrence and pursue legal prosecution.

The best way to respond to security violations is to have an incident response plan to follow. This plan defi nes and describes the procedures to perform in the event of an incident. c02.indd 21/04/2014 Page 108

2.5 Summarize common incident response procedures

109

One of the fi rst steps that should occur when an incident is detected or suspected is to contact the incident response team, which then follows the procedures in the incident response plan.

It’s important not to log off the system or shut down the computer, because these actions may damage or alter evidence. The CIRT team guides the fi rst responder as to what action to take. When relevant, one common action is to remove the network cable, but otherwise leave the affected or compromised system untouched. Often, the fi rst responder is an end user; thus it is important that they have proper training and awareness of how to handle and report incidents.

Incident isolation

During the initial incident identifi cation process, incident response team members may become aware that a system is a target or is the cause of a compromise. In these cases, alternate response actions may be considered, such as quarantine or device removal.

Quarantine

Quarantine sets something apart from the rest of an environment in order to provide protection and prevent interaction between the element quarantined and the environment. This technique can be implemented to protect a mission-critical server from a network compromise or to protect a network from a compromised server by quarantining the server.

Device removal

Once a piece of hardware has been identifi ed as the culprit or source of a system breach, it is often essential to remove the device from the production network. This might be performed on a temporary basis, such as placing the device in quarantine while it is being cleaned or repaired. But in most cases, device removal means removing a device that is not to be used again in production. This may be due to the device being damaged or compromised beyond a reasonable ability to repair or restore the system. In such cases, the offending device may be destroyed and a new device obtained to be put into production.

Data breach

A data breach occurs when nonpublic data is read, copied, or destroyed during an incident.

The incident could be the data breach itself, or the data breach could be a consequence of the incident. In any case, if data is damaged, only restoration from a reliable backup can resolve the issue. If the data was read or copied, it may be too late to attempt any response. Once an unauthorized person has seen or copied data, it is usually not possible to make them unsee the information or undo their distribution of the data. Instead, a DLP solution should have been implemented prior to a breach in order to prevent the breach from taking place.

Unfortunately, data breaches have become a common occurrence as organizations fail to protect the data they gather and retain, while at the same time they seek to collect more c02.indd 21/04/2014 Page 109

110

Chapter 2

Compliance and Operational Security data than ever before. Hence the need for big data management, storage, and analysis. A data breach may affect an organization as well as its customers, clients, suppliers, employees, and so on.

Damage and loss control

In the process of responding to an incident, important goals are to contain the problem

(that is, the potential for further damage) and control or prevent loss. Containment means to limit the scope of damage and prevent other systems or resources from being negatively affected. Containment is especially important when the incident includes virus infection, remote-control access, a Trojan horse, a logic bomb, or the use of hacker tools. Malicious use of these components may leave residual elements that are activated at a later time. Thus, after containment, eradication of malware should be part of the recovery process in order to prevent further damage or loss.

Exam Essentials

Understand the idea of an incident response policy. An incident response policy is the procedure to follow when a security breach or security violation has occurred. One of the most important goals of an incident response policy is containment: the protection and preservation of evidence.

Understand incident response. The goal of a planned and documented incident response is to limit the amount of damage caused by an incident, to recover the environment as quickly as possible, and to gather information about the incident and the perpetrator in order to prevent a recurrence and pursue legal prosecution.

Understand preparation. Preparation is necessary to ensure a successful outcome of unplanned downtime, security breaches, or disasters. Being prepared includes defi ning a procedure to follow in response to incidents, buttressing an environment against incidents, and improving detection methods.

Understand incident identification. The fi rst step in responding to an incident is to detect and become aware that an incident is occurring. This should then lead to documenting all details about the incident.

Understand escalation and notification. Once you have a basic understanding of what the incident consists of, a staged procedure of escalation and notifi cation can be followed.

Only those in specifi c positions of authority or responsibility should receive notifi cation of breaches.

Understand mitigation. Mitigation is the act of responding to the incident in order to reduce risk, prevent recurrence, and start the process of recovery.

Understand recovery/reconstitution procedures. Recovery is the process of removing any damaged elements from the environment and replacing them, altering confi guration settings, and adding new security features or components.

c02.indd 21/04/2014 Page 110

2.6 Explain the importance of security-related awareness and training

111

Understand first responders. When a security breach or perimeter violation is detected, incident response must be initiated by the fi rst responders. The CIRT team guides the fi rst responder as to what action to take.

Understand damage and loss control. In the process of responding to an incident, important goals are to contain the problem (the potential for further damage) and control or prevent loss. Containment means to limit the scope of damage and prevent other systems or resources from being negatively affected.

2.6 Explain the importance of securityrelated awareness and training

Security is useless if users aren’t properly trained to perform their work tasks within the confi nes of the secured environment. Security training for employees is essential to the success of any security endeavor. It should be part of your security policy and business operations. This should include communication, awareness training, education, and support through online resources.

As a security professional in any organization, you must keep the lines of communication open. This means you should be up front about security requirements for all personnel.

Clearly train users on how to perform their work tasks while maintaining security.

As a manager, be open to discussing security issues with users from every level and classifi cation. Be ready to discuss good and bad aspects of security. And be willing to assist users in learning to be effi cient and productive while sustaining security. By keeping communication open and abundant, you can help prevent users from giving up on security and intentionally bypassing security procedures.

User awareness is an effort to make security a regular thought for all employees. It begins with security training and orientation when a new worker is hired. However, user awareness must continue throughout the life of the organization. It includes regular reminders, refresher seminars, emails with security updates, newsletters, intranet websites, posters with security facts or rules, and so on—whatever is necessary to keep users aware of the importance of security.

If an organization fails to maintain user awareness of security, it will experience a slow erosion of security that may ultimately allow a serious intrusion to occur. Unfortunately, user awareness of security is generally the most overlooked element of security management. In fact, the lack of security awareness is the primary reason that social-engineering attacks succeed. With proper information, users can be equipped to recognize social-engineering attacks and avoid being taken in by them.

Education is broad security training, usually focused on teaching users to perform their work tasks securely. Security education has the ultimate goal of certifi cation. Certifi cation is the act of passing one or more exams in order to earn certifi cation credentials (an impressive acronyms to add to your résumé), which verify that you possess certain knowledge, skills, and expertise.

c02.indd 21/04/2014 Page 111

112

Chapter 2

Compliance and Operational Security

Security documentation, especially work-task-specifi c instructions, should be posted to an intranet website for easy access. In this way, users can keep themselves current on changing security policies and procedures. In contrast, security documentation about known vulnerabilities and active investigations should almost never be made available to everyone (even all internal employees).

Security policy training and procedures

The successful implementation of a security solution requires changes in user behavior.

These changes primarily consist of alterations in normal work activities to comply with the standards, guidelines, and procedures mandated by the security policy. Behavior modifi cation involves some level of learning on the part of the user. There are three commonly

recognized learning levels: awareness, training, and education.

A prerequisite to actual security training is awareness. The goal of creating awareness is to bring security into the forefront and make it a recognized entity for users. Awareness establishes a common baseline or foundation of security understanding across the entire organization. Awareness is not created exclusively through a classroom type of exercise but through the work environment. Many tools can be used to create awareness, such as posters, notices, newsletter articles, screen savers, T-shirts, rally speeches by managers, announcements, presentations, mouse pads, offi ce supplies, and memos, as well as traditional instructor-led training courses. Awareness focuses on key or basic topics and issues related to security that all employees, no matter which position or classifi cation they have, must comprehend.

Awareness is a tool for establishing a minimum standard common denominator or foundation of security understanding. All personnel should be fully aware of their security responsibilities and liabilities. They should be trained to know what to do and what not to do.

The issues that users need to be aware of include avoiding waste, fraud, and unauthorized activities. All members of an organization, from senior management to temporary interns, need the same level of awareness. The awareness program in an organization should be tied in with its security policy, incident-handling plan, and disaster-recovery procedures. For an awareness-building program to be effective, it must be fresh, creative, and updated often. The awareness program should also be tied to an understanding of how the corporate culture affects and impacts security for individuals as well as the organization as a whole. If employees do not see enforcement of security policies and standards, especially at the awareness level, then they may not feel obligated to abide by them.

Awareness and role-based training (see the next section) are often provided in-house.

That means these teaching tools are created and deployed by and within the organization.

However, the next level of knowledge distribution is usually obtained from an external third-party source.

Education is a more detailed endeavor in which students/users learn much more than they actually need to know to perform their work tasks. Education is most often associated with users pursuing certifi cation or seeking job promotion. It is typically a requirement for c02.indd 21/04/2014 Page 112

2.6 Explain the importance of security-related awareness and training

113

personnel seeking security professional positions. A security professional requires extensive knowledge of security and the local environment for the entire organization and not just their specifi c work tasks.

Role-based training

Role-based training involves teaching employees to perform their work tasks and to comply with the security policy. All new employees require some level of training so they can comply with all standards, guidelines, and procedures mandated by the security policy.

New users need to know how to use the IT infrastructure, where data is stored, and how and why resources are classifi ed. Many organizations choose to train new employees before they are granted access to the network, whereas others grant new users limited access until their training in their specifi c job position is complete. Training is an ongoing activity that must be sustained throughout the lifetime of the organization for every employee. It is considered an administrative security control.

Personally identifiable information

Personally identifi able information (PII) is any data item that is linked back to the human from whom it was gleaned. PII that is medically related is protected under HIPAA laws.

However, in the United States, most PII is not generally protected. Companies should clearly disclose what PII is collected and how it will be used in the acceptable use policy (AUP).

Privacy is the level of confi dentiality and isolation a user is given in a system. Most users falsely assume that they have privacy on company computers. Privacy assumes that the activities and communications performed are hidden from others or at least protected from being viewed by all but the intended recipients. However, no activity on company property is hidden from view by the auditing and monitoring components of the network. As mentioned previously, whatever the stance of the company on privacy, this must be detailed and disclosed in a privacy policy.

Information classification

Classifi cation is the process of labeling objects (assets, data, information, and so on) with sensitivity labels and subjects (users) with clearance labels. After a resource is classifi ed, the

IT infrastructure and all users should read and respect the assigned label. Thus, each object receives the security it needs.

Data classifi cation is the primary means by which data is protected based on its need for secrecy, sensitivity, or confi dentiality. It is ineffi cient to treat all data the same when designing and implementing a security system, because some data items need more security than others. Securing everything at a low security level means sensitive data is easily accessible.

Securing everything at a high security level is too expensive and restricts access to unclassifi ed, noncritical data. Data classifi cation is used to determine how much effort, money, and resources are allocated to protect the data and control access to it.

c02.indd 21/04/2014 Page 113

114

Chapter 2

Compliance and Operational Security

The primary objective of data-classifi cation schemes is to formalize and stratify the process of securing data based on assigned labels of importance and sensitivity. Data classifi cation is used to provide security mechanisms for storing, processing, and transferring data.

It also addresses how data is removed from a system and destroyed.

The following are benefi ts of using a data-classifi cation scheme:

It demonstrates an organization’s commitment to protecting valuable resources and assets.

It assists in identifying those assets that are most critical or valuable to the organization.

It lends credence to the selection of protection mechanisms.

It is often required for regulatory compliance or legal restrictions.

It helps to define access levels, types of authorized uses, and parameters for declassification and/or destruction of resources that are no longer valuable.

The criteria by which data is classifi ed vary based on the organization performing the classifi cation. However, you can glean numerous generalities from common or standardized classifi cation systems:

Usefulness of the data

Timeliness of the data

Value or cost of the data

Maturity or age of the data

Lifetime of the data (or when it expires)

Association with personnel

Data-disclosure damage assessment (that is, how the disclosure of the data would affect the organization)

Data-modification damage assessment (that is, how the modification of the data would affect the organization)

National security implications of the data

Authorized access to the data (that is, who has access to the data)

Restriction from the data (that is, who is restricted from the data)

Maintenance and monitoring of the data (that is, who should maintain and monitor the data)

Storage of the data

Using whatever criteria are appropriate for the organization, data is evaluated, and an appropriate data-classifi cation label is assigned to it. In some cases, the label is added to the data object. In other cases, labeling is simply assigned by the placement of the data into a storage mechanism or behind a security protection mechanism.

To implement a classifi cation scheme, you must perform seven major steps, or phases:

1.

Identify the custodian, and define their responsibilities.

2.

Specify the evaluation criteria of how the information will be classified and labeled.

c02.indd 21/04/2014 Page 114

2.6 Explain the importance of security-related awareness and training

115

3.

Classify and label each resource. (The owner conducts this step, but a supervisor should review it.)

4.

Document any exceptions to the classification policy that are discovered, and integrate them into the evaluation criteria.

5.

Select the security controls that will be applied to each classification level to provide the necessary level of protection.

6.

Specify the procedures for declassifying resources and the procedures for transferring custody of a resource to an external entity.

7.

Create an enterprise-wide awareness program to instruct all personnel about the classification system.

Declassifi cation is often overlooked when designing a classifi cation system and documenting usage procedures. Declassifi cation is required once an asset no longer warrants or needs the protection of its currently assigned classifi cation or sensitivity level. When assets fail to be declassifi ed as needed, security resources are wasted, and the value and protection of the higher sensitivity levels is degraded.

The two common classifi cation schemes are government/military classifi cation and commercial business/private sector classifi cation. There are fi ve levels of government/military classifi cation (listed here from highest to lowest):

Top Secret The highest level of classifi cation. The unauthorized disclosure of top-secret data will have drastic effects and cause grave damage to national security.

Secret Used for data of a restricted nature. The unauthorized disclosure of data classifi ed as secret will have signifi cant effects and cause critical damage to national security.

Confidential Used for data of a confi dential nature. The unauthorized disclosure of data classifi ed as confi dential will have noticeable effects and cause serious damage to national security. This classifi cation is used for all data labels or groupings between secret and sensitive but unclassifi ed.

Sensitive but Unclassified Used for data that is of a sensitive or private nature, but the disclosure of which would not cause signifi cant damage.

Unclassified The lowest level of classifi cation. This is used for data that is neither sensitive nor classifi ed. The disclosure of unclassifi ed data would not compromise confi dentiality or cause any noticeable damage.

An easy way to remember the names of the five levels of the government or military classification scheme order from least secure to most secure is with a mnemonic device: U.S. Can Stop Terrorism. Notice that the five uppercase letters represent the five named classification levels, from least secure on the left to most secure on the right (or from bottom to top in the preceding list of items).

c02.indd 21/04/2014 Page 115

116

Chapter 2

Compliance and Operational Security

The classifi cations of confi dential, secret, and top secret are collectively known or labeled as classifi ed. Often, revealing the classifi cation of data to unauthorized individuals is a violation of that data. Thus, the term classifi ed is generally used to refer to any data that is ranked above the sensitive but unclassifi ed level. All classifi ed data is exempt from the Freedom of Information Act as well as many other laws and regulations.

The U.S. military classifi cation scheme is most concerned with the sensitivity of data and focuses on the protection of confi dentiality (that is, the prevention of disclosure). You can roughly defi ne each level or label of classifi cation by the level of damage that would be caused in the event of a confi dentiality violation. Data from the top-secret level would cause grave damage to national security, whereas data from the unclassifi ed level would not cause any serious damage to national or localized security.

Commercial business/private sector classifi cation systems can vary widely, because they typically do not have to adhere to a standard or regulation. As an example, here are four possible business classifi cation levels (listed from highest to lowest security):

Confidential The highest level of classifi cation. This is used for data that is extremely sensitive and for internal use only. A signifi cant negative impact could occur for a company if confi dential data is disclosed. Sometimes the label proprietary is substituted for confi dential.

Another classification often used in the commercial business/private sector is proprietary. Proprietary data is a form of confidential information.

If proprietary data is disclosed, it can have drastic effects on an organization’s competitive edge.

Private Used for data that is of a private or personal nature and intended for internal use only. A signifi cant negative impact could occur for the company or individuals if private data is disclosed.

Confidential and private data in a commercial business/private sector classification scheme both require roughly the same level of security protection. The real difference between the two labels is that confidential data is used for company data while private data is used only for data related to individuals, such as medical data.

Sensitive Used for data that is more classifi ed than public data. A negative impact could occur for the company if sensitive data is disclosed.

Public The lowest level of classifi cation. This is used for all data that does not fi t in one of the higher classifi cations. Its disclosure does not have a serious negative impact on the organization.

A need-to-know security policy grants and restricts access by compartmentalizing resources, objects, or data in a security domain. Compartmentalized resources can be located within a larger classifi cation grouping. To gain access to compartmentalized items, c02.indd 21/04/2014 Page 116

2.6 Explain the importance of security-related awareness and training

117

the subjects (users) must obtain or prove the need to know—the necessity to have access to a resource based on assigned work tasks. Without need-to-know policies, such data is restricted from view even for users with suffi cient security clearance. This form of access control is used in mandatory access control (MAC) environments, similar to the principle of least privilege that’s used in discretionary access control (DAC) environments.

Although government/military terms and business classifi cation levels are useful, generic references also can be used. Following are some common alternative classifi cation terms.

High

High, medium, and low can be used as generic references to classifi cations rather than using the government/military terms. High is comparable to top secret.

Medium

This level is close to classifi ed in government/military terms.

Low

This level is close to unclassifi ed in government/military terms.

Confidential

Confi dential relates to the most valuable and sensitive data level in a business classifi cation scheme. See the earlier section, “Information classifi cation.”

Private

Private relates to individually related data (i.e. PII) in a business classifi cation scheme. See the earlier section, “Information classifi cation.”

Public

Public relates to the least sensitive data level in a business classifi cation scheme. See the earlier section, “Information classifi cation.”

Data labeling, handling and disposal

When discussing access to objects, three subject labels are used: user, owner, and custodian. A user is any subject who accesses objects on a system to perform some action or accomplish a work task. An owner, or information owner, is the person who has fi nal corporate responsibility for classifying and labeling objects and protecting and storing data.

The owner may be liable for negligence if they fail to perform due diligence in establishing and enforcing security policies to protect and sustain sensitive data. A custodian is a subject who has been assigned or delegated the day-to-day responsibility of properly storing and protecting objects.

Labeling as part of a classifi cation system was discussed in the previous section.

c02.indd 21/04/2014 Page 117

118

Chapter 2

Compliance and Operational Security

Security policy should dictate how printed material and used storage media are to be handled after their useful lifetime. Secure disposal and destruction of printed material often involves shredding and incineration. Secure disposal and destruction of computers typically focuses on the secure disposal and destruction of storage media; this may require incineration, physical crushing, magnetic destruction, or the use of an acid bath. After these items have been properly destroyed, they no longer pose a threat to the organization.

If a would-be intruder or attacker obtained these items after disposal and destruction, they would be unable to glean any useful information from them. In effect, proper disposal and destruction are countermeasures to dumpster diving and scavenging.

Compliance with laws, best practices, and standards

Auditing is also commonly used for compliance testing, also called compliance checking.

Verifi cation that a system complies with laws, regulations, baselines, guidelines, standards, best practices, and policies is an important part of maintaining security in any environment. Compliance testing ensures that all necessary and required elements of a security solution are properly deployed and functioning as expected. Compliance checks can take many forms, such as vulnerability scans and penetration testing. They can also use loganalysis tools to determine whether any vulnerabilities for which countermeasures have been deployed have been attempted or exploited on the system.

User habits

Implementing proper security involves the use of technology but also mandates the modifi cation of user behaviors. If personnel do not believe in and support security, they are often opposed to the best security efforts of the organization. The weakest link of any security structure is the people who work in it. Understanding that your employees either support security or are dismantling it is key to proper policy design, security implementation, and user training.

Password behaviors

Passwords are notoriously weak forms of authentication. Any environment that still relies on passwords alone is at greater risk for account compromise than organizations that have adopted stronger forms of authentication. Multifactor authentication should be seriously considered by every organization as a means to improve authentication security.

Good passwords can be crafted. However, most users revert to default or easier behaviors if left to their own devices. It is not uncommon for users—even when they are trained how to pick passwords that are strong, long, and easier to remember—to write them down, be fooled by a social engineer, or reuse the password in other environments.

Bad password behaviors also include reusing old or previous passwords; sharing passwords with co-workers, friends, or family; using a nonencrypted password storage tool; allowing passwords to be used over nonencrypted protocols; and failing to check for hardware keystroke loggers, video cameras, or shoulder-surfi ng on-lookers. Most of these poor password behaviors can be addressed with security policy, technology limitations, and user training.

c02.indd 21/04/2014 Page 118

2.6 Explain the importance of security-related awareness and training

119

Good password behaviors include selecting a passphrase of at least 15 characters, ensuring that at least 3 character types are represented (uppercase, lowercase, numbers, symbols, higher-order ASCII characters, and foreign language characters), memorizing passwords, using an encrypted password-storage tool only with authorized permission, following password-change rules, and not reusing passwords on the same or even on different systems.

Data handling

Users are also well known for failing to handle data properly. Users should be instructed where to keep data fi les. Typically, data fi les should be stored on servers that are included in the company’s backup process, rather than being stored on clients. Users should not employ removable media unless authorized and approved. Any removable media containing sensitive or valuable data should be treated with additional care to prevent loss or theft. Users should not install software in the event it is infected with malware that could steal data or otherwise compromise the network. Users should not transmit sensitive data through any nonencrypted means, including Internet email, fi le transfer, peer-to-peer fi le sharing, IM, or

VOIP collaboration tools.

Users who are allowed to take home, or otherwise use out of the offi ce, a portable computer or removable media with sensitive data should take only the minimum amount of data required to perform immediate work tasks. Any resource off of company premises is at signifi cantly greater risk of being lost or stolen. It is important to prevent entire data sets, databases, or record collections from being exposed to this unnecessary risk.

Clean-desk policies

A clean-desk policy is used to instruct workers how and why to clean off their desks at the end of each work period. In relation to security, such a policy has a primary goal of reducing disclosure of sensitive information. This can include passwords, fi nancial records, medical information, sensitive plans or schedules, and other confi dential materials. If at the end of each day/shift a worker places all work materials into a lockable desk draw or fi le cabinet, this prevents exposure, loss, and/or theft of these materials.

Prevent tailgating

Tailgating occurs when an unauthorized entity gains access to a facility under the authorization of a valid worker but without their knowledge. Tailgate prevention by users is very simple. Each and every time a user unlocks or opens a door, they should ensure that it is closed and relocked before walking away. This action alone eliminates tailgating.

A problem similar to tailgating is piggybacking. Piggybacking occurs when an unauthorized entity gains access to a facility under the authorization of a valid worker but with their knowledge. This could happen when the intruder feigns the need for assistance by holding a large box or lots of paperwork and asks someone to “hold the door.”

Users should watch out for this type of attack. When someone asks for assistance in holding open a secured door, ask for proof of their authorization or ask them to let you swipe their access card on their behalf. This reduces the chance of an outsider bluffi ng their way into your secured areas.

c02.indd 21/04/2014 Page 119

120

Chapter 2

Compliance and Operational Security

In addition to user behavior changes, mantraps, turnstiles, and security guards reduce tailgating and piggybacking signifi cantly.

Personally owned devices

When personally owned devices are allowed to enter and leave a secured facility without limitation, oversight, or control, the potential for harm is signifi cant. Most portable electronics, especially mobile phones, audio players, and digital cameras, can be used as storage devices. This can allow malicious code to be brought in or sensitive data secreted out.

Additionally, any device with a camera feature can take photographs of sensitive information or locations. A device owned by an individual can be referenced using any of these terms: portable device, mobile device, personal mobile device (PMD), personal electronic device or portable electronic device (PED), and personally owned device (POD).

New threats and new security trends/alerts

New threats are being developed by hackers on a nearly daily basis. It is an essential part of security to be aware of new threats. Performing daily research can assist you in remaining up to date. To see or track some of the concerns, security professionals can review various websites for threat information. Some useful sites of this ilk are www.exploit-db.com

, http://cve.mitre.org

, and www.us-cert.gov

. By keeping an eye on the security trends and alerts related to new zero-day compromises, you will be better prepared to respond to incidents as well as defend against them.

New viruses

Thousands of new virus and malware variations are crafted and released daily.

Fortunately, only a small portion of these are signifi cant threats. However, that is not cause to overlook the severity of the potential damage that even a single malicious code infection could cause.

Everyone needs a current antivirus scanner. This scanner should be confi gured to download updates daily on an automatic schedule. The system should be scanned fully at least once per week. The system’s activity should be monitored in real time. Although antivirus software has advanced signifi cantly in the last few years, it is still not a substitute for avoiding risky activity and controlling user behavior.

Phishing attacks

Phishing is a form of social-engineering broadcast attack focused on stealing credentials or identity information from any potential target. It is based on the concept of fi shing for information. Phishing can be waged in numerous ways using a variety of communication media, including email, the Web, live discussion forums, IM, message boards, and so on.

To defend against phishing attacks, never click any link provided to you by email or IM.

Instead, visit the supposed site by using your own preestablished bookmark or by searching c02.indd 21/04/2014 Page 120

2.6 Explain the importance of security-related awareness and training

121

for the site by name. If, after you access your account on the site, a duplicate message does not appear in your online messaging or alert system, the email or IM is likely an attack or a fake. Report it to the targeted organization, and then delete it.

Zero-day exploits

A zero-day exploit aims at exploiting fl aws or vulnerabilities in targeted systems that are unknown or undisclosed to the world in general. Zero day also implies that a direct or specifi c defense to the attack does not yet exist; thus most systems with the targeted vulnerable asset are at risk.

Many forms of malicious code take advantage of zero-day vulnerabilities—security fl aws discovered by hackers that have not been thoroughly addressed by the security community.

There are two main reasons systems are affected by these vulnerabilities. First, it may be the result of the necessary delay between the discovery of a new type of malicious code and the issuance of patches and antivirus updates. Second, it may be due to slowness in applying updates on the part of system administrators. The existence of zero-day vulnerabilities makes it vital that you have a strong patch-management program in your organization that ensures the prompt application of critical security updates. Additionally, you may wish to use a vulnerability scanner to scan your systems on a regular basis for known security issues.

Use of social networking and P2P

Using social networks and peer-to-peer (P2P) fi le-sharing services are both risky activities.

For the majority of organizations, access to these should be blocked on company networks.

Social networking sites are often more of a distraction and waste of resources than they are relevant to assigned work tasks. However, there might be a job-specifi c exception to this rule in a few circumstances.

Likewise, P2P fi le-sharing services, while they have valid, legitimate, and legal uses, are often more of a threat to a company than they are a benefi t. At least this is the case when access is broadly allowed rather than limited to network engineers who may use P2P services for obtaining updates or open source software. The risks include distribution of confi dential materials, malware infection, and consumption of network bandwidth.

Follow up and gather training metrics to validate compliance and security posture

An important part of the long-term success of a security endeavor is to follow up and gather training metrics to validate compliance and security posture. Never assume that employees understand every aspect of their jobs or how to perform their work tasks within the boundaries of security. Even with training, workers forget or choose to take shortcuts.

Monitoring work activity, providing refreshment training, and performing audits helps to assess the security compliance of personnel as well as improve the security posture of the organization as a whole.

c02.indd 21/04/2014 Page 121

122

Chapter 2

Compliance and Operational Security

Exam Essentials

Understand user awareness. User awareness is an effort to make security a common and regular thought for all employees. Unfortunately, user security awareness is generally the most overlooked element of security management. The lack of security awareness is the

primary reason social-engineering attacks succeed.

Understand security education. Education means security training, usually focused on teaching a user to perform their work tasks securely. Security education is broader and has the ultimate goal of certifi cation.

Understand the need to protect PII. Personally identifi able information (PII) is any data item that is linked back to the human from whom it was gleaned. PII that is medically related is protected under HIPAA laws. However, in the United States, most PII is not

generally protected. Companies should clearly disclose what PII is collected and how it will be used in the acceptable use policy (AUP).

Understand information classification. Classifi cation is the process of labeling objects

(assets, data, information, and so on) with sensitivity labels and subjects (users) with clearance labels. After a resource is classifi ed, the IT infrastructure and all users should read and respect the assigned label. Thus, each object receives the security it needs.

Understand data labeling, handling, and disposal. Labeling is part of a classifi cation system used to guide security, specifi cally in the areas of access, handling, and disposal.

Understand compliance with laws, best practices, and standards. Auditing is commonly used for compliance testing, also called compliance checking. Verifying that a system complies with laws, regulations, baselines, guidelines, standards, best practices, and policies is an important part of maintaining security in any environment. Compliance testing ensures that all necessary and required elements of a security solution are properly deployed and functioning as expected.

Understand user habits. Implementing proper security involves using technology but also mandates the modifi cation of user behaviors. If personnel do not believe in and support security, they are often opposed to the best security efforts of the organization. This includes addressing the issues of password behaviors, data handling, clean-desk policies, preventing tailgating, and personally owned devices.

Understand threat awareness. New threats are being developed by hackers on a nearly daily basis. It is an essential part of security to be aware of new threats. Performing daily research can help you remain up to date. Related issues include new viruses, phishing attacks, and zero-day exploits.

Understand the use of social networking and P2P. Using social networks and peer-to-peer

(P2P) fi le-sharing services are risky activities. For the majority of organizations, access to these should be blocked on company networks. Social networking sites are often more of a distraction and waste of resources than they are relevant to assigned work tasks.

c02.indd 21/04/2014 Page 122

2.7 Compare and contrast physical security and environmental controls

123

2.7 Compare and contrast physical security and environmental controls

Without physical security, there is no security. No amount or extent of logical and technical security controls can compensate for lax physical security protection. Thus, physical security controls need to be assessed and implemented in the same manner as security controls for the IT infrastructure.

Environmental controls

When you’re designing a secure facility, it’s important to keep various environmental factors in mind. These include the following:

Controlling the temperature and humidity

Minimizing smoke and airborne dust and debris

Minimizing vibrations

Preventing food and drink from being consumed near sensitive equipment

Avoiding strong magnetic fields

Managing electromagnetic and radio frequency interference

Conditioning the power supply

Managing static electricity

Providing proper fire detection and suppression

The following sections highlight some issues from these.

HVAC

Heating, ventilating, and air-conditioning (HVAC) management is important for two reasons: temperature and humidity. In the mission-critical server vault or room, the temperature should be maintained around a chosen set point to support optimal system operation. For many, the “optimal” temperature or preferred set point is in the mid-60s (degrees

Fahrenheit). However, some organizations are operating as low as 55 degrees and others are creeping upward into the low 80s. With good air-fl ow management and environmental monitoring, many companies are saving four percent to fi ve percent on their cooling bill for every 1 degree they increase their server room temperature. Throughout the organization, humidity levels should be managed to keep the relative humidity between 40 percent and 60 percent. Low humidity allows static electricity buildup, with discharges capable of damaging most electronic equipment. High humidity can allow condensation, which leads to corrosion.

c02.indd 21/04/2014 Page 123

124

Chapter 2

Compliance and Operational Security

Fire suppression

Fire is a common problem that must be addressed in the design of any facility. Electrical fi res are common causes of building fi res; they may result from overheated computer or networking equipment, or improperly managed electrical power cables and distribution nodes

(power strips).

Early fi re detection and suppression is important because the earlier the discovery, the less damage is caused to the facility and equipment. Personnel safety is always of utmost importance. However, in a dedicated, secured, mission-critical server room (often called a server

cage, server vault, or data center), the fi re-suppression system can be gas-discharge based rather than water based. A gas-discharge system removes oxygen from the air and may even suppress the chemical reaction of combustion, often without damaging computer equipment; but such systems are harmful to people. If a water-based system must be used, employ a preaction system that allows the release of the water to be turned off in the event of a false alarm.

EMI shielding

Electromagnetic interference (EMI) shielding is important for network-communication cables as well as for power-distribution cables. Generally, these two types of cables should be run in separate conduits and be isolated and shielded from each other. The strong magnetic fi elds produced by power-distribution cables can interfere with network-communication cables. If the environment is electrically noisy, it may be necessary to use shielded network cables or run them through shielding conduits.

Hot and cold aisles

Hot and cold aisles are a means of maintaining optimum operating temperature in large server rooms. The overall technique is to arrange server racks in lines separated by aisles.

Then, the airfl ow system is designed so hot, rising air is captured by air-intake vents on the ceiling, while cold air is returned in opposing aisles from either the ceiling or the fl oor. Thus, every other aisle is hot, then cold. This creates a circulating air pattern that is intended to optimize the cooling process.

Environmental monitoring

Environmental monitoring is the process of measuring and evaluating the quality of the environment within a given structure. This can focus on general or basic concerns, such as temperature, humidity, dust, smoke, and other debris. However, more advanced systems can include chemical, biological, radiological, and microbiological detectors.

Temperature and humidity controls

As mentioned in previous sections, temperature and humidity management can be addressed as part of overall HVAC management or environmental monitoring.

Physical security

Physical security is an area that is often overlooked when security for an environment is being designed. However, without physical security, there is no security. As you prepare c02.indd 21/04/2014 Page 124

2.7 Compare and contrast physical security and environmental controls

125

for the Security+ exam, don’t overlook the aspects and elements of physical security. As a security professional, you need to reduce overall opportunities for intrusions or physical security violations. This can be accomplished using various mechanisms, including prevention, deterrence, and detection.

To ensure proper physical security, you should design the layout of your physical environment with security in mind. This means you should place all equipment in locations that can be secured, and control and monitor access or entrance into those locations. Good physical security access control also recognizes that some computers and network devices are more important or mission critical than others and therefore require greater physical security protection.

Mission-critical servers and devices should be placed in dedicated equipment rooms that are secured from all possible entrance and intrusion (see Figure 2.1). These rooms shouldn’t have windows and should have fl oor-to-roof walls (rather than short walls that end at a drop ceiling). Equipment rooms should be locked at all times, and only authorized personal should ever be granted entrance. The rooms should be monitored, and all access should be logged and audited.

F I G U R E 2 .1 An example of a multilayered physical security environment

Building

Computer Center

Computer

Room

Combination

Lock

Perimeter

Security

Door

Sensor

Locked

Door

Motion Detector

Fence

Video Camera c02.indd 21/04/2014 Page 125

126

Chapter 2

Compliance and Operational Security

Physical barriers are erected to control access to a location. Some of the most basic forms of physical barriers are walls and fences. Fences are used to designate the borders of a geographic area where entrance is restricted; a high fence, the presence of barbed wire, or electrifi ed fencing all provide greater boundary protection. Walls provide protection as well, preventing entry except at designated points such as doors and windows. The stronger the wall, the more security it provides. And the greater the number of walls between the untrusted outside and the valuable assets located inside, the greater the level of physical security.

Hardware locks

Although you need walls and fences to protect boundaries, there must be a means for authorized personnel to cross these barriers into the secured environment. Doors and gates can be locked and controlled in such a way that only authorized people can unlock and/or enter through them. Such control can take the form of a lock with a key that only authorized people possess.

Hardware locks, conventional locks, and even electronic or smart locks are used to keep specifi c doors or other access portals closed and prevent entry or access to all but authorized individuals. With the risks of lock picking and bumping, locks resistant to such attacks must be used whenever valuable assets are to be protected from tampering or theft.

Doors used to control entrance into secured areas can be protected by locks that are keyed to biometrics. A biometric lock requires that the person present a biometric factor, such as a fi nger, a hand, or a retina to the scanner, which in turn transmits the fi ngerprint, hand, or retina scan to the validation mechanism. Only after the biometric is verifi ed is the door unlocked and the person allowed entry. When biometrics are used to control entrance into secured areas, they serve as a mechanism of identity proofi ng as well as authentication.

However, door access systems need not be exclusively biometric. Smart cards and even traditional metal keys can function as authentication factors for physical entry points.

Many door access systems, whether supporting biometrics, smart cards, or even PINs, are designed around the electronic access control (EAC) concept. An EAC system is a doorlocking and -access mechanism that uses an electromagnet to keep a door closed, a reader to accept access credentials, and a door-close spring and sensor to ensure that the door recloses within a reasonable timeframe.

Mantraps

Some high-value or high-security environments may also employ mantraps as a means to control access to the most secured, dangerous, or valuable areas of a facility. A mantrap is a form of high-security barrier entrance device (see Figure 2.2). It’s a small room with two doors: one in the trusted environment and one opening to the outside. The mantrap works like this:

1.

A person enters the mantrap.

2.

Both doors are locked.

3.

The person must properly authenticate to unlock the inner door to gain entry. If the authentication fails, security personnel are notified, and the intruder is detained in the mantrap.

c02.indd 21/04/2014 Page 126

2.7 Compare and contrast physical security and environmental controls

127

F I G U R E 2 . 2 A mantrap

Computer

Room

Locked Doors

Remotely Activated

Mantrap

Guard

Station

Hallway

Mantraps often contain scales and cameras in order to prevent piggybacking.

Piggybacking occurs when one person authenticates, opens a door, and lets another person enter without that second person authenticating to the system.

Video surveillance

Video surveillance, video monitoring, closed-circuit television (CCTV), and security cameras are all means to deter unwanted activity and record the occurrence of events. Cameras should be positioned to watch exit and entry points along any change in authorization level—for example, doors allowing entry into a facility from outside, doors allowing entry into work areas from common areas, and doors allowing entry into high-security areas from work areas. Cameras should also be used to monitor activities around valuable assets and resources, such as server rooms, safes, vaults, and component closets, as well as to provide additional protection in public areas such as parking structures and walkways.

Cameras should be confi gured to record to storage media. This has traditionally been some sort of tape, such as VCR tape. However, modern systems may record to DVD,

NVRAM, or hard drives and may do so over a wired or even an encrypted wireless connection.

Cameras vary in type. Typical security cameras operate by recording visible-light images and often require additional lighting in low-light areas. Alternative camera types include those that only record when motion is detected, those that are able to record in infrared, and those that can automatically track movement.

Video records may be used to detect policy violations, track personnel movements, or capture an intruder on fi lm. Video recordings should be monitored in real time or reviewed on a periodic basis in order to provide a detective benefi t. Just the visible presence of video cameras can provide a deterrent effect to would-be perpetrators.

Fencing

A fence is a perimeter-defi ning device. Fences are used to clearly differentiate between areas that are under a specifi c level of security protection and those that aren’t. Fencing can include a wide range of components, materials, and construction methods. It can consist of c02.indd 21/04/2014 Page 127

128

Chapter 2

Compliance and Operational Security stripes painted on the ground, chain-link fences, barbed wire, concrete walls, or invisible perimeters that use laser, motion, or heat detectors. Various types of fences are effective against different types of intruders:

Fences 3 to 4 feet high deter casual trespassers.

Fences 6 to 7 feet high are too hard to climb easily and deter most intruders except determined ones.

Fences 8 or more feet high with three strands of barbed wire deter even determined intruders.

A gate is a controlled exit and entry point in a fence. The deterrent level of a gate must be equivalent to the deterrent level of the fence to sustain the effectiveness of the fence as a whole. Hinges and locking/closing mechanisms should be hardened against tampering, destruction, or removal. When a gate is closed, it should not offer any additional access vulnerabilities. Keep the number of gates to a minimum. They can be manned by guards, or not. When they’re not protected by guards, the use of dogs or electronic monitoring is recommended.

Proximity readers

In addition to smart and dumb cards, proximity readers can be used to control physical access. A proximity reader can be a passive device, a fi eld-powered device, or a transponder. The proximity device is worn or held by the authorized bearer. When it passes a proximity reader, the reader is able to determine who the bearer is and whether they have authorized access. A passive device refl ects or otherwise alters the electromagnetic fi eld generated by the reader. This alteration is detected by the reader.

The passive device has no active electronics; it is just a small magnet with specifi c properties (like antitheft devices commonly found on DVDs). A fi eld-powered device has electronics that activate when the device enters the electromagnetic (EM) fi eld that the reader generates. Such devices generate electricity from an EM fi eld to power themselves

(such as card readers that only require the access card be waved within inches of the reader to unlock doors). A transponder device is self-powered and transmits a signal received by the reader. This can occur consistently or only at the press of a button (like a garage door opener or car alarm key fob).

In addition to smart/dumb cards and proximity readers, physical access can be managed with radio frequency identifi cation (RFID) or biometric access-control devices.

Access list

The presence of security guards at an entrance or around the perimeter of a security boundary serves as a deterrent to intruders and provides a form of physical barrier. Guard dogs can also protect against intrusion by detecting the presence of unauthorized visitors.

A security guard can check each person’s credentials before granting entry. You can also use a biometrically controlled door. In either entrance-control system, a log or list of entries and exits, along with visitors and escorts, can be maintained. Such a log will assist c02.indd 21/04/2014 Page 128

2.7 Compare and contrast physical security and environmental controls

129

in tracking down suspects or verifying that all personnel are accounted for in the event of an emergency.

In the realm of physical security, access controls are mechanisms designed to manage and control entrance into a location such as a building, a parking lot, a room, or even a specifi c box or server rack. Being able to control who can gain physical proximity to your environment (especially your computers and networking equipment) lets you provide true security for your data, assets, and other resources.

One method to control access is to issue each valid worker an ID badge that can serve as either a simple photo ID or an electronic smart card. A photo ID requires a security guard to view, discriminate, and then grant or deny access. In this process, the security guard can also add the name and action to an access roster. A smart card can be used with an automated system that can electronically unlock and even open doors when a valid smart card is swiped. Smart-card use is also easy to log and monitor. Additionally, the same smart card used for facility access can also serve as a photo ID as well as an authentication factor for accessing the company network.

Proper lighting

Lighting is a commonly used form of perimeter security control. The primary purpose of lighting is to discourage casual intruders, trespassers, prowlers, or would-be thieves who would rather perform their misdeeds in the dark, such as vandalism, theft, and loitering.

However, lighting is not a strong deterrent. It should not be used as the primary or sole protection mechanism except in areas with a low threat level.

Lighting should be combined with guards, dogs, CCTV, or some other form of intrusion detection or surveillance mechanism. Lighting must not cause a nuisance or problem for nearby residents, roads, railways, airports, and so on. It should also never cause glare or a refl ective distraction to guards, dogs, and monitoring equipment, which could otherwise aid attackers during break-in attempts.

Signs

Signs can be used to declare areas as off limits to those who are not authorized, indicate that security cameras are in use, and disclose safety warnings. Signs are useful in deterring minor criminal activity, establishing a basis for recording events, and guiding people into compliance or adherence with rules or safety precautions.

Guards

All physical security controls, whether static deterrents or active detection and surveillance mechanisms, ultimately rely on personnel to intervene and stop actual intrusions and attacks.

Security guards exist to fulfi ll this need. Guards can be posted around a perimeter or inside to monitor access points or watch detection and surveillance monitors. The real benefi t of guards is that they are able to adapt and react to various conditions or situations. Guards can learn and recognize attack and intrusion activities and patterns, can adjust to a changing environment, and can make decisions and judgment calls. Security guards are often an appropriate security control when immediate situation handling and decision making onsite is necessary. c02.indd 21/04/2014 Page 129

130

Chapter 2

Compliance and Operational Security

Unfortunately, using security guards is not a perfect solution. There are numerous disadvantages to deploying, maintaining, and relying on security guards. Not all environments and facilities support security guards. This may be because of actual human incompatibility or the layout, design, location, and construction of the facility. Not all security guards are themselves reliable. Prescreening, bonding, and training do not guarantee that you won’t end up with an ineffective or unreliable security guard.

Even if a guard is initially reliable, guards are subject to physical injury and illness, take vacations, can become distracted, and are vulnerable to social engineering. In addition, security guards usually offer protection only up to the point at which their life is endangered. Security guards are usually unaware of the scope of the operations in a facility and therefore are not thoroughly equipped to know how to respond to every situation. Finally, security guards are expensive.

Barricades

Barricades, in addition to fencing (discussed earlier), are used to control both foot traffi c and vehicles. K-rails (often seen during road construction), large planters, zigzag queues, bollards, and tire shredders are all examples of barricades. When used properly, they can control crowds and prevent vehicles from being used to cause damage to your building.

Biometrics

Biometrics is the identifi cation and/or authentication mechanism used to identify people by their physical characteristics or traits. See Chapter 5, subsection 5.2, for detailed information on biometrics.

Protected distribution (cabling)

Protected distribution or protective distribution systems (PDSs) are the means by which cables are protected against unauthorized access or harm. The goals of PDSs are to deter violations, detect access attempts, and otherwise prevent compromise of cables. Elements of PDS implementation can include protective conduits, sealed connections, and regular human inspections. Some implementations of PDSs require intrusion or compromise detection within the conduits.

Alarms

IDSs are systems—automated or manual—designed to detect an attempted intrusion, breach, or attack; the use of an unauthorized entry point; or the occurrence of some specifi c event at an unauthorized or abnormal time. IDSs used to monitor physical activity may include security guards, automated access controls, and motion detectors as well as other specialty monitoring techniques.

Physical IDSs, also called burglar alarms, detect unauthorized activities and notify the authorities (internal security or external law enforcement). The most common type of system uses a simple circuit (aka dry contact switch) consisting of foil tape in entrance points to detect when a door or window has been opened.

c02.indd 21/04/2014 Page 130

2.7 Compare and contrast physical security and environmental controls

131

An intrusion detection mechanism is useful only if it is connected to an intrusion alarm.

An intrusion alarm notifi es authorities about a breach of physical security.

Two aspects of any intrusion detection and alarm system can cause it to fail: how it gets its power and how it communicates. If the system loses power, the alarm will not function.

Thus, a reliable detection and alarm system has a battery backup with enough stored power for 24 hours of operation.

If communication lines are cut, an alarm may not function, and security personnel and emergency services will not be notifi ed. Thus, a reliable detection and alarm system incorporates a heartbeat sensor for line supervision. A heartbeat sensor is a mechanism by which the communication pathway is either constantly or periodically checked with a test signal.

If the receiving station detects a failed heartbeat signal, the alarm triggers automatically.

Both measures are designed to prevent intruders from circumventing the detection and alarm system.

Whenever a motion detector registers a signifi cant or meaningful change in the environment, it triggers an alarm. An alarm is a separate mechanism that triggers a deterrent, a repellent, and/or a notifi cation:

Deterrent Alarms Alarms that trigger deterrents may engage additional locks, shut doors, and so on. The goal of such an alarm is to make further intrusion or attack more diffi cult.

Repellant Alarms Alarms that trigger repellants usually sound an audio siren or bell and turn on lights. These kinds of alarms are used to discourage intruders or attackers from continuing their malicious or trespassing activities and force them off the premises.

Notification Alarms Alarms that trigger notifi cation are often silent from the intruder/ attacker perspective but record data about the incident and notify administrators, security guards, and law enforcement. A recording of an incident can take the form of log fi les and/ or CCTV tapes. The purpose of a silent alarm is to bring authorized security personnel to the location of the intrusion or attack in hopes of catching the person(s) committing the unwanted or unauthorized acts.

Alarms are also categorized by where they are located:

Local Alarm System Local alarm systems must broadcast an audible (up to 120 decibel

[db]) alarm signal that can be easily heard up to 400 feet away. Additionally, they must be protected from tampering and disablement, usually by security guards. For a local alarm system to be effective, a security team or guards must be positioned nearby who can respond when the alarm is triggered.

Central Station System The alarm is usually silent locally, but offsite monitoring agents are notifi ed so they can respond to the security breach. Most residential security systems are of this type. Most central station systems are well-known or national security companies, such as Brinks and ADT. A proprietary system is similar to a central station system, but the host organization has its own onsite security staff waiting to respond to security breaches.

Auxiliary Station System Alarm systems can be added to either local or centralized alarm systems. When the security perimeter is breached, emergency services are notifi ed to respond to the incident at the location. This could include fi re, police, and medical services. c02.indd 21/04/2014 Page 131

132

Chapter 2

Compliance and Operational Security

Two or more of these types of intrusion and alarm systems can be incorporated in a single solution.

Motion detection

A motion detector, or motion sensor, is a device that senses movement or sound in a specifi c area. Many types of motion detectors exist, including infrared, heat, wave pattern, capacitance, photoelectric, and passive audio:

An infrared motion detector monitors for significant or meaningful changes in the infrared lighting pattern of a monitored area.

A heat-based motion detector monitors for significant or meaningful changes in the heat levels and patterns in a monitored area.

A wave-pattern motion detector transmits a consistent low-frequency ultrasonic or high-frequency microwave signal into a monitored area and monitors for significant or meaningful changes or disturbances in the reflected pattern.

A capacitance motion detector senses changes in the electrical or magnetic field surrounding a monitored object.

A photoelectric motion detector senses changes in visible light levels for the monitored area. Photoelectric motion detectors are usually deployed in internal rooms that have no windows and are kept dark.

A passive audio motion detector listens for abnormal sounds in the monitored area.

The proper technology of motion detection should be selected for the environment where it will be deployed, in order to minimize false positives and false negatives.

Control types

The term access control refers to a broad range of controls that perform such tasks as ensuring that only authorized users can log on and preventing unauthorized users from gaining access to resources. Controls mitigate a wide variety of information security risks.

Whenever possible, you want to prevent any type of security problem or incident.

Of course, this isn’t always possible, and unwanted events occur. When they do, you want to detect the events as soon as possible. And once you detect an event, you want to

correct it.

As you read the control descriptions, notice that some are listed as examples of more than one access-control type. For example, a fence (or perimeter-defi ning device) placed around a building can be a preventive control (physically barring someone from gaining access to a building compound) and/or a deterrent control (discouraging someone from

trying to gain access). c02.indd 21/04/2014 Page 132

Control types

133

Deterrent

A deterrent access control is deployed to discourage violation of security policies. Deterrent and preventive controls are similar, but deterrent controls often depend on individuals deciding not to take an unwanted action. In contrast, a preventive control actually blocks the action. Some examples include policies, security-awareness training, locks, fences, security badges, guards, mantraps, and security cameras.

Preventive

A preventive access control (or a preventative access control) is deployed to thwart or stop unwanted or unauthorized activity from occurring. Examples of preventive access controls include fences, locks, biometrics, mantraps, lighting, alarm systems, separation of duties, job rotation, data classifi cation, penetration testing, access-control methods, encryption, auditing, presence of security cameras or CCTV, smart cards, callback procedures, security policies, security-awareness training, antivirus software, fi rewalls, and IPSs.

Detective

A detective access control is deployed to discover or detect unwanted or unauthorized activity. Detective controls operate after the fact and can discover the activity only after it has occurred. Examples of detective access controls include security guards, motion detectors, recording and reviewing of events captured by security cameras or CCTV, job rotation, mandatory vacations, audit trails, honeypots or honeynets, IDSs, violation reports, supervision and reviews of users, and incident investigations.

Compensating

A compensation access control is deployed to provide various options to other existing controls to aid in enforcement and support of security policies. They can be any controls used in addition to, or in place of, another control. For example, an organizational policy may dictate that all PII must be encrypted. A review discovers that a preventive control is encrypting all PII data in databases, but PII transferred over the network is sent in cleartext. A compensation control can be added to protect the data in transit.

Additional categories of security control include corrective, recovery, and directive.

A corrective access control modifi es the environment to return systems to normal after an unwanted or unauthorized activity has occurred. It attempts to correct any problems that occurred as a result of a security incident. Corrective controls can be simple, such as terminating malicious activity or rebooting a system. They also include antivirus solutions that can remove or quarantine a virus, backup and restore plans to ensure that lost data can be restored, and active IDs that can modify the environment to stop an attack in progress. The access control is deployed to repair or restore resources, functions, and capabilities after a violation of security policies.

Recovery controls are an extension of corrective controls but have more advanced or complex abilities. Examples of recovery access controls include backups and restores, c02.indd 21/04/2014 Page 133

134

Chapter 2

Compliance and Operational Security fault-tolerant drive systems, system imaging, server clustering, antivirus software, and database or virtual machine shadowing.

A directive access control is deployed to direct, confi ne, or control the actions of subjects to force or encourage compliance with security policies. Examples of directive access controls include security policy requirements or criteria, posted notifi cations, escape route exit signs, monitoring, supervision, and procedures.

Technical

Controls can be implemented administratively, logically/technically, or physically.

Any of the access control types mentioned previously can include any of these types of implementation.

Technical or logical access involves the hardware or software mechanisms used to manage access and to provide protection for resources and systems. As the name implies, it uses technology. Examples of logical or technical access controls include authentication methods

(such as usernames, passwords, smart cards, and biometrics), encryption, constrained interfaces, access control lists, protocols, fi rewalls, routers, IDSs, and clipping levels.

Administrative

Administrative access controls are the policies and procedures defi ned by an organization’s security policy and other regulations or requirements. They are sometimes referred to as management controls. These controls focus on personnel and business practices. Examples of administrative access controls include policies, procedures, hiring practices, background checks, data classifi cations and labeling, security awareness and training efforts, vacation history, reports and reviews, work supervision, personnel controls, and testing.

Another type of control is physical. Physical access controls are items you can physically touch. They include physical mechanisms deployed to prevent, monitor, or detect direct contact with systems or areas within a facility. Examples of physical access controls include guards, fences, motion detectors, locked doors, sealed windows, lights, cable protection, laptop locks, badges, swipe cards, guard dogs, video cameras, mantraps, and alarms.

Exam Essentials

Understand humidity management. Throughout the organization, humidity levels should be managed to keep the relative humidity between 40 percent and 60 percent. Low humidity allows static electricity buildup, with discharges capable of damaging most electronic equipment. High humidity can allow condensation, which leads to corrosion.

Understand fire suppression. Early fi re detection and suppression is important because the earlier the discovery, the less damage will be caused to the facility and equipment.

Personnel safety is always of utmost importance.

Understand shielding. Shielding is used to restrict or control interference from electromagnetic or radio frequency disturbances. This can include using shielded cabling or cabling that is resistant to interference, or running cables through shielded conduits.

c02.indd 21/04/2014 Page 134

2.8 Summarize risk-management best practices

135

Understand hot and cold aisles. Hot and cold aisles are a means of maintaining optimum operating temperature in large server rooms.

Understand environmental monitoring. Environmental monitoring is the process of measuring and evaluating the quality of the environment within a given structure.

Understand physical access control. Physical access control refers to mechanisms designed to manage and control entrance into a location. Being able to control who can gain physical proximity to your environment (especially your computers and networking equipment) allows you to provide true security for your data, assets, and other resources. Without physical access control, you have no security.

Understand mantraps. A mantrap is a form of high-security barrier entrance device. It’s a small room with two doors: one to the trusted environment and one to the outside. A person must properly authenticate to unlock the inner door and gain entry.

Understand proximity readers. Proximity readers can be used to control physical access.

A proximity reader can be a passive device, a fi eld-powered device, or a transponder.

Understand alarms. Physical IDSs, also called burglar alarms, detect unauthorized activities and notify the authorities (internal security or external law enforcement).

Understand control types. The term access control refers to a broad range of controls that perform such tasks as ensuring that only authorized users can log on and preventing unauthorized users from gaining access to resources. Control types include preventive, detective, corrective, deterrent, recovery, directive, and compensation. Controls can also be categorized by how they are implemented: administrative, logical, or physical.

2.8 Summarize risk-management best practices

A risk is the possibility or likelihood that a threat will exploit a vulnerability, resulting in a loss such as harm to an asset. A threat is a potential occurrence that can be caused by anything or anyone and can result in an undesirable outcome. Natural occurrences such as fl oods and earthquakes, accidental acts by employees, and intentional attacks can all be threats to an organization. A vulnerability is any type of weakness. The weakness can be due to, for example, a fl aw, a limitation, or the absence of a security control.

Risk management attempts to reduce or eliminate vulnerabilities or reduce the impact of potential threats by implementing controls or countermeasures. It is not possible, or desirable, to eliminate risk. Instead, an organization focuses on reducing the risks that can cause the most harm. Understanding risk-management concepts is essential to the establishment of a suffi cient security stance, proper security governance, and legal proof of due care and due diligence.

c02.indd 21/04/2014 Page 135

136

Chapter 2

Compliance and Operational Security

Managing risk is therefore an element of sustaining a secure environment. Risk management is a detailed process of identifying factors that could damage or disclose data, evaluating those factors in light of data value and countermeasure cost, and implementing cost-effective solutions for mitigating or reducing risk. The overall process of risk management is used to develop and implement information security strategies. The goal of these strategies is to reduce risk and to support the mission of the organization.

The primary goal of risk management is to reduce risk to an acceptable level. What that level is depends on the organization, the value of its assets, the size of its budget, and many other factors. What is deemed acceptable risk to one organization may be an unreasonably high level of risk to another. It is impossible to design and deploy a totally risk-free environment; however, signifi cant risk reduction is possible, often with little effort.

Risks to an IT infrastructure are not all computer based. In fact, many risks come from non-computer sources. It is important to consider all possible risks when performing risk evaluation for an organization. Failing to properly evaluate and respond to all forms of risk leaves a company vulnerable. Keep in mind that IT security, commonly referred to as logi-

cal or technical security, can provide protection only against logical or technical attacks.

To protect IT against physical attacks, physical protections must be erected.

The process by which the goals of risk management are achieved is known as risk analy-

sis. It includes examining an environment for risks, evaluating each threat event as to its likelihood of occurring and the cost of the damage it would cause if it did occur, assessing the cost of various countermeasures for each risk, and creating a cost/benefi t report for safeguards to present to upper management. In addition to these risk-focused activities, risk management also requires evaluation, assessment, and the assignment of value for all assets within the organization. Without proper asset valuations, it is not possible to prioritize and compare risks with possible losses.

Business continuity concepts

Disaster-recovery planning and procedures enable an organization to maintain or recover its mission-critical processes in spite of events that threaten its infrastructure. Maintaining business continuity means maintaining the organization’s networking and IT infrastructure so that mission-critical functions continue to operate. This must be done in spite of reduced resources and damaged equipment. As long as business operations aren’t stopped, business continuity is used to sustain the organization. If business operations are stopped, disaster recovery takes over.

Business impact analysis

Business impact analysis (BIA) is the process of performing risk assessment on business tasks and processes rather than on assets. Please review the earlier sections in this chapter on risk calculation and other risk assessment/management topics.

The purpose of BIA is to determine the risks to business processes and design protective and recovery solutions. The goal is to maintain business continuity, prevent and/or minimize downtime, and prepare for fast recovery and restoration in the event of a disaster.

c02.indd 21/04/2014 Page 136

2.8 Summarize risk-management best practices

137

The BIA identifi es resources that are critical to an organization’s ongoing viability and the threats posed to those resources. It also assesses the likelihood that each threat will actually occur and the impact those occurrences would have on the business. The results of this analysis provide you with quantitative measures that can help you prioritize the commitment of business continuity resources to the various risks your organization faces.

Identification of critical systems and components

In the process of evaluating risk and determining the best response to risk, the critical

elements of an organization need to be identifi ed. Mission-critical functions or tasks are the core components of an organization. Without the mission-critical operations, the organization would cease to exist. The most critical systems and components are identifi ed via the

BIA process. BIA is effectively the same process as risk assessment. The only signifi cant difference is that risk assessment focuses on assets, whereas BIA focuses on business tasks. For each business task, an ALE is calculated. The processes, systems, or components that have the largest ALE are the most critical elements to the organization.

Removing single points of failure

A single point of failure is any individual or sole device, connection, or pathway that is moderately to mission-critically important to the organization. If that one item fails, the whole organization suffers loss. Infrastructures should be designed with redundancies of all moderately or highly important elements in order to avoid single points of failure.

Removing single points of failure means adding redundancy, recovery options, or alternative means to perform business tasks and processes.

Business continuity planning and testing

Despite our best wishes, disasters of one form or another eventually strike every organization. Whether it’s a natural disaster such as a hurricane or earthquake or a manmade calamity such as a building fi re or burst water pipes, every organization encounters events that threaten their very existence. Strong organizations have plans and procedures in place to help mitigate the effects a disaster has on their continuing operations and to speed the return to normal operations.

Business continuity planning (BCP) involves assessing a variety of risks to organizational processes and creating policies, plans, and procedures to minimize the impact those risks might have on the organization if they were to occur. BCP is used to maintain the continuous operation of a business in the event of an emergency situation. The goal of BCP planners is to implement a combination of policies, procedures, and processes such that a potentially disruptive event has as little impact on the business as possible.

BCP focuses on maintaining business operations with reduced or restricted infrastructure capabilities or resources. As long as the continuity of the organization’s ability to perform its mission-critical work tasks is maintained, BCP can be used to manage and restore the environment. If the continuity is broken, then business processes have stopped, and the organization is in disaster mode; thus, disaster-recovery planning (DRP) takes over.

c02.indd 21/04/2014 Page 137

138

Chapter 2

Compliance and Operational Security

The top priority of BCP and DRP is always people. The primary concern is to get people out of harm’s way; then you can address IT recovery and restoration issues.

You should understand the distinction between business continuity planning and disaster recovery planning. One easy way to remember the difference is that BCP comes fi rst, and if the BCP efforts fail, DRP steps in to fi ll the gap.

Many industries are bound by federal, state, and local laws or regulations that require them to implement various degrees of BCP. We’ve already discussed one example in this chapter—the offi cers and directors of publicly traded fi rms have a fi duciary responsibility to exercise due diligence in the execution of their business-continuity duties. In other circumstances, the requirements (and consequences of failure) may be more severe. Emergency services, such as police, fi re, and emergency medical operations, have a responsibility to the community to continue operations in the event of a disaster. Indeed, their services become even more critical in an emergency when public safety is threatened. Failure on their part to implement a solid BCP could result in the loss of life and/or property and the decreased confi dence of the population in their government.

Risk assessment

Risk assessment is an initial and then repeated process of evaluating assets, threats, and risks in order to guide the crafting of a security policy. See the full discussion of risk assessment in the earlier section, “2.1 Explain the importance of risk-related concepts.”

Continuity of operations

Availability is the assurance of suffi cient bandwidth and timely access to resources.

High availability means the availability of a system has been secured to offer very reliable assurance that the system will be online, active, and able to respond to requests in a timely manner, and that there will be suffi cient bandwidth to accomplish requested tasks in the time required. Both of these concerns are central to maintaining continuity of operations.

High availability is a form of fault tolerance—or, rather, a benefi t of providing reliable fault tolerance. Fault tolerance is the ability of a network, system, or computer to withstand a certain level of failures, faults, or problems and continue to provide reliable service.

Fault tolerance is also a means of avoiding single points of failure. As mentioned earlier, a single point of failure is any system, software, or device that is mission critical to the entire environment: If that one element fails, then the entire environment fails. Your environments should be designed with redundancy so that there are no single points of failure. Such a redundant design is fault tolerant.

Another example of a high-availability solution is server clustering (see Figure 2.3).

Server clustering is a technology that connects several duplicate systems together so they act cooperatively. If one system in a cluster fails, the other systems take over its workload.

From a user’s perspective, the cluster is a single entity with a single resource access name.

c02.indd 21/04/2014 Page 138

2.8 Summarize risk-management best practices

139

F I G U R E 2 . 3 Server clustering

Server

Server Server

Server

Disaster recovery

DRP is an essential element of an overall security-management plan. Disaster recovery is an expansion of BCP. Basically, when business continuity is interrupted, a disaster has occurred. Ultimately, both BCP and DRP rely on proper backup procedures.

A disaster-recovery plan is the collection of detailed procedures used in the event that business functions are interrupted by a signifi cant damaging event. When the primary site is unable to support business functions, the disaster recovery plan is initiated. This plan outlines the procedures for getting the mission-critical functions of the business up and running at an alternate site while the primary site is restored to normal operations.

A disaster-recovery plan is developed through critical process inventory and prioritization, a risk analysis and assessment process, and a detailed examination of dependencies of resources.

The overall disaster-recovery plan should include plan maintenance and distribution of revisions. Over time, as the environment changes, the disaster recovery plan should be adjusted to comply with those changes. After the plan has been altered to a specifi ed change level (amount of change), it must be redistributed throughout the organization. Only the most current version of the plan should be in existence: All older copies of the plan should be destroyed.

You should consider the implications of your facility’s location: For example, what is the local crime rate? What is your proximity to highways? How close are emergency services?

Is the area in a fl ood zone, subject to earthquakes, or liable to experience excessive rain or snow? Knowledge of these characteristics assists in the planning and design of the facility, as well as the selection of the location.

After a plan has been developed and implemented in an organization, it is important to regularly exercise or drill the plan. Just like a fi re drill, drilling and exercising a c02.indd 21/04/2014 Page 139

140

Chapter 2

Compliance and Operational Security disaster-recovery plan helps train personnel on what to do in an emergency and reveals any oversights or omissions. Disaster-recovery exercises are important maintenance elements that are essential to the long-term success of an organization.

BCP and DRP consists of the following elements:

Risk Analysis and Assessment This element includes itemizing the risks to each missioncritical aspect of the organization, and then performing qualitative and quantitative analyses of the risks to determine which risk is the most critical.

Business Impact Analysis You must determine how much any individually realized risk will negatively affect the business’s continuity and also compute the maximum tolerable downtime.

Strategic Planning for Mitigation of Risks You need to determine what countermeasures, safeguards, or responses can be used to minimize the effect of risks.

Integration and Validation of the Plan This step includes putting the plan into practice in the daily work habits of users, integrating it into the security policy, and validating it through senior management approval and testing.

Training and Awareness The organization needs to properly train users on their responses and responsibilities in an emergency and maintain awareness between training periods.

Maintenance and Auditing of the Plan You must regularly update the plan as the environment changes and constantly monitor the environment, the plan itself, testing, and training of the plan for areas where it can be improved.

IT contingency planning

IT contingency planning is a plan focused on the protection and/or recovery of an IT infrastructure. It is usually part of BCP or DRP, although separate plans for IT can be crafted. IT contingency planning focuses on providing alternate means to provide IT services in the event of a disaster. These plans can include backups as well as alternate/secondary/backup processing locations. These topics are discussed in the later section, “Disaster recovery concepts.”

Succession planning

Succession planning is the process of identifying and preparing specifi c people, usually existing personnel, who will be called on to replace those in key leadership positions. The replacement may be planned due to a known retirement date, a scheduled company departure, or an unexpected event (such as prolonged sickness). For the long-term success of an organization using succession planning, focused training and development of the future replacements is essential.

High availability

Maintaining an onsite stash of spare parts can reduce downtime. Having an in-house supply of critical parts, devices, media, and so on enables fast repair and function restoration. A replacement part can then be ordered from the vendor and returned to the onsite c02.indd 21/04/2014 Page 140

2.8 Summarize risk-management best practices

141

spare-parts storage. Unexpected downtime due to hardware failure is a common cause of loss of availability. Planning for faster repairs improves uptime and eliminates lengthy downtimes caused by delayed shipping from vendors.

In order to fully avoid single points of failure, every communication pathway should be redundant. Thus, every link from the LAN to a carrier network or ISP should be duplicated. This can be accomplished by leasing two lines from the same ISP (which is the most basic form of redundant connection) or from different ISPs. The use of redundant ISPs reduces the likelihood that a failure at a single ISP will cause your organization signifi cant connectivity downtime. However, the best redundant ISP confi guration requires the two (or more) selected ISPs to use distinct Internet or network backbones.

Power is an essential utility for any organization, but especially those dependent on their

IT infrastructure. In addition to basic elements such as power conditioners and UPS devices, many organizations opt for an onsite backup generator to provide power during complete blackouts. A variety of backup generators are available, in terms of both size and fuel.

An uninterruptible power supply (UPS) is an essential element of any computing environment. A UPS provides several important services and features. First, a UPS is a power conditioner to ensure that only clean, pure, nonfl uctuating power is fed to computer equipment. Second, in the event of a loss of power, the internal battery can provide power for a short period of time. The larger the battery, the longer the UPS can provide power. Third, when the battery reaches the end of its charge, it can signal the computer system to initiate a graceful shutdown in order to prevent data loss.

Redundancy

Redundancy is the implementation of secondary or alternate solutions. Commonly, redundancy refers to having alternate means to perform work tasks or accomplish IT functions.

Redundancy helps reduce single points of failure and improves fault tolerance. When there are multiple pathways, copies, devices, and so on, there is reduced likelihood of downtime when something fails.

When backup systems or redundant servers exist, there needs to be a means by which you can switch over to the backup in the event the primary system is compromised or fails.

Rollover, or failover, means redirecting workload or traffi c to a backup system when the primary system fails. Rollover can be automatic or manual. Manual rollover, also known as

cold rollover, requires an administrator to perform some change in software or hardware confi guration to switch the traffi c load over from the down primary to a secondary server.

With automatic rollover, also known as hot rollover, the switch from primary to secondary system is performed automatically as soon as a problem is encountered. Failsecure, failsafe, and failsoft are terms related to these issues. A system that is failsecure is able to resort to a secure state when an error or security violation is encountered. Failsafe is a similar feature, but human safety is protected in the event of a system failure. However, these two terms are often used interchangeably to mean a system that is secure after a failure. Failsoft describes a refi nement of the failsecure capability: Only the portion of a system that encountered or experienced the failure or security breach is disabled or secured, while the rest of the system continues to function normally.

c02.indd 21/04/2014 Page 141

142

Chapter 2

Compliance and Operational Security

The insecure inverse of these is the failopen response. With a failopen result, all defenses or preventions are disabled or retracted. Thus, a door defaults to being unlocked or even wide open, and electric security defaults to open, unlimited access.

Tabletop exercises

A tabletop exercise is a discussion meeting focused on a potential emergency event. It is usually performed verbally or with minimal visual aids (blueprints, charts, or board game miniatures representing resources). It is a means to walk through and evaluate an emergency plan in a stress-free environment. A tabletop exercise is also known as a structured

walkthrough. A group can discuss the steps of an emergency response or recovery plan in order to clarify roles, assess responsibilities, detect defi ciencies, address oversights, and conceive of alternative options.

Fault tolerance

Fault tolerance is the ability of a system to smoothly handle or respond to failure. This can include software, hardware, or power failure.

Hardware

Any element in your IT infrastructure, component in your physical environment, or person on your staff can be a single point of failure. As explained previously, a single point of failure is any element—such as a device, service, protocol, or communication link—that would cause total or signifi cant downtime if compromised, violated, or destroyed, affecting the ability of members of your organization to perform essential work tasks. To avoid single points of failure, you should design your networks and your physical environment with redundancy and backups by doing such things as deploying dual network backbones. By using systems, devices, and solutions with fault-tolerant capabilities, you improve resistance to single-point-of-failure vulnerabilities. Taking steps to establish a way to provide alternate processing, failover capabilities, and quick recovery also helps avoid single points of failure.

RAID

One example of a high-availability solution is a redundant array of independent disks

(RAID). A RAID solution employs multiple hard drives in a single storage volume, as illustrated in Figure 2.4. RAID 0 provides performance improvement but not fault tolerance.

RAID 0, also known as striping, uses multiple drives as a single volume. RAID 1 provides

mirroring, meaning the data written to one drive is exactly duplicated to a second drive in real time. RAID 5 provides striping with parity: three or more drives are used in unison, and one drive’s worth of space is consumed with parity information. The parity information is stored across all drives. If any one drive of a RAID 5 volume fails, the parity information is used to rebuild the contents of the lost drive on the fl y. A new drive can replace the failed drive, and the RAID 5 system rebuilds the contents of the lost drive onto the replacement drive. RAID 5 can only support the failure of one disk drive.

c02.indd 21/04/2014 Page 142

2.8 Summarize risk-management best practices

143

F I G U R E 2 . 4 Examples of RAID implementations

RAID 0

One Drive

RAID 1

Primary

Drive

Mirror

Drive

RAID 5

A

Parity C

B

Parity A

C

Parity B

Clustering

Another type of redundancy related to servers is clustering. Clustering means deploying two or more duplicate servers in such a way as to share the workload of a mission-critical application. Users see the clustered systems as a single entity. A cluster controller manages traffi c to and among the clustered systems to balance the workload across all clustered servers. As changes occur on one of the clustered systems, they are immediately duplicated to all other cluster partners.

Load balancing

A load balancer is used to spread or distribute network traffi c load across several network links or network devices. Load balancing is discussed in Chapter 1, section 1.1, subsection

“Load balancers.”

Servers

The use of redundant servers is another example of avoiding single points of failure. A redundant server is a mirror or duplicate of a primary server that receives all data changes immediately after they are made on the primary server. In the event of a failure of the primary server, the secondary or redundant server can immediately take over and replace the primary server in providing services to the network.

c02.indd 21/04/2014 Page 143

144

Chapter 2

Compliance and Operational Security

This switchover system can be either hot or cold. A hot switchover or hot failover is an automatic system that can often perform the task nearly instantaneously. A cold switchover or cold failover is a manual system that requires an administrator to perform the manual task of switching from the primary to the secondary system, and thus it often involves noticeable downtime.

Redundant servers can be located in the same server vault as the primary or can be located offsite. Offsite positioning of the redundant server offers a greater amount of security so that the disaster that damaged the primary server is unlikely to be able to damage the secondary offsite server. However, offsite redundant servers are more expensive due to the cost of housing, as well as real-time communication links needed to support the mirroring operations.

Disaster recovery concepts

Disaster recovery should encompass every aspect of an organization. A disaster recovery plan focuses on restoration of business processes. Additionally, DRP encourages the deployment of redundancy in order to prevent downtime. The following sections discuss several redundancy and DRP options.

Backup plans/policies

A backup contingency plan is an alternate solution or response in case the primary plan fails or is not as successful as planned. A backout contingency plan prepares an organization to pull back from preparations, contracts, or agreements. Backout plans should include considerations that there may be legal or fi nancial consequences to backing out of certain contracts or signed agreements.

Backup execution/frequency

Backups are an essential part of business continuity because they provide insurance against damage or loss of data fi les. The mantra of all security professionals should be: backup, backup, backup. Backups are the only means of insurance available to your data resources in the event of a loss, disruption, corruption, intrusion, destruction, infection, or disaster.

Backups should be tested in order to prove reliable and usable. Testing a backup means restoring data from the backup media to verify that restoration can be done. If you don’t test your restoration process, there is no guarantee that your backup was successful.

There are three primary forms of backup:

Full A full backup copies all files to the backup media regardless of the archive bit setting.

It clears or resets the archive bit.

Incremental An incremental backup copies only those fi les with a set or fl agged archive bit. It clears or resets the archive bit, thus selecting only those fi les that are new or have changed.

Differential A differential backup copies only those fi les with a set or fl agged archive bit.

It doesn’t alter the archive bit, thus selecting only those fi les that are new or have changed.

Incremental and differential backups are performed in concert with full backups. For example, a full backup could be performed at the beginning of each week, then daily c02.indd 21/04/2014 Page 144

2.8 Summarize risk-management best practices

145

incremental or differentials performed the other six days. Daily incremental backups will consume approximately the same time and storage space each day, while differentials grow larger and take longer each day. When restoring, the full is used to restore the initial file set, then either all incremental backups are restored in chronological order or just the last differential is restored in order to regain access to the most current version of the files.

The archive bit is a file header flag that indicates that either a file is new or changed. The archive bit is a common feature on Windows file systems.

Other operating systems and file systems may rely on timestamps instead of archive bits for backup file selection.

Backup media should be stored securely at an offsite location in order to prevent them from being damaged or destroyed by the same catastrophe that affects the business continuity of the primary site. They should be stored in a fi re-protected safe, vault, or safety deposit box. Backup tapes should be moved offsite soon after a backup is complete, and the transportation of the backup tapes should be secured. The tapes should be protected at all times from physical damage, theft, alteration, and destruction.

Secure recovery and restoration ensure that mission-critical, sensitive, or secured servers can be restored after a disaster with minimal loss or security violations. Secure recovery ensures that affected systems reboot into a secured state, and that all resources open and active at the time as the fault, failure, or security violation are restored and have their security restrictions reimposed properly. Any damaged fi les are restored from backup, and their proper security labels are reapplied.

An organization-wide secure-recovery procedure involves the use of an alternate site: a secondary location where the business can move and continue performing mission-critical business operations. There are three levels of alternate sites: hot, warm, and cold.

Cold site

A cold site is often little more than an empty room. It can be a location with no equipment or communications at all, or it can be a site with equipment in boxes and essential communications and utilities connected. In either case, it may require weeks of work to set up and confi gure in order to support the company’s processing needs. A cold site is the least expensive option, but it does not offer a realistic hope of recovery.

Hot site

A hot site is a real-time, moment-to-moment mirror image of the original site. It contains a complete network environment that is fully installed and confi gured with live current business data. The moment the original site becomes inoperable due to a disaster, the hot site can be used to continue business operations without a moment of downtime.

Hot sites are the most expensive, but they offer the least amount of downtime. Hot sites have signifi cantly high security risk due to live current business data at both the primary site and the hot site, plus the real-time communications between them. Additionally, a hot site requires dedicated support staff in order to maintain it and keep it consistent with the primary site.

c02.indd 21/04/2014 Page 145

146

Chapter 2

Compliance and Operational Security

Warm site

A warm site is a partially confi gured alternate site with most of the server and networking infrastructure installed. In the event of a disaster, some fi nal software installation and confi guration are needed, and data must be restored from a backup set. A warm site may require hours or a day to get it ready for real-time operation to support the business’s mission-critical functions. A warm site is moderately costly, but it is a realistic option for recovery if the organization can survive a few days of downtime.

When you return from the alternate site, whether hot, warm, or cold, the disaster could be repeated. The primary site is a new environment, because the original network and computer systems were damaged beyond their ability to support the business; signifi cant changes, repairs, and replacements have occurred to restore the environment. The restored primary site should be stress-tested before the mission-critical operations of the business are transferred back to it. So, the least critical functions should be moved back to the primary site fi rst. Then, after the site shows resiliency, you can move more critical functions as the network proves its ability to support the organization once again.

Exam Essentials

Understand business impact analysis. Business impact analysis is the process of performing risk assessment on business tasks and processes rather than on assets. The purpose of business impact analysis is to determine the risks to business processes and design protective and recovery solutions. The goal of business impact analysis is to maintain business continuity, prevent and/or minimize downtime, and prepare for fast recovery and restoration in the event of a disaster.

Understand removing single points of failure. A single point of failure is any individual or sole device, connection, or pathway that is moderately to mission-critically important to the organization. If that one item fails, the whole organization suffers loss. Infrastructures should be designed with redundancies of all moderate or higher important elements in order to avoid single points of failure. Removing single points of failure is the process of adding redundancy, recovery options, or alternative means to perform business tasks and processes.

Understand business continuity planning and testing. Business continuity planning (BCP) involves assessing a variety of risks to organizational processes and creating policies, plans, and procedures to minimize the impact those risks might have on the organization if they were to occur. BCP is used to maintain the continuous operation of a business in the event of an emergency situation.

Understand the continuity of operations. Availability is the assurance of suffi cient bandwidth and timely access to resources. High availability means the availability of a system has been secured to offer very reliable assurance that the system will be online, active, and able to respond to requests in a timely manner, and that there will be suffi cient bandwidth to accomplish requested tasks in the time required. Both of these concerns are central to maintaining continuity of operations.

c02.indd 21/04/2014 Page 146

2.8 Summarize risk-management best practices

147

Understand succession planning. Succession planning is the process of identifying and preparing specifi c people, usually existing personnel, who will be called on to replace those in key leadership positions.

Understand fault tolerance. Fault tolerance is the ability of a network, system, or computer to withstand a certain level of failures, faults, or problems and continue to provide reliable service. Fault tolerance is also a form of avoiding single points of failure. A single point of failure is any system, software, or device that is mission-critical to the entire environment.

Understand high availability. High availability means the availability of a system has been secured to offer very reliable assurance that the system will be online, active, and able to respond to requests in a timely manner, and that there will be suffi cient bandwidth to accomplish requested tasks in the time required. RAID is a high-availability solution.

Understand redundancy. Redundancy is the implementation of secondary or alternate solutions. Commonly, redundancy refers to having alternate means to perform work tasks or accomplish IT functions. Redundancy helps reduce single points of failure and improves fault tolerance.

Understand tabletop exercises. A tabletop exercise is a discussion meeting focused on a potential emergency event. It is a means to walk through and evaluate an emergency plan in a stress-free environment.

Understand disaster recovery. A disaster recovery plan is a collection of detailed procedures used in the event that business functions are interrupted by a signifi cant damaging event. When the primary site is unable to support business functions, the disaster recovery plan is initiated. This plan outlines the procedures for getting the mission-critical functions of the business up and running at an alternate site while the primary site is restored to normal operations.

Understand backup/backout contingency plans or policies. A backup contingency plan provides an alternate solution or response if the primary plan fails or is not as successful as planned. A backout contingency plan prepares an organization to pull back from preparations, contracts, or agreements. Backout plans should include considerations that there may be legal or fi nancial consequences to backing out of certain contracts or signed agreements.

Understand backups. Backups are the only means of insurance available to your data resources in the event of a loss, disruption, corruption, intrusion, destruction, infection, or disaster. Backups should be tested in order for them to prove reliable and usable.

Know the common types of backups. The three common types of backups are full, incremental, and differential.

Understand the importance of offsite storage. Backup media should be stored securely at an offsite location to prevent them from being damaged or destroyed by the same catastrophe that affects the business continuity of the primary site. This location should be a fi reprotected safe, vault, or safety deposit box.

Understand alternate sites. An alternate site is a secondary location where the business can move and continue performing mission-critical business operations. There are three levels of alternate sites: hot, warm, and cold.

c02.indd 21/04/2014 Page 147

148

Chapter 2

Compliance and Operational Security

2.9 Given a scenario, select the appropriate control to meet the goals of security

Careful selection of security controls is essential to the success of a security project. The processes of risk assessment and BIA guide security managers toward the best solutions or responses to identifi ed risks. As mentioned previously, security controls may provide a wide range of features (prevention, detection, deterrent, and so on) and should be selected based on their appropriateness and effectiveness in relation to the asset, threat, and vulnerability. For most organizations, the goals of security focus on three primary areas: confi dentiality, integrity, and availability. These three security concepts are commonly called the CIA triad. But they mostly focus on the technology side of things, so it is important to add specifi c focus to the protection of the physical environment as well as human life and safety.

Confidentiality

Confi dentiality protects the secrecy of data, information, or resources. It prevents or minimizes unauthorized access to data (see Figure 2.5). It ensures that no one other than the intended recipient of a message receives it or is able to read it. Confi dentiality protection provides a means for authorized users to access and interact with resources, but it actively prevents unauthorized users from doing so. A wide range of security controls can provide protection for confi dentiality, including encryption, access controls, and steganography.

F I G U R E 2 . 5 Cryptographic systems protect data from internal and external disclosure.

Cryptography protects private records from attack.

Cryptography protects information from being disclosed during external attacks.

c02.indd 21/04/2014 Page 148

2.9 Given a scenario, select the appropriate control to meet the goals of security

149

Encryption

Encryption is the process of converting data into an unreadable form in order to protect it from unauthorized access or use. See the full discussion of encryption in Chapter 6,

“Cryptography.”

Access controls

Access controls or authorization control what a user is able or allowed to do in a system. See the full discussion of access controls in Chapter 5, “Access Control and Identity

Management.”

Steganography

Steganography is the mechanism of hiding a communication or a fi le in another fi le. See

Chapter 6, section 6.1, subsection “Steganography.”

Integrity

Integrity is the security service that protects the reliability and correctness of data.

Integrity protection prevents unauthorized alterations of data (see Figure 2.6). It ensures that data remains correct, unaltered, and preserved. Integrity protection provides a means for authorized changes to be implemented, but it actively prevents unauthorized changes to protected data. Integrity protection resists changes by unauthorized activities (such as viruses or intrusions) and accidents by authorized users (such as mistakes or oversights).

Often an integrity check uses a hashing function to verify that data remains unchanged in storage or after transit. Hashing is then used as part of other cryptographic technologies where integrity verifi cation is essential, such as digital signatures, certifi cations, and nonrepudiation.

F I G U R E 2 . 6 A simple integrity-checking process for an encrypted message ayzoboubxayxzes

How are you? 12/5

12 Letters 5 Vowels

Encryption Decryption

How are you ? 13/5

Notice that this message is invalid!

Hashing

Hashing is a numeric representation of data used to check whether integrity has been violated. See Chapter 6, section 6.1, for more about hashing.

c02.indd 21/04/2014 Page 149

150

Chapter 2

Compliance and Operational Security

Digital signatures

A digital signature is a means to verify that a data set was not changed in transit and to indicate the identity of the sender. See Chapter 6, section 6.1, for more on digital signatures.

Certificates

A certifi cate is often used as a form of trusted third-party authentication. Certifi cates are based on public key cryptography. See Chapter 6, section 6.3, for more on certifi cates.

Non-repudiation

This is a benefi t provided by public key cryptography that prevents a sender from denying having sent a message. See Chapter 6, section 6.1, for more on nonrepudiation.

Availability

Availability is the security service that provides protection for the use of a resource in a timely and effective manner. Often, availability-protection controls support suffi cient bandwidth and timeliness of processing as deemed necessary by the organization or situation.

When availability is protected, users can perform their work tasks in an effi cient and timely manner. When availability is violated, workers cannot accomplish their assigned tasks.

Availability can be violated through the destruction or modifi cation of a resource, overloading of a resource host, interference with communications to a resource host, or prevention of a client from being able to communicate with a resource host. Some of the technologies or concepts that focus on protecting availability include redundancy, fault tolerance, and patching.

Redundancy

This concept applies to various aspects of operational security, including business continuity, backups, and avoiding single points of failure as a means to protect availability. (See the earlier section, “Redundancy.”)

Fault tolerance

Fault tolerance is the aspect of a system that enables it to continue to operate even after experiencing faults or errors. See the earlier section, “Fault tolerance.”

Patching

Patching is the process of applying updates to software. It is often intended as a means to maintain a stable and secure environment by running the most current version of code available. Find more information on patching in Chapter 4, subsection 4.1. c02.indd 21/04/2014 Page 150

2.9 Given a scenario, select the appropriate control to meet the goals of security

151

Safety

The safety of the facility and personnel should be a priority of a security effort. Human life and safety are without question the top concerns, but suffi cient focus needs to be placed on providing physical security for buildings and other real-world assets. The following sections discuss many aspects of security and safety.

Fencing

Fencing protects against casual trespassing and clearly identifi es the geographic boundaries of a property. See the earlier section, “Fencing.”

Lighting

Lighting as a means of security deters undesired activities such as vandalism, minor theft, and loitering. See the earlier section, “Proper lighting.”

Locks

Locks are used to keep doors and containers secured in order to protect assets. See the earlier section, “Hardware locks.”

CCTV

CCTV or security cameras are video-recording devices that create a digital record of events. See the earlier section, “Video Surveillance.”

Escape plans

Every building needs an escape plan, and a backup escape plan, and even a backup backup escape plan. The preferred and alternate escape routes should be identifi ed, marked, and clearly communicated to all personnel. Accommodations for those with disabilities need to be made.

Drills

Employees need to be trained in safety and escape procedures. Once they are trained, their training should be tested using drills and simulations. Having workers go through the routine of escape helps to reinforce their understanding of the escape plans and available routes, and it also helps reduce anxiety and panic in the event of a threatening event.

Escape routes

An escape route is the path someone should take out of a building to reach safety. See the earlier section, “Escape plans.” c02.indd 21/04/2014 Page 151

152

Chapter 2

Compliance and Operational Security

Testing controls

All elements of physical security, especially those related to human life and safety, should be tested on a regular basis. It is mandated by law that fi re extinguishers, fi re detectors/ alarms, and elevators are inspected regularly. A self-imposed schedule of control testing should be implemented for door locks, fences, gates, mantraps, turnstiles, video cameras, and all other physical security controls.

Exam Essentials

Know the CIA. Confi dentiality protects the secrecy of data, information, or resources.

Integrity is the security service that protects the reliability and correctness of data.

Availability is the security service that provides protection for the use of a resource in a timely and effective manner.

c02.indd 21/04/2014 Page 152

Review Questions

153

Review Questions

1. Which of the following risk-assessment formulas represents the total potential loss a

company may experience within a single year due to a specific risk to an asset?

A. EF

B. SLE

C. ARO

D. ALE

2. Which of the following is more formal than a handshake agreement but not a legal binding contract?

A. SLA

B. BIA

C. DLP

D. MOU

3. Evidence is inadmissible in court if which of the following is violated or mismanaged?

A. Chain of custody

4. When a user signs a(n) _________, it’s a form of consent to the monitoring and auditing processes used by the organization.

A. Acceptable use policy

C. Separation of duties policy

D. Code of ethics policy

5. When is business continuity needed?

A. When new software is distributed

B. When business processes are interrupted

C. When a user steals company data

D. When business processes are threatened

6. What form of recovery site requires the least amount of downtime before mission-critical business operations can resume?

A. Cold

B. Warm

C. Hot

D. Offsite c02.indd 21/04/2014 Page 153

154

Chapter 2

Compliance and Operational Security

7. An organization has a high-speed fiber Internet connection that it uses for most of its daily operations, as well as its offsite backup operations. This represents what security problem?

A. Single point of failure

D. Offsite backup storage

8. What is the proper humidity level or range for IT environments?

A. Below 40 percent

B. 40 percent to 60 percent

C. Above 60 percent

D. 20 percent to 80 percent

9. You run a full backup every Monday. You also run a differential backup every other day of the week. You experience a drive failure on Friday. Which of the following restoration procedures should you use to restore data to the replacement drive?

A. Restore the full backup and then each differential backup.

B. Restore the full backup and then the last differential backup.

C. Restore the differential backup.

D. Restore the full backup.

10. Which of the following is a security control type that is not usually associated with or assigned to a security guard?

A. Preventive

B. Detective

C. Corrective

D. Administrative c02.indd 21/04/2014 Page 154

Chapter

3

Threats and

Vulnerabilities

COMPTIA SECURITY+ EXAM OBJECTIVES

COVERED IN THIS CHAPTER INCLUDE THE

FOLLOWING:

3.1 Explain types of malware.

Adware

Virus

Spyware

Trojan

Rootkits

Backdoors

Logic bomb

Botnets

Ransomware

Polymorphic malware

Armored virus

3.2 Summarize various types of attacks.

Man-in-the-middle

DDoS

DoS

Replay

Smurf attack

Spoofing

Spam

Phishing

Spim

Vishing

Spear phishing

Xmas attack

Pharming

Privilege escalation

Malicious insider threat

DNS poisoning and ARP poisoning

Transitive access

Client-side attacks

Password attacks

Brute force

Dictionary attacks

Hybrid

Birthday attacks

Rainbow tables

Typo squatting/URL hijacking

Watering hole attack

3.3 Summarize social engineering attacks and the

associated effectiveness with each attack.

Shoulder surfing

Dumpster diving

Tailgating

Impersonation

Hoaxes

Whaling

Vishing

Principles (reasons for effectiveness)

Authority

Intimidation

Consensus/Social proof

Scarcity

Urgency

Familiarity/liking

Trust

3.4 Explain types of wireless attacks.

Rogue access points

Jamming/Interference

Evil twin

War driving

Bluejacking

Bluesnarfing

War chalking

IV attack

Packet sniffing

Near field communication

Replay attacks

WEP/WPA attacks

WPS attacks

3.5 Explain types of application attacks.

Cross-site scripting

SQL injection

LDAP injection

XML injection

Directory traversal/command injection

Buffer overflow

Integer overflow

Zero-day

Cookies and attachments

LSO (Locally Shared Objects)

Flash cookies

Malicious add-ons

Session hijacking

Header manipulation

Arbitrary code execution/remote code execution

3.6 Analyze a scenario and select the appropriate type of

mitigation and deterrent techniques.

Monitoring system logs

Event logs

Audit logs

Security logs

Access logs

Hardening

Disabling unnecessary services

Protecting management interfaces and applications

Password protection

Disabling unnecessary accounts

Network security

MAC limiting and filtering

802.1x

Disabling unused interfaces and unused application service ports

Rogue machine detection

Security posture

Initial baseline configuration

Continuous security monitoring

Remediation

Reporting

Alarms

Alerts

Trends

Detection controls vs. prevention controls

IDS vs. IPS

Camera vs. guard

3.7 Given a scenario, use appropriate tools and techniques

to discover security threats and vulnerabilities.

Interpret results of security assessment tools

Tools

Protocol analyzer

Vulnerability scanner

Honeypots

Honeynets

Port scanner

Passive vs. active tools

Banner grabbing

Risk calculations

Threat vs. likelihood

Assessment types

Risk

Threat

Vulnerability

Assessment technique

Baseline reporting

Code review

Determine attack surface

Review architecture

Review designs

3.8 Explain the proper use of penetration testing versus

vulnerability scanning.

Penetration testing

Verify a threat exists

Bypass security controls

Actively test security controls

Exploiting vulnerabilities

Vulnerability scanning

Passively testing security controls

Identify vulnerability

Identify lack of security controls

Identify common misconfigurations

Intrusive vs. non-intrusive

Credentialed vs. non-credentialed

False positive

Black box

White box

Gray box

The Security+ exam will test your basic IT security skills— those skills you need to effectively secure stand-alone and networked systems in a corporate environment. To pass the test and be effective in implementing security, you need to understand the basic concepts and terminology related to threats and vulnerabilities as detailed in this chapter.

3.1 Explain types of malware

Malware or malicious code is any element of software that performs an unwanted function from the perspective of the legitimate user or owner of a computer system.

Malicious code includes adware, viruses, worms, spyware, Trojan horses, rootkits, backdoors, logic bombs, botnets, ransomware, polymorphic malware, and armored viruses.

Following is an overview of each.

Adware

Adware is a variation on the idea of spyware (discussed later in this section). Adware displays pop-up advertisements to users based on their activities, URLs they have visited, applications they have accessed, and so on. Adware is used to target advertisements to prospective customers. Unfortunately, most adware products arrive on client systems without the knowledge or consent of the user. Thus, legitimate commercial products are often seen as intrusive and abusive adware.

Countermeasures for adware are the same as for spyware and viruses—anti-malware software with added specifi c spyware/adware-scanning tools.

Virus

Viruses are just one example of malicious code, malicious software, or malware. Viruses get their name from their biological counterparts. They’re programs designed to spread from one system to another through self-replication and to perform any of a wide range of malicious activities. The malicious activities performed by viruses include data deletion, corruption, alteration, and theft. Some viruses replicate and spread so rapidly that they consume system and network resources, thus performing a type of denial-of-service (DoS) attack (discussed later in the chapter).

Most viruses need a host to latch onto. The host can be a fi le (as in the case of common

viruses) or the boot sector of a hard drive. Viruses that attach themselves to the boot sector

162

Chapter 3

Threats and Vulnerabilities of a hard drive and thus are loaded in memory when the drive is activated are known as

boot sector viruses.

Within these categories, some specifi c virus types include the following:

Polymorphic viruses These have the ability to alter their own code in order to avoid detection by antivirus scanners.

Macro viruses These live within documents or emails and exploit the scripting capabilities of productivity software.

Stealth viruses These attempt to avoid detection by masking or hiding their activities.

Armored viruses These are designed to be diffi cult to detect and remove.

Retroviruses These are specifi cally targeted at antivirus systems to render them useless.

Phage viruses These modify or infect many aspects of a system so they can regenerate themselves from any remaining unremoved parts.

Companion viruses This type of virus borrows the root fi lename of a common executable and then gives itself the

.com

extension in an attempt to get itself launched rather than the intended application.

Multipart or Multipartite viruses These perform multiple tasks and may infect a system in numerous ways.

The best countermeasure to viruses is an antivirus scanner that is updated regularly and that monitors all local storage devices, memory, and communication pathways for viral activities. Other countermeasures include avoiding downloading software from the

Internet, not opening email attachments, and avoiding the use of removable media from other environments.

Another form of malware that is closely related to a virus is a worm. Worms are selfcontained applications that don’t require a host fi le or hard drive to infect. Worms typically are focused on replication and distribution, rather than on direct damage and destruction.

However, due to the expanding capabilities (although malicious) of viruses, worms are no longer an easily identifi able, distinct category of malicious code. Worms are designed to exploit a specifi c vulnerability in a system (operating system, protocol, service, or application) and then use that fl aw to spread themselves to other systems with the same fl aw. They may be used to deposit viruses, Trojan horses, logic bombs, or zombies/agents/bots for botnets, or they may perform direct virus-like maelstrom activities on their own.

Countermeasures for worms are the same as for viruses, with the addition of keeping systems patched.

Spyware

Spyware is any form of malicious code or even business or commercial code that collects information about users without their direct knowledge or permission. Spyware can be fully malicious when it seeks to gain information to perform identity theft or credential

3.1 Explain types of malware

163

hijacking. However, many advertising companies use less-malicious forms of spyware to gather demographics about potential customers. In either case, the user is often unaware that the spyware tool is present or that it’s gathering information that is periodically transmitted back to some outside entity. Spyware can collect keystrokes, names of launched applications, local fi les, sent or received emails and instant messages (IMs), and URLs visited; it can also record audio by turning on the microphone, or even record video by turning on a webcam. Spyware can be deposited by viruses, worms, or Trojan horses, or it can be installed as an extra element from commercial, freeware, or shareware applications.

Countermeasures for spyware are the same as for viruses, with the addition of specifi c spyware-scanning tools.

Trojan

A Trojan horse is a form of malicious software that is disguised as something useful or legitimate. The most common forms of Trojan horses are games and screensavers, but any software can be made into a Trojan. The goal of a Trojan horse is to trick a user into installing it on their computer. This allows the malicious code portion of the Trojan to gain access to the otherwise secured environment. Some of the most common Trojans are tools that install distributed denial-of-service (DDoS) zombies (discussed later in the chapter) or remote-control agents onto systems.

Countermeasures for Trojan horses are the same as for viruses.

Rootkits

A rootkit is a special type of hacker tool that embeds itself deep within an operating system (OS). The rootkit positions itself at the heart of an OS where it can manipulate information seen by the OS. Often, a rootkit replaces the OS kernel or shims itself under the kernel so that whatever information it feeds or hides from the OS, the OS thinks is normal and acceptable. This allows a rootkit to hide itself from detection, prevent its fi les from being viewed by fi le-management tools, and prevent its active processes from being viewed by task-management or process-management tools. Thus, a rootkit is a type of invisibility shield. A rootkit can be used to hide other malicious tools and/or perform other functions. A rootkit or other tools hidden by a rootkit can capture keystrokes, steal credentials, watch URLs, take screen captures, record sounds via the microphone, track application use, or grant a remote hacker backdoor access or remote control over the compromised target system.

After a rootkit has infected a system, that system can no longer be trusted or considered secure. There are rootkits that are still undetectable and/or can’t be effectively removed.

Thus, any rootkit-compromised system can never be fully trusted again. To use a silly analogy: if you’re fi ghting an invisible army, how can you be sure that you’ve defeated all of the soldiers?

164

Chapter 3

Threats and Vulnerabilities

There are several rootkit-detection tools, some of which are able to remove certain rootkits. However, once you suspect a rootkit is on a system, the only truly secure response is to reconstitute or replace the entire computer. Reconstitution involves performing a lowlevel formatting operation on all storage devices on that system, reinstalling the OS and all applications from trusted original sources, and then restoring fi les from trusted rootkit-free backups. Obviously, the best protection against rootkits is defense rather than response.

Backdoors

The term backdoor can refer to two types of problems or attacks on a system. The fi rst and oldest type of backdoor was a developer-installed access method that bypassed all security restrictions. The backdoor was a special hard-coded user account, password, or command sequence that allowed anyone with knowledge of the access hook (sometimes called a main-

tenance hook) to enter the environment and make changes. This sounds great from a developer’s perspective, especially during the coding and debugging process. Unfortunately, such programming shortcuts are often forgotten about when the product nears completion; thus, they end up in the fi nal product. Fortunately, once a backdoor is discovered in a released product, the vendor usually releases a patch to remove the backdoor code from the installed product. The possible presence of backdoors is another good reason to stay current with vendor-released updates and patches.

The second meaning of backdoor is a hacker-installed remote-access client. These small, maliciously purposed tools can easily be deposited on a computer through a Trojan horse, a virus, a website mobile code download, or even as part of an intrusion activity. Once active on a system, the tool opens access ports and waits for an inbound connection. Thus, a backdoor serves as an access portal for a hacker so that they can bypass any security restrictions and gain (or regain) access to a system. Some common backdoor tools include Back Orifi ce,

NetBus, and Sub7 (all of which function on Windows). These and other common backdoor tools are detected and removed by virus scanners and spyware scanning tools.

Figure 3.1 shows a backdoor attack in progress.

F I G U R E 3 .1 A backdoor attack in progress

Attacker

Internet

Backdoor Program on Workstation

Victim

3.1 Explain types of malware

165

Preemptive measures against backdoors include restricting mobile code from being automatically downloaded to your systems, using software policies to prevent unauthorized software from being installed, monitoring inbound and outbound traffi c, and requiring software and driver signing.

Logic bomb

A logic bomb is a form of malicious code that remains dormant until a triggering event occurs. The triggering event can be a specifi c time and date, the launching of a specifi c program, or the accessing of a specifi c URL (such as your online banking logon page). Logic bombs can perform any malicious function the programmer wishes, from causing system crashes, to deleting data, to altering confi gurations, to stealing authentication credentials.

Countermeasures for logic bombs are the same as for viruses.

Botnets

The term botnet is a shortened form of the phrase robot network. It is used to describe a massive deployment of malicious code onto numerous compromised systems that are all controlled by a hacker. A botnet is the culmination of traditional DoS attacks into a concept known as a distributed denial-of-service (DDoS) attack. A DDoS attack occurs when a hacker has deposited remote-controlled agents, zombies, or bots onto numerous secondary victims and then uses the deployed bots as a single entity to attack a primary target.

(This is covered in more detail later in the chapter, when we review specifi c attack types.)

Botnets are either directly or indirectly controlled by a hacker. Sometimes the hacker is called a bot herder, a master, or even a handler. Direct control of a botnet occurs when the bot herder sends commands to each bot. Therefore, bots have a listening service on an open port waiting for the communication from the bot herder. Indirect control of a botnet can occur through any intermediary communication system, including Internet Relay Chat

(IRC), IM, File Transfer Protocol (FTP), email, the Web, blogging, Twitter, and so on.

When indirect control is used, the bots access an intermediate communication service for messages from the bot herder.

Botnets are possible because most computers around the world are accessible over the

Internet, and many of those computers aren’t fully secure. A botnet creator writes their botnet code to exploit a common vulnerability in order to spread the botnet agent far and wide— often using the same techniques used by viruses, worms, and Trojan horses. Botnets typically include thousands (if not hundreds of thousands) of compromised secondary victims. The secondary victims are the hosts of the botnet agent itself and aren’t affected or damaged beyond the initial intrusion and planting of the botnet agent. The hackers want the secondary victims fully functional so that when they launch their botnet attack against the primary victim, they can use all the resources of the secondary victims against the primary target.

A botnet can be used to perform any type of malicious activity. Although they’re most often used to perform DoS fl ooding attacks, botnets can also be used to transmit spam, perform massively distributed parallel processing to crack passwords or encryption keys,

166

Chapter 3

Threats and Vulnerabilities perform phishing attacks, capture network packets, or perform any other conceivable activity.

The best defense against a botnet is to keep your systems patched and hardened and to not become the host of a botnet agent (in other words, don’t become a secondary victim).

Outbound fi rewall rules and web fi ltering on a UTM (Unifi ed Threat Management) are also effective countermeasures. In addition, most antivirus software and anti-spyware/adware tools include well-known botnet agents in their detection databases.

If you’re the primary victim of a botnet fl ooding attack, there is little you can do to stop the attack. Your responses are often limited to disconnecting from the Internet, contacting your ISP, and reporting the incident to law enforcement.

Ransomware

Ransomware is a form of malware that aims to take over a computer system in order to block its use while demanding payment. Effectively, it’s malware that holds data or an entire computer system hostage in exchange for a ransom payment. Often, the thieves behind ransomware request payment to be made in untraceable money cards, such as the

MoneyPak Green Dot card, or in Bitcoins (an untraceable form of digital currency).

Countermeasures for ransomware include avoiding risky behaviors, running antimalware software, and maintaining a reliable backup of your data. Unless no other option is available to you to regain access to your data, avoid paying the ransom.

Polymorphic malware

Polymorphic malware is a form of malicious code that attempts to avoid detection through manipulation of its signature. Any form of malware can be designed to incorporate polymorphic techniques. The most common form of polymorphic operation uses encryption to hide the core code of the malware. If a detection system is programmed to watch for a specifi c collection of code, but that code is encrypted, then the detector will be fooled. The core function or purpose of the malware is unchanged when polymorphic camoufl age techniques are used.

Armored virus

An armored virus is any form of malware that has been crafted to avoid detection and make removal diffi cult. This can involve the use of complex compiling techniques, overly complex coding logic, and abnormal use of memory. The use of armoring techniques in crafting malware often results in a much larger program.

Exam Essentials

Understand spyware and adware. Spyware gathers information about users and may employ that information to target advertisements or steal identities. Adware gathers

3.2 Summarize various types of attacks

167

information about users and uses it to direct advertisements to the user. Both spyware and adware are usually unwanted software that gathers information without authorization.

Understand viruses. Viruses are programs that are designed to spread from one system to another through self-replication and to perform any of a wide range of malicious activities.

Understand worms. Worms are designed to exploit a single fl aw in a system (operating system, protocol, service, or application) and then use that hole to replicate themselves to other systems with the same fl aw.

Understand Trojan horses. A Trojan horse is a form of malicious software that is disguised as something useful or legitimate.

Understand rootkits. A rootkit is a type of malicious code that fools the OS into thinking that active processes and fi les don’t exist. Rootkits render a compromised system completely untrustworthy.

Understand backdoor attacks. The term backdoor can refer to either of two types of problems or attacks on a system: a developer-installed access method that bypasses any and all security restrictions, or a hacker-installed remote access client.

Understand logic bombs. A logic bomb is a form of malicious code that remains dormant until a triggering event occurs. The triggering event can be a specifi c time and date, the launching of a specifi c program, or the accessing of a specifi c URL.

Understand botnets. A botnet is a network of robots or malicious software agents controlled by a hacker in order to launch massive attacks against targets.

Understand ransomware. Ransomware is a form of malware that aims to take over a computer system in order to block its use while demanding payment.

Understand malicious code countermeasures. The best countermeasure to viruses and other malicious code is an antivirus scanner that is updated regularly and that monitors all local storage devices, memory, and communication pathways for malicious activity. Other countermeasures include avoiding downloading software from the Internet, not opening email attachments, and avoiding the use of removable media from other environments.

3.2 Summarize various types of attacks

Any computer system connected to any type of network is subject to various types of attacks. The rate at which networked systems are attacked is increasing at an alarming rate.

Even systems that aren’t connected to the Internet, but just to a private network, may come under attack. There are myriad ways to attack a computer system. Your familiarity with a modest collection of these attacks and how to respond to them is an essential skill for the

Security+ exam. The following sections discuss common attack methods.

168

Chapter 3

Threats and Vulnerabilities

Man-in-the-middle

A man-in-the-middle attack is a communications eavesdropping attack. Attackers position themselves in the communication stream between a client and server (or any two communicating entities). The client and server believe that they’re communicating directly with each other—they may even have secured or encrypted communication links. However, the attacker can access and potentially modify the communications.

Man-in-the-middle attacks range from very simple to quite complex. They involve altering network traffi c and possibly poisoning name-resolution systems—such as Domain Name

System (DNS), Address Resolution Protocol (ARP), NetBIOS, and Windows Internet Name

Service (WINS)—in order to fool the client into perceiving the attacker as the server and to fool the server into perceiving the attacker as the client. When that charade is successful, the client submits its logon credentials to the fake server (the masked attacker), which in turn sends the credentials to the actual server while masquerading as the actual client. As a result, the client establishes a communication link (maybe even an encrypted link) with the attacker, and the attacker establishes a communication link with the server. As data is transmitted in either direction between the true client and server systems, the attacker can read and access all the data and can choose to modify the traffi c to further the subterfuge.

Figure 3.2 shows a man-in-the-middle attack.

F I G U R E 3 . 2 A man-in-the-middle attack occurring between a client and a web server

Client Man in the Middle Server

Such attacks are usually most successful when routing and name-resolution systems are fi rst compromised in order to position the attacker before the client-to-server communication is initiated. However, man-in-the-middle attacks can be conducted against existing client/server communication links (usually assuming they aren’t encrypted). This second form of attack, often called session hijacking (discussed later in the chapter), is much more diffi cult due to existing routing, name resolution, TCP sequencing, and the speed of the communication. But several tools exist that perform the necessary operations against both sides of the communication connection in order to implement a man-in-the-middle injection. Some of these tools include Ettercap, Cain, Juggernaut, and Hunt.

Countermeasures to man-in-the-middle attacks include strong encryption protocols, such as IPsec, and the use of strong authentication, such as Domain Name System Security

Extensions (DNSSEC), Kerberos, certifi cates, multifactor authentication, Server Message

Block (SMB) signing, and mutual authentication.

DDoS

Denial of service (DoS) is a form of attack that has the primary goal of preventing the victimized system from performing legitimate activity or responding to legitimate traffi c.

3.2 Summarize various types of attacks

169

There are two basic types of DoS attack. The fi rst form exploits a weakness, an error, or a standard feature of software to cause a system to hang, freeze, consume all system resources, and so on. The end result is that the victimized computer is unable to process any legitimate tasks. The second form fl oods the victim’s communication pipeline with garbage network traffi c. The end result is that the victimized computer is unable to send or receive legitimate network communications. In either case, the victim is denied the ability to perform normal operations (services).

The next section covers the general concept of DoS attacks in more detail, but fi rst let’s revisit the specifi c type of DoS attack known as a distributed denial-of-service attack

(DDoS) (mentioned in the earlier sections “Trojan” and “Botnets”). These types of DoS attacks are waged by fi rst compromising or infi ltrating one or more intermediary systems that serve as launch points or attack platforms. These intermediary systems are commonly referred to as secondary victims. The attacker installs remote-control tools, often called

bots, zombies, or agents, onto these systems. Then, at an appointed time or in response to a launch command from the attacker, the DoS attack is conducted against the victim, as shown in Figure 3.3. In this manner, the victim may be able to discover the zombied system(s) that are causing the DoS attack but probably won’t be able to track down the actual attacker. Recently, such deployments of many bots or zombies across numerous unsuspecting secondary victims have become known as botnets (see the earlier section

“Botnets”).

F I G U R E 3 . 3 DDoS attack

Master

Zombies

Victim

The following overview of DoS includes additional aspects of DDoS, including common attack tools and methods.

170

Chapter 3

Threats and Vulnerabilities

DoS

DoS isn’t a single attack but rather an entire class of attacks. Some attacks exploit fl aws in OS software, whereas others focus on installed applications, services, or protocols.

Some attacks exploit specifi c protocols, including Internet Protocol (IP), Transmission

Control Protocol (TCP), Internet Control Message Protocol (ICMP), and User Datagram

Protocol (UDP).

DoS attacks typically occur between one attacker and one victim. However, they don’t have to be waged in that simple a manner. Most DoS attacks employ some form of intermediary system (usually an unwilling and unknowing participant) in order to hide the attacker from the victim. For example, if an attacker sends attack packets directly to a victim, it’s possible for the victim to discover who the attacker is. This is made more diffi cult, although not impossible, through the use of spoofi ng (discussed later in this chapter).

In addition to DoS and DDoS, there is a third form known as distributed refl ective

denial-of-service (DRDoS). This form of attack employs an amplifi cation or bounce network that is an unknowing participant that unfortunately able to receive broadcast messages and create message responses, echoes, or bounces. In effect, the attacker sends spoofed message packets to the amplifi cation network’s broadcast address. This causes each single inbound received packet to be distributed to all the hosts in that network

(which could be in the 10,000 or 100,000 range). Each host then responds to each packet, but because the source of the original packet was falsifi ed, the response goes to the victim instead of the true sender (the attacker). So, what originated from the attacker as a single packet is transformed into numerous packets exiting the amplifi cation network and ultimately fl ooding the victim’s communication link.

There are numerous specifi c DoS, DDoS, and DRDoS attack tools and methods. Here are a few that you should be able to recognize:

Smurf This form of DRDoS uses ICMP echo reply packets (ping packets). See Figure 3.4 for an example.

Fraggle This form of DRDoS uses UDP packets commonly directed to port 7 (echo port) or 19 (chargen [character generator] port).

SYN flood This type of attack is an exploitation of a TCP three-way handshake. Every

TCP session starts with the client sending a SYN (synchronize) packet to a server, the server responding with a SYN/ACK (synchronize/acknowledgment) packet, and the client

sending a fi nal ACK packet. The attack consists of the attacker serving as a client and sending numerous SYN packets but never any fi nal ACK packets. This causes the server to consume all network resources by opening numerous incomplete communication sessions.

Figure 3.5 shows an example of a TCP SYN fl ood attack.

Teardrop Numerous partial IP packets with overlapping sequencing and offset values are sent to a victim. The victim attempts to assemble complete IP packets from the received partials, but the fragments overwrite each other and may produce a packet of an invalid size. This causes the victim to freeze or crash.

Land attack Numerous SYN packets are sent to the victim with source and destination addresses spoofed as the victim’s address. The victim is confused because it’s unable to

3.2 Summarize various types of attacks

171

respond to a packet it sent to itself that it has no record of sending. This often results in a freeze or crash.

F I G U R E 3 . 4 A smurf attack underway against a network

Attacker

Attacker Sends ICMP Broadcast

To Network With False IP Address.

Internet

Network Overloads Victim

With ICMP Responses.

Victim

F I G U R E 3 . 5 TCP SYN flood attack

Attacker

SYN

SYN/ACK

SYN

SYN/ACK

SYN

SYN/ACK

Server

Server Freezes

Ping flood The attacker sends numerous ping echo requests to a victim. The victim responds with the echo. If enough inbound and outbound packets are transmitted, no legitimate traffi c can use the communication link.

Ping of death The attacker sends oversized ping packets to the victim. The victim doesn’t know how to handle invalid packets, and it freezes or crashes.

Bonk The attacker sends a corrupt UDP packet to DNS port 53. This type of attack may cause Windows systems to crash.

Boink The same as bonk, but the corrupt UDP packets are sent to numerous ports. The result may cause a Windows system to crash.

172

Chapter 3

Threats and Vulnerabilities

SYN fl ood, teardrop, land attack, ping fl ood, ping of death, bonk, and boink are typically labeled DoS attacks, but they can be waged as a DDoS if the attacker compromises several intermediary systems and uses those as launching points to attack the victim.

Fortunately, most of the basic DoS attacks that exploit error-handling procedures (such as ping of death, land attack, teardrop, bonk, boink, and so on) are now automatically handled by improved versions of the protocols installed in the OS. However, many of the current DDoS and DRDoS attacks aren’t as easy to safeguard against.

Some countermeasures and safeguards against these attacks include the following:

Work out a response plan with your ISP.

Add firewalls, routers, and intrusion detection systems (IDSs) that detect DoS traffic and automatically block the port or filter out packets based on the source or destination address.

Disable echo replies on external systems.

Disable broadcast features on border systems.

Block spoofed packets from entering or leaving your network.

Keep all systems patched with the most current security updates from vendors.

Replay

A replay attack is just what it sounds like: An attacker captures network traffi c and then replays the captured traffi c in an attempt to gain unauthorized access to a system. Most commonly, the attacker focuses on network traffi c that is the exchange between a client and server performing authentication. If an attacker can capture the authentication traffi c—especially the packets containing the logon credentials, even if they’re more than just username and password (such as certifi cates, token responses, or biometric values)—then a replay attack may grant the attacker the ability to log on to a system by retransmitting the captured packets.

Figure 3.6 shows a replay attack. As the client transmits its logon credentials to the server (1), the attacker intercepts and eavesdrops on that transmission (2) and then later can replay those captured authentication packets against the server to falsify a logon as the original client (3).

If a replay attack succeeds, the attacker gains the same level of access as the user that originally submitted the authentication information. Fortunately, most modern OSs, networks, protocols, services, and applications use various replay-protection mechanisms to directly prevent such attacks. Two of the most common countermeasures are packet sequencing and timestamps. Packet sequencing ensures that any packet received that isn’t in the proper order (or within a reasonable margin) is dropped and ignored. Packet timestamps ensure that any packet received outside of a specifi c time window is dropped and ignored. A great example of this is Kerberos, which isn’t vulnerable to replay attacks due to its use of timestamps.

3.2 Summarize various types of attacks

173

F I G U R E 3 . 6 A replay attack occurring

1

Login Information

Client

Login Information

3

Server

Login Information

2

Attacker

Smurf attack

See the discussion of Smurf attacks in the “DoS” section earlier in this chapter.

Spoofing

Spoofi ng is the act of falsifying data. Usually the falsifi cation involves changing the source address of network packets. As a result of the changed source address, victims are unable to locate the true attackers or initiators of a communication. Also, by spoofi ng the source address, the attacker redirects packet responses, replies, and echoes to some other system

(as in the case of Smurf, fraggle, and land DoS attacks).

Spoofi ng is also a common activity for unsolicited email, commonly known as spam.

Spoofed email means you’re unable to reply to the email or determine where it originally came from.

There are innumerable forms of spoofi ng attacks. Spoofi ng can be used to redirect packets, bypass traffi c fi lters, steal data, perform social-engineering attacks, and even falsify websites.

Countermeasures against spoofi ng attacks include the following:

Use email spam and spoofing filters.

Drop all inbound packets received by border systems that have a source destination from inside your private network (this indicates spoofing).

Drop all outbound packets received by border systems that have a source destination from outside your private network (this also indicates spoofing).

Drop all packets that have a LAN address in their header if that LAN address isn’t officially issued to a valid system.

174

Chapter 3

Threats and Vulnerabilities

Spam

Spam is any type of email that is undesired and/or unsolicited. Think of spam as the digital equivalent of junk mail and door-to-door solicitations.

Spam is a problem for numerous reasons:

Some spam carries malicious code such as viruses, logic bombs, or Trojan horses.

Some spam carries social-engineering attacks (also known as hoax email).

Unwanted email wastes your time while you sort through it looking for legitimate messages.

Spam wastes Internet resources: storage capacity, computing cycles, and throughput.

The primary countermeasure against spam is an email fi lter. An email fi lter is a list of email addresses, domain names, or IP addresses where spam is known to originate. If a message is received from one of the listed spam sources, the email fi lter blocks or discards it. Some email fi lters are becoming as sophisticated as antivirus scanners. These email fi lters can examine the header, subject, and contents of a message to look for keywords or phrases that identify it as a known type of spam, and then take the appropriate actions to discard, quarantine, or block the message.

In addition to client application or client-side spam fi lters, there are also enterprise spam tools. Some enterprise tools are stand-alone devices, often called anti-spam appliances, whereas others are software additions to internal enterprise email servers. The benefi t of enterprise spam fi ltering is that it reduces spam distribution internally by blocking and discarding unwanted messages before they waste storage space on email servers or make their way to clients.

However, email spam fi lters are problematic. Just because a message includes keywords that are typically found in spam doesn’t mean every message with those words is spam.

Some legitimate, if not outright essential, messages include spam words. One method of addressing this issue is for the spam-fi ltering tool to place all suspected spam messages into a quarantine folder. Users can peruse this folder for misidentifi ed messages and retrieve them.

Another important issue to address when managing spam is spoofed email. A spoofed email is a message that has a fake or falsifi ed source address. When an email server receives an email message, it should perform a reverse lookup on the source address of the message.

If the source address is fake or nonexistent, the message should be discarded. Other methods of detecting or blocking spoofed messages include checking source addresses against blacklists and fi ltering on invalid entries in a message header.

Phishing

Phishing is the process of attempting to obtain sensitive information such as usernames, passwords, credit card details, or other personally identifi able information by masquerading as a trustworthy entity (a bank, a service provider, or a merchant, for example) in electronic communication (usually email). Spear phishing is a more targeted form of

3.2 Summarize various types of attacks

175

phishing where the message is crafted and directed specifi cally to an individual or group of individuals, rather than being just a blind broadcast to anyone. Whaling is a form of phishing that targets specifi c high-value targets (by title, by industry, from media coverage, and so forth) and sends messages tailored to the needs and interests of those targets. All take advantage of people’s willingness to extend trust to apparently legitimate third parties without applying rules of basic, common-sense information security (the most germane of these principles here are “never open unexpected email attachments” and “never share sensitive information via email”).

Spim

Spim is a term sometimes used to refer to spam over IM. It’s also called just spam, instant spam, or IM marketing. No matter what the name, it consists of unwanted messages transmitted through some form of instant messaging service, which can include Short Message

Service (SMS).

Vishing

Vishing is phishing done via Voice over IP (VoIP) services. VoIP is a technology that allows phone call–like conversations to take place over TCP/IP networks. Many companies and individuals use VoIP phones instead of traditional land-line phones. Vishing is simply another form of phishing attack. The main problem with vishing is that tracing the source or origin of the attacks is much more complicated. Thus, it’s more important than ever to be suspicious of phone calls, even those with correct caller ID. Take the extra effort to verify the caller, or hang up on them and then call them back using a known trusted phone number, such as the one on the back of your credit card or from the caller’s offi cial website.

Spear phishing

See the discussion of spear phishing in the previous “Phishing” section.

Xmas attack

The Xmas attack is actually an Xmas scan. It’s a form of port scanning that can be performed by a wide number of common port scanners, including Nmap, Xprobe, and hping2.

The Xmas scan sends a TCP packet to a target port with the fl ags of URG, PSH, and FIN all turned on. This creates a fl ag byte of 00101001 in the TCP header, which is said to be representative of alternating fl ashing lights on a Christmas tree.

According to the TCP specifi cations, ports should ignore any invalid construction of a packet if the port is open and send an RST back if the port is closed. This is true of all systems except for Windows OSs, which send RST for many invalid packets even if the port is open. An Xmas attack (or scan) occurs when someone sends Xmas-fl agged packets to one or more ports on a computer. If the level of scanning packets is signifi cant, this can affect

176

Chapter 3

Threats and Vulnerabilities the performance of the targeted system or consume some or all of the available bandwidth.

Thus, an Xmas scan can escalate to a DoS and thus be considered an Xmas attack.

Pharming

Pharming is the malicious redirection of a valid website’s URL or IP address to a fake website that hosts a false version of the original valid site. This is often part of a phishing attack where the attacker is attempting to trick victims into giving up their logon credentials. If potential victims aren’t careful or paying attention, they may be tricked into providing their logon information to the false, pharmed website. Pharming typically occurs either by modifying the local hosts fi le on a system or by poisoning or spoofi ng DNS resolution.

Pharming is an increasingly problematic activity as hackers have discovered means to exploit

DNS vulnerabilities to pharm various domain names for large groups of targeted users. For a detailed review of DNS and its vulnerabilities, read “An Illustrated Guide to the Kaminsky

DNS Vulnerability” at www.unixwiz.net/techtips/iguide-kaminsky-dns-vuln.html

.

Privilege escalation

Privilege escalation occurs when a user is able to obtain greater permissions, access, or privileges than they’re assigned by an organization. Privilege escalation can occur accidentally or due to administrative oversight, but usually this term refers to the specifi c and intentional abuse of a system to steal access.

Privilege escalation can take place via weaknesses in the OS. Often a hacker tool is used to exploit a programming fl aw or buffer overfl ow that may allow the attacking user to obtain permanent or temporary access to the administrators group. In other cases, privilege escalation occurs through identity theft or credential compromise, such as keystroke capturing or password cracking.

Privilege escalation is a violation of security. Specifi cally, it’s a breach of authorization restrictions and may be a breach of authentication. In order to prevent or stop privilege escalation, all OSs should be kept current with patches from the vendor. Additionally, auditing and monitoring should be confi gured to watch for privilege-escalation symptoms. These include repeated attempts to perform user account management by non-administrators as well as repeated attempts to access resources beyond a user’s assigned authorization level.

Malicious insider threat

One of the biggest risks at any organization is its own internal personnel. Hackers work hard to gain what insiders already have: physical presence within the facility or a working user account on the IT infrastructure. When an insider performs malicious activities, the threat is signifi cant, because they’re already past most physical barriers and may have easy access that lets them compromise logical security.

3.2 Summarize various types of attacks

177

Malicious insiders can bring in malicious code from outside on various storage devices, including mobile phones, memory cards, optical discs, and USB drives. These same storage devices can be used to leak or steal internal confi dential and private data in order to disclose it to the outside world. (Where do you think most of the content on WikiLeaks comes from?) Malicious insiders can execute malicious code, visit dangerous websites, or intentionally perform harmful activities.

The means to reduce the threat of malicious insiders include thorough background checks, strong policies with severe penalties, detailed user activity auditing and monitoring, prohibition of external and private storage devices, and use of whitelists to minimize unauthorized code execution.

DNS poisoning and ARP poisoning

DNS poisoning is the act of falsifying the DNS information used by a client to reach a desired system. It can take place in many ways. Whenever a client needs to resolve a DNS name into an IP address, it may go through the following four-step process:

1.

Check the local cache.

2.

Check the local hosts file.

3.

Send a DNS query to a known DNS server.

4.

Send a broadcast query to any possible local subnet DNS server. (This step isn’t widely supported.)

If the client doesn’t obtain a DNS-to-IP resolution from any of these steps, the resolution fails and the communication can’t be sent. DNS poisoning can take place at any of these steps, but the easiest way is to corrupt the hosts fi le or the DNS server query.

There are many ways to attack or exploit DNS. An attacker might use one of these techniques:

Deploy a Rogue DNS Server A rogue DNS server can listen in on network traffi c for any

DNS query or specifi c DNS queries related to a target site. Then the rogue DNS server sends a DNS response to the client with false IP information. This attack requires that the rogue DNS server get its response back to the client before the real DNS server responds.

Once the client receives the response from the rogue DNS server, the client closes the DNS query session, which causes the response from the real DNS server to be dropped and ignored as an out-of-session packet.

Perform DNS Poisoning DNS poisoning involves attacking the real DNS server and placing incorrect information into its zone fi le. This causes the real DNS server to send false data back to clients.

Alter the Hosts File Modifying the hosts fi le on the client by placing false DNS data into it redirects users to false locations.

178

Chapter 3

Threats and Vulnerabilities

Corrupt the IP Configuration Corrupting the IP confi guration can result in a client having a false DNS server defi nition. This can be accomplished either directly on the client or on the network’s DHCP server.

Use Proxy Falsification This method only works against web communications. This attack plants false web proxy data into a client’s browser, and then the attacker operates the rogue proxy server. A rogue proxy server can modify HTTP traffi c packets to reroute requests to whatever site the hacker wishes.

Although there are many DNS poisoning methods, here are some basic security measures you can take that can greatly reduce their threat:

Limit zone transfers from internal DNS servers to external DNS servers.

Limit the external DNS servers from which internal DNS servers pull zone transfers.

Deploy a network intrusion detection system (NIDS) to watch for abnormal DNS traffic.

Properly harden all DNS, server, and client systems in your private network.

Use DNSSEC to secure your DNS infrastructure.

Address Resolution Protocol (ARP) poisoning is the act of falsifying the IP-to-MAC address-resolution system employed by TCP/IP. ARP operates at Layer 2, the Data Link layer of the OSI model. ARP is responsible for resolving IP addresses into MAC addresses.

This allows Layer 2 to physically address transmissions before sending them to the Physical layer (Layer 1). Similar to DNS, ARP resolution is a multistep process, but it has two steps instead of four:

1.

Check the local ARP cache.

2.

If that fails, transmit an ARP broadcast.

The ARP broadcast is a transmission to all possible recipients in the local subnet, asking all hosts if they own the IP address in question. If the owner of the IP address is present, it responds with a direct replay to the source system with its MAC address.

MAC addresses are essential for TCP/IP communications because transmissions occur from host to host and router to router, based not solely on IP address but primarily on

MAC addresses. When a host sends data to another host, if that host is in the same subnet, it transmits the signal from its MAC-addressed NIC to the target’s MAC-addressed NIC.

If the target is in a different subnet, it sends the message to the MAC-addressed NIC of the default gateway (which is the router interface in that subnet). Then, that router takes over and tries to fi nd the target host, either with a subnet directly off one of its ports or by sending the message to another router that may have a greater chance of being connected to the target host’s subnet. Without proper ARP activity, this process isn’t possible.

ARP poisoning can take place in many ways. The most common ways are to poison the local ARP cache or to transmit poisoned ARP replies or announcements. In either case, if a host obtains a false MAC address for an IP address, its transmission is likely to go to the wrong location. This tactic is most effective within a single subnet, but it does have an effect across multiple subnets. ARP poisoning is commonly used in active sniffi ng attacks

3.2 Summarize various types of attacks

179

where false ARP announcements are used to overload the MAC mapping cache of a switch in order to force it into a fault-tolerant mode of transmitting all data out all ports.

One popular tool used to monitor for ARP poisoning is arpwatch. However, the best defense against ARP-based attacks, including ARP poisoning, is port security on the access switch level.

Transitive access

Transitive access is a potential backdoor or way to work around traditional means of access control. The idea is that user A can use process B, and process B can use or invoke process

C, and process C can access object D (see Figure 3.7). If process B exits (or is otherwise inaccessible) before process C completes, process C may return access to object D back to user

A, even if user A doesn’t directly or by intent have access to object D (see Figure 3.8). Some forms of access control don’t specifi cally prevent this problem. All subject to object accesses should be validated before access is granted, rather than relying on previous verifi cations.

F I G U R E 3 . 7 Transitive access

B C

A D

F I G U R E 3 . 8 A transitive access exploit

B

A

C

D

Client-side attacks

A client-side attack is any attack that is able to compromise a client. Generally, when attacks are discussed, it’s assumed that the primary target is a server or a server-side component. A client-side or client-focused attack is one where the client itself, or a process on the client, is the target. A common example of a client-side attack is a malicious website that transfers malicious mobile code to a vulnerable browser running on the client. Clientside attacks can occur over any communications protocol, not just HTTP.

Password attacks

Passwords are the most common form of authentication; at the same time, they’re the weakest form of authentication. Reliance solely on passwords isn’t true security. The strength of a password is generally measured in the amount of time and effort involved in breaking the password through various forms of cryptographic attacks. These attacks are

180

Chapter 3

Threats and Vulnerabilities collectively known as password cracking or password guessing. A weak password invariably uses only alphanumeric characters; often employs dictionary or other common words; and may include user profi le–related information such as birthdates, Social Security numbers, and pet names. A strong password is longer, more complex, unique, and changed on a regular basis.

At least four attack methods are used to steal or crack passwords. All of them involve

reverse hash matching. This is the process of stealing the hash of a password directly from an authentication server’s account database or plucking it out of network traffi c, and then reverse-engineering the original password. This is done by taking potential passwords, hashing them, and then comparing the stolen hash with the potential password hash. If a match is found, then the potential password is probably the actual password. (By the way, even if the potential password isn’t the actual password, if it happens to produce the same hash, it will be accepted by the authentication system as the valid password.) The four password-cracking or -guessing attacks are brute force (aka birthday attack), dictionary, hybrid, and rainbow tables.

Brute force

Brute-force attacks generate hashes based on generated passwords. A brute-force attack tries every valid combination for a password, starting with single characters and adding characters as it churns through the process. Such attacks are always successful, given enough time. Unfortunately, computational capabilities have increased to the point that most hashes produced from common or memorable passwords are crackable in days or less.

Dictionary attacks

These attacks generate hashes to compare by using prebuilt lists of potential passwords.

Often these lists are related to a person’s interests, hobbies, education, work environment, and so forth. Dictionary attacks are remarkably successful against nonsecurity professionals.

Hybrid

These attacks take the base dictionary list attack and perform various single-character and then multicharacter manipulations on those base passwords. This includes adding numbers or replacing letters with numbers or symbols. Hybrid attacks are often successful even against security professionals who think they’re being smart by, for example, changing a to @ and o to 0 and adding the number 12 to the end of the name of their favorite movie character.

Birthday attacks

Birthday attack is another name for a brute-force attack. However, it’s derived from the birthday problem, which is found in the area of mathematics known as probability theory.

The issue is that because there are only 366 possible birthdays (don’t forget leap year!), the chance of two people sharing the same birth month and day increases exponentially as

3.2 Summarize various types of attacks

181

group size increases. It takes only 23 people for there to be a 50 percent chance that two share the same birthday, and only 75 people are needed for a 99.9 percent chance. When this logic is applied to cracking passwords (or encryption keys), it shows that because the target is part of a fi nite set (large, yes, but still fi nite), the likelihood of guessing correctly increases with each subsequent guess. In other words, each wrong guess removes one option from the remaining pool, so the next guess has a slightly greater chance of being correct. This is why brute-force attacks are successful—given enough time to perform guesses, the probability of success continues to increase.

Rainbow tables

The really worrisome password attack is called rainbow tables. Traditionally, password crackers hashed each potential password and then performed an Exclusive Or (XOR) comparison to check it against the stolen hash. The hashing process is much slower than the XOR process, so 99.99 percent of the time spent cracking passwords was actually spent generating hashes. A new form of password cracking was developed to remove the hashing time from the cracking time. Massive databases of hashes are created for every potential password, from single characters on up, using all keyboard characters (or even all ASCII 255 characters). Currently, a rainbow table for cracking Windows OS passwords is available that contains all the hashes for passwords from 1 to 14 characters using any keyboard character. That database is 64 GB in size, but it can be used in an attack to crack a password in less than 3 hours. This means all Windows OS passwords of 14 characters or less are worthless.

To protect yourself from this threat, change all of your Windows OS and network passwords to a minimum of 16 characters. Or, if you get approval from your security administrator, start using one or more higher-order ASCII characters in a password of at least eight characters. You can’t just use the higher-order ASCII characters, because many legacy systems (those written prior to 2000) don’t support them. If not every system you interact with supports higher-order ASCII characters, you can’t use them.

Typo squatting/URL hijacking

Typo squatting or URL hijacking is a practice employed to capture traffi c when a user mistypes the domain name or IP address of an intended resource. A squatter predicts URL typos and then registers those domain names to direct traffi c to their own site. This can be done for competition or for malicious intent. The variations used for typo squatting include common misspellings (such as googel.com), typing errors (such as gooogle.com), variations on a name or word (for example, plurality, as in googles.com), and different top-level domains (such as google.org).

Watering hole attack

A watering hole attack is a form of targeted attack against a region, a group, or an organization. The attack is performed in three main phases. The fi rst phase is to observe the

182

Chapter 3

Threats and Vulnerabilities target’s habits. The goal is to discover a common resource, site, or location that one or more members of the target frequent. These locations are considered the watering hole.

The second phase is to plant malware on watering hole systems. The third phase is to wait for members of the target to revisit the poisoned watering hole and then bring the infection back into the group. The name is derived from the concept of wiping out an animal population by poisoning its primary water source. This technique is fairly effective at infi ltrating groups that are well secured, are diffi cult to breach, or operate anonymously.

For an example of a watering hole attack performed by the FBI, see www.wired.com/ threatlevel/2013/09/freedom-hosting-fbi/

.

Exam Essentials

Understand a man-in-the-middle attack. A man-in-the-middle attack is a form of communications eavesdropping attack. Attackers position themselves in the communication stream between a client and server (or any two communicating entities). The client and server believe they’re communicating directly with each other.

Understand DDoS. Distributed denial-of-service (DDoS) employs an amplifi cation or bounce network that is an unwilling and unknowing participant that is unfortunately able to receive broadcast messages and create message responses, echoes, or bounces. In effect, the attacker sends spoofed message packets to the amplifi cation network’s broadcast address.

Understand DoS. Denial of service (DoS) is a form of attack that has the primary goal of preventing the victimized system from performing legitimate activity or responding to legitimate traffi c. One form exploits a weakness, an error, or a standard feature of software to cause a system to hang, freeze, consume all system resources, and so on. The end result is that the victimized computer is unable to process any legitimate tasks. Another form fl oods the victim’s communication pipeline with garbage network traffi c. The end result is that the victimized computer is unable to send or receive legitimate network communications.

Understand a replay attack. An attacker captures network traffi c and then replays the captured traffi c in an attempt to gain unauthorized access to a system.

Understand a Smurf attack. This form of DRDoS uses ICMP echo reply packets (ping packets).

Understand spoofing. Spoofi ng is the act of falsifying data. Usually the falsifi cation involves changing the source addresses of network packets. Because the source address is changed, victims are unable to locate the true attackers or initiators of a communication.

Also, by spoofi ng the source address, attackers redirect responses, replies, and echoes of packets to some other system.

3.2 Summarize various types of attacks

183

Understand spam. Spam is any type of email that is undesired and/or unsolicited. Think of spam as the digital equivalent of junk mail and door-to-door solicitations.

Understand phishing. Phishing is the process of attempting to obtain sensitive information such as usernames, passwords, credit card details, or other personally identifi able information by masquerading as a trustworthy entity (a bank, a service provider, or a merchant, for example) in electronic communication (usually email).

Understand spim. Spim is a term sometimes used to refer to spam over IM.

Understand vishing. Vishing is phishing done over VoIP services.

Understand spear phishing. Spear phishing is a more targeted form of phishing where the message requesting information appears to originate from a colleague or co-worker at the target’s own company or organization, often someone in a position of authority.

Understand Xmas attacks. The Xmas attack is actually an Xmas scan. It’s a form of port scanning that can be performed by a wide number of common port scanners, including

Nmap, Xprobe, and hping2. The Xmas scan sends a TCP packet to a target port with the fl ags URG, PSH, and FIN all turned on.

Understand pharming. Pharming is the malicious redirection of a valid website’s URL or

IP address to a fake website that hosts a false version of the original valid site.

Understand privilege escalation. Privilege escalation occurs when a user account is able to obtain unauthorized access to higher levels of privileges, such as a normal user account that can perform administrative functions.

Understand DNS poisoning. DNS poisoning is the act of falsifying the DNS information used by a client to reach a desired system.

Understand ARP poisoning. ARP poisoning is the act of falsifying the IP-to-MAC address resolution system employed by TCP/IP.

Understand password attacks. The strength of a password is generally measured in the amount of time and effort involved in breaking the password through various forms of cryptographic attacks. These attacks are collectively known as password cracking or password guessing. Forms of password attacks include brute force (aka birthday attack), dictionary, hybrid, and rainbow tables.

Understand typo squatting/URL hijacking. Typo squatting or URL hijacking is a practice employed to capture traffi c when a user mistypes the domain name or IP address of an intended resource.

Understand watering hole attacks. A watering hole attack is a form of targeted attack against a region, a group, or an organization. It’s waged by poisoning a commonly accessed resource.

184

Chapter 3

Threats and Vulnerabilities

3.3 Summarize social engineering attacks and the associated effectiveness with each attack

Social engineering is a form of attack that exploits human nature and human behavior.

Social-engineering attacks take two primary forms: convincing someone to perform an unauthorized operation or convincing them to reveal confi dential information. For example, the victim may be fooled into believing that a received email is authoritative (such as an email hoax), that a person on the phone is someone to be respected and obeyed (such as someone claiming to be from tech support or a manager offsite), or that a person with them is who they claim to be (such as an A/C repair technician). In just about every case, a socialengineering attack tries to convince the victim to perform some activity or reveal a piece of information that they shouldn’t.

Any form of advertisement could be considered a form of social-engineering attack—ads appeal to you in an attempt to get you to purchase or use a product or service. Although an advertisement’s motivation is profi t, most social-engineering attacks’ motives are more malevolent. In fact, hackers now have access to sophisticated technology to assist in their social-engineering endeavors.

One such tool is the Social Engineering Toolkit (SET). As you can see on the http:// social-engineer.org

website, SET was specifi cally designed to perform advanced attacks against the human element. It integrates with the Metasploit framework to allow an attacker to take control of a remote computer by enticing the soon-to-be victim to click a pop-up of some sort. For instance, a gamer playing the latest version of the newest hot online video game could receive a pop-up stating that there is temporary net congestion. It might then say, “Please select Stay Online if performance is acceptable or select Disconnect to disconnect and reconnect.” Either selection results in the attacker’s code being run and possibly in the exploitation of the system. The user-interaction portion of the attack is why this is referred to as the Social Engineering Toolkit.

Here are some example scenarios of common social-engineering attacks:

A worker receives an email warning about a dangerous new virus spreading across the

Internet. The message directs the worker to look for a specific file on the hard drive and delete it, because it indicates the presence of the virus. Often, however, the identified file is really an essential file needed by the system.

A website claims to offer free temporary access to its products and services, but it requires web browser and/or firewall alterations in order to download the access software.

A secretary receives a phone call from a person claiming to be a client who is running late to meet the CEO. The caller asks for the CEO’s private cell phone number in order to call them.

The helpdesk receives a call from an outside line. The caller claims to be a manager of a department who is currently involved in a sales meeting in another city. The caller

3.3 Summarize social engineering attacks

185

■ claims to have forgotten their password and needs it to be reset so that they can log in remotely to download an essential presentation.

Someone who looks like an A/C repair technician enters the office and claims a service call was received for a malfunctioning unit in the building. The “technician” is sure the unit can be accessed from inside your office work area and asks to be given free rein to repair the A/C system.

An unexpected pop-up requires a selection of some sort.

These are just a few examples of possible social-engineering attacks. These may also be legitimate and benign occurrences, but you can see how they could mask the motives and purposes of an intentional attacker.

Methods to protect against social engineering include the following:

Training personnel about social-engineering attacks and how to recognize common signs

Requiring authentication when performing activities for personnel over the phone

Defining restricted information that is never communicated over the phone

Always verifying the credentials of a repair person and verifying that a real service call was placed by authorized personnel

Never following the instructions of an email without verifying the information with at least two independent and trusted sources

Always erring on the side of caution when dealing with anyone you don’t know or recognize, whether in person, over the phone, or over the Internet/network

The only real defense against social-engineering attacks is user education and awareness training. A healthy dose of paranoia and suspicion will help users detect or notice socialengineering attack attempts. Training should include role playing and numerous examples of the various forms of social-engineering attacks.

Shoulder surfing

Shoulder surfi ng occurs when someone is able to watch your keyboard or view your display. This could allow them to learn your password or see information that is confi dential, private, or simply not for their eyes. Often, shoulder surfi ng is stopped by dividing worker groups by sensitivity levels using locked doors.

Dumpster diving

Dumpster diving is the act of digging through trash in order to obtain information about a target organization or individual. Dumpster diving can provide an attacker with information that could make social-engineering attacks easier or more effective. To prevent dumpster diving or at least reduce its value, all documents should be shredded and/or incinerated before being discarded. Additionally, no storage media should ever be discarded in the trash; use a secure disposal technique or service.

186

Chapter 3

Threats and Vulnerabilities

Tailgating

Tailgating is the act of gaining unauthorized access to a location by sneaking in after an authorized person enters their credentials. See the discussion in Chapter 2, section 2.6, subsection “Prevent Tailgating.”

Impersonation

Impersonation is the act of taking on the identity of someone else. This can take place in person, over the phone, or through any other means of communication. The purpose of impersonation is to fool someone into believing you’re the claimed identity so you can use the power or authority of that identity. Impersonation is a common element of social engineering. A form of impersonation known as pretexting can occur when an individual describes a false situation as a pretext for the social-engineering attack.

Hoaxes

A hoax is a form of social engineering designed to convince targets to perform an action that will cause problems or reduce their IT security. A hoax is often an email that proclaims some imminent threat is spreading across the Internet and that you must perform certain tasks in order to protect yourself. Victims may be instructed to delete fi les or change confi guration settings, which results in a compromised OS, a nonbooting OS, or a reduction in their security defenses. Additionally, hoax emails often encourage the victim to forward the message to all their contacts in order to “spread the word.”

Whaling

Whaling is a form of phishing that targets specifi c individuals (by title, by industry, from media coverage, and so forth), such as C-level executives or high-net-worth clients, and sends messages tailored to the needs and interests of those individuals.

Vishing

Vishing is VoIP phishing. See the discussion earlier in this chapter in section 3.2.

Principles (reasons for effectiveness)

Social engineering works so well because we’re human. The principles of social-engineering attacks are designed to focus on various aspects of human nature and take advantage of them. Although not every target succumbs to every attack, most of us are vulnerable to one or more of the common social-engineering principles.

Authority

Authority is an effective technique because most people are likely to respond to authority with obedience. The trick is to convince the target that the attacker is someone with valid

3.3 Summarize social engineering attacks

187

authority. That authority can be from within an organization’s internal hierarchy or from an external recognized authority, such as law enforcement, technical support, pest extermination, utility inspection, debt collection, and so on. Some attackers claim their authority verbally, and others assume authority by wearing a costume or uniform.

Intimidation

Intimidation can sometimes be seen as a derivative of the authority principle. Intimidation uses authority, confi dence, or even the threat of harm to motivate someone to follow orders or instructions. Often, intimidation is focused on exploiting uncertainty in a situation where a clear directive of operation or response isn’t defi ned. The attacker attempts to use perceived or real force to bend the will of the victim before the victim has time to consider and respond with a denial.

Consensus/Social proof

Consensus or social proof is the act of taking advantage of a person’s natural tendency to mimic what others are doing or are perceived as having done in the past. For example, bartenders often seed their tip jar with money to make it seem as if previous patrons were appreciative of the service. People visiting a tourist spot might carve their name in a railing because many previous visitors’ names are present. People will stop walking down the street and join a crowd, just to see what is going on. As a social-engineering principle, the attacker attempts to convince the victim that a particular action or response is preferred in order to be consistent with social norms or previous occurrences. For example, an attacker may claim that a worker who is currently out of the offi ce promised a large discount on a purchase and that the transaction must occur now with you as the salesperson.

Scarcity

Scarcity is a technique used to convince someone that an object has a higher value based on the object’s scarcity. For example, shoppers often feel motivated to make a purchase because of a limited-time offer, due to a dwindling stock level, or because an item is no longer manufactured.

Urgency

Urgency often dovetails with scarcity, because the need to act quickly increases as scarcity indicates a greater risk of missing out. Urgency is often used as a method to get a quick response from a target before they have time to carefully consider or refuse compliance.

Familiarity/liking

Familiarity or liking as a social-engineering principle attempts to exploit a person’s native trust in that which is familiar. The attacker often tries to appear to have a common contact or relationship with the target, such as mutual friends or experiences, or uses a facade to take on the identity of another company or person. If the target believes a message is from a known entity, such as a friend or their bank, they’re much more likely to trust in the content and even act or respond.

188

Chapter 3

Threats and Vulnerabilities

Trust

Trust as a social-engineering principle involves an attacker working to develop a relationship with a victim. This may take seconds or months, but eventually the attacker attempts to use the value of the relationship (the victim’s trust in the attacker) to convince the victim to reveal information or perform an action.

Exam Essentials

Understand shoulder surfing. Shoulder surfi ng occurs when someone is able to watch your keyboard or view your display. This may allow them to learn your password or see information that is confi dential, private, or simply not for their eyes.

Understand dumpster diving. Dumpster diving is the act of digging through trash in order to obtain information about a target organization or individual. It can provide an attacker with information that could make social-engineering attacks easier or more effective.

Understand impersonation. Impersonation is the act of taking on someone else’s identity.

This can take place in person, over the phone, or through any other means of communication. The purpose of impersonation is to trick someone into believing you’re the claimed identity so you can use the power or authority of that identity.

Understand hoaxes. A hoax is a form of social engineering designed to convince targets to perform an action that will cause problems or reduce their IT security. A hoax is often an email that proclaims some imminent threat is spreading across the Internet and that you must perform certain tasks in order to protect yourself.

Understand whaling. Whaling is a form of phishing that targets specifi c individuals

(by title, by industry, from media coverage, and so forth), such as C-level executives or high-net-worth clients, and sends messages tailored to the needs and interests of those individuals.

Understand principles of social engineering. Many techniques are involved in socialengineering attacks. These often involve one or more common principles such as authority, intimidation, consensus/social proof, scarcity, urgency, familiarity/liking, and trust.

3.4 Explain types of wireless attacks

Wireless communication is a quickly expanding fi eld of technologies for networking, connectivity, communication, and data exchange. Literally thousands of protocols, standards, and techniques can be labeled as wireless. These include cell phones, Bluetooth, cordless phones, and wireless networking. As wireless technologies continue to proliferate, your organization’s security must go beyond locking down its local network. Security should be an end-to-end solution that addresses all forms, methods, and techniques of communication.

3.4 Explain types of wireless attacks

189

Wireless networking has become common on both corporate and home networks.

Properly managing wireless networking for reliable access as well as security isn’t always an easy or straightforward proposition. This section examines various wireless security issues.

Rogue access points

One vulnerability commonly discovered during a site survey is the presence of rogue wire-

less access points. A wireless access point can be connected to any open network port or cable. Such unauthorized access points usually aren’t confi gured for security or, if they are, aren’t confi gured properly or in line with the organization’s approved access points. Rogue wireless access points should be discovered and removed in order to eliminate an unregulated access path into your otherwise secured network.

It isn’t an uncommon tactic for an attacker to fi nd a way to visit your company (via a friend who is an employee or by going on a company tour, posing as a repair man or breakfast taco seller, or even breaking in at night) in order to plant a rogue access point. After a rogue access point is positioned, an attacker can gain entry to the network easily from a modest distance away from your front door.

Jamming/Interference

Wireless communications employ radio waves to transmit signals over a distance. There is a fi nite amount of radio wave spectrum; thus, its use must be managed properly to allow multiple simultaneous uses with little to no interference. The radio spectrum is measured or differentiated using frequency. Frequency is a measurement of the number of wave oscillations within a specifi c time, identifi ed using the unit Hertz (Hz), or oscillations per second. Radio waves have a frequency between 3 Hz and 300 GHz. Different ranges of frequencies have been designated for specifi c uses, such as AM and FM radio, VHF and

UHF television, and so on. Currently, the 900 MHz, 2.4 GHz, and 5 GHz frequencies are the most commonly used in commercial wireless products because of their unlicensed categorization. However, to manage the simultaneous use of the limited radio frequencies, several spectrum-use techniques were developed. These include spread spectrum, frequency hopping spread spectrum (FHSS), direct sequence spread spectrum (DSSS), and orthogonal frequency-division multiplexing OFDM.

Most devices operate within a small subsection of frequencies rather than all available frequencies. This is because of frequency-use regulations (in other words, the FCC in the United States), power consumption, and the expectation of interference.

Spread spectrum means communication occurs over multiple frequencies at the same time. Thus, a message is broken into pieces, and each piece is sent at the same time but using a different frequency. Effectively this is a parallel communication rather than a serial communication.

190

Chapter 3

Threats and Vulnerabilities

Frequency hopping spread spectrum (FHSS) was an early implementation of the spread spectrum concept. However, instead of sending data in a parallel fashion, it transmits data in a series while constantly changing the frequency in use. The entire range of available frequencies is employed, but only one frequency at a time is used. As the sender changes from one frequency to the next, the receiver has to follow the same hopping pattern to pick up the signal. FHSS was designed to help minimize interference by not using only a single frequency that could be affected. Instead, by constantly shifting frequencies, it minimizes interference.

Direct sequence spread spectrum (DSSS) employs all the available frequencies simultaneously in parallel. This provides a higher rate of data throughput than FHSS. DSSS also uses a special encoding mechanism known as chipping code to allow a receiver to reconstruct data even if parts of the signal were distorted due to interference. This occurs in much the same way that the parity of RAID 5 allows the data on a missing drive to be re-created.

Orthogonal frequency-division multiplexing (OFDM) is yet another variation on frequency use. OFDM employs a digital multicarrier modulation scheme that allows for a more tightly compacted transmission. The modulated signals are perpendicular (orthogonal) and thus don’t cause interference with each other. Ultimately, OFDM requires a smaller frequency set (aka channel bands) but can offer greater data throughput.

Wireless Channels

There are many more topics within the scope of wireless networking that we aren’t addressing due to space limitations and because they’re not covered on the exam. For instance, you may want to learn more about wireless channels. Within the assigned frequency of the wireless signal are subdivisions of that frequency known as channels.

Think of channels as lanes on the same highway. In the United States, there are 11 channels, in Europe there are 13, and in Japan there are 17. The differences stem from local laws regarding frequency management (think international versions of the United

States’ FCC).

Wireless communications take place between a client and an access point over a single channel. However, when two or more access points are relatively close to each other physically, signals on one channel can interfere with signals on another channel. One way to avoid this is to set the channels of physically close access points as far apart as possible to minimize channel overlap interference. For example, if a building has four access points arranged in a line along the length of the building, the channel settings could be 1,

11, 1, and 11. But if the building is square and an access point is in each corner, the channel settings may need to be 1, 4, 8, and 11. Think of the signal within a single channel as being like a wide-load truck in a lane on the highway. The wide-load truck is using part of each lane on either side of it, thus making passing in those lanes dangerous. Likewise, wireless signals in adjacent channels will interfere with each other.

3.4 Explain types of wireless attacks

191

Interference may occur by accident or through intention. Intentional interference is a form of jamming. Jamming is the transmission of radio signals to prevent reliable communications by decreasing the effective signal-to-noise ratio. To avoid or minimize interference and jamming, start by adjusting the physical location of devices. Next, check for devices using the same frequency and/or channel. If there are confl icts, change the frequency or channel in use on devices you control. If an interference attack is occurring, try to triangulate the source of the attack and take appropriate steps to address the concern; that is, contact law enforcement if the source of the problem is outside of your physical location.

Evil twin

Evil twin is an attack where a hacker confi gures their system as a twin of a valid wireless access point. Victims are tricked into connecting to the fake twin instead of the valid original wireless network. This enables the hacker to eavesdrop on communications through a man-in-the-middle attack, which could lead to a session hijacking. The only defenses against an evil twin are to know all the details about the valid wireless access point and ensure that your system only connects to it, and to implement virtual private network

(VPN) encryption from your client to a trusted online server.

War driving

War driving is the act of using a detection tool to look for wireless networking signals.

Often, war driving refers to someone looking for a wireless network they aren’t authorized to access. In a way, war driving is performing a site survey for possibly malicious or at least unauthorized purposes. The name comes from the legacy attack concept of war dialing, which was used to discover active computer modems by dialing all the numbers in a prefi x or an area code.

War driving can be performed with a dedicated handheld detector, with a PDA with

WiFi capabilities, or with a notebook that has a wireless network card. It can be performed using native features of the OS, or using specialized scanning and detecting tools.

Once a wireless network is detected, the next step is to determine whether the network is open or closed. An open network has no technical limitations as to what devices can connect to it, whereas a closed network has technical limitations to prevent unauthorized connections. If the network is closed, an attacker may try to guess or crack the technologies preventing the connection. Often, the setting making a wireless network closed (or at least hidden) is the disabling of service set identifi er (SSID) broadcasting. This restriction is easily overcome with a wireless SSID scanner. After this, the hacker determines whether encryption is being used, what type it is, and if it can be overcome.

Bluejacking

Bluejacking involves sending messages to Bluetooth-capable devices without the permission of the owner/user. Just about any Bluetooth-enabled device, such as a PDA, a cell phone,

192

Chapter 3

Threats and Vulnerabilities and even a notebook computer, can receive a bluejacked message. Most bluejacking involves sending a vCard (a virtual business card) to a target device over the Object Exchange

(OBEX) protocol (which is also used by infrared communications). Bluetooth on many small portable devices may only be accessible from 10 meters away or less (due to the 1 mW power antenna), whereas on a notebook, Bluetooth may be accessible from up to

100 meters away (due to the 100 mW power antenna).

A bluejack message is often positioned in the name fi eld of the vCard, with little or nothing else. This limits the messages to short strings of text. But this stunt can still be used to pull off various pranks, teasing, and advertisements. Some multimedia message–capable phones are also able to receive images and sound. Bluejacking is mostly harmless, because it doesn’t contain malicious code—at least, not so far.

Bluesnarfing

Bluesnarfi ng is the unauthorized access of data via a Bluetooth connection. Often the term bluejacking is mistakenly used to describe or label the activity of bluesnarfi ng.

Successful bluesnarfi ng attacks against PDAs, cell phones, and notebooks have been able to extract calendars, contact lists, text messages, emails, pictures, videos, and more. Because bluesnarfi ng involves stealing data, it’s illegal in most countries.

Bluesnarfi ng typically occurs over a paired link between the hacker’s system and the target device. If the device isn’t enabled to be seen by the public (that is, discoverable) or to allow pairing, bluesnarfi ng usually isn’t possible. There was a Bluetooth fl aw that could be exploited to perform bluesnarfi ng against phones that were set up as private, but this has long since been patched. It’s true that bluesnarfi ng is also possible against non-discoverable devices if you know their Bluetooth MAC address, but this usually isn’t a practical attack because the 48-bit address must be guessed.

War chalking

War chalking is a type of geek graffi ti that some wireless hackers used back near the year 2000. It’s a way to physically mark an area with information about the presence of a wireless network. A closed circle indicated a closed or secured wireless network, and two back-to-back half circles indicated an open network. Now that most of this information is clearly posted for public access and is available online for not-so-public scrutiny, war chalking is a legacy issue.

IV attack

The IV in IV attack stands for initialization vector. IV is a mathematical and cryptographic term for a random number. Most modern crypto functions use IVs in order to increase their security by reducing predictability and repeatability. An IV becomes a point of weakness when it’s either too short, exchanged in plain text, or selected improperly. The best example of an IV attack is that of cracking Wireless Equivalent Privacy (WEP) encryption.

3.4 Explain types of wireless attacks

193

WEP is the original encryption option of 802.11 wireless networking. It’s based on RC4.

However, due to mistakes in its design and implementation, WEP’s primary fl aw is related to its IV. The WEP IV is only 24 bits long and is transmitted in plain text. This, coupled with the fact that WEP doesn’t check for packet freshness, allows a live WEP crack to be successful in less than 60 seconds (see the Wesside-ng tool from the Aircrack-ng suite at www.aircrack-ng.org

).

Packet sniffing

See the discussion of sniffi ng in Chapter 1, section 1.1, subsection “Protocol analyzers.”

Near field communication

Near fi eld communication (NFC) is a standard to establish radio communications between devices in close proximity. It lets you perform a type of automatic synchronization and association between devices by touching them together or bringing them within inches of each other. NFC is commonly found on smart phones and many mobile device accessories.

It’s often used to perform device-to-device data exchanges, set up direct communications, or access more complex services such as WPA-2 encrypted wireless networks by linking with the wireless access point via NFC. Because NFC is a radio-based technology, it isn’t without its vulnerabilities. NFC attacks can include man-in-the-middle, eavesdropping, data manipulation, and replay attacks.

Replay attacks

A replay attack is the retransmission of captured communications in hope of gaining access to the targeted system. See the earlier section “Replay.”

WEP/WPA attacks

WEP and WPA attacks can focus on either password guessing or encryption key discovery.

For more on WEP and WPA, refer to Chapter 1, section 1.5, “Given a scenario, troubleshoot security issues related to wireless networking.” Also see the further discussion in

Chapter 6, section 6.2, “Given a scenario, use appropriate cryptographic methods.”

WPS attacks

WiFi Protected Setup (WPS) is a security standard for wireless networks. It was intended to simplify the effort involved in adding new clients to a well-secured wireless network.

It operated by auto-connecting the fi rst new wireless client to seek the network once the administrator triggered the feature by pressing the WPS button on the base station.

However, the standard also called for a code that could be sent to the base station remotely in order to trigger WPS negotiation without the need to physically press the button. This led

194

Chapter 3

Threats and Vulnerabilities to a brute force guessing attack that could enable a hacker to guess the WPS code in hours, which in turn enabled the hacker to connect their own unauthorized system to the wireless network.

WPS is a feature that is enabled by default on most wireless access points. It’s important to disable it as part of a security pre-deployment process. If a device doesn’t offer to turn off WPS (or the Off switch doesn’t work), upgrade or replace the base station’s fi rmware or replace the whole device.

Exam Essentials

Understand rogue access points. A rogue wireless access point can be connected to any open network port or cable. Such unauthorized access points usually aren’t confi gured for security or, if they are, aren’t confi gured properly or in line with the organization’s approved access points. Rogue wireless access points should be discovered and removed in order to eliminate an unregulated access path into your otherwise secured network.

Understand evil twin attacks. During an evil twin attack, a hacker confi gures their system as a twin of a valid wireless access point. Victims are tricked into connecting to the fake twin instead of the valid original wireless network.

Understand war driving. War driving is the act of using a detection tool to look for wireless networking signals. Often, war driving is the process of someone looking for a wireless network they aren’t authorized to access.

Understand bluejacking. Bluejacking is the sending of messages to Bluetooth-capable devices without the permission of the owner/user. Just about any Bluetooth-enabled device, such as a PDA, cell phone, or notebook computer, can receive a bluejacked message.

Understand bluesnarfing. Bluesnarfi ng is the unauthorized accessing of data via a

Bluetooth connection. Successful bluesnarfi ng attacks against PDAs, cell phones, and notebooks have been able to extract calendars, contact lists, text messages, emails, pictures, videos, and more.

Understand WPS attacks. WPS is a security standard for wireless networks. The standard called for a code that could be sent to the base station remotely in order to trigger WPS negotiation. This led to a brute force guessing attack that could enable a hacker to guess the

WPS code in just hours.

3.5 Explain types of application attacks

Application hardening is the task of imposing security on required applications and services. This usually involves tuning and confi guring the native security features of the installed software and installing supportive security applications as needed. When you’re

3.5 Explain types of application attacks

195

developing new applications in house, it’s important to include security design, implementation, and integration throughout the development process.

Application hardening is often seen as a sub-element of OS hardening. In fact, many of the same steps and procedures used to lock down an OS are used to harden an application or service. In addition to the general notion of disabling any unneeded protocols and services, you should also disable any unneeded features, functions, or capabilities of a service or protocol based on the server’s role and the capabilities your organization needs.

Cross-site scripting

Cross-site scripting (XSS) is a form of malicious code-injection attack in which an attacker is able to compromise a web server and inject their own malicious code into the content sent to other visitors. Hackers have discovered numerous and ingenious methods for injecting malicious code into websites via CGI scripts, web server software vulnerabilities, SQL injection attacks, frame exploitation, DNS redirects, cookie hijacks, and many other forms of attack. A successful XSS attack can result in identity theft, credential theft, data theft, fi nancial losses, or the planting of remote-control software on visiting clients.

Defenses against XSS include maintaining a patched web server, using fi rewalls, and auditing for suspicious activity. As a web user, you can defend against XSS by keeping your system patched, running antivirus software, and avoiding non-mainstream websites. There are add-ons for some web browsers, such as Firefox and Chrome, that allow only scripts of your choosing to be executed.

SQL injection

SQL injection attacks are even riskier than XSS attacks from an organization’s perspective. As with XSS attacks, SQL injection attacks use unexpected input to a web application.

However, instead of using this input to attempt to fool a user, SQL injection attacks use it to gain unauthorized access to an underlying database.

In the early days of the Web, all web pages were static, or unchanging. Webmasters created web pages containing information and placed them on a web server, where users could retrieve them using their web browsers. The Web quickly outgrew this model because users wanted the ability to access customized information based on their individual needs. For example, visitors to a bank website aren’t interested only in static pages containing information about the bank’s locations, hours, and services. They also want to retrieve dynamic content containing information about their personal accounts. Obviously, the webmaster can’t possibly create pages on the web server for each individual user with that user’s personal account information. At a large bank, that would require maintaining millions of pages with up-to-the-minute information. That’s where dynamic web applications come into play.

Web applications take advantage of a database to create content on demand when the user makes a request. In the banking example, the user logs in to the web application, providing an account number and password. The web application then retrieves current

196

Chapter 3

Threats and Vulnerabilities account information from the bank’s database and uses it to instantly create a web page containing the user’s current account information. If that user returns an hour later, the web server repeats the process, obtaining updated account information from the database.

What does this mean to you as a security professional? Web applications add complexity to the traditional security model. The web server, as a publicly accessible server, belongs in a separate network zone from other servers, commonly referred to as a demilitarized zone (DMZ).

The database server, on the other hand, isn’t meant for public access, so it belongs on the internal network. The web application needs access to the database, so the fi rewall administrator must create a rule allowing access from the web server to the database server. This rule creates a potential path for Internet users to gain access to the database server.

If the web application functions properly, it allows only authorized requests to the database. However, if there is a fl aw in the web application, it may let individuals tamper with the database in an unexpected and unauthorized fashion through the use of SQL injection attacks. SQL injection attacks allow a malicious individual to perform SQL transactions directly against the underlying database.

You can use two techniques to protect your web applications against SQL injection attacks:

Perform input validation Input validation lets you limit the types of data a user provides in a form. There are numerous variations of input injection or manipulation attacks that require a broad-spectrum defense approach, including whitelisting and blacklisting fi lters.

Limit account privileges The database account used by the web server should have the smallest set of privileges possible. If the web application needs only to retrieve data, it should have that ability only.

Ultimately, SQL injection is a vulnerability of the script used to handle the interaction between a front end (typically a web server) and the backend database. If the script was written defensively and included code to escape (invalidate or reject) metacharacters, SQL injection would not be possible.

LDAP injection

LDAP injection is a variation of an input injection attack; however, the focus of the attack is on the back end of an LDAP directory service rather than a database server. If a web server front end uses a script to craft LDAP statements based on input from a user, then

LDAP injection is potentially a threat. Just as with SQL injection, sanitization of input and defensive coding are essential to eliminate this threat.

XML injection

XML injection is another variant of SQL injection, where the backend target is an XML application. Again, input sanitization is necessary to eliminate this threat.

3.5 Explain types of application attacks

197

Directory traversal/command injection

A directory traversal is an attack that allows/enables an attacker to jump out of the web root directory structure and into any other part of the fi lesystem hosted by the web server’s host OS. A common, but historical, version of this attack was against IIS 4.0, hosted by

Windows NT 4.0 Server. The attack used a modifi ed URL to directory-traverse out of the web root, into the main OS folders, in order to access the command prompt executable. For example: http://victim .com/scripts/..% %

This URL not only performed directory traversal, but also granted the attacker the ability to perform command injection. Any command that could be executed under the privileges of the IIS service and be crafted using the limitations of a URL could be used.

The example performs a single directory listing of the C root. But with minor tweaking,

TFTP commands could be used to download hacker tools to the target and subsequently launch those tools to grant greater remote control or true command shell access.

Buffer overflow

Software exploitation attacks are directed toward known fl aws, bugs, errors, and oversights; or normal functions of the OS, protocols, services, or installed applications. One of the most common forms of software exploitation is a buffer overfl ow attack.

A buffer overfl ow attack occurs when an attacker submits data to a process that is larger than the input variable is able to contain. Unless the program is properly coded to handle excess input, the extra data is dropped into the system’s execution stack and may execute as a fully privileged operation. Buffer overfl ow attacks can result in system crashes, corrupted data, user privilege escalation, or just about anything a hacker can think of. The only countermeasures to buffer overfl ow attacks are to patch the software when issues are discovered and to properly code software to perform input-validation checks before accepting input for processing.

Once a weakness is discovered in software, a hacker often writes an exploit or attack tool. These tools are easily accessible on the Internet. They allow anyone to grab the tool and point it at a victim on which they want to perform the attack, even when they have no knowledge of how to perform the attack.

A buffer overfl ow occurs when a program receives input that is larger than it was designed to accept or process. The extra data received by the program is shunted over onto the CPU without any security restrictions; it’s then allowed to execute (assuming it’s a valid command, script, system call, and so on) with system-level privileges. A hacker can achieve many possible results with a buffer overfl ow: crashing a program, freezing or crashing a system, opening a port, disabling a service, creating a user account, elevating the privileges of an existing user account, accessing a website, or executing a utility. Clever attackers can

198

Chapter 3

Threats and Vulnerabilities do just about anything they wish if they can execute a command or script with unrestricted access to a system.

Sometimes a buffer overfl ow attack can be labeled a form of DoS attack, because a buffer overfl ow occurs when a system receives more data than it can handle (a bit like a fl ooding attack). This is especially true when the buffer overfl ow event results in a system no longer being able to process legitimate data or requests.

Poor programming quality controls and lack of input validation checks in software lead to buffer overfl ow attacks. Unfortunately, most commercial software is vulnerable to buffer overfl ow attacks; web server software is attacked most frequently. Fortunately, buffer overfl ow vulnerabilities are often easily patched with vendor updates.

Integer overflow

An integer overfl ow is the state that occurs when a mathematical operation attempts to create a numeric value that is too large to be contained or represented by the allocated storage space or memory structure. For example, an 8-bit value can only hold the numbers 0 to 255.

If an additional number is added to the maximum value, an integer overfl ow occurs. Often, the number value resets or rolls over to 0, similar to the way a vehicle odometer rolls over.

However, in other cases, the result saturates, meaning the maximum value is retained. Thus, the result is another form of error (missing or lost information). In yet other cases, the rollover results in a negative number. If the programming logic assumes that a number will always be positive, then when a negative number is processed, it could have security-breaching results.

Programmers need to understand the numeric limitations of their code and the platform for which they’re developing. There are coding techniques programmers should adopt in order to test for integer-overfl ow results before an overfl ow can occur.

Zero-day

Zero-day attacks are newly discovered attacks for which there is no specifi c defense. See the discussion in Chapter 2, section 2.6, subsection “Zero-day exploits.”

Cookies and attachments

A cookie is a tracking mechanism developed for web servers to monitor and respond to a user’s serial viewing of multiple web pages. A cookie is often used to maintain an e-commerce shopping cart, focus product placement, or track your visiting habits. However, the benign purposes of cookies have been subverted by malevolent entities. Now cookies are a common means of violating your privacy by gathering information about your identity, logon credentials, surfi ng habits, work habits, and much more.

A cookie can easily be exploited against a web browser to gather suffi cient information about a user to allow the attacker to impersonate the victim online. It’s generally recommended that you block third-party cookies from everyone and fi rst-party cookies from all but the most trusted sites. Trusted sites are usually those entities that protect your identity by not including such details in a cookie. Instead, these sites only place a session ID in the cookie and keep all of your personal information in a backside database. If you don’t allow

3.5 Explain types of application attacks

199

trusted fi rst-party cookies (aka session cookies), functions such as e-commerce shopping carts, online banking, and posting to discussion forums will be disabled.

Because email is so widely used, it has become the most prevalent delivery vehicle for malicious code such as viruses, logic bombs, and Trojan horses. To combat this threat, you should deploy an antivirus scanner to scan email content and attachments. You should even consider stripping or blocking email attachments (especially those with known extensions of scripts or executables) as they enter your network (on an email gateway, fi rewall, and so on). It’s always the more secure option to scan, check, and if necessary, strip email on

SMTP servers before it reaches an end user’s client system.

LSO (Locally Shared Objects)

LSO (Local Shared Objects) are small fi les or data sets that websites may store on a visitor's computer through the Adobe Flash Player. LSOs are also known as Flash cookies. LSOs are generally used to store user preferences and settings, but they do have some risk. LSOs can be used to track a user's web activities and are not cleared or removed when a browser's

HTML cookies are cleared.

There are some options to restrict or limit the use of LSOs through Adobe Flash confi guration settings. However, after each update of Flash, those settings are reset to the default of allow. However, the most recent versions of Flash will not store LSOs while the browser is operating in privacy or incognito mode.

Note: The CompTIA Objective list has an error or type for this item. The term is Local

Shared Objects not Locally Shared Objects.

Flash Cookies

A Flash cookie is a tracking tool used by Adobe Flash. See LSOs (Locally Shared Objects).

Malicious add-ons

Most browsers and many other applications now allow for expansion through downloadable add-ons, sometimes called plug-ins or expansion packs. These add-ons have become targets of attackers. Hackers have crafted false versions of add-ons, converted add-ons into

Trojan horses, and written add-ons to look legitimate but be nothing more than attack code. The purpose is to trick unsuspecting victims into installing the malicious add-ons so the attackers can either gain access to information or take control of the victim’s system or identity. It’s more important than ever to be cautious about installing anything, only install software from trusted sources, and run current antivirus and anti-malware scanners.

Session hijacking

TCP/IP hijacking is a form of attack in which the attacker takes over an existing communication session. The attacker can assume the role of the client or the server, depending on the purpose of the attack. TCP/IP hijacking (aka session hijacking) is a simpler, one-sided form of a man-in-the-middle attack. Many of the same tools and techniques are used in

200

Chapter 3

Threats and Vulnerabilities both forms of attack. With session hijacking, the other partner in the communication is disconnected—they’re aware that they’re no longer communicating and that their session was interrupted. However, they may not immediately realize that they were the collateral damage in a session hijacking attack.

Figure 3.9 shows a TCP/IP hijacking attack.

Countermeasures to TCP/IP hijacking attacks include using encrypted protocols and performing reauthentication during a session. Additionally, modern or secured protocols are often designed with preventive features that make session hijacking very diffi cult or impossible. These features include complex nonlinear sequencing rules as well as timestamps with short time-out values.

F I G U R E 3 . 9 TCP/IP hijacking attack

Broken Client Connection

Simulated

Client

(Attacker)

Server

Client

Attacker

Header manipulation

Header manipulation is a form of attack in which malicious content is submitted to a vulnerable application, typically a web browser or web server, under the disguise of a valid HTML/

HTTP header value. Header manipulation is usually a means to some other nefarious end, such as cross-user defacement, cache poisoning, cross-site scripting, page hijacking, cookie manipulation, open redirects, and so on. In most cases, preventing this attack involves using updated browsers/servers, fi ltering content from visitors, and rejecting/ignoring any header in violation of HTTP/HTML specifi cations.

Arbitrary code execution/remote code execution

Arbitrary code execution is the ability to run any software on a target system. This ability is usually the focus of hacker exploits and attacks. When combined with privilege escalation, a hacker’s capacity to arbitrarily run any software of their choosing at an administrator, root, or system level means they have the open-ended ability to perform any task on the system. Often, this capability is established using a remote attack as opposed to a local attack

(an attack run on an authorized system from within an authorized user account). A remote exploitation of arbitrary code execution is also called remote code execution.

3.6 Analyze a scenario and select the appropriate type of mitigation

201

Exam Essentials

Understand cross-site scripting. Cross-site scripting (XSS) is a form of malicious code injection attack in which an attacker is able to compromise a web server and inject their own malicious code into the content sent to other visitors.

Understand SQL injection. SQL injection attacks allow a malicious individual to perform

SQL transactions directly against the underlying database through a website front end.

Understand directory traversal. A directory traversal is an attack that enables an attacker to jump out of the web root directory structure and into any other part of the fi lesystem hosted by the web server’s host OS.

Understand buffer overflows. Buffer overfl ows occur due to a lack of secure defensive programming. The exploitation of a buffer overfl ow can result in a system crash or arbitrary code execution. A buffer overfl ow occurs when a program receives input that is larger than it was designed to accept or process. The extra data received by the program is shunted over to the CPU without any security restrictions; it’s then allowed to execute.

Results of buffer overfl ows can include crashing a program, freezing or crashing the system, opening a port, disabling a service, creating a user account, elevating the privileges of an existing user account, accessing a website, or executing a utility.

Understand cookies. A cookie is a tracking mechanism developed for web servers to monitor and respond to a user’s serial viewing of multiple web pages. It may allow identity theft.

Understand hijacking attacks. TCP/IP (session) hijacking is a form of attack in which the attacker takes over an existing communication session.

Understand arbitrary code execution. Arbitrary code execution is the ability to run any software on a target system.

3.6 Analyze a scenario and select the appropriate type of mitigation and deterrent techniques

An important part of any security solution is reducing or mitigating possible risk and deterring would-be offenders. Unfortunately, not all security solutions are created equal. Some defenses work better than others. This section examines some aspects of mitigation and deterrence.

Monitoring system logs

System logging is as varied as the security policies and functions of an organization. Most of the details of what to log, how long to keep logs, and who is allowed to access those logs are determined by the organization, its policies, and the sensitivity or value of its resources.

However, rules of thumb for proper logging procedures include logging all attempts to

202

Chapter 3

Threats and Vulnerabilities access sensitive resources, duplicating all logs on centralized logging servers, and protecting all logs from unauthorized access and modifi cation.

Event logs

Event logs record system occurrences, often distinct from events related to users. Event logs should be reviewed for issues related to performance, uptime, or hardware failures. Keep in mind that although an event log doesn’t primarily focus on security concerns, security events can impact every aspect of an organization and may leave evidence in the event logs.

Audit logs

Audit logs record user activities. Audit logs are used to verify compliance with security policy and defi ned authorization. They’re essential in holding users accountable for the actions of their online or electronic identities.

Security logs

Security logs record information about events that are directly or indirectly related to security. These can include user access to sensitive resource objects, users performing privileged operations, or events detected by sentry devices such as fi rewalls, IDS/IPS, and routers and switches.

Access logs

Access logs are an important part of security monitoring. As with all sensitive logs, proper logging procedures include logging all attempts to access any resources of a sensitive nature. All logs should be duplicated on centralized logging servers and should be protected from unauthorized access and modifi cation. Additionally, pay attention to success and failure events, especially when they’re related to logons and resource access. Repeated failures often indicate intrusion attempts or users attempting to exceed their privileges. However, success events can also be indications of intrusion when the valid user of an account is on vacation or unable to log on, but their account is in use.

Hardening

Operating system hardening is the process of reducing vulnerabilities, managing risk, and improving the security provided by or for an OS. This is usually accomplished by taking advantage of an OS’s native security features and supplementing them with add-on applications such as fi rewalls, antivirus software, and malicious-code scanners.

Hardening an OS includes protecting the system from both intentional directed attacks and unintentional or accidental damage. This can include implementing security countermeasures as well as fault-tolerant solutions for both hardware and software. Some of the actions that are often included in a system-hardening procedure include the following:

Deploy the latest version of the OS.

Apply any service packs or updates to the OS.

Update the versions of all device drivers.

3.6 Analyze a scenario and select the appropriate type of mitigation

203

Verify that all remote-management or remote-connectivity solutions that are active are secure. Avoid FTP, Telnet, and other cleartext or weak authentication protocols.

Disable all unnecessary services, protocols, and applications.

Remove or securely configure Simple Network Management Protocol (SNMP).

Synchronize time zones and clocks across the network with an Internet time server.

Configure event-viewer log settings to maximize capture and storage of audit events.

Rename default accounts.

Enforce strong passwords on all accounts.

Force password changes on a periodic basis.

Restrict access to administrative groups and accounts.

Hide the last-logged-on user’s account name.

Enforce account lockout.

Configure a legal warning message that’s displayed at logon.

If file sharing is used, force the use of secure sharing protocols or use virtual private networks (VPNs).

Use a security and vulnerability scanner against the system.

Scan for open ports.

Disable Internet Control Message Protocol (ICMP) functionality on publicly accessible systems.

Consider disabling NetBIOS.

Configure auditing.

Configure backups.

The fi lesystem in use on a system greatly affects the security offered by that system.

A fi lesystem that incorporates security, such as access control and auditing, is a more secure choice than a fi lesystem without incorporated security. One great example of a secured fi lesystem is the Microsoft New Technology File System (NTFS). NTFS was fi rst deployed under Windows NT, but it’s now found in Windows 2000, Windows XP,

Windows Server 2003, and Windows Vista. It offers fi le- and folder-level access permissions and auditing capabilities. Examples of fi lesystems that don’t include security are fi le allocation table (FAT) and FAT32.

Workstations are the computer systems that people use to interact with a network.

Workstations are also called clients, terminals, or end-user computers. Access to workstations should be restricted to authorized personnel. One method to accomplish this is to use strong authentication, such as two-factor authentication with a smartcard and a password or PIN.

Servers are the computer systems on a network that support and maintain the network.

Servers provide services or share resources with the network. They require greater physical and logical security protections than workstations because they represent a concentration of assets, value, and capabilities. End users should be restricted from physically accessing servers, and they should have no reason to log on directly to a server—they should interact with servers over a network through their workstations.

204

Chapter 3

Threats and Vulnerabilities

Disabling unnecessary services

It’s important to realize that a key element in securing a system is to reduce its attack surface. The attack surface is the area that is exposed to untrusted networks or entities and that is vulnerable to attack. If a system is hosting numerous services and protocols, its attack surface is larger than that of a system running only essential services and protocols.

It’s tempting to install every service, component, application, and protocol available to you on every computer system you deploy. However, this temptation is in direct violation of a security best practice stating that you should have each system host only those services and protocols that are absolutely essential to its mission-critical operations.

The real issue is that software isn’t trusted. Software (services, applications, components, and protocols) is written by people; and therefore, in all likelihood, it isn’t perfect.

But even if software lacked bugs, errors, oversights, mistakes, and so on, it would still represent a security risk. Software that is working as expected can often be exploited by a malicious entity. Therefore, every instance of software deployed onto a computer system represents a collection of additional vulnerability points that may be exposed to external, untrusted, and possibly malicious entities.

From this perspective, you should understand that all nonessential software elements should be removed from a system before it’s deployed on a network, especially if that network has Internet connectivity. But how do you know what is essential and what isn’t?

Here is a basic methodology:

1.

Plan the purpose of the system.

2.

Identify the services, applications, and protocols needed to support that purpose. Make sure these are installed on the system.

3.

Identify the services, applications, and protocols that are already present on the system.

Remove all that aren’t needed.

Often, you won’t know if a specifi c service that appears on a system by default is needed.

Thus, a trial-and-error test is required. If software elements aren’t clearly essential, disable them one by one and test the capabilities of the system. If the system performs as you expect, the software probably isn’t needed. If the system doesn’t perform as expected, then the software needs to be re-enabled. This process is known as application and system

hardening.

You may discover that some services and protocols offer features and capabilities that aren’t necessary to the essential functions of your system. If so, fi nd a way to disable or restrict those characteristics. This may include restricting ports or reconfi guring services through a management console.

The essential services on a system are usually easy to identify—they generally have recognizable names that correspond to the function of the server. However, you must determine which services are essential on your specifi c system. Services that are essential on a web server may not be essential on a fi le server or an email server. Some examples of possible essential services include the following:

File sharing

Email

3.6 Analyze a scenario and select the appropriate type of mitigation

205

Web

File Transfer Protocol (FTP)

Telnet

SSH

Remote access

Network News Transfer Protocol (NNTP)

Domain Name Service (DNS)

Dynamic Host Configuration Protocol (DHCP)

Nonessential services are more diffi cult to identify. Just because a service doesn’t have the same name as an essential function of your server doesn’t mean it isn’t used by the underlying OS or as a support service. It’s extremely important to test and verify whether any service is being depended on by an essential service. However, several services are common candidates for nonessential services that you may want to locate and disable fi rst (assuming you follow the testing method described earlier). These may include the following:

NetBIOS

Unix RPC

Network File System (NFS)

X services

R services

Trivial File Transfer Protocol (TFTP)

NetMeeting

Instant messaging

Remote-control software

Simple Network Management Protocol (SNMP)

Protecting management interfaces and applications

A management interface is any software that is used to confi gure or manipulate the function or security of a hardware or software solution. Often, management interfaces are related to hardware devices used to control access to network communications, such as wireless access points, switches, and routers; or to perform security operations, such as fi rewalls, IDS/IPS, and proxies.

Management interfaces can be confi gured to be accessible only when a user is physically present at the device, via a VPN, or through a dedicated management network. Any of these confi gurations is more secure than allowing general access over a wireless or wired production network link. Access to a management interface should be encrypted rather than use a plaintext protocol. Management interface default settings, especially default accounts and passwords, should be changed before deployment into a production environment.

206

Chapter 3

Threats and Vulnerabilities

Password protection

Always change default passwords to something unique and complex. All default passwords are available online. If available, always turn on password protection and set a complex password. Don’t assume physical access control is good enough or that logical remote access isn’t possible.

Disabling unnecessary accounts

If you don’t need it, don’t keep it. This may be an optional mantra for you in real life, but in terms of security, it’s the fi rst of two—the second is, lock down what’s left. Getting rid of unnecessary services and accounts is just the beginning of proper security and environment hardening. Leaving behind default or unused accounts gives hackers/attacks more potential points of compromise.

Network security

Although there are many aspects to network security, this section discusses those issues related to port security in one form or another. In the physical realm, port security means ensuring that all ports are physically protected. This means unauthorized persons can’t access a functioning physical adapter port. All ports that can be accessed by unauthorized persons are disabled. All enabled ports are also electronically monitored to ensure that device switching or spoofi ng doesn’t take place.

In the logical realm, port security is used to minimize unwanted or malicious traffi c reaching sensitive services. Technically, a port is closed if there isn’t a service linked to it and open when there is a service associated with it. However, that might not always be suffi cient security.

MAC limiting and filtering

MAC limiting and fi ltering is the use of an approved MAC address list to limit the clients or devices that can communicate with a service. MAC fi ltering is most commonly found on wireless access points and switches. However, it can be deployed in any circumstance where control over the connection is desired.

The only problem with MAC fi ltering is that MAC spoofi ng is simple for most hackers.

In fact, a simple-to-use Linux application called macchanger

does just that with a few keystrokes. On the Windows platform, MAC Makeup makes MAC spoofi ng easy. Thus, MAC limiting and fi ltering isn’t a complete security solution.

802.1x

802.1x is a standard port-based network-access control that ensures that clients can’t communicate with a resource until proper authentication has taken place. Effectively, 802.1x is a hand-off system that allows any device to use the existing network infrastructure’s authentication services. Through the use of 802.1x, other techniques and solutions such as RADIUS, TACACS, certifi cates, smart cards, token devices, and biometrics can be

3.6 Analyze a scenario and select the appropriate type of mitigation

207

integrated into any communications system. 802.1x is most often associated with wireless access points, but its use isn’t limited to wireless.

Disabling unused interfaces and unused application service ports

Any unused application service ports should be specifi cally blocked or disabled. Port or

interface disabling is a physical option that renders a connection port electrically useless.

Port blocking is a service provided by a software or hardware fi rewall that blocks/drops packets directed toward disallowed ports.

Rogue machine detection

Rogue machine detection is intended to discover unauthorized systems appearing on a secured network. There are several techniques to accomplish this. One method is to use a smart patch panel. Such a device is able to detect when a new system is connected to a previously unused physical wall part. Another method is to monitor MAC addresses. When a new MAC address appears in network traffi c, it could be a symptom of a rogue machine. However, there are

MAC spoofi ng techniques that can allow a rogue device to duplicate an authorized system’s address. To combat this idea, a network-focused intrusion detection system (IDS) or intrusion prevention system (IPS) may be needed.

Security posture

The security posture is the level to which an organization is capable of withstanding an attack. An organization may have good or poor posture. A plan and implementation are parts of the security posture. These include detailed policies and procedures, implementation in the IT infrastructure as well as the facility, and proper training of all personnel.

Initial baseline configuration

A security template is a set of security settings that can be mechanically applied to a computer to establish a specifi c confi guration. Security templates can be used to establish baselines or bring a system up to compliance with a security policy. They can be custom designed for workstations and server function/task/purpose. Security templates are a generic concept; however, specifi c security templates can be applied via Windows’ Group

Policy system.

Security templates can be built by hand or by extracting settings from a preconfi gured master. Once a security template exists, you can use it to confi gure a new or existing machine (by applying the template to the target either manually or through a Group Policy object [GPO]), or it can be used to compare the current confi guration to the desired confi guration. This latter process is known as security template analysis and often results in a report detailing the gaps in compliance.

One mechanism often used to help maintain a hardened system is to use a security baseline. A security baseline is a standardized minimal level of security that all systems in an organization must comply with. This lowest common denominator establishes a fi rm and

208

Chapter 3

Threats and Vulnerabilities reliable security structure on which to build trust and assurance. The security baseline is defi ned by the organization’s security policy. It may include requirements of specifi c hardware components, OS versions, service packs, patches/upgrades, confi guration settings, add-on applications, service settings, and more.

The basic procedure for establishing a security baseline or hardening a system is as follows:

1.

Remove unneeded components, such as protocols, applications, services, and hardware

(including device drivers).

2.

Update and patch the OS and all installed applications, services, and protocols.

3.

Configure all installed software as securely as possible.

4.

Impose restrictions on information distribution for the system, its active services, and its hosted resources.

Documentation is an important aspect of establishing a security baseline and implementing security in an environment. Every aspect of a system, from design to implementation, tuning, and securing, should be documented. Failing to have suffi cient documentation is often the primary cause of diffi culty in locking down or securing a server. Without proper documentation, all the details about the OS, hardware confi guration, applications, services, updates, patches, confi guration, and so on must be discovered before security improvements can be implemented. With proper documentation, a security professional can quickly add to the existing security without having to reexamine the entire environment.

Creating or defi ning a baseline requires that you examine three key areas of an environment: the OS, the network, and the applications. The following sections examine issues related to security baseline establishment for these areas.

Continuous security monitoring

In order for security monitoring to be effective, it must be continuous in several ways. First, it must always be running and active. There should be no intentional time frame when security monitoring isn’t functioning. If security monitoring goes offl ine, all user activity should cease and administrators should be notifi ed.

Second, security monitoring should be continuous across all user accounts, not just end users. Every single person has responsibilities to the organization to maintain its security. Likewise, everyone needs to abide by their assigned job-specifi c responsibilities and privileges. Any attempts to exceed or violate those limitations should be detected and dealt with.

Third, security monitoring should be continuous across the entire IT infrastructure.

On every device possible, recording of system events and user activities should be taking place.

Fourth, security monitoring should be continuous for each user from the moment of attempted logon until the completion of a successful logoff or disconnect. At no time should the user expect to be able to perform tasks without security monitoring taking place.

3.6 Analyze a scenario and select the appropriate type of mitigation

209

Remediation

A third aspect to security posturing, in addition to locking things down and then watching for attempted violations, is to be prepared to respond when unwanted events occur.

Remediation is the process of dealing with downtime, system compromise, malicious code infection, attack, and so on. For remediation to be successful, it must be planned, documented, simulated/rehearsed, and revised regularly. Being able to respond to problems properly is just as important as preventing them and detecting them. Remediation should focus on containing problems, repairing damage, and restoring systems to normal operations as promptly as possible.

Reporting

Audit reports should have a structure or design that is clear, concise, and objective. It’s common for an auditor to include opinions or recommendations for response to the content of a report, but the fi ndings should be based on fact and evidence from audit trails.

Audit reports include sensitive information and should be assigned a classifi cation label and handled appropriately.

The formats used by an organization to produce reports from audit trails will vary greatly. However, those reports should all address a few basic concepts: the purpose of the audit, the scope of the audit, and the results discovered by the audit. In addition to these basic concepts, audit reports often include many details specifi c to the environment, such as time, date, specifi c systems, and so on. Audit reports can include a wide range of content that focuses on problems, events, and conditions; standards, criteria, and baselines; causes, reasons, impact, and effect; and solutions, recommendations, and safeguards.

Within the hierarchy of the organization, only those people with suffi cient privilege should have access to audit reports. An audit report may also be prepared in various forms according to the hierarchy of the organization. Audit reports should provide only the details relevant to the position of the staff members who have access to them.

The frequency of producing audit reports is based on the value of the assets covered and the level of risk involved. The more valuable the assets and the higher the risks, the more often you’ll want to produce an audit report. Once an audit report is completed, it should be submitted to its assigned recipients (as defi ned in security policy documentation), and a signed confi rmation of receipt should be fi led. When an audit report contains information about serious security violations or performance issues, that report should be escalated to higher levels of management for review, notifi cation, and assignment of a response.

Keep in mind that, in a formal security infrastructure, often only higher levels of management have any decision-making power. All entities at the lower end of the structure must follow prescribed procedures and instructions to the letter. Security is about detection and response. Some formal arrangements and company policies are fairly rigid in terms of outlining the chain of command. However, many organizations are moving toward a more rapid response strategy with an increased number of tactical decisions being made at lower levels of the organizational hierarchy.

210

Chapter 3

Threats and Vulnerabilities

Alarms

An alarm is a notifi cation of an event so those with proper authority and authorization can take immediate action. Events such as server crashes, security breaches, and other forms of downtime trigger an alarm.

Alerts

An alert is a less immediate or non-emergency sort of notifi cation. An alert records an event into a log fi le and may notify an administrator, but events that trigger alerts don’t usually require immediate response.

Trends

Trends are tendencies toward a better or worse occurrence. Monitoring for trends or analyzing recorded events for trending activity is an important part of both performance and security monitoring and reporting. Some trends lead toward downtime, system failure, or security breaches. These trends are important to detect and recognize as early as possible.

Detection controls vs. prevention controls

A preventative control is designed to stop an unwanted or unauthorized activity from occurring. A detection control is designed to discover an unwanted or unauthorized activity when it occurs. Both are important parts of any complete security infrastructure. These two controls embody the two primary tenets of a strong security stance: Lock things down, and then watch for violations. Many security controls can be used as preventative controls, detective controls, or both.

IDS vs. IPS

IDSs are used to detect security violations, whereas IPSs are used to attempt to prevent the violations from occurring in the fi rst place. See the discussions in Chapter 1, section

1.1, subsection “NIDS and NIPS,” and later in this chapter, in section 3.7, subsection

“Vulnerability scanning.”

Camera vs. guard

A camera is primarily used to detect and record unwanted or unauthorized activity. If someone is aware that a camera is present and will record their actions, that person is less likely to perform actions that are violations. This is generally known as a deterrent.

A security guard is able to move around a facility to potentially view places a camera is unable to see. Security guards are often as much of a deterrent as they are a detective control. They can respond to varying issues and can adjust their actions based on changing conditions.

3.7 Given a scenario, use appropriate tools

211

Both cameras and guards have useful security features, but both require proper use to be benefi cial, both have their own unique requirements for use, and both are costly in their own way.

Exam Essentials

Understand system logs. Rules of thumb for proper system-logging procedures include logging all attempts to access resources that are of a sensitive nature, duplicating all logs on centralized logging servers, and protecting all logs from unauthorized access and modifi cation.

Understand operating system hardening. Operating system hardening is the process of reducing vulnerabilities, managing risk, and improving the security provided by or for an OS. This is usually accomplished by taking advantage of the native security features of an OS and supplementing them with add-on applications, such as fi rewalls, antivirus software, and

malicious-code scanners.

3.7 Given a scenario, use appropriate tools and techniques to discover security threats and vulnerabilities

Vulnerability scanning and penetration testing are important aspects of detecting and responding to new vulnerabilities and weaknesses. In addition to these important tools, ongoing monitoring of performance, throughput, and protocol use can reveal trends toward downtime, change in job focus, and the need for infrastructure upgrades.

Interpret results of security assessment tools

Vulnerability scanners and security-assessment tools are used to test a system for known security vulnerabilities and weaknesses. They’re used to generate reports that indicate the aspects of the system that need to be managed to improve security. The reports may recommend applying patches or making specifi c confi guration or security setting changes to improve or impose security.

A vulnerability scanner is only as useful as its database of security issues. Thus, the database must be updated from the vendor often to provide a useful audit of your system.

The use of vulnerability scanners in conjunction with IDSs may help reduce false positives by the IDS and keep the total number of overall intrusions or security violations to

212

Chapter 3

Threats and Vulnerabilities a minimum. When discovered vulnerabilities are patched quickly and often, the system provides a more secure environment.

An extension to the concept of the IDS is the IPS. An IPS seeks to actively block unauthorized connection attempts or illicit traffi c patterns as they occur. IPS designs fall under the same type (host- and network-based) and classifi cation (behavior- and signature-based) as the IDS counterparts, and they’re often deployed together for complete network coverage. Additionally, many IPS platforms are capable of dissecting higher-level application protocols in search of malicious payloads. The line between IDSs and IPSs can be blurred, in that many self-professed IDSs have IPS capabilities. These days, detection and prevention systems occur together more often than they do separately.

The results of a vulnerability scan need to be interpreted by a knowledgeable security expert. Automated scanning tools can produce numerous false positives; thus it may be necessary to confi rm the presence of a security fl aw before implementing a fi x, especially if the fi x is costly or interferes with production. Another issue is that the criticality level reported by a scanning tool may not be accurate or relevant to your organization. Finally, the results of a vulnerability scan must be interpreted in light of the existing environment, known real threats, and budget.

Tools

You can use numerous tools to perform vulnerability scans or to discover or validate the presence of a security threat, fl aw, or vulnerability.

Protocol analyzer

See the discussion in Chapter 1, section 1.1, subsection “Protocol analyzers.”

Vulnerability scanner

A vulnerability scanner is a tool used to scan a target system for known holes, weaknesses, or vulnerabilities. These automated tools have a database of attacks, probes, scripts, and so on that are run against one or more systems in a controlled manner. Vulnerability scanners are designed to probe targets and produce a report of the fi ndings. They can be used from within a private network to test internal systems directly or from outside the network to test border devices against breaching attacks.

Note that vulnerability scanner is often used as a general term for any tool that performs any sort of security assessment or that could be used in a security evaluation. This is evident in that this term appears multiple times on the objectives list. Here, the term is used to refer to a specifi c tool that checks for symptoms of weakness. Be sure to consider this on the exam and look for context clues to decipher the intention of a question.

Vulnerability scanners are designed not to cause damage while they probe for weaknesses, but they can still inadvertently cause errors, slower network performance, and downtime. Thus, it’s important to plan their use and prepare for potential recovery actions.

Vulnerability scanners can be commercial products, such as Retina, or open source, such as Nessus. Most organizations take advantage of several vulnerability scanners in order to

3.7 Given a scenario, use appropriate tools

213

gain the most complete perspective on their security status. Each time a vulnerability scanner is to be used, it should be updated from the vendor.

Honeypots

A honeypot is a fi ctitious environment designed to fool attackers and intruders and lure them away from the private secured network (see Figure 3.10). A honeypot is often deployed as a buffer network between an untrusted network, such as the Internet, business partners, or a DMZ, and the private network.

F I G U R E 3 .1 0 A network honeypot deceives an attacker and gathers intelligence.

Firewall

1

Network Attack

Honeypot or Padded Cell

3

2

Alert Detected

Client

IDS

1

2

3

Attack Occurs

Analysis/Response

Reroute Network Traffic

The honeypot looks and acts like a real system or network, but it doesn’t contain any valuable or legitimate data or resources. Intruders may be fooled into wasting their time attacking and infi ltrating a honeypot instead of your actual network. All the activity in the honeypot is monitored and recorded.

The purpose of deploying a honeypot is to provide an extra layer of protection for your private network and to gather suffi cient evidence for prosecution against malicious intruders and attackers. A honeypot can often gather suffi cient information to determine the identity of the intruder; the type of data, resource, or system being attacked or focused on; and the methods and tools of attack.

Honeypots are effective if they’re easier for a hacker or intruder to fi nd than the real private LAN being protected. They should be modestly secured so they seem like a real network, but not overly secured. The goal is to distract attackers and lure them away from your intranet so you can learn about new attacks and potentially be able to track down criminals for prosecution. If a honeypot seems too easy to access or doesn’t react and behave like a real production network, experienced hackers and intruders won’t be fooled and may be provoked to fi nd and attack your actual production network.

214

Chapter 3

Threats and Vulnerabilities

Another form of honeypot is known as a padded cell. Whereas a honeypot is usually a distracting network that is always on, a padded cell is a containment area that is only activated when an intrusion is detected.

Honeynets

A honeynet consists of two or more networked honeypots used in tandem to monitor or re-create larger, more diverse network arrangements. Often, these honeynets facilitate IDSs.

Port scanner

A port scanner is a vulnerability assessment tool that sends probe or test packets to a target system’s ports in order to learn about the status of those ports. A port can be in one of two states: open or closed. If a valid request for connection is sent to an open TCP port (a SYN fl agged packet), a normal response can be expected (a SYN/ACK fl agged packet). If the

TCP port is closed, the response is a RST packet. However, if a fi rewall is present, the fi rewall can fi lter out the responses of closed ports, resulting in no packet being received by the probing system. This is known as fi ltering. Thus, a port scanner will have direct proof that a port is open or closed but can assume a fi ltered port if no response is received.

Although this form of probing works effectively, it produces traffi c that is likely recorded or logged by the target system or the fi rewall protecting it. Thus, many other forms of port scanning have been developed. Some scanning techniques use standard packets but in an unexpected context, such as FIN or ACK fl agged packets. These packets have no valid meaning outside of a valid TCP setup or teardown handshake; thus when used out of context, they may illicit a response that is meaningful to the probing entity. Even a normal data packet, which doesn’t have any header fl ags enabled, can be used in a NULL scan. There are even some methods of scanning that use invalid packet constructions, such as the Xmas scan, which has numerous header fl ags enabled (see the earlier section “Xmas attack”).

The details of how these scans operate are a bit beyond the Security+ content. However, it’s important to understand that port scans allow security testers and hackers to discover what ports are open on a system. Once the open ports are known on a target, this information can lead to other important details, such as the identity of the host OS and what types of services are hosted on the target. Many port-scanning tools, such as Nmap, can not only detect open, closed, and stealthed ports, but also determine the OS and identify active services on a port. Sometimes these actions are performed using a database of characteristics, and sometimes they’re performed using banner-grabbing queries. A banner grab occurs when a request for data or identity is sent to a service on an open port and that service responds with information that may directly or indirectly reveal its identity.

Passive vs. active tools

A passive tool, technique, or technology is one that monitors a situation but doesn’t do anything about it. This can include recording details, launching analysis engines, and notifying administrators. Passive actions or tools don’t affect an event and are unseen (or unnoticed) by the event (or subject of the event).

3.7 Given a scenario, use appropriate tools

215

An active tool, technique, or technology is one that intercedes in a situation in order to alter events or chance outcomes. This can include altering settings, opening or closing ports, rebooting devices, restarting services, launching applications, disconnecting clients, restoring data, and so on. Active actions or tools affect the event and are thus detectable by the event or the subjects of the event.

Banner grabbing

Banner grabbing is the process of capturing the initial response or welcome message from a network service. Often the banner discloses the application’s identity, version information, and potentially much more. A common method of banner grabbing against web servers is to use the telnet client to send a plaintext query. This can be accomplished by opening a command prompt, typing

telnet www.microsoft.com 80

, pressing Enter, typing

HEAD / HTTP/1.0

, and pressing Enter a few more times. This should result is the display of a HTTP 200 OK message, which often includes a Server line that identifi es the specifi c web server product in use. Banner grabbing is a common technique used by both hackers and researchers to learn more about an unknown system across a network connection.

Risk calculations

Risk calculations are the mathematical formulas used to assess and prioritize security issues. Risk is calculated around assets. An asset is anything used in a business task. See the discussion in Chapter 2, section 2.1, subsection “Risk calculation.”

Threat vs. likelihood

A threat is any person or tool that can take advantage of a vulnerability. Likelihood is the potential of a threat causing harm within a given time period, such as a year. See the discussion in Chapter 2, section 2.1, subsection “Risk calculation.”

Assessment types

Assessments are security evaluations, of which there are numerous types. See the discussion in Chapter 2, section 2.1, “Explain the importance of risk-related concepts.”

Risk

Risk is the possibility that something could happen to damage, destroy, or disclose data or other resources. See the discussion in Chapter 2, section 2.1.

Threat

A threat is any person or tool that can take advantage of a vulnerability. See the discussion in Chapter 2, section 2.1.

216

Chapter 3

Threats and Vulnerabilities

Vulnerability

A vulnerability is a weakness, an error, or a hole in the security protection of a system, a network, a computer, software, and so on. See the discussion in Chapter 2, section 2.1.

Assessment technique

When performing risk or vulnerability assessments, it’s important to consider using a wide variety of techniques or approaches.

Baseline reporting

Baseline reporting evaluates the current implemented security in comparison with the stated or claimed security baseline. Ultimately, baseline reporting is a form of internal compliance auditing where systems that fail to meet minimum baseline requirements are identifi ed.

Code review

Code review is a form of vulnerability assessment that detects fl aws in code or errors in logic by combing through source code. Code review should be performed before software is released to production. It should also be performed by someone other than the programmer.

Determine attack surface

An attack surface is the theoretical surface that faces the outside world that is subject to attack. The larger the attack surface, the greater the chance an attack will occur and that it could be successful. Most security endeavors aim to reduce the attack surface. Part of risk assessment is determining the current attack surface or amount of risk or exposure to harm, and then working toward reducing the attack surface.

Review architecture

The facility needs to be assessed in terms of its resistance to forcible entry and fi re. One aspect of facility security to consider is crime prevention through environmental design

(CPTED). CPTED encourages architects and build-out designers to improve security through building elements. This includes taking advantage of natural surveillance, access control, and territorial reinforcements.

Review designs

Every aspect of an organization, including facility layout, security policy, IT infrastructure mappings, and personnel training should be reviewed. Reviewing the designs, plans, and blueprints for all elements of an organization, especially in terms of security, can help detect defi ciencies before implementation. Additionally, performing design reviews throughout the life of the organization may reveal new concerns not recognized earlier, due to new perspectives or new threats.

3.8 Explain the proper use of penetration testing versus vulnerability scanning

217

Exam Essentials

Understand vulnerability scanners. A vulnerability scanner is a tool used to scan a target system for known holes, weaknesses, or vulnerabilities. These automated tools have a database of attacks, probes, scripts, and so on that are run against one or more systems in a controlled manner.

Understand honeypots. A honeypot is a fi ctitious environment designed to fool attackers and intruders and lure them away from the private secured network. The purpose of deploying a honeypot is to provide an extra layer of protection for your private network and to gather suffi cient evidence for prosecution against malicious intruders and attackers.

Understand port scanners. A port scanner is a vulnerability assessment tool that sends probe or test packets to a target system’s ports in order to learn about the status of those ports.

Understand banner grabbing. Banner grabbing is the process of capturing the initial response or welcome message from a network service. Often the banner discloses the application’s identity, version information, and potentially much more.

3.8 Explain the proper use of penetration testing versus vulnerability scanning

A penetration test is a form of vulnerability scan that is performed by a special team of trained, white-hat security specialists rather than by an internal security administrator using an automated tool. Penetration testing (aka ethical hacking) uses the same tools, techniques, and skills of real-world criminal hackers as a methodology to test the deployed security infrastructure of an organization. As such, penetration testing gives you the perspective of real hackers, whereas typical vulnerability scanning offers only the security perspective of the scanner’s vendor.

The following sections explore these two scan types more closely.

Penetration testing

To best simulate a real-life situation, penetration testing is usually performed without the

IT or security staff being aware of it. Senior management often schedules ethical hacking events. This allows the penetration test to assess the performance of the infrastructure and the response personnel. This is known as an unannounced test. An announced test means everyone knows the penetration assessment is taking place and when.

Penetration tests can take many forms, including hacking in from the outside, simulating a disgruntled employee, social-engineering attacks, and physical attacks, as well as remote connectivity and VPN attacks. The goal of penetration testing is to discover weaknesses

218

Chapter 3

Threats and Vulnerabilities before real criminals do. Most penetration testing requires high levels of knowledge and skill on the part of the testers. Few automated tools are employed, because real hackers often write their own surgically precise attack tools and scripts based on their target.

Security administrators do use automated tools for vulnerability scanning to check for policy compliance and known issues. Penetration testing is used to discover new weaknesses that these automated tools can’t fi nd.

In security terms, a penetration occurs when an attack is successful and an intruder is able to breach the perimeter around your environment. A breach can be as small as reading a few bits of data from your network or as big as logging in as a user with unrestricted privileges. A primary goal of security is to prevent penetrations.

One common method you can employ to test the strength of your security measures is to perform penetration testing, a vigorous attempt to break into your protected network using any means available. It’s common for organizations to hire external consultants to perform penetration testing so testers aren’t privy to confi dential elements of the environment’s security confi guration, network design, and other internal secrets.

Penetration testing seeks to fi nd any and all detectable weaknesses in your existing security perimeter. The operative term is detectable; there are undetected and presently unknowable threats lurking in the large-scale infrastructure of network software and hardware design that no amount of penetration testing can directly discover. Once a weakness is discovered, countermeasures can be selected and deployed to improve security in the environment. One signifi cant difference between penetration testing and an actual attack is that once a vulnerability is discovered during a penetration test, the intrusion attempt ceases before a vulnerability exploit can cause any damage. There are open source and commercial tools (such as Metasploit and CORE IMPACT) that take penetration testing one step further and attempt to exploit known vulnerabilities in systems and networks; these tools may be used by good guys and bad guys alike.

Penetration testing may use automated attack tools or suites or be performed manually using common network utilities and scripts. Automated attack tools range from professional vulnerability scanners to wild, underground tools discovered on the Internet. Tools are also often used for penetration testing that’s performed manually, but the real emphasis is on knowing how to perpetrate an attack.

Penetration testing should be performed only with the consent and knowledge of management (and security staff). Performing unapproved security testing could cause productivity losses, trigger emergency response teams, or even cost you your job and potentially earn you jail time.

Regularly staged penetration tests are a good way to accurately judge the security mechanisms deployed by an organization. Penetration testing can also reveal areas where patches or security settings are insuffi cient and where new vulnerabilities have developed.

To evaluate your system, benchmarking and testing tools are available for download at www.cisecurity.org

, and a somewhat comprehensive list of hacker/penetration testing tools is available from www.sectools.org

.

Identifying and repelling attacks requires an explicit, well-defi ned body of knowledge about their nature and occurrence. Some attack patterns leave behind signatures that

3.8 Explain the proper use of penetration testing versus vulnerability scanning

219

make them readily apparent to casual observation with IDS instrumentation; other forms of attack are esoteric or not conducive to pattern-matching engines and therefore must be measured against a baseline of acceptable activity.

What elements or properties signify an attack sequence rather than a benign traffi c formation? Answering this question depends on careful, attentive security professionals keeping up with the latest attacks, vulnerabilities, exploits, and security bulletins (like those from the U.S. Computer Emergency Readiness Team at www.us-cert.gov/cas/bulletins

or those from the Common Vulnerabilities and Exposures database at http://cve.mitre.org

).

Verify a threat exists

Before implementing a fi x or a security control, it’s important to verify that a problem actually exists. There is no point in protecting against a threat if your environment doesn’t have the vulnerability. Likewise, if the threat doesn’t exist or is extremely unlikely to ever become realized in your organization, implementing countermeasures may also be unwarranted.

Part of penetration testing is to confi rm whether a vulnerability exists and whether a real threat exists. Based on the criticality of known threats, vulnerabilities, and risks, you can make a determination about whether to respond by implementing a countermeasure, assigning the risk elsewhere, or formally accepting the risk.

Bypass security controls

Hackers often attempt to fi nd a way to bypass security controls. An ethical hacker or penetration tester attempts many of these same techniques so that you can be aware of them before they’re abused by someone malicious. Means of bypassing security controls vary greatly, but some common general categories include using alternate physical or logical pathways, overloading controls, and exploiting new fl aws. If a hacker knows that a specifi c pathway of approach is secured, they may seek an alternate route. For example, if all

Internet sourced traffi c is fi ltered by a fi rewall, a hacker may try to locate a modem or an unauthorized wireless access point on the network to bypass the fi rewall’s security.

Sometimes DoS/DDoS attacks can be used to overload fi rewalls, IDS, IPS, auditing, and so on, so that these security tools are “distracted” while the real attack takes place.

Also, new exploits are being crafted daily that may be able to compromise security through exploitation of faulty programming code. For examples, see the website Exploit Database at www.exploit-db.com

for a current list of exposed new and zero-day exploits.

Just because an electronic lock or other form of access control is in use, that doesn’t ensure that bypassing the system is impossible. Ways to bypass electronic controls include turning off the power, creating a short circuit, introducing an alternative power supply, bypassing triggering circuits, and overloading detectors with false positives.

Actively test security controls

A penetration test should be used to fi nd new fl aws or unknown vulnerabilities as well as to test the abilities of the deployed security infrastructure. If current security controls aren’t

220

Chapter 3

Threats and Vulnerabilities suffi cient or can be easily bypassed, a thorough penetration test should reveal this. If your security posture isn’t resilient enough to catch profi cient ethical hackers, then it’s unlikely that it’s good enough to catch professional criminal hackers.

Exploiting vulnerabilities

A penetration test should discover vulnerabilities and then exploit them to a predetermined extent. The testing should not be performed to the point of causing unrepairable damage or prolonged downtime. The whole point of penetration testing is for the testers to act ethically and within restrictions or boundaries imposed by the service-level agreement (SLA) or testing contract. Any test that might cause harm should gain specifi c preapproval before it’s executed. Additionally, the target being tested should be prepared with recent backups and a recovery team just in case the tester’s precautions aren’t suffi cient or the attack accidentally is more extensive than expected.

Vulnerability scanning

Vulnerability scanning is used to discover weaknesses in deployed security systems in order to improve or repair them before a breach occurs. By using a wide variety of assessment tools (vulnerability scanners, as discussed in section 3.7), security administrators can learn about defi ciencies quickly. Only through vigilance and constant monitoring and assessment can a security endeavor prove successful.

Typically, vulnerability scanning should be performed by system administrators on a regular periodic basis (such as weekly). Additionally, only after thoroughly performing vulnerability scanning and responding to/addressing each alert item is an organization ready for a true penetration test. A penetration test requires dedicated full-time testing professionals, who are often external consultants. A vulnerability scan can be run by any reasonably skilled and knowledgeable IT or security administrator with a little training and lab testing.

Passively testing security controls

A passive test of security controls is being performed when an automated vulnerability scanner is being used. In most cases, automated vulnerability scanners detect the security control as it attempts a test. Additionally, because the security controls are operating while the automated vulnerability scan is being performed, the security controls get a workout at the same time the actual targets are the focus of the scan. Thus, passively testing security controls takes place any time tests are performed against targets but not specifi cally directed toward the security measures themselves.

Identify vulnerability

See the earlier discussion on vulnerability identifi cation and discovery in section 3.7.

3.8 Explain the proper use of penetration testing versus vulnerability scanning

221

Identify lack of security controls

See the discussion of vulnerability scanning in section 3.7 for an explanation of identifying security controls.

Identify common misconfigurations

See the discussion of vulnerability scanning in section 3.7 for an explanation of identifying common misconfi gurations.

Intrusive vs. non-intrusive

An intrusive vulnerability scan attempts to exploit any fl aws or vulnerabilities detected.

A nonintrusive vulnerability scan only discovers the symptoms of fl aws and vulnerabilities and doesn’t attempt to exploit them. Traditionally, a vulnerability scanner is assumed to be nonintrusive, whereas a penetration test is assumed to be intrusive. However, a range of assessment tools can now provide either form of evaluation.

Credentialed vs. non-credentialed

A credentialed scan is one where the logon credentials of a user, typically a system administrator or the root, must be provided to the scanner in order for it to perform its work. A

noncredentialed scan is one where no user accounts are provided to the scanning tool, so only those vulnerabilities that don’t require credentials are discovered. Both forms of scanning should be used to provide a thorough evaluation of your security infrastructure.

False positive

A false positive is the occurrence of an alarm or alert due to a benign activity being initially classifi ed as potentially malicious. See Chapter 2, section 2.1, for a discussion of false positives.

Black box

It’s important to understand various terms for penetration (and other forms of) testing.

A black box is literally a device whose internal circuits, makeup, and processing functions are unknown but whose outputs in response to various kinds of inputs can be observed and analyzed. Black-box penetration testing proceeds without using any knowledge of how an organization is structured, what kinds of hardware and software it uses, or its security policies, processes, and procedures.

Black-box testing examines the program from a user perspective by providing a wide variety of input scenarios and inspecting the output. Black-box testers don’t have access to the internal code. Final acceptance testing that occurs prior to system delivery is a common example of black-box testing.

222

Chapter 3

Threats and Vulnerabilities

White box

On the other hand, a white box is a device whose internal structure and processing are known and understood. This distinction is important in penetration testing, where whitebox testing makes use of knowledge about how an organization is structured, what kinds of hardware and software it uses, and its security policies, processes, and procedures.

White-box testing seeks to exploit everything known about those things to focus and guide testing efforts. The tests examine the internal logical structures of a program and step through the code line by line, analyzing the program for potential errors. White-box penetration testing uses all available knowledge to drive its efforts.

Gray box

Gray-box testing combines the two approaches and is a popular approach to software validation. Testers approach the software from a user perspective, analyzing inputs and outputs. They also have access to the source code and use it to help design their tests. They do not, however, analyze the inner workings of the program during their testing.

Exam Essentials

Understand penetration testing. A penetration test is a form of vulnerability scan that is performed by a special team of trained white-hat security specialists rather than by an internal security administrator using an automated tool. Penetration testing (aka ethical hacking) uses the same tools, techniques, and skills of real-world criminal hackers as a methodology to test the deployed security infrastructure of an organization.

Understand vulnerability scanning. Vulnerability scanning is used to discover weaknesses in deployed security systems in order to improve or repair them before a breach occurs. By using a wide variety of assessment tools, security administrators can learn about defi ciencies quickly.

Understand black-box testing. Black-box testing examines a program from a user perspective by providing a wide variety of input scenarios and inspecting the output.

Understand white-box testing. White-box testing examines the internal logical structures of a program and steps through the code line by line, analyzing the program for potential errors.

Understand gray-box testing. Gray-box testing combines the two approaches (black box and white box) and is a popular approach to software validation.

Review Questions

223

Review Questions

1. What communications technique can a hacker use to identity the product that is running on an open port facing the Internet?

A. Credentialed penetration test

B. Intrusive vulnerability scan

2. A rootkit has been discovered on your mission-critical database server. What is the best step to take to return this system to production?

B. Run an antivirus tool.

C. Install an HIDS.

D. Apply vendor patches.

3. Which of the following is a denial-of-service attack that uses network packets that have been spoofed so that the source and destination address are that of the victim?

A. Land

B. Teardrop

C. Smurf

D. Fraggle

4. If user awareness is overlooked, what attack is more likely to succeed?

A. Man-in-the-middle

B. Reverse hash matching

5. A pirated movie-sharing service was discovered operating on company equipment. Administrators do not know who planted the service or who the users are. What technique could be used to attempt to trace the identity of the users?

C. Watering hole attack

D. Ransomware

6. What type of virus is able to regenerate itself if a single element of its infection is not removed from a compromised system?

A. Polymorphic

B. Armored

224

Chapter 3

Threats and Vulnerabilities

C. Retro

D. Phage

7. A security template can be used to perform all but which of the following tasks?

A. Capture the security configuration of a master system

B. Apply security settings to a target system

C. Return a target system to its precompromised state

D. Evaluate compliance with security of a target system

8. What tool is used to lure or retain intruders in order to gather sufficient evidence without compromising the security of the private network?

A. Firewall

B. IDS

C. Router

D. Honeypot

9. What is an asset?

A. An item costing more than $10,000

B. Anything used in a work task

C. A threat to the security of an organization

D. An intangible resource

10. What is a significant difference between vulnerability scanners and penetration testing?

A. One tests both the infrastructure and personnel.

B. One only tests internal weaknesses.

C. One only tests for configuration errors.

D. One is used to find problems before hackers do.

Chapter

4

Application, Data, and Host Security

COMPTIA SECURITY+ EXAM OBJECTIVES

COVERED IN THIS CHAPTER INCLUDE THE

FOLLOWING:

4.1 Explain the importance of application security controls

and techniques.

Fuzzing

Secure coding concepts

Error and exception handling

Input validation

Cross-site scripting prevention

Cross-site Request Forgery (XSRF) prevention

Application configuration baseline (proper settings)

Application hardening

Application patch management

NoSQL databases vs. SQL databases

Server-side vs. Client-side validation

4.2 Summarize mobile security concepts and technologies.

Device security

Full device encryption

Remote wiping

Lockout

Screen locks

GPS

Application control

Storage segmentation

Asset tracking

Inventory control

Mobile device management

Device access control

Removable storage

Disabling unused features

Application security

Key management

Credential management

Authentication

Geo-tagging

Encryption

Application whitelisting

Transitive trust/authentication

BYOD concerns

Data ownership

Support ownership

Patch management

Antivirus management

Forensics

Privacy

On-boarding/off-boarding

Adherence to corporate policies

User acceptance

Architecture/infrastructure considerations

Legal concerns

Acceptable use policy

On-board camera/video

4.3 Given a scenario, select the appropriate solution to

establish host security.

Operating system security and settings

OS hardening

Anti-malware

Antivirus

Anti-spam

Anti-spyware

Pop-up blockers

Patch management

White listing vs. black listing applications

Trusted OS

Host-based firewalls

Host-based intrusion detection

Hardware security

Cable locks

Safe

Locking cabinets

Host software baselining

Virtualization

Snapshots

Patch compatibility

Host availability/elasticity

Security control testing

Sandboxing

4.4 Implement the appropriate controls to ensure

data security.

Cloud storage

SAN

Handling big data

Data encryption

Full disk

Database

Individual files

Removable media

Mobile devices

Hardware-based encryption devices

TPM

HSM

USB encryption

Hard drive

Data in transit, Data at rest, Data in use

Permissions/ACL

Data policies

Wiping

Disposing

Retention

Storage

4.5 Compare and contrast alternative methods to mitigate

security risks in static environments.

Environments

SCADA

Embedded (printer, Smart TV, HVAC control)

Android

■ iOS

Mainframe

Game consoles

In-vehicle computing systems

Methods

Network segmentation

Security layers

Application firewalls

Manual updates

Firmware version control

Wrappers

Control redundancy and diversity

The Security

+

exam will test your basic IT security skills— those skills you need to effectively secure stand-alone and networked systems in a corporate environment. To pass the test and be effective in implementing security, you need to understand the basic concepts and terminology related to systems security as detailed in this chapter.

4.1 Explain the importance of application security controls and techniques

No amount of network hardening, auditing, or user training can compensate for bad programming. Solid application security is essential to the long-term survival of any organization.

Application security begins with secure coding and design, which is then maintained over the life of the software through testing and patching.

Fuzzing

Fuzzing is a software-testing technique that generates inputs for targeted programs. The goal of fuzz testing is to discover input sets that cause errors, failures, and crashes, or to discover other unknown defects in the targeted program. Basically, a fuzz-tester brute-force attack generates inputs within given parameters far in excess of what a normal, regular user or environment would ever be able to do. The information discovered by a fuzzing tool can be used to improve software as well as develop exploits for it.

Once a fuzz-testing tool discovers a constructed input that causes an abnormal behavior in the target application, the input and response are recorded into a log. The log of interesting inputs is reviewed by a security professional or a hacker. With the right skills and tools, the results of fuzzing can be transformed into a patch that fi xes discovered defects or exploits that take advantage of them.

Secure coding concepts

Secure coding concepts are those efforts designed to implement security into software as it’s being developed. Security should be designed into the concept of a new solution, but

230

Chapter 4

Application, Data, and Host Security programmers still need to code the security elements properly and avoid common pitfalls and mistakes while coding.

Error and exception handling

When errors occur, the program should fall back to a secure state. This is generally known as fail-secure design. However, the programmer must code this into their application in order for a true fail-secure response to take place. This should include error and exception handling. When a process, a procedure, or an input results in or causes an error, the system should revert to a more secure state. This could include resetting back to a previous state of operation, rebooting back into a secured state, or recycling the connection state to revert back to secured communications. Errors should also provide minimal information to visitors and users, especially outside/external visitors and users. All detailed error messages should be stored in an access-restricted log fi le for the programmers and administrators.

Any time an exception is encountered, it should be rejected and the fail-secure response should be triggered.

Input validation

Input validation is an aspect of defensive programming intended to ward off a wide range of input-focused attacks, such as buffer overfl ows and fuzzing. Input validation checks each and every input received before it’s allowed to be processed. The check could be a length, a character type, a language type, a domain, or even a timing check to prevent unknown, unwanted, or unexpected content from making it to the core program.

Cross-site scripting prevention

Defenses against cross-site scripting (XSS) include maintaining a patched web server, using fi rewalls, auditing for suspicious activity, and, most important, performing server-side input validation. The most effective ways to prevent XSS on a resource host are implemented by the programmer by validating input, coding defensively, escaping metacharacters, and rejecting all script-like input. As a web user, you can defend against

XSS by keeping your system patched, properly confi guring your browser, running antivirus software, employing script-protection software such as NoScript, and avoiding nonmainstream websites.

Cross-site Request Forgery (XSRF) prevention

Cross-site request forgery (XSRF) is an attack that is similar in nature to XSS. However, with XSRF, the attack is focused on the visiting user’s web browser more so than the website being visited. The main purpose of XSRF is to trick the user or the user’s browser into performing actions they had not intended or would not have authorized. This could include logging out of a session, uploading a site cookie, changing account information, downloading account details, making a purchase, and so on.

4.1 Explain the importance of application security controls and techniques

231

Prevention measures include adding a randomization string (called a nonce) to each

URL request and session establishment and checking the client HTTP request header referrer for spoofi ng. End users can form more secure habits, such as always logging off from sites instead of closing the browser, closing the tab, or moving on to another URL; keeping browsers patched; and clearing out temporary fi les and cached cookies regularly.

Application configuration baseline (proper settings)

Before deploying a new application into the production environment, you should install it into a lab or pilot environment. Once testing is complete, the deployment procedure should include the crafting of an installation how-to. This how-to must include not only the steps for deployment but also the baseline of initial confi guration. This can be a written baseline or a template fi le that can be applied. The purpose of an application confi guration baseline is to ensure compliance with policy and reduce human oversight. Baselines can be reapplied periodically or validated against changing work conditions as needed.

Application hardening

Application hardening is based on removing or disabling any unnecessary features or components, and then securing the remaining elements. See the hardening discussion in

Chapter 3, section 3.6, “Analyze a scenario and select the appropriate type of mitigation and deterrent techniques.”

Application patch management

Security is always a moving target. A system that is secure today may be vulnerable tomorrow. New methods of attacks, new attack tools, new viruses, new weaknesses, accidents in your environment, and much more can cause new risks, threats, and vulnerabilities at any time. Staying vigilant in the face of new security issues is essential in today’s business environment. One method for staying as secure as possible is to install updates from vendors.

Using vendor updates to OSs, applications, services, protocols, device drivers, and any other software is the absolute best way to protect your environment from known attacks and vulnerabilities. Not all vendor updates are security related, but any error, bug, or fl aw that can be exploited to result in damaged data, disclosure of information, or obstructed access to resources should be addressed.

The best way to keep your systems updated is by using a good patch-management system that includes the following steps:

1.

Watch vendor websites for information about updates.

2.

Sign up for newsletters, discussion groups, or notifications.

3.

Download all updates as they’re made available. Be sure to verify all downloads against the vendor-provided hashes.

4.

Test all updates on nonproduction systems.

232

Chapter 4

Application, Data, and Host Security

5.

Document changes to your test systems, and plan the implementation on production systems.

6.

Back up production systems before implementing updates.

7.

Implement updates on production systems.

8.

Evaluate the effect of the updates on the production systems.

9.

If negative effects are discovered, roll back the update.

Patch management can be implemented via a manual process, or you can use an intelligent software tool to automate this essential activity. An example of intelligent patch-management software for Windows environments is Microsoft’s Windows Server

Update Services (WSUS) software. WSUS provides administrators with a centralized means of patch management, distribution, and installation. There are similar product solutions for other OSs and mixed-OS environments. Although security involves more than just patch management, security management requires that patches and updates are properly installed.

A hotfi x is often a single-issue update (however, there are some multi-issue hotfi xes) that corrects a single problem. Hotfi xes aren’t as thoroughly tested as other updates—they’re quickly designed and released to deal with immediate issues and problems. You should install them if you’re experiencing the problem they’re designed to correct or if you’re threatened by the vulnerability they’re designed to address.

Service packs are collections of hotfi xes and other previously unreleased updates and features as a single entity. They’re thoroughly tested and generally should be applied to all systems once they’re made available. Service packs may be cumulative, so you only need to apply the most recent service pack to keep your systems current. When a service pack isn’t cumulative, it requires a specifi c base level of previous patches before it can be applied.

A patch is an update that corrects programming fl aws that cause security vulnerabilities.

Patches are single-issue utilities that are more thoroughly tested than hotfi xes.

NoSQL databases vs. SQL databases

NoSQL databases versus SQL databases is a common argument waged between database management software (DBMS) managers and database programmers alike. However, using the term SQL here isn’t entirely accurate, because structured query language (SQL) is a means to interact with a database rather than a form or type of database itself. More specifi cally, the comparison is between relational databases (RDBMSs) and nonrelational databases. Databases that are labeled as NoSQL may actually support SQL commands, and thus instead should be labeled as NoRDBMS.

A relational database is a means to organize and structure data in a fl at two-dimensional table. The row and column-based organizational scheme is widely used, but it isn’t always the best solution. Relational databases can become diffi cult to manage and use when they grow extremely large, especially if they’re poorly designed and managed. Their performance can be slowed when signifi cant numbers of simultaneous users perform queries. And they might not support data mapping needed by modern complex programming

4.1 Explain the importance of application security controls and techniques

233

techniques and data structures. In the past, most applications of RDBMSs did not experience any of these potential downsides. However, in today’s era of big data and services the size of Google, Amazon, Twitter, and Facebook, RDBMSs aren’t suffi cient solutions to some data-management needs.

NoSQL is a database approach that employs nonrelational data structures, such as hierarchies or multilevel nesting/referencing. A hierarchical data structure is one where every data object can have a single data-parent relation and none, one, or many data-child relations. A data parent is an item upward or closer to the root of the hierarchy, whereas a data

child is an item downward or further away from the root. DNS and XML data are excellent examples of hierarchical data structures.

A multilevel nesting and cross-referencing data structure is a system where a data object can have multiple data-parent and data-child links and may even have links across multiple levels or among “peer” data items. Effectively, any data item can be linked to any other data item, with no structural limitations. The organization of Facebook, Twitter, and

Google+ relationships are of this nature. This DBMS structure is also known as a distrib-

uted database model.

In recent years, services, applications, and websites that have employed SQL databases

(again, for clarity, a DBMS that supports SQL expressions) have been found vulnerable to a range of attacks, most notably SQL injection (see section 3.5, subsection “SQL Injection”).

However, this attack has less to do with the DBMS and SQL expressions than it does the tendency for sites to be confi gured with minimal security and to use nondefensive scripts.

Scripts that receive input from users but that aren’t written to specifi cally defend against

SQL injection are by default vulnerable. This vulnerability, tied in with loose security controls on the DBMS, has enabled the proliferation of SQL injection attacks across the Internet.

Although this is a serious issue, it isn’t the reason to switch to a NoSQL solution. There are many RDBMS options that either don’t support SQL as an expression language or can allow SQL to be disabled. NoSQL DBMS options can often support SQL as an expression language. Thus, switching to NoSQL doesn’t resolve the SQL injection attack vulnerability on its own. The reason to switch to NoSQL solutions is to obtain a data structure and have access to data-management features that are better suited for a particular data set or programming need.

NoSQL is also known for not supporting ACID, which is a standard benefi t or feature of most RDBMSs. ACID stands for:

Atomicity—Each transaction occurs in an all-or-nothing state.

Consistency—Each transaction maintains valid data and a valid state of the database.

Isolation—Each transaction occurs individually without interference.

Durability—Each applied transaction is resilient.

A discussion of NoSQL often brings up the topic of JSON. JavaScript Object Notation

(JSON) is a common organizational and referencing format used by some NoSQL database options. The use of JSON as the basis for a NoSQL solution is a popular option for Internet services. However, it’s only one of the many NoSQL options available.

234

Chapter 4

Application, Data, and Host Security

Server-side vs. Client-side validation

Server-side validation is suited for protecting a system against input submitted by a malicious user. Most client-side executions of scripts or mobile applets can be easily bypassed by a skilled web hacker. Thus, any client-side fi ltering is of little defense if the submission to the server bypasses those protections. A web hacker can edit JavaScript, edit HTML, modify forms, alter URLs, and much more. Thus, never assume any client-side fi ltering was effective—all input should be reassessed on the server side before processing. Server-side validation should include a check for input length, a fi lter for known scriptable or malicious content (such as SQL commands or script calls), and a metacharacter fi lter. A metacharacter is any character assigned a special programmatic meaning by a programming language or an execution environment. Common examples of metacharacters are

<

,

>

,

-

,

+

,

"

,

\

, and

/

.

Client-side validation is also important, but its focus is on providing better responses or feedback to the typical user. Client-side validation can be used to indicate whether input meets certain requirements, such as length, value, content, and so on. For example, if an email address is requested, a client-side validation check can confi rm that it uses supported characters and is of the construction [email protected]

.

Although all the validation can take place on the server side, it is often a more complex process and introduces delays to the interaction. A combination of server-side and clientside validation allows for a more effi cient interaction while maintaining reasonable security defenses.

Exam Essentials

Understand fuzzing. Fuzzing is a software-testing technique that generates inputs for targeted programs. The goal of fuzz testing is to discover input sets that cause errors, failures, and crashes, or to discover other defects in the targeted program.

Understand secure coding concepts. Secure coding concepts are those efforts designed to implement security into software as it’s being developed. Security should be designed into the concept of a new solution, but programmers still need to code the security elements properly and avoid common pitfalls and mistakes while coding.

Understand error and exception handling. When a process, a procedure, or an input causes an error, the system should revert to a more secure state. This could include resetting back to a previous state of operation, rebooting back into a secured state, or recycling the connection state to revert back to secured communications.

Understand input validation. Input validation checks each and every input received before it’s allowed to be processed. The check could be a length, a character type, a language type, a domain, or even a timing check to prevent unknown, unwanted, or unexpected content from making it to the core program.

Understand cross-site scripting (XSS) prevention. The most effective ways to prevent XSS on a resource host are implemented by the programmer by validating input, coding defensively, escaping metacharacters, and rejecting all script-like input.

4.2 Summarize mobile security concepts and technologies

235

Understand cross-site request forgery (XSRF) prevention. XSRF prevention measures include adding a randomization string (called a nonce) to each URL request and session establishment and checking the client HTTP request header referrer for spoofi ng.

Understand application hardening and the configuration baseline. Application hardening is the task of imposing security on required applications and services. This usually involves tuning and confi guring the native security features of the installed software, performing patch management, and installing supportive security applications as needed. When you’re developing new applications in house, it’s also important to include security design, implementation, and integration throughout the development process. The purpose of an application confi guration baseline is to ensure compliance with policy and reduce human oversight.

Understand NoSQL. NoSQL is a database approach that employs nonrelational data structures, such as hierarchies and multilevel nesting/referencing.

Understand server-side validation. Server-side validation is suited for protecting a system against input submitted by a malicious user. It should include a check for input length, a fi lter for known scriptable or malicious content (such as SQL commands or script calls), and a metacharacter fi lter.

Understand client-side validation. Client-side validation focuses on providing better responses or feedback to the typical user. It can be used to indicate whether input meets certain requirements, such as length, value, content, and so on.

4.2 Summarize mobile security concepts and technologies

Smartphones and other mobile devices present an ever-increasing security risk as they become more and more capable of interacting with the Internet as well as corporate networks. Mobile devices often support memory cards and can be used to smuggle malicious code into or confi dential data out of organizations. Mobile devices often contain sensitive data such as contacts, text messages, email, and possibly notes and documents. The loss or theft of a mobile device could mean the compromise of personal and/or corporate secrets.

Mobile devices are becoming the target of hackers and malicious code. It’s important to keep nonessential information off portable devices, run a fi rewall and antivirus product (if available), and keep the system locked and/or encrypted (if possible).

Many mobile devices also support USB connections to perform synchronization of communications and contacts with desktop and/or notebook computers as well as the transfer of fi les, documents, music, video, and so on.

Additionally, mobile devices aren’t immune to eavesdropping. With the right type of sophisticated equipment, most mobile phone conversations can be tapped into—not to mention the fact that anyone within 15 feet can hear you talking. Be careful what you discuss over a mobile phone, especially when you’re in a public place.

236

Chapter 4

Application, Data, and Host Security

A wide range of security features are available on mobile devices. However, support for a feature isn’t the same thing as having a feature properly confi gured and enabled. A security benefi t is gained only when the security function is in force. Be sure to check that all desired security features are operating as expected on your device.

Device security

Device security is the range of potential security options or features that may be available for a mobile device. Not all portable electronic devices (PEDs) have good security features.

But even if devices have security features, they’re of no value unless they’re enabled and properly confi gured. Be sure to consider the security options of a new device before you make a purchase decision.

Full device encryption

Some mobile devices, including portable computers, tablets, as well as mobile phones, may offer device encryption. If most or all the storage media of a device can be encrypted, this is usually a worthwhile feature to enable. However, encryption isn’t a guarantee of protection for data, especially if the device is stolen while unlocked or if the system itself has a known backdoor attack vulnerability.

Voice encryption may be possible on mobile devices when voice over IP (VOIP) services are used. VOIP service between computer-like devices is more likely to offer an encryption option than VOIP connections to a traditional land-line phone or typical mobile phone.

When a voice conversation is encrypted, eavesdropping becomes worthless because the contents of the conversation are undecipherable.

Remote wiping

It’s becoming common for a remote wipe or remote sanitation to be performed if a device is lost or stolen. A remote wipe lets you delete all data and possibly even confi guration settings from a device remotely. The wipe process can be triggered over mobile phone service or sometimes over any Internet connection. However, a remote wipe isn’t a guarantee of data security. Thieves may be smart enough to prevent connections that would trigger the wipe function while they dump out the data.

Lockout

Lockout on a mobile device is similar to account lockout on a company workstation. When a user fails to provide their credentials after repeated attempts, the account or device is disabled (locked out) for a period of time or until an administrator clears the lockout fl ag.

Mobile devices may offer a lockout feature, but it’s in use only if a screen lock has been confi gured. Otherwise, a simple screen swipe to access the device doesn’t provide suffi cient security, because an authentication process doesn’t occur. Some devices trigger ever longer delays between access attempts as a greater number of authentication failures occur. Some devices allow for a set number of attempts (such as three) before triggering a lockout that

4.2 Summarize mobile security concepts and technologies

237

lasts minutes. Other devices trigger a persistent lockout and require the use of a different account or master password/code to regain access to the device.

Screen locks

A screen lock is designed to prevent someone from casually picking up and being able to use your phone or mobile device. However, most screen locks can be unlocked by swiping a pattern or typing a number on a keypad display. Neither of these is truly a secure operation. Screen locks may have workarounds, such as accessing the phone application through the emergency calling feature. And a screen lock doesn’t necessarily protect the device if a hacker connects to it over Bluetooth, wireless, or a USB cable.

Screen locks are often triggered after a timeout period of non-use. Most PCs auto-trigger a password-protected screen saver if the system is left idle for a few minutes. Similarly, many tablets and mobile phones trigger a screen lock and dim or turn off the display after

30–60 seconds. The lockout feature ensures that if you leave your device unattended or it’s lost or stolen, it will be diffi cult for anyone else to be able to access your data or applications. To unlock the device, you must enter a password, code, or PIN; draw a pattern; offer your eyeball or face for recognition; scan your fi ngerprint; or use a proximity device such as a near-fi eld communication (NFC) or radio-frequency identifi cation (RFID) ring or tile.

GPS

Many mobile devices include a GPS chip to support and benefi t from localized services, such as navigation, so it’s possible to track those devices. The GPS chip itself is usually just a receiver of signals from orbiting GPS satellites. However, applications on the mobile device can record the GPS location of the device and then report it to an online service.

You can use GPS tracking to monitor your own movements, track the movements of others

(such as minors or delivery personnel), or track down a stolen device. But for GPS tracking to work, the mobile device must have Internet or wireless phone service over which to communicate its location information.

Application control

Application control is a device-management solution that limits which applications can be installed onto a device. It can also be used to force specifi c applications to be installed or to enforce the settings of certain applications, in order to support a security baseline or maintain other forms of compliance. Using application control can often reduce exposure to malicious applications by limiting the user’s ability to install apps that come from unknown sources or that offer non-work-related features.

Storage segmentation

Storage segmentation is used to artifi cially compartmentalize various types or values of data on a storage medium. On a mobile device, the device manufacturer and/or the service provider may use storage segmentation to isolate the device’s OS and preinstalled apps from user-installed apps and user data. Some mobile device-management systems further impose storage segmentation in order to separate company data and apps from user data and apps.

238

Chapter 4

Application, Data, and Host Security

Asset tracking

Asset tracking is the management process used to maintain oversight over an inventory, such as deployed mobile devices. An asset-tracking system can be passive or active. Passive systems rely on the asset itself to check in with the management service on a regular basis; or the device is detected as being present in the offi ce each time the employee arrives at work. An active system uses a polling or pushing technology to send out queries to devices in order to illicit a response.

You can use asset tracking to verify that a device is still in the possession of the assigned authorized user. Some asset-tracking solutions can locate missing or stolen devices.

Some asset-tracking solutions expand beyond hardware inventory management and can oversee the installed apps, app usage, stored data, and data access on a device. You can use this type of monitoring to verify compliance with security guidelines or check for exposure of confi dential information to unauthorized entities.

Inventory control

The term inventory control may describe hardware asset tracking (as discussed in the previous topic). However, it can also refer to the concept of using a mobile device as a means to track inventory in a warehouse or storage cabinet. Most mobile devices have a camera.

Using a mobile device camera, apps that can take photos or scan bar codes can be used to track physical goods. Those mobile devices with RFID or NFC capabilities may be able to interact with objects or their containers that have been electronically tagged.

Mobile device management

Mobile device management (MDM) is a software solution to the challenging task of managing the myriad mobile devices that employees use to access company resources. The goals of MDM are to improve security, provide monitoring, enable remote management, and support troubleshooting. Many MDM solutions support a wide range of devices and can operate across many service providers. You can use MDM to push or remove apps, manage data, and enforce confi guration settings both over the air (across a carrier network) and over WiFi connections. MDM can be used to manage company-owned devices as well as personally owned devices (such as in a bring-your-own-device [BYOD] environment).

Device access control

A strong password would be a great idea on a phone or other mobile device if locking the phone provided true security. But most mobile devices aren’t secure, so even with a strong password, the device is still accessible over Bluetooth, wireless, or a USB cable. If a specifi c mobile device blocked access to the device when the system lock was enabled, this would be a worthwhile feature to set to trigger automatically after a period of inactivity or manual initialization. This benefi t is usually obtained when you enable both a device password and storage encryption.

You should consider any means that reduces unauthorized access to a mobile device.

Many MDM solutions can force screen-lock confi guration and prevent a user from disabling the feature.

4.2 Summarize mobile security concepts and technologies

239

Removable storage

Many mobile devices support removable storage. Some devices support microSD cards, which can be used to expand available storage on a mobile device. However, most mobile phones require the removal of a back plate and sometimes removal of the battery in order to add or remove a storage card. Larger mobile phones, tablets, and notebook computers may support an easily accessible card slot on the side of the device.

Many mobile devices also support external USB storage devices, such as fl ash drives and external hard drives. These may require a special on-the-go (OTG) cable.

In addition, there are mobile storage devices that can provide Bluetooth- or WiFi-based access to stored data through an on-board wireless interface.

Disabling unused features

Although enabling security features is essential for them to have any benefi cial effect, it’s just as important to remove apps and disable features that aren’t essential to business tasks or common personal use. The wider the range of enabled features and installed apps, the greater the chance that an exploitation or software fl aw will cause harm to the device and/or the data it contains. Following common security practices, such as hardening, reduces the attack surface of mobile devices.

Application security

In addition to managing the security of mobile devices, you also need to focus on the applications and functions used on those devices. Most of the software security concerns on desktop or notebook systems apply to mobile devices just as much as common-sense security practices do.

Key management

Key management is always a concern when cryptography is involved. Most of the failures of a cryptosystem are based on the key management rather than on the algorithms. Good key selection is based on the quality and availability of random numbers. Most mobile devices must rely locally on poor random-number-producing mechanisms or access more robust random number generators (RNGs) over a wireless link. Once keys are created, they need to be stored in such a way as to minimize exposure to loss or compromise. The best option for key storage is usually removable hardware or the use of a trusted platform module (TPM), but these are rarely available on mobile phones and tablets.

For more discussion on key management in general, see Chapter 6, “Cryptography.”

Credential management

The storage of credentials in a central location is referred to as credential manage-

ment. Given the wide range of Internet sites and services, each with its own particular logon requirements, it can be a burden to use unique names and passwords. Credentialmanagement solutions offer a means to securely store a plethora of credential sets. Often these tools employ a master credential set (multifactor being preferred) to unlock the

240

Chapter 4

Application, Data, and Host Security dataset when needed. Some credential-management options can even provide auto-login options for apps and websites.

For more on credential management, see Chapter 5, section 5.3.

Authentication

Authentication on or to a mobile device is often fairly simple, especially for mobile phones and tablets. However, a swipe or pattern access shouldn’t be considered true authentication.

Whenever possible, use a password, provide a PIN, offer your eyeball or face for recognition, scan your fi ngerprint, or use a proximity device such as an NFC or RFID ring or tile.

These means of device authentication are much more diffi cult for a thief to bypass. As mentioned previously, it’s also prudent to combine device authentication with device encryption to block access to stored information via a connection cable.

Geo-tagging

Mobile devices with GPS support enable the embedding of geographical location in the form of latitude and longitude as well as date/time information on photos taken with these devices.

This allows a would-be attacker (or angry ex) to view photos from social networking or similar sites and determine exactly when and where a photo was taken. This geo-tagging can be used for nefarious purposes, such as determining when a person normally performs routine activities.

Once a geo-tagged photo has been uploaded to the Internet, a potential cyber-stalker may have access to more information than the uploader intended. This is prime material for security-awareness briefs for end users.

Encryption

Encryption is often a useful protection mechanism against unauthorized access to data, whether in storage or in transit. Most mobile devices provide some form of storage encryption. When this is available, it should be enabled. Some mobile devices offer native support for communications encryption, but most can run add-on software (apps) that can add encryption to data sessions, voice calls, and/or video conferences.

Chapter 6 discusses encryption in greater detail.

Application whitelisting

Application whitelisting is a security option that prohibits unauthorized software from being able to execute. Whitelisting is also known as deny by default or implicit deny. In application security, whitelisting prevents any and all software, including malware, from executing unless it’s on the preapproved exception list: the whitelist. This is a signifi cant departure from the typical device-security stance, which is to allow by default and deny by exception (also known as blacklisting).

Due to the growth of malware, an application whitelisting approach is one of the few options remaining that shows real promise in protecting devices and data. However, no security solution is perfect, including whitelisting. All known whitelisting solutions can be circumvented with kernel-level vulnerabilities and application confi guration issues.

4.2 Summarize mobile security concepts and technologies

241

Transitive trust/authentication

Transitive access, trust, or authentication are potential backdoor or ways to work around traditional means of access control. See Chapter 3, section 3.2, “Summarize various types of attacks,” for more on this topic.

BYOD concerns

BYOD is a policy that allows employees to bring their own personal mobile devices into work and use those devices to connect to (or through) the company network to business resources and/or the Internet. Although BYOD may improve employee morale and job satisfaction, it increases security risk to the organization. If the BYOD policy is open-ended, any device is allowed to connect to the company network. Not all mobile devices have security features, and thus such a policy allows noncompliant devices onto the production network.

A BYOD policy that mandates specifi c devices may reduce this risk, but it may in turn require the company to purchase devices for employees who are unable to purchase their own compliant device. Many other BYOD concerns are discussed in the following sections.

Users need to understand the benefi ts, restrictions, and consequences of using their own devices at work. Reading and signing off on the BYOD policy along with attending an overview or training program may be suffi cient to accomplish reasonable awareness.

Data ownership

When a personal device is used for business tasks, comingling of personal data and business data is likely to occur. Some devices can support storage segmentation, but not all devices can provide data-type isolation. Establishing data ownership can be complicated.

For example, if a device is lost or stolen, the company may wish to trigger a remote wipe, clearing the device of all valuable information. However, the employee will often be resistant to this, especially if there is any hope that the device will be found or returned. A wipe removes all business and personal data, which may be a signifi cant loss to the individual— especially if the device is recovered, because then the wipe would seem to have been an overreaction. Clear policies about data ownership should be established. Some MDM solutions can provide data isolation/segmentation and support business data sanitization without affecting personal data.

The BYOD policy regarding data ownership should address backups for mobile devices.

Business data and personal data should be protected by a backup solution—either a single solution for all data on the device or separate solutions for each type or class of data. This reduces the risk of data loss in the event of a remote-wipe event as well as device failure or damage.

Support ownership

When an employee’s mobile device experiences a failure, a fault, or damage, who is responsible for the device’s repair, replacement, or technical support? The BYOD policy should defi ne what support will be provided by the company and what support is left to the individual and, if relevant, their service provider.

242

Chapter 4

Application, Data, and Host Security

Patch management

The BYOD policy should defi ne the means and mechanisms of patch management for a personally owned mobile device. Is the user responsible for installing updates? Should the user install all available updates? Should the organization test updates prior to on-device installation? Are updates to be handled over the air (via service provider) or over WiFi?

Antivirus management

The BYOD policy should dictate whether antivirus, anti-malware, and anti-spyware scanners are to be installed on mobile devices. The policy should indicate which products/apps are recommended for use, as well as the settings for those solutions.

Forensics

The BYOD policy should address forensics and investigations as related to mobile devices.

Users need to be aware that in the event of a security violation or a criminal activity, their devices might be involved. This would mandate gathering evidence from those devices.

Some processes of evidence gathering can be destructive, and some legal investigations require the confi scation of devices.

Privacy

The BYOD policy should address privacy and monitoring. When a personal device is used for business tasks, the user often loses some or all of the privacy they enjoyed prior to using their mobile device at work. Workers may need to agree to be tracked and monitored on their mobile device, even when not on company property and outside of work hours.

A personal device in use under BYOD should be considered by the individual to be quasicompany property.

On-boarding/off-boarding

The BYOD policy should address personal mobile device on-boarding and off-boarding procedures. BYOD on-boarding includes installing security, management, and productivity apps along with implementing secure and productive confi guration settings. BYOD off-boarding includes a formal wipe of the business data along with the removal of any business-specifi c applications. In some cases, a full device wipe and factory reset may be prescribed.

Adherence to corporate policies

A BYOD policy should clearly indicate that using a personal mobile device for business activities doesn’t exclude a worker from adhering to corporate policies. A worker should treat BYOD equipment as company property and thus stay in compliance with all restrictions, even when off premises and off hours.

4.2 Summarize mobile security concepts and technologies

243

User acceptance

A BYOD policy needs to be clear and specifi c about all the elements of using a personal device at work. For many users, the restrictions, security settings, and MDM tracking implemented under BYOD will be much more onerous than they expect. Thus, organizations should make the effort to fully explain the details of a BYOD policy prior to allowing a personal device into the production environment. Only after an employee has expressed consent and acceptance, typically through a signature, should their device be on-boarded.

Architecture/infrastructure considerations

When implementing BYOD, organizations should evaluate their network and security design, architecture, and infrastructure. If every worker brings in a personal device, the number of devices on the network may double. This requires planning to handle IP assignments, communications isolation, data-priority management, increased intrusion detection system (IDS)/intrusion prevention system (IPS) monitoring load, as well as increased bandwidth consumption, both internally and across any Internet link. Most mobile devices are wireless enabled, so this will likely require a more robust wireless network and dealing with

WiFi congestion and interference. BYOD needs to be considered in light of the additional infrastructure costs it will trigger.

Legal concerns

Company attorneys should evaluate the legal concerns of BYOD. Using personal devices in the execution of business tasks probably means an increased burden of liability and risk of data leakage. BYOD may make employees happy, but it might not be a worthwhile or costeffective endeavor for the organization.

Acceptable use policy

The BYOD policy should either reference the company acceptable use policy or include a mobile device-specifi c version focusing on unique issues. With the use of personal mobile devices at work, there is an increased risk of information disclosure, distraction, and accessing inappropriate content. Workers should remain mindful that the primary goal when at work is to accomplish productivity tasks.

On-board camera/video

The BYOD policy needs to address mobile devices with onboard cameras. Some environments disallow cameras of any type. This would require that BYOD equipment be without a camera. If cameras are allowed, a description of when they may and may not be used should be clearly documented and explained to workers. A mobile device can act as a storage device, provide an alternate wireless connection pathway to an outside provider or service, and also be used to collect images and video that disclose confi dential information or equipment.

244

Chapter 4

Application, Data, and Host Security

Exam Essentials

Understand mobile device security. Device security involves the range of potential security options or features that may be available for a mobile device. Not all portable electronic devices (PEDs) have good security features. PED security features include full device encryption, remote wiping, lockout, screen locks, GPS, application control, storage segmentation, asset tracking, inventory control, mobile device management, device access control, removable storage, and disabling unused features.

Understand mobile device application security. The applications and functions used on a mobile device need to be secured. Related concepts include key management, credential management, authentication, geo-tagging, encryption, application whitelisting, and transitive trust/authentication.

Understand BYOD. Bring your own device (BYOD) is a policy that allows employees to bring their own personal mobile devices to work and then use those devices to connect to (or through) the company network to business resources and/or the Internet. Although

BYOD may improve employee morale and job satisfaction, it increases security risks to the organization. Related issues include data ownership, support ownership, patch management, antivirus management, forensics, privacy, on-boarding/off-boarding, adherence to corporate policies, user acceptance, architecture/infrastructure considerations, legal concerns, acceptable use policies, and on-board cameras/video.

4.3 Given a scenario, select the appropriate solution to establish host security

Host security, not just server and network security, should be a priority. The most dangerous element in an organization is the end user. The systems end users employ to interact with company resources and the Internet need to be secured against threats from the network and the Internet, and also against dangers from peripherals, removable media, and the end users.

Operating system security and settings

There are no fully secure operating systems. All of them have security fl aws. Some OSs have more security concerns than others, but every OS needs a level of security management imposed on it. Generally, security management includes keeping current on patches and maintaining the proper confi guration. OS security and settings are about OS hardening, defi ned next.

4.3 Given a scenario, select the appropriate solution to establish host security

245

OS hardening

OS hardening involves removing or disabling any unnecessary features or components and then securing the remaining elements. For more on this concept, refer to Chapter 3, section 3.6, “Analyze a scenario and select the appropriate type of mitigation and deterrent techniques.”

Anti-malware

Implementing security is often a long and complex process. One important part of this process is the installation or implementation of security applications. A security application is software designed specifi cally to perform a set of security functions. The following sections discuss some common security applications.

Antivirus

Antivirus software is an essential security application. It’s one example of a host IDS. It monitors the local system for evidence of malware in memory, in active processes, and in storage. Most antivirus products can remove detected malicious code and repair most damage caused by such malicious code.

In order for antivirus software to be effective, it must be kept current with daily signature-database updates. It’s also important to use the most recent engine, because new methods of detection and removal are found only in the most current versions of antivirus software.

Anti-spam

Anti-spam software is a variation on the theme of antivirus software. It specifi cally monitors email communications for spam and other forms of unwanted email in order to stop hoaxes, identity theft, waste of resources, and possible distribution of malicious software.

Some antivirus software products include an anti-spam component.

Anti-spyware

Spyware monitors your actions and transmits important details to a remote system that spies on your activity. For example, spyware might wait for you to log in to a banking website and then transmit your username and password to the creator of the spyware.

Alternatively, it might wait for you to enter your credit card number on an e-commerce site and then transmit the number to a fraudster to resell on the black market.

Adware, although quite similar to spyware in form, has a different purpose. It uses a variety of techniques to display advertisements on infected computers. The simplest forms of adware display pop-up ads on your screen while you surf the Web. More nefarious versions may monitor your shopping behavior and redirect you to competitor websites.

In both cases, you need an anti-spyware scanner to detect, remove, and repel spyware and adware concerns. Some antivirus products include anti-spyware features. However, it may

246

Chapter 4

Application, Data, and Host Security be a good idea to run an anti-spyware scanner that comes from a vender different than the antivirus scanner.

Pop-up blockers

Pop-up blockers are used to prevent websites from opening additional web browser windows without your consent. Often these pop-up windows are used for advertisements or possibly to distribute malicious code or interact with questionable content. Pop-up blockers simply prevent active web browser processes or code from websites from launching or initiating new windows. There is usually an easy bypass for those times when you want to allow pop-ups; one common bypass is to hold down the Ctrl key while the pop-up opens.

Pop-up blockers are common components of modern web browsers, but they may also be part of antivirus software or stand-alone third-party applications.

Patch management

Patch management is the formal process of ensuring that updates and patches are properly tested and applied to production systems. See the discussion of patch management earlier in this chapter, in section 4.1, subsection “Application patch management.”

Whitelisting vs. blacklisting applications

Application whitelisting is a security option that prohibits unauthorized software from being able to execute. See earlier discussion in this chapter, “Application whitelisting”.

Trusted OS

Trusted OS is an access-control feature that requires a specifi c OS to be present in order to gain access to a resource. By limiting access to only those systems that are known to implement specifi c security features, resource owners can be assured that violations of a resource’s security will be less likely.

Another formal defi nition of trusted OS is any OS that has security features in compliance with government and/or military security standards that enable the enforcement of multilevel security policies (that is, enforcing mandatory access control using classifi cation labels on subjects and objects). Examples of trusted OSs include Trusted Solaris, Apple Mac

OS X 10.6, HP-UX 11i v3, and AIX 5L. Many other OSs can be altered to become trusted, such as Windows 7, Windows Server 2008 R3, and SELinux.

Host-based firewalls

A host-based or personal software fi rewall is a security application that is installed on client systems. A client fi rewall is used to provide protection for the client system from the activities of the user and from communications from the network or Internet. A personal

4.3 Given a scenario, select the appropriate solution to establish host security

247

fi rewall must be kept current with patches and updates. It can often limit communications to only approved applications and protocols and can usually prevent externally initiated connections. For more discussion, see Chapter 1, section 1.1, subsection “Firewalls.”

Host-based intrusion detection

A host-based IDS (HIDS) monitors a local machine for symptoms of unwanted activity.

See Chapter 1, section 1.1, subsection “NIDS and NIPS.”

Hardware security

System hardware and peripherals require physical access controls and protections in order to maintain the logical security imposed by software. Without access control over the facility and physical environment, otherwise-secured systems can be quickly compromised.

Physical protections are used to protect against physical attacks, whereas logical protections protect only against logical attacks. Without adequate layers of protection, security is nonexistent. This section discusses several issues that often lead to security compromise because they’re overlooked or deemed nonserious threats.

Basic input/output system (BIOS) is the basic low-end fi rmware or software embedded onto the hardware’s electrically erasable programmable read-only memory (EEPROM).

BIOS identifi es and initiates the basic system hardware components, such as the hard drive, optical drive, video card, and so on, so that the bootstrapping process of loading an OS can begin. This essential system function is a target of hackers and other intruders because it may provide an avenue of attack that isn’t secured or monitored.

BIOS attacks, as well as complementary metal-oxide-semiconductor (CMOS) and device fi rmware attacks, are becoming common targets of physical hackers as well as of malicious code. If hackers or malware can alter the BIOS, CMOS, or fi rmware of a system, they may be able to bypass security features or initiate otherwise-prohibited activities.

Protection against BIOS attacks requires physical access control for all hardware of a sensitive or valuable nature. Additionally, strong malware protection such as current antivirus software is important.

Universal Serial Bus (USB) devices are ubiquitous these days. Nearly every worker who uses a computer possesses a USB storage device, and most portable devices (such as phones, music players, and still or video cameras) connect via USB. However, this convenience comes at a cost to security. There are at least four main issues:

Just about any USB device can be used to either bring malicious code into or leak-sensitive, confidential, and/or proprietary data out of an otherwise secure environment.

Most computers built within the last three to five years have the ability to boot off

USB. This could allow a user to boot a computer to an alternate OS (such as Kali, a live

Linux distribution used for hacking and/or penetration testing), which fully bypasses any security the native OS imposes.

248

Chapter 4

Application, Data, and Host Security

Some more recent malware uses the Autorun feature of Windows to spread from infected USB storage devices to the host computer. Such malware will succeed if security measures such as updating, patching, and hardening systems with up-to-date antivirus protection aren’t in place.

USB auto-typers have the ability to brute-force logins with thousands of attempts per second.

To protect against USB threats, the only real option is to fully disallow use of USB devices and lock down all USB ports. Some organizations not only disable USB functionality but also physically fi ll USB ports with silicon, epoxy, or a similar material, thus ensuring that USB devices can’t be used. As businesses move to USB keyboards and mice, the epoxy trick is less effective: users can simply remove their input devices and attach a USB drive either directly or through a hub. Instead, more businesses are disabling USB boot in the

(then-locked) BIOS and disabling USB Autorun in the OS. Otherwise, allowing the use of

USB typically leaves your organization’s system vulnerable to threats.

Cable locks

A cable lock is used to keep smaller pieces of equipment from being easy to steal. Many devices, most commonly portable computers, have a Kensington Security Slot (K-Slot) that is designed as a connection point for a cable lock. The K-Slot was originally developed by

Kensington, which continues to develop new cable lock security devices. One of the company’s most recent is the Kensington ClickSafe lock.

A cable lock usually isn’t an impenetrable security device, because most portable systems are constructed with thin metal and plastic. However, a thief will be reluctant to swipe a cable-locked device, because the damage caused by forcing the cable lock out of the K-Slot will be obvious when they attempt to pawn or sell the device.

Safe

Any device or removable media containing highly sensitive information should be kept locked securely in a safe when not in active use. You can install a department-wide safe that is managed by a single person, or you can install per-desk safes. A per-desk safe is often smaller, but it lets workers store devices and documentation securely while also allowing quick access.

Long-term storage of media and devices may require safes as well. Safes may be present onsite, or you can contract with an off-site storage facility to provide a safe for secured storage.

Locking cabinets

Cabinets, rack-mounting systems, patch panels, wiring closets, and other equipment and cable containers can provide additional physical security through the use of locking

4.3 Given a scenario, select the appropriate solution to establish host security

249

mechanisms. Locking cabinets and other forms of containers can block or reduce access to power switches, adapter ports, media bays, and cable runs. Locking cabinets can be used in server rooms or in workspace areas. These can also include desks that give workers access to the monitor, mouse, and keyboard but sequester the main system chassis inside a locked desk compartment.

Host software baselining

Host software baselining defi nes a minimum set of requirements for the OS and applications installed onto a host. See the discussion in Chapter 3, section 3.6, subsection “Initial baseline confi guration.”

Virtualization

Virtualization technology is used to host one or more OSs within the memory of a single host computer. See the discussion in Chapter 1, section 1.3, “Explain network design elements and components.” Following are some important concepts related to virtualization.

Snapshots

Snapshots are backups of virtual machines. They offer a quick means to recover from errors or poor updates. It’s often easier and faster to make backups of entire virtual systems rather than the equivalent native hardware installed system.

Patch compatibility

Virtualization doesn’t lessen the security management requirements of an OS. Thus, patch management is still essential. Patching or updating virtualized OSs is the same process as for a traditionally hardware installed OS. Also, don’t forget that you need to keep the virtualization host updated as well.

Host availability/elasticity

When you’re using virtualized systems, it’s important to protect the stability of the host.

This usually means avoiding using the host for any purpose other than hosting the virtualized elements. If host availability is compromised, the availability and stability of the virtual systems are also compromised.

Elasticity refers to the fl exibility of virtualization and cloud solutions to expand or contract based on need. In relation to virtualization, host elasticity means additional hardware hosts can be booted when needed and then used to distribute the workload of the virtualized services over the newly available capacity. As the workload becomes smaller, you can pull virtualized services off unneeded hardware so it can be shut down to conserve electricity and reduce heat.

250

Chapter 4

Application, Data, and Host Security

Security control testing

Security controls are mechanisms used to implement various security benefi ts, such as fi rewalls, anti-malware scanners, multifactor authentication, and so on. Security controls should be tested in order to verify their function and reliability.

Virtualized systems should be security tested. The virtualized OSs can be tested in the same manner as hardware installed OSs, such as with vulnerability assessment and penetration testing. However, the virtualization product may introduce additional and unique security concerns, so the testing process needs to be adapted to include those idiosyncrasies.

Sandboxing

Sandboxing is a means of quarantine or isolation. It’s implemented to restrict new or otherwise suspicious software from being able to cause harm to production systems. It can be used against applications or entire OSs.

Sandboxing is simple to implement in a virtualization context because you can isolate a virtual machine with a few mouse clicks or entered commands. Once the suspect code is deemed safe, you can release it to integrate with the environment. If it’s found to be malicious, unstable, or otherwise unwanted, it can quickly be removed from the environment with little diffi culty.

Exam Essentials

Understand OS security. There are no fully secure OSs. All of them have security fl aws.

Every OS needs some level of security management imposed on it.

Understand antivirus software. Antivirus software is an essential security application.

Antivirus software is one example of a host IDS. It monitors the local system for evidence of malware in memory, in active processes, and in storage.

Understand pop-up blockers. Pop-up blockers are used to prevent websites from opening additional web browser windows without your consent. Often these pop-up windows are used for advertisements or possibly to distribute malicious code or interact with questionable content. Pop-up blockers simply prevent active web browser processes or code from websites from launching or initiating new windows.

Understand hardware security. System hardware and peripherals require physical access controls and protections in order to maintain the logical security imposed by software.

Without access control over the facility and physical environment, otherwise-secured systems can be quickly compromised.

Understand virtualization. Virtualization technology is used to host one or more OSs within the memory of a single host computer. Related issues include snapshots, patch compatibility, host availability/elasticity, security control testing, and sandboxing.

4.4 Implement the appropriate controls to ensure data security

251

4.4 Implement the appropriate controls to ensure data security

Data security is a matter of protecting the confi dentiality, integrity, and availability of data.

Data is often more valuable and essential than the hardware and software of an IT environment. So, you must take care to provide proper protection for this mission-critical asset.

Cloud storage

Cloud storage involves using an online storage provider to host data. See Chapter 1, section 1.3, subsection “Cloud computing.”

SAN

A storage area network (SAN) is a secondary network (distinct from the primary communications network) used to consolidate and manage various storage devices. SANs are often used to enhance networked storage devices such as hard drives, drive arrays, optical jukeboxes, and tape libraries so they can be made to appear to servers as if they were local storage.

SANs can offer greater storage isolation through the use of a dedicated network. This makes directly accessing stored data diffi cult and forces all access attempts to operate against a server’s restricted applications and interfaces.

Handling big data

Big data refers to the extremely large data sets that many corporations need to manage, organize, and data mine. See Chapter 2, section 2.4, subsection “Big data analysis.”

Data encryption

Data encryption is the application of cryptography solutions to protect data on storage devices. The following sections discuss aspects of data encryption.

Full disk

Full-disk or whole-disk encryption is often used to provide protection for an OS, its installed applications, and all locally stored data. However, whole-disk encryption only provides reasonable protection when the system is fully powered off. If a system is accessed by a hacker while it’s active, there are several ways around hard-drive encryption. These

252

Chapter 4

Application, Data, and Host Security include a FireWire direct memory access (DMA) attack or slowing down memory-decay rates with liquid nitrogen. The details of these attacks aren’t important for this exam.

However, you should know that whole-disk encryption is only a partial security control.

In order to maximize the defensive strength of whole-disk encryption, you should use a long, complex passphrase to unlock the system on bootup. This passphrase shouldn’t be written down or used on any other system or for any other purpose. Any time the system isn’t actively in use, it should be powered down and physically locked against unauthorized access or theft. Hard-drive encryption should be viewed as a delaying tactic, rather than as a true prevention of access to data stored on the hard drive.

Database

Database encryption uses a DBMS product that includes native encryption features. This is sometimes preferred over whole-drive encryption, which is implemented using a separate or independent solution. Native DBMS database encryption integrates the cryptography functions directly into the database software. This feature is now offered by most commercial or enterprise-grade databases, including Oracle and Microsoft SQL Server.

A benefi t of database encryption over whole-drive encryption is that data remains secured until an authorized user makes a valid request to access a data element. With whole-drive encryption, the decryption key is in memory, and any fi le can potentially be opened and decrypted on the fl y. Thus, database encryption provides a measure of security greater than whole-drive encryption versus outside attackers, unauthorized users, and invalid requests.

Individual files

Individual-fi le encryption or fi le-by-fi le encryption is another option, but the general thought is that it provides less security than a whole-drive solution.

File-by-fi le encryption typically randomly generates a symmetric encryption key for each fi le and then stores that key in an encrypted form using the user’s public key on the encrypted fi le. This allows the user to return with their private key, unlock the stored symmetric key, and then unlock the fi le itself. Each time the fi le is viewed, it’s re-saved using a newly selected random symmetric key.

Problems with individual-fi le encryption include the potential for data loss and recovery abuse. If the user loses their private key or it’s corrupted, they will be unable to unlock secured fi les. If a recovery agent is defi ned, then a recovery agent can restore the fi les for the user. A recovery agent must be defi ned before encryption is set; then, when the symmetric key is stored after being encrypted with the user’s public key, it’s also stored using the public key of the recovery agent. This system provides a back door for the user, but at the same time, another entity—the recovery agent—has access to previously secured data. If the recovery agent is untrustworthy, they may abuse their privileges.

Removable media

Removable media drives, and removable storage in general, are considered both a convenience and a security vulnerability. The ability to add storage media to and remove it from

4.4 Implement the appropriate controls to ensure data security

253

a computer system makes it more versatile. However, using removable media also makes the hosted content vulnerable to data theft and malicious code planting.

Removable media include the electronic, logical, and digital storage mechanisms listed in the following sections as well as printed materials. Any time media are no longer needed, they should be properly destroyed to prevent disclosure of sensitive and confi dential information to unauthorized entities. For example, failing to destroy printouts or burned CDs may provide dumpster-diving attackers with treasures.

Tape is removable medium commonly used for backup purposes. It’s a form of sequential storage, so data elements are written and read in sequential order rather than semirandomly as with hard drives. Tape media often support larger storage capacities than most removable media, excluding hard drives. This makes them suited for backup operations.

Recordable compact disks (CD-Rs) include the wide range of optical media that can be written to. These include CDR, CD-RW, DVD-R, DVD-RW, Blue-Ray recordable media

(BD-R), and numerous other variants. Writable CDs and DVDs are often inappropriate for network backups due to their size (a maximum of 650 MB for CD-R/RW and 4 GB or more for DVD-R/RW), but they’re useful for personal (home) or client-level backups.

BD-Rs have a capacity of 25 GB to 50 GB, which can prove useful in some environments

(such as SoHo), but they aren’t a widely implemented solution. Regardless, the data on a CD isn’t protected and thus is vulnerable to unauthorized access if you don’t maintain physical control over the media.

Hard drives are usually thought of as a computer’s permanent internal storage devices.

This is true, but hard drives are also available in removable formats. These include hard drives that are plugged in to the case or attached by SCSI, eSATA, USB, or IEEE 1394

(FireWire) connections with their own external power-supply connections.

Diskettes, or fl oppies, are removable media that can store only a small amount of data

(about 1.4 MB). However, even though they’re small, they represent a signifi cant security threat to a protected environment if they get into the wrong hands—not to mention the possibility that they can be used to introduce malware onto a system.

A fl ashcard, or memory card, is a form of storage that uses EEPROM or NVRAM memory chips in a small-form-factor case. Flashcards often use USB connectors or are themselves inserted into devices such as MP3 players and digital cameras. Some fl ashcards are almost as small as a quarter and are therefore easy to conceal.

Smartcards can be used for a wide variety of purposes. They can be used as an authentication factor (specifi cally, as a Type 2 authentication factor commonly known as something

you have). When used as such, the smartcard hosts a memory chip that stores a password,

PIN, certifi cate, private key, or digital signature. The authentication system uses this stored data item to verify a user’s identity. Smartcards are used as an authentication mechanism by networks, portable computers, PDAs, satellite phones, Public Key Infrastructure (PKI) devices, and more. A smartcard can even function as a credit card (like the American

Express Blue card).

A smartcard can also be used as a storage device. Most smartcards have a very limited amount of storage; but sometimes, being able to move a few kilobytes of data is all someone needs to steal something of great value. Account numbers, credit card numbers, and a user’s private key are all small items that can be very valuable.

254

Chapter 4

Application, Data, and Host Security

Any and all removable media can typically be secured using fi le-by-fi le encryption or whole-drive encryption. This may let you move the media from place to place with reasonable assurance that the stored data can’t be easily accessed if lost or stolen.

Mobile devices

Mobile devices, which can include mobile phones, hand-held PCs, netbooks, and even notebooks, may or may not support encryption options. Most mobile phones don’t support storage-device encryption. Some mobile phones may support applications that can encrypt some specifi c data fi les, but usually not the entire storage media in the device.

As mobile devices become more like small PCs than just mobile phones, they often run more traditional OSs, which may natively include encryption options; or encryption can be installed from third-party applications. However, you must research this on a case-by-case basis.

Hardware-based encryption devices

A hardware-based encryption device is a hardware solution that provides encryption or related services instead of using a software-only solution.

TPM

The trusted platform module (TPM) is both a specifi cation for a cryptoprocessor as well as the chip in a mainboard supporting this function. A TPM chip is used to store and process cryptographic keys for a hardware-supported/implemented hard-drive encryption system.

Generally, a hardware implementation rather than a software-only implementation of harddrive encryption is considered more secure.

When TPM-based whole-disk encryption is in use, the user/operator must supply a password or physical USB token device to the computer to authenticate and allow the TPM chip to release the hard-drive encryption keys into memory. Although this seems similar to a software implementation, the primary difference is that if the hard drive is removed from its original system, it can’t be decrypted. Only with the original TPM chip can an encrypted hard drive be decrypted and accessed. With software-only hard-drive encryption, the hard drive can be moved to a different computer without any access or use limitations.

HSM

The hardware security module (HSM) is a cryptoprocessor used to manage/store digitalencryption keys, accelerate crypto operations, support faster digital signatures, and improve authentication. An HSM is often an add-on adapter or peripheral or can be a

TCP/IP network device. HSMs include tamper protection to prevent their misuse even if an attacker gains physical access.

HSMs provide an accelerated solution for large (2,048+ bit) asymmetric encryption calculations and a secure vault for key storage. Many certifi cate authority systems use HSMs

4.4 Implement the appropriate controls to ensure data security

255

to store certifi cates; ATM and POS bank terminals often employ proprietary HSMs; hardware SSL accelerators can include HSM support; and DNSSEC-compliant DNS servers use

HSM for key and zone fi le storage.

USB encryption

USB encryption is usually related to USB storage devices, which can include both USBconnected hard drives as well as USB thumb drives. Some USB device manufacturers include encryption features in their products. These often have an autorun tool that is used to gain access to encrypted content once the user has been authenticated. An example of an encrypted USB device is an IronKey.

If encryption features aren’t provided by the manufacturer of a USB device, you can usually add them through a variety of commercial or open source solutions. One of the best-known, respected, and trusted open source solutions is TrueCrypt. This tool can be used to encrypt fi les, folders, partitions, drive sections, or whole drives, whether internal, external, or USB.

Hard drive

Hard-drive encryption can be provided by a software solution, as discussed previously, or through a hardware solution. Some hard-drive manufacturers offer hard-drive products that include onboard hardware-based encryption services. However, most of these solutions are proprietary and don’t disclose their methods or algorithms, and some have been cracked with relatively easy hacks.

Using a trusted software encryption solution can be a cost-effective and secure choice.

But realize that no form of hard-drive encryption, hardware or software based, is guaranteed protection against all possible forms of attack.

Data in transit, Data at rest, Data in use

Data isn’t always stored statically on a storage device. Thus, you need a range of security mechanisms to provide reasonable protection over a range of events and circumstances.

Data in transit is data being communicated over a network connection. Session encryption should be used to protect data in transit. Data at rest is data stored statically on a storage device. Storage encryption, such as fi le encryption or whole-drive encryption, should be used to protect data at rest. Data in use is data being actively processed by an application.

Open and active data is secure only if the logical and physical environment is secure. A wellestablished security baseline and physical access control are needed to provide reasonable protection for data in use.

Permissions/ACL

Permissions are the access activities granted or denied users, often through the use of per-object access control lists (ACLs). An ACL is a collection of individual access control

256

Chapter 4

Application, Data, and Host Security entries (ACEs). Each object in a discretionary access control (DAC) environment has an

ACL. Each ACE focuses on either one user account or a group and then grants or denies an object-specifi c permission, such as read, write, or execute.

Permissions should be assigned on a job responsibility basis. Users should only have suffi cient permissions to accomplish their work tasks. This is one aspect of the principle of

least privilege.

Data policies

Data policies focus on providing confi dentiality, integrity, and availability protection for data. Data policies often overlap with other common security policies, including access, incident response, disaster recovery, backup, and so on. Following are several common elements of a data policy.

Wiping

Data wiping is the process of removing data from a storage device. Often the intention is to prevent data remnants from being recovered and thus leading to data leakage. Wiping may also be called purging or sanitization. Wiping procedures can include degaussing, random data overwriting, and zeroization. However, these techniques only provide suffi cient data removal to use the storage device in the same security environment. There are no guaranteed wiping processes that allow for completely safe use of the device in less secure environments.

Disposing

Once a storage device is of no further use to an organization, the only secure means of disposal is some form of physical destruction. These means can include incineration, an acid bath, and crushing. The remaining debris should then be handled by certifi ed recycling services that will attempt to recover usable metals and properly dispose of any harmful or toxic materials.

Retention

A retention policy defi nes what data is to be maintained and for what period of time.

Retention policies may also need to defi ne the purpose of the held data, the security means implemented to protect the held data, and the offi cers of the organization who are authorized to access or handle the held data. Various industry regulations as well as contractual obligations may mandate minimum retention timeframes for certain types of data.

Storage

A storage policy defi nes the means, mechanisms, and locations for long-term housing of storage devices. No current storage device technology is everlasting, so you must make plans to provide a storage facility that can maintain the best environment (in terms of heat, light, humidity, vibration, and so on) and reliable security. A procedure for transferring

4.5 Compare and contrast alternative methods to mitigate security risks

257

data from aging storage devices to new devices is also essential if data is be retained for longer than the predicted lifetime of the storage device.

Exam Essentials

Understand the importance of data security. Data security is a matter of protecting the confi dentiality, integrity, and availability of data. Data is often more valuable and essential than the hardware and software in an IT environment.

Understand data encryption options. Data encryption is the application of cryptography solutions to protect data on storage devices. Options include solutions for full disk, database, fi le, removable media, and mobile device encryption.

Understand hardware-based encryption devices. A hardware-based encryption device is a hardware solution that provides encryption or related services instead of using a softwareonly solution. This option includes TPM, HSM, USB, and hard-drive encryption solutions.

Understand data policies. Data policies focus on providing confi dentiality, integrity, and availability protection for data. Common elements include wiping, disposing, retention, and storage.

4.5 Compare and contrast alternative methods to mitigate security risks in static environments

A static environment is a set of conditions, events, and surroundings that don’t change. In theory, once understood, a static environment doesn’t offer new or surprising elements.

In technology, static environments are applications, OSs, hardware sets, or networks that are confi gured for a specifi c need, capability, or function, and then set to remain unaltered. However, although the term static is used, there are no truly static systems. There is always the chance that a hardware failure, a hardware confi guration change, a software bug, a software-setting change, or an exploit may alter the environment, resulting in undesired operating parameters or actual security intrusions. The following sections defi ne some examples of static IT environments and discuss ways you can help protect their stability and security.

Environments

A static IT environment is any system that is intended to remain unchanged by users and administrators. The goal is to prevent or at least reduce the possibility of a user implementing change that could result in reduced security or functional operation.

258

Chapter 4

Application, Data, and Host Security

SCADA

Supervisory control and data acquisition (SCADA) is a type of industrial control system

(ICS). An ICS is a form of computer-management device that controls industrial processes and machines. SCADA is used across many industries, including manufacturing, fabrication, electricity generation and distribution, water distribution, sewage processing, and oil refi ning. A SCADA system can operate as a stand-alone device, be networked together with other SCADA systems, or be networked with traditional IT systems.

Most SCADA systems are designed with minimal human interfaces. Often, they use mechanical buttons and knobs or simple LCD screen interfaces (similar to what you might have on a business printer or a GPS navigation device). However, networked SCADA devices may have more complex remote-control software interfaces.

In theory, the static design of SCADA and the minimal human interface should make the system fairly resistant to compromise or modifi cation. Thus, little security was built into

SCADA devices, especially in the past. But there have been several well-known compromises of SCADA; for example, Stuxnet delivered the fi rst-ever rootkit to a SCADA system located in a nuclear facility. Many SCADA vendors have started implementing security improvements into their solutions in order to prevent or at least reduce future compromises.

Embedded (printer, Smart TV, HVAC control)

An embedded system is a computer implemented as part of a larger system. The embedded system is typically designed around a limited set of specifi c functions in relation to the larger product of which it’s a component. It may consist of the same components found in a typical computer system, or it may be a microcontroller (an integrated chip with on-board memory and peripheral ports). Examples of embedded systems include network-attached printers, smart TVs, HVAC controls, smart appliances, smart thermostats, Ford SYNC (a

Microsoft embedded system in vehicles), and medical devices.

Security concerns regarding embedded systems include the fact that most are designed with a focus on minimizing costs and extraneous features. This often leads to a lack of security and diffi culty with upgrades or patches. Because an embedded system is in control of a mechanism in the physical world, a security breach could cause harm to people and property.

Android

Android is a mobile device OS based on Linux, which was acquired by Google in 2005.

In 2008, the fi rst devices hosting Android were made available to the public. The Android source code is made open source through the Apache license, but most devices also include proprietary software. Although it’s mostly intended for use on phones and tablets, Android is being used on a wide range of devices, including televisions, game consoles, digital cameras, microwaves, watches, e-readers, cordless phones, and ski goggles.

The use of Android in phones and tablets isn’t a good example of a static environment.

These devices allow for a wide range of user customization: you can install both Google

Play Store apps as well as apps from unknown external sources (such as Amazon’s App

4.5 Compare and contrast alternative methods to mitigate security risks

259

Store), and many devices support the replacement of the default version of Android with a customized or alternate version. However, when Android is used on other devices, it can be implemented as something closer to a static system.

Whether static or not, Android has numerous security vulnerabilities. These include exposure to malicious apps, running scripts from malicious websites, and allowing insecure data transmissions. Android devices can often be rooted (breaking their security and access limitations) in order to grant the user full root-level access to the device’s low-level confi guration settings. Rooting increases a device’s security risk, because all running code inherits root privileges.

Improvements are made to Android security as new updates are released. Users can adjust numerous confi guration settings to reduce vulnerabilities and risks. Also, users may be able to install apps that add additional security features to the platform.

iOS

iOS is the mobile device OS from Apple that is available on the iPhone, iPad, iPod, and

Apple TV. iOS isn’t licensed for use on any non-Apple hardware. Thus, Apple is in full control of the features and capabilities of iOS. However, iOS is also a poor example of a static environment, because users can install any of over one million apps from the Apple

App Store. Also, it’s often possible to jailbreak iOS (breaking Apple’s security and access restrictions), allowing users to install apps from third parties and gain greater control over low-level settings. Jailbreaking an iOS device reduces its security and exposes the device to potential compromise. Users can adjust device settings to increase an iOS device’s security and install many apps that can add security features.

Mainframe

Mainframes are high-end computer systems used to perform highly complex calculations and provide bulk data processing. Older mainframes may be considered static environments because they were often designed around a single task or supported a single missioncritical application. These confi gurations didn’t offer signifi cant fl exibility, but they did provide for high stability and long-term operation. Many mainframes were able to operate for decades.

Modern mainframes are much more fl exible and are often used to provide high-speed computation power in support of numerous virtual machines. Each virtual machine can be used to host a unique OS and in turn support a wide range of applications. If a modern mainframe is implemented to provide fi xed or static support of one OS or application, it may be considered a static environment.

Game consoles

Game consoles, whether home systems or portable systems, are potentially examples of static systems. The OS of a game console is generally fi xed and is changed only when the vendor releases a system upgrade. Such upgrades are often a mixture of OS, application, and fi rmware improvements. Although game console capabilities are generally focused on

260

Chapter 4

Application, Data, and Host Security playing games and media, modern consoles may offer support for a range of cultivated and third-party applications. The more fl exible and open-ended the app support, the less of a static system it becomes.

In-vehicle computing systems

In-vehicle computing systems can include the components used to monitor engine performance and optimize braking, steering, and suspension, but can also include in-dash elements related to driving, environment controls, and entertainment. Early in-vehicle systems were static environments with little or no ability to be adjusted or changed, especially by the owner/driver. Modern in-vehicle systems may offer a wider range of capabilities, including linking a mobile device or running custom apps.

Methods

Static environments, embedded systems, and other limited or single-purpose computing environments need security management. Although they may not have as broad an attack surface and aren’t exposed to as many risks as a general-purpose computer, they still require proper security government.

Network segmentation

Network segmentation involves controlling traffi c among networked devices. Complete or physical network segmentation occurs when a network is isolated from all outside communications, so transactions can only occur between devices within the segmented network.

You can impose logical network segmentation with switches using VLANs, or through other traffi c-control means, including MAC addresses, IP addresses, physical ports, TCP or UDP ports, protocols, or application fi ltering, routing, and access control management. Network segmentation can be used to isolate static environments in order to prevent changes and/or exploits from reaching them.

Security layers

Security layers exist where devices with different levels of classifi cation or sensitivity are grouped together and isolated from other groups with different levels. This isolation can be absolute or one-directional. For example, a lower level may not be able to initiate communication with a higher level, but a higher level may initiate with a lower level. Isolation can also be logical or physical. Logical isolation requires the use of classifi cation labels on data and packets, which must be respected and enforced by network management, OSs, and applications. Physical isolation requires implementing network segmentation or air gaps between networks of different security levels.

Application firewalls

An application fi rewall is a device, server add-on, virtual service, or system fi lter that defi nes a strict set of communication rules for a service and all users. It’s intended to be an

4.5 Compare and contrast alternative methods to mitigate security risks

261

application-specifi c server-side fi rewall to prevent application-specifi c protocol and payload attacks.

A network fi rewall is a hardware device, typically called an appliance, designed for general network fi ltering. A network fi rewall is designed to provide broad protection for an entire network.

Both of these types of fi rewalls are important and may be relevant in many situations.

Every network needs a network fi rewall. Many application servers need an application fi rewall. However, the use of an application fi rewall generally doesn’t negate the need for a network fi rewall. You should use both fi rewalls in a series to complement each other, rather than seeing them as competitive solutions.

Manual updates

Manual updates should be used in static environments to ensure that only tested and authorized changes are implemented. Using an automated update system would allow for untested updates to introduce unknown security reductions.

Firmware version control

Similar to manual software updates, strict control over fi rmware in a static environment is important. Firmware updates should be implemented on a manual basis, only after testing and review. Oversight of fi rmware version control should focus on maintaining a stable operating platform while minimizing exposure to downtime or compromise.

Wrappers

A wrapper is something used to enclose or contain something else. Wrappers are well known in the security community in relation to Trojan horse malware. A wrapper of this sort is used to combine a benign host with a malicious payload.

Wrappers are also used as encapsulation solutions. Some static environments may be confi gured to reject updates, changes, or software installations unless they’re introduced through a controlled channel. That controlled channel can be a specifi c wrapper. The wrapper may include integrity and authentication features to ensure that only intended and authorized updates are applied to the system.

Control redundancy and diversity

As with any security solution, relying on a single security mechanism is unwise. Defense in

depth uses multiple types of access controls in literal or theoretical concentric circles or layers. This form of layered security helps an organization avoid a monolithic security stance.

A monolithic mentality is the belief that a single security mechanism is all that is required to provide suffi cient security. By having security control redundancy and diversity, a static environment can avoid the pitfalls of a single security feature failing; the environment has several opportunities to defl ect, deny, detect, and deter any threat. Unfortunately, no security mechanism is perfect. Each individual security mechanism has a fl aw or a workaround just waiting to be discovered and abused by a hacker.

262

Chapter 4

Application, Data, and Host Security

Exam Essentials

Understand static environments. Static environments are applications, OSs, hardware sets, or networks that are confi gured for a specifi c need, capability, or function, and then set to remain unaltered. Examples include SCADA, embedded systems, Android, iOS, mainframes, game consoles, and in-vehicle computing systems.

Understand static environment security methods. Static environments, embedded systems, and other limited or single-purpose computing environments need security management.

These techniques may include network segmentation, security layers, application fi rewalls, manual updates, fi rmware version control, wrappers, and control redundancy and diversity.

Review Questions

263

Review Questions

1. What technique or method can be employed by hackers and researchers to discover unknown flaws or errors in software?

B. Fuzzing

D. Cross-site request forgery

2. Which of the following is not a way to prevent or protect against XSS?

C. Allowing script input

3. What technology provides an organization with the best control over BYOD equipment?

A. Encrypted removable storage

B. Mobile device management

C. Geo-tagging

4. When a vendor releases a patch, which of the following is the most important?

A. Installing the patch immediately

B. Setting up automatic patch installation

C. Allowing users to apply patches

D. Testing the patch before implementation c04.indd 05/02/2014 Page 263

264

Chapter 4

Application, Data, and Host Security

5. What is a security risk of an embedded system that is not commonly found in a standard

PC?

B. Access to the Internet

C. Control of a mechanism in the physical world

6. The most effective means to reduce the risk of losing the data on a mobile device, such as a notebook computer, is .

A. Encrypt the hard drive.

B. Minimize sensitive data stored on the mobile device.

C. Use a cable lock.

D. Define a strong logon password.

7. The most commonly overlooked aspect of mobile phone eavesdropping is related to

.

B. Storage device encryption

8. Which of the following is not true in regards to NoSQL?

A. Can support SQL expressions

B. It is a relational database

C. Supports hierarchies or multilevel nesting/referencing

D. Does not support ACID c04.indd 05/02/2014 Page 264

Review Questions

265

9. In order to ensure that whole-drive encryption provides the best security possible, which of the following should not be performed?

A. Screen lock the system overnight.

B. Require a boot password to unlock the drive.

C. Lock the system in a safe when it is not in use.

D. Power down the system after use.

10. Which security stance will be most successful at preventing malicious software execution?

A. Deny by exception

B. Whitelisting

C. Allow by default

D. Blacklisting c04.indd 05/02/2014 Page 265

Chapter

5

Access Control and

Identity Management

COMPTIA SECURITY+ EXAM OBJECTIVES

COVERED IN THIS CHAPTER INCLUDE THE

FOLLOWING:

5.1 Compare and contrast the function and purpose of

authentication services.

RADIUS

TACACS+

Kerberos

LDAP

XTACACS

SAML

Secure LDAP

5.2 Given a scenario, select the appropriate

authentication, authorization, or access control.

Identification vs. authentication vs. authorization

Authorization

Least privilege

Separation of duties

ACLs

Mandatory access

Discretionary access

Rule-based access control

Role-based access control

Time of day restrictions

Authentication

Tokens

Common access card

Smart card

Multifactor authentication

TOTP

HOTP

CHAP

PAP

Single sign-on

Access control

Implicit deny

Trusted OS

Authentication factors

Something you are

Something you have

Something you know

Somewhere you are

Something you do

Identification

Biometrics

Personal identification verification card

Username

Federation

Transitive trust/authentication

5.3 Install and configure security controls when perform-

ing account management, based on best practices.

Mitigate issues associated with users with multiple account/ roles and/or shared accounts

Account policy enforcement

Credential management

Group policy

Password complexity

Expiration

Recovery

Disablement

Lockout

Password history

Password reuse

Password length

Generic account prohibition

Group based privileges

User assigned privileges

User access reviews

Continuous monitoring

The Security+ exam will test your basic IT security skills— those skills you need to effectively secure stand-alone and networked systems in a corporate environment. To pass the test and be effective in implementing security, you need to understand the basic concepts, terminology, and best practices related to access control and identity management as detailed in this chapter.

5.1 Compare and contrast the function and purpose of authentication services.

Authentication is the mechanism by which a person proves their identity to a system. It’s the process of proving that a subject is the valid user of an account. Often, the authentication process involves a simple username and password. But other more complex authentication factors or credential-protection mechanisms are involved in order to provide strong protection for the logon and account-verifi cation process. The authentication process requires that the subject provide an identity and then proof of that identity.

RADIUS

Remote Authentication Dial-In User Service (RADIUS) is a centralized authentication system. It’s often deployed to provide an additional layer of security for a network. By offl oading authentication of remote access clients from domain controllers or even the remote access server itself to a dedicated authentication server such as RADIUS, you can provide greater protection against intrusion for the network as a whole. RADIUS can be used with any type of remote access, including dial-up, virtual private network (VPN), and terminal services.

RADIUS is known as an AAA server. AAA stands for authentication, authorization

(or access control), and accounting (sometimes referred to as auditing). RADIUS provides for distinct AAA functions for remote access clients separate from those of normal local domain clients. RADIUS isn’t the only AAA server, but it’s the most widely deployed.

When RADIUS is deployed, it’s important to understand the terms RADIUS client and

RADIUS server, both of which are depicted in Figure 5.1. The RADIUS server is obviously the system hosting the RADIUS service. However, the RADIUS client is the remote access

server (RAS), not the remote system connecting to RAS. As far as the remote access client

5.1 Compare and contrast authentication services

271

is concerned, it sees only the RAS, not the RADIUS server. Thus, the RAS is the RADIUS client. RADIUS is a tried-and-true AAA solution; but the next generation of RADIUS comes in the form of Diameter. Although it isn’t relevant for the purposes of the Security+ exam, any network security engineer looking to implement an AAA solution should defi nitely weigh the pros and cons of Diameter versus RADIUS.

F I G U R E 5 .1 The RADIUS client manages the local connection and authenticates against a central server.

Large Network

ISP

Authorization

Client

Request

Radius Client

Server validating request

Radius Server

TACACS+

Terminal Access Controller Access Control System (TACACS) is another example of an

AAA server. TACACS is an Internet standard (RFC 1492). Similar to RADIUS, it uses ports TCP 49 and UDP 49. XTACACS was the fi rst proprietary Cisco revision of the standard RFC form. TACACS+ was the second major revision by Cisco of this service into yet another proprietary version. None of these three versions of TACACS are compatible with each other. TACACS and XTACACS are utilized on many older systems but have been all but replaced by TACACS+ on current systems.

TACACS+ differs from RADIUS in many ways. One major difference is that RADIUS combines authentication and authorization (the fi rst two As in AAA), whereas TACACS+ separates the two, allowing for more fl exibility in protocol selection. For instance, with

TACACS+, an administrator may use Kerberos as an authentication mechanism while choosing something entirely different for authorization. With RADIUS these options are more limited.

Kerberos

Early authentication transmission mechanisms sent logon credentials from the client to the authentication server in clear text. Unfortunately, this solution is vulnerable to eavesdropping and interception, thus making the security of the system suspect. What was needed was a solution that didn’t transmit the logon credentials in a form that could be easily captured, extracted, and reused.

272

Chapter 5

Access Control and Identity Management

One such method for providing protection for logon credentials is Kerberos: a trusted third-party authentication protocol that was originally developed at MIT under Project

Athena. The current version of Kerberos in widespread use is version 5. Kerberos is used to authenticate network principles (subjects) to other entities on the network (objects, resources, and servers). Kerberos is platform independent; however, some OSs require special confi guration adjustments to support true interoperability (for example, Windows

Server with Unix).

Kerberos is a centralized authentication solution. The core element of a Kerberos solution is the key distribution center (KDC), which is responsible for verifying the identity of principles and granting and controlling access within a network environment through the use of secure cryptographic keys and tickets.

Kerberos is a trusted third-party authentication solution because the KDC acts as a third party in the communications between a client and a server. Thus, if the client trusts the

KDC and the server trusts the KDC, then the client and server can trust each other.

Kerberos is also a single sign-on solution. Single sign-on means that once a user (or other subject) is authenticated into the realm, they need not reauthenticate to access resources on any realm entity. (A realm is the network protected under a single Kerberos implementation.)

The basic process of Kerberos authentication is as follows:

1.

The subject provides logon credentials.

2.

The Kerberos client system encrypts the password and transmits the protected credentials to the KDC.

3.

The KDC verifies the credentials and then creates a ticket-granting ticket (TGT—a hashed form of the subject’s password with the addition of a time stamp that indicates a valid lifetime). The TGT is encrypted and sent to the client.

4.

The client receives the TGT. At this point, the subject is an authenticated principle in the Kerberos realm.

5.

The subject requests access to resources on a network server. This causes the client to request a service ticket (ST) from the KDC.

6.

The KDC verifies that the client has a valid TGT and then issues an ST to the client.

The ST includes a time stamp that indicates its valid lifetime.

7.

The client receives the ST.

8.

The client sends the ST to the network server that hosts the desired resource.

9.

The network server verifies the ST. If it’s verified, it initiates a communication session with the client. From this point forward, Kerberos is no longer involved.

Figure 5.2 shows the Kerberos authentication process.

The Kerberos authentication method helps to ensure that logon credentials aren’t compromised while in transit from the client to the server. The inclusion of a time stamp in the tickets ensures that expired tickets can’t be reused. This prevents replay and spoofi ng attacks against Kerberos.

5.1 Compare and contrast authentication services

273

Kerberos supports mutual authentication (client and server identities are proven to each other). It’s scalable and thus able to manage authentication for large networks. Being centralized, Kerberos helps reduce the overall time involved in accessing resources within a network.

F I G U R E 5 . 2 The Kerberos authentication process

KDC

2

Kerberos

Encrypted

Password

Authentication

Service (AS)

3

Ticket-

Granting

Ticket (TGT)

4

Service

Request with TGT

5

Ticket-Granting

Service (TGS)

6

Service-

Granting

Ticket (SGT)

7

1

Windows-Based

Computer

Service

9

Established

8

Service

Request with SGT

Target

Server

Kerberos is used to provide security and protection for authentication credentials alone. It isn’t used in any way to provide encryption or security for other types of data transfer.

LDAP

A directory service is a managed list of network resources. Through the use of a directory service, large networks are easier to navigate, manage, and secure. Active Directory from

Microsoft, OpenLDAP, and legacy eDirectory (or NDS) from Novell are examples of directory services. Both of these products are based on Lightweight Directory Access Protocol

(LDAP).

LDAP is a standardized protocol that enables clients to access resources within a directory service. A directory service is a network service that provides access to a central

274

Chapter 5

Access Control and Identity Management database of information, which contains detailed information about the resources available on a network. LDAP follows the x.500 standard, which defi nes what a directory service is and how it is to be constructed (at least from a foundational infrastructure perspective).

Clients can interact with directory service resources through LDAP by using authentication that is at least a minimum of a username and password.

LDAP directory structures are hierarchical data models that use branches like a tree and that have a clearly identifi ed and defi ned root (see Figure 5.3). LDAP operates over TCP ports 389 (plaintext) and 636 (secure). It’s important to secure LDAP rather than allow it to operate in a plaintext insecure form. This is accomplished by enabling the Simple

Authentication and Security Layer (SASL) on LDAP, which implements Transport Layer

Security (TLS) on the authentication of clients as well as all data exchanges. This isn’t the only means to secure LDAP, but it’s the means addressed on Security+.

F I G U R E 5 . 3 An example of an LDAP-based directory services structure

LDAP Client

LDAP Server dc = Domain Name Component cn = Common Name

TCP/IP dc = com

Directory DB dc = sybex cn = John cn = Nancy mail: [email protected]

XTACACS

XTACACS is a proprietary implementation of standard TACACS crafted by Cisco, which was later replaced by TACACS+. See the earlier section “TACACS+.”

SAML

Security Assertion Markup Language (SAML) is an open-standard data format based on XML for the purpose of supporting the exchange of authentication and authorization details between systems, services, and devices. SAML was designed to address the diffi culties related to the implementation of single sign-on (SSO) over the Web. SAML’s solution is based on a trusted third-party mechanism where the subject or user (the principle) is verifi ed through a trusted authentication service (the identity provider) in order for the target server or resource host (the service provider) to accept the identity of the visitor. SAML

5.2 Given a scenario, select the appropriate authentication

275

doesn’t dictate the authentication credentials that must be used, so it’s fl exible and is potentially compatible with future authentication technologies.

Secure LDAP

Secure LDAP is the implementation of LDAP using security, such as protected authentication and encrypted data exchanges, specifi cally provided by SASL. See the earlier section

“LDAP.”

Exam Essentials

Understand RADIUS. RADIUS is a centralized authentication system. It’s often deployed to provide an additional layer of security for a network.

Understand TACACS. TACACS is a centralized remote access authentication solution.

It’s an Internet standard (RFC 1492); however, Cisco’s proprietary implementations of

XTACACS and now TACACS+ have quickly gained popularity.

Understand Kerberos. Kerberos is a trusted third-party authentication protocol. It uses encryption keys as tickets with time stamps to prove identity and grant access to resources.

Kerberos is a single sign-on solution employing a key distribution center (KDC) to manage its centralized authentication mechanism.

Understand LDAP. Lightweight Directory Access Protocol is used to allow clients to interact with directory service resources. LDAP is based on x.500 and uses TCP ports 389 and

636. It uses a tree structure with a district root.

Understand SAML. Security Assertion Markup Language is an open-standard data format based on XML for the purpose of supporting the exchange of authentication and authorization details between systems, services, and devices.

5.2 Given a scenario, select the appropriate authentication, authorization, or access control.

The mechanism by which users are granted or denied the ability to interact with and use resources is known as access control. Access control is often referred to using the term authorization. Authorization defi nes the type of access to resources that users are granted—in other words, what users are authorized to do. Authorization is often considered the next logical step immediately after authentication. Authentication is proving your

276

Chapter 5

Access Control and Identity Management identity to a system or the act of logging on. With proper authorization or access control, a system can properly control access to resources in order to prevent unauthorized access.

There are three common access-control methods:

Mandatory access control (MAC)

Discretionary access control (DAC)

Role-based access control (RBAC)

These three models are widely used in today’s IT environments. Familiarity with these three models is essential to the Security+ exam.

Identification vs. authentication vs. authorization

It’s important to understand the differences among identifi cation, authentication, and authorization. Although they’re similar and are essential to all security mechanisms, they’re distinct and must not be confused.

Identifi cation and authentication are commonly used as a two-step process, but they’re distinct activities. Identifi cation is the claiming of an identity. This needs to occur only once per authentication or access process. Any one of the common authentication factors can be employed for identifi cation. Once identifi cation has been performed, the authentication process must take place. Authentication is the act of verifying or proving the claimed identity. The issue is both checking that such an identity actually exists in the known accounts of the secured environment and ensuring that the human claiming the identity is the correct, valid, and authorized human to use that specifi c identity.

Authentication can take many forms, most commonly of one-, two-, or multifactor confi gurations. The more unique factors used in an authentication process, the more resilient and reliable the authentication itself becomes. If all the proffered authentication factors are valid and correct for the claimed identity, it’s then assumed that the accessing person is who they claim to be. Then the permission- and action-restriction mechanisms of authorization take over to control the activities of the user/human from that point forward.

Authorization is the mechanism that controls what a subject can and can’t do, access, use, or view. Authorization is commonly called access control or access restriction. Most systems operate from a default authorization stance of deny by default or implicit deny. Then all needed access is granted by exception to individual subjects or to groups of subjects.

Following is more detailed information on each of these three related concepts.

Authorization

Once a subject is authenticated, its access must be authorized. The process of authorization ensures that the requested activity or object access is possible given the rights and privileges assigned to the authenticated identity (which we refer to as the subject from this point forward). Authorization indicates who is trusted to perform specifi c operations. In most cases, the system evaluates an access-control matrix that compares the subject, the object, and the intended activity. If the specifi c action is allowed, the subject is authorized; if it’s disallowed, the subject isn’t authorized.

5.2 Given a scenario, select the appropriate authentication

277

Keep in mind that just because a subject has been identifi ed and authenticated, that doesn’t automatically mean it has been authorized. It’s possible for a subject to log on to a network (in other words, be identifi ed and authenticated) yet be blocked from accessing a fi le or printing to a printer (by not being authorized to perform such activities). Most network users are authorized to perform only a limited number of activities on a specifi c collection of resources. Identifi cation and authentication are “all-or-nothing” aspects of access control. Authorization occupies a wide range of variations between all and nothing for each individual subject or object in the environment. For example, a user may be able to read a fi le but not delete it. A user may be able to print a document but not alter the print queue.

A user may be able to log on to a system but not be allowed to access any resources.

Least privilege

Least privilege is a staple of the information security realm. Simply put, where users are concerned, least privilege states that a user should be granted only the minimal privileges necessary to perform their work or to accomplish a specifi c task. This principle should be applied to all facets of a LAN/MAN/WAN or any secure environment. For instance, a typical end user should not normally be granted administrative privileges. A troublecall technician might require local administrative privileges but doesn’t normally require domain administrative privileges. Basically, as a security administrator, you should limit the damage that can be done by user error, a disgruntled employee, or a hijacked account.

Least privilege is one of the easiest ways to protect against these and myriad other potential security risks.

Separation of duties

Think of separation of duties (SoD) as a control mechanism designed to limit the damage that could be done by a single individual due to error or fraud. For example, it’s generally a bad idea to have the same personnel responsible for both LAN administration and

LAN security. A better model would be to have an IT department as well as a Security department. More stringent applications separate reporting, as well, to prevent the “make it work” philosophy of many an IT department from outweighing the less popular “make it work in a secure manner” alternative. SoD is one reason that you now fi nd both a Chief

Information Offi cer (CIO) and a Chief Operations Offi cer (COO) in many corporations.

ACLs

An access control list (ACL) is a security logical mechanism attached to every object and resource in the environment. It defi nes which users are granted or denied the various types of access available based on the object type. Individual user accounts or user groups can be added to an object’s ACL and granted or denied access.

If your user account isn’t granted access through an object’s ACL, then often your access is denied by default (note: not all OSs use a deny by default approach). If your user account is specifi cally granted access through an object’s ACL, then you’re granted the specifi c level or type of access defi ned. If your user account is specifi cally denied access through an object’s ACL, then you’re denied the specifi c level or type of access defi ned. In some cases

278

Chapter 5

Access Control and Identity Management

(such as with Microsoft Windows OS), a Denied setting in an ACL overrides all other settings. Table 5.1 shows an access matrix for a user who is a member of three groups, and the resulting access to a folder on a network server. As you can see, the presence of the Denied setting overrides any other access granted from another group. Thus, if your membership in one user group grants you write access over an object, but another group specifi cally denies you write access to the same object, then you’re denied write access to the object.

TA B L E 5 .1 Cumulative access based on group memberships

Sales Group

Change

Read

User

Group

Read

Read

Read

Research Group Resulting Access Filename

None specified Change

SalesReport.xls

Change Change

ProductDevelopment.doc

Denied Denied

EmailPolicy.pdf

None specified

Full Control Denied

None specified Denied

CustomerContacts.

doc

Mandatory access

Mandatory access control (MAC) is a form of access control commonly employed by government and military environments. MAC specifi es that access is granted based on a set of rules rather than at the discretion of a user. The rules that govern MAC are hierarchical in nature and are often called sensitivity labels, security domains, or classifi ca-

tions. MAC environments defi ne a few specifi c security domains or sensitivity levels and then use the associated labels from those domains to impose access control on objects and subjects.

A government or military implementation of MAC typically includes the following fi ve levels (in order from least sensitive to most sensitive):

Unclassified

Sensitive but unclassified

Confidential

Secret

Top secret

Objects or resources are assigned sensitivity labels corresponding to one of these security domains. Each specifi c security domain or level defi nes the security mechanisms and restrictions that must be imposed in order to provide protection for objects in that domain.

5.2 Given a scenario, select the appropriate authentication

279

MAC can also be deployed in private sector or corporate business environments. Such cases typically involve the following four security domain levels (in order from least sensitive to most sensitive):

Public

Sensitive

Private

Confidential

The primary purpose of a MAC environment is to prevent disclosure: the violation of the security principle of confi dentiality. When an unauthorized user gains access to a secured resource, this is a security violation. Objects are assigned a specifi c sensitivity label based on the damage that would be caused if disclosure occurred. For example, if a top secret resource was disclosed, it could cause grave damage to national security.

A MAC environment works by assigning subjects a clearance level and assigning objects a sensitivity label—in other words, everything is assigned a classifi cation marker.

Subjects or users are assigned clearance levels. The name of the clearance level is the same as the name of the sensitivity label assigned to objects or resources. A person (or other subject, such as a program or a computer system) must have the same or greater assigned clearance level as the resources they wish to access. In this manner, access is granted or restricted based on the rules of classifi cation (that is, sensitivity labels and clearance levels).

MAC is named as it is because the access control it imposes on an environment is mandatory. Its assigned classifi cations and the resulting granting and restriction of access can’t be altered by users. Instead, the rules that defi ne the environment and judge the assignment of sensitivity labels and clearance levels control authorization.

MAC isn’t a very granularly controlled security environment. An improvement to MAC includes the use of need to know: a security restriction where some objects (resources or data) are restricted unless the subject has a need to know them. The objects that require a specifi c need to know are assigned a sensitivity label, but they’re compartmentalized from the rest of the objects with the same sensitivity label (in the same security domain). The need to know is a rule in and of itself, which states that access is granted only to users who have been assigned work tasks that require access to the cordoned-off object. Even if users have the proper level of clearance, without need to know, they’re denied access. Need to know is the MAC equivalent of the principle of least privilege from DAC (described in the following section).

Discretionary access

Discretionary access control (DAC) is the form of access control or authorization that is used in most commercial and home environments. DAC is user directed or, more specifi cally, controlled by the owner and creators of the objects (resources) in the environment.

DAC is identity based: access is granted or restricted by an object’s owner based on user

280

Chapter 5

Access Control and Identity Management identity and on the discretion of the object owner. Thus, the owner or creator of an object can decide which users are granted or denied access to their object. DAC uses ACLs.

Rule-based access control

Rule-based access control (RBAC) is typically used in relation to network devices that fi lter traffi c based on fi ltering rules, as found on fi rewalls and routers. These fi ltering rules are often called rules, rule sets, fi lter lists, or ACLs. Be sure you understand the context of the

Security+ exam question before assuming role or rule when you see RBAC.

Role-based access control

Role-based access control (RBAC) is another strict form of access control. It may be grouped with the nondiscretionary access control methods along with MAC. The rules used for RBAC are basically job descriptions: Users are assigned a specifi c role in an environment, and access to objects is granted based on the necessary work tasks of that role. For example, the role of backup operator may be granted the ability to back up every fi le on a system to a tape drive. The user given the backup operator role can then perform that function.

RBAC is most suitable for environments with a high rate of employee turnover. It allows a job description or role to remain static even when the user performing that role changes often. It’s also useful in industries prone to privilege creep, such as banking.

Time of day restrictions

Time of day restrictions are limitations on what time of day, and often what day of the week, a specifi c user account can log on to the network or a specifi c system can be accessed by users. This is a tool and technique for limiting access to sensitive environments to normal business hours when oversight and monitoring can be performed to prevent fraud, abuse, or intrusion.

Authentication

Identity proofi ng—that is, authentication—typically takes the form of one or more of the following authentication factors:

Something you know (such as a password, code, PIN, combination, or secret phrase)

Something you have (such as a smart card, token device, or key)

Something you are (such as a fingerprint, a retina scan, or voice recognition; often referred to as biometrics, discussed later in this chapter)

Somewhere you are (such as a physical or logical location)

Something you do (such as your typing rhythm, a secret handshake, or a private knock)

The authentication factor of something you are is also known as a Type 1 factor, something you have is also known as a Type 2 factor, and something you are is also known as a Type 3 factor. The factors of somewhere you are and something you do are not given Type labels.

When only one authentication factor is used, this is known as single-factor authentica-

tion (or, rarely, one-factor authentication).

5.2 Given a scenario, select the appropriate authentication

281

Tokens

A token is a form of authentication factor that is something you have. It’s usually a hardware device, but it can be implemented in software as a logical token. A token is used to generate temporary single-use passwords for the purpose of creating stronger authentication. In this way, a user account isn’t tied to a single static password. Instead, the user must be in physical possession of the password-generating device. The user enters the currently valid password from the token as their password during the logon process.

There are several forms of tokens. Some tokens generate passwords based on time, whereas others generate passwords based on challenges from the authentication server. In either case, the user can use (or attempt to use) the generated password just once before they must either wait for the next time window or request another challenge. Passwords that can be used only once are known as one-time passwords. This is the most secure form of password, because regardless of whether its use results in a successful logon, that one-use password is never valid again for reuse. One-time passwords can be employed only when a token is used, due to the complexity and ever-changing nature of the passwords. However, a token need not be a device; there are paper-based options as well as smart phone app–based solutions.

A token may be a device, like a small calculator with or without a keypad. It may also be a high-end smart card (see Figure 5.4). When properly deployed, a token-based authentication system is more secure than a password-only system.

F I G U R E 5 . 4 The smart card authentication process

Authentication

Response

Common access card

The common access card (CAC) is the name given to the smart card (see the next section for more on smart cards) used by the U.S. government and military for authentication purposes. Although the CAC name was assigned by the Department of Defense (DoD), the same technology is widely used in commercial environments. This smart card is used to host credentials, specifi cally digital certifi cates, that can be used to grant access to a facility or to a computer terminal.

282

Chapter 5

Access Control and Identity Management

Smart card

Smart cards are credit-card-sized IDs, badges, or security passes with an embedded integrated circuit chip. They can contain information about the authorized bearer that can be used for identifi cation and/or authentication purposes. Some smart cards can even process information or store reasonable amounts of data in a memory chip. A smart card may be known by several terms:

An identity token containing integrated circuits (ICs)

A processor IC card

An IC card with an ISO 7816 interface

Smart cards are often viewed as a complete security solution, but they should not be considered complete by themselves. As with any single security mechanism, smart cards are subject to weaknesses and vulnerabilities. Smart cards can fall prey to physical attacks, logical attacks, Trojan horse attacks, or social-engineering attacks.

Memory cards are machine-readable ID cards with a magnetic strip or a read-only chip, like a credit card, a debit card, or an ATM card. Memory cards can retain a small amount of data but are unable to process data like a smart card. Memory cards often function as a type of two-factor control: the card is something you have, and its PIN is something you know. However, memory cards are easy to copy or duplicate and are insuffi cient for authentication purposes in a secure environment.

Multifactor authentication

Multifactor authentication is the requirement that a user must provide two or more authentication factors in order to prove their identity. There are three generally recognized categories of authentication factors.

When two different authentication factors are used, this is known as two-factor authen-

tication (see Figure 5.5). If two or more authentication factors are used but some of them are of the same type, then this is known as strong authentication. Whenever different factors are used (whether two or three), this is always a more secure solution than any number of the same authentication factors. This is due to the fact that with two or more different factors, two or more different types of attacks must take place in order to capture the authentication factor itself. With strong authentication, even if 10 passwords are required, only a single type of password-stealing attack needs to be waged to break through the authentication security.

TOTP

Time-based one-time password (TOTP) tokens or synchronous dynamic password tokens are devices or applications that generate passwords at fi xed time intervals, such as every

60 seconds. Time-interval tokens must have their clocks synchronized to an authentication server. To authenticate, the user enters the password shown along with a PIN or passphrase as a second factor of authentication. The generated one-time password provides identifi cation, and the PIN/passphrase provides authentication.

5.2 Given a scenario, select the appropriate authentication

283

F I G U R E 5 . 5 Two-factor authentication

login: administrator

password: •••••••••••

Logon or

Security Server

Smart Card Reader

Both factors must be valid:

• UserID Password

• Smart Card

HOTP

HMAC-based one-time password (HOTP) tokens or asynchronous dynamic password tokens are devices or applications that generate passwords not based on fi xed time intervals but instead based on a non-repeating one-way function, such as a hash or hash message authentication code (HMAC—a type of hash that uses a symmetric key in the hashing process) operation. These tokens often generate a password after the user enters a PIN into the token device. The authentication process commonly includes a challenge and a response in which a server sends the user a PIN and the user enters the PIN to create the password.

These tokens have a unique seed (or random number) embedded along with a unique identifi er for the device. See CHAP (in section 6.2) for a description of this operation.

There is a potential downside to using a HOTPs, known as the off-by-one problem. If the non-time-based seed or key synchronization gets desynchronized, the client may be calculating a value that the server has already tossed or has not yet generated. This requires the device to be resynced with the authentication server.

CHAP

Challenge Handshake Authentication Protocol (CHAP) is a means of authentication based on a random challenge number combined with the password hash to compute a response.

See Chapter 6, section 6.2, for more on CHAP.

PAP

Password Authentication Protocol (PAP) is an insecure plaintext password-logon mechanism. See Chapter 6, section 6.2, for more on PAP.

284

Chapter 5

Access Control and Identity Management

Single sign-on

Single sign-on (SSO) means that once a user (or other subject) is authenticated into the realm, they don’t need to reauthenticate to access resources on any realm entity. (Realm is another term for domain or network.) This allows users to access all the resources, data, applications, and servers they need to perform their work tasks with a single authentication procedure. SSO eliminates the need for users to manage multiple usernames and passwords, because only a single set of logon credentials is required. Some examples of single sign-on include Kerberos, SESAME, NetSP, KryptoKnight, directory services, thin clients, and scripted access. Kerberos is one of the SSO solution options you should know about for the

Security+ exam; it was discussed in section 5.1 earlier in this chapter.

Access control

Access control or privilege management refers to controlling and managing users and their privileges and activities within a secured environment. Managing user privileges is a key element in maintaining security. A majority of the security violations that companies experience originate from within their secured facility. This means an organization is typically more at risk from its own users than from external intruders and hackers. Thus, privilege management is necessary to sustain a secure and productive network.

Implicit deny

The concept of an implicit deny is most easily explained using an ACL. One example would be an ACL used on a Cisco router to permit, deny, or mark traffi c as interesting. A router

ACL is composed of a series of permit and deny statements; however, at the end of this ACL is an implicit deny that denies everything not explicitly permitted.

Confused yet? Let’s say you create a router ACL to permit IP traffi c from Google.com to your internal network. That can be done many ways, one of which is a statement such as permit tcp host 74.125.79.104 192.168.1.0 0.0.0.255 eq www established

. This simple rule says to permit Google web traffi c from this one Google IP into the internal network (assuming you’re using

192.168.x.x

as the internal subnet) if communication was initially established from the internal network. Once applied, this rule permits Google in but no other traffi c. That is because there is an implicit deny statement at the end of every

ACL, even though you might not see it.

You won’t be required to master ACLs for the Security+ exam, but it would be a good idea to grasp the concept of an implicit deny statement.

Trusted OS

Trusted OS is the access-control feature that requires a specifi c OS to be present in order to gain access to a resource. By limiting access to only those systems that are known to implement specifi c security features, resource owners can be assured that violations of a resource’s security will be less likely.

5.2 Given a scenario, select the appropriate authentication

285

Authentication factors

Authentication factors are the concepts used to verify the identity of a subject. See the earlier section “Authentication.”

Something you are

Something you are is often known as biometrics. Examples include fi ngerprints, a retina scan, or voice recognition. See the section “Identifi cation” for more on biometrics.

Something you have

Something you have requires the use of a physical object. Examples include a smart card, token device, or key. See the earlier section “Authentication.”

Something you know

Something you know involves information you can recall from memory. Examples include a password, code, PIN, combination, or secret phrase. See the earlier section

“Authentication.”

Somewhere you are

Somewhere you are is a location-based verifi cation. Examples include a physical location or a logical address, such as domain name, an IP address, or a MAC address. See the earlier section “Authentication.”

Something you do

Something you do involves some skill or action you can perform. Examples include your typing rhythm, a secret handshake, or a private knock. See the earlier section

“Authentication.”

Identification

Identifi cation is the claiming of an identity. This needs to occur only once per authentication or access process. Any one of the common authentication factors can be employed for identifi cation. Once identifi cation has been performed, the authentication process must take place.

Biometrics

Biometrics is the term used to describe the collection of physical attributes of the human body that can be used as an identifi cation or an authentication factor. Biometrics fall into the authentication factor category of something you are: You, as a human, have the element of identifi cation as part of your physical body. Biometrics include fi ngerprints, palm scans

(use of the entire palm as if it were a fi ngerprint), hand geometry (geometric dimensions of the silhouette of a hand), retinal scans (pattern of blood vessels at the back of the eye), iris

286

Chapter 5

Access Control and Identity Management scans (colored area of the eye around the pupil), facial recognition, voice recognition, signature dynamics, and keyboard dynamics.

Although biometrics are a stronger form of authentication than passwords alone, biometrics in and of themselves aren’t the best solution. Even with biometrics, implementing multifactor authentication is the most secure solution.

The key element in deploying biometrics as an element of authentication is a biometric device or a biometric reader. This is the hardware designed to read, scan, or view the body part that is to be presented as proof of identifi cation.

As with all forms of hardware, there are potential errors associated with biometric readers. Two specifi c error types are a concern: false rejection rate (FRR or Type I) errors and

false acceptance rate (FAR or Type II) errors. The FRR is the number of failed authentications for valid subjects based on device sensitivity, whereas the FAR is the number of accepted invalid subjects based on device sensitivity. These two error measurements can be mapped on a graph comparing sensitivity level versus rate of errors. The point on this graph where these two rates intersect is known as the crossover error rate (CER; see Figure 5.6).

The CER point (as measured against the error scale) is used to determine which biometric device for a specifi c body part from various vendors or of various models is the most accurate. The comparatively lowest CER point is the more accurate biometric device for the relevant body part.

F I G U R E 5 . 6 A graphing of FRR and FAR, which reveals the CER

FAR

(Type II)

FRR

(Type I)

CER

Sensitivity

Personal identification verification card

Personal identifi cation verifi cation cards, such as badges, identifi cation cards, and security

IDs, are forms of physical identifi cation and/or electronic access-control devices. A badge can be as simple as a name tag indicating whether you’re a valid employee or a visitor. Or it can be as complex as a smart card or token device that employs multifactor authentication

5.2 Given a scenario, select the appropriate authentication

287

to verify and prove your identity and provide authentication and authorization to access a facility, specifi c rooms, or secured workstations. Badges often include pictures, magnetic strips with encoded data, and personal details to help a security guard verify identity.

Badges can be used in environments in which physical access is primarily controlled by security guards. In such conditions, the badge serves as a visual identifi cation tool for the guards. They can verify your identity by comparing your picture to your person and consult a printed or electronic roster of authorized personnel to determine whether you have valid access.

Badges can also serve in environments guarded by scanning devices rather than security guards. In such conditions, a badge can be used either for identifi cation or for authentication. When a badge is used for identifi cation, it’s swiped in a device, and then the badge owner must provide one or more authentication factors, such as a password, passphrase, or biological trait (if a biometric device is used). When a badge is used for authentication, the badge owner provides an ID, username, and so on, and then swipes the badge to authenticate.

Username

A username is the most common form of identifi cation. It’s any name used by a subject in order to be recognized as a valid user of a system. Some usernames are derived from a person’s actual name, some usernames are assigned, and some usernames are chosen by the subject. Using a consistent username across multiple systems can help establish a consistent reputation across those platforms. However, it’s extremely important to keep all authentication factors unique between locations, even when duplicating a username.

Federation

Federation or federated identity is a means of linking a subject’s accounts from several sites, services, or entities in a single account. It’s a means to accomplish single sign-on.

Federated solutions often implement trans-site authentication using SAML.

Transitive trust/authentication

Transitive trust or transitive authentication is a security concern when a block can be bypassed using a third party. See Chapter 3, section 3.2, for detailed information.

Exam Essentials

Understand identification. Identifi cation is the act of claiming an identity using just one authentication factor.

Understand authentication. Authentication is the act of proving a claimed identity using one or more authentication factors.

288

Chapter 5

Access Control and Identity Management

Understand authorization. Authorization is the mechanism that controls what a subject can and can’t do, access, use, or view. Authorization is commonly called access control or access restriction.

Understand least privilege. Least privilege states that a user should only be granted the minimal privileges necessary to perform their work or to accomplish a specifi c task.

Understand separation of duties. Separation of duties is a control mechanism designed to limit the damage that could be done by a single individual due to error or fraud.

Understand ACLs. An ACL is a security logical device attached to every object and resource in the environment. It defi nes which users are granted or denied the various types of access available based on the object type.

Understand MAC. Mandatory access control (MAC) is based on classifi cation rules.

Objects are assigned sensitivity labels. Subjects are assigned clearance labels. Users obtain access by having the proper clearance for the specifi c resource. Classifi cations are hierarchical.

Understand common MAC hierarchies. Government or military MAC uses the following levels: unclassifi ed, sensitive but unclassifi ed, confi dential, secret, and top secret. Private sector or corporate business environment MAC uses these: public, sensitive, private, and confi dential.

Understand DAC. Discretionary access control (DAC) is based on user identity. Users are granted access through ACLs on objects, at the discretion of the object’s owner or creator.

Understand RBAC. Role-based access control (RBAC) is based on job description. Users are granted access based on their assigned work tasks. RBAC is most suitable for environments with a high rate of employee turnover.

Understand tokens. A token is a form of authentication factor that is something you have.

It’s usually a hardware device, but it can be implemented in software as a logical token.

Understand personal identification verification cards. Personal identifi cation verifi cation cards, such as badges, identifi cation cards, and security IDs, are forms of physical identifi cation and/or electronic access-control devices.

Understand smart cards. Smart cards are credit-card–sized IDs, badges, or security passes with an embedded integrated circuit chip. They can contain information about the authorized bearer that can be used for identifi cation and/or authentication purposes.

Understand multifactor authentication. Multifactor authentication is the requirement that a user must provide two or more authentication factors in order to prove their identity.

Understand two-factor authentication. Two-factor authentication is when two different authentication factors are used.

5.3 Install and configure security controls

289

Understand strong authentication. Strong authentication is when two or more authentication factors are used but some of them are of the same type.

Understand TOTP. Time-based one-time password (TOTP) tokens or synchronous dynamic password tokens are devices or applications that generate passwords at fi xed time intervals.

Understand HOTP. HMAC-based one-time password (HOTP) tokens or asynchronous dynamic password tokens are devices or applications that generate passwords not based on fi xed time intervals but instead based on a nonrepeating one-way function, such as a hash or HMAC operation.

Understand single sign-on. Single sign-on means that once a user (or other subject) is authenticated into a realm, they need not reauthenticate to access resources on any realm entity.

Understand access control. Access control or privilege management can be addressed using one of three primary schemes: user, group, or role. These schemes correspond directly to the access-control methodologies DAC, MAC, and RBAC.

Understand biometrics. Biometrics is the collection of physical attributes of the human body that can be used as authentication factors (something you are). Biometrics include fi ngerprints, palm scans (use of the entire palm as if it were a fi ngerprint), hand geometry

(geometric dimensions of the silhouette of a hand), retinal scans (pattern of blood vessels at the back of the eye), iris scans (colored area of the eye around the pupil), facial recognition, voice recognition, signature dynamics, and keyboard dynamics.

Understand federation. Federation or federated identity is a means of linking a subject’s accounts from several sites, services, or entities in a single account.

5.3 Install and configure security controls when performing account management, based on best practices.

The combination of a username and a password is the most common form of authentication (see Figure 5.7). If the provided password matches the password stored in a system’s accounts database for the specifi ed user, then that user is authenticated to the system.

However, just because using a username and password is the most common form of authentication, that doesn’t mean it’s the most secure. On the contrary, it’s generally considered to be the least secure form of authentication.

290

Chapter 5

Access Control and Identity Management

F I G U R E 5 . 7 A basic logon process employing a username and password

login: administrator

password: •••••••••••

Logon or Security Server

Numerous means to improve the basic username/password combination have been developed. First is the storage of passwords in an accounts database in an encrypted form.

Typically that form is the hash value from a one-way hash function. Second is the use of an authentication protocol (or mechanism) that prevents the transmission of passwords in an easily readable form over a network or especially the Internet. Third, strong (complex) passwords are often enforced at a programmatic level. This is done to ensure that only passwords that are diffi cult for a password-cracking tool to discover are allowed by the system.

The strength of a password is generally measured in the amount of time and effort required to break the password through various forms of cryptographic attacks. These attacks are collectively known as password cracking or password guessing. A weak password invariably uses only alphanumeric characters; often employs dictionary or other common words; and may include user profi le–related information such as birthdates, Social

Security numbers, and pet names. A strong password is longer, more complex, unique, and changed on a regular basis.

Mitigate issues associated with users with multiple account/roles and/or shared accounts

Administrative personnel need two user accounts: a standard account and an administrative account. Their standard account should have the normal privileges that every other typical worker has. This account should be used for the mundane tasks that most workdays consist of. Their administrative account should be confi gured to have only the special privileges needed to accomplish the assigned administrative functions. This account should not be able to perform the mundane tasks of everyday work. This forces the user to employ the correct account for the task at hand. This also limits the amount of time the administrative account is in use and prevents it from being used when administrative access is a risk rather

5.3 Install and configure security controls

291

than a benefi t, such as when an administrator account is used to access the Internet, open email, or perform general fi le transfers or executions.

For users with multiple roles within the organization, especially multiple administrative roles, each role should have its own administrative user account. This could mean a worker has a single standard user account and two or more administrative accounts. This places an extra burden on the worker to keep authentication distinct. The use of multifactor authentication improves security and prevents a single password from being defi ned for each account.

Under no circumstances should a standard work environment implement shared accounts. It isn’t possible to distinguish between the actions of one person and another if they both use a shared account. Shared accounts should be used only for public or anonymous connections.

Account policy enforcement

Strong passwords consist of numerous characters (eight or more); include at least three types of characters (uppercase and lowercase letters, numerals, and keyboard symbols); are changed on a regular basis (every 90 days); don’t include any dictionary or common words or acronyms; and don’t include any part of the subject’s real name, username, or email address. These features can be implemented as a requirement through account policy

enforcement. This is the collection of password requirement features in the OS, often called a password policy.

Passwords should be strong enough to resist discovery through attack but easy enough for the person to remember. This can sometimes be a diffi cult line to walk. Training users on picking strong passphrases and memorizing them is an important element of modifying risky behavior.

Credential management

Credential management is a service or software product designed to store, manage, and even track user credentials. Many credential-management options are available for enterprise networks, where hundreds or thousands of users must be managed. However, most credential-management solutions are designed for end-user deployment. Credentialmanagement products allow a person to store all their online (and even local) credentials in a local or cloud-based secured digital container. Examples of products of this type include

LastPass, 1Password, KeePass 2, and Dashlane. By using a credential manager, users can defi ne longer and more random credentials for their various accounts without the burden of having to remember them or the problem of writing them down.

Group policy

Group policy is the mechanism by which Windows systems can be managed in a Windows network domain environment. A Group Policy Object (GPO) is a collection of registry settings that can be applied to a system at the time of bootup or at the moment of user login.

Group policy enables a Windows administrator to maintain consistent confi gurations and

292

Chapter 5

Access Control and Identity Management security settings across all members of a large network. In the vast array of setting options available in a GPO, there are numerous settings related to credentials, such as password complexity requirements, password history, password length, account lockout settings, and so on.

Password complexity

A password policy is both a set of rules written out as part of the organizational security policy that dictates the requirements of user and device passwords and a technical enforcement tool (typically a native part of an OS) that enforces the password rules. The password policy typically comprises the requirements for minimum password length, maximum password age, minimum password age, password history retention, and some sort of complexity requirement. This latter setting often enforces a minimum of three out of four standard character types (uppercase and lowercase letters, numbers, and symbols) to be represented in the password and disallows the username, real name, and email address from appearing in the password.

Generally, passwords over 12 characters are considered fairly secure, and those over

15 characters are considered very secure. Usually, the more characters in a password, along with some character type complexity, the more resistant it is to password-cracking techniques, specifi cally brute force attacks. Requiring regular password changes, such as every

90 days, and forbidding the reuse of previous passwords (password history) improves the security of a system that uses passwords as the primary means of authentication.

Expiration

It has been common practice for years for passwords to automatically expire after a specifi c length of time in order to force users to change passwords. The length of time for a password to remain static can vary based on risk and threat levels. However, a common rule of thumb is for passwords to be changed every 90 days. This may still be considered the

“right” answer for Security+, but the idea that a password needs to be changed due to its age is invalid. A password only needs to be changed if it

Isn’t in compliance with company password policy

Is obviously insecure

Has been reused

Is likely compromised due to a system intrusion

Otherwise, a strong (long and complex) password can remain static.

Recovery

Password recovery is usually a poor security solution. When a password is forgotten, it should be changed. The ability to recover and/or reveal a password requires that the password storage mechanism be reversible or that passwords be stored in multiple ways. A more secure option is to require passwords to be changed rather than recovered.

5.3 Install and configure security controls

293

Disablement

Disablement or account expiration is a little-used feature of some OSs’ user accounts that automatically disables a user account or causes the account to expire at a specifi c time and on a specifi c day. Account expiration is a secure feature to employ on user accounts for temporary workers, interns, or consultants. Workers who need valid user accounts but whose employment or access will expire at a specifi c known date and time can be set up with accounts that are preconfi gured to become disabled. In most cases, such accounts can be reenabled after they expire, and new or updated expiration dates can be established at any time.

Lockout

Account lockout automatically disables an account when someone attempts to log on but fails repeatedly because they type in an incorrect password. Account lockout is often confi gured to lock out an account after three to fi ve failed logon attempts within a short time (such as 15 minutes). Accounts that are locked out may remain permanently disabled until an administrator intervenes or may return to functional status after a specifi ed period of time.

Password history

This is an authentication protection feature that tracks previous passwords (by archiving hashes) in order to prevent password reuse.

Password reuse

Password reuse occurs when a user attempts to use a password they had used previously on the same system. The management of password history prevents password reuse.

Password length

Length, in combination with complexity, is an important factor in determining a password’s strength. Generally, longer passwords are better. Passwords of 7 characters or less are likely to be cracked within hours. Passwords of 8 or 9 characters are likely crackable within days to weeks. Passwords of 10 or more characters are unlikely to be cracked.

These relative strengths are based on the range of character types, the use of a strong hashing mechanism for storage, and never transmitting the password in plain text. The mathematical predictions of strength aren’t a guarantee. Additionally, lazy actions on the part of the user or poor security management in the environment can provide other means to learn or bypass strong passwords.

Generic account prohibition

Generic account prohibition is the rule that no generic or shared or anonymous accounts should be allowed in private networks or on any system where security is important. Only when each subject has a unique account is it possible to track the activities of individuals and hold them accountable for their actions and any violations of company policy or the law.

294

Chapter 5

Access Control and Identity Management

Group-based privileges

Group-based privileges assign a privilege or access to a resource to all members of a group as a collective. Group-based access control grants every member of the group the same level of access to a specifi c object. Group-based privileges are common in many OSs, including

Linux and Windows. Linux (as well as Unix) uses group-based privileges on each object. In fact, each object has three types of permissions: those for the owner, those for the group of the owner, and those for other users (known as World or Everyone). The second permission set, which defi nes permissions for all members of the group, is associated with the object because the owner is a member of that group.

Windows uses group management differently. Each object has an ACL. The ACL can contain one or more access control entries (ACEs). Each ACE focuses on either a single user or a group. If an ACE focuses on a group, then all members of the group are granted (or denied) the related permissions on the object.

When using group-assigned privileges, it’s important to consider whether doing so violates the principle of least privilege as well as whether you actually want to grant all members of a specifi c group the same access to a specifi c object. If not, you need to alter the permissions assignment.

User-assigned privileges

User-assigned privileges are permissions granted or denied on a specifi c individual user basis. This is a standard feature of DAC-based OSs, including Linux and Windows. All objects in Linux have an owner assigned. The owner (an individual) is granted specifi c privileges. In Windows, an ACE in an ACL can focus on an individual user to grant or deny permissions on the object.

User access reviews

Part of security is holding users accountable for their actions. This can only be accomplished if each and every user has their own unique user account. Thus, shared or group accounts aren’t suffi cient to provide accountability. Each user should be required to provide strong authentication credentials to prevent account takeover. Each account needs to have clearly defi ned access-control and authorization restrictions. Finally, all activities of users should be recorded in an auditing or logging mechanism. By having these elements in place, you can carry out user access reviews in order to determine whether users have been performing their work tasks appropriately or if there have been failed and/or successful attempts at violating company policies or the law.

Continuous monitoring

Continuous monitoring stems from the need to have user accountability through the use of user access reviews. It’s becoming a standard element in government regulations and security contracts that the monitoring of an environment be continuous in order to provide a

5.3 Install and configure security controls

295

more comprehensive overview of the security stance and user compliance with security policies. Effectively, continuous monitoring requires that all users be monitored equally, that users be monitored from the moment they enter the physical or logical premises of an organization until they depart or disconnect, and that all activities of all types on any and all services and resources be tracked. This comprehensive approach to auditing, logging, and monitoring increases the likelihood of capturing evidence related to abuse or violations.

Exam Essentials

Understand password management. Password management is the system used to manage passwords across a large network environment. It typically includes a requirement for users to create complex passwords. It also addresses the issues of complexity, expiration, recovery, account disablement, lockout, history, reuse, and length.

Understand shared accounts. Under no circumstances should a standard work environment implement shared accounts. It isn’t possible to distinguish between the actions of one person and another if they both use a shared account.

Understand credential management. Credential management is a service or software product designed to store, manage, and even track user credentials.

Understand privileges. Group-based privileges assign a privilege or access to a resource to all members of a group as a collective. User-assigned privileges are permissions that are granted or denied on a specifi c individual user basis.

296

Chapter 5

Access Control and Identity Management

Review Questions

1. What method of access control is best suited for environments with a high rate of employee turnover?

A. MAC

B. DAC

C. RBAC

D. ACL

2. What mechanism is used to support the exchange of authentication and authorization details between systems, services, and devices?

A. Biometric

C. SAML

D. LDAP

3. Kerberos is used to perform what security service?

D. Protected data transfer

4. Which is the strongest form of password?

A. More than eight characters

C. Static

D. Different types of keyboard characters

5. Which of the following technologies can be used to add an additional layer of protection between a directory services–based network and remote clients?

A. SMTP

B. RADIUS

C. PGP

D. VLAN

6. LDAP operates over what TCP ports?

A. 636 and 389

B. 110 and 25

C. 443 and 80

D. 20 and 21

Review Questions

297

7. In a MAC environment, when a user has clearance for assets but is still unable to access those assets, what other security feature is in force?

A. Principle of least privilege

B. Need to know

C. Privacy

8. Which of the following is not a benefit of single sign-on?

A. The ability to browse multiple systems

B. Fewer usernames and passwords to memorize

C. More granular access control

9. Federation is a means to accomplish .

D. Trusted OS hardening

10. Which of the following is an example of a Type 2 authentication factor?

A. Something you have, such as a smart card, an ATM card, a token device, or a memory card

B. Something you are, such as fingerprints, voice print, retina pattern, iris pattern, face shape, palm topology, or hand geometry

C. Something you do, such as type a passphrase, sign your name, or speak a sentence

D. Something you know, such as a password, personal identification number (PIN), lock combination, passphrase, mother’s maiden name, or favorite color

Chapter

6

Cryptography

COMPTIA SECURITY+ EXAM OBJECTIVES

COVERED IN THIS CHAPTER INCLUDE THE

FOLLOWING:

6.1 Given a scenario, utilize general cryptography

concepts.

Symmetric vs. asymmetric

Session keys

In-band vs. out-of-band key exchange

Fundamental differences and encryption methods

Block vs. stream

Transport encryption

Non-repudiation

Hashing

Key escrow

Steganography

Digital signatures

Use of proven technologies

Elliptic curve and quantum cryptography

Ephemeral key

Perfect forward secrecy

6.2 Given a scenario, use appropriate cryptographic

methods.

WEP vs. WPA/WPA2 and preshared key

MD5

SHA

RIPEMD

AES

DES

3DES

HMAC

RSA

Diffie-Hellman

RC4

One-time pads

NTLM

NTLMv2

Blowfish

PGP/GPG

TwoFish

DHE

ECDHE

CHAP

PAP

Comparative strengths and performance of algorithms

Use of algorithms/protocols with transport encryption

SSL

TLS

IPSec

SSH

HTTPS

Cipher suites

Strong vs. weak ciphers

Key stretching

PBKDF2

Bcrypt

6.3 Given a scenario, use appropriate PKI, certificate

management, and associated components.

Certificate authorities and digital certificates

CA

CRLs

OCSP

CSR

PKI

Recovery agent

Public key

Private key

Registration

Key escrow

Trust models

The Security+ exam will test your knowledge of cryptography and how it relates to the security of stand-alone and networked systems in a corporate environment. To pass the test and be effective in implementing security, you need to be familiar with both symmetric and asymmetric cryptography, as well as hashing, certifi cates, digital signatures, and other cryptographic issues as detailed in this chapter.

6.1 Given a scenario, utilize general cryptography concepts

There is a wide breadth of topics related to cryptography. Some of these are foundational issues, some are security services, and others are solutions or implementations. This section discusses many important general cryptography concepts that are addressed on the

Security+ exam.

Security practitioners utilize cryptographic systems to meet several fundamental goals, including confi dentiality, integrity, and authentication. Achieving each of these goals requires the satisfaction of a number of design requirements, and not all cryptosystems are intended to achieve all possible goals.

Confi dentiality ensures that data remains private while at rest, such as when stored on a disk, or in motion, such as during transmission between two or more parties. This is perhaps the most widely cited goal of cryptosystems—the facilitation of secret communications between individuals and groups. Two main types of cryptosystems enforce confi dentiality.

Symmetric-key cryptosystems use a shared secret key available to all users of the cryptosystem. Asymmetric cryptosystems use individual combinations of public and private keys for each user of the system.

When developing a cryptographic system for the purpose of providing confi dentiality, you must think about two different types of data: data at rest and data in motion. Data at rest, or stored data, resides in a permanent location awaiting access. Examples of data at rest include data stored on hard drives, backup tapes, USB devices, and other storage media. Data in motion, or data “on the wire,” is being transmitted across a network between two systems. Data in motion might be traveling on a corporate network, a wireless network, or the public Internet. Both data in motion and data at rest pose different types of confi dentiality risks that cryptography can protect against. For example, data in motion

6.1 Given a scenario, utilize general cryptography concepts

303

may be susceptible to eavesdropping attacks, whereas data at rest is more susceptible to the theft of physical devices.

Integrity ensures that a message isn’t altered while in transit. If integrity mechanisms are in place, the recipient of a message can be certain that the message received is identical to the message that was sent. This protects against all forms of alteration: intentional alteration by a third party attempting to insert false information and unintentional alteration by faults in the transmission process. Message integrity is enforced through the use of digitally signed message digests created upon transmission of a message. The recipient of the message simply verifi es that the message’s digest and signature are valid, ensuring that the message wasn’t altered in transit. Integrity can be enforced by both public and secret-key cryptosystems.

Authentication verifi es the claimed identity of system users and is a major function of cryptosystems. For example, suppose that Jim wants to establish a communications session with Bob, and they’re both participants in a shared-secret communications system.

Jim might use a challenge-response authentication technique to ensure that Bob is who he claims to be.

Another important benefi t or goal of cryptography is non-repudiation. This is the idea that a sender can’t deny having sent a signed message. This is discussed in its own section later in this chapter.

As with any science, you must be familiar with certain terminology before you study cryptography. Let’s take a look at a few of the key terms used to describe codes and ciphers.

Before a message is put into a coded form, it’s known as a plaintext message and is represented by the letter P when encryption functions are described. The sender of a message uses a cryptographic algorithm to encrypt the plaintext message and produce a ciphertext message, represented by the letter C. This message is transmitted by some physical or electronic means to the recipient. The recipient then uses a predetermined algorithm to decrypt the ciphertext message and retrieve the plaintext version.

All cryptographic algorithms rely on keys to maintain their security. For the most part, a key is nothing more than a number. It’s usually a very large binary number, but a number nonetheless. Every algorithm has a specifi c keyspace. The keyspace is the range of values that are valid for use as a key for a specifi c algorithm. A keyspace is defi ned by its bit size.

Bit size is nothing more than the number of binary bits (0s and 1s) in the key. The keyspace is the range between the key that has all 0s and the key that has all 1s. Or to state it another way, the keyspace is the range of numbers from 0 to 2 n

, where n is the bit size of the key. So, a 128-bit key can have a value from 0 to 2

128

(which is roughly 3.40282367 *

10

38

—that is, a very big number!). Even though a key is just a number, it’s a very important number. In fact, if the algorithm is known, then all the security you gain from cryptography rests on your ability to keep the keys used private.

Different types of algorithms require different types of keys. In private-key (or secretkey) cryptosystems, all participants use a single shared key. In public-key cryptosystems, each participant has their own pair of keys. Cryptographic keys are sometimes referred to as cryptovariables.

304

Chapter 6

Cryptography

Symmetric vs. asymmetric

Symmetric cryptography is also called private-key cryptography or secret-key cryptog-

raphy. It uses a single shared encryption key to encrypt and decrypt data (see Figure 6.1).

When symmetric cryptography is used to encrypt fi les on a hard drive, the user is the only person in possession of the single secret key. When symmetric cryptography is used to encrypt communications traffi c, the two communication partners each have a copy of the one shared secret key. For example, the secure communication session protocol of Secure

Sockets Layer (SSL) uses symmetric cryptography. In either use, symmetric cryptography protects confi dentiality.

F I G U R E 6 .1 A symmetric encryption system

Encrypts using key.

Decrypts using key.

Message

Symmetric cryptography is very fast in comparison to asymmetric cryptography

(discussed next). Its speed is due to the way its algorithms are designed and the fact that a single key is used to encrypt and decrypt data.

Symmetric cryptography provides for strong encryption protection when larger keys are used. However, the protection is secure only as long as the keys are kept private. If a symmetric key is compromised or stolen, it no longer offers true protection (just as your door lock no longer provides security if someone gets a copy of your house key).

Key exchange or distribution under symmetric cryptography is a common problem. To use symmetric cryptography to encrypt communications traffi c between you and someone else over the Internet (or some other untrusted network), you must have a means to securely exchange the secret keys. If you already have a means to exchange the secret keys securely, why aren’t you using that mechanism to communicate? Thus, some out-of-band communication solution must be implemented to securely exchange keys. Mechanisms include shipping a fl oppy with a key, reading it over the phone, or using a different network to transmit the key. However, the preferred method is to deploy a complete Public

Key Infrastructure (PKI) solution that employs asymmetric cryptography to exchange symmetric cryptographic keys. The exchanged secret keys are used to encrypt the traffi c for a single communication session, and then they’re discarded. PKI is simply a concept of how to deploy different aspects of various cryptography mechanisms into a single, complete, real-world solution.

Because each member of a network in a symmetric cryptography solution needs to have a shared secret key with every other member in order to support secure communications, n

(n – 1) / 2 keys are needed. Thus, symmetric cryptography isn’t scalable when used alone.

The most widely used symmetric cryptography solutions are listed in Table 6.1.

6.1 Given a scenario, utilize general cryptography concepts

305

TA B L E 6 .1 Common symmetric cryptography solutions

Name

Advanced Encryption Standard (AES; uses the

Rijndael block cipher algorithm)

Triple Data Encryption Standard (3DES)

Data Encryption Standard (DES)

International Data Encryption Algorithm (IDEA)

Blowfish

Twofish

Rivest Cipher 5 (RC5)

Rivest Cipher 6 (RC6)

Carlisle Adams/Stafford Tavares (CAST-128)

Block Size Key Size (in Bits)

128 128, 192, and 256

64

64

64

64

128

128

64

168

56

128

32 to 448

128, 192, or 256

32, 64, 128 0–2040

128, 192, or 256

40 to 128 in increments of 8

Asymmetric cryptography is also called public-key cryptography. However, these terms aren’t exactly synonyms. All public-key cryptography systems are asymmetric, but there are asymmetric systems that aren’t public-key cryptography. These non-key-based asymmetric systems include Diffi e-Hellman and ElGamal, both discussed later in this section.

Public-key cryptography uses key pairs consisting of a public key and a private key (see

Figure 6.2). Each communication partner in an asymmetric cryptography solution needs its own unique key pair set (a private key and a public key); this makes asymmetric cryptography much more scalable than symmetric. The private key of the key pair must be kept private and secure. The public key of the key pair is distributed freely and openly.

F I G U R E 6 . 2 An asymmetric encryption system

Encrypts using recipient’s public key.

Decrypts using recipient’s private key.

Message Message

The public and private keys are related mathematically, but possession of the public key doesn’t allow someone to generate the private key. Thus, the integrity of the private key is protected. The mechanism that provides this security is called a one-way function. A one-way

306

Chapter 6

Cryptography

function is a mathematical operation that easily produces output values for each possible combination of inputs but makes it impossible to retrieve the input values. Public-key cryptosystems are all based on some sort of one-way function. In practice, however, it’s never been proven that any specifi c known function is truly one way. Cryptographers rely on functions that they suspect may be one way, but it’s theoretically possible that those functions might be broken by future cryptanalysts.

In addition, the keys always work in unison: If the public key is used to encrypt data, only the private key can decrypt it. Likewise, if the private key is used to encrypt data, only the public key can decrypt it.

Asymmetric cryptography functions as follows:

1.

The sender writes a message.

2.

The sender encrypts the message with the sender’s private key to produce the interim message package.

3.

The sender encrypts the interim message package with the recipient’s public key to produce the message package.

4.

The sender transmits the message package to the recipient.

5.

The recipient decrypts the message package using the recipient’s private key to produce the interim message package.

6.

The recipient decrypts the interim message package using the sender’s public key to extract the original message.

Asymmetric cryptography is much slower than symmetric cryptography, so it isn’t generally suited for encrypting a large amount of data. It’s often used as the secure exchange mechanism for symmetric cryptographic keys. It provides several security services: authentication, integrity protection, and non-repudiation.

The most widely used asymmetric cryptography solutions are as follows:

Rivest, Shamir, and Adleman (RSA)

Diffie-Hellman

ElGamal

Elliptic curve cryptography (ECC)

RSA, the most famous public-key cryptosystem, is named after its creators. In 1977,

Ronald Rivest, Adi Shamir, and Leonard Adleman proposed the RSA public-key algorithm that remains a worldwide standard. They patented their algorithm and formed a commercial venture known as RSA Security to develop mainstream implementations of their security technology. Today, the RSA algorithm forms the security backbone of a large number of well-known security infrastructures produced by companies like

Microsoft, Nokia, and Cisco.

The RSA algorithm depends on the computational diffi culty inherent in factoring large prime numbers. Each user of the cryptosystem generates a pair of public and private keys using a wonderfully complex one-way algorithm.

6.1 Given a scenario, utilize general cryptography concepts

307

In some cases, neither public-key encryption nor offl ine distribution is suffi cient. Two parties might need to communicate with each other, but they have no physical means to exchange key material, and no public-key infrastructure is in place to facilitate the exchange of secret keys. In situations like this, key-exchange algorithms like the Diffi e-

Hellman algorithm prove to be extremely useful mechanisms.

Diffi e-Hellman uses a series of one-way functions and non-shared secrets to generate a shared number (which is used as a symmetric key) between two parties across an insecure conversation medium. The Diffi e-Hellman algorithm represented a major advance in the state of cryptographic science when it was released in 1976. It’s still in use today.

In 1985, Dr. T. El Gamal published an article describing how the mathematical principles behind the Diffi e-Hellman key-exchange algorithm could be extended to support an entire public-key cryptosystem used for encrypting and decrypting messages.

At the time of its release, one of the major advantages of ElGamal over the RSA algorithm was that it was released into the public domain. Dr. El Gamal didn’t obtain a patent on his extension of Diffi e-Hellman, and it’s freely available for use, unlike the then-patented

RSA technology. RSA released its algorithm into the public domain in 2000.

However, ElGamal has a major disadvantage: the algorithm doubles the length of any message it encrypts. This presents a major hardship when encrypting long messages or data that will be transmitted over a narrow-bandwidth communications circuit.

In 1985, two mathematicians, Neil Koblitz from the University of Washington and Victor

Miller from International Business Machines (IBM), independently proposed the application of the elliptic curve cryptography (ECC) theory to develop secure cryptographic systems.

The mathematical concepts behind ECC are quite complex and well beyond the scope of this book. However, you should be generally familiar with the elliptic curve algorithm and its potential applications when preparing for the Security+ exam. If you’re interested in learning the detailed mathematics behind elliptic curve cryptosystems, an excellent tutorial exists at www.certicom.com/index.php/ecc-tutorial

.

Computer scientists and mathematicians believe that it’s extremely hard to fi nd the solution to the elliptic curve discrete logarithm problem, which forms the basis of elliptic curve cryptography. It’s widely believed that this problem is harder to solve than both the prime-factorization problem that the RSA cryptosystem is based on and the standard discrete logarithm problem utilized by Diffi e-Hellman and ElGamal. The end result of this mathematical magic is a cryptosolution that can be used on lower-powered devices (those with less CPU capabilities and less memory capacity than a typical computer or notebook, such as mobile phones, netbooks, tablet/tab PCs, e-book readers, and handheld computers) but still provides equivalent security protection. For example, a 1,024-bit RSA key is cryptographically equivalent to a 160-bit ECC key.

Session keys

Session keys are encryption keys used for a communications session. Typically, session keys are randomly selected (or generated) and then used only for one session. Session keys are often symmetric keys, but asymmetric session keys can be used as well.

308

Chapter 6

Cryptography

Some of the most commonly occurring session keys are those used by SSL/TLS (see the discussion later in this chapter). Session keys can be further secured by using a secure keyexchange mechanism (see the next section) and by using them on a limited basis. The more often an encryption key is used, the less security it provides. This is the case because each new use of an encryption key on another message provides additional information to a potential attacker that may simplify the complexity or shorten the length of time involved in a key-cracking or -guessing attack.

A way to combat this is to perform rekeying, which is a means to use keys on a limited basis. Rekeying is the process of discarding a key and creating a new one. Rekeying can be triggered by a wide number of events or circumstances, such as the length of time a conversation lasts, the amount of data transmitted, or a gap or idle period in the transaction.

In-band vs. out-of-band key exchange

In-band key exchange takes place in the existing and established communication channel or pathway. It’s often considered less secure because there is greater risk of an eavesdropping or man-in-the-middle attack being able to capture and/or intercept the exchange.

Out-of-band key exchange takes place outside of the current communication channel or pathway, such as through a secondary channel, via a special secured exchange technique in the channel, or with a complete separate pathway technology. Out-of-band key exchange is generally considered more secure, because any attack monitoring the initial channel is less likely to be monitoring or have access to the alternate or separate communications path.

Examples of out-of-band key exchange include using a separate communication session with alternate ports, using an asymmetric key-exchange solution (digital envelopes or Diffi e-Hellman), and physical exchange methods (NFC sync, Bluetooth exchange, or QR code scanning).

Fundamental differences and encryption methods

Some of the differences between symmetric and asymmetric encryption were mentioned in the previous section. These differences include key length, use of one key or multiple keys

(or no keys at all in some cases), and speed.

The length of the cryptographic key is perhaps the most important security parameter that can be set at the discretion of the security administrator. It’s important to understand the capabilities of your encryption algorithm and choose a key length that provides an appropriate level of protection. This judgment can be made by weighing the diffi culty of defeating a given key length (measured in the amount of processing time required to defeat the cryptosystem) against the importance of the data.

Generally speaking, the more critical your data, the stronger the key you use to protect it should be. Timeliness of the data is also an important consideration. You must take into account the rapid growth of computing power—the famous Moore’s law states that computing power doubles approximately every 18 months. If it takes current computers one year of processing time to break your code, it will take only three months if the attempt is

6.1 Given a scenario, utilize general cryptography concepts

309

made with contemporary technology three years down the road. If you expect that your data will still be sensitive at that time, you should choose a much longer cryptographic key that will remain secure well into the future.

An additional difference is in symmetric encryption; that is, block versus stream ciphers.

Block vs. stream

Symmetric cryptography is divided into two subforms: block and stream. Block ciphers operate on “chunks,” or blocks, of a message and apply the encryption algorithm to an entire message block at the same time. The transposition ciphers are examples of block ciphers. The simple mechanism used in the challenge-response algorithm takes an entire word and reverses its letters. The more complicated columnar transposition cipher works on an entire message (or a piece of a message) and encrypts it using the transposition algorithm and a secret keyword. Most modern encryption algorithms implement some type of block cipher.

Stream ciphers are ciphers that operate on each character or bit of a message (or data stream) one character/bit at a time. The Caesar cipher (or C3 cipher) is a three-letter shifted monoalphabetic substitution cipher and is an example of a stream cipher. The one-time pad is also a stream cipher because the algorithm operates on each letter of the plaintext message independently. Stream ciphers can also function as a type of block cipher. In such operations, a buffer fi lls with real-time data that is then encrypted as a block and transmitted to the recipient.

Other than the basic difference in whether the original data is preexisting and static or produced on the fl y, both ciphers function in much the same manner. Unless the symmetric cryptography solution is based around a one-time pad (meaning every key is used only once), the same encryption key is used on each block or buffer block for a given data set or communication session.

Transport encryption

Transport encryption is used to ensure the security of information while it’s being transmitted between two end points. Many protocols support transport encryption. These include the following:

Virtual private network (VPN) protocols such as Point-to-Point Tunneling Protocol

(PPTP), Layer 2 Tunneling Protocol (L2TP), and Internet Protocol Security (IPsec)

Communication security protocols such as Secure Sockets Layer (SSL) and Transport

Layer Security (TLS)

The application of SSL to protect web traffic, as in Hypertext Transfer Protocol over

SSL (HTTPS)

Secure remote administration solutions, such as Secure Shell (SSH)

Email security solutions, such as Secure/Multipurpose Internet Mail Extensions

(S/MIME) and Pretty Good Privacy (PGP)

310

Chapter 6

Cryptography

A virtual private network (VPN) is a communication tunnel between two entities across an intermediary network. In most cases, the intermediary network is an untrusted network, such as the Internet, and therefore the communication tunnel is also encrypted. VPNs can be used to connect two networks across the Internet (see Figure 6.3) or to allow distant clients to connect into an offi ce local area network (LAN) across the Internet (see Figure 6.4). Once a VPN link is established, the network connectivity for the VPN client is exactly the same as an LAN connected by a cable connection. The only difference between a direct LAN cable connection and a VPN link is speed.

F I G U R E 6 . 3 Two LANs being connected using a VPN across the Internet

Internet

VPN channel appears dedicated.

Local Network

Local Network

Client Server

F I G U R E 6 . 4 A client connecting to a network via a VPN across the Internet

Corporate Network

Server

Internet

Client Computer with VPN Software

Encrypted Communications Tunnel

VPN

Server

Workstation Workstation

VPNs offer an excellent solution for remote users to access resources on a corporate

LAN. They have the following advantages:

They eliminate the need for expensive dial-up modem banks.

They do away with long-distance toll charges.

6.1 Given a scenario, utilize general cryptography concepts

311

They allow any user anywhere in the world with an Internet connection to establish a

VPN link with the office network.

They provide security for both authentication and data transmission.

Sometimes VPN protocols are called tunneling protocols. This naming convention is designed to focus attention on the tunneling capabilities of VPNs.

VPNs work through a process called encapsulation. As data is transmitted from one system to another across a VPN link, the normal LAN TCP/IP traffi c is encapsulated (encased, or enclosed) in the VPN protocol. The VPN protocol acts like a security envelope that provides special delivery capabilities (for example, across the Internet) as well as security mechanisms (such as data encryption).

When fi rewalls, intrusion detection systems, antivirus scanners, or other packet-fi ltering and -monitoring security mechanisms are used, you must realize that the data payload of

VPN traffi c won’t be viewable, accessible, scannable, and so on, because it’s encrypted.

Thus, in order for these security mechanisms to function against VPN-transported data, they must be placed outside of the VPN tunnel to act on the data after it has been decrypted and returned back to normal LAN traffi c.

VPNs provide the following four critical functions:

Access control restricts users from accessing resources on a network.

Authentication proves the identity of communication partners.

Confidentiality prevents unauthorized disclosure of secured data.

Data integrity prevents unwanted changes of data while in transit.

VPN links are established using VPN protocols. There are several VPN protocols, but these are the three you should recognize:

Point-to-Point Tunneling Protocol (PPTP)

Layer 2 Tunneling Protocol (L2TP)

Internet Protocol Security (IPsec)

L2TP and PPTP are widely used VPN protocols. PPTP was originally developed by Microsoft. L2TP was developed by combining features of Microsoft’s proprietary implementation of PPTP and Cisco’s Layer 2 Forwarding (L2F) VPN protocols. Since its development, L2TP has become an Internet standard (RFC 2661) and is quickly becoming widely supported.

Both L2TP and PPTP are based on Point-to-Point Protocol (PPP) and thus work well over various types of remote-access connections, including dial-up. L2TP can support just about any networking protocol. PPTP is limited to IP traffi c. L2TP uses UDP port 1701, and PPTP uses TCP port 1723.

PPTP can use any of the authentication methods supported by PPP, including the following:

Challenge Handshake Authentication Protocol (CHAP)

Extensible Authentication Protocol (EAP)

312

Chapter 6

Cryptography

Microsoft Challenge Handshake Authentication Protocol version 1 (MS-CHAP v.1)

Microsoft Challenge Handshake Authentication Protocol version 2 (MS-CHAP v.2)

Shiva Password Authentication Protocol (SPAP)

Password Authentication Protocol (PAP)

Note that PPTP can provide data encryption only when MS-CHAP v.2 is employed for authentication.

L2TP can rely on PPP and thus on PPP’s supported authentication protocols. But L2TP also supports other authentication and encryption protocols, such as Internet Protocol

Security (IPsec). Although it isn’t required, L2TP is most often deployed using IPsec.

L2TP can be used to tunnel any routable protocol but contains no native security features. When L2TP is used to encapsulate IPsec, it obtains authentication and data-encryption features because IPsec provides them. The only reason to use L2TPencapsulated IPsec instead of naked IPsec is when the secured connection is to cross a public switched telephone network (PSTN) link. Otherwise, IPsec can be used without the extra overhead of L2TP.

IPsec is a standard architecture set forth by the Internet Engineering Task Force (IETF) for setting up a secure channel to exchange information between two entities. The two entities could be two systems, two routers, two gateways, or any combination of entities.

Although generally used to connect two networks, IPsec can be used to connect individual computers, such as a server and a workstation or a pair of workstations (sender and receiver, perhaps). IPsec doesn’t dictate all implementation details but is an open, modular framework that allows many manufacturers and software developers to develop IPsec solutions that work well with products from other vendors.

IPsec uses public-key cryptography to provide encryption, access control, non-repudiation, and message authentication, all using Internet protocols. The primary use of IPsec is for VPNs, so IPsec operates in either transport or tunnel mode. IPsec is commonly paired with L2TP as L2TP/IPsec.

The IPsec protocol provides a complete infrastructure for secured network communications. It has gained widespread acceptance and is now offered in a number of commercial operating systems out of the box. IPsec relies on security associations, and there are two main components:

The Authentication Header (AH) provides assurances of message integrity and nonrepudiation. AH also provides authentication and access control and prevents replay attacks.

The Encapsulating Security Payload (ESP) provides confidentiality and integrity of packet contents. It provides encryption and limited authentication, and prevents replay attacks.

ESP also provides some limited authentication, but not to the degree of the

AH. Although ESP is sometimes used without AH, it’s rare to see AH used without ESP.

6.1 Given a scenario, utilize general cryptography concepts

313

IPsec provides for two discrete modes of operation. When IPsec is used in transport

mode, only the packet payload is encrypted. This mode is designed for peer-to-peer communication. When it’s used in tunnel mode, the entire packet, including the header, is encrypted. This mode is designed for gateway-to-gateway communication.

SSL was developed by Netscape to provide client/server encryption for web traffi c.

HTTPS uses port 443 to negotiate encrypted communications sessions between web servers and browser clients. Although SSL originated as a standard for Netscape browsers, Microsoft also adopted it as a security standard for its popular Internet Explorer browser. The incorporation of SSL into both of these products made it the de facto Internet standard.

SSL relies on the exchange of server digital certifi cates to negotiate RSA encryption/ decryption parameters between the browser and the web server. SSL’s goal is to create secure communications channels that remain open for an entire web browsing session.

SSL relies on a combination of symmetric and asymmetric cryptography. When a user accesses a website, the browser retrieves the web server’s certifi cate and extracts the server’s public key from it. The browser then creates a random symmetric key, uses the server’s public key to encrypt it, and sends the encrypted symmetric key to the server. The server then decrypts the symmetric key using its own private key, and the two systems exchange all future messages using the symmetric encryption key. This approach allows SSL to use the advanced functionality of asymmetric cryptography while encrypting and decrypting the vast majority of the data exchanged using the faster symmetric algorithm.

SSL forms the basis for a newer security standard, the Transport Layer Security (TLS) protocol, specifi ed in RFC 2246. TLS is quickly surpassing SSL in popularity. SSL and TLS both support server authentication (mandatory) and client authentication (optional).

Secure Shell (SSH) is another good example of an end-to-end encryption technique.

SSH is a secure replacement for common Internet applications such as FTP and Telnet as well as several Unix R-tools, including rlogin, rcp, rexec, and rshell. There are actually two versions of SSH. SSH1 (which is now considered insecure) supports the DES, 3DES,

IDEA, and Blowfi sh algorithms. SSH2 drops support for DES and IDEA but adds support for several other algorithms.

Because email is natively insecure, several encryption options have been developed to add security to email used over the Internet. Two of the most common solutions are Secure/

Multipurpose Internet Mail Extensions (S/MIME) and Pretty Good Privacy (PGP).

S/MIME is an Internet standard for encrypting and digitally signing email. S/MIME takes the standard MIME element of email, which enables email to carry attachments and higher-order textual information (fonts, color, size, layout, and so on), and expands this to include message encryption. S/MIME uses RSA (an asymmetric encryption scheme) to encrypt and protect email.

S/MIME works by taking the original message from the server, encrypting it, and then attaching it to a new blank email as an attachment. The new blank email includes the sender’s and receiver’s email addresses to control routing of the message to its destination. The receiver must then strip off the attachment and decrypt it in order to extract the original message. When email encryption is used, confi dentiality is protected.

314

Chapter 6

Cryptography

As shown in Figure 6.5, the basic process is as follows:

F I G U R E 6 . 5 The asymmetric-based email encryption process

Sender Transmission

Text Receiver’s

Public Key

@$#&%^&

(*&%#@[email protected]

(*&*%#$(*

Encrypted Receiver’s

Private Key

Receiver

Text

1.

The sender encrypts the message with the recipient’s public key.

2.

The message is sent to the recipient.

3.

The recipient decrypts the message using the recipient’s private key.

The process of encrypting email isn’t complex; however, it’s cumbersome in implementation. Fortunately, an S/MIME add-on package for an email client automates the process.

The only restriction to the S/MIME email solutions is that all communication partners must have compatible S/MIME products installed and use a common or compatible source for their asymmetric encryption key pairs.

Phil Zimmerman’s PGP can also be used to encrypt and digitally sign email messages.

PGP is a public-private key system that uses a variety of encryption algorithms to encrypt fi les and email messages. The fi rst version of PGP used RSA, and the second version used

IDEA, but later versions offered a spectrum of algorithm options. PGP isn’t a standard but rather an independently developed product that has wide Internet grassroots support.

PGP appeared on the computer security scene in 1991. It combines the certifi cate authority (CA) hierarchy described earlier in this chapter with the “web of trust” concept—that is, you must become trusted by one or more PGP users to begin using the system. You then accept their judgment regarding the validity of additional users and, by extension, trust a multilevel “web” of users descending from your initial trust judgments. PGP initially encountered a number of hurdles to widespread use. The most diffi cult obstruction was

U.S. government export regulations, which treated encryption technology as munitions and prohibited the distribution of strong encryption technology outside the United States.

Fortunately, this restriction has since been repealed, and PGP may be freely distributed to most countries.

PGP started off as a free product for all to use, but it has since split into two divergent products. One is available as a commercial product, and the other is a GNU project now known as GNU Privacy Guard (GnuPG or GPG. GnuPG currently supports ElGamal,

DSA, RSA, AES, 3DES, Blowfi sh, Twofi sh, CAST5, MD5, SHA-1, RIPE-MD-160, and

TIGER. If you haven’t used PGP before, we recommend downloading the appropriate

GnuPG version for your preferred email platform. This secure solution is sure to improve your email privacy and integrity. You can learn more about GnuPG at http://gnupg.org

.

You can learn more about PGP by visiting its pages on Wikipedia.

6.1 Given a scenario, utilize general cryptography concepts

315

Non-repudiation

Non-repudiation prevents the sender of a message or the perpetrator of an activity from being able to deny that they sent the message or performed the activity. In asymmetric cryptography, non-repudiation is supported when a sender’s private key is used to successfully decrypt a message. This proves that the sender’s private key was used to encrypt the data.

Because the sender is the only user who has possession of the sender’s private key, no one else could have encrypted and sent the message. Often, the security service of non-repudiation is dependent on authentication and authorization (access control) mechanisms.

Authentication verifi es the identity of the sender or recipient of a message. In cryptography terms, authentication occurs differently in symmetric cryptography than it does in asymmetric cryptography. In symmetric cryptography, a single shared secret key is held only by the two communication partners. Thus, when an encrypted message is received and is properly decrypted by the recipient’s copy of the shared secret key, authentication occurs.

The recipient is authenticated because possession of the correct key proves that this is the correct recipient of the encrypted message. Likewise, the sender is authenticated because the recipient’s ability to extract an intelligible message from the received encrypted material using the secret key proves that the sender, the only other user with possession of the same secret key, encrypted and sent the message.

In asymmetric cryptography, a sender uses the recipient’s public key to encrypt data.

This forces authentication of the recipient because the recipient is the only user in possession of the corresponding private key. Likewise, when the sender’s private key is used to encrypt data, then any recipient can verify the sender’s identity by decrypting that data with the sender’s public key.

Access control restricts access to secured data to authorized users. Cryptographic access control is enforced through the concept of possession of encryption keys. In a symmetric cryptography solution, a maximum of two people have valid possession of the shared secret key. Thus possession of the shared secret key is proof of authorization: The holder of the shared secret key is authorized to access anything encrypted with that key. In asymmetric cryptography, only one person is in valid possession of the private key. Thus, possession of the private key is proof of authorization: The holder of the private key is authorized to access anything encrypted with the corresponding public key.

Hashing

Hashing is a type of cryptography that isn’t an encryption algorithm. Instead, hashing is used to produce a unique identifi er—known as a hash value, hash, checksum, message authentication code (MAC), fi ngerprint, or message digest—of data. Hashing is a one-way function that creates a fi xed-length output from an input of any length. A hash serves as an ID code to detect when the original data source has been altered, because no two data sources produce the same hash. The data could be a fi le, a hard drive, a network traffi c packet, or an email message. The hash value is used to detect when changes have been made to a resource. In other words, hashing is used to detect violations of data integrity.

316

Chapter 6

Cryptography

For example, a hash value computed now may be compared with a hash value created last week. If the two values are the same, the data hasn’t been changed. If the two values are different, the data has been modifi ed. Figure 6.6 shows the basic functionality of a hash or MAC value.

F I G U R E 6 . 6 The MAC value is calculated by the sender and the receiver using the same algorithm.

Message

MAC Value: A

Message MAC Value: A

MAC value is calculated independently by the user.

Message

MAC Value: A

If the MAC values are equal, the message is valid.

Unlike traditional cryptography, which transforms data into ciphertext, hashing produces a hash value without modifying the original data. Because of this special feature, hashing can be used to protect or verify data integrity. It can also be used to verify whether a copy procedure produced an exact duplicate of a data set. For example, when a hard drive is being imaged to create an exact duplicate (as is done in forensic investigations), a hash is produced of the original drive before the duplication process. Then a hash is produced of the original drive and the duplicate drive after the duplication process. If the two hashes of the original drive are the same, no modifi cations have occurred to the original drive. If the duplicate drive’s hash value is the same as the original drive’s hash value, that proves the duplicate is an exact copy of the original.

Hashing takes a variable-length input and produces a fi xed-length output. For example,

Message Digest 5 (MD5) is a 128-bit hash algorithm. This means no matter what the size of the input data, the output hash is always 128 bits long.

The strength of hashing is the fact that it can be performed in only one direction.

It isn’t mathematically possible to convert a hash value back to its original data.

Thus, if someone obtains your hash value, they can’t re-create the original data that produced the hash.

Table 6.2 lists well-known hashing algorithms and their resultant hash value lengths in bits. Bookmark this table for memorization.

6.1 Given a scenario, utilize general cryptography concepts

317

TA B L E 6 . 2 Hash algorithm memorization chart

Name

Secure Hash Algorithm (SHA-1)

SHA-224

SHA-256

SHA-384

SHA-512

Message Digest 5 (MD5)

Message Digest 4 (MD4)

Message Digest 2 (MD2)

RIPEMD

Hash Message Authentication Code (HMAC)

Hash of Variable Length (HAVAL)

— an MD5 variant

256

384

512

128

Hash Value Length

160

224

128

128

160

Variable

128, 160, 192, 224, and 256 bits

According to RSA Security, there are fi ve basic requirements for a cryptographic hash function:

The input can be of any length.

The output has a fixed length.

The hash function is relatively easy to compute for any input.

The hash function is one way (meaning it’s extremely hard to determine the input when provided with the output).

The hash function is collision free (meaning it’s extremely hard to find two messages that produce the same hash value).

However, these requirements don’t mean hashing is totally attack proof. Hashing can be attacked using reverse engineering, reverse hash matching (aka rainbow table attack), or a birthday attack. These attack methods are commonly used by password-cracking tools.

Most secure systems store passwords in their accounts database in hashed form. Hashes can’t be performed in reverse, so this is generally a secure solution. But because the hash algorithm used by commercial software is known (or can be easily discovered), password crackers can be written to exploit the stored password hashes.

318

Chapter 6

Cryptography

Passwords are usually stored in a hashed format due to the security provided by its oneway-ness. However, even though it isn’t possible to reverse the hash process directly, it’s possible to reverse-engineer a hash. Reverse-engineering a hash (aka reverse hash matching) is the idea of taking a potential data set, hashing it, and then comparing it to the hash you wish to crack. By repeating that process until it succeeds or the options are exhausted with different potential data sets (possible passwords), the hacker can reveal (crack) passwords.

This form of hashing attack exploits the mathematical characteristic that if two messages are hashed and their hashes are the same, the messages must be the same. This can be written as

H(M)=H(M') then M=M'

.

Weak passwords are short or are otherwise easy to guess. Weak passwords often allow hackers or unscrupulous employees to obtain access to another person’s logon credentials.

Compromising weak passwords is possible through a wide variety of attacks, including password guessing or cracking.

Password guessing is an attack aimed at discovering the passwords employed by user accounts. Password guessing is often called password cracking. There are several forms of password-guessing attack tools: Some attempt to guess passwords by attacking a logon prompt, others try to extract passwords directly from an accounts database, and still others attempt to capture authentication traffi c and extract passwords out of the network packet.

In most cases, the latter two options employ birthday attack (reverse hash matching) methods to discover the password used by a user account.

There are innumerable password-guessing and cracking tools on the Internet. No matter what tool is used to discover passwords, the most important countermeasure against password crackers is to use long, complex passwords and change them on a regular basis.

Password-cracking tools compare hashes from potential passwords with the hashes stored in the accounts database (obtained or stolen through any number of means).

Potential passwords are either generated on the fl y using all possible combinations of characters or pulled from a precompiled list of passwords (known as dictionary lists). Each potential password is hashed, and that hash value is compared with the accounts database. If a match is found, the password-cracker tool has discovered a password for a user account. Birthday attacks, dictionary attacks, and brute-force attacks, initially described in

Chapter 3 (see “Password attacks”), are prime examples of password-cracking attacks.

A birthday attack is used against hashing and other forms of cryptography involving fi nite sets (of either outputs or keys). The birthday attack gets its name from a bar bet that exploits the mathematical probability of shared birthdays: It takes only 23 people in a room for there to be a greater than 50 percent probability that any two of those people share the same birthday. (The bar bet is that you’ll drink for free if two people in the bar share a birthday; otherwise you’ll buy the house a round of drinks.)

Birthday attacks can be waged against any use of hashing. However, they’re most commonly employed during password-guessing attacks (discussed in the following section).

In a password-guessing attack, a program compares possible passwords with passwords stored in an accounts database. But passwords stored in an accounts database are secured because only their hash values are stored there. Thus, the password-cracking program fi rst performs the same hashing function used by the secured system on each possible password

6.1 Given a scenario, utilize general cryptography concepts

319

before scanning the accounts database for a match. If a match is found, then the passwordguessing tool has discovered a password based on the f(M)=f(M')

property. This is more specifi cally known as reverse hash matching. Generally, any form of password cracking is based on the birthday attack.

A dictionary attack performs password guessing by using a preexisting list of possible passwords. Password lists can include millions of possible passwords. Often, password lists or dictionaries are constructed around topics. Thus, if an attacker knows basic information about you as a person, they can attempt to exploit human nature’s propensity to select passwords using words common or familiar to you. For example, if an attacker knows that you work in the medical industry, you have cats, and you enjoy sailing, they can select password dictionaries that include words, acronyms, and phrases common to those subjects.

Dictionary attacks are surprisingly effective against users who haven’t been trained in the methods and skills of creating complex passwords.

A brute-force attack is designed to try every possible valid combination of characters to construct possible passwords in the attempt to discover the specifi c passwords used by user accounts. Brute-force attacks rarely begin at 0000001 or 000000a but rather take a statistical probability approach to the selection of possible passwords. Most noncomplex passwords under 8 characters long can be discovered in less than 30 minutes.

Longer and more complex passwords make brute-force attacks less successful. However, given enough time, a brute-force attack will always succeed. But with a suffi ciently long target password (15 or more characters), brute-force attacks are rendered impractical. A hybrid attack uses a dictionary list as its password source but uses brute-force techniques to make modifi cations on a progressively increasing level. For example, the fi rst round takes each source password and makes all possible one-character modifi cations, and then the second round makes all possible two-character modifi cations. The hybrid method has the benefi t of focusing on words the target users may have used due to their interests and background while not having to try all possible combinations.

The precomputed hash mechanism takes a different approach to the same problem of reverse-engineering password hashes. Instead of hashing potential passwords as part of the attack itself, a database of potential password hashes is produced beforehand. Then, when a password hash is obtained, the precomputed hash attack simply compares the stolen hash with the database to see if there is a match. If the database was built using the same hashing algorithm, a wide enough character set, and at least as many characters as the original target password, this tactic is very fast and effective.

Key escrow

In a symmetric system, all entities in possession of the shared secret key must protect the privacy and secrecy of that key. If the key is compromised anywhere or by anyone, the entire solution (all entities using the same key) is compromised (everything protected by that key).

In an asymmetric system, each end user must protect their private key. If an end user’s private key is ever compromised, then only that one end user’s security is lost.

320

Chapter 6

Cryptography

Key escrow is a storage process by which copies of private keys and/or secret keys are retained by a centralized management system (see Figure 6.7). This system securely stores the encryption keys as a means of insurance or recovery in the event of a disaster. In terms of cryptography, a disaster is when a key is lost or damaged. If such a key is stored in escrow, it can be recovered by a key-escrow agent and used to recover any data encrypted with the damaged or lost key.

F I G U R E 6 . 7 A key archiving or escrow system

CA Key Archival System

Key Database

However, escrow can be seen in another light if you’re an end user who is intent on obtaining complete and total security. If you’re assigned your private key or secret key, then the issuing CA (or cryptographic server) probably retains a copy of the key in escrow.

This means at any time, a key-recovery agent could pull your key out of escrow and use it to decrypt anything you’ve encrypted with your public key or your secret key without your permission. Obviously, key escrow is great for private corporate environments, but it doesn’t apply well to the public Internet.

Recovery is the process of pulling a key or certifi cate from escrow. Recovery can be used when a user loses their key or their key has been corrupted. This process can also be used to extract a key for the purpose of decrypting data even when the user still has valid possession of their key. The latter option may be necessary in a private corporate environment, but it’s unacceptable in a public environment, such as the Internet.

Key recovery can only be performed by a key-recovery agent. The key-recovery agent is an administrative-level user who has the encryption key to the escrow database. They can decrypt and extract the necessary key from the escrow database and either give a copy to the user or use the key to decrypt all data. If the latter occurs (as is common in most cryptographic solution implementations), the end user must be issued a new key, which must be used in turn to re-encrypt all the data that should be secured.

A key-recovery agent should be a trusted individual. If the environment doesn’t warrant the trust of a single key-recovery agent, a mechanism known as M of N control can be implemented. M of N control indicates that there are multiple key-recovery agents (M) and that a specifi c minimum number of these key-recovery agents (N) must be present and working in tandem in order to extract keys from the escrow database. The use of M of N control ensures accountability among the key-recovery agents and prevents any one individual from having complete control over or access to a cryptographic solution.

6.1 Given a scenario, utilize general cryptography concepts

321

Key management is the term used to describe the various mechanisms, techniques, and processes used to protect, use, distribute, store, and control cryptographic keys. A keymanagement solution should follow these basic rules:

The key should be long enough to provide the necessary level of protection.

Keys should be stored and transmitted securely.

Keys should be truly random, should use the full spectrum of the keyspace (the range of valid values that can be used as a key for a specific algorithm), and should never repeat.

The lifetime of a key should correspond to the sensitivity of the data it’s protecting.

The more a key is used, the shorter its lifetime should be.

The shorter the key length or bit length of the algorithm, the shorter the lifetime of the key.

Keys should be backed up or escrowed in case of emergency.

Keys should be properly destroyed at the end of their lifetime.

Centralized key management gives complete control of cryptographic keys to the organization and takes control away from the end users. A centralized key-management solution requires a signifi cant investment in infrastructure, processing capabilities, administrative oversight, and communication bandwidth.

In a centralized management solution, copies of all or most cryptographic keys are often stored in escrow. This allows administrators to recover keys in the event that a user loses their key, but it also allows management to access encrypted data whenever it chooses.

Other important aspects of centralized key management are that keys must be created only on secured, dedicated servers; keys can be distributed only to authorized users and only in a secure fashion; keys can be modifi ed only by administrators; and revocation of keys and corresponding digital certifi cates is at the discretion of the organization. Figure 6.8 shows an example of a centralized key-management solution.

F I G U R E 6 . 8 A centralized key-generating facility

Key

Transmittal

Process

Key Generator

Centralized key management is often unacceptable to a public or open user community because it doesn’t provide any control over privacy, confi dentiality, or integrity. In fact, every key generated by the centralized system is usually stored in escrow. Therefore,

322

Chapter 6

Cryptography nothing encrypted by an end user is completely private, because an administrator could extract the key from escrow and use it to decrypt a message or fi le.

An alternate scheme is known as decentralized key management. In this type of environment, end users generate their keys (whether symmetric or asymmetric) and submit keys only as needed to centralized authorities (see Figure 6.9). For example, to request a digital certifi cate, an end user would transmit only their public key to the CA. The end user’s private key is always kept private so they’re the only entity in possession of it. Plus, because the public key is already public, its compromise doesn’t result in a complete compromise of the end user’s secured solution.

F I G U R E 6 . 9 A decentralized key-generating system

Key Generation System

Key Generation System Registration

Authority

Certification

Authority

Key Generation System

In a decentralized key-management system, end users are ultimately responsible for managing their own keys and using escrow to provide fault tolerance. If an end user fails to take the necessary precautions, a lost or corrupted key could mean the loss of all data encrypted with that key.

Cryptographic keys and digital certifi cates should be stored securely. If a private key

(asymmetric) or a secret key (symmetric) is ever compromised, then the security of all data encrypted with that key is lost. Reliable storage mechanisms must be used to protect cryptographic keys. There are two methods or mechanisms for storing keys: hardware based or software based.

Keys can be stored in either software solutions or hardware solutions. Both offer unique benefi ts and shortcomings. A software solution offers fl exible storage mechanisms and, often, customizable options. However, such a solution is vulnerable to electronic attacks

(viruses or intrusions), may not properly control access (privilege-elevation attacks), and may be deleted or destroyed. Most software solutions rely on the security of the host operating system, which may not be suffi cient.

6.1 Given a scenario, utilize general cryptography concepts

323

Hardware solutions aren’t as fl exible. However, they’re more reliable and more secure than software solutions. Hardware solutions may be expensive and are subject to physical theft. If a user isn’t in physical possession of the hardware storage solution, they can’t gain access to the secured or encrypted resources. Some common examples of hardware keystorage solutions include smart cards and fl ash memory drives.

In some situations, you may use multiple key pairs. One key set might be used for authentication and encryption and the other for digital signatures. This allows the fi rst key pair to be escrowed and included on data backups of a centralized key-management scheme. The second key set is then protected from compromise, and the privacy of the owner’s digital signature is protected, preventing misuse and forgery.

Steganography

Steganography is a process by which one communication is hidden inside another communication. This can be as simple as hiding a code within a sentence that can be extracted by reading only every fi fth word or as complex as embedding a text document inside a movie or audio fi le. One of the most common forms of steganography is to hide text inside graphics.

Steganography often uses passwords as secrets to prevent third parties from extracting the stored communication and may also employ encryption to prevent or hinder brute-force attempts at extraction. Steganography can be used to detect theft, fraud, or modifi cation when the hidden communication is a watermark.

Digital signatures

A digital signature is an electronic mechanism to prove that a message was sent from a specifi c user (that is, it provides for non-repudiation) and that the message wasn’t changed while in transit (it also provides integrity). Digital signatures operate using a hashing algorithm and either a symmetric or an asymmetric encryption solution.

Digital signatures using asymmetric encryption (specifi cally, public-key cryptography where a key pair of a public key and a private key are used) solutions operate as follows:

1.

The sender writes a message.

2.

The sender computes a hash of the message.

3.

The sender uses the sender’s private key to encrypt the hash.

4.

The sender attaches the encrypted hash to the message.

5.

The complete message package is sent to the receiver.

6.

The receiver strips off the encrypted hash (the digital signature).

7.

The receiver uses the sender’s public key to decrypt the sender’s private key and thus extract the hash from the digital signature.

8.

The receiver computes a hash of the message.

9.

The receiver compares the two hash values.

324

Chapter 6

Cryptography

Digital signatures using symmetric encryption (specifi cally, where a single shared symmetric key is used) solutions (see Figure 6.10) operate as follows:

F I G U R E 6 .1 0 A digital signature process using symmetric encryption

Message xrvz

Message

Message xrvz

Hash on xrvz

Valid Message

A Match

Hash Using Key

Hash of Signature Value

Encrypted by Key

Message xryz

Message Digest

1.

The sender writes a message.

2.

The sender computes a hash of the message.

3.

The sender uses the shared secret key (symmetric key) to encrypt the hash.

4.

The sender attaches the encrypted hash to the message.

5.

The complete message package is sent to the receiver.

6.

The receiver strips off the encrypted hash.

7.

The receiver uses the shared secret key to decrypt the hash.

8.

The receiver computes a hash of the message.

9.

The receiver compares the two hash values.

In either case, if the hash values match, the recipient gets verifi cation that integrity was maintained and that the sender did send the message (non-repudiation). If the hash values don’t match, the recipient doesn’t have verifi cation of either integrity protection or non-repudiation.

Use of proven technologies

In general, when deploying security, it’s in an organization’s interest to use proven and tested technologies. Relying on new technologies, experimental products, or untested

6.1 Given a scenario, utilize general cryptography concepts

325

implementations is often a recipe for security disaster. Your organization should select proven security technologies with a reasonable track record of success. Doing otherwise greatly increases the risks and likelihood of security compromise.

Elliptic curve and quantum cryptography

Elliptic curve cryptography (ECC) is basically cryptographic mathematical magic—or at least that’s the way it seems to most mortals who don’t have a Ph.D. in mathematics.

Basically, it’s a method of applying cryptography in order to obtain stronger encryption from shorter keys. For example, an ECC RSA 160-bit key provides the same protection as an RSA 1,024-bit key. ECC was discussed in a previous section of this chapter in relation to asymmetric algorithms.

Quantum cryptography is a forward-looking concept that has no publicly known current real-world applications or uses. The idea is to take advantage of the dual nature of light at the quantum level where it acts both as a wave and as a particle. At the quantum level, cryptography could be designed so that communication would be completely protected from eavesdropping or tampering, because the act of listening in on such a secured transmission would affect it enough to damage the data stream. This would make it impossible for the attacker to collect the data and would allow the recipient to detect the attempted interception. For more information on the topic of quantum cryptography, please see the related article on Wikipedia.

Ephemeral key

An ephemeral key is a key generated at the time of need for use in a short or temporary timeframe. An ephemeral key might be used only once or could be used for a communication session before being discarded. Most session keys are (or at least should be) ephemeral.

Ephemeral keys are a key element of perfect forward secrecy (see next section). Ephemeral keys are in contrast to static or fi xed keys, which never change. They are also different from shared or preshared keys which are used by a number of entities, whereas ephemeral keys are used uniquely and exclusively by the end points of a single transaction or session.

Perfect forward secrecy

Perfect forward secrecy is a means of ensuring that the compromise of an entity’s digital certifi cates or public/private key pairs doesn’t compromise the security of any session’s keys.

Perfect forward secrecy is implemented by using ephemeral keys for each and every session; these keys are generated at the time of need and used for only a specifi c period of time or volume of data transfer before being discarded and replaced.

Each subsequent rekeying operation in a session is performed independently of any previous keys, so each key is nondependent and nondeterminant of any other key employed by the current session (and absolutely no previous or future sessions). This technique ensures that the compromise of a session key would only result in the disclosure of the subsection of

326

Chapter 6

Cryptography the overall conversation encrypted by that key. All other subsections of the overall conversation would remain confi dential. Perfect forward secrecy also ensures that if the original asymmetric keys are obtained or disclosed, they can’t be used to unlock any prior sessions captured by an eavesdropper or man-in-the-middle attack.

Exam Essentials

Understand the role confidentiality plays in cryptosystems. Confi dentiality is one of the major goals of cryptography. It protects the secrecy of data while it’s at rest and in transit.

Confi dentiality can be assured by both symmetric and asymmetric cryptosystems.

Understand the role integrity plays in cryptosystems. Integrity provides the recipient of a message with the assurance that data wasn’t altered (intentionally or unintentionally) between the time it was created and the time it was accessed. Integrity can be assured by both symmetric and asymmetric cryptosystems.

Understand authentication. In relation to cryptography, authentication is the security service that verifi es the identity of the sender or receiver of a message.

Understand non-repudiation. Non-repudiation prevents the sender of a message or the perpetrator of an activity from being able to deny that they sent the message or performed the activity.

Know how cryptosystems can be used to achieve authentication goals. Authentication provides assurances as to the identity of a user. One possible scheme that uses authentication is the challenge-response protocol, in which the remote user is asked to encrypt a message using a key known only to the communicating parties. Authentication can be achieved with both symmetric and asymmetric cryptosystems.

Be familiar with the basic terminology of cryptography. When a sender wants to transmit a private message to a recipient, the sender takes the plaintext (unencrypted) message and encrypts it using an algorithm and a key. This produces a ciphertext message that is transmitted to the recipient. The recipient then uses a similar algorithm and key to decrypt the ciphertext and re-create the original plaintext message for viewing.

Understand symmetric cryptography. Symmetric cryptography is also called private-key cryptography or secret-key cryptography. Symmetric cryptography uses a single shared encryption key to encrypt and decrypt data. It provides the security service with confi dentiality protection.

Understand session keys. Session keys are encryption keys used for a communications session. Typically, session keys are randomly selected (or generated) and then used for only one session.

Understand in-band vs. out-of-band key exchange. In-band key exchange takes place in the existing and established communication channel or pathway. Out-of-band key exchange takes place outside of the current communication channel or pathway, such as through a

6.1 Given a scenario, utilize general cryptography concepts

327

secondary channel, via a special secured exchange technique in the channel, or with a complete separate pathway technology.

Know the strengths and weaknesses of symmetric cryptography. Symmetric cryptography is very fast when compared to asymmetric cryptography. It provides for strong encryption protection when larger keys are used. However, the protection is secure only as long as the keys are kept private. Key exchange under symmetric cryptography is a common problem.

Symmetric cryptography isn’t scalable when used alone.

Understand block ciphers. A block cipher is a solution that works against a complete static data set. That data set is broken into fi xed-length segments called blocks, and each block is encrypted separately.

Understand stream ciphers. A stream cipher is a solution that works against data that is constantly being produced on the fl y. Stream ciphers can operate on a bit, character, or buffer basis of encrypting data in real time. A buffer, much like a block, waits to be fi lled by data as it’s produced. When the buffer block is full, that block is encrypted and then transmitted to the receiver.

Know common symmetric cryptography solutions. The common symmetric solutions are Advanced Encryption Standard (AES), Triple Data Encryption Standard (3DES), Data

Encryption Standard (DES), International Data Encryption Algorithm (IDEA), Blowfi sh,

Twofi sh, Rivest Cipher 5 (RC5), and Carlisle Adams/Stafford Tavares (CAST-128).

Know the Advanced Encryption Standard (AES). The Advanced Encryption Standard

(AES) utilizes the Rijndael algorithm and is the U.S. government standard for the secure exchange of sensitive but unclassifi ed data. AES uses key lengths and block sizes of 128,

192, and 256 bits to achieve a much higher level of security than that provided by the older

DES algorithm.

Understand asymmetric cryptography. Asymmetric cryptography is also called public-key cryptography. It uses key pairs consisting of a public key and a private key. Each communication partner in an asymmetric cryptography solution needs only a key pair.

Know the strengths and weaknesses of asymmetric cryptography. Asymmetric cryptography is scalable. The private key of the key pair must be kept private and secure. The public key of the key pair is distributed freely and openly. Possession of the public key doesn’t allow someone to generate the private key. Asymmetric cryptography is much slower than symmetric cryptography. It provides three security services: authentication, integrity protection, and non-repudiation.

Be familiar with the three major public-key cryptosystems. RSA is the most famous public-key cryptosystem; it was developed by Rivest, Shamir, and Adleman in 1977. It depends on the diffi culty of factoring the product of prime numbers. ElGamal is an extension of the Diffi e-Hellman key-exchange algorithm that depends on modular arithmetic.

The elliptic curve algorithm depends on the elliptic curve discrete logarithm problem and provides more security than other algorithms when both are used with keys of the same length.

328

Chapter 6

Cryptography

Know the differences between symmetric and asymmetric cryptosystems. Symmetric-key cryptosystems (or secret-key cryptosystems) rely on the use of a shared secret key. They’re much faster than asymmetric algorithms, but they lack support for scalability, easy key distribution, and non-repudiation. Asymmetric cryptosystems use public-private key pairs for communication between parties but operate much more slowly than symmetric algorithms.

Understand VPNs. A virtual private network (VPN) is a communication tunnel between two entities across an intermediary network. In most cases, the intermediary network is an untrusted network, such as the Internet, and therefore the communication tunnel is also encrypted.

Know VPN protocols. PPTP, L2TP, and IPsec are VPN protocols.

Understand PPTP. Point-to-Point Tunneling Protocol (PPTP) is based on PPP, is limited to IP traffi c, and uses TCP port 1723. PPTP supports PAP, SPAP, CHAP, EAP, and

MS-CHAP v.1 and v.2.

Understand L2TP. Layer Two Tunneling Protocol (L2TP) is based on PPTP and L2F, supports any LAN protocol, uses UDP port 1701, and often uses IPsec for encryption.

Understand IPsec. IPsec is a security architecture framework that supports secure communication over IP. IPsec establishes a secure channel in either transport mode or tunnel mode. It can be used to establish direct communication between computers or to set up a VPN between networks. IPsec uses two protocols: Authentication Header (AH) and

Encapsulating Security Payload (ESP).

Know the common applications of cryptography to secure web activity. The de facto standard for secure web traffi c is the use of HTTP over Secure Sockets Layer (SSL), otherwise known as HTTPS. Secure HTTP (S-HTTP) also plays an important role in protecting individual messages. Most web browsers support both standards.

Know the common applications of cryptography to secure electronic mail. The emerging standard for encrypted messages is the Secure/Multipurpose Internet Mail Extensions (S/

MIME) protocol. The other popular email security protocol is Phil Zimmerman’s Pretty

Good Privacy (PGP).

Understand the importance of providing non-repudiation capability in cryptosys-

tems. Non-repudiation provides undeniable proof that the sender of a message actually authored it. It prevents the sender from subsequently denying that they sent the original message. Non-repudiation is possible only with asymmetric cryptosystems.

Understand hashing. Hashing is used to produce a unique data identifi er. Hashing takes a variable-length input and produces a fi xed-length output. It can be performed in only one direction. The hash value is used to detect violations of data integrity.

Understand hashing attacks. Hashing can be attacked using reverse engineering, reverse hash matching, or a birthday attack. These attack methods are commonly used by password-cracking tools.

Know common hash algorithms. The common hash algorithms are Secure Hash

Algorithm (SHA-1), which is a 160-bit hash value; Message Digest 5 (MD5), which is a

6.1 Given a scenario, utilize general cryptography concepts

329

128-bit hash value; Message Digest 4 (MD4), which is a 128-bit hash value; and Message

Digest 2 (MD2), which is a 128-bit hash value.

Understand password guessing. Password guessing is an attack aimed at discovering the passwords employed by user accounts. It’s often called password cracking. There are two primary categories of password-guessing tools based on the method used to select possible passwords for a direct logon prompt or birthday attack procedure: brute force and dictionary.

Understand password crackers. A password cracker is a tool used to reverse-engineer the secured storage of passwords in order to gain (or regain) access to an unknown or forgotten password. There are four well-known types of password-cracking techniques: dictionary, brute force, hybrid, and precomputed hash.

Understand birthday attacks. The birthday attack exploits a mathematical property that if the same mathematical function is performed on two values and the result is the same, then the original values are the same. This concept is often represented with the syntax f(M)=f(M') then M=M'

.

Know how brute-force and dictionary attacks work. Brute-force and dictionary attacks are carried out against a password database fi le or the logon prompt of a system. They’re designed to discover passwords. In brute-force attacks, all possible combinations of keyboard characters are used, whereas a predefi ned list of possible passwords is used in a dictionary attack.

Understand key escrow. Key escrow is a storage process in which copies of private keys and/or secret keys are retained by a centralized management system. This system securely stores the encryption keys as a means of insurance or recovery in the event of a lost or corrupted key.

Know key-management basics. Keys should be long enough to provide the necessary level of protection, should be stored and transmitted securely, should be random, and should use the full spectrum of the keyspace. In addition, they should be escrowed, be properly destroyed at the end of their lifetime, be used in correspondence with the sensitivity of the protected data, and have a shortened use lifespan if they’re used repeatedly.

Understand centralized key management. Centralized key management gives complete control of cryptographic keys to the organization and takes control away from the end users. In a centralized management solution, copies of all cryptographic keys are stored in escrow.

Understand decentralized key management. In decentralized key management, end users generate their keys (whether symmetric or asymmetric) and submit keys only as needed to centralized authorities. The end user’s private key is always kept private, so they’re the only entity in possession of it.

Understand key storage. Cryptographic keys and digital certifi cates should be stored securely. If a private key (asymmetric) or a secret key (symmetric) is ever compromised, then the security of all data encrypted with the key is lost.

330

Chapter 6

Cryptography

Understand M of N control. If the environment doesn’t warrant the trust of a single key-recovery agent, a mechanism known as M of N control can be implemented. M of N control indicates that there are multiple key-recovery agents (M) and that a specifi c minimum number of these key-recovery agents (N) must be present and working in tandem in order to extract keys from the escrow database.

Understand software key storage. A software solution offers fl exible storage mechanisms and, often, customizable options. However, a software solution is vulnerable to electronic attacks (viruses or intrusions), may not properly control access (privilege-elevation attacks), and may be deleted or destroyed. Most software solutions rely on the security of the host

OS, which may not be suffi cient.

Understand hardware key storage. Hardware solutions aren’t as fl exible as software solutions; however, they’re more reliable and more secure. Hardware solutions may be expensive and are subject to physical theft. If a user isn’t in physical possession of the hardware storage solution, they can’t gain access to the secured or encrypted resources.

Some common examples of hardware key storage solutions include smart cards and fl ash memory drives.

Understand private-key protection. In a symmetric system, all entities in possession of the shared secret key must protect the privacy and secrecy of that key. If the key is compromised anywhere or by anyone, the entire solution (all entities using the same key) is compromised (everything protected by that key).

Understand the use of multiple key pairs. In some situations, you may use multiple key pairs. One key set might be used for authentication and encryption and the other for digital signatures. This allows the fi rst key pair to be escrowed and included on data backups of a centralized key-management scheme. The second key set is then protected from compromise, and the privacy of the owner’s digital signature is protected, preventing misuse and forgery.

Understand steganography. Steganography is a process by which one communication is hidden inside another communication.

Understand digital signatures. A digital signature is an electronic mechanism used to prove that a message was sent from a specifi c user and that the message wasn’t changed while in transit. Digital signatures operate using a hashing algorithm and either a symmetric or an asymmetric encryption solution.

Understand ephemeral keys. An ephemeral key is a key generated at the time of need for use in a short or temporary time frame. An ephemeral key might be used only once or could be used for a communication session before being discarded. Most session keys are

(or at least should be) ephemeral.

Understand perfect forward secrecy. Perfect forward secrecy is a means of ensuring that the compromise of an entity’s digital certifi cates or public/private key pairs don’t compromise the security of any session’s keys. Perfect forward secrecy is implemented by using ephemeral keys for each and every session; these keys are generated at the time of need and

6.2 Given a scenario, use appropriate cryptographic methods

331

used for only a specifi c period of time or volume of data transfer before being discarded and replaced.

6.2 Given a scenario, use appropriate cryptographic methods

Once you understand the basics of cryptography, the next step is applying and using cryptography in real-world environments. This section discusses how to use and apply appropriate cryptographic tools and products.

WEP vs. WPA/WPA2 and preshared key

In the wireless world, only three encryption methods are commonly known. Wired

Equivalent Privacy (WEP) was the original wireless encryption standard until the early

2000s, when it was deprecated and replaced by WiFi Protected Access (WPA). WPA2 is currently the best WiFi encryption standard publicly available. WPA2 offers both Personal and Enterprise options and employs the AES protocol for confi dentiality.

Due to the weakness of WEP and the relative ease by which WPA can be cracked, only

WPA-2 should be used for securing wireless networks. In practical terms, generally avoid any open or WEP-encrypted wireless network. Be cautious and use WPA networks with reservation and only for short periods of time (less than one hour). When you’re responsible for a wireless network, always elect to enforce WPA 2 encryption to provide the best possible standards-based security over private wireless networks.

A preshared key (PSK) is exactly what is sounds like. Two separate parties share a key via an out-of-band communication method prior to communication. This was part of the problem with WEP, because the same value used for encryption was also used for authentication.

Under WEP, this is known as shared-key authentication (SKA) and everyone connecting to the same wireless network used the same value. The PSK under WPA and WPA2 is still a fi xed value for all users of a wireless network, but it can be defi ned as a much stronger password/passphrase than the PSK of WEP, and the PSK isn’t involved in the key assignment for wireless encryption.

MD5

The Message Digest 2 (MD2) hash algorithm was developed by Ronald Rivest (the same

Rivest of Rivest, Shamir, and Adleman fame) in 1989 to provide a secure hash function for

8-bit processors. MD2 pads the message so that its length is a multiple of 16 bytes. It then computes a 16-byte checksum and appends it to the end of the message. A 128-bit message digest is then generated by using the entire original message along with the appended checksum.

332

Chapter 6

Cryptography

Cryptanalytic attacks exist against the MD2 algorithm. Specifi cally, Nathalie Rogier and Pascal Chauvaud discovered that if the checksum isn’t appended to the message before digest computation, collisions may occur. Frederic Mueller later proved that MD2 isn’t a one-way function. Therefore, it should no longer be used.

In 1990, Rivest enhanced his message digest algorithm to support 32-bit processors and increase the level of security. This enhanced algorithm is known as MD4. It fi rst pads the message to ensure that the message length is 64 bits smaller than a multiple of 512 bits. For example, a 16-bit message would be padded with 432 additional bits of data to make it 448 bits, which is 64 bits smaller than a 512-bit message.

The MD4 algorithm then processes 512-bit blocks of the message in three rounds of computation. The fi nal output is a 128-bit message digest.

Several mathematicians have published papers documenting fl aws in the full version of

MD4 as well as improperly implemented versions of MD4. In particular, Hans Dobbertin published a paper in 1996 outlining how a modern PC could be used to fi nd collisions for

MD4 message digests in less than one minute. For this reason, MD4 is no longer considered to be a secure hashing algorithm, and its use should be avoided if at all possible.

In 1991, Rivest released the next version of his message digest algorithm, which he called MD5. It also processes 512-bit blocks of the message, but it uses four distinct rounds of computation to produce a digest of the same length as the MD2 and MD4 algorithms

(128 bits). MD5 has the same padding requirements as MD4—the message length must be

64 bits less than a multiple of 512 bits.

MD5 implements additional security features that reduce the speed of message digest production signifi cantly. Unfortunately, recent cryptanalytic attacks demonstrated that the

MD5 protocol is subject to collisions, making it not a one-way function. Specifi cally, Arjen

Lenstra and others demonstrated in 2005 that it’s possible to create two digital certifi cates from different public keys that have the same MD5 hash.

MD5 is likely the most widely used hashing algorithm in the world today and will remain so for at least several more years. This is due to the fact that MD5 is coded into operating systems and popular software products. Only when OSs and common software tools shift to SHA-1 or another more advanced hashing system will MD5 use decline.

MD5 is generally regarded as suffi cient for most situations. Unlike weak encryption, older hashing systems aren’t as much of a risk. They have an increased possibility of collision, where weak encryption schemes have an increased chance of having confi dentiality violated. A greater chance of collisions only means it’s slightly less likely that two data sets will produce the same hash value. This doesn’t inherently mean you would be fooled by the counterfeit data set; instead it means the mathematical possibility of a collision being discovered or crafted is greater.

If you’re given a choice of a better hashing algorithm, such as SHA-1, then take it.

SHA

The Secure Hash Algorithm (SHA) and its successor, SHA-1, are government standard hash functions developed by the National Institute of Standards and Technology (NIST) and are specifi ed in an offi cial government publication—the Secure Hash Standard (SHS), also known as Federal Information Processing Standard (FIPS) 180.

6.2 Given a scenario, use appropriate cryptographic methods

333

SHA-1 takes an input of virtually any length (in reality, there is an upper bound of approximately 2,097,152 terabytes on the algorithm) and produces a 160-bit message digest. The SHA-1 algorithm processes a message in 512-bit blocks. Therefore, if the message length isn’t a multiple of 512, the SHA algorithm pads the message with additional data until the length reaches the next highest multiple of 512. Recent cryptanalytic attacks demonstrated that there are weaknesses in the SHA-1 algorithm. This led to the creation of

SHA-2, which has four variants:

SHA-224 produces a 224-bit message digest using a 512-bit block size.

SHA-256 produces a 256-bit message digest using a 512-bit block size.

SHA-512 produces a 512-bit message digest using a 1,024-bit block size.

SHA-384 uses a truncated version of the SHA-512 hash to produce a 384-bit digest using a 1,024-bit block size.

Although it might seem trivial, take the time to memorize the size of the message digest lengths produced by each one of the hash algorithms described in this chapter.

The cryptographic community generally considers the SHA-2 algorithms secure, but they theoretically suffer from the same weakness as the SHA-1 algorithm. In 2012, SHA-3 was formalized. For information on SHA-3, visit www.nist.gov/itl/csd/sha-100212.cfm

or https://en.wikipedia.org/wiki/SHA-3

.

SHA is slowly being integrated into software products. When SHA is offered, it’s a better choice than MD5 or other older hashing algorithms. If you’re a programmer developing code that uses or needs hashing, you should select SHA hashing over other options.

RIPEMD

RIPEMD-160 is a 160-bit hashing algorithm that is a derivative of RACE Integrity

Primitives Evaluation Message Digest (RIPEMD), which was itself a variant of MD4.

RIPEMD-160 was developed as an alternative to SHA-1, but it hasn’t gained wide popularity and thus isn’t widely implemented. Use of RIPEMD should generally be avoided when possible; SHA is a much better alternative.

AES

In October 2000, NIST announced that the AES/Rijndael (pronounced “rhine-doll”) block cipher had been chosen as the replacement for DES. In December of that same year, the

U.S. Secretary of Commerce approved FIPS 197, which mandated the use of AES/Rijndael for the encryption of all sensitive but unclassifi ed data by the U.S. government.

The original specifi cation for Advanced Encryption Standard (AES) called for the processing of 128-bit blocks, but Rijndael exceeded this specifi cation, allowing cryptographers

334

Chapter 6

Cryptography to use a block size equal to any of three key lengths. The number of encryption rounds depends on the key length chosen:

128-bit keys require 10 rounds of encryption.

192-bit keys require 12 rounds of encryption.

256-bit keys require 14 rounds of encryption.

The other AES finalists were Twofish, Multivariate Adaptive Regression

Splines (MARS), and Serpent.

As of early 2014, AES is uncracked and has no known weaknesses or fl aws in its algorithm. It’s considered one of the best encryption solutions currently available and should be the go-to solution for most users and organizations. In most cases, selecting AES above other options is the best choice in terms of providing long-term, reliable confi dentiality protection for your data, whether in transit or in storage.

DES

The U.S. government published the Data Encryption Standard (DES) in 1977 as a proposed standard cryptosystem for all government communications. Many government entities continue to use DES for cryptographic applications today, even though it was superseded by

AES in December 2001. DES is a 64-bit block cipher that has fi ve modes of operation:

Electronic Codebook (ECB) mode

Cipher Block Chaining (CBC) mode

Cipher Feedback (CFB) mode

Output Feedback (OFB) mode

Counter (CTR) mode

All the DES modes operate on 64 bits of plain text at a time to generate 64-bit blocks of ciphertext. The key used by DES is 56 bits long. The modes of DES aren’t relevant for the

Security+ exam, so visit the DES Wikipedia article if you want to know more about them.

DES utilizes a long series of exclusive OR (XOR) operations to generate the ciphertext.

This process is repeated 16 times for each encryption/decryption operation. Each repetition is commonly referred to as a round of encryption, explaining the statement that DES performs 16 rounds of encryption.

As mentioned, DES uses a 56-bit key to drive the encryption and decryption process. However, you may read in some literature that DES uses a

64-bit key. This isn’t an inconsistency—there’s a perfectly logical explanation. The DES specification calls for a 64-bit key. But of those 64 bits, only

56 actually contain keying information. The remaining 8 bits are supposed to contain parity information to ensure that the other 56 bits are accurate.

In practice, though, those parity bits are rarely used. You should commit only the 56-bit figure to memory.

6.2 Given a scenario, use appropriate cryptographic methods

335

DES is now easily cracked, through either brute-force or precomputed hash techniques, in a matter of minutes. Whenever possible, any other encryption algorithm alternative is preferable to DES. If the software you’re using only supports DES, you should seek out an alternative solution; DES isn’t providing you with meaningful security.

3DES

As just mentioned, the DES 56-bit key is no longer considered adequate in the face of modern cryptanalytic techniques and supercomputing power. However, an adapted version of DES, Triple DES (3DES), uses the same algorithm to produce a more secure encryption.

There are four versions of 3DES. The fi rst simply encrypts the plain text three times, using three different keys: K

1

, K

2

, and K

3

. It’s known as DES-EEE3 mode (the Es indicate that there are three encryption operations, whereas the numeral 3 indicates that three different keys are used). DES-EEE3 can be expressed using the following notation, where

E(K,P)

represents the encryption of plaintext P with key K:

E (K

1

,E(K

2

,E(K

3

,P)))

DES-EEE3 has an effective key length of 168 bits.

The second variant (DES-EDE3) also uses three keys but replaces the second encryption operation with a decryption operation:

E(K

1

,D(K

2

,E(K

3

,P)))

The third version of 3DES (DES-EEE2) uses only two keys, K

1

and K

2

, as follows:

E(K

1

,E(K

2

,E(K

1

,P)))

The fourth variant of 3DES (DES-EDE2) also uses two keys but uses a decryption operation in the middle:

E(K

1

,D(K

2

,E(K

1

,P)))

Both the third and fourth variants have an effective key length of 112 bits.

Technically, there is a fifth variant of 3DES, DES-EDE1, which uses only one cryptographic key. However, it results in the same algorithm (and strength) as standard DES and is provided only for backward-compatibility purposes.

These four variants of 3DES were developed over the years because several cryptologists put forth theories that one variant was more secure than the others. But the current belief is that all modes are equally secure or relatively insecure. 3DES was a useful product in the late 1990s and early 2000s before AES because widely available. However, 3DES only withstands cracking attempts about three times as long as DES, and thus it no longer provides adequate security for most uses and applications. 3DES should be replaced with AES whenever possible.

336

Chapter 6

Cryptography

HMAC

The Hash-based Message Authentication Code (HMAC) algorithm implements a partial digital signature—it guarantees the integrity of a message during transmission, but it doesn’t provide for non-repudiation.

HMAC can be combined with any standard message-digest-generation algorithm, such as SHA-2, by using a shared secret key. Therefore, only communicating parties who know the key can generate or verify the digital signature. If the recipient decrypts the message digest but can’t successfully compare it to a message digest generated from the plaintext message, the message was altered in transit.

Because HMAC relies on a shared secret key, it doesn’t provide any non-repudiation functionality (as previously mentioned). However, it may be suitable for applications in which symmetric-key cryptography is appropriate. In short, it represents a halfway point between unencrypted use of a message-digest algorithm and computationally expensive digital-signature algorithms based on public-key cryptography.

HMAC isn’t usually a hashing option that is presented to an administrator or even an end user. Instead, specifi c cryptographic solutions are designed and programmed to take advantage of HMAC. For example, IPsec uses HMAC to reduce the possibility of data collision to a near impossibility.

RSA

RSA, or Rivest, Shamir, and Adleman, encryption was addressed in the “Symmetric vs. asymmetric” section earlier in this chapter, but recall that it’s a form of public-key cryptography. RSA is still a reliable and secure hashing algorithm, even over 35 years after its initial design in the late 1970s. The only difference between original RSA and modern RSA implementations is the length of the public and private keys. RSA continues to maintain its reliability, security, and speed today, and is a go-to solution for use in any environment that requires public-key cryptography for storage or transmission.

Diffie-Hellman

Diffi e-Hellman key exchange (D-H) is a means of securely generating symmetric encryption keys across an insecure medium. See the earlier section “Symmetric vs. asymmetric.”

RC4

Rivest Cipher 4 (RC4) is a 128-bit stream cipher. It’s the foundation of the WEP and WPA encryption used for wireless networking. Please see the discussion of WPA and WEP earlier in this chapter. RC4 is still a reliable encryption scheme that could be used today; however, subsequent versions, including RC5 and RC6, are better products and should be selected when available.

6.2 Given a scenario, use appropriate cryptographic methods

337

One-time pads

A one-time pad is the basis of many forms of modern cryptography from SSL to IPsec to dynamic one-time password tokens. The concept is that a real or virtual paper pad contains codes or keys on each page that are random and don’t repeat. Each page of the pad (each key or code) can be used once for a single operation, and then it’s discarded—never to be reused or be valid again. This concept defi nes the most secure form of encryption possible. However, because computers can’t create true random numbers, we’re using pseudo-one-time pad systems, which are very good, just not perfect.

NTLM

New Technology LAN Manager (NTLM) is a password hash storage system used on

Microsoft Windows. NTLM exists in two versions. NTLMv1 is a challenge-response protocol system that, using a server-issued random challenge along with the user’s password (in both LM hash and MD4 hash), produces two responses that are sent back to the server (this is assuming a password with 14 or fewer characters; otherwise only an MD4 hash-based response is generated). NTLMv2 is also a challenge-response protocol system, but it uses a much more complex process that is based on MD5. Both versions of NTLM produce a hash-like result that is nonreversible and thus much more secure than LM hashing. However, reverse-engineering password-cracking mechanisms can ultimately reveal

NTLMv1 or v2 stored passwords if the passwords are relatively short (under 15 characters) and the hacker is given enough processing power and time.

LANMAN, or what is typically referred to as LM or LAN Manager, is a legacy storage mechanism developed by Microsoft to store passwords. LM was replaced by NTLM on

Windows NT 4.0 and should be disabled (usually left disabled) and avoided on all current versions of Windows.

One of the most signifi cant issues with LM is that it limited passwords to a maximum of 14 characters. Shorter passwords were padded out to 14 characters using null characters. The 14 characters of the password were converted to uppercase and then divided into two 7-character sections. Each 7-character section was then used as a DES encryption key to encrypt the static ASCII string “[email protected]#$%”. The two results were recombined to form the LM hash. Obviously, this system is fraught with problems. Specifi cally, the process is reversible and not truly a one-way hash, and all passwords are ultimately no stronger than seven characters.

As a user, you can completely avoid LM by using passwords of at least 15 characters. LM has been disabled by default on all versions of Windows since Windows 2000.

However, this disabling only addresses the initial request for and the default transmission of LM for the authentication process. The Security Accounts Manager (SAM) still contains an LM equivalent of all passwords with 14 or fewer characters through Windows Vista, at least by default. Settings are available in the Registry and Group Policy Objects to turn on this backward-compatibility feature. Only Windows 7 and Windows Server 2008 don’t

338

Chapter 6

Cryptography support LM in any way by default. But Registry changes can re-enable LM support for backward compatibility.

You should leave LM disabled and disable it when it isn’t. If you need LM to support a legacy system, you should fi nd a way to upgrade the legacy system rather than continue to use LM. The use of LM is practically equivalent to using only plain text.

NTLMv2

NTLMv2 is the second version of New Technology LAN Manager (NTLM). See the previous section.

Blowfish

Bruce Schneier’s Blowfi sh block cipher is another alternative to DES and IDEA. Like its predecessors, Blowfi sh operates on 64-bit blocks of text. However, it extends IDEA’s key strength even further by allowing the use of variable-length keys ranging from a relatively insecure 32 bits to an extremely strong 448 bits. Obviously, the longer keys result in a corresponding increase in encryption/decryption time. But time trials have established Blowfi sh as a much faster algorithm than both IDEA and DES. Also, Mr. Schneier released Blowfi sh for public use with no license required.

Blowfi sh encryption is built into a number of commercial software products and OSs.

There are also a number of Blowfi sh libraries available for software developers. Blowfi sh can be an acceptable option for encryption, but only when you’re using key lengths of at least 128 bits.

PGP/GPG

PGP and GPG are email security products. See the discussions of PGP and GPG earlier in this chapter, in the section “Transport encryption.”

Twofish

The Twofi sh algorithm developed by Bruce Schneier (also the creator of Blowfi sh) was another of the AES fi nalists. Like Rijndael, Twofi sh is a block cipher. It operates on 128-bit blocks of data and is capable of using cryptographic keys up to 256 bits in length. If Twofi sh is an available option in a software product, it’s almost the equivalent of AES and thus a secure solution.

DHE

Diffi e-Hellman key exchange (D-H) is a means of securely generating symmetric encryption keys across an insecure medium (as discussed earlier in this chapter). Diffi e-Hellman

Ephemeral (DHE, aka Ephemeral Diffi e-Hellman [EDH]) is a variation of D-H that is used

6.2 Given a scenario, use appropriate cryptographic methods

339

by TLS to implement perfect forward secrecy by performing multiple rekey operations in a session. This ensures that no session is protected by a single symmetric key, and compromise of any of a session’s ephemeral keys doesn’t assist with the compromise of the other ephemeral keys used during the session.

ECDHE

Elliptic Curve Diffi e-Hellman Ephemeral, or Elliptic Curve Ephemeral Diffi e-Hellman

(ECDHE), implements perfect forward secrecy through the use of elliptic curve cryptography

(ECC). ECC has the potential to provide greater security with less computational burden than that of DHE.

CHAP

Challenge-Handshake Authentication Protocol (CHAP) is an authentication protocol used primarily over dial-up connections (usually Point-to-Point Protocol [PPP]) as a means to provide a secure transport mechanism for logon credentials. It was developed as a secure alternative and replacement for PAP, which transmitted authentication credentials in cleartext.

CHAP uses an initial authentication-protection process to support logon and an ongoing verifi cation process to ensure that the subject/client is still who they claim to be. The process is as follows:

1.

The initial authentication process performs a one-way hash function (specifically,

MD5) on the subject’s password and then passes the username and hash value to the authentication server.

2.

The authentication server compares the username to its accounts database and the hash value to that stored for the identified user in its database.

3.

If there is a match, the server transmits a challenge to the client.

4.

The client produces the correct response and transmits it back to the server.

5.

The server computes the response.

6.

The server compares the response to that received by the client.

7.

If everything matches, the subject is authenticated and allowed to communicate over the link.

Figure 6.11 shows the CHAP authentication process.

Once the client is authenticated, CHAP periodically sends a challenge to the client at random intervals. The client must compute the correct response to the issued challenge; otherwise the connection is automatically severed. This post-authentication verifi cation process ensures that the authenticated session hasn’t been hijacked.

Whenever a CHAP or CHAP-like authentication system is supported, use it. The only other authentication option that is more secure than CHAP is mutual certifi cate–based authentication.

340

Chapter 6

Cryptography

F I G U R E 6 .11 CHAP authentication

Logon Request

1

Challenge

Client

2

3

Encrypts value

4

Response

Encrypts value

5

6

Server

Authorize or fail

Compare encrypted results

7

PAP

Password Authentication Protocol (PAP) was an early plain old telephone service

(POTS) authentication mechanism. PAP is mostly unused today, because it was superseded by CHAP and numerous EAP add-ons. Don’t use PAP—it transmits all credentials in plaintext.

Comparative strengths and performance of algorithms

The comparative strengths of algorithms are based on numerous factors. The two most common are key length and work factor. Key length is addressed in the “Key escrow” section earlier in this chapter. Work factor is a judgment or measurement of the amount of time and effort involved in performing a complete brute-force attack on a specifi c algorithm.

Algorithms with larger work factors are considered stronger than those with smaller work factors. Although there really isn’t a hard measurement guideline, it’s used as a relative measurement between compared algorithms and is based around the keyspace, the speed and number of computers used, as well as the approach of the attack itself.

Use of algorithms/protocols with transport encryption

Following are encryption options for network communications or data transport. Refer to the algorithm discussions earlier in this chapter, in section 6.1, subsection “Transport encryption,” for more information on each.

6.2 Given a scenario, use appropriate cryptographic methods

341

SSL

Secure Socket Layer (SSL) is primarily used for secure online transactions such as online shopping or banking. SSL 1.0 was originally created by Netscape (the company that created the popular Netscape browser) and released in 1995. Netscape then released the source code for SSL version 2.0. SSL is at version 3.0 and is still in use today, but its use is declining.

Although SSL is an industry standard, public desire for a completely open-source alternative fi nally found fruition in TLS, discussed next.

TLS

Transport Layer Security (TLS) performs a similar function to SSL. Both are used for secure connections over the Internet. They are so similar that TLS was created to be backward compatible with SSL, and newer TLS releases are often referred to as SSL versions;

TLS 1.0 is referred to as SSL 3.1, TLS 1.1 is referred to as SSL 3.2, and so forth.

IPsec

Internet Protocol Security (IPsec) pretty much does exactly what it says: It provides security for the Internet Protocol (IP). It does this via its open framework and can provide both authentication and confi dentiality. From an application perspective, IPsec is used for a secure point-to-point link across an insecure network such as the Internet. For instance, a company may use an IPsec connection for secure communication between two remote branches or offi ces.

SSH

Secure Shell (SSH) is a replacement for Telnet and many of the Unix r tools. Where Telnet provides remote access to a system at the expense of plaintext communication, SSH transmissions are ciphertext and thus are protected from eavesdropping. SSH is the protocol most frequently used with a terminal editor program such as HyperTerminal in Windows,

Minicom on Linux, or PuTTY on both. An example of SSH use would involve remotely connecting to a switch or router in order to make confi guration changes.

HTTPS

HTTPS is a secure form of the ever-popular HTTP. The S stands for secure. HTTPS provides the secure means for web-based transactions by utilizing various other protocols such as SSL and TLS. It should not be confused with S-HTTP. HTTPS relies on SSL and/or TLS for the security aspect of the communication, without which you would have plaintext communication in the form of HTTP. It uses port 443 for communication and is the de facto standard for online transactions. Normally you can verify an HTTPS communication by the little lock in the bottom-right corner of a browser window.

Cipher suites

A cipher suite is a standardized collection of authentication, encryption, and hashing algorithms used to defi ne the parameters for a security network communication. Most often the

342

Chapter 6

Cryptography term cipher suite is used in relation to SSL/TLS connections. An offi cial TLS Cipher Suite

Registry is maintained by the International Assigned Numbers Authority (IANA) at www

.iana.org/assignments/tls-parameters/tls-parameters.xhtml

.

A cipher suite consists of and is named by four elements (for example,

TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384):

A key-exchange mechanism (TLS_ECDHE)

An authentication mechanism (RSA)

A cipher (AES_256_GCM)

A hashing or message-authenticating code (MAC) mechanism (SHA384)

A client requesting a TLS session sends a preference-ordered list of client-side supported cipher suites as part of the initiation handshake process. The server replies and negotiates with the client based on the highest-preference cipher suite they have in common.

Strong vs. weak ciphers

Not all ciphers or other algorithm elements in a cipher suite are secure. Many older algorithms or implementations of algorithms have known fl aws, weaknesses, or means of compromise. These weaker ciphers should be avoided and disabled in preference of stronger cipher suites with no or fewer issues. A cipher’s age isn’t necessarily an indication of strength or weakness. For a discussion about weak ciphers, cipher suite attacks, and

Google’s recommendations for the future, read “A roster of TLS cipher suites weaknesses” at http://googleonlinesecurity.blogspot.com/2013/11/a-roster-of-tls-ciphersuites-weaknesses.html

.

Key stretching

Key stretching is a collection of techniques that can potentially take a weak key or password and stretch it to become more secure, at least against brute-force attacks. Often, key stretching involves adding iterative computations that increase the effort involved in creating the improved key result, usually by several orders of magnitude. This increased workload may be indistinguishable by the typical end user, but it increases the diffi culty of reverse-engineering the key by the same orders of magnitude.

A common example of key stretching is to convert a user’s password into an encryption key. A typical user password is 8 to 12 characters long, representing only 64 to 96 bits.

A symmetric encryption key should be at least 128 bits for reasonable security, or longer for very strong security. A user’s password can be run through a series of variable-length hash operations, which may increment the length by 0, 1, or 2 bits per operation, eventually resulting in a 128-bit (or 192, or 256, and so on) result. There could be hundreds (or hundreds of thousands) of hash iterations performed between the initial input and the fi nal encryption key output. Any attempt to crack the key would require either a brute-force attack on the key itself or a password crack/guess followed by the same hash gauntlet for every attempt. Either means of attack would be daunting and would thus often result in a hacker giving up long before being successful.

6.2 Given a scenario, use appropriate cryptographic methods

343

PBKDF2

Password-Based Key Derivation Function 2 (PBKDF2) is an example of a key-stretching technology. It uses a hashing operation, an encryption cipher function, or an HMAC operation (a symmetric key is used in the hashing process) on the input password, which is combined with a salt. This process is then repeated thousands of times.

A salt is secret data added to input material prior to the hashing process. Salting hashes makes the process of attaching hashes much more complicated and computationally intensive.

Bcrypt

Bcrypt is another example of a key-stretching technology. It’s based on the Blowfi sh cipher, it uses salting, and it includes an adaptive function to increase iterations over time.

Exam Essentials

Know common hash algorithms. The common hash algorithms are Secure Hash

Algorithm (SHA-1), which is a 160-bit hash value; Message Digest 5 (MD5), which is a

128-bit hash value; Message Digest 4 (MD4), which is a 128-bit hash value; and Message

Digest 2 (MD2), which is a 128-bit hash value.

Know the Advanced Encryption Standard (AES). The Advanced Encryption Standard

(AES) utilizes the Rijndael algorithm and is the U.S. government standard for the secure exchange of sensitive but unclassifi ed data. AES uses key lengths and block sizes of 128,

192, and 256 bits to achieve a much higher level of security than that provided by the older

DES algorithm.

Know the basics of the Data Encryption Standard (DES) and Triple DES (3DES). The

Data Encryption Standard (DES) is a 64-bit block cipher that provides 56 bits of key strength. 3DES is a variation of DES that has an effective key strength of either 168 bits or

112 bits.

Understand the concept of a one-time pad. A one-time pad is the basis for many forms of modern cryptography from SSL to IPsec to dynamic one-time password tokens. The concept is that a real or virtual paper pad contains codes or keys on each page that are random and don’t repeat. Each page of the pad (each key or code) can be used once for a single operation, and then it’s discarded—never to be reused or be valid again.

Understand DHE and ECDHE. Diffi e-Hellman (D-H) Ephemeral (DHE, aka Ephemeral

Diffi e-Hellman [EDH]) is a variation of D-H that is used by TLS to implement perfect forward secrecy by performing multiple rekey operations in a session. Elliptic Curve Diffi e-

Hellman Ephemeral, or Elliptic Curve Ephemeral Diffi e-Hellman (ECDHE), implements perfect forward secrecy through the use of elliptic curve cryptography (ECC).

Understand CHAP. The Challenge-Handshake Authentication Protocol (CHAP) is an authentication protocol used primarily over dial-up connections (usually PPP) as a means to provide a secure transport mechanism for logon credentials. CHAP uses a one-way hash to protect

344

Chapter 6

Cryptography passwords and periodically reauthenticates clients. A good example of CHAP usage is a pointto-point link between two corporate routers.

Understand NTLM. New Technology LAN Manager (NTLM) is a password hash storage system used on Microsoft Windows. It’s a challenge-response protocol system that is nonreversible and thus much more secure than LM hashing. One place where NTLM is frequently used is in Microsoft Active Directory for user logon authentication in lieu of a

RADIUS or TACACS solution.

Understand cipher suites. A cipher suite is a standardized collection of authentication, encryption, and hashing algorithms used to defi ne the parameters for a security network communication. Most often the term cipher suite is used in relation to SSL/TLS connections.

Understand key stretching. Key stretching is a collection of techniques that can potentially take a weak key or password and stretch it to become more secure, at least against brute-force attacks. Often, key stretching involves adding iterative computations that increase the effort involved in creating the improved key result, usually by several orders of magnitude.

6.3 Given a scenario, use appropriate

PKI, certificate management, and associated components

Public key cryptography is technically a subset of asymmetric cryptography. Furthermore,

Public Key Infrastructure (PKI) is a framework for deploying asymmetric (or public-key) cryptography, along with symmetric cryptography, hashing, and certifi cates, to obtain a real-world fl exible and functional secure communications system. The following sections discuss various aspects of PKI and its sub-elements (rather than focusing only on public-key cryptography).

Certificate authorities and digital certificates

Digital certifi cates serve a single purpose: proving the identity of a user or the source of an object. They don’t provide proof as to the reliability or quality of the object or service to which they’re attached; they only provide proof of where that product or service originated.

Certifi cates work under a theory known as the trusted third party. This theory states that if user A trusts user C and user B trusts user C, then user A can trust B and vice versa.

With certifi cates, the trusted third party is a certifi cate authority (CA) (see Figure 6.12). If two users have certifi cates issued by the CA, then the two users can trust each other’s identity. Certifi cates work this way on the Internet and within private organizations.

6.3 Given a scenario, use appropriate PKI

345

F I G U R E 6 .1 2 The CA process

Certificate Authority

Message

Certificate

Mike Jeff

Jeff can verify that the message with the certificate from Mike is valid if he trusts the CA.

Most certifi cates used on the Internet and within private networks are based on the X.509 version 3 certifi cate standard. This standard dictates how certifi cates are to be constructed and their required components, such as the subject’s public key, the CA’s distinguishing name, a unique serial number, and the type of symmetric algorithm used for the certifi cate’s encryption (see Figure 6.13).

F I G U R E 6 .1 3 A certificate illustrating some of the information it stores

Version

Serial Number

Signature Algorithm

CA’s name

Valid from:

Valid to:

Subject

Public Key

Extensions

Signature Algorithm

Signature

V3

1234 D123 4567 …

Md2RSA

Sample Certificate

Sunday, September 8, 2005

Sunday, September 15, 2005

Mr. Your Name Here, Myco

Encrypted Value of Key

Subject Type = End Entity sha1

Encrypted Data

Digital Signature Area

Fields of a Simple X.509 Certificate

346

Chapter 6

Cryptography

A user or a subject uses the following procedure to obtain a certifi cate:

1.

The subject requests a certificate from a CA. The request process includes proof of the subject’s identity and the subject’s public key.

2.

The CA verifies the identity of the subject.

3.

The CA creates the certificate.

4.

The CA validates the certificate by signing it with the CA’s private key.

5.

The CA issues the certificate to the subject.

Another entity known as a registration authority (RA) may be deployed in a CA solution. The RA can’t create new certifi cates; rather it serves as a distribution point for the certifi cate revocation list (CRL) and possibly as an Online Certifi cate Status Protocol

(OCSP) host (see the discussion in the section “CRLs,” later in this chapter). CAs must have defi ned certifi cate policies and certifi cate practice statements.

CA

Certifi cates are another means of authentication. They typically involve a trusted thirdparty certifi cate authority (CA): a private or public entity that issues certifi cates to entities serving as either clients (subjects) or servers (objects). It’s the responsibility of the CA to verify the identity of each entity before issuing a certifi cate. After a certifi cate is issued, the entity can use the certifi cate as proof of their identity.

When you’re using certifi cates in a private network, you’re your own trusted third party

(that is, you’re your own CA). Such a private certifi cate solution is known as a Public Key

Infrastructure (PKI). A PKI is the defi nition (like a blueprint or schematic) of the mechanisms involved in implementing certifi cates. For the most part, you must deploy one or more servers with certifi cate services in order to create your own hierarchy of CAs.

Certifi cates can be used logically or electronically only (such as by the OS or web browser directly) or via physical access-control devices (such as a smart card). In a logical deployment, certifi cates are installed into a client OS or a specifi c application. Whenever identity proofi ng is required, the OS transmits its certifi cate to the requesting party. In a physical deployment, the certifi cate is stored on a smart card or some form of removable media.

When the system needs user authentication, it requests the physical access-control device.

When a user requests a certifi cate, they must usually provide proof of their identity along with their public key. This means they must use the same PKI solution as the CA issuing the certifi cate. The CA then uses the public key from the subject as the basis to generate the certifi cate returned to the user (see Figure 6.14). In this fashion, the certifi cate is tied to the subject’s public key–private key pair and provides a mechanism for identity proofi ng.

Certifi cates are commonly used over the Internet as a means of logical or electronic identity proofi ng. As long as both parties in a communication or transaction trust a specifi c third-party CA, such as VeriSign, then the two entities can trust that each is who they claim to be. It’s very important to understand that a certifi cate only provides proof of identity, and that proof is based on trusting a third party (the CA that performed testing on the subject’s identity). It in no way ensures that the subject or object so identifi ed has benevolent motives or will function, perform, or operate in any specifi c manner.

6.3 Given a scenario, use appropriate PKI

347

F I G U R E 6 .1 4 A certificate being issued after identification has been verified

Application Server

Client

3

Valid Certificate

1

Authentication

2

Certificate

Security Server

A certifi cate policy is a PKI document that serves as the basis for common interoperability standards and common assurance criteria. Certifi cate policies are acceptable-use policies for certifi cates: They dictate what is and isn’t acceptable with regard to how certifi cates can be used in an organization. The policies are a set of rules that control how certifi cates are used, managed, and deployed.

Certifi cate policies must be all of the following:

Clear and concise

Endorsed by senior management

Restricted to a maximum length of two pages

Written in bullet-point statements

Able to provide users (also referred to as subjects) with a clear understanding of the acceptable-use policies with regard to certificates

A certifi cate practice statement (CPS) describes how a CA will manage the certifi cates it issues. The CPS details how certifi cate management is performed, how security is maintained, and the procedures the CA must follow to perform any type of certifi cate management from creation to revocation.

CRLs

Certifi cates have a specifi c expiration date, which is sometimes called the lifetime date.

When that date is reached, a certifi cate is automatically rejected as invalid. However, a CA may have cause to revoke or invalidate a certifi cate before its predefi ned expiration date.

Revocation is the process by which a CA invalidates a certifi cate.

Revocation may occur because the subject’s identity information has changed, the subject used the certifi cate to commit a crime, or the subject used the certifi cate in such a way as to violate the CA’s certifi cate policy.

When a certifi cate is revoked, it’s added to the CA’s certifi cate revocation list (CRL)

(aka its database of revoked certifi cates). When a certifi cate’s expiration date is reached,

348

Chapter 6

Cryptography it’s removed from the CRL because the time stamp automatically invalidates the certifi cate. Thus, the CRL contains only those certifi cates that have been revoked but have yet to expire. Figure 6.15 shows the certifi cation revocation process.

F I G U R E 6 .1 5 Certification revocation process

Revocation Request RA

CA CRL

The CRL is freely distributed to all users and applications. You should always consult it before accepting a certifi cate. When issued to a requesting user or application, a CRL is assigned a lifetime date as well. When the CRL exceeds this lifetime, it can no longer be relied on, and you should obtain a new, updated version of the CRL.

When a user application, such as a web browser, receives a certifi cate from a server, such as a web server, the application fi rst verifi es that the date on the certifi cate is still valid.

Next, it checks the local copy of the CA’s CRL. If the CRL is no longer valid, an updated copy of the CRL is obtained. The application checks to see whether the certifi cate appears on the CRL. If it doesn’t, the application presents the certifi cate to the user for a fi nal acceptance choice. The user can elect to accept or reject the certifi cate as well as indicate whether to make this same acceptance or rejection choice for all future instances of this certifi cate.

Web browsers as well as other client-side or server-side applications should check the CRL or use OCSP. This doesn’t always happen, however, as made clear by several recent attacks against certificates, such as the attack where nine fraudulent digital certificates were issued by the CA

Comodo. But even after this was detected, many systems still accepted these quickly revoked certificates.

The CRL process is widely used, but it isn’t the only mechanism for informing users and applications about the status of certifi cates. The Online Certifi cate Status Protocol (OCSP) is another solution that functions on a direct query basis. Each time an application receives a new certifi cate, it sends a query to an OCSP CA (or RA) server. The CA responds directly to indicate whether the certifi cate is still valid or has been revoked. By using OCSP, large

6.3 Given a scenario, use appropriate PKI

349

CRLs aren’t transmitted repeatedly to every requesting system, and queries are direct, immediate, and current.

Most cryptographic keys and all certifi cates have a built-in expiration date. Upon reaching that date, the key or certifi cate becomes invalid, and no system will accept it. Keys and certifi cates are assigned a lifetime with control settings known as valid from and valid to dates. Keys and certifi cates past their valid to dates should be discarded or destroyed.

If the valid to date for a key or certifi cate is approaching, you should request a renewal.

If you fail to renew before the lifetime expires, then you must perform the complete request process from scratch.

Suspension is an alternative to revocation. Suspension can be used when a key or certifi cate will be temporarily removed from active use, but the subject (or the CA) doesn’t wish to invalidate it. When a key or certifi cate is suspended, it can’t be used to sign or encrypt any new items, but previously signed or encrypted items can be verifi ed or decrypted. The key or certifi cate can be reactivated at a later date.

Suspension status checking is an extension of revocation status checking. However, the results indicate whether a certifi cate or key is currently valid or in suspension (such a status would be labeled certifi cation hold).

Renewal is the process by which a key or certifi cate is reissued with an extended lifetime date before the key or certifi cate expires. The renewal process doesn’t require a complete repeat of the request and identity proofi ng process; rather, the old key (which is about to expire) is used to sign the request for the new key. This allows the CA to quickly determine whether the end user’s key or certifi cate can be immediately extended (or reissued with a new lifetime date) or rejected and revoked according to its existing lifetime dates. The decision of the CA often depends on the end user’s compliance with the organization’s certifi cate policy (the acceptable-use policy for the key or certifi cate).

After a key or certifi cate is no longer needed, or when it has expired or been revoked, it should be properly disposed of. This process is known as key destruction: the removal of the key or certifi cate from all software and hardware storage devices. For keys and certifi cates that are still valid, the CA should be informed about the destruction of the key or certifi cate. This action allows the CA to update its CRL and OCSP servers.

Reasons to use key destruction include going out of business, changing identity, or having to obtain replacement keys or certifi cates.

OCSP

See the discussion of Online Certifi cate Status Protocol (OCSP) in the previous section,

“CRLs.”

CSR

A certifi cate signing request (CSR) is the message sent to a certifi cate authority from a user or organization to request and apply for a digital certifi cate. A CSR often follows the

PKCS#10 specifi cation or the Signed Public Key and Challenge (SPKAC) format. A CSR typically includes the generated public key from the applicant’s key pair set and the subject’s details as defi ned by the applicable certifi cate standard (such as x.509 v3); these often

350

Chapter 6

Cryptography include distinguished name, organization name, address/location details, email address, and other contact information.

PKI

Public Key Infrastructure (PKI) isn’t a product; rather, it’s a blueprint or concept for a solution. It dictates what should happen and which standards to comply with, but it doesn’t indicate which technologies or algorithms to use. PKI focuses on proving the identity of communication partners, providing a means to securely exchange session-based symmetric encryption keys through asymmetric cryptographic solutions, and providing a means to protect message integrity through the use of hashing. Most PKI solutions are based around certifi cates and the use of a CA.

Recovery agent

Recovery agents can also be called key-recovery agents or key-escrow agents. See the discussion earlier in this chapter, in section 6.1, subsection “Key escrow.” Think of a recovery agent as a means to retrieve a key from escrow when a user needs to decrypt something.

This way, the user doesn’t have to worry about securely managing multiple keys, because the keys are safely stowed away in escrow at a remote location.

Public key

A public key is the key from the public-key cryptography key pair set that is designed to be sent out into the public world. Anyone can obtain a person’s public key and use it to initiate secure communications with that person. The public key is derived from the private key, but it isn’t feasible to reverse the process in order to discover the private key.

Private key

A private key is the key from the public-key cryptography key pair set that is designed to be kept secured locally and accessible only to the one individual to whom it belongs.

The private key is used to unlock communications sent using the corresponding public key. The private key can also be used in crafting digital signatures. The main points regarding the private key is that it should be safeguarded and that it’s normally used for decryption.

One application that uses both public and private keys is TrueCrypt. It’s an open-source and free program that performs various types of encryption. Basically, a user can generate a public/private key pair from within the TrueCrypt application. For example, a user, Alice, can provide another user, Bob, with her public key. Bob can then use Alice’s public key to encrypt a document that should not be able to be opened by anyone other than Alice using her private key.

Note that there are various levels of encryption and that some are much stronger than others. For instance, 3DES is much more powerful than DES. Also, there is no such thing

6.3 Given a scenario, use appropriate PKI

351

as unbreakable encryption. The general idea is to utilize a level of encryption that is directly proportional to the confi dentiality level of the data being encrypted, therefore making it

“too much work for the effort” of cracking the encrypted data.

Registration

Registration is the process of obtaining a certifi cate. The specifi cs may vary based on whether the CA is public or private as well as the actual software used for the CA services, but the basics of the process are the same throughout. The registration process is as follows:

1.

A subject crafts a private key and then generates a public key.

2.

The public key is sent to the CA along with proof-of-subject identity.

3.

The CA verifies the subject’s identity using whatever level of due diligence is warranted.

4.

The CA crafts the certificate by digitally signing the subject’s public key with the CA’s private key, and then it adds a text file containing the details mandated by the X.509 v3 certificate standard.

5.

The CA sends the certificate to the subject via a secured pathway.

Some private organizations may generate the initial subject key set on the CA and then issue them both to the subject.

Key escrow

Key escrow is a system whereby decryption keys are stored in an escrow until needed. See the discussion earlier in this chapter, in section 6.1, subsection “Key escrow,” or in the

“Recovery agent” subsection earlier in this section.

Trust models

The term trust model refers to the structure of the trust hierarchy used by a certifi cate authority system. The basic trust-model scheme used by CAs is a hierarchical structure with a single top-level root CA. A root CA self-signs its own certifi cate in order to begin the tree of trust. Below the root CA are one, two, or more subordinate CAs. Below each subordinate CA may be one, two, or more subordinate CAs, and so on. Subordinate CAs can sometimes be called intermediate or leaf CAs. In this model, all CAs have a single parent CA, but they may have multiple child CAs (see Figure 6.16). The root CA is the start of trust; all CAs and participants in a hierarchical trust model ultimately rely on the trustworthiness of the root CA.

Cross-certifi cation occurs when a CA from one organization elects to trust a CA from another organization (see Figure 6.17). This is also called a bridge trust structure. In this way, certifi cates from either organization are accepted by the other organization. In most cases, the root CA is confi gured to trust the other root CA.

352

Chapter 6

Cryptography

F I G U R E 6 .1 6 A hierarchical trust structure

Hierarchical Trust Model

F I G U R E 6 .17 A cross or bridge trust structure

Bridge Model

Root CA

Intermediate CA

Leaf CA

End Entities

Root CA

Intermediate CA

Leaf CA

6.3 Given a scenario, use appropriate PKI

353

A trust list is a form of trust model where a web browser or similar application is provided with a list of root certifi cates of trusted CAs. The web browser trusts numerous sources of certifi cates because of the presence of the trusted CA’s root certifi cate on the list of trusted CAs.

Exam Essentials

Understand trusted third parties. Certifi cates work under a theory known as the trusted third party: If user A trusts user C and user B trusts user C, then user A can trust B and vice versa. With certifi cates, the trusted third party is a certifi cate authority (CA).

Understand certificates. Certifi cates serve a single purpose: proving the identity of a user or the source of an object. Certifi cates don’t provide any proof as to the reliability or quality of the object or service to which they’re attached; they only provide proof of where that product or service originated.

Understand the X.509 version 3 certificate standard. Most certifi cates are based on the

X.509 version 3 certifi cate standard. Some of the required components are the subject’s public key, the CA’s distinguishing name, a unique serial number, and the type of symmetric algorithm used for the certifi cate’s encryption.

Understand PKI. The Public Key Infrastructure (PKI) focuses on proving the identity of communication partners, providing a means to securely exchange session-based symmetric encryption keys through asymmetric cryptographic solutions, and providing a means to protect message integrity through the use of hashing.

Understand the procedure for requesting a certificate. To request a certifi cate, a subject submits a request to a CA with proof of their identity and their public key.

Understand certificate policies. A certifi cate policy is a PKI document that serves as the basis for common interoperability standards and common assurance criteria. It’s a statement that governs the use of digital certifi cates within an organization. Certifi cate policies are acceptable-use policies for certifi cates.

Understand certificate practice statements. A certifi cate practice statement (CPS) describes how a CA will manage the certifi cates it issues. It details how certifi cate management is performed, how security is maintained, and the procedures the CA must follow to perform any type of certifi cate management from creation to revocation.

Understand revocation. A CA may have cause to revoke or invalidate a certifi cate before its predefi ned expiration date. Revocation may occur because the subject’s identity information has changed, the subject used the certifi cate to commit a crime, or the subject used the certifi cate in such a way as to violate the CA’s certifi cate policy.

Understand certificate revocation lists. When a certifi cate is revoked, it’s added to the CA’s certifi cate revocation list (CRL). The CRL is freely distributed to all users and

354

Chapter 6

Cryptography applications. It should always be consulted before recipients accept a certifi cate and whatever it’s associated with.

Understand OCSP. The Online Certifi cate Status Protocol (OCSP) is a revocation solution that functions on a direct query basis. Each time an application receives a new certifi cate, it sends a query to an OCSP CA server. The CA responds directly to indicate whether the certifi cate is still valid or has been revoked.

Understand key expiration. Most cryptographic keys and all certifi cates have a built-in expiration date. Upon reaching that date, the key or certifi cate becomes invalid, and no system will accept it. Keys and certifi cates are assigned a lifetime with control settings known as valid from and valid to dates. Keys and certifi cates past their valid to dates should be discarded or destroyed.

Understand key revocation and status checking. Keys and certifi cates can be revoked before they reach their lifetime expiration date. Status checking is the process of checking the lifetime dates against the current system date, checking the CRL, and/or querying an

OCSP server.

Understand key suspension. Suspension is an alternative to revocation. It can be used when a key or certifi cate will be temporarily removed from active use, but the subject (or the CA) doesn’t wish to invalidate the key or certifi cate outright. Suspension allows a key or certifi cate to be reactivated at a later date.

Understand key recovery. Recovery is the process of pulling a key or certifi cate from escrow. The recovery process can be used when a user loses their key or their key has been corrupted. Only a key-recovery agent can perform key recovery.

Understand key renewal. Renewal is the process by which a key or certifi cate is reissued with an extended lifetime date before it expires. The renewal process doesn’t require a complete repeat of the request and identity proofi ng process; rather, the old key (which is about to expire) is used to sign the request for the new key.

Understand key destruction. After a key or certifi cate is no longer needed or it has expired or been revoked, it should be properly disposed of. For keys and certifi cates that are still valid, the CA should be informed about the destruction of the key or certifi cate.

This action allows the CA to update its CRL and OCSP servers.

Understand how a web browser handles new certificates. When a web browser receives a certifi cate from a web server, it verifi es that the date on the certifi cate is still valid. Next, it checks the local copy of the CA’s CRL. If the CRL is no longer valid, an updated copy of the CRL is obtained. The application checks to see if the certifi cate appears on the CRL. If it doesn’t, the application presents the certifi cate to the user for a fi nal acceptance choice.

Understand trust models. The term trust model refers to the structure of the trust hierarchy used by a certifi cate authority system. The basic trust model scheme used by CAs is a hierarchical structure.

6.3 Given a scenario, use appropriate PKI

355

Understand hierarchical trust models. A hierarchical structure has a single top-level root

CA. Below the root CA are one, two, or more subordinate CAs. The root CA is the start of trust. All CAs and participants in a hierarchical trust model ultimately rely on the trustworthiness of the root CA.

Understand cross-certification. Cross-certifi cation or a bridge trust occurs when a CA from one organization elects to trust a CA from another organization. In this way, certifi cates from either organization are accepted by the other organization. In most cases, the root CA is confi gured to trust the other root CA.

356

Chapter 6

Cryptography

Review Questions

1. Which of the following is most directly associated with providing or supporting perfect forward secrecy?

A. PBKDF2

B. ECDHE

C. HMAC

D. OCSP

2. Which of the following symmetric-encryption algorithms offers the strength of

168-bit keys?

A. Data Encryption Standard

C. Advanced Encryption Standard

D. IDEA

3. Diffie-Hellman is what type of cryptographic system?

A. Asymmetric

B. Symmetric

C. Hashing

4. The security service that protects the secrecy of data, information, or resources is known as what?

A. Integrity

B. Authentication

C. Non-repudiation

D. Confidentiality

5. Digital signatures can be created using all but which of the following?

B. Hashing

6. Certificates have what single purpose?

C. Providing encryption security

D. Exchanging encryption keys

Review Questions

357

7. When a subject or end user requests a certificate, they must provide which of the following items? (Choose all that apply.)

A. Proof of identity

B. A hardware storage device

C. A public key

D. A private key

8. From a private corporate perspective, which of the following is most secure?

A. Decentralized key management

B. Centralized key management

C. Individual key management

D. Distributed key management

9. Which of the following is a description of a key-stretching technique?

A. Salting input before hashing

B. Generating a random number, and then using a trapdoor one-way function to derive a related key

C. Adding iterative computations that increase the effort involved in creating the improved result

D. Using a challenge-response dialogue

10. When should a key or certificate be renewed?

C. Just before it expires

D. Just after it expires

Appendix

A

Answers to Review

Questions

360

Appendix A

Answers to Review Questions

Chapter 1: Network Security

1. B. Firewalls provide protection by controlling traffi c entering and leaving a network.

2. A. Network-based IDSs aren’t suitable for protecting against email spoofi ng.

3. B. A DMZ provides a network segment where publicly accessible servers can be deployed without compromising the security of the private network.

4. C. Switches can create VLANs. Broadcast storms aren’t transmitted between one VLAN and another.

5. C. Illegal or unauthorized zone transfers are a signifi cant and direct threat to DNS servers.

6. D. Fibre Channel is a form of network data-storage solution (SAN or NAS) that allows for high-speed fi le transfers upwards of 16 Gbps. It was designed to be operated over fi ber optic cables, but support for copper cables was added later to offer less expensive options.

7. C. Time to live (TTL) is a value in the IP header used to prevent loops at Layer 3.

8. D. The goals of Network Access Control (NAC) include preventing/reducing zero-day attacks, enforcing security policy throughout the network, and using identities to perform access control.

9. C. A rubber duck antenna is an omnidirectional antenna.

10. B. Counter Mode with Cipher Block Chaining Message Authentication Code Protocol

(CCMP) is based on the AES encryption scheme.

Chapter 2: Compliance and Operational

Security

1. D. The annualized loss expectancy (ALE) represents the total potential loss a company may experience within a single year due to a specifi c risk to an asset. EF is the percentage of asset value loss that would occur if a risk was realized. SLE is the potential dollar value loss from a single risk-realization incident. ARO is the statistical probability that a specifi c risk may be realized a certain number of times in a year.

2. D. A memorandum of understanding (MOU) is an expression of agreement or aligned intent, will, or purpose between two entities. An MOU is not typically a legal agreement or commitment, but rather a more formal form of a reciprocal agreement or gentleman’s hands