ExamInsight for CompTIA Security+ Certification Exam SY0-101 Tcat Houser, CTT+, A+, Network+, Server+, Security+, etc Helen O'Boyle, CTT+, A+, Network+, Security+, MCSD, etc With Ian Kayne and Angella Hebert Michael Woznicki, A+, Network+, I-Net+, Server+, CCNA Published by TotalRecall Publications, Inc. 1103 Middlecreek Friendswood, TX 77546 281-992-3131 THIS IS BOOK IS GUARANTEED: See details at www.TotalRecallPress.com This Book is Sponsored by BeachFront Quizzer, Inc. Copyright © November 14, 2002 by TotalRecall Publications, Inc. All rights reserved. Printed in the United States of America. Except as permitted under the United States Copyright Act of 1976, No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic or mechanical or by photocopying, recording, or otherwise without the prior permission of the publisher. Copyright 2002 AlphaGeekProductions The views expressed in this book are solely those of the author, and do not represent the views of any other party or parties. Printed in United States of America ISBN: 1-59095-225-1 UPC: 6-43977-22101-8 The sponsoring editor for this book was Bruce Moran and the production supervisor was Corby R. Tate. Printed and bound by Data Duplicators of Houston Texas Printed and bound by Lightning Source, Inc. in the USA and UK Authors: Tcat Houser, Helen O'Boyle, Ian Kayne, and Angella Hebert
Technical Editing: Michael Woznicki Design Concepts: Bruce Moran, Tcat Houser This publication is not sponsored by, endorsed by, or affiliated with CompTIA, Inc. CompTIA®, A+®, Network+™, Server+™, I-Net+™, Linux+™, Security+™ The CompTIA logos and the Network+ logo are trademarks or registered trademarks of CompTIA, Inc. in the United States and certain other countries. All other trademarks are trademarks of their respective owners. Throughout this book, trademarked names are used. Rather than put a trademark symbol after every occurrence of a trademarked name, we used names in an editorial fashion only and to the benefit of the trademark owner. No intention of infringement on trademarks is intended. This publication does not constitute an endorsement of any mentioned product by the authors. Disclaimer Notice: Judgments as to the suitability of the information herein for purchaser's purposes are necessarily the purchaser's responsibility. BeachFront Quizzer, Inc. and TotalRecall Press extend no warranties, make no representations, and assume no responsibility as to the accuracy or suitability of such information for application to the purchaser's intended purposes or for consequences of its use. Tcat Houser-This is for Bob Wallace (1949-2002). Bob -- you did more than propel the PC industry when you left Microsoft to create PC-Write. You made a great mentor to me. I promise to do my best to continue in the finest traditions you taught me. Helen O'Boyle-My work on this study guide is dedicated to the denizens of the Virginia Commonwealth University computer labs, without whose presence in my life as friends, mentors and occasional adversaries of a white hat who just wanted to learn, I might never have discovered how enjoyable the field of computer security could be, or learned as much about it as I did there. Ian Kayne-This is for Gillian and Eddie. Angella Hebert-I dedicate the success of this effort to all of my loved ones who gave us moral support through our days of hell in production (Marc, Tristan, Antoine, and Étienne), the team members of this successful effort for all roles played, and to the author I owe my sanity to, Tcat. You are a strong leader with your expertise. You push me to the challenge. I thank you! Michael Woznicki-I dedicate this book to my wife, who through the entire editing process was very supportive and understanding. Without hesitation I would do it all over again with her by my side. About the Authors Tcat Houser Tcat Houser (CTT+, Network+, I-Net+, Server+, Security+, MCSE+I, etc) has garnered other milestones such as IBM PSE and Microsoft MCSE/MCT. This is the result of almost 40 years of 'fussing with electronics'. When not writing or teaching, he is doing research. Tcat accomplishes so many tasks because to him, it isn't work, its fun, and he has fun 18 hours a
day, 7 days a week. You can reach him by sending mail to
[email protected] or
[email protected]. Looking back at the last book where I (Tcat Houser) was the lead author (I-Net+ Exam Prep 1576105989), the independent reviews were very good, and most readers understood that I had two intentions. First, ace the test. Second, supply the information to be a reference manual and/or alert the reader to upcoming technologies so as today's hero, the reader was not tomorrow's zero. In the two years since that release, I led a number of career changes through CompTIA and wrote my own courseware. Building on that learning, you have this release. Helen C. O'Boyle Helen C. O'Boyle (CTT+, Network+, I-Net+, Server+, Security+, MCSE, MCSD, etc) has been working with computers for 20 years and holds degrees in Business/Information Systems and Mathematics from Virginia Commonwealth University. She first became involved in computer security in the mid-1980's, and has expertise in network security analysis, firewalls, computer forensics and penetration testing on several platforms. Helen is experienced in network administration and software development on UNIX, Windows and enterprise-class IBM mainframes, and has consulted for organizations of all sizes. She offers readers a real-world, pragmatic perspective on security. Along with Tcat, she enjoys bringing clarity to explanations of complex IT concepts. You may email her at
[email protected] or
[email protected]. Contributing Authors and Editors Ian Kayne By day I'm a technical specialist with a focus on Internet & Security technologies. By night I'm a scene coder, laying down C++ with Win32, MFC and DirectX code purely for fun. I enjoy a challenge, whether it's building pen-resistant systems or getting this mesh and that pixel shade to render faster. Working with everyone in different time zones and across the Atlantic has been fun. Certain people will understand the reference to Spirit ;). Angella Hebert By day I am a full-time mother of three, by night I do crunch sessions. I reside in Montréal, Canada, and have a BS in Social Psychology, as well as, an Associate's in Business Accounting. In this effort, I rendered my English skills, Linguistic skills, and of course the 'Practical' Social Behavior knowledge. No rest for the wicked! (No pun intended). This effort has been wonderful due to the diversity of our geographical placements, as well as, the personalities of the people involved. Chad Rees Design and WebMaster. Michael Woznicki
Michael Woxnicki (A+/Net+/iNet+/Server+/CCNA/CCDA/CIWA/CIWP/CNX-A) When not working on a network, or working as a technical editor/reviewer or even in a classroom teaching, Mike spends time with his wife of 7 1/2 years and 3 wonderful children. Mike enjoys listening to music and working towards new certifications and is currently involved in a major security revamp of several networks.
About the Book Part of the TotalRecall: IT Certification System Series, this new book fills the gap existing in the complete study aid material available for candidates preparing to set the CompTIA Security+ Exam. This book covers information associated with each exam topic in detail and includes information found in no other book. This manual is designed to provide information to help readers study for and pass CompTIA's Security+ certification exam. Every effort has been made to make this manual as complete and accurate as possible. Just reviewing the table of contents, you will see that through TotalRecall Publications, I was given the freedom to build on what I have learned from running a Voc Tech school. For example, the chapter numbers are written in Base 2. The goal here is to reinforcement, learn binary math, since that is how much of computing works. In this release, we teamed up with other alpha geek around the world with the end result is you will not find another Security+ book with more geekie details, if you need them. This title (ExamInsight to) is a 'I want to make sure I know everything about Security+ before I spend a couple hundred bucks on SYO-101.' If you are already in Security networking, and don't want/need a complete certification/reference/killer idea book, try the ExamWise For Security+: The IT Question Book Series: ISBN # 1-59095-266-9 from www.TotalRecallPress.com. If you are in the game for in-depth understanding, this is this book for you. Helen and Tcat encourage questions from and support the readers of this work. To us, it is another form of Networking, and we look forward to hearing from you.
[email protected] or
[email protected]
Frequently Asked Questions Q: I'm interested in Security+. What details do you have? A: The body of knowledge is 2 years practical experience. US pricing is currently $175 for CompTIA members and $225 for non-members. The wording on the CompTIA site leads us to believe this may be special introductory pricing only. Exam number is SY0-101[1]. Number of questions is 100, with 90 minutes to complete, requiring a score of 764 on a scale of 100900 to pass. (This means 83%)
B. This work is based on the objectives as provided to the public by CompTIA[2] as of November, 2002. [1]
http://www.comptia.org/certification/security/objectives.htm
[2]
http://www.comptia.org/certification/security/objectives.pdf
How To Read This Book Battle-scarred field computer engineers and Information Technology (IT) Trainers designed this book, ExamInsight For Security+ Certification. Rest assured that while it is obviously quite different from the typical book you have seen, we had several reasons for any variation from the typical tech book. First and foremost you cannot, we repeat cannot know it all. Relax, sit back and learn what is critical and pertinent, then build on that information step by step. Get those basics down and then grow with that information. We strongly suggest that regardless of your experience level, read casually from this page forward to the end for the first time through. We separate what portions of information are nice to know and are historical in nature, we also share real world tips. We know that learning from a book to pass a certification exam is far from all that you need to know to be functional in the real world.
Humor Our philosophy continues with blending humor, real-world lessons learned, and continued support. At least this way, you know why sometimes our industry can be both brilliant and 'FUBAR'd' all at the same time. That is one acronym we won't spell out for you! The tone is informal, slightly politically incorrect, at least more so than other books, less so than Maximum PC magazine.
Continued Support We encourage questions! We find that if you are patient, and go through and complete the exercises this will reinforce your learning and the information will stick with you. We ask the average student to plan on a minimum of 10 hours of study time after completing the course. A visual person you say? We have included lots of pictures and screen shots of the topics under discussion to help you correlate what you are reading with what you will see live.
Real-World Lessons Microsoft has a favorite term, heard on their campus. They call it, 'Eating our own dog food.' They mean they use their own tools to create new work. (This is great until some test version of an email distribution system running the campus dies.) Since you the reader are attempting to learn the INs and OUTs of the IT industry, we have brought you what it looks like to 'eat your own dog food.' This book doesn't have the traditional label of introduction. Instead, we used a popular form in IT as your first clue to look for whenever you are unpacking a new piece of computer hardware or software. It is called, Readme.1st, READ.ME, or Read.Me!, or other clearly labeled warning that is too often ignored. The bottom line for ANY PC is, either On or Off. Binary means two. Computers work in binary. So, to assist you in thinking in binary, the chapter numbers are in binary. As a purchaser of this work, you are automatically entitled to join your fellow readers and authors on a private email list. Experience tells us that learning is more fun and easier when done with a group. To join the others, send an email to:
[email protected] Subject: Subscribe SecurityPlus If everything goes right you will get an email telling you to respond. (This is to prevent someone else from using us for creative revenge, on you.) If you don't get a reply, check your email to see if you sent Plain Text (that helps). Got a thought about this book? Praise us or pan us by writing to:
[email protected] We always read each email, and unless we are teaching a class, we respond within hours.
The Why of this Book Tao is Chinese for 'how'. The how of ExamInsight For… reflects elements of our Tao in the classroom. The old saying, 'Tell them what you are going to tell them. Then tell them. Finally tell them what you told them' has merit. The way the human mind works best is by as many different input styles as possible and repeat as much as possible. With that in mind, you will hear some points said one way, then referred to or re-stated again. We compared notes throughout the process quite frequently. And when we felt that a point was a 'gotcha', in the real world, we each spoke our piece. A wise person could consider the repetitions a ‘gotcha meter'.
Icon Alerts These are the symbols or keys to information alerts; use them as another study aid.
Historical Owl!
This is material that is not directly testable by CompTIA and the Security+ test, but may either help you 'pull on the thread' so you can see why something is. Geek Owl! This is material that is too deep for CompTIA and the Security+ test. But knowing it will help you put the topic together. Future Owl! This indicates a topic that should be on your radar screen. CompTIA generally only tests for what are 'commonly accepted' items in the industry. Future Owl tells you about something coming up. You will look good in a job interview and/or should know about something that will be hot tomorrow, sooner rather than later. Real World OWL! (a.k.a real world) describes tips for understanding the difference between by the book and the real world out there in IT.
Who is? Success OWL The OWL is an honest presentation of how the computer industry looks to us. You will notice in our logo, Success Owl is setting on a branch with leaves. The gold of the OWL'S feet and the green of the leaves signify the money you can make in this business. The Branch is you. The branch represents your strength, energy and diligence in achieving your goals. Like any serious players in the computer game, we have to run very fast just to attempt to keep up. Each of the OWL's feathers is something to learn. No matter how fast you run, you cannot get to the top. (You just fly for more gold.) Further, each Feather learned will become obsolete too quickly for comfort. That is what this industry is about -- IT is in a constant state or refreshment and therefore a lively, never boring chosen field. Finally, once the decision to get on the IT knowledge is entered, there is no getting off. Life long study is mandatory.
Security+ 2002 Exam Specifics Status: Security+ became available December 2, 2002. This book is based on all available data for Security+. To register for the exam, see the Security+ section of the CompTIA web site for the most upto-date registration link. The following material is the public statement from CompTIA from the web site http://www.comptia.org regarding Security+.
Exam Skills Measured and Weighting 'The skills and knowledge measured by this examination are derived from an industry-wide job task analysis and validated through an industry wide survey. The results of this survey were used in weighting the domains and ensuring that the weighting is representative of the relative importance of the content. This examination blueprint includes weighting, test objectives and example content. Example concepts are included to clarify the test objectives and should not be construed as a comprehensive listing of the content of the examination.
Number of questions asked for: 100 Time allowed: 90 Minutes Static or Adaptive: Currently Static Scoring: 764 Minimum Pass Score - 100-900 range Test Fee: $175 USD for CompTIA Corporate Members and $225 USD for non-members 1.0 General Security Concepts
30%
2.0 Communications Security
20%
3.0 Infrastructure Security
20%
4.0 Basics of Cryptography
15%
5.0 Organizational / Operational Security
15%
Total
100%
Note: All percentages are approximate and are subject to change.
Introduction This courseware is designed for use in two ways. 1. Instructor-led course 2. Self-study
Welcome! This manual has been designed to provide information for students to pass (green bar) the CompTIA Security+ certification test.
Intended Audience The material for the student has been designed for a student seeking Security+, and possibly using this as a stepping-stone to CISSP. This material provides a direct road map of what to expect when taking the Security+ test. This material is reflected in the Test Objectives and Wise Owl Tips. It is highly recommended that students pay special attention to the Wise Owl Tips prior to taking the Security+ exam
Self-Study Students This manual may also be used for self-study purposes. The courseware was written for the student who has almost no networking experience, and requires some additional instruction on theory. We suggest reviewing the Test Objectives and Wise Owl Tips in your initial reading of this study guide.
Chapter 0000: Read.Me "Security isn't technology. Security is a process, though it is enabled by technology." James Christiansen CSO, General Motors
Overview This domain requires the knowledge and skills to identify, security concepts, following established basic procedures for system security. Each chapter directly relating to test objectives are detailed in this section. This brief chapter is for *everyone*. It doesn't matter if you are a manager, a technical guru or a marketing specialist. While the body of this work examines security issues in depth, here you will discover the overview of security. In July 2002, Bill Gates gave an update on Microsoft's Security Initiative. In short, it took the company two months, not one to begin to clean up the software holes, at a cost of 100 million bucks. (And that's just the beginning!) More importantly, his memo called upon users doing their part. Giving this work a quick glance could leave the reader with a thought similar to, 'we're doomed.' This certainly does not have to be the case. Security is not an all-or-nothing proposition. It involves analyzing the various risks faced by the organization, and taking the appropriate steps to bring the risk down to a level acceptable to the organization. In this title you will discover that: • • • • •
Security is an ongoing challenge, not a one-time fix. Consider it job security. Security costs can be quantified and given a positive Return On Investment (ROI). Security approaches must be balanced between physical security, technical security and people. The biggest challenge in security is people. While there are no absolutes, many attacks are easily stopped.
We begin your overview by examining the above listed points. As the chief security officer of GM stated, security is a process. Forget for the moment that new holes are found in systems that have existed for years (such as the veritable Apache web server), and, remember that new technologies give rise to new issues. Because security is not a pleasant thought for most of us, there is a human tendency to just pretend it doesn't exist or at best, demand a 'fixit!' so it doesn't have to be thought about again. Sorry! That isn't how the world works. Any psychology student can tell you that the fear of the unknown is a very powerful emotion. This in fact is what drives the irrational need to either ignore security issues or demand a one-time permanent solution. There is an old saying 'knowledge is power'. That truism builds on the behavior of human fears of the unknown. This leads to the next bullet point. Security costs can be quantified and can be given a positive ROI. While more on this matter is discussed in the legal chapter, the Secure Business Quarterly reports, 'Results
demonstrate that efficient gains greater than 3 percent are realized when introducing appropriate security. The quantifiable benefits are decreased maintenance costs and obvious savings due to the reduction of successful attacks.'[1] If the functional ROI is not a motivator for you, consider the legal ramifications. Not taking prudent security measures will vary in outcome, depending on your industry. If you are lucky, you will be explaining this as a lesson learned while interviewing for your next job. If you happen to work in an industry that requires not only security, but also filing a Suspicious Activity Report (SAR) and you fail to do so, you may not have to worry about finding a new job. The Federal government could be providing you a job, along with food, shelter and clothing for a long time in the Iron Bar hotel. [2] Continue our high-level view by considering the next bullet point. Security is a matter of balancing technical, physical and people issues. The first point in this bullet is balance. Balance is a reference to both the degree to which you invoke a solution on one of the three points, and balancing the points of physical, technical and personal against themselves. A strong caution is offered here and now. This book was written to provide you the data to pass the CompTIA Security+ as well as give you data to be successful in the real world. CompTIA is short for Computer Technology Industry Association. This makes a reasonable assumption that Security+ as a test focuses on the technical portion in what we refer to as the Triangle of Security (which it does-some policy level knowledge is tested, but that's in the minority). This means we have gone beyond the Security+ test and given you a map to succeed and excel in the real world. When you pass Security+, you have our pat on the back, but that does not make you a security guru. Another group has put a fair amount of effort into security, whose focus is not just on the technical side. This group is called the (ISC)2, or International Information Systems Security Certification Consortium, Inc., and they offer the CISSP, or Certified Information Systems Security Professional, certification. This is a higher-level certification that requires several years of documented field experience as part of the certification process. The core of the CISSP philosophy is Planning Policies, Procedures and People. As a Security+ professional you may be reporting to a CISSP. Keep in mind they have more experience and training on the actual implementation for what your authors have called the Triangle of Security. You may be a specialist in technicality, and that is wonderful, but a specialist in the U.S. Army is called a specialist too, and that does not make his title 'commanding officer.' Remember your role on the team, and don't be too smug with your new certification. This human thought brings us to the next bullet point.
The biggest challenge in security is people. There is a term for this challenge: social engineering. There is one school of thought that suggests social engineering is not part of the security issue. The argument attempts to split technology from people. While your authors understand the difference, this is a work concerning security and we have kept in mind that people are part of the security issue-a statement with which CompTIA's exam objectives agree.
The first part of your effort here is ‘selling' the idea that security is in the other person's best interest. It was Samuel Clemens (also known as Mark Twain) who, in his essay 'What Is Man?' stated that, 'every one of us acts at all times in his own interest.' The trick is to supply the data to the users in a form through which security can be properly applied to suit their own best interests. Your authors do not mean to imply that most workers don't care about their jobs. Social engineering, which is the most successful form of attack used by the outside intruder, often specifically takes advantage of workers' desire to be helpful to coworkers, vendors or other business partners while doing their jobs. For example, the intruders' first phone call to an employee reveals the name of the person in charge of the phone system. The second phone call wants to know the make and model of the phone system. This gives the intruders the data to make the third phone call -- to get a person do perform some simple step, as requested by (insert obtained name from the first call). With this, the intruders just got an employee, who thought they were doing their job, to prop open a door on the phone system for the intruders. A perfect example for this attack is the Kevin Mitnick scandal. We have carefully chosen one example to highlight as a typical method into your network that is not often thought of…..your modem. Modems tend to be forgotten because they are not as new and super fast as a network broadband connection. Even at 28Kbps, a modem that is not monitored for a few days can be the loophole allowing a fair amount of data to slip out undetected. This brings us to the last bullet point, involving Risk Assessment, and then we offer you some good news. In order to apply security measures intelligently, you should be aware of the risks faced by your organization. We can't give you a list of them, because they're different for all organizations. For example, US government computers containing national-securityrelated information may be worth spending millions of dollars and tens of thousands of hours of staff time to protect, to ensure the confidentiality and integrity of the information on them. The likelihood of a sophisticated person specifically targeting these systems, because of the data they contain, is relatively high. Likewise, the potential for major consequences, should this information fall into the wrong hands, is great. In contrast, your child's computer used for homework assignments probably merits a less rigorous approach to security-although if your child keeps a diary, they might be ready to insist to you that it deserves the level of security applied to systems containing national secrets! The sad reality today is the fact that most computer networks have little to no protection. Our guess is this is the 'I don't want to think about anything bad' approach. In our research we found two disturbing issues. First, an unprotected computer will be at least probed for information within 2 to 3 days of being plugged into the Internet. This is a statistical average[3]. There are reports at honeynet.org of being invaded within 15 minutes of going on-line. Brian & Tom's Linux book goes so far as to suggest that if a computer has a broadband connection to select 'no Ethernet' as the selection when first installing a Linux configuration[4] due to multiple reports of being hacked within 10 minutes. Second, most of the numerous ‘bad guys' out there are what are known as ‘script kiddies'. This means they grab some software designed to probe for gross lapses in security. Once one
of the many targets has been identified, they run additional software that will cause havoc. While this may seem like bad news, it's partially good news. The script kiddie has virtually no technical knowledge. The typically self-taught script kiddie has little more understanding than a monkey that has learned to 'push button-get bananas'. It is the sheer number of script kiddies existing, and the randomness with which they select targets that make reports of being hacked within minutes a reality. This doesn't sound like good news, does it? Aah, but there is good news. Because the script kiddie is pretty clueless about the underlying technology, and there are so many completely naked targets, a digital equivalent of checking to see if the car door is locked makes the typical site uninviting unless they can walk right in. Security specialists call these simple security precautions Low Hanging Fruit (LHF). Chapter 0011, 3.4.3 Honey pots, reveals the depth of this statement with an email (used with permission) between one of your authors and Fred Cohen. Mr. Cohen is one of the pioneers of computer security with hundreds of publications on the topic over a 20-year period and popularized the term ‘computer virus'[5]. Furthermore, he has one of the most popular 'honey pot' programs ever. Script kiddies are relatively easy to spot and stop. Since they tend to use 'canned' exploits, many successful attacks can be prevented by keeping your systems up to date with patches. Still more can be prevented through the use of an Intrusion Detection System which recognizes patterns of attacks. Both of these topics are discussed in more depth in later chapters. We are sorry to report there are elements (human and otherwise) that are potentially more damaging than the script kiddie. And, that is our next topic, [1]
Volume one: Issue Two http://www.sbq.com/sbq/rosi/sbq_rosi_efficiencies.pdf
[2]
CFR Part 21 Minimum Security Devices and Procedures, Reports of Suspicious Activities, and Bank Secrecy Act Compliance Program http://www.occ.treas.gov/fr/cfrparts/12CFR21.htm
[3]
http://www.honeynet.org/papers/stats/
[4]
http://www.orbdesigns.com/pages/btlb/ch03/btlb/btlb_c03.html
[5]
http://www.cknow.com/vtutor/vthistory.htm
0.1 You're Saved….If If you have scanned the first couple pages of this book you understand there are tradeoffs for every choice. Your authors wish to caution you about *any* 'solution' that appears to be a cure-all. Over 100 years ago, the western United States had marketing types who rode in wagons selling magic in a bottle to the citizens in less than pleasant conditions. They were known as ‘snake oil' salesmen. Any marketing guru that promises a sure-fire cure to end all should be considered a 21st century version of snake oil. There are numerous legitimate solutions that drastically aid in a challenge.
And again, there are no absolutes in this game. The worm Code Red ripped through the Internet because of holes in Microsoft's Web Server, IIS in early 2002. By the time the year was half over; successful attacks on Linux systems ran 2 to 1 over Microsoft systems. The best solution today is probably tomorrow's ‘less than best,' and may become ‘fish wrap'. As this introduction has pointed out several times, security is a process, not something you throw some attention to and forget. Any zealot telling you something to the effect that Linux is secure and Windows isn't has not done their homework. And if Redmond suddenly starts proclaiming that Windows is more secure than Linux, well that's marketing. The reality is everybody, including Apple, is a target, simply because it is there. In this introduction, we have thrown a number of terms at you. In the interest of clear communications, we would like to introduce a couple more.
0.2 Hacker Vs. Cracker Language is a fluid thing. In days of old (in Internet Time) a hacker was a person who studied for possible vulnerabilities in a system and reported the results. A cracker was a term for someone who did bad things to a system once they discovered some vulnerability or came upon the work of a hacker's results. http://www.hackers.com/ is on a mission to be a seeker of knowledge without the destructive use of this information. As people who need data to successfully perform in a Security+ role, the goal of hackers.com is in alignment with our needs. Given that, we understand the need to help show language differentiation and support their goals. Hacker is a knowledge seeker. A cracker is the bad guy seeking to hurt you. We make our point with the RFC included below. In case you are wondering, RFC stands for Request For Comment. This is a process in which a thought is proposed on how to do something technical on the Internet, such as transfer files, access remote systems or route packets among networks. There are thousands of these entries, and some of them are just plain funny. This particular RFC is humorous and still makes the point. The original memo is plain text -- emphasis has been added. Geek Owl! RFC 968 Network Working Group
V. Cerf
Request for Comments: 968
MCI
December 1985
'Twas the Night Before Start-up' STATUS OF THIS MEMO This memo discusses problems that arise and debugging techniques used in bringing a new network into operation. Distribution of this memo is unlimited. DISCUSSION
Twas the night before start-up and all through the net, not a packet was moving; no bit nor octet. The engineers rattled their cards in despair, hoping a bad chip would blow with a flare. The salesmen were nestled all snug in their beds, while visions of data nets danced in their heads. And I with my datascope tracings and dumps prepared for some pretty bad bruises and lumps. When out in the hall there arose such a clatter, I sprang from my desk to see what was the matter. There stood at the threshold with PC in tow, An ARPANET hacker, all ready to go. I could see from the creases that covered his brow, he'd conquer the crisis confronting him now. More rapid than eagles, he checked each alarm and scrutinized each for its potential harm. On LAPB, on OSI, X.25! TCP, SNA, V.35! His eyes were afire with the strength of his gaze; no bug could hide long; not for hours or days. A wink of his eye and a twitch of his head, soon gave me to know I had little to dread. He spoke not a word, but went straight to his work, fixing a net that had gone plumb berserk; And laying a finger on one suspect line,
he entered a patch and the net came up fine! The packets flowed neatly and protocols matched; the hosts interfaced and shift-registers latched. He tested the system from Gateway to PAD; not one bit was dropped; no checksum was bad. At last he was finished and wearily sighed and turned to explain why the system had died. I twisted my fingers and counted to ten; an off-by-one index had done it again.. Vint Cerf December 1985
A recent study was released on the personality of a hacker. Quoting InfoSecNews[6] . 'In a study consisting of a questionnaire and longer-form answer section started at the hacker convention H2K and Def Con 8 in 2000, Bernadette Schell, dean of Business Information Technology, University of Ontario Institute of Technology and John Dodge, professor at the School of Commerce and The Department of Math and Computer Science at Laurentian University, profiled 216 hackers and their style of thinking, coping with life, and problemsolving.' The researchers found that the respondents, whose median age was 25, have "extremely low" tendencies towards terrorist and obsessive traits and possess "relatively balanced temperaments,' according to Schell. 'Respondents also tested as particularly creative,' she said, noting that the top score for creativity was 20 and that 62 percent of those polled scored 15 or higher on the test.
The combination of creativity and problem-solving styles revealed a commonality between hackers and a group that might not expect they have much in common with hackers: corporate presidents and chief executive officers. 'The combination of analytical and directive problemsolving styles is shared by both hackers and corporate executives,' Dodge said.
[6]
http://www.c4i.org/isn.html
0.3 Security Tao Tao is a term that generally means that the subtle reality of the universe cannot be described. While choosing the word Tao would seem to suggest it is not possible to describe security, our goal is to give you an outline on the general ‘how' of security, without pretending to say, ‘step by step, here are all of your answers'. In simpler times of living in a non-computerized domain, the number one challenge was physical security. There was no computer called the domain controller, or network cable to defeat. A person defeating domain security would be destroying his own family and possessions, effectively reducing the threat. This allowed physical security to be evaluated to a high science. Without boring you with details, such as the openings in the walls that were slanted to deflect incoming arrows, let's look at the logistics of protecting a village. The basic plans are the same today. Villagers would work outside the castle walls in fields. The castle had watchtowers placed so a complete view of any possible threat could be observed, while allowing for preparation time. When a watchtower sounded an alarm, the villagers would retreat behind the castle walls, the drawbridge was raised and defensive counter measures were lit up (often literally). Defenders with long bows had the advantages of height and protection from the castle walls. They would begin by sending arrows out in an attempt to break the solid front of the attackers. If there were dry fields between the opposing factions, the arrows would be on fire, to create a ‘wall of fire' (firewall) causing further delay and damage to the attacker. Assuming this was a serious attack, the defenders would then pour hot oil on the advancing attackers from atop the castle walls. Catapults would be used to throw rocks and/or fireballs at the rear of the attacking force destroying supplies. With proper planning, a castle would have stores of supplies to outlast a siege (blockade) while the opposing force had no practical method to penetrate the castle walls. The elements briefly described here demonstrate a defensive system that while old is still effective. It is known as a zone of security. Zones of security offer a defensive point while buying time to either start heating up oil to pour on the attackers or to page an administrator to begin counter measures. Another common element is that zones of security start out as simple physical/psychological barriers, and eventually end up including more hardened elements. Today, you may find concrete barriers preventing parking within a given distance of an airport functioning as the outside perimeter. The closer in you come to the airport, you find closed circuit TV and police. Move to the inside of a terminal and you find in addition to the closed circuit TV and police, plain clothes (undercover) security forces, along with inspections. This is a modern day example of zones of security. Zones of security are not limited to physical attributes. This concept can and should be applied to all forms of security.
0.4 Security Checklist Regardless of physical or network considerations the following points need to be addressed. They are: • • • • • •
Proof of identity (authentication) Access permissions (authorization) Eavesdropping prevention/Encryption (confidentiality) Protection of information from modification (integrity) Proof of involvement (non-repudiation) Connectivity between parties (availability)
An effective overall security plan addresses these six issues. Typically this requires a collection of resources. A single element may offer more than one attribute. For example, strong encryption of data addresses both confidentiality and integrity. Other methods must be used to satisfy the other factors. Physical security should be modeled with the same principles. Consider a system involving access cards without connectivity. This makes checking a centralized database (authorization) or logging access (non-repudiation) difficult at best. Later chapters of this book provide more information about the items on this checklist.
0.5 Security Through Obscurity More than one article has suggested security via obscurity. The theory goes that if you select a less than popular OS (operating system), such as AIX from IBM or an older Mac selection, as the OS of choice, the black hat would feel 'it isn't exciting' enough, and finding published flaws would not be as easy, so they would move on to other LHF. The sole devil's advocate we could find to this argument came from Writing Secure Code[7] by Michael Howard and David LeBlanc. On page 34 '…it is trivially easy for an attacker to determine obscured information.' Other parts of this book show many examples of how such information can be found. Showing that some security recommendations are a matter of opinion, co-author Helen chimes in here with a somewhat-dissenting view. While running an obscure OS won't protect you from an attack that specifically targets your site (as Howard and LeBlanc point out, using an obscure platform might make it a bit more difficult, but not impossible), it does discourage those attackers who are looking for any old random site running a certain popular OS (like Linux) that is vulnerable to the latest 'script kiddie' program. If you can eliminate the effectiveness of a large percentage of the random attacks without losing required functionality, it may be worth considering. Appendix B, 'The Ten Immutable Laws of Security' and Appendix C 'The Ten Immutable Laws of Security Administration', originally by Scott Culp of the Microsoft Security Response Center, make Howard and LeBlanc's book a must-have on the reference shelf of every IT person. These lists can also be found on the Microsoft Technet web site, at http://www.microsoft.com/technet/columns/security/10imlaws.asp and http://www.microsoft.com/technet/columns/security/10salaws.asp.
Technical Oxymoron From a technical viewpoint we face an oxymoron. Under the single umbrella of security we have two opposing solutions. One is to filter out potentially bad stuff, such as closing ports or examining traffic for something bad. The other solution is to encrypt at some level of the OSI model, to help ensure that only authorized individuals can do anything on your network. The challenge lies in the fact that once you encrypt at a given layer of the OSI model, you can no longer filter traffic because it is encrypted! Whoever came up with the phrase, 'the devil is in the details' may well have been thinking of the challenges in security. [7]
Howard, Michael and David LeBlanc, Writing Secure Code, Microsoft Press, November, 2001, http://www.nerdbooks.com/item.html?id=0735615888
0.6 Resources We have divided this work into three separate thoughts. The primary is to give you what you need for the real world. The second is to let you smoke Security+. The third is to be a resource, not only as a stand-alone book but your guide to the best expert authorities of a specific sub-topic. Since the specifics of security change with the clock, we will point you to the best sources we have found. Since this opening chapter is a generic chapter, we offer you a generic email list of great value. That is the INS list at attrition.org. It was from that list we were alerted of an article at the ComputerWorld site, even before the email alert from the ComputerWorld web site came to one of your authors. The particular article can be found online[8]. In an effort to both entice you, as well as, a small offering that we are not just making this up, we offer a few lines from Dan Verton, posted July 18, 2002.
'A hacker nicknamed RaFa is the ex-leader of the now defunct World of Hell defacement group, which racked up thousands of Web site defacements before disbanding last year. He said that in addition to making simple configuration mistakes, most administrators don't keep up with updates and patches released by their software vendors.' "They don't update services running on the system, and, they set up permissions and software settings the wrong way on the Web server," said RaFa. "Think about all of the zero-day exploits I've used. The vendors knew about 90% of those." 'However, the real problem is not laziness, it's trust,' said Genocide, the leader of the Genocide2600 hacker group. 'Most administrators and corporate managers simply trust that they are secure,' he said. "That is their first and biggest mistake," said Genocide. "People believe that since their company may not have anything that someone would want they are free from attack. What administrators really need to do is treat every day as if they were at war and as if the enemy were always planning an attack,' he added.
"It's the companies, administrators and CEOs that don't see it that way who become the easy targets," said Genocide. "They are the ones who don't keep their firewalls, intrusion-detection systems and software upgraded."
[8]
www.rootkit.com
0.7 Summary In closing, you learned that there are steps within easy reach that help you achieve a positive ROI, if by chance you were either a high profile target or a random site seen as a ‘personal challenge' by an intruder because of your LHF. These steps allow you to cut them off, and sleep at night. By balancing the triangle of security -- physical, technical and people-and ongoing efforts you will accomplish all that you set before you. You discovered there are many resources available to you, and failure to protect yourself and your company could bring you serious legal and professional difficulties.
Chapter 0001: Domain 1.0: General Security Concepts (30%) "He knows not his own strength that hath not met adversity." - Benjamin Jonson
Getting Ready - Questions 1. Bell La-Padula features A. B. C. D.
DAC Quack MAC All choices are correct
2. Kerberos features A. B. C. D.
Scalability for large environments Authentication over untrustworthy networks Asymmetric encryption Creates three session keys
3. CHAP features A. B. C. D.
A three-way handshake: Encrypts the process using RC4 Repeats the challenge at random intervals Is stronger than Kerberos
4. All SmartCards utilize: A. B. C. D.
Biometrics SecureID Tokens Certificates All choices are correct
5. A SYN DoS attack operates by A. B. C. D.
Sending repeated TCP SYNACK packets Sending repeated UDP SYNACK packets Sending repeated TCP SYN packets Sending repeated UDP SYN packets
Answers 1. *C. MAC Explanation: MAC (Mandatory Access Control) 'Division (B): Mandatory Protection The notion of a TCB that preserves the integrity of sensitivity labels and uses them to enforce a set of mandatory access control rules is a major requirement in this division. Systems in this division must carry the sensitivity labels with major data structures in the system.' DoD 5200.28-STD [1] §http://www.radium.ncsc.mil/tpep/library/rainbow/5200.28-STD.pdf http://www.radium.ncsc.mil/tpep/library/rainbow/5200.28-STD.pdf http://www.radium.ncsc.mil/tpep/library/rainbow/5200.28-STD.pdf DAC or Discretionary Access Control is, by definition, optional. The reference to Bell LaPadula is derived from a white paper published in November 1973 by David Ellott Bell and L. J. LaPadula Titled Secure Computer Systems: A mathematical Model This mathematical discourse is the basis for DoD Class B Trusted Computer systems. 2. *A. Scalability for large environments *B. Authentication over untrustworthy networks Explanation: Kerberos is an authentication system created by MIT to allow for the exchange of private information on an untrusted network.[2] Kerberos uses symmetric encryption and the Authentication Server (AS) creates two temporary session keys[3]. 3. *A. A three-way handshake *C. Repeats the challenge at random intervals Explanation: The Challenge-Handshake Authentication Protocol uses a three way handshake that is repeated on a random basis[4].Generally speaking[5], Kerberos is more
secure than CHAP. Note that both Kerberos[6] and CHAP[7] have issues 4. *C. Certificates Explanation: Basic smart cards have a limited storage capacity (around 16k). A Certificate Authority issues a certificate to the owner of the smart card, which is stored on the card itself. When authentication is required, the user presents the physical smart card (by placing it in a card reader), and supplies a PIN number. The PIN 'unlocks' the card, and allows the certificates stored on it to be retrieved and checked for authenticity. A biometric option for reading the fingerprint of the owner is an option not a requirement[8]. Similarly, some SmartCards involve the use of SecureID tokens, but this is also optional. 5. *C. Sending repeated TCP SYN packetsExplanation: Since TCP uses a 'virtual circuit', the circuit must be set up at the beginning of the conversation. UDP does not require a conversation setup, so no UDP choice is correct. The SYN attack occurs by sending SYN requests, rather than by responding to them[9]. This is a function of the design of the protocol. The normal TCP circuit request involves a three-way handshake: the source system sending the initial SYN request, the target system replying to that SYN with a SYNACK, and then the source system replying to the target with another ACK. When the target system receives a SYN, it sends its SYNACK and keeps the request open for X time, waiting for the final ACK. If the ACK is not received, the request stays open, consuming resources on the target system. If repeated SYN's are sent, and not completed with ACK's, this could exhaust the target system's resources and cause it to be unable to accept additional network connections. [1]
http://www.radium.ncsc.mil/tpep/library/rainbow/5200.28-STD.pdf
[2]
http://www.webopedia.com/TERM/K/Kerberos.html
[3]
http://www.contrib.andrew.cmu.edu/~shadow/kerberos.html#general
[4]
http://whatis.techtarget.com/definition/0,,sid9_gci213847,00.html
[5]
Http://www.ecse.rpi.edu/Homepages/shivkuma/teaching/sp2001/ip2001-Lecture15.ppt
[6]
http://www.netscapeworld.com/nl/win_unix/08222002/
[7]
http://stealth.7350.org/chap.pdf
[8]
http://www.linuxnet.com/cardsec.html
[9]
http://www.niksula.cs.hut.fi/~dforsber/synflood/result.html
1.0 General Security Concepts Security can be broken down into three thoughts, often called the AAA of security: Access control, authentication and auditing (or accounting, to some). This domain looks at these concepts as well as some common practical issues you’ll run into when administering security for an organization, including cracker attacks, malicious code, social engineering and vulnerabilities caused by running non-essential services and protocols.
1.1 Access Control Access Control, the first item in the AAA of security, involves the process by which you restrict access to computing resources. It is a combination of Authentication (proving who you claim to be) and Authorization (what are you allowed to see, presuming you are whom you claim you are.) Access control allows you to enforce the security principle of least privilege—that is, individuals should be assigned the minimum privilege level required to carry out their assigned tasks. Only those individuals authorized to access resources are permitted access to them. (In practice, the OS default often allows everyone access. But the theoretical reality is that access could be restricted.) The capabilities and methods of access control are often different on different operating systems. Access Control on an AS/400[10] is different than on a UNIX or NT based machine[11]. The Security+ test examines three different types of Access Control, which we will cover in the next section. Before moving on to 1.1.1, we would like to point out that all three types of control have some degree of being real. That is, enforcement of access control is handled by the operating system and cannot be bypassed. Why make this point? Any Windows 3.x/9.x/Me Operating System is DOS based, despite any claims to the contrary by the vendor in Redmond, WA. We are not knocking DOS, which is a useful stand-alone operating system for some purposes. But you do need to be aware that these operating systems offer NO security at the local machine level. Any user walking up to the machine can access any files stored on it. “But you have to login!”?. No, you don’t—you can press the ESC key at the login dialog, and while you won’t have network access, you will have access to the local machine and the contents of its disks. A degree of security can be bolted on at the network level, requiring that users provide a user ID and password known to the network before they access network resources—but this only controls access to network resources, not those on the local machine. With Office 11, Microsoft will be encouraging pre-Windows-2000 users to upgrade, and we certainly don’t disagree from a security perspective. Real security can be found in the Bell La-Padula[12] model, among others, discussed in section 1.1.1. Success Owl!
Access Control Access control involves the process and mechanisms used to restrict access to computing resources. Access control is enforced by the OS and cannot be bypassed using legitimate OS functionality.
1.1.1 MAC/DAC/RBAC (Also see 5.5.5) Within the topic of Access Control, we can look at three specific types of access control.
Mandatory Access Control Mandatory Access Control (MAC) is military-strength access control. In the absence of a permission that specifically allows you access, you are not getting in. Every thing in the system is an object and every object gets a classification label, which usually represents the sensitivity of the object, such as “top secret” or “confidential”. Individual users, called subjects, are also assigned a privilege level, called a clearance. To determine whether or not a given individual can access a certain object, the object’s classification level and the user’s clearance level are compared. There is an established hierarchy to the labels (or levels), such that anyone authorized to see “top secret” information can also view “secret” and “general access” information since those are less sensitive, but someone authorized only to view “general access” information can’t necessarily see the more sensitive “top secret” information. Success Owl!
MAC Labels Labels may be used to define projects as well. This means that while you may have a top-secret clearance, you are not automatically granted access to a secret project if that particular project is not assigned to your area.
The Bell-LaPadula formal model of access control uses mandatory access control. It is based on several properties, including: •
•
•
star property (or * property), also called the containment level, which states that an untrustworthy user can only write (append information) to objects whose security level is greater than or equal to their own (to make sure that someone with a high clearance level doesn’t accidentally share sensitive information with someone having a lower clearance level—i.e., it prevents “information leakage”) simple property, which states that a user can read data only if its security level is as sensitive as, or less sensitive than, their clearance level (think about a 4-star general being entitled to see more data than a 1-star general) tranquility property, which states that the security level of an object cannot be changed while it is in use by the computer system (this sidesteps the problem of what to do with users actively using an object who are no longer permitted access when the object’s security level changes) Success Owl!
Bell-LaPadula The Bell-LaPadula model describes a mandatory access control model that is used by the military. It determines whether an access is permissible by comparing an object’s (or data item’s) assigned hierarchical classification level and the subject’s clearance level. If the user’s clearance level is at least as high as the classification level of the object, the access control rule permits the access. Otherwise, access is denied.
•
Figure 1. MAC uses both hierarchical classification and the subjects clearance level
Another MAC-based model is the Lattice-based access control model. It shares with the BellLaPadula model the idea that objects and users are each given a hierarchical security level label, and that you determine whether or not a user has access to an object, by comparing their labels. As with Bell-LaPadula, if the user’s clearance level is at or above the classification level of the object, access is permitted. Geek Owl! Bell-LaPadula and Lattice Sometimes the terms “Bell-LaPadula model” and “Lattice-based model” are used interchangeably, but the original version of the Lattice-based model did not include the Bell-LaPadula’s requirement that a user is not permitted to write into a document with a lower security level than the user’s security level, and thus, technically did not prevent disclosure of higher-level information to lower-level users as well as does the Bell-LaPadula model. Success Owl! MAC & Lattice Another MAC model is Lattice-based[13] access control, sometimes also referred to as the Bell-LaPadula model.
Discretionary Access Control Discretionary Access Control (DAC) is based on the user’s identity and the access control rules in effect on the system. DAC is the type of access control most commonly found in the PC and network computing worlds. NT/Windows 2000, Linux and UNIX for the most part use DAC. While MAC restricts the copying of data, DAC does not. Instead, DAC leaves decisions like, “to copy or not to copy,” up to the user’s discretion. If you have read access on a DAC-based system, you can copy the data (via copy/paste) if you wish. On MAC-based systems, which contain special safeguards to prevent copying of sensitive data, that cannot happen. Why might this be important? If you were permitted to copy the data as well as view
it, you could potentially store it in a separate file you control, and set up your own list of users allowed to access it—including users not permitted access to the original file, in violation of the mandatory access control on the data. One DAC model is owner-based DAC, in which the owner controls access to resources they own. For example, the user can grant or deny access to others, and define exactly what types of access (such as read or write) are permitted. DAC usually involves an Access Control List (ACL) on each system object (file, device, etc.), which specifies which users can have access to that object, and what type of access (such as read, write or execute) they can have. ACLs offer no protection against malicious programs like Trojan horses which typically run with the logged-in user’s permissions. If a user runs a Trojan horse, virus, etc., these programs can access whatever objects that user is permitted to access. (Refer to 1.5.2) An alternative to ACLs is to use capability lists for each system user, specifying what resources the user is permitted to access, and the types of access permitted. (Note that the difference is that an ACL is assigned to an object, and a capability list is assigned to a user). Success Owl!
DAC DAC models include owner-based, access matrix, centralized, decentralized or distributed. DAC is often implemented via ACLs. An ACL specifies the types of access different users can have to an object. ACLs are not a defense against Trojan horse programs.
Role-Based Access Control Role-Based Access Control[14] (RBAC) allows you to define permissions and privileges based on a user’s functional role within the organization or community. One of the most challenging problems in managing large networked systems is the complexity of security administration. Today, security administration is costly and prone to error because administrators usually specify access control lists for each user on the system individually. Role-based access control (RBAC) is a technology that is attracting increasing attention, particularly for commercial applications, because of its potential for reducing the complexity and cost of security administration in large networked applications. With RBAC, security is managed at a level that corresponds closely to the organization's structure. Each user is assigned one or more roles, such as “human resources rep” or “accounts payable data entry clerk”, and each role is assigned one or more privileges that are permitted to users in that role, such as the right to access certain applications. Security administration with RBAC consists of determining the operations that must be executed by persons in particular positions, assigning employees to the proper roles, and then granting the required permissions to each role. Complexities introduced by mutually exclusive roles or by role hierarchies are handled by the RBAC software, making security administration easier. Additionally, administrative burdens are reduced because when a user is added or deleted from the system, it is not necessary to go to every access control rule involving that user, and update it. Instead, adding the user to the appropriate roles (or deleting them) automatically includes (or excludes) the user in the appropriate access lists.
Some operating systems, such as UNIX and Windows, implement a degree of role-based security by placing each user into one or more groups defining that user’s role in the organization, and controlling access to files and other objects by granting permissions to certain groups. Success Owl!
RBAC RBAC allows access control to be defined in terms of organization structure and roles. For example, you can define that a customer order clerk can access your accounting system’s order entry application, but not the check writing application.
Figure 2: RBAC works well because it combines rules Real World Owl! DAC or RBAC? Does your organization use role-based access controls, or are your access controls primarily user-based? If you primarily employ user-based access controls, how often are you updating ACLs? If you’re doing this very frequently, you might save time by moving to a more role-based access control policy. [10]
http://www.inetmi.com/pubs/aaTut.htm
[11]
http://directory.google.com/Top/Computers/Security/Authentication/
[12]
http://www.informatik.uni-bremen.de/~hs/Lehre/L9.pdf
[13]
http://www.list.gmu.edu/journals/acm/survey96(org).pdf
[14]
http://csrc.nist.gov/rbac/
1.2 Authentication Authentication, the second item in the AAA of security, is proving in some way that you are, who you say you are, giving you the right to claim a certain identity. Three types of mechanisms can be used to establish authentication: • • •
Something you know, such as a password Something you have, such as a Smartcard Something you are, which may be a fingerprint, an eye scan (iris or retinal) or a voice pattern
We look at some of the most common authentication mechanisms below. For more information on these techniques, and others, consult the book, Authentication[15] by Richard E. Smith. Success Owl!
Authentication Authentication is proving who you are, by one or more of the following: • • •
Something you know (password) Something you have (Smartcard) Something you are (biometric data)
1.2.1 Kerberos[16] Kerberos[17] is an authentication mechanism often used on larger networks, particularly those on which contain UNIX machines. The idea behind Kerberos is to provide authentication and authorization services in an environment where authentication requests originate from machines that are not trustworthy, and travel across a network that is not trustworthy. Kerberos was designed to provide authentication that is secure over a network whose traffic might be intercepted at any time, reliable, transparent to the user (for example, it shouldn’t get in someone’s way by repeatedly requesting a user’s password) and scalable for use in environments with many hosts. It was developed in the mid-1980s by MIT as part of its Project Athena, and a free implementation of the latest version of the protocol is available from MIT, pleasing those who don’t want to trust any cryptosystem without inspecting the program’s source code. Later versions of Windows NT (Windows 2000 and beyond) use an authentication mechanism based on Kerberos, so you’re probably using it, even if you’re not aware of it.[18] For more of the nitty-gritty technical details of the Microsoft Windows 2000 Kerberos implementation, see Secure Networking with Windows 2000 and Trust Services[19] by Feghhi and Feghhi. To learn more about interoperability between the MIT Kerberos implementation and Windows 2000, check out a list of tips[20] compiled from the experiences of various US universities, as noted in the footnote. Similar to Windows, the architecture of Kerberos allows for multiple administrative domains, so that different organizations and organizational units can control their own user accounts. In the Kerberos world, these administrative domains are called “realms.” As in the Windows
world, it is possible for users to authenticate in one realm and then use services in another, if that remote realm trusts the original realm in which the user authenticated.
How does Kerberos authentication work? A complete explanation of the Kerberos protocol is beyond the scope of this book, but briefly, here’s a (very) simplified explanation as to how Kerberos authentication works. Success Owl!
Kerberos Kerberos uses symmetric encryption, with secret keys, but does not send the user’s password across the network, in encrypted or unencrypted form. Instead, the key is used to encrypt information exchanged between the client and server.
A user authenticates himself when he logs into the network. He provides his user name, and the user workstation then connects to a special “ticket-granting service” on a specific network host called an Authentication Server (AS), for login verification. The AS issues the user a credential (encrypted with that user’s key, known by the server) called a “ticket.” The client machine holds on to this ticket, and uses it to demonstrate the user’s identity when requesting network services. Success Owl!
Authentication Server The AS also creates two session keys, which are temporary in duration, lasting only as long as that session lasts. One of the session keys for the user’s connection with the ticket-granting service, as well as an expiration date, is included in the ticket. The AS retains the other session key. Distributing the keys in this manner allows both sides of the session to communicate with each other in a secure, encrypted fashion, if desired.
If the user supplies a valid password, the session key is used in later attempts to connect to network services—it is sent to the service as proof of the client’s identity, along with a special message called an “authenticator” (with information like the client name, IP address and current time). The service can then decide whether or not the user is authorized to use the service, based on their identity, and allow or disallow the connection attempt. Optionally, mutual authentication can take place; with the server proving its identity to the client as well as the client proving its identity to the server (see section 1.2.7). Kerberos assumes the use of a strong password, since it employs conventional encryption mechanisms. The Kerberos authentication mechanism uses an encrypted password. According to the creator of Kerberos (MIT), various versions of Kerberos are vulnerable to buffer overflows and DoS attacks (1.4.1). Additionally, the Kerberos protocol is somewhat subject to “replay” attacks in which legitimate packets are captured and later “replayed” from an impostor’s machine, although this has been mitigated somewhat by the addition of timestamps to packets. Additionally, it is indirectly vulnerable to brute-force password guessing attacks.
Success Owl!
Kerberos Assumptions Kerberos includes some innovative solutions to problems posed by conventional symmetric cryptography. Kerberos assumes the use of a strong password since it uses a secret key and conventional symmetric encryption. However, it does not send the password over the wire. Kerberos authentication uses session keys that are valid only as long as the session lasts. It also uses tickets to avoid needing to re-authenticate the user each time they request access to a new network resource.
Kerberos can be vulnerable to buffer overflow, replay and brute-force password guessing attacks. Real World Owl! Does it require any open router ports? Kerberos uses TCP port 88 and UDP port 88. When performing authentication across a router boundary, you may need to open those ports on the router.
1.2.2 CHAP Challenge Handshake Authentication Protocol, described by RFC 1994, authenticates a user by way of a “three way handshake”. First, the server sends the client a challenge message. (IE, the server “challenges” the client.) Second, the client uses the message that is sent, along with the ID and the secret (the user’s password), to create a special code value called a hash, typically using MD5, and sends the hash back to the server. (IE, the client responds with the other half of the “challenge handshake”.) Third, the server performs the same hashing function. In theory, the MD5 hash values will be equal, which gives authentication. This is repeated at random intervals during the session. By changing the ID value with each session, a replay attack is not possible. See 4.1.1 for explanations of hashing and MD5. CHAP is most often used for PPP authentication. Firms such as Cisco and Microsoft have produced variations on the basic CHAP model, such as Microsoft’s MS-CHAP, with extensions specific to the Windows NT environment. Geek Owl! CHAP Issues Although like Kerberos, CHAP avoids sending the password over the wire, it still has security issues. In particular, the challenge/response mechanism is only as strong as the secret used to calculate the response. This means that users still need to choose good passwords—for example, not words that appear in any dictionary. Also, the protocol itself contains some weaknesses, including information disclosure, as documented in the paper, “Cheating CHAP.”[21] Success Owl! CHAP 3-Way Handshake CHAP uses a 3-way handshake in which the server sends the client a “challenge” message, the client responds with a message encrypted into an
MD5 hash using its password, and the server verifies that the message was encrypted with the right password by encrypting the same message with its version of the user’s password and making sure both messages’ hash codes match. CHAP protects against session hijacking by performing this handshake multiple again at random times during a session.
Figure 3: CHAP can re-challenge at random times
1.2.3 Certificates The “bottom line” goal of certificates is to establish trust among clients, so that repeatedly providing a password to authenticate oneself is not required, and so that a communication partner may have greater certainty that the person on the other side of the conversation really is who they say they are. Certificates are generally issued by a Certificate Server. By using key information distributed in certificates, a user can: • • •
Encrypt a message (Privacy) Confirm a message was not modified (Integrity) Confirm the sender identity (non-repudiation)
Not all certificates are valid for all uses. For example, if the organization issuing the certificate did not carefully verify someone’s identity before issuing them a certificate, it might not be wise to rely on the identifying information in it. Frequently Certificates are called digital certificates. Refer to sections 4.3.1 and 5.5.2 for more information. Certificates are discussed in greater detail on the section on public key infrastructure.
1.2.4 Username/Password Although digital certificates are becoming more popular, most systems today require each user to identify himself to the system by furnishing a username and password. This is an example of authenticating yourself based on “what you know.” We’ve already seen this in our discussions of authentication protocols like Kerberos and CHAP. The username is unique to each individual user. It is a humanly readable name which typically, 'under the hood', is associated with a number set or hashed value that was generated at the time the user account was created. The password is supposed to be kept secret and should be sufficiently long enough to prevent a brute force (trying all the possible permutations of letters) attack from succeeding. Furthermore, a password should not be a name found in a native language to prevent a dictionary attack. It should also not be something easily guessable such as the username, the user’s first name, their child’s name, etc. Different OSs and applications perform user/password validation with different levels of intelligence and naiveté. For example, some encrypt the password before sending it across the wire, some don’t. Some store the password in strongly encrypted form on the server; some store on the server it using weak or no encryption. As networks became more common, network “sniffers” which inspect traffic as it travels across a network became more common, and computers got faster (permitting encryption to be brute-forced), engineers began looking for better solutions that provided a higher level of security. Simple user/password authentication is still used today by a variety of services, but many security professionals and real-world-savvy network administrators recommend avoiding those services and going instead for those that use stronger authentication methods, due to limitations in the user/password approach: • • •
the often-existing requirement that the password be sent over the network, sometimes without being encrypted the ease with which passwords can be stolen (or guessed) by unauthorized personnel, and then used to impersonate someone’s identity the fact that passwords are often entangled with “people” issues that complicate security—staff use their children’s and pets’ names as passwords for ease of memorization, they write down passwords too complex to remember, and tend to dislike changing their passwords on a regular basis
1.2.5 Tokens A token is usually a hardware device (most commonly assumed to be an RSA SecureID token-type device), which changes an ID code on a frequent basis, normally 60 seconds. Tokens are used to authenticate yourself via “something you have” and “something you know”—along with every SecureID token, you are issued a PIN number. These SecureID devices are slightly smaller than a box of TicTacs, and have an LCD screen on the front. The screen displays a seeded number that changes every 60 seconds. When you connect to the server (normally via a VPN tunnel etc), you enter your PIN number followed by the number showing on your token. The server then authenticates you based on that, as the
server has the same seed as your token, knows your PIN, and can therefore confirm that the two match. This complies with the "something you have and something you know" model. The other token way tokens are used in authentication is simply as data. On some systems, when you authenticate yourself, you are given a special set of data, known as a token, identifying you to the system. In the future during your computing session, when you need to furnish authentication information (for instance, to other network services), rather than sending the user and password again, you send this token data. Possession of this “virtual token” is proof of your authenticated identity.
1.2.6 Multi-Factor In the introduction we said something like, “a password or pass phrase is something you know. A device such as a smart card is something you have. Biometrics is something you are.” Multifactor authentication involves the use of any two or more of these concepts together, requiring the user to furnish more than one type of proof of identity before access is granted. This greatly increases security, by reducing the odds that a lost smart card or accidentally disclosed password will give someone access to the network or system. There is a high probability you use Multifactor authentication very often. The password (something you know) is weak; it is a mere 4 digits and numeric only. Yet most of us find that combining this incredibly weak password with something you have to be sufficient security. If you haven't guessed yet, it is your ATM/Check Card/Debit Card.
1.2.7 Mutual Authentication Also refer to 4.3 Mutual authentication involves both parties authenticating themselves to each other. It’s a two-way transaction. IE, the server authenticates itself to the client and the client authenticates itself to the server. As described in section 1.2.1, Kerberos can be configured to use mutual authentication. Another option is for a client and a server to trust a third party, such as a certificate authority, which can authenticate each party to the other. Why bother to do this? Shouldn’t the client trust their organization’s server? MAYBE. But most likely, the answer to, “Shouldn’t the client trust that arbitrary e-commerce site they reached via a web link?” is PROBABLY NOT. The client may want to verify that it is connecting to the real server it requested, rather than an impostor run by a malicious user. If you’re connecting to an e-commerce web site, and about to provide your personal information and credit card number, you might want to make sure that the server really is the one you think it is. Malicious users have perpetrated more than one web scam by duping users into entering credit card information into a fake copy, run by the scammer, of a well-known ecommerce site.
1.2.8 Biometrics Biometrics provides authentication based on something you are (physiological) or something you do (behavioral), not something you know, such as a password.
Currently the most popular biometric mechanism involves software that measures how long you hold a key on a keyboard and the speed at which you type. This keystroke-analysis software would be an example of a behavioral biometric device, which works because your typing style is almost as unique as a fingerprint. It is popular because it is non-intrusive (as opposed to “hold still while the laser scans your eyes”) and also the least expensive option. Other behavioral biometric options include voice recognition and signature scanning. See also section 5.1.1.2 for more information on biometrics. Physiological biometric options include fingerprint scanning, iris or retinal scanning of the eye and, as visitors to some Disney theme parks have experienced first-hand, various types of hand-scanning. Different biometric identification mechanisms are appropriate for different situations—when authenticating employees, citizens, and customers—and not all may be perceived as acceptable in all situations (do your customers really want to be authenticated at your site with their fingerprints?). Success Owl!
Biometrics Biometrics provides authentication based on something you are (physiological) or something you do (behavioral), rather than something you know, like a password. An example biometric technique would be fingerprint scanning.
For more information about biometrics, at a management overview level, including discussions of privacy and the uses of biometrics in various vertical markets, see the book Biometrics[22] by Nanavati et al. Real World Owl!
To Encrypt or Not To Encrypt? That is the Question What types of authentication are in use on your network? Don’t forget to look into the types of dial-up networking (PPP) and web application authentication used. Why are those important? They may not encrypt passwords as strongly as your network logon, or not encrypt them at all. Experience says users like to re-use the same password in multiple places. What if you’ve taken care to make sure your network logon does not involve transmitting a password across the network … but an in-house web application frequently does exactly that, and some users use the same password for your network and that web application?
[15]
Smith, Richard E., Authentication, Addison-Wesley, 2001. http://www.nerdbooks.com/item.html?id=0201615991 [16]
http://www.ietf.org/rfc/rfc1510.txt
[17]
http://www.faqs.org/faqs/kerberos-faq/user/
[18]
Todd, Chad and Norris L. Johnson, Hack Proofing Windows 2000 Server, Syngress, November, 2001, http://www.nerdbooks.com/item.html?id=1931836493
[19]
Feghhi, Jalal and Jalil Feghhi, Secure Networking with Windows 2000 and Trust Services, Addison-Wesley, February, 2001, http://www.nerdbooks.com/item.html?id=0201657783 [20]
Windows 2000-MIT Kerberos Interop Trip-ups Draft,” http://ldapproject.berkeley.edu/calnet-ad/ad-test/kerb_interop_trip-ups.html [21]
Krahmer, Sebastian, “Cheating CHAP”, http://packetstormsecurity.nl/groups/teso/chap.pdf, February 2002. [22]
Nanavati, Samir, Michael Thieme, Raj Nanavati, Biometrics, John Wiley, October 2002. http://www.nerdbooks.com/item.html?id=0471099457
1.3 Non-essential Services and Protocols By simple math, the more services and protocols a host has running, the more targets an attacker has to aim at. As an example, if he can’t find an exploit for “Sulphur FTP Server v1.0”, running on the host, he can move on to attacking “Ravian SNMP Management Tool v2.3”. An important question to ask is, if the host in question is simply a file and print server, are these extra services required? They may be installed by default as part of the operating system, but they provide potential routes into an organization by the unwary system administrator. Similarly, unnecessary, but open ports on boundary firewalls are inviting targets for attackers to probe. You can often reduce your network’s vulnerability to both random and specifically targeted attacks, simply by disabling non-essential components and protocols. Success Owl!
Better the Odds The more services and protocols running on a host, the more potential vulnerabilities it has. Disable or filter out access to all services and protocols except those that are absolutely necessary.
When determining which services to run, and which to disable, there are two possible approaches you can take. First, you can choose the optimistic route. This involves leaving everything exactly as it is, and only removing services and closing access points (such as firewall ports), as they become an issue. An example of this involves the IIS.htr remote overflow exploit[23]. An optimistic system administrator may put a default installation of IIS onto the corporate network and hope for the best. Then, when the .htr advisory is released, the system administrator may choose to disable the .htr extension filter only. Unfortunately, because the administrator was on holiday and didn’t read the advisory until 3 days later, the corporate web server was already broken into and “Trojaned” (see 1.4.2) before the hole was closed. Now, the administrator has a lot more than just an IIS extension filter to worry about. This is why the second approach is recommended: it’s proactive, rather than reactive. The second approach is the pessimistic route. You take the view that nothing on your network is required, and close every port, service and share before issues arise. This involves changing settings on servers (disabling unused services, removing shares) and on the
routers and firewalls (setting up “rules” that restrict connections to and from ports on your organization’s machines, allowing only those types of connections which are specifically needed). You then open only the ports that are specifically required and justifiable, while keeping firewall rules extremely tight. Let’s look at some specific examples. A corporate web server that is publicly accessible from the Internet would only require port 80 inbound to be opened on the firewall—a web server should never independently make a connection outward, and unless it’s running other services (for example, SSL, which uses port 443), it should never be on anything other than port 80. This methodology extends to services on servers themselves, as well. That is, unused options or subsystems of services should be disabled as well. For example, the IIS exploit mentioned above would be ineffective against this corporate web server if the system administrator had disabled unused IIS extensions prior to deploying it. This approach does not stop at boundary firewalls, routers and servers. “Defense in depth” is an important concept. Don’t rely on a single barrier to protect your sensitive data and system operations. Instead, erect multiple zones of security around your resources, to help ensure that they cannot be compromised if a single security mechanism fails due to a software bug, operator error, etc. Apply the same level of security to your internal systems as you would to your external systems. Remember that according to various studies up to 80% (average +/- 70%) of data compromises come from within. (These numbers vary widely, with recent figures trending substantially lower—around 30%. Nevertheless, keep in mind that internal attacks generally are more likely to be successful, and result in higher-valued losses, so even if they are in the minority, they’re worth paying attention to.) The exact specifics of doing this vary based on where you are disabling things. Each router manufacturer typically has its own command language or menu system for enabling and disabling TCP/IP protocol ports. Similarly, each OS has a different way (sometimes more than one) to control services and TCP/IP. It’s best to see your vendor’s documentation for the most up-to-date information on how to do this. The good news here is that extensive preventive pessimistic tweaking is becoming less necessary as operating systems evolve. More and more frequently, we’re finding services, like FTP on certain Linux distributions, and the IIS web server on Microsoft Windows .Net Server, disabled by default “out of the box”. Remember of course that a balance must be struck between functionality and security. If your organization is impeded from conducting business due to excessive security restrictions, your salary may be drastically affected! Section 5 deals with Operational and Organizational Security. Real World Owl!
Have a Test Bench Find a server on your network that you can use for an experiment (this usually means, a server not in active use at the present time!). Ideally, choose one that can be accessed from the net. What services are running on it? On many systems, you can get a good start on determining this with the “netstat –a” command, looking up the port numbers listed for each
local connection, in a recent port numbers list, such as the one from the Microsoft Windows 2000 Resource Kit[24]. For UNIX and Linux systems, you can also consult inetd.conf, to find out what servers are available, but which don’t run until they receive a network request for that service.
Pop Quiz 0000.00
Pop Quiz 0000.00 Questions 1. Kerberos design assumes that A. B. C. D.
Mutual authentication must take place Mutual authentication is optional Passwords are encrypted Passwords are in cleartext
2. The process of sending data to a target system and analyzing its responses in order to learn about that system is known as? A. B. C. D.
TCP/IP Hunting Spoofing Dos OS Fingerprinting
3. A popular backdoor program is known as A. B. C. D.
PC Anywhere Microsoft RDP Net Spoofing NetBus
4. Backdoor programs A. B. C. D.
are how virus program install themselves are sometimes found as rootkits require formatting the drive for safety after they are found all choices are correct
5. Modification of the source IP numbers in a packet is called A. B. C. D.
firewalling the Mitnick transaction normal spoofing blind spoofing
Answers 1. B. *Mutual authentication is optional
C. *Passwords are encrypted 2. D. *OS Fingerprinting 3. D. *NetBus 4. B. *are sometimes found as rootkits C. *require formatting the drive for safety after they are found 5. C. *normal spoofing D. *blind spoofing [23]
http://www.eeye.com/html/Research/Advisories/AD20020612.html
[24]
“Port Assignments and Protocol Numbers”, http://www.microsoft.com/windows2000/techinfo/reskit/samplechapters/cnfc/cnfc_por_zqyu. asp
1.4 Attacks To make a general statement, you can split malicious attacks into 2 broad categories— Protocol/Service based and Application based. While application based attacks strike at flaws in pieces of software (such as the IIS Unicode attack, which allowed attackers to traverse out of the website directory structure and into the operating system of the machine running it), protocol attacks (such as Teardrop) strike at the standardized mechanisms used to transfer data on a network. No matter whose implementation of that protocol you’re using, it will generally be vulnerable to a protocol-level attack if one exists. In some instances, the protocol or service can be used against itself. An attack is frequently based on an exploit that is specific to an OS or program. A technique known as OS Fingerprinting is used to determine the OS used on a particular target, and therefore the potential exploits which might be usable. OS Fingerprinting is accomplished by sending various TCP/IP packets, designed to provoke somewhatunusual responses in certain vendors’ TCP/IP implementations, to a target and observing the results. When known OS-specific responses are received in response, the fingerprinting program can identify the OS that the target is running (and often the version and even service pack/patch level). Success Owl!
OS Fingerprinting OS Fingerprinting is a reconnaissance technique used to determine the OS that a machine is running. An attacker may use this technique to find any machine running a certain OS, so that he can try out an OS-specific exploit, or he may use it to find out what OS a specific target machine is running, so that he can select an appropriate exploit to use to attack it.
Figure 4: While not a speedy as Linux version, NMAP for Windows is still a powerful tool Real World Owl! NMAP & More What can an attacker find out about your servers? Use one of the tools they use, and find out! If you want to see how well an OS’s TCP/IP behavior can identify your server’s OS, check out the Nmap tool, available at http://www.insecure.org/nmap. Nmap is available for both Linux and Windows. If using Windows, we recommend sticking with the command-line version of the Windows program, since the GUI front-end seems to still have some bugs as of November 2002.
1.4.1 DoS/DDoS One of the more popular attacks of recent times is the DoS attack, or “Denial of Service.” A DoS attack does just what its name suggests—denies legitimate users access to some network or system service. It’s based on a simple premise—the attacker attempts to flood the target with large amounts of data, with one of two results: • •
The network it sits on becomes saturated with this data and is thus unusable. Eventually, a device on the network (such as a firewall or router) or the targeted host itself will succumb to this flood of data, and stop serving legitimate requests
A variant on this attack—DDoS, or “Distributed Denial of Service”—produces the same result by sending a coordinated flood of data from multiple hosts, generally from multiple locations around the Internet. These hosts are usually machines that the attacker has previously broken into and “Trojaned” with a “DDoS client” such as Trinoo, whose purpose is to stage a DoS attack on a target system. At the attacker’s signal, these hosts spring into life and start sending data to the target as quickly as possible. This type of attack is becoming more of a concern as more home users gain broadband connections and place systems on public networks without properly securing them first. Success Owl!
DoS/DDoS
A Denial-of-Service (DoS) attack is an attempt to flood the target with data, so that either the target network is saturated with data, or the target host is saturated with requests, resulting in services being denied to legitimate users. A Distributed Denial-of-Service (DDoS) attack is a DoS attack implemented by staging a DoS attack against a target from multiple systems simultaneously. Trinoo is a classic DDoS tool Not only are DDoS attacks a pain for the target system and its network, they can also seriously hinder the function of hosts/networks used to stage the attack, and waste the time of the admins of all the involved networks. Can you imagine, as the administrator of your company’s network, getting a call from a far-off network administrator complaining that they’re getting one of these attacks from your direction? Presuming that you verify that the packets really are being sent out from your network (rather than being forged, and merely claiming they’re from your network), you then have to do two things: • •
Get rid of the problem packets, generally by yanking the source machine off the network Find out exactly how much of your network has been compromised, and take appropriate corrective action
Given that the (probable) script-kiddie has actually gotten ON to your network, as opposed to poking at it from the outside (as with the target of the DDoS), you’ve got work to do, and probably something to explain to management. In this way, being an unwilling assistant to a DDoS attack tends to have consequences that are more annoying, for a longer time, than being the target of one. Author Helen says, “Trust me, I’ve been there on both sides. Despite my best efforts, someone got in via a zero-day Linux exploit and my domain became an unwilling participant in someone’s attempt at revenge on a fellow IRC user they decided they just didn’t like. Unless you’re Amazon.com or a site which loses tens of thousands of dollars for every minute of network downtime, it may be worse to be unwittingly on the sending side of a DDoS attack, than to be the target.” There might even be legal liability for maintaining a system security configuration that allows someone to get into your network and stage a denial-of-service attack against a target -- and the target may indeed come knocking on your door if it experiences significant losses. Of course, this assumes that you can actually identify the source of the DDoS. All bets are off if you are the victim of a DDoS attack staged with software that forges the ‘source’ IP address in the attacking packets. In that case, you, the target, are likely to have a very bad day (until ISPs start communicating and narrowing down where the attack is coming from, by looking at traffic through their networks).
Figure 5: First a Black Hat installs a backdoor to make machines on fast connections (DSL/Cable) to make many ‘Zombie’ machines. At a synchronized time, all the zombies direct requests to a single site
An early DDoS attack To help you understand how a DDoS happens, here is a brief account of a recent incident. February 2000 gave rise to the first widespread amplified attack. The nature was serious enough to involve the Federal Bureau of Investigation (FBI) and the President of the United States. The first site attacked was Yahoo!. The Information Technology group initially thought it was a case of equipment failure. The flood peaked at one Gigabit per second, and the service was down for five hours. Buy.com was the next target, the next day. Coming from different points, the flood ran about 800 Megabits per second, from different sources. Later that afternoon, it was time to sink eBay. This firm did not release information about the amount of data traffic involved. Their only response to questions when pressed for technical details was, “We are taking multiple measures to fight this.” How was the attack accomplished? High performance computers with access to large Internet connections were targeted by port scanning to find security holes, allowing access to the root account. As mentioned in chapter two, a daemon is a servant. The attacker installed Unix daemon on the machines. Using strong encryption, the attacker told the daemons what IP addresses to attack. Using a client machine, the attacker launched the entire distributed daemon at once. The missing piece in the equation, in the heat of the battle was, where all this processing power and Internet access with such bandwidth originating from? The attacker planted the daemons on some of the most powerful computers with ‘fat pipes’ at the locations with the least security—namely, large college campuses. To make these attacks harder to block, attackers normally spoof the source IP address of the data to appear as though it originates from a different network. This makes it harder for the
network administrators (whose devices this flood is passing through) to filter and drop the data. Due to their simplicity DDoS attacks are a favorite tool of “script kiddies”, a term used to describe amateur hackers with little skills, who just use tools and exploits created by other people without really understanding what they are doing. It takes surprisingly minimal work and skill level to run an automated IIS hack script against an IP subnet, successfully break into a number of unsecured web servers, and then, Trojan them for use in a DDoS attack.
How and Why do these attacks work? Unfortunately, having sufficient bandwidth to cope with the flood of data is not necessarily enough to protect you. These attacks not only exhaust bandwidth, they can be specifically targeted to take down hosts on the network by resource exhaustion. For example, if XYZ Corp has a single web server sitting on a 10gigabit line to the Internet, it is unlikely that an attacker could summon enough DDoS clients to sufficiently exhaust the bandwidth on XYZ Corp’s network segment. However, they may attack the web server directly. To understand how this can be done, let’s briefly examine how the TCP protocol works, and explore how characteristics of the protocol can help an attacker stage an attack called a “SYN flood”. When a user somewhere on the Internet wishes to view a web page on XYZ Corp’s web server, they type the domain name into their web browser. After name resolution has taken place, and the client machine knows the IP address of the web server, it sends a TCP SYN packet to it. The web server then allocates the client a port to communicate on and replies with a TCP SYNACK packet. Finally, under normal circumstances the client will reply with a TCP ACK packet; the TCP session will be established and the HTTP data will be transferred from web server to client. This SYN-SYNACK-ACK conversation is known as the TCP 3way handshake. One of the more famous DoS techniques is to modify this TCP 3-way handshake so that the opening part of the handshake, the Request to SYNchronize, is sent again and again, without closing the sequence by accepting the acknowledgment from the first request. The modified handshake is produced by a low-level program specifically designed to create the SYN Flood DoS situation by making repeated connections to a server and sending SYN requests, without terminating the TCP conversation properly with an ACK. Since the server does not think that the conversation’s handshake has been completed, it keeps each SYN request in its table of “connections in progress.” As more and more partially open connection requests accumulate in the target’s system tables, the target eventually reaches the point of being unable to handle additional requests. When this happens, the server is unable to accept new connections, and thus, legitimate users are prevented from accessing the server. Generally the time that the TCP stack waits before resetting a port is more than enough for an attacker to send new requests to exhaust more resources. As you can see, this type of attack is called a SYN Flood, as flooding the target with SYN packets is precisely what it does. Success Owl!
SYN Flood A SYN flood is a DoS technique in which the attacker initiates many TCP connections to a server, but omits the final portion of the TCP 3-way handshake, leaving the target’s reply to it un-ACK’d. This results in many half-open connections on the target system, which use up its resources,
eventually causing that system to deny access to legitimate users. There are many other variants on the DoS attack. ICMP (more commonly known as “ping”, after the command line tool) floods are used to send ICMP_ECHO packets to a single host, which quickly and exponentially exhausts bandwidth on the target host’s network. The reverse ICMP flood, or Smurf attack, sends a ping to the broadcast address of the target network. Because packets sent to the broadcast address are seen by and responded to by all hosts on the network, you potentially have hundreds of machines replying to one single ping packet. As you can imagine, this would also quickly exhaust the available bandwidth. Success Owl!
More DoS Attacks Other DoS attacks include variants on the ping flood, IGMP fragmentation, out-of-bounds nukes and teardrop attacks.
What can I do? DDoS attacks are hard to prevent, and are, unfortunately, a fact of life on public networks. However, there are some simple precautions you can take. First of all make sure you have a good relationship with your ISP and that you have an emergency contact number to reach a technical person. Time wasted calling around to find the right person to help means time wasted getting your public services back online. Second, many operating systems & TCP/IP stack implementations provide an option to change the timeout on a TCP conversation. If you are able to reduce the amount of time before the reset of an unfinished TCP connection occurs, you will make it harder for an attacker to continually keep the server’s resources occupied. Some operating systems such as Windows 2000 and routers also include specific SYN Flood attack protection options. Real World Owl!
Preventing SYN Attacks Research whether your OS provides the TCP handshake timeout option, or other SYN Flood protection options. For example, some Windows 2000-related information is available from Microsoft and assorted third parties. This documentation also includes references to several other sources of DoS and DDoS defense information.[25] Does your OS provide useful configuration options? If so, experiment (on a non-production machine!) with smaller values for the timeout, and see if you can reduce it without impairing the ability of other systems to connect to that machine, and also check out other options designed to help protect your system against DoS and DDoS.
Third, consider whether to configure your boundary routers and firewalls to drop ICMP packets. This is both a blessing and a curse. It does reduce the effectiveness of ICMP floods by preventing any responses from inside your network (note that it cannot by definition prevent ICMP packets from actually arriving at your network boundaries), however, troubleshooting network connectivity problems becomes much more difficult without the help of the good old ping and traceroute (or tracert for Windows users) commands, which use ICMP and won’t get through an ICMP block.
Finally, be a good netizen. If client machines on your private networks have access to public systems, implement a technique known as “source filtering” on the firewalls and routers at the boundaries of your network. Source filtering prevents spoofed IP packets from leaving your network, as any device they pass through will check the source address against the known local network numbers. If the source IP address does not match an internal subnet, the packet is considered bogus, and discarded. We’ll discuss this more in section 1.4.3, on Spoofing.
1.4.2 Backdoors A backdoor is a deliberate configuration or specific program designed to allow access to a system without requiring the usual security checks. This doesn’t necessarily mean it’s solely for a hacker’s benefit. A system administrator may indeed leave a backdoor into all client PCs that he installs for users just in case they inadvertently lock themselves out. However, the type of backdoor we are concerned with here is the malicious kind. Malicious backdoors range from simple to complex and feature-laden. One of the simpler backdoors is NetBus, a Trojan (see section 1.5) that allows complete remote access to any system it’s installed on. It provides a remote-control type desktop, much like PCAnywhere or Microsoft Terminal Services, giving an attacker complete control over a machine as if they were physically in front of it. NetBus is relatively unsophisticated though, and easy to detect. A far more complete backdoor package is BackOrifice. BackOrifice even provides a configuration screen where you select the modules you wish to include and the overall configuration of listener ports, behavior, etc. When you’ve set your configuration, BackOrifice builds a custom executable for you to distribute as you wish. There are a wide range of modules available for BackOrifice, including port mappers, remote control, key capturing and application binding (where your BackOrifice executable attaches itself to system files like a virus). Success Owl!
Back Doors A backdoor is a program or deliberate machine configuration designed to allow an unauthorized attacker access to a system without the usual security checks, such as user authentication. Malicious backdoors include the NetBus and BackOrifice programs.
What’s a Rootkit? In addition to providing an unauthorized way into the system, a malicious backdoor may include additional functionality to hide itself or provide additional capabilities to the attacker. For example, backdoors are often paired with software packages known as rootkits. Rather than attaching themselves to application programs and running on top of the host operating system, rootkits attempt to drill down to the kernel level or OS utility level and replace, modify or divert core operating system functions. A rootkit is not a type of attack, but rather a set of utilities that an attacker can install on a system once compromised. In effect, they support the use of a system by intruders through a backdoor. These utilities alter system data files, configuration/registry entries, and even system-supplied programs and operating system libraries. As a basic example, a rootkit with a filename rootkit.exe may contain
programs to prevent any process (like Windows Task Manager) from showing this file in its output. This makes them very difficult to detect, as they are operating at the kernel level and effectively filtering what applications and users are allowed to see. Normally, rootkits are seen under (and originally come from) UNIX based operating systems, however, versions are available for Windows[26]. Rootkits take their name from the UNIX system administrator name “root”, which has complete control over the system—they literally are “kits to provide you with root access” and ways to maintain it by hiding your activities and the existence of the rootkit itself on your system. Success Owl!
Rootkit A rootkit is a set of one or more utilities used to replace core OS functions, with the goal of giving additional capabilities to an attacker, including the ability to hide their presence from legitimate system users. Rootkits are often used in conjunction with, and may even be built in to, backdoor programs by script kiddies.
One of the more insidious facets of rootkits (also true of Trojans, worms and viruses, described in section 1.5) is their creation and purpose. To code a Trojan or rootkit requires a detailed understanding of the target system’s architecture and some considerable coding ability. But to use these tools requires only a few point-and-click type operations, which again makes them favorite tools of the script kiddie. Searching Yahoo for “+rootkit +download” returned almost 1,400 matches, which seemed to be split between tools to detect rootkits, and tools to create them. Check out www.rootkits.com, or http://www.megasecurity.org/Tools/Nt_rootkit_all.html for more information.
How do backdoors get onto a system? Generally, backdoors can appear on a system when an attacker does one or more of the following: • •
•
•
Exploits an OS or application bug on the target system, to transfer a file to that system, then run the file to create the backdoor Sends an email that the user is tricked into opening. Opening the email runs the program that creates the backdoor. (With some email clients, just previewing a malicious message may be all it takes to install a back door). Replaces a legitimate copy of a program available for download by the Internet, by one with backdoor functionality, which is unwittingly downloaded by users and installed Includes undocumented backdoor functionality in a purportedly legitimate application. When that application is installed, the back door is as well
Figure 6: A computer used for non-business use can become infected with a back door Frequently overlooked as sources of backdoor access, user-installed applications that have legitimate purposes can be misused by unauthorized users. As we mentioned at the beginning of this section, not all backdoors are developed or installed by those with malicious intent. Nevertheless, a user who installs VNC on his office computer so that he can access his desktop machine from home creates an inviting target for an attacker, especially if he has not configured a session password. NetCat, a network administration tool, can also become a potential backdoor. With a single command under Windows, it’s possible to get NetCat to bind a command shell to a port so that incoming telnet sessions on the port receive a DOS prompt as if they were sitting at the local machine. Legitimately installed network diagnostic tools can be quickly turned against the infrastructure by an attacker.
Figure 7: Once a back door in installed a secure tunnel through a firewall can give a black hat an ‘in’ which cannot be discovered due to the encryption
How do we stop back doors? Most modern anti-virus software will quickly pick up backdoor software, however, very new Trojans or rootkits can be easily missed. In this instance, detection becomes much harder. (One lesson to take from this is that you should keep your anti-virus signature file as up-todate as possible, to maximize the number of backdoors it can detect.)
Even if your anti-virus software doesn’t identify a particular backdoor, analysis of network traffic and processor/memory utilization will usually yield some clues. Once a computer has had a backdoor installed, it generally cannot be considered safe to use until it has been wiped and rebuilt from scratch. Take the machine off the network immediately (but do not power down, as that may remove evidence) and perform your forensic investigations. Once you have finished, power the machine down, boot from a write-protected “clean” floppy disk and remove all data & partitions from the system. Then reboot using your operating system install floppies or CD, and reinstall the operating system from scratch. Success Owl!
Infection = Nuke ‘em The safest way to recover when you find out that one of your systems has had a back door installed is to completely wipe that system’s disk and reinstall the OS, after taking the machine off the network and performing whatever forensics are required. Doing anything less than that risks leaving some remnant of the back door, or the means used to install it, on your system and leaves the system more open to attack.
Backdoors are also one of the best reasons for ensuring your firewall rules are correctly configured. Someone installing a backdoor which listens for network connections can often set it up to listen on any unused TCP/IP port. Stick to the “Deny by default” methodology and ensure that your firewall prevents all but the minimum requirement of traffic to pass through it. Yes, this means denying access even to ports on which you “know” you are not running services—just in case someone else decides to start a bogus one up on one of those ports. If, an attacker configures their Trojan to listen for incoming connections on port 31337 and your firewall only allows traffic to pass on port 80, you’re making it much harder for them to gain further access into your network. Real World Owl!
netstat –a to the rescue Is your system running any of the common backdoor programs? Take that list of “netstat –a” results that you generated earlier and inspect it for known backdoor ports per the list in the SANS Intrusion Detection FAQ.[27]
1.4.3 Spoofing The word “spoof” or “spoofing” is defined as “a hoax” or “to deceive”. When applied to networking, spoofing is the practice of making data appear to originate from a source different than its true origin. We’ve already talked a bit about how this technique, combined with DDoS, can cause major headaches.
How TCP/IP permits spoofing To understand how spoofing can happen; we need to go back to the origins of TCP/IP itself. TCP/IP was originally developed by the Advanced Research Projects Agency (ARPA), which is the research arm of the Department of Defense, in the 1960’s and 1970’s. Its goals included
flexibility (to handle applications from file transfer to voice over IP), redundancy (allowing for multiple routes between two sites, so that communication didn’t depend on a particular path through the inter-network being available) and decentralization (so that the destruction of one machine couldn’t bring down the network). TCP/IP is very good at adapting to changes in the network structure, since it is packet-switched rather than circuit-switched. For example, if you are sending packets from site A to site D, and in between the packets pass through sites B and C, if site C goes down TCP/IP detects the problem and finds another route to D, and the conversation continues normally. The applications communicating with each other don’t even need to know that there was a problem. This packet-switching approach is part of what makes TCP/IP a viable protocol suite for decentralized networks like the Internet—since administrators of Internet sites control only their own networks, the Internet needs to be smart enough to maintain communications even if some intermediate site disappears in the middle of a conversation. At the time TCP/IP was designed, ordinary users of machines on TCP/IP networks were expected to not possess elevated user privileges, such as Administrator or root. Most TCP/IP protocol details were implemented inside the operating system and this model meant that unprivileged users would never have the chance to interfere with packet structures or sequencing. The designers appear to have figured, “If you have physical access to a network device, or a privileged account on it, it must be OK for you to do whatever you wish with it.” This led to network nodes trusting the packets they received, despite the lack of any failsafe way to guarantee that each packet really did originate from the source IP address it claimed, adhered to the protocol specs, and had not been tampered with in between. This blind trust caused a few problems when TCP/IP began to be used outside of trusted networks. Because TCP is inherently a 2-way communication protocol (unlike UDP, which is a “fire and forget” protocol) with acknowledgements and packet delivery guarantees, there has to be a way to identify where the data is coming from and where replies should be sent. The origin of the packet is called the “source IP address” and is held inside every TCP packet’s header (a packet header is a section of information at the start of every packet sent across a network). Under normal circumstances, a user would load an application such as a web browser and type in the address of the website they wished to view. The network stack in their machine would create the appropriate packet (in this example, an HTTP request packet), add the packet header including the user’s machine’s IP address in the “source IP” field, and send it off across the network. However, if the user has sufficient privileges on their machine, it is possible for them to change the contents of the packet header before the packet is sent. This allows them to change the source IP address in the packet header, thus “spoofing” their IP address by making the packet appear to originate from a different source.
Problem #1—It enables a DoS attack to be an even greater nuisance In the example of a user browsing a website, this technique is fairly pointless. However, if this technique is used in conjunction with a Denial Of Service attack (as discussed in 1.4.1), an attacker can use this to their advantage. First, they can hide their true source IP address, which, in today’s world of lawsuits against hackers is a fairly strong motivation, making it difficult to trace them. Secondly, they can continually change the source IP address of the DoS packets, making it hard for network administrators to drop the packets at firewalls using source IP address filters. To take it a stage further, an attacker could spoof the source IP
address of the DoS packets to make them appear to originate from within the target’s network. While this technique may not always work, it can give poorly configured firewalls and routers a lot of difficulties. This is why we recommended in section 1.4.1 that you implement router rules against this. Success Owl!
Spoofing Spoofing is an attack in which packets are made to appear to originate from a system other than the one they really originated from. If your network monitor or Intrusion Detection System detects that you are receiving packets from the Internet which list an address on your internal network as the source IP address, it is likely that you are experiencing an IP spoofing attack
Figure 8: By forging IP header information at computer P, computer B falsely responds to computer A. Given enough packets a DoS occurs
Problem #2—An attacker can pretend to be from a trusted host In addition to obscuring the attacker’s identity during a DDoS, IP address spoofing can also be used to circumvent trusted host configurations. Kevin Mitnick publicized this as a technique he used to break into a bank’s transaction system. To see how this can happen, we’ll look at an example. To set the scene… A company has 2 systems to control its online automated purchasing service. System 1, let’s call it Freedom, controls the stock and picking system. System 2, let’s call it Spirit, controls the banking credit and debit system. Whenever an order or goods return request is placed, an application on Freedom reduces or increases the stock count as appropriate, and sends a purchase/refund request to Spirit. Spirit then connects to the bank and completes the transaction. Because both Freedom and Spirit sit in the company’s backend network, the inexperienced system administrator believes that it would be safe to configure them with a trusted host system only. In other words, he configured Spirit so that it would only ever accept connections from Freedom, because that’s the only host that should ever talk to it. Both systems are, however, completely secured and up to date with patches etc.
So if the systems are secure, how can an attacker use this configuration to their advantage? The answer lies in IP spoofing. While the attacker can’t actually break into either Freedom or Spirit, he can control Spirit’s behavior by manually creating packets with Freedom’s IP address as the source. If the attacker crafts a packet containing data to make a transaction of £1million into a bank account, then sets the source IP address to Freedom’s IP address, when Spirit receives this packet it will check the source IP, see that it matches Freedom’s IP, process it as normal and the fake transaction will go through. While this is a slightly wild example, the theory is valid. Because the IP stack itself does not provide any measures for verifying the source IP address, systems that do not employ other measures are vulnerable to this type of spoofing attack.
Types of spoofing It should be noted that spoofing is broken down into two categories—normal spoofing, and “blind” spoofing, denoting the type of control an attacker has. Normal spoofing, which is a combination of IP spoofing and packet sniffing (see 2.5.4.1), is easier to control. Because the attacker is faking the source IP address of the packets he is sending, the responses from the target machine will obviously be directed to that source IP address, and not the attacker’s “true” IP address. This means that for the attacker to see the responses of the machine he is sending these spoofed packets to, he must sniff the network and use a packet capture & decoding tool to read the responses of the machine. Taking the Freedom/Spirit example again, when the attacker sends spoofed packets to Spirit with Freedom’s IP address as the source, Spirit will send its replies back to Freedom. To read these replies, the attacker must sniff the network and decode the packets as they are sent. To do this, the attacker must be able to place a network card on the same network segment as the hosts into promiscuous mode. However, tools such as Antisniff [28] are able to detect this. Blind spoofing removes the requirement for sniffing the network, and operates on a “best guess” principle. The attacker sends spoofed packets to the target as before, but instead of sniffing the network and reading the replies, he just guesses at what the replies will be in hope that when he has completed his attack, the system will have performed the actions he requested. The advantage here is that packets can be sent from any network that has a route to the target and there is no requirement for sniffing the reply packets on the target network. It does of course make the attack harder to perform because if it fails the attacker has no way of diagnosing what went wrong. At this point you should note that there are legitimate uses for changing a packet’s source IP address. The most obvious one is NAT, or Network Address Translation, where a device, such as a router, deliberately and legitimately rewrites packet headers. See 3.3.3 for more information. Unfortunately, the problems spoofing presents do not end here, as we’ll see in future sections.
How can we protect our network from spoofing? To help prevent against spoofing attacks being successful on your own network, set up a router filter that does not allow outside packets whose source address is set to a host in one of your internal networks, into your network. This will catch most (some?) spoofing attempts originating outside your network, directed toward your network. It will not catch attempts made from inside your network (spoofing the address of another internal host, perhaps in an attempt to gain privileges), or attempts made against a third party’s network in which your network is listed as the origin of the attack in the source IP address. Additionally, you should also filter outbound packets, ensuring that no packets with a source IP address that is not within your network are allowed to leave it—a malicious user is likely spoofing such packets. (If everyone did this, the spoofing problem would largely disappear. The fact that spoofing is still an issue clearly demonstrates that, amazingly, years after spoofing first became a common occurrence, not everyone has gotten around to this yet.) Real World Owl!
No Spoofing Do you have rules on your Internet gateway router to prevent spoofed traffic going in or out? If not, research how to add such rules on your particular equipment, and then do so. As with any network configuration modification, test this after hours before implementing it on your network—and be ready to reverse it at a moment’s notice if all of a sudden the CTO calls you asking why his network analysis program (which for some reason known only to deities tweaks source or destination IP address inappropriately) stopped working.
1.4.4 Man in the Middle The Man In The Middle attack, or MITM for short, is another attack made possible by lax security in the IP protocol. As we already know, a normal TCP/IP conversation takes place between 2 hosts, and involves the sending, receiving and acknowledgment of packets. An MITM attack can be compared to inserting a black box in between the 2 hosts participating in the conversation. If an attacker can place himself in a position where he is on the network between the two hosts, it is technically possible for the attacker to control what data is sent between the hosts. The attacker’s machine does not have to be physically between the two hosts… the other two machines just have to be convinced to route packets destined for the other host through the attacker’s machine. Going back to the Freedom and Spirit example above, assume now that Freedom and Spirit communicate with each other, but instead of using a trusted internal network, they exchange information across a public network. How does the attacker ensure that all packets sent between the two hosts pass through their machine? One way to do it would be for the attacker to set up a machine with two network cards, then send out fake ARP requests to force packet routing between those two hosts to go via his machine.
(Remember that ARP is used to link IP addresses to MAC addresses; the attacker can take advantage of the fact that nothing prevents someone from introducing ARP packets that contain misleading information.) Once the attacker gets the packets routed through his machine, he then takes the incoming packets from Freedom, decodes them and checks the contents. If he sees something he wants, for example a bank transaction he would like to divert, he can rewrite the data in the packet, and send it off to Spirit. By the same token, when packets come in from Spirit destined for Freedom, he can change the contents of those. He can also pass packets through unchanged, if he wishes. Success Owl!
Man In The Middle In a Man-in-the-Middle (MITM) attack, an attacker intercepts packets in the conversation between two network hosts, inspecting and altering them on the fly.
Figure 9: A Man In The Middle needs to be there from the beginning to be successful The effect is somewhat like the spoofing example presented above, however, this is far harder to detect. While the spoofing attack relies on sending brand new packets to a host, the MITM attack is actually changing data sent between hosts on the fly. Therefore, should you ever audit the data to find out why the bank transactions seem to have gone awry, you’ll see that data was sent by Freedom and received by Spirit in correct order, it just “got changed somehow”. Geek Owl! Man In The Middle Explored At this point, it may seem as though all hope is lost, and that no communication on a public network is safe. After all, wouldn’t every so-called hacker be doing this? Well, fortunately not. As in practice, this technique is very difficult to implement. First of all, we have the physical routing issue. As noted above, for this attack to work, an attacker must ensure that every single packet sent between the 2 hosts he is attacking is routed via his machine. Taking the Internet as an example, this is a huge technical issue. First of all you would need to be at least somewhat physically close to the target machines—no matter how hard you try, packets sent between 2 servers in London will not be easily diverted and routed via China. Second, an attacker has TCP Sequence numbers to contend with. In a nutshell, every TCP/IP connection negotiates a TCP Sequence between both hosts. Subsequently, every TCP packet sent between them has a TCP Sequence number included in the packet header. This number is changed for every packet by a
prearranged formula, decided on during the TCP handshake stage. This allows both hosts to ensure they are receiving all the packets in a TCP conversation, and to ensure that the packets are being assembled in the correct order. In other words, the TCP Sequence number is responsible for the quality control of the protocol. If the sequence number of a packet is wildly out of sequence or just plain wrong, the packet is discarded (with a few additional checks). If an attacker is unable to break the TCP Sequence formula, they won’t be able to initiate an MITM attack. Tools such as Nmap[29], mentioned earlier, have options to check the TCP Sequence formula of the IP stack on a machine and inform you how difficult it would be to “break” it. This particular attack strategy is called TCP Sequence Prediction, and crackers have access to tools that do it, so the stronger your TCP/IP implementation in this regard, the better. Third, speed is a major issue. Consider the speed with which packets are sent across a network, even a slow 10megabit link. While applications can quite happily send and receive data at this speed, it poses more of a problem for humans. To perform an MITM attack and change data on the fly through manual would be practically close to impossible, without it having a very noticeable impact on the speed of the connection between the two hosts. The only practical way to do it would be to write a custom application that searched for specific strings in packets and manipulated them to preset rules. This does of course introduce an element for error—one wrongly interpreted packet could cause a change that triggers IDS alarms, and gets an attacker caught. In addition, because the MITM attack manipulates packets already created and sent, you are removing the “luck” factor from a spoofing attack. For example, if you have correctly set up the MITM attack you can be assured, that provided you stay within the parameters of the data, any information you change will be readily acceptable by the destination host. However with a spoof attack, you are effectively working blind, as there is no guarantee that the target host will accept your data. One area where MITM attacks do stand out is in hacking standard telnet user-type connections. Because you’re dealing with a human user on one side, the speed of data transfer will be easily manageable. With a plain-text type connection, such as telnet, you’ll be able to see the user’s passwords and private information exactly as they access it. This is an excellent reason not to employ plain-text authentication and unencrypted command-line sessions on your trusted network. Success Owl!
Telnet and MITM Because telnet connections are very vulnerable to MITM attacks, you are advised to run telnet only over VPN connections, and to replace unencrypted telnet with an alternative such as ssh.
Encryption and secure protocols are one final area to be mentioned here. An MITM attack relies on being able to read the data contained in the IP packets. If an attacker can’t read the data, the attack is useless. Using secure protocols on your network will reduce the consequences of an MITM attack to almost zero. Currently there is no available hardware that
is able to break 3DES-encrypted data quick enough to make an MITM attack impossible if you’re employing 3DES for network communication. Bearing all this in mind, applications do still exist to perform MITM attacks. An example is SW-MITM[30]. It should be noted that the vast majority of tools to perform low-level IP hacks are only available on Unix-like operating systems. The reason for this is simply control. Under Unix, the IP stack is completely open for manipulation by anyone with sufficient privileges. Under Windows this is not the case. In every version of Windows, except XP, the network stack has been kept “private” to the operating system and low-level hacks, such as spoofing, have not been possible. To combat this, a few organizations have coded ports of network libraries such as Eeye’s LibNetNT, which do allow for low-level manipulation. Windows XP, however, contains “raw sockets” which allow for this manipulation natively. This issue has been massively debated and demands for its removal have been championed by Steve Gibson[31], who believes this to be extremely dangerous in functionality, despite it existing well before Windows XP was even dreamt of. For a reality check that the sky isn’t falling, see the recently released Windows .NET Server Security Handbook[32] by Peikari.
1.4.5 Replay Replay attacks are exactly as their name suggests. An attacker uses a packet capture tool to grab and save the packets in a conversation, then resends one side of the conversation to a host as he wishes. In the example of Freedom and Spirit, an attacker may capture a conversation between the machines in which a bank transaction is requested. The attacker may then resend all of Freedom’s packets to Spirit multiple times, causing Spirit to process the same transaction many times over. Success Owl!
Replay A replay attack is one that involves capturing and saving the packets in a conversation, resending one side (generally the client side) of the conversation at a later time, in order to accomplish something malicious such as identifying themselves as another user, or process the same transaction more times than it legitimately occurred.
Again, this type of attack is made possible due to lax security in the protocol. As we have already discussed, every TCP/IP conversation is stamped with TCP Sequence numbers. In theory, no two conversations will generate the same set of numbers due to differences in the seed used and client/server TCP/IP stack differences, amongst other factors. In addition, many operating systems implement pseudo-random number generation for the initial sequence number. It has been proved however than in many implementations, the formula for producing these numbers is weak, and TCP sequence prediction is not as difficult as could be. If an attacker is able to guess the sequence (or indeed flood the network with packets containing likely sequence numbers), he may be able to control, disconnect or insert arbitrary data into a user’s session.
There are countermeasures against this type of attack. Secure protocols such as IPSec operate at the network layer and extend the IP protocol while maintaining compatibility with existing TCP/IP stacks by using additional protocol numbers. The ESP (Encapsulating Security Protocol) portion of IPSec handles most of the security of the protocol, such as authentication, data protection and anti-replay measures. IPSec relies heavily on cryptography and IKE (Internet Key Exchange) to create session keys, which is outside the scope of this section. Cryptography is discussed in section 4.
1.4.6 TCP/IP Hijacking Hijacking involves the attacker forcibly taking control of a legitimate conversation between a server and a client, much as a non-electronic troublemaker might seize control of a car. Hijacking is generally the result of a successful attack using a different technique, such as a replay or MITM attack, allowing the attacker to impersonate a legitimate user. In other words, the intruder intercepts the source side packets and replaces them with new packets sent to the destination. The most common example of this is web session hijacking, where an attacker takes advantage of lax security to take control of a user’s browser session. Most web servers use cookies, small data files accessible by server scripting languages such as PHP or ASP, to authenticate and track users. When a user connects to a website and authenticates, an attacker may be able to hijack their session by loading a hacked cookie or by inputting a specific URL on a poorly configured web server into their browser. The legitimate user will most likely be kicked out, or at least be shown an error page indicating their login has failed. Another opportunity for session hijacking is provided by poorly configured server time-outs. If a web developer makes the session time-out (length of time of no activity before the web server disconnects the user) too long, it provides a larger window of opportunity for an attacker to hijack the session. Hijacking is not limited to web based sessions only. Like (and sometimes using) an MITM attack, hijacking is especially suited to telnet type plaintext connections, where an attacker can watch a TCP session being initiated and data being passed between client and server. If the attacker sees something interesting they can break into the conversation and take control of the user’s session for their own purposes. Success Owl!
TCP/IP Hijacking TCP/IP hijacking involves taking control of a legitimate conversation between a server and a client, intercepting the source side packets, throwing them away and replacing them with new packets sent to the destination. This can be accomplished in a variety of settings—a telnet connection can be hijacked by means of a MITM attack, and a web session can be hijacked by causing the victim’s system to load a “hacked” cookie.
There are several precautions you can take against this type of attack. The most simple is to re-authenticate the user before performing important actions. For web servers, creating unique session cookies also mitigates the risk somewhat.
The more unique the cookie, the harder it is to break and hijack. Finally, if possible, use secure protocols and the employ the same countermeasures used against replay attacks. An excellent resource for further study is available in the footnote[33].
1.4.7 Weak Keys An attack based on weak keys takes advantage of weak keys used to protect encrypted information, or weak passwords for user authentication. If an attacker can “break” a key, he can gain access to whatever that key is protecting—be it data, a logon credential, etc. The term “weak keys” usually relates directly to secure protocols, such as IPSec or SSL. As mentioned in 1.4.5, these secure protocols use cryptography and a key exchange protocol known as IKE to create a secure connection between 2 hosts using session keys. As discussed in chapter 4, a host must “decide” on a mathematical algorithm to use for encryption of secure sessions, such as DES, 3DES or RC4. 40-bit key lengths, and indeed 56bit DES are not considered secure, and modern hardware is allowing attackers (and researchers) to break these encryption algorithms quicker all the time. Unfortunately due to the legacy from old export laws from the USA restricting the export of strong encryption, a significant proportion of servers (especially web servers) still use these weak keys. Weak keys may also include those using only a subset of the permitted characters, or using predictable contents as the key (such as the name of the resource being protected). Success Owl!
Weak Keys The weak key attack takes advantage of the weakness of keys being used to protect encrypted information, including network sessions and password resources. The shorter the key length, the easier it is to break the encryption on a piece of data.
The obvious prevention technique here involves using strong encryption algorithms and strong keys, and combining this type of authentication with others. More will be said about this in the chapter on Cryptography. Much of the rest of this domain overlaps with Domain 4 Cryptography. It appears to be definitional in Domain 1, and more “How” based in Domain 4. Real World Owl!
Stronger keys = Increased data privacy Do you use encryption to protect files or VPN connections? How strong are the keys used to do so? If they’re only 40 or 56 bit keys, research alternatives that use stronger keys.
1.4.8 Mathematical The short story on mathematical attacks is that a key data set with fewer possible combinations is more likely to produce a weaker key. (See 1.4.11.1). Popular belief states that 40-bit encryption is weak, and 128-bit is strong. The idea is that the longer the key, the more possible combinations will need to be tried, to find the correct key value by brute force. This is only a general statement[34], as you will see when you look at WEP in 802.11.
Key length is only part of the story. Another part of the story involves the total number of possible key values. For instance, if a cracker knows that a key consists of 4 bytes, each of which holds a number between 1 and 10 (instead of a number between 0 and 255, the minimum and maximum values which can be held in a byte), that key is much weaker than a 4-byte key in which each byte can hold a number between 0 and 255. Why is this? The number of possible key values is smaller. There are only 10x10x10x10 (10,000) possible key values for the first key, and 255x255x255x255 (4.2 billion) possible key values for the second key, making the second one much more difficult to discover through “brute force” attacks than the first. “Brute force” attacks are discussed in more detail in section 1.4.11.1. Similarly, randomness of the key is important as well. Even 256-bit encryption is pretty useless if the key uses a simple pattern an attacker can figure out, such as 1,2,3,4,5,6 …. Another type of mathematical attack has less to do with predicting the key than it does with finding a way around the problem of not having it. For instance, it may be possible to “break” some encryption algorithms by finding a way to reverse them without discovering the original key (for instance, by finding patterns in how encrypted text is generated). Success Owl!
It All Adds Up Mathematical attacks include those based on the fact that a key is generally easier to break, the shorter it is, and the less the variety in characters used in the key, and those that somehow “break” an encryption algorithm by finding a way to reverse it without discovering the original key.
1.4.9 Social Engineering (Also Refer to Sections 1.6 and 5.1.2) In the introduction you learned that Social Engineering is the biggest challenge we face. Even the strongest cryptography in the world is useless if someone is fooled into giving away the keys to the city that allow an intruder to participate in an encrypted conversation, tunneling right through the firewall to an internal server. Lurking on the Internet, we have learned that the best 'black hats' rely on exploiting human nature more than any technical exploit. For example, they can exploit users’ willingness to give up information they can use to gain unauthorized system access, either by impersonating legitimate users or making themselves sound legitimate (for instance, claiming to be a tech support engineer working for a vendor). Kinds of information that can be gained via social engineering include: • • • •
modem telephone numbers user ID’s and passwords types of software running on important servers information about when certain processes take place on the computer (etc.)
Crackers can also exploit their knowledge of how naïve users think, such as:
• • • •
using weak passwords like “password” putting no password on the Administrator (god) account being willing to share passwords with others not carefully controlling network file shares
The best way to protect against social-engineering attacks is to educate your users on the importance of security, and the types of information that should not be given out to anyone without proper authorization (ideally in person or in writing, since someone could claim, “Joe, our network admin, asked me to call you and get your password,” when you, Joe, had nothing to do with the request). Think you’re clued-in enough to be immune to such attempts yourself? Don’t bet on it. We’ve seen tech-savvy senior admins fall for attempts made by would-be intruders thinking “outside the box”. The attacker doesn’t have to be able to out-think the admin every time to be successful… just once will often do. As with other types of attacks, your goal is to reduce the level of risk—not to completely eliminate it.
1.4.10 Birthday A birthday attack is a type of brute force attack. The name comes from the birthday paradox which states that, as few as 23 people brought together double the probability that two of the people share the same birthday. This may fly in the face of common sense; however it is not possible to argue with the math[35]. The high probability of duplicates within a relatively small number of samples means that it is possible to create a mathematically identical message digest (practically-unique identifier, discussed in the Cryptography chapter) for a different message or document. Statistically speaking, you’ll usually find a duplicate value before you’ve tried even half the possible combinations. Fortunately, the message that produces the duplicate will (in all probability) obviously be invalid (probably a string of gibberish characters rather than coherent words or whatever else the original message contained), and the recipient of such a message would be suspect of it even if the message digest were the same. Success Owl!
Happy Birthday? A birthday attack is a specific kind of brute force attack that takes advantage of the fact that multiple sets of source data can encrypt to the same hash value. For example, it could be used to find another message that would encrypt to the same MD5 hash value associated with an original message. Theoretically, this would let an attacker change the contents of the message. It is referred to as a birthday attack because it takes advantage of probabilities, much like the old trick in which you would bet your friend dinner that two people in a 50-person room shared the same birthday (and you would usually win, due to the odds increasing with each additional person in the room).
1.4.11 Password Guessing A 'black hat' will have in their toolkit several password guessing programs, which automate the process of rapidly testing many potential passwords for a given account. The most commonly used password guessing method is the dictionary attack (See 1.4.11.2) Typically systems help guard against this by logging login attempts, perhaps flagging unsuccessful attempts in big red letters. Also make sure that if your system offers the availability to lock a user account after some number of unsuccessful login attempts, that you use it (somewhere around 3 to 5 seems to be the “magic number” of attempts usually tolerated before you should get worried that someone’s trying to guess a password).
1.4.11.1 Brute Force In a Brute Force attack, muscle (in this case, CPU and/or network muscle) is applied to break through a particular security mechanism, rather than using particular intelligence or logic. “Brute force” is most commonly applied to password guessing, taking advantage of computer power available to an attacker, to try every possible password value, until the right one is found. Even just a couple years ago, brute force was considered difficult due to the lack of lost cost processing capable of the sheer crunching power needed. Today, the AMD 2000XP processor costs less than $100 USD and the 2400XP is shipping. That puts the brute force method within reach of anyone. Rather than go on with the usual blah blah about strong passwords, we are encouraging you to follow the footnote to a free Brute-Force Password Cracking Simulator[36]. Play with this simulator and you will discover that, in general, the longer the password, the more difficult a brute force attack becomes.
Figure 10: Even going for 256 characters, by brute force with a 1.5Ghtz CPU, this password can be broken in less than a day The simulator program is less than one megabyte in size and runs in Windows. Instead of actually attempting to “crack” a stored password, you just set the variables (including testing a real password) and it will calculate how long the brute force method takes. In one test Brute Force with a 1.5Ghtz processor would take 170 years, 309 days, 21 hours, 32 minutes, and 22 seconds to crack 4July1776. However, a dictionary password program would rip that same password almost instantly.
Figure 11: Just adding one special (high-order) character makes a brute force attack almost a month of effort with the same CPU
Success Owl!
Brute Force A brute force attack involves throwing computer and/or network power at a security mechanism until it is broken. Bruce force is commonly used to “crack” passwords, often for user accounts. It can also be applied to ZIP files and many other types of encrypted data. One way to protect against brute force password cracking is to use as long a password as possible, because the longer the password, the harder it is to crack via brute force.
Figure 12: This ten character pass phrase now takes the same CPU a few hundred thousand years to crack
1.4.11.2 Dictionary Currently in the *nix world, dictionary cracking is the most popular exploit. The FAQ of this work states that this is not a treasure map for folks who want to do damage. We have included the footnote to John the Ripper[37] because the download site appears right at the top of Google; so, we are not giving anything away here. John The Ripper works on both DOS and UNIX based systems and a CD can be ordered that contains 20 different languages. It is a whopping $15 USD airmailed to any address in the world. A popular non-free (after 15-day trial) package that can be used to audit Windows NT and 2000 passwords for susceptibility to dictionary attacks is LC4 (aka L0phtCrack 4), by @Stake.[38] By comparing a large number of common words sorted by popularity, the dictionary attack can be quite effective. Additionally, don’t think you’re safe from dictionary attacks if you tack a # or 4 on the end of your password, because dictionary attacks aren’t limited to just trying words that are in the dictionary. It’s common for dictionary attack programs to also propend and append special characters and letters to dictionary words, or even make common numeric/symbol substitutions for letters such as 0 for o and ! for I or L, when trying to determine a password. Success Owl!
Dictionary Attack A dictionary attack is a brute force attack in which common words from a dictionary are used to generate many thousands of potential passwords, which are compared with the real password in some way. If the comparison comes back valid, the attacker knows that the word they tried is the user’s password.
Both dictionary and brute force password guessing attacks can be carried out in one of two ways, one more difficult to detect than the other: •
Encrypting the current “trial” password and comparing it to a copy of the encrypted password that the user has obtained
•
Using some system facility (like a telnet logon) to submit the current “trial” password for login verification, and letting the system’s response tell you whether or not you’ve found the correct password
The first is typically more of a threat since it is more likely to be accomplished without triggering any system alarms, and thus go undetected until the intruder users one of the cracked passwords. It does, however, require that the user have access to the encrypted password values (possible on Windows via tools like LC4, and on UNIX systems that are not configured to use shadow passwords). Fortunately, this approach doesn’t work anywhere. The second method is still a threat, but normally systems can be configured to lock out accounts after a certain number of invalid password attempts, to help prevent attacks that involve password guessing. Be aware that depending on what applications are in use on your system, it may be possible to perform validation without logging any incorrect attempts, and thus not alerting anyone to the attack. How? Some network-based and web-based applications request user ID/password information. In some cases, this information is validated against OS user and password information using OS validation functions … but unlike the OS logon validation program, the application doesn’t write entries into system logs when it encounters invalid user/password combinations, or lock out a user from further attempts after a certain number of unsuccessful tries. This is yet another example of how additional services and applications installed on a system can increase its vulnerability. Real World Owl!
Benchmark and improve your user community’s password quality This is one of those exercises we hesitated to recommend, but ultimately had to come down on the side of, “ignorance is not bliss,” because avoiding this information yourself won’t prevent a cracker from obtaining it, and it’s better for you to know what information he or she could obtain, in advance.
If you are authorized (and we mean officially—ideally obtain your manager’s signature on a piece of paper stating what you’re about to do) and feel personally comfortable with the activity, download one of the password cracker programs which runs on your system of choice. If it allows you to target only a segment of your full password file, do limit your initial test to a couple dozen entries to reduce the amount of time it will take to run. And then start it up. If you’ve never run one on your system before, and your users are about par for the course, expect it to report a few cracked passwords. You can then use this information to discover which users need more education about password choices… or perhaps even to justify installing an enhanced new password validation program on the system. Rather than catching simplistic passwords after the fact, some operating systems and third-party products allow you to check a new password’s vulnerability to brute force attacks when the user first enters it, and to inform the user to select an alternate password if it seems not strong enough.
1.4.12 Software Exploitation Software is written by humans, and thus tends to be imperfect. In the quest to “ship” a product, or “go into production” with an in-house application, corners are cut and long hours are put in, and “bugs” (or flaws) tend to creep into programs unintentionally. Crackers can exploit some of these bugs. A later section looks at code deliberately designed for a malicious purpose. This section looks at code that wasn’t meant to be a security problem, but which someone figured out how to use, to cause trouble. Software exploitation often involves subjecting a program to an unusual condition it doesn’t handle well—such as sending an excessively large amount of data to the program, sending data of an unanticipated type (say, something that looks like an OS command or program statement rather than a last name), running the program while the system’s disk space is full, or running the program with some strange setting (used by the program) in the user’s login “environment”.
Buffer overflows A particular type of software exploitation that frequently makes the news these days is that of a buffer overflow. Generically speaking a buffer overflow occurs when an input string is used copy more data into a memory buffer than the program was programmed to handle. Software coders are famous for checking to see if something works and being blind to what happens “if”—in this case, the IF is, a user provided more data for one of these memory copy functions, than the programmer expected. The footnote has a great overview[39]. The most recent PITA virus in the buffer overflow category is Code Red[40]. The most famous buffer overflow occurred on November 2, 1988. The “Morris worm” caused incredible damage by exploiting a buffer overflow condition in the UNIX program fingerd (a “daemon”, aka server service) for the popular UNIX “finger” utility. Once a cracker has found a program with a buffer overflow problem, they can either: Send large amounts of random data to the program, causing that program to crash. If the program is a server that doesn’t automatically restart, that may cause a Denial of Service condition. Send specially crafted data, designed to overwrite portions of the program in memory, and alter its functionality (as did the Morris worm). If the program is running with Administrator or UNIX root privileges, this enables the attacker to cause arbitrary commands to be executed with these higher privileges. For instance, they might copy or delete files, run code to cause a worm to propagate, change the system configuration settings, etc. Sometimes buffer overflow exploits are automated in a “rootkit” or exploit script used by a script kiddie. Other times, they’re exploited by hand, by a more skilled, programming savvy tech.
Naïve web applications Another class of software exploits you’re likely to run into if you administer a web server involve poorly programmed web applications that don’t sufficiently check the validity of the data provided to the application by the web user, before using that data in the program. You’ve probably seen your share of web applications before. The way most web applications work is that a user fills in some data on a web form (such as name and address for a mailing list) and clicks “submit”, or clicks on an “order” button next to an item on an e-commerce site … then the data is transmitted to the web server and the application picks up the data and uses it. Just as programmers sometimes don’t anticipate the sheer magnitude of data a user would throw at a program (in a buffer overflow exploit), they sometimes don’t anticipate the creative types of data a user might type in to a web form field which asks for the user’s name. Depending on how thoroughly the application checks for invalid data, an attacker might be able to send data containing characters like a single quote mark, semi-colon, dashes, back quotes, percent signs or other characters or words which have special meaning to the web server, application running on the web server, or database and cause it to behave in unanticipated ways that allow the attacker to cause damage. In a particular exploit known as SQL injection, a user embeds database commands into data submitted to a web form. A complete explanation of this is far beyond the scope of this book, but the exploitation of software vulnerabilities in web applications is becoming more and more common, and those who follow the field of computer security are citing it as an area of concern. For example, the most recent OpenHack challenge, OpenHack 4[41], in which systems are made available over the Internet and users are invited to challenge their security, focuses on application security and involves both Microsoft and Oracle applications. Success Owl!
Attacking Legitimate Programs Software exploitation includes taking advantage of legitimate programs for malicious purposes, using techniques like: •
•
buffer overflows, which allow an attacker to overflow a program with data, causing it to crash or execute malicious code provided in the data by the attacker SQL injection, which enables the attacker to submit their own database commands to the system, possibly deleting, changing or displaying data they’re not authorized to access, like credit card numbers and customer lists
The important thing to remember about software exploits is that you can help protect your systems against them by keeping the software you run up to date, and by educating programmers in your organization on how to write secure code. Two excellent references on this subject are: Writing Secure Code[42] by Michael Howard and David LeBlanc, the Open Web Application Security Project Guide,[43] and Designing Secure Web-Based Applications for Microsoft Windows 2000[44 ]by Michael Howard et. al.
If you’re writing web applications, or know someone in your company who does, we can’t say it strongly enough -- THEY NEED THIS INFO. If they don’t think they need it, then, seriously, they REALLY need it, because it’s likely they’ve made a false assumption or two about what safe web application coding looks like. Real World Owl!
A Developer Reality Check How much do your organization’s programmers, particularly those writing applications that are accessible by users on the Internet, know about writing secure code? As a simple yardstick, ask them if they know how what buffer overflows and SQL injection attacks are, and how to prevent them.
[25]
“Configure NT and Windows 2000 stack to resist network Denial of Service”, http://is-ittrue.org/nt/nt2000/registry/rtips3.shtml [26]
http://www.rootkit.com
[27]
“SANS Intrusion Detection FAQ,” http://www.sans.org/newlook/resources/IDFAQ/oddports.htm
[28]
http://www.securitysoftware.com/antisniff/download.html
[29]
http://www.insecure.com/
[30]
http://packetstorm.acm.miami.edu/UNIX/misc/sw-mitm.tar.gz
[31]
www.grc.com
[32]
Peikari, Cyrus, and Seth Fogie, Windows .NET Server Security Handbook , Prentice-Hall, April, 2002, http://www.nerdbooks.com/item.html?id=0130477265 [33]
http://blinky-lights.org/script.html
[34]
http://www.counterpane.com/pitfalls.html
[35]
http://www.veracity.com/tutorial/sig_secure.html
[36]
http://www.alpinesnow.com/bpcs.shtml
[37]
http://www.openwall.com/john/
[38]
http://www.atstake.com/research/lc/index.html
[39]
http://www.enseirb.fr/~glaume/bof/report.html
[40]
http://www.cert.org/advisories/CA-2001-19.html
[41]
http://www.openhack.com
[42]
Howard, Michael and David LeBlanc, Writing Secure Code, Microsoft Press, November, 2001, http://www.nerdbooks.com/item.html?id=0735615888
[43]
http://www.owasp.org
[44 ]
Howard, Michael, Marc Levy, Richard Waymire and Doug Bayer, Designing Secure WebBased Applications for Microsoft Windows 2000, Microsoft Press, July, 2000, http://www.nerdbooks.com/item.html?id=0735609950
1.5 Malicious Code Malicious code is program code specifically written for a malicious purpose (rather than code written for a legitimate purpose, which a cracker figured out how to misuse). For example, you would call a piece of code malicious if it deliberately did something like: • • • • •
Delete files on your disk, or reformat your disk, without the user’s knowledge Report the contents of your email address book to a web server collecting email addresses for a spammer Display “Ha ha, you’ve been rooted!” and other such messages on your computer Replace certain system files with other files, causing programs to malfunction Capture your network password and email it to
[email protected]
This section discusses some different types of malicious code you may encounter out in the field when administering or managing security for a network. Each type of code discussed below differs mainly in how it gets propagated from one user (or system) to another, and how it gets activated to do its dirty deed(s) once it gets onto a system, rather than in the functionality the destructive program itself provides.
1.5.1 Viruses This is a catchall phrase for any man-made code that is anything from annoying (WAZZU[45]) to destructive, such as a boot sector virus[46], which includes some way to attach itself to other files, called “host files,” and replicate itself. A virus can replicate either from file to file on a single system, or across a network (if it replicates automatically across the network without a user’s assistance, it is more precisely called a worm, another type of malicious code discussed in 1.5.4). Success Owl!
A Virus is… A virus is a program that attaches itself to a host file and replicates itself on a system. Usually when run, unbeknownst to the user, a virus performs some action that is either malicious or simply annoying. For example, a virus may delete or modify system files, or just produce a joke message on the user’s screen.
Viruses move from computer to computer by some user’s actions, rather than spreading automatically across a network. A virus typically gets into a system from an external source, such as a floppy disk containing software given to you by an office-mate, a file on a network share being copied onto your system and then executed to install it or “just see what it does,” an email message sent to you by a friend containing a file that claims to be a greeting card (to
get you to open it), or software that you download from the web or install from a very unlucky vendor’s CD distribution (the latter really has happened ). The possibility of transmitting a virus by email is why many email systems feature virus scanning for in-bound email, trying to limit the number of ways known viruses can enter a network. Geek Owl! Viruses are getting sneaky Over the years, the IT world has seen several different kinds of viruses, including: 1. Boot sector viruses which place their code in the hard disk’s boot sector, which is loaded every time the machine powers on 2. File infector viruses which attach themselves to legitimate executable programs, causing the virus to run each time one of those programs is launched 3. Script viruses which, like file infectors, attach themselves to existing legitimate programs (in this case, scripts like DOS batch files or VBscript or java script batch files), causing the virus to run each time the infected script is launched 4. Macro viruses that are embedded in files such as word processing documents and spreadsheets whose environments (such as Microsoft Word) support “macro” programming in documents to customize Word’s behavior when the document is open. These viruses are often attached to initialization macros that run whenever the document is opened, so that the user is not aware that they are “running” anything. Numerous measures can be taken to prevent, contain and perform damage control on virus infections on your network, including: •
• •
•
•
Enforcing a policy that users must run anti-virus software on their workstations (if some users complain that they don’t want to run your organization’s standard antivirus software xyzzy because locks their computer up when they try to run program frobozz, don’t let them out of the anti-virus utility requirement… find another one for them to try). Common packages are Symantec’s Norton Anti-Virus[47], McAffee VirusScan[48] and Grisoft AVG AntiVirus[49]) Virus-scanning all incoming email automatically, to guard against attachments that contain viruses being received and then opened or run by users Require users to use software which does not include macro capability, or require users to save files in formats not supporting macros (for example, Microsoft Word can save files in .rtf format, which doesn’t support macros, as well as in .doc format) Change PC boot sequence in CMOS to always try to boot from the hard disk first, so that a floppy carrying a boot sector virus won’t infect a workstation’s boot sector (and thus infect that PC) Set email clients to not automatically open attachments of certain types (like .EXE) Success Owl!
Wise Users Are Paranoid
Instruct users to check with the system administrator before opening an unfamiliar type of email attachment, any attachment they did not expect to receive, and any attachment from a user they do not know, as it could contain a zero day[50] virus. (Companies spent hundreds of thousands of dollars removing the ILOVEYOU virus from computers, when thousands of users opened a “Love Letter For You” that claimed to be from a familiar user. You see, it looked “just plausible enough,” and it’s those “just plausible enough” lies that are the most believable.) A virus is almost guaranteed to get through your defenses eventually no matter how careful you are—perhaps because it was just released out into the wild 6 hours ago, and your antivirus software does not recognize it, and thus didn’t stop its entry into your network. And then, once it’s been discovered, you may or may not have software that will remove it safely, since some viruses are so destructive that they cannot be removed without deleting all infected files. In that case, what will save you is a good, recent backup. If you are on a company network which features standardized clients (same type of PC, same OS and applications, etc.), a “Norton Ghost” style disk image program may allow for quick recovery in the case of multiple infections. Real World Owl!
Administrator, Survey Thyself What anti-virus program(s) is in use on your network? Is it installed and enabled on all systems? Have you found alternate anti-virus programs that work for those users who absolutely insist they cannot get their work done if the standard anti-virus software is installed on their computers, or are you letting them slide without an anti-virus program and just hoping they won’t get a virus?
1.5.2 Trojan Horses This one should tie tightly (at least in your mind) to social engineering. A Trojan horse pretends to be something useful or interesting, yet, is really a virus or other malicious code whose writer decided the best way to distribute it would be to include it in a program that claims to do something useful. Unlike a regular virus, a Trojan horse is attached to a particular executable, and typically isn’t capable of replicating and attaching itself to other files on your system. Typically the Trojan horse relies on gaining users’ interests with something that sounds fun or curious. Sometimes they masquerade as some sort of data file where a user is asking for help. Because Trojan horses appear to be legitimate code, but have hidden functions designed to do nasty things, they are difficult to detect with an Intrusion Detection System (IDS). As with viruses, prevention of Trojan horses on your system will largely be accomplished via anti-virus software and educating users not to open mysterious attachments. Success Owl!
Trojan Horse
A Trojan horse is a type of malicious code that appears to the user to be a legitimate program (or data file—even Word .doc files can contain Trojan horse code in the form of macros), but includes hidden functions designed to perform malicious actions.
1.5.3 Logic Bombs A logic bomb is a virus of some ilk with a time delay fuse. The most famous virus with a fuse was Michelangelo in 1992. More practically speaking, a really upset employee is more of a danger. They could install a program set to do something malicious at a later date, and then quit (or work their last day, if they were laid off), leaving the system to automatically fire off the malicious code days, weeks, or even months after they lost their access to the company’s computers. For that matter, this could also happen while they are still employed (but taking a vacation day, be in an all-day meeting, etc.—i.e., in a place in which they had an “alibi”), when the logic bomb “goes off”. Success Owl!
Logic Bomb A logic bomb is a piece of malicious code that is designed to not “fire” the malicious functionality until a certain date. An example of a logic bomb in a virus would be the Michelangelo virus. More commonly, upset employees, triggering some malicious functionality at some date in the future, may insert logic bombs into in-house programs.
To guard against this occurring, it’s useful to have multiple programmers looking at the same set of code (either using multiple coders, a la “Extreme Programming”[51], or a two step “code” and “code review” process), and for change control processes to be in effect, requiring that someone other than the program’s creator be assigned the responsibility (and the necessary system access permissions) to put any code into production. As we’ll see later in the cryptography section, a useful tactic in helping keep a system from being abused is to require that multiple people be involved in activities that lend themselves to abuse, such as installation of programs on in-house production (or client) systems.
1.5.4 Worms Worms are similar in nature to viruses. Both can consume resources and replicate themselves[52]. The Morris worm or the Internet worm is perhaps the most famous worm. The difference between a worm and a virus is that a worm can replicate itself across a network and consume resources, and it does not need to attach itself to other “host” programs[54]. Rather, it is capable of distributing and launching itself on its own, with no inadvertent “assistance” required from users whose computers are being infected. Success Owl!
Worm
A worm is a virus, usually containing malicious code, which can replicate itself and propagate across a network. Unlike a Trojan horse or many viruses, it does not have to attach itself to other “host” programs. Geek Owl! Meet Mr. Morris The most famous worm is the Morris Worm, which spread across the Internet by
exploiting bugs in the send mail SMTP transport agent and an Internet service called “finger.” Consider that the Morris Worm exploited a buffer overflow issue in the finger service back in 1988, and that programmers are still writing code vulnerable to this technique. Pessimists may proceed to predict the imminent death of the net now[55]. As with viruses and Trojan horses, worms can be detected with anti-virus software. (If you’ve now gotten the hint that you should be running some sort of anti-virus software, no matter how inconvenient it is to isolated users, on your network, good!) [45]
http://open.jeffersonhospital.org/tju/dis/virus/desc/wazzu.html
[46]
http://www.sophos.com/virusinfo/analyses/index_dosexe.html.
[47]
http://www.symantec.com
[48]
http://www.mcaffee.com
[49]
http://www.grisoft.com
[50]
A “zero day virus” is a virus not yet known to be in the wild, and you’re one of the lucky first people to “discover” it.
[51]
http://www.xprogramming.com/xpmag/whatisxp.htm
[52]
http://www.itworld.com/nl/unix_sec/09132001/
[54]
http://www.esecurityplanet.com/trends/article/0,,10751_1464281,00.html
[55]
http://searchsecurity.techtarget.com/originalContent/0,289142,sid14_gci860185,00.html Buffer overflows likely to be around for another decade
1.6 Social Engineering The Security+ Domain 1, as covered in this chapter, is definitional in nature. Given this, you need to know the definition of what social engineering is. Assuming you have been reading this work in a linear fashion, we won't bore you here! If you are skipping around, please read the introduction section which covers this topic nicely. We cannot stress the importance of fully understanding the challenges of social engineering attacks enough. For example, suppose your firm spends huge piles of money on fingerprint scanners. Tsutomu Matsumoto revealed two different methods for faking fingerprint scanners with 80% accuracy[56]. However if you are willing to settle for a first time accuracy rate of just over 50%, the article at puttyworld reveals a much simpler and low-cost method.[57] Social engineering is a favored attack because: The attacker is getting an authorized user to effectively defeat the security that has been put in place. This is the fastest and least expensive approach. Further this approach creates the least risk of detection for the intruder. A computer cannot detect a social
engineering attack, because no code is there to be detected. People can give away passwords and other valuable data, and even think they were doing the right thing (for example, thinking they were helping an authorized vendor service engineer)… and you, the network administrator, might not ever know. Success Owl!
Social Engineering Social engineering involves defeating established security mechanisms by enlisting the assistance of (usually unwitting) users to accomplish malicious things or acquire data that the attacker is not authorized to have. It is a particularly insidious technique because: •
•
no software tools are needed to acquire information like passwords and specific network addresses of file servers containing certain data (the attacker just convinces the user to tell them the information they want) unlike most attacks, an attack based on social engineering activities is not detectable via an automated system like an IDS or network monitor (it is carried out in simple conversation)
Success with both the Security+ test and the real world requires thinking outside the technical box to include physical security and people. Real World Owl!
How Easy It Is! Want to see how vulnerable your network user community is, to social engineering attacks? First, outline this activity to your boss and get his or her OK, because your colleague could end up receiving sensitive information. Also get agreement that the users will not be sanctioned for anything they do or say—this is an informational exercise, not one designed to place blame. Then, enlist an authorized co-conspirator, like a not-very-well-known network administration assistant, pick a couple target users at random, and see how much information your coconspirator can acquire about your network via social engineering alone. Formulate an appropriate education plan in response to the users’ behavior.
Pop Quiz 0001.00
Pop Quiz 0001.00 Questions 1. Select from the list below the DoS attacks A. B. C. D.
Ping flood IGMP fragmentation Out-of-bounds nukes Teardrop attacks
2. The correct description of a SYN flood is A. A session which omits the final portion of the TCP 3-way handshake B. A session which omits the first portion of the TCP 3-way handshake C. A session which omits the second portion of the TCP 3-way handshake 3. From the list below select the names of the program that are back door programs A. VNC B. NetBus C. BackOrifice 4. Spoofing involves forging the ____________ address of an IP packet. 5. The program that offers security over telnet is ________ Answers 1. A. Ping flood B. NIGMP fragmentation C. Out-of-bounds nukes D. Teardrop attacks 2. A. A session which omits the final portion of the TCP 3-way Nhandshake 3. B. NetBus D. BackOrifice VNC and Tight VNC are open-source remote control programs. While they may be seized, they are not hidden programs. 4. Spoofing involves forging the _Source_ address of an IP packet 5. The program that offers security over telnet is _SSH__ [56]
http://www.itu.int/itudoc/itu-t/workshop/security/present/s5p4.pdf
[57]
http://www.puttyworld.com/thinputdeffi.html
1.7 Auditing Auditing, the last item in the AAA of security, is the process of monitoring a system or network, looking for potential security exposures or incidents, and verifying proper operation and configuration. The “system” that you are auditing may be a network, a computer, or your computing environment as a whole (including disaster recovery, physical security, processes, etc.). The two most common approaches to system and network audit today include configuration analysis/log analysis and vulnerability scanning.
Success Owl!
Monitoring Auditing involves monitoring a system or network, looking for potential security exposures or incidents, and verifying proper operation and configuration. Auditing can be performed in many ways, such as analyzing logs (which provides information about past events on the network/system) and system/network scanning (which provides information about the current state of the system/network.)
Configuration and Log Analysis Configuration analysis involves the verification of machine and device configurations, including customization settings, installed options, etc. In configuration analysis, you examine the current state of the system, looking for ways to make it more secure. In effect, a configuration auditor follows a highly detailed checklist, comparing each element on the list with the object being audited, and noting where discrepancies exist. Logging is the process of recording interesting system and network events. It can be used strictly for informational purposes, or for accounting charge backs or system/network performance and load analysis. For example, you can log accesses to web documents on any web server, user login attempts, accesses to certain files in Windows 2000, system startup/shutdown, security policy changes, user account administration or uses of the UNIX “su” command. Where are these logs? On UNIX systems, many programs write logging information into the system’s syslog (which may be present on that system, or may be on another system on the network). On Windows systems, many programs write logging information into the Event Log (more properly, into the System, Security or Application event logs). Other programs, such as web servers, typically maintain their own logs created with special formats that can be read by tools specifically designed to easily “mine” the logs for information. Success Owl!
Classic Auditing One type of auditing involves creating logs where you: • •
Establish a baseline of “normal” activity Monitor against the baseline for abnormal results
What and where should you monitor? You cannot monitor everything in a typical environment (such as the completion of every print job) because you become flooded in data. The chairman of IBM has in his office the motto: “Think”. As a general recommendation: Monitor the obvious. Anything less than obvious to monitor is outside any firewall. Create a baseline of “normal” activity outside and monitor so you have an idea of what an attack looks like before someone gets in. For example, you may not want to log successful accesses of a certain data file, but you might want to know about unsuccessful accesses, because those are likely to indicate someone trying to read data they’re not authorized to see.
A key point about logging as an audit tool is made very well in Real World Linux Security[58] by Bob Toxen. If you can avoid it, never store a log where an attacker can get to it—and especially never store it where an attacker can modify it and erase his tracks, invalidating the usefulness of the log. In the UNIX/Linux world, it’s useful to direct log entries to a syslog on another machine. Geek Owl! Geekily Speaking Reading If you can tolerate the sub-optimal font sometimes used in the book, Auditing and Security[59] by Musaji provides a lot of raw data on configuration items to check in Windows NT and UNIX, as well as the AS/400. It claims to be the first book on IT security written specifically for auditors and has a companion web site at http://www.wiley.com/musaji. If you’re creating the nitty-gritty details of an audit policy for one of these platforms, it really looks like $85 well spent, to get this book—and Windows 2000 auditors will find information of interest in the NT section as well, even though it was not written with Windows 2000 in mind. A more generalized book on auditing is Network Auditing[60] by Smith, also with checklists. An interesting treatment of auditing a Windows 2000 system/network, complete with information on how to set up “Auditor” accounts (nicely demonstrating the security concept of “separation of duties”) and a list of useful Microsoft tools that assist in auditing, can be found in the Windows 2000 Security Handbook[61] by Philip Cox. Pros and cons of different types of auditing procedures are described in The Process of Network Security[62] by Thomas Wadlow.
System/Network Scanning A second type of auditing is vulnerability scanning, which may be accomplished by running system scanner programs from inside the organization, or may be accomplished by a penetration test in which someone attempts to gain access to system/network resources from outside the organization. Success Owl!
Scanning Scanning is the process of checking a system or network for exploitable (or potentially exploitable) vulnerabilities
Some things that can be detected by scanners include: • •
•
Servers running on each host (which might be unnecessary, and thus should be turned off) Vulnerability of services to known attacks (which imply that you should get an updated version of whatever software you’re using to provide that service, or possibly turn the service off until an update is available) Type of OS and service software running on a host (see also: OS Fingerprinting in section 1.4)
•
• •
• •
System architecture (if you want to try a buffer overflow exploit that only works on x86-based Linux systems, you not only need to make sure that the host is running Linux and the appropriate version of the software you want to exploit… you also need to make sure it’s an x86 machine) Rogue hosts set up by users without the IT department’s authorization, whose configuration may or may not be known Firewall rules in place (by examining TCP/IP replies, a scanner can sometimes differentiate between services that aren’t blocked by the firewall but aren’t running on a host, and services that are blocked by the firewall and may or may not be running on the host) Open file shares Insecurely coded web pages
If run against a single system, the scanning software may be run on the system itself (so that it has access to local files which might not be visible to external network connections), or it may run over the network. If run against a network, the software generally doesn’t even need to run on the same network being scanned. Why should you scan your network regularly? Simply, you should do this so that you know what the crackers know about your network, and have a chance to address it (hopefully) before THEY do. You can learn more about scanners in the paper, “Network Scanning Techniques” by Ofir Arkin.[63] Nmap[64] (for *nix and Windows), Nessus[65] (for Unix) and Sara[66] (also for Unix) are popular free network scanners. Many other commercial solutions exist, such as eEye Digital Security’s Retina[67] (for Windows), Internet Security Systems’s RealSecure Protection System[68] (management platform for Windows and sensors for Windows and UNIX) and WWDSI’s SAINT[69] (an updated version of the freely available SATAN scanner for UNIX). Many have said that for CEO-impressing reports, eEye’s award-winning Retina scanner is tops.[70] Historically, scanners have searched for vulnerabilities at the network layer and defective server software. A new frontier for scanners is that of web applications. Web application scanners (sometimes called CGI scanners, if used to scan for CGI script vulnerabilities) work at the application layer, and look for exploitable web pages (such as CGI scripts or JSP or ASP pages). This area of scanning is still relatively new, but tools written to specifically address it include Web Scarab[71] (a new open-source tool written in java, with preliminary alpha test release expected in September, 2002) and SPI Dynamics’ WebInspect[72]. In addition to running system scanners, another way you can check for vulnerabilities in your current system and network configuration is via penetration tests. Geek Owl! Running a Pen Test There are a variety of “pen test” scenarios, including: 1. attempting to access the organization’s machines from outside the network, with no background knowledge about the network 2. attempting to access the organization’s machines from outside, with some amount of background knowledge, possibly including the locations of
email, DNS and other servers, dial-in telephone numbers, etc. 3. attempting to access the organization’s machines from inside the network, with detailed background knowledge about the network and installed software, and perhaps normal user-level access to services customarily available to all employees Success Owl!
Definition of a Pen Test A penetration test is an exercise in which one or more people attempt to gain access to system/network resources. It may be conducted from inside or outside the organization’s network, and by using or not using certain internally known information, depending on what security is being evaluated by the test.
Network scanners and penetration exercises (not tests—the real thing) are two tools in the cracker’s arsenal. Employing these tools on your own network—before the crackers do— allow you to find and address weaknesses in your network’s security before they are exploited. Real World Owl!
Tracking Check your network’s logging configuration. Are all of the important events like user logons and logoffs, incorrect logon attempts, user account and security settings administration, system startup and shutdown, etc. being logged? If not, enable logging for those types of information.
[58]
Toxen, Bob, Real World Linux Security, Prentice-Hall, November, 2000, http://www.nerdbooks.com/item.html?id=0130281875
[59]
Musaji, Yusufali Fl, Auditing and Security, John Wiley, February, 2001, http://www.nerdbooks.com/item.html?id=0471383716
[60]
Smith, Gordon E., Network Auditing, John Wiley, April, 1999, http://www.nerdbooks.com/item.html?id=0471179752 [61]
Cox, Philip, Tom Sheldon, Windows 2000 Security Handbook, Osborne, November, 2000, http://www.nerdbooks.com/item.html?id=0072124334
[62]
Wadlow, Thomas, The Process of Network Security, Addison-Wesley, February, 2000, http://www.nerdbooks.com/item.html?id=0201433176
[63]
Arkin, Ofir, “Network Scanning Techniques”, 1999, http://www.syssecurity.com/archive/papers/Network_Scanning_Techniques.pdf [64]
http://www.insecure.org
[65]
http://www.nessus.org
[66]
http://www-arc.com/sara/
[67]
http://www.eeye.com/html/Products/Retina/index.html
[68]
http://www.iss.net/products_services/enterprise_protection
[69]
http://www.wwdsi.com/products/saint_engine.html
[70]
Peikari, Cyrus and Seth Fogie, Windows .NET Server Security Handbook, Prentice-Hall, April, 2002, http://www.nerdbooks.com/item.html?id=0130477265 [71]
http://www.owasp.org/webscarab/
[72]
http://www.spidynamics.com
1.8 Summary In this chapter, we looked at the topics in the first domain of the Security+ exam, General Security Concepts. You learned about the AAA of security (Access control, authentication and auditing/accounting). Within Access control, you explored the characteristics of different types of access control such as: • •
•
MAC (Mandatory Access Control, a lattice-based approach using labels, related to the Bell-LaPadula model) DAC (Discretionary Access Control, in which the owner of an object generally retains the right to distribute it to others, so a Trojan horse sent to the document owner could potentially be used to cause a document to be distributed) RBAC (Role-based Access Control, in which access permissions are based on user job roles such as Accountant, Regional Sales Director, etc.)
Within Authentication, you learned about the three types of authentication, based on: • • •
Something you are (biometrics) Something you have (such as a smart card) Something you know (such as a password)
You discovered key points about several authentication technologies, such as: •
•
• •
Kerberos (which uses tickets as identity tokens, employs temporary session keys and symmetric encryption, and is careful not to send the password over the wire, but can be vulnerable to attacks like replay and brute-force password guessing) CHAP (which uses a 3-way challenge/response handshake, repeated at random times during a login session, and which like Kerberos also does not send the password over the wire) Digital certificates (more about these later!) Passwords (which should not be sent over the network where they can be “sniffed” by users running network monitoring software, and should not be dictionary words or other short, easy-to-guess sequences)
• • • •
Tokens (hardware devices which can be used, often with a PIN, for authentication; they often also employ digital certificates) Multi-factor authentication (which uses a combination of 2 or more authentication techniques to reduce the probability of spoofing) Mutual authentication (in which both parties to a conversation authenticate themselves to each other) Biometrics (involves something you are, such as your fingerprint, or something you do, such as your typing style/rate)
You learned about different types of Auditing (the process of monitoring a system or network, verifying configuration and watching for security exposures), including configuration and log analysis and system/network scanning (using programs like nmap). You learned that it is best to disable and filter access to non-essential services and protocols, because the more unnecessary features available on a system, the more vulnerable it is. You discovered that would-be crackers may use OS fingerprinting to learn about a server before they attack it, and investigated the details of common types of “cyber attacks” such as: •
• •
•
•
• •
•
•
•
•
DoS/DDoS (the attacker floods a network with traffic and causes a denial of service to a machine or network, in the case of a Distributed DoS using multiple machines on the network to do it, via techniques such as ping flooding, SYN flooding and teardrop attacks; Trinoo is a common DDoS tool) Backdoors (give the attacker a way into the system without the usual security checks; NetBus and BackOrifice are common backdoor programs) Spoofing (made possible due to the design of TCP, involves the attacker misleads everyone as to their location and identity, by using a faked IP address in packets; in blind spoofing, the user sends packets to the target system but does not have access to that system’s replies) Man-in-the-Middle (MITM, often used to “take over” a telnet session, in which the attacker intercepts the packets in a conversation between two machines, altering some on the fly) Replay (the attacker captures the packets involved in one side of a network conversation and replays them later; can sometimes be used to spoof authentication/authorization) TCP/IP Hijacking (the attacker takes control of a TCP/IP conversation) Weak Keys (the attacker takes advantage of the use of weak encryption keys used to secure a conversation or data; generally 40-bit and 56-bit key lengths are not considered sufficient today) Mathematical (the attacker takes advantage of mathematical properties of an encryption technique to discover the original key or break the technique without need for the original key) Social engineering (the attacker uses interaction with people to learn about and compromise the network, taking advantage of their desire to be helpful by providing names, passwords, etc.) Birthday (an attack based on the high probability of duplicates within a small number of samples; attackers can take advantage of this to find duplicate texts that have the same “message digest” signature) Automated Password Guessing attacks like Brute Force (the attacker tries every possible combination of characters in an attempt to find a password) and Dictionary
• • • • • •
Attacks (the attacker tries each word appearing in a dictionary, to see if it matches the password) Software Exploitation (the attacker takes advantage of “bugs”, or malfunctions, in software with techniques like buffer overflow or SQL injection exploits) You explored different types of malicious code, which are programs written for a malicious purpose, such as: Viruses (programs that attach themselves to a host file and often automatically replicate around the system; can generally be detected by anti-virus programs) Trojan Horses (programs that masquerade as one thing, but include extra, hidden, malicious functionality) Logic Bombs (programs whose malicious functionality runs at some future date— when a set time has elapsed, when a user ID is no longer on the system, etc.) Worms (programs similar to viruses which can replicate across a network)
You learned that social engineering involves defeating established security measures by taking advantage of the fact that people are often the weakest link in any security system. It often uses no software tools at all, and thus cannot be detected automatically by traditional intrusion-detection technology.
1.9 Success Questions 1. Enforcing minimum privileges for general system users can be easily achieved through the use of: A. B. C. D.
A.RBAC B.PRVMIN C.TSTEC D.IPSEC
2. What process determines who is trusted for a given purpose? A. B. C. D.
Authorization Authentication Identification Accounting
3. Which of the following tools can you use to assess your network's vulnerability? A. B. C. D.
ISS Ballista SATAN No Answer is Correct
4. Which of the following services should be logged for security purpose? A. B. C. D.
bootp tftp sunrpc No Answer is Correct
5. An attack in which a duplicate MD5 hash to a message or document is known as a A. B. C. D. E.
Hash attack Birthday attack PGP attack All choices are correct No choice is correct
6. An attack against an authentication server can be accomplished by A. B. C. D.
brute force attack dictionary attack a server without a failed login attempt counter enabled Teardrop attack
7. Select the types of malicious code from the choices given A. B. C. D. E.
Viruses Trojan Horses Logic Bombs Worms Foxes
8. What is the name of the attack that masquerades as one type of program but has hidden functions? A. B. C. D. E.
Worm Logic Bomb Virus Trojan Horse All are correct choices
9. What is the name of malicious code that does not require a host program and can replicate itself across a network? A. B. C. D. E.
Logic Bomb Trojan Horse Virus Worm No choice is correct
10. The type of attack that cannot be detected with any technology is A. B. C. D. E.
Robbery Social engineering Trojan Horse Worm DoS attack
Answers 1. A. RBAC Explanation: Ensuring least privilege requires identifying what the user's job is, determining the minimum set of privileges required to perform that job, and restricting the user to a domain with those privileges and nothing more. By denying to subjects transactions that are not necessary for the performance of their duties, those denied privileges couldn't be used to circumvent the organizational security policy. Although the concept of least privilege currently exists within the context of the TCSEC, requirements restrict those privileges of the system administrator. Through the use of RBAC (role based access control), enforced minimum privileges for general system users can be easily achieved. 1.1.1 MAC/DAC/RBAC 2. A. Authorization Explanation: Authentication and identification are both related to determining who a user is. Typically authentication is performed prior to authorization, since except for cases of authorizing the activities of anonymous users (such as those viewing a web site), the system needs to know who the user is, before it is able to test for what the user is allowed to do. Accounting provides for the logging of system events, user activities, etc. 1.2 Authentication 3. A. ISS B. Ballista C. SATAN Explanation: ISS, Ballista and SATAN are all vulnerability scanning tools. These tools look for the same sorts of system information and system vulnerabilities that crackers look for, when analyzing potential intrusion targets. They are often used during penetration tests, in which technicians attempt to carry out an intrusion on a network or a particular system. 1.4.2 Back Door, 1.5.2 Trojan Horses 4. A. bootp B. tftp C. sunrpc Explanation: Requests for the following services should be logged on all systems: systat, bootp, tftp, sunrpc, snmp, snmp-trap, nfs. This list is rather UNIX-centric, nevertheless, it's possible for many of those services to be running on Windows as well (if you're running them, log them!). Auditing
5. D. All choices are correct Explanation: This refers to the math paradox that as few as 23 or more people are gathered in a room, there are better than even odds that some pair of them will share a common birthday. MD5 attacks appear most often in searches. Birthday Attack 6. A. brute force attack B. dictionary attack C. a server without a failed login attempt counter enabled Explanation: Password guessing is easily accomplished with software programs (Asmodeus or L0phtCrack) designed for this exploit. The two common approaches are brute force and dictionary. 1.4.11 Password Guessing 1.4.11.1 Brute Force Dictionary 7. A. Viruses B. Trojan Horses C. Logic Bombs D. Worms Explanation: Viruses, Trojan Horses, Logic Bombs and Worms are all forms of malicious code. Keep in mind that each of these terms has a specific sub-domain in the Security+ objectives. Malicious Code 8. D. Trojan Horse Explanation: Trojan horses are difficult to detect with IDS. They can be used for DDoS attacks. Sub Seven is a popular Trojan horse. A trojan horse tricks the user into installing the program when they think it is something else. A worm is a virus which can replicate across the network. A logic bomb is a program with additional features that trigger at a certain point in the future. A virus is a program which can replicate itself on a system, and is spread by something the user does, such as emailing a file or giving a coworker a disk. Viruses Trojan Horses
Logic Bombs Worms 9. D. Worm Explanation: Unlike viruses and Trojan horses, a worm does not need a host. The most famous worms are the Morris worm and Code Red A logic bomb is a program which triggers at some point in the future. A Trojan Horse is a program which piggybacks on a legitimate (or seemingly legitimate) program. A virus is a program which replicates within a system. Worms 10. B. Social engineering Explanation: Since social engineering is an attack on human nature against an authorized user it is not possible to detect with technology. 1.6 Social Engineering
Chapter 0010: Domain 2.0: Communication Security (20%) "The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance." —Confucius
Getting Ready—Questions 1. _________is the protocol used for carrying authentication, authorization, and configuration information between a Network Access Server and a shared Authentication Server. 2. The __________ protocol transmits your logon credentials transmitted as cleat text. 3. To protect an organizational directory from unauthorized changes you effect changes you would select ___ or ___. 4. A Blind FTP server does not _______________. 5. WEP can be compromised by________.
Answers 1. _RADIUS_ is the protocol used for carrying authentication, authorization, and configuration information between a Network Access Server and a shared Authentication Server. RADIUS is a protocol for carrying authentication, authorization, and configuration information between a Network Access Server, which desires to authenticate its links and a shared Authentication Server. RADIUS uses a centralized database for simplified management. RADIUS is a standard published in RFC2138. 2. The PAP protocol transmits your logon credentials transmitted as cleat text. PAP - Short for Password Authentication Protocol, the most basic form of authentication, in which a user's name and password are transmitted over a network and compared to a table of namepassword pairs. Typically, the passwords stored in the table are encrypted. The Basic Authentication feature built into the HTTP protocol uses PAP. The main weakness of PAP is that both the username
and password are transmitted "in the clear" -- that is, in an unencrypted form. Contrast with CHAP, which uses challenges rather than cleartext password transmissions. 3. To protect an organizational directory from unauthorized changes you effect changes you would select SSL or TLS. Directory changes need to be protected from unauthorized changes. Use SSL or TLS to make changes to any LDAP type directory. 4. A Blind FTP server does not reveal directory or content data A blind FTP requires that a user know both the directory required and the filename(s). It can be set up in the UNIX environment with directory permissions set to 333 (write and execute for owner/group/world). 5. WEP can be compromised by Airsnort. "AirSnort is a wireless LAN (WLAN) tool which recovers encryption keys. AirSnort operates by passively monitoring transmissions, computing the encryption key when enough packets have been gathered." -- AirSnort home page
2.0 Communication Security Communication security involves the security of data and administrative information that is traveling on public and private networks. It is generally concerned with the privacy (can unauthorized users read it?) and integrity (can it be changed undetectably before it reaches its destination) of network traffic.
2.1 Remote Access Remote access involves giving users outside the bounds of your physical network (i.e. “remote users”), access to network resources, usually, by permitting them to join the network as an actual node. A special case of remote access is the Remote Access Service (RAS), provided by Windows, which allows a server connected to one or more modems to be used as a network access point by dial-in users. Communication security concerns are generally addressed by use of standardized authentication and authorization mechanisms (such as RADIUS, TACACS+ or a VPN’s proprietary user authentication/authorization scheme), and by encryption of traffic on the wire as protection against snooping and modification of data.
2.1.1 802.1X The IEEE 802.1X standard is a relatively recent protocol enhancement that creates a standard for how authentication is performed over an 802 standards-based network. It improves scalability and security of wireless LAN authentication, and allows for the use of multiple authentication mechanisms as needed.
Why is 802.1X needed? With a typical wired Ethernet LAN, the moment your station is added to the network, you have access to the wire. You may or may not be able to do much on the network if you don’t authenticate yourself to your organization’s domain controller, but you can usually sniff the raw packets that are reaching your network adapter. With a typical dial-up networking
connection, the situation is different, because PPP requires that you authenticate yourself to a server before you can connect via the network. You have to provide a user ID and password (or other authentication) to the network you’re dialing into, before you’re allowed access to the network. No password = no packets. Wireless networking follows the wired networking model above, rather than the dial-up networking model. If you have physical access to a connection (which in the wireless case means a wireless networking card that can communicate using the same technology as a particular wireless network access point), you can access its raw packets. In the 802.11b case, an attacker can parlay their ability to “sniff” packets from a wireless network, into the ability to connect to it, because it is possible to break the weak encryption typically used on 802.11b if you obtain a large enough sample of packets. This will be discussed in more detail, in section 2.6. The flaws in the attempts at communication privacy in 802.11b make additional layers of security valuable. Another reason to want to authenticate wireless users before allowing them to connect to your network is that you might always want to be able to identify who’s on a particular network connection. In the wired world, that tends to be easy to do, because physical connections tend to be assigned to individual offices and work areas. In contrast, multiple users can connect to a given wireless access point, just by walking up to the area in which it is located, carrying a machine with a compatible network adapter. They might perform a network action that identifies them, like logging in to a network to reach a data file stored on a file server. But then again, they might opt to just surf the Internet anonymously.
What is 802.1X? These issues open the door for the additional security features provided by 802.1X[1], which uses a specific form of the Extensible Authentication Protocol (EAP), called EAP Over LANs (EAPOL). EAP, as described in RFC 2284[2], provides an extensible authentication mechanism for use over PPP, allowing new authentication mechanisms (biometrics, smart cards, etc.) to be “plugged in” without the PPP protocol needing to understand them. EAPOL is an adaptation of EAP. It allows authentication information to be passed in network frames, rather than requiring that it be embedded in a higher-level protocol such PPP. This reduces network overhead for authentication, and removes the necessity to for the network to be running particular protocol suite such as TCP/IP. How does it work? The potential network client passes authentication information through a wireless access point to a centralized authentication server, who validates the logon and permits certain network activities based on the identity of the client. For instance, the authentication server may install a certain set of firewall security rules or a specific VPN configuration for that client’s address, based on user identity. Until a user is authenticated, the wireless network will only forward 802.1X traffic for that connection. Nothing else, such as attempts to browse the web, send mail, or obtain a local IP address via DHCP, will be permitted.
Figure 13: User requests login and receives a request to present “ID”. The request is passed to an authentication server which verifies the user and sends the OK to the access point which allows the user to log on. Optionally, 802.1X can also be used to return encryption keys to users, allowing the network to dynamically vary the encryption used by each connection, rather than requiring that all stations be pre-configured with a fixed key (currently a time-consuming activity). As we’ll see later when we discuss WEP encryption over 802.11 in section 2.6, this improves the privacy level of wireless communications. Success Owl!
802.1X 802.1X provides for an extensible authentication mechanism over physical media such as FDDI or wireless LANs. It can be used to improve the privacy of wireless LAN communication by dynamically varying the keys used to encrypt the wireless traffic.
802.1X is only the framework allowing EAP transactions to be passed on the media. It is not EAP itself. To get authentication functionality, you must choose a particular flavor of EAP, and install it on your authentication server. Here’s a listing of the choices: • • • •
Transport Layer Security (EAP-TLS) EAP Tunneled Transport Layer Security (EAP-TTLS) Built into XP, Win CE 4.0 RADIUS (FRC 2138,2139) LEAP[3], by Cisco
You can change the flavor of EAP that you use at any time, without needing to replace 802.1X-compliant access points, because the exact mechanics of EAP are transparent to the access points. Future Owl!
802.1X Currently, 802.1X authentication is outside the scope of 802.11-based wireless LANs. However, it is not expected to remain so. The 802.11i committee is specifying the use of 802.1X in combination with 802.11. Many vendors have already included support for 802.1X in their products, including enterprise application products and Microsoft Windows XP.
802.1X is not without its issues, though. For example, while great care is taken to authenticate the client, access points themselves aren’t subject to such scrutiny. So, theoretically, someone could pose as an access point and stage a man-in-the-middle type of attack. Additionally, while it can be used to improve the security of WEP by permitting more frequent key changes, it doesn’t provide any additional layers of encryption. Additionally, EAPOL itself
has proven to be susceptible to Denial of Service attacks, because attackers can spoof EAPOL logoff frames, logging a legitimate user off an access point, and then deluge the access point with EAPOL start frames so that no one else can access it. Future Owl!
WPA Wireless Protected Access[4] (WPA) support has been supported by a number of manufactures and is designed to replace WEP on existing equipment with software and firmware updates. Mandatory in equipment sold after July 2003. WPA uses mutual authentication and is forward compatible to the upcoming 802.11i security standard expected to be ratified in September 2003.
Figure 14: Currently a Rogue Access Point is very dangerous because it can be behind the firewall and go unnoticed.
2.1.2 VPN VPNs, or Virtual Private Networks, are secure “virtual” networks built atop physically connected networks. Generally, the physically connected network over which a VPN is implemented is a public network—that is, one that is generally accessible and has less security than the organization implementing the VPN desires. It is also possible for an organization to implement a VPN over a private network to provide an additional level of confidentiality for its most sensitive communications, to ensure that information cannot be gained by sniffing the internal LAN. Each node participating in a VPN is (or is connected to) an endpoint that knows how to wrap the virtual network’s traffic (which can be TCP/IP, Netware’s IPX/SPX, AppleTalk, etc.) in packets understood by the public network carrying its traffic (usually TCP/IP), and then, unwrap the packets upon receipt by the destination network or host. This wrapping/unwrapping process is known as tunneling, since it takes what is normally a data link layer protocol such as IP, and wraps it within a “tunnel” of an outer protocol instead of placing it directly on the wire. Tunneling may be accomplished by a special hardware box that
speaks the VPN’s protocol, or, by client software installed on computers that are individual nodes. VPN’s usually perform user authentication (by means of certificates, user/password, etc.), and traffic encryption to create a private network. VPN protocols providing these features include PPTP, L2TP, SSH and IPSec, all of which are discussed later in this section. For more information, see the VPN topic in section 3.1.8 later in this book. Success Owl!
VPN Protocols Common VPN protocols include: PPTP, L2TP, SSH and IPSec.
Figure 15: A “session within a session” can create a secure connection over a public network
2.1.3 RADIUS Remote Authentication Dial In User Service, or RADIUS, is the de-facto standard client/server protocol that authenticates and authorizes users connecting to a network, to access the network’s resources, utilizing a centralized database. If you use a dial-up ISP, it’s highly likely that RADIUS is used to validate your logon information when you connect. You can think of it as protecting the “radius” of a network by not letting in those who are unauthorized to be there. Its client/server architecture allows centralized administration of a user database, even if users’ locations may span an entire organization, town, state, country, etc. Being the de-facto standard, as specified in RFC 2865, the RADIUS protocol is supported by just about every device out there, new and legacy. In general, the way RADIUS based authentication works is: • •
A user dials in (via modem, DSL, etc.) as a client to a remote access server, and provides credentials (user/password) in response to the remote access server’s request The remote access server (itself a client to a RADIUS server) communicates the credentials to the RADIUS server, after encrypting it by computing an MD5 hash (see
•
•
chapter 4) of it using a “secret” shared between client and server (this is an example of one way in which credentials are communicated) The RADIUS server uses a user/password database or perhaps integration with a network-based authentication system like Windows passwords or LDAP to validate the password, and returns the results to the remote access server The remote access server then accepts or denies the connection
More info on how RADIUS works can be found in the footnote[5]. It is regarded by many as providing more security during remote access user authentication than its main competitors, LDAP and TACACS+.[6] Success Owl!
RADIUS RADIUS is a client/server protocol that authenticates users connecting to a network, usually by consulting a centralized database of users. RADIUS is a widely supported and popular authentication protocol, which many users consider providing better authentication security than its main alternatives, TACACS+ and unencrypted LDAP alone.
Figure 16: Security Databases are centralized in RADIUS Geek Owl! RADIUS Performance Recent scalability and performance advancements have included “Distributed RADIUS” in which multiple tiers of RADIUS servers are connected together and “forward authentication” in which requests goes up the RADIUS server tree via a proxy RADIUS protocol.
2.1.4 TACACS/XTACACS/TACACS+ TACACS is the Terminal Access Controller Access Control System, another client/server user authentication protocol similar to RADIUS, which works similarly to RADIUS. For authentication, it allows use of user/password information, Kerberos-style authentication that does not require keys being passed over the wire, or even dynamic password systems in which smart cards are used to generate one-time passwords.
Over the years, three generations of TACACS have been developed: • • •
TACACS, the original, which performs authentication and authorization. XTACACS, or Extended TACACS, which separates the tasks of authentication, authorization and accounting/logging. TACACS+, developed by Cisco, which builds on XTACACS by adding a two-factor user authentication (proving that a user is who they say they are through both something they know, like a password, and something they have, like a smart card), system and encrypting all client/server communication.
TACACS+ has some security vulnerabilities that may concern you if end-users have access to the network over which TACACS+ traffic travels: •
• •
• • •
Since accounting information is sent in clear text, and, the only verification performed is that the received accounting record packet length = the length that was sent, someone could intercept the communication and alter it or inject spurious accounting records. Encryption is potentially vulnerable due to the small size of the session id key used for encryption. Lengths of user passwords can be determined by watching traffic, because, the protocol provides for sending a password only as long as there are characters in the password. Theoretical issues with MD5 hashes (see section 1.4.10 on Birthday attacks, and chapter 4 on cryptography) A handful of overflow/resource hogging vulnerabilities in some popular implementations of the protocol, which can lead to denial of service[7] TACACS+ uses a Kerberos-style authentication mechanism that doesn’t require keys to be sent over the wire, but potentially leaves it vulnerable to similar exploits as Kerberos Success Owl!
TACACS+ Issue A security vulnerability with TACACS+ is accounting information is sent in clear text, and the only verification performed on received data is a check that the packet length did not change during transmission. This means that someone could alter accounting records without detection.
2.1.5 L2TP/PPTP L2TP (Layer 2 Tunneling Protocol) and PPTP (Point to Point Tunneling Protocol) are both Layer 2 tunneling technologies that implement a secure communication channel over an insecure connection.
PPTP PPTP is probably the most popular tunneling protocol today. A consortium inclusive of Microsoft, Ascend Communications, US Robotics and ECI Telematics developed it. Over the years it has gained prominence because of its use for remote access in Microsoft-based network environments. It implements tunneling over a PPP (usually dial-up) connection.
Typically users choose the VPN endpoint to which they are connecting after the PPP connection negotiation has completed, a situation that is known as voluntary tunneling. Microsoft’s PPTP implementation uses its RAS “shared-secret” encryption process with an RSA RC4 cipher based on a 40 or 128-bit session key. In the Microsoft implementation, the shared secret is the user password. In other implementations, the shared secret might be a public key (see PKI, later in this work).[9] PPTP typically lets you use any authentication mechanism, including PAP and CHAP, but if you want to use an encrypted tunnel, it requires that you use the more secure MSCHAP authentication mechanism. PPTP uses TCP port 1723 for communication with the destination host[10], so if, you are passing PPTP communication through a firewall make sure that that port is open. Because Microsoft made PPTP widely available with relatively simple installation, it is a popular choice. Earlier versions of Microsoft PPTP had significant vulnerabilities[11], and while their update of PPTP fixed most issues, it is judged to be still susceptible to password attacks.[12] Therefore, from a security standpoint, IPSec, discussed in section 2.1.7, is preferred. Success Owl!
PPTP PPTP is usually used to implement security over a PPP connection. It is a popular choice because it’s available in Microsoft Windows and relatively simple to implement. PPTP uses TCP port 1723. The Microsoft implementation of PPTP uses the RAS shared secret encryption process, using the RSA RC4 encryption algorithm and a 40-bit or 128-bit key. It supports PAP, CHAP and MS-CHAP authentication, but requires that you use MS-CHAP if you want to use an encrypted tunnel.
TCP/IP Background Information Now that we’re discussing encapsulation protocols, it’s worth taking a peek under the covers of TCP/IP and look at a concept you might not have encountered yet if your day-to-day tasks have mainly involved maintaining an existing TCP/IP-based LAN. IP is the base protocol on which all other protocols, including TCP and UDP are layered. One of the fields in the IP frame is an identifier for “protocol number”, which may be 1 (ICMP, including “ping”), 6 (TCP), 17 (UDP), or any one of numerous other values. The official list of protocol numbers is maintained by IANA, the Internet Assigned Numbers Authority.[13] The protocols we usually consider the base of TCP/IP, such as TCP and UDP, aren’t the only ones out there. There are additional protocol numbers for different routing and encapsulation protocols as well. For example, PPTP uses IP protocol 47 (GRE, General Routing Encapsulation). This is important to know, because when thinking about ports to open on routers and firewalls, to allow traffic to pass through, you might also need to think about opening the required IP protocol numbers as well. For that matter, if you’re really
unlucky, your site might have an older router or firewall that doesn’t support certain newer IP protocol numbers, and thus won’t allow them to pass through at all.
L2TP L2TP was intended as a replacement for PPTP by Cisco because they didn't care for some (rather lack of) features in PPTP. L2TP combines the best features from PPTP and Cisco’s L2F protocol, which was designed to facilitate tunneling over a variety of media/lower-level protocols such as frame relay and ATM, in addition to the IP-based tunneling supported by PPTP. L2TP supports PAP, CHAP, MS-CHAP and other authentication protocols. As opposed to PPTP, whose client access is normally implemented by software running on individual desktops, L2TP clients most commonly connect into their VPN by going through a special hardware device that handles the L2TP tunneling. While Windows 2000 is quite capable of supporting L2TP natively many firms don't want to consume the server resources with L2TP Additionally, with L2TP, the server side generally chooses the endpoint of the communication, a situation that is known as compulsory tunneling (in contrast to PPTP, where the endpoint is normally left up to the client). This scenario lends itself to the construction of hierarchically routed networks which gradually concentrate VPN traffic over fewer but higher bandwidth lines for more efficient transmission over a long haul.[14] IPSec is the preferred encryption mechanism used in conjunction with L2TP, but sometimes 40 or 56-bit DES may be used as well. L2TP and L2F use UDP port 1701 for communication on the source and destination hosts, so if you are passing L2TP through a firewall, you need to ensure that port is open. Success Owl!
L2TP L2TP was intended as a replacement for PPTP and L2F, combining the best features of both. L2TP supports PAP, CHAP, MS-CHAP and other authentication protocols. L2TP and L2F use UDP port 1701. PPTP, L2F and L2TP are all Layer 2 tunneling protocols.
2.1.6 SSH SSH, or Secure Shell, began as a replacement for traditionally insecure methods of accessing a host. “In the beginning,” there was telnet, the Internet system to Internet system version of a dialup modem terminal program like ProComm. And the geeks connected to other geeks’ systems over an academic Internet via telnet, providing user name and password to authenticate themselves; and, it was good! Then more geeks out on the West Coast at Berkeley said, “If we connect to a certain system all the time, and its administrators trust us, why should we always have to keep typing our passwords in?” By the way, it’s insecure to transmit passwords in
clear-text across the Internet the way telnet does, because anyone who can ‘sniff’ the bits on the network will be able to discover your passwords. “So let’s create another remote terminal access program which optionally uses our user and source host name to automatically authenticate us instead of requiring us to type in our user name and password?” and thus came up with another remote host access method, known as rlogin (or the infamous “Berkeley r- commands”). Alas, both of these mechanisms have flaws—both transmit the password, if used, in clear-text, so that it’s vulnerable to being sniffed. The r- commands have the added flaw of relying on DNS information, which can be spoofed by attackers, for authentication. SSH was developed as an answer to these issues largely replacing telnet, rlogin (and other rcommands such as rexec and rcp, a remote file copy utility), and adding the capability of forwarding secure X Window System connections (X is the underlying GUI used on most UNIX systems). It is implemented on servers through the use of SSH daemon that listens for incoming client connections on TCP port 22 by default. (The SSH daemon can also be configured to use any other unused TCP port, by updating a configuration file.) Someone looked at the technology in SSH, and decided it would make a good low-cost, general-purpose VPN protocol. Today SSH can be used over PPP, to create a VPN at a higher OSI layer, redirecting TCP/IP ports to allow encrypted services, and proxy X Window System traffic. The SSH 1.x protocol permits secure authentication by way of RSA key exchange between client host and server or individual user to server. The client host and user keys are normally 1K in length, and the SSH server key 768 bits. The SSH 2.x protocol, used freely by available clients and servers, avoids the use of the then-patented RSA algorithms, opting instead for the DH and DSA algorithms. SSH supports a wide variety of encryption options, including RC4, 3DES, Blowfish and AES-256, to ensure data integrity and privacy. (Note that all SSH implementations don’t support all possible encryption options. For example, OpenSSH[15] steers clear of patented algorithms.) Automagic port assignment is in draft stage and an RFC should be ready in early 2003. A draft document is available in the footnote[16]. The book Linux System Security[17] by Mann et.al. provides detailed coverage of setting up and troubleshooting authentication with SSH (as well as explanations of many open source security tools for Linux, including firewalls, scanners, log checkers, the open source Tripwire IDS, etc.) Success Owl!
SSH SSH is often used as a replacement for the telnet terminal communication protocol. Unlike telnet, SSH allows for secure authentication (it doesn’t send the user’s password over the wire in clear text) and encrypted communication. SSH uses port 22, the telnet port, by default.
It can also be used as a VPN tunneling protocol. Real World Owl! Open SSH Do you use telnet or rlogin in your organization? If your environment includes one or more UNIX machines, the answer is likely to be yes. If
so, consider deploying OpenSSH (or another SSH package) as a replacement.
2.1.7 IPSEC IPSec, or IP Security, is a set of standard protocols developed by the IETF (Internet Engineering Task Force) that supports the secure exchange of packets at the IP (network) layer. It is the most popular layer 3 tunneling approach for VPN’s. Unlike PPP, it supports only IP—which today is not the drawback it might have been several years ago when fewer organizations’ backbones were IP-based. IPSec is known for being flexible in configuration, with many options for packet authentication and encryption. IPSec uses public key encryption technology. That is, the sending and receiving devices share a public key with the server who has a secret “private” key. (Public key encryption is discussed in more detail in section 4 of this book.) IPSec establishes a Security Association (SA) for each side of a connection between a client and server. The SA includes the parameters needed to communicate over this connection, such as the type of encryption algorithm negotiated as compatible with both sides, a session key and an authentication algorithm (such as SHA1 or MD5). Session keys are negotiated at the startup of the initial connection via Internet Security Associations and Key Management Protocol (ISAKMP), which provides for key exchange and authentication, and uses digital certificates to allow its authentication to scale to the Internet.[18] The ISAKMP/IKE protocol uses UDP port 500 to pass its traffic. When a NAT is involved, it may use port 4500 instead. In addition to this initial SA, a separate SA is created for each protocol (AH or ESP, described below) and connection direction, as needed.[19] Success Owl!
IPSec IPSec, the most popular Layer 3 tunneling protocol, uses public key encryption technology. It establishes an SA (Security Association) for each side of the connection and negotiates session keys via ISAKMP (Internet Security Associations and Key Management Protocol), which uses port 500 to pass its traffic.
IPSec packet types IPSec packet types include the authentication header (AH) for data integrity and the encapsulating security payload (ESP) for data confidentiality and integrity. The authentication header (AH) protocol creates an envelope that provides integrity, data origin identification and protection against replay attacks. It authenticates every packet as a defense against session-stealing attacks. Although the IP header itself is outside the AH header, AH also provides limited verification of it by not allowing changes to the IP header after packet creation (note that this usually precludes the use of AH in NAT environments, which modify packet headers at the point of NAT). AH packets use IP protocol 51.
The encapsulating security payload (ESP) protocol provides the features of AH (except for IP header authentication), plus encryption. It can also be used in a null encryption mode that provides the AH protection against replay attacks and other such attacks, without encryption or IP header authentication. This can allow for achieving some of the benefits of IPSec in a NAT environment that would not ordinarily work well with IPSec. ESP packets use IP protocol 50. Success Owl!
IPSec Types IPSec packet types include: AH, Authentication Header, which provides integrity, data origin identification and replay attack protection. Uses IP protocol 51. ESP, Encapsulating Security Payload, which provides AH features except IP header verification, plus encryption. It can also be used with “null encryption” to protect against replay attacks. Uses IP protocol 50.
Transport and Tunnel Modes of IPSec IPSec supports Transport and Tunnel modes for encryption. The “Transport” mode encrypts only the data portion of the encapsulated packet, while the “Tunnel” mode encrypts both the data and the header portions of the encapsulated packet hiding more information about the underlying communications[20]. A typical transport-mode packet looks like:
Figure 17: A Simplified comparison of IP V4 and IPSec Transport mode. A more detailed drawing would be: IP Header + AH Header + ESP header + TCP/UDP header + payload + IPSec ESP trailer + IPSec ESP Auth The “Tunnel” mode is most commonly used to encapsulate existing IP traffic for communication between hosts on networks connected by IPSec-enabled routers. With
routers doing the IPSec encapsulation, no changes are required to software or drivers on the hosts—the IPSec encryption is effectively transparent. A typical tunnel-mode packet looks like:
Figure 18: A Simplified comparison of IP V4 and IPSec Tunnel mode. A more detailed drawing would be: Transit IP header + IPSec ESP header + original IP header + TCP/UDP header + payload + IPSec ESP trailer + IPSec ESP Auth The flexibility of IPSec provides for connecting multiple sites in secure VLAN using VPN technologies, or a road warrior to connect in transport mode where the road warrior doesn’t have control over a router and the tunneling mode would fail. Because IPSec creates an SA for both sending and receiving, each SA can be a different mode. For a concise, clear explanation of IPSec on Windows 2000 networks, check out Configuring Windows 2000 Server Security.[21] Success Owl!
IPSec Transport or Tunnel IPSec can be used in either transport or tunnel modes. Transport mode encrypts only the data portion of the packet and can be used with non-IPSec-enabled routers, or between a server and a client, so it is useful for allowing road warriors to connect the corporate network via public networks; the use is generally not transparent to client system, due to the need for IPSec to be installed and properly configured on the client Tunnel mode encrypts both data and header, providing more communication privacy; since tunnel mode can be implemented between cooperating IPSec-enabled routers, the use of IPSec in tunnel mode can be transparent to client systems
IPSec and Encryption Specific encryption technologies used by IPSec include:
• • • • •
Diffie-Hellman key exchange between peers on a public network (this is discussed in more detail in chapter 4) Public key cryptography for signing the Diffie-Hellman exchanges to guard against identity-spoofing and man-in-the-middle attacks Standard algorithms such as DES for data encryption Keyed (HMAC[22]) and non-keyed (MD5, SHA) hashing for packet authentication Signed digital certificates used to provide proof of identity[23]. Success Owl!
IPSec and Diffie-Hellman IPSec uses Diffie-Hellman key exchange to communicate key data without requiring the actual keys to travel across the network, and public key cryptography to sign the key exchange transaction packets, to ensure their integrity and origin.
IPSec vs. DoS Attacks Unlike PPTP, IPSec’s TCP control packets are authenticated, so DoS attacks that depend on the use of TCP control messages sent by attackers to which PPTP-based networks are vulnerable do not affect IPSec based networks.
IPSec Interoperability One thing to be aware of when using IPSec is that interoperability among different vendors’ implementations of the protocols is an on-going effort. As more and more standards are finalized, successful interoperability is becoming more the rule than the exception. But this is not always the case, particularly if you are integrating new hardware or software into an existing “IPSec” based network, test the new equipment on your network to make sure that it works well with your existing configuration. IPSec uses TCP port 1293 and UDP port 1293. Success Owl!
IPSec Ports IPSec protocol and port number information, to keep in mind if you are running IPSec across a router boundary: IPSec uses TCP port 1293 and UDP port 1293. ISAKMP uses UDP port 500 (sometimes UDP port 4500 when NAT is used). ESP uses IP protocol number 50 AH uses IP protocol number 51.
2.1.8 Vulnerabilities Vulnerabilities inherent in remote access solutions are mostly related to the ability to “sniff” passwords and data off the wire, perform man-in-the-middle attacks, and spoof user identities. These vulnerabilities are addressed by increasingly sophisticated authentication mechanisms,
which use certificate-based or Challenge-Response technology, rather than requiring plain text or encrypted transmission of authentication data through the use of increasingly complex ciphers. Other issues include a Trojan Horse on a remote machine. In this instance you have created a secure tunnel for the intrusion![24] Success Owl!
IPSec—A secure tunnel for Trojan Horses Remember that VPN’s don’t protect against the Trojan horses. If a Trojan horse is carried in and allowed access to traffic (such as web browsing, file transfer or email), a VPN won’t stop it.
There are also occasional implementation vulnerabilities in the code for devices and software that implement remote access, due to programmer error. These vulnerabilities are often exploited to cause a Denial of Service, by crashing the client or server. As with all other functionality implemented on computer systems, new bugs are being discovered in communication software all the time. Somewhat complicating things is that some communication code is produced as open source and often finds its way into multiple vendors’ implementations of a particular standard protocol. This means that an implementation flaw in a protocol that is used by numerous manufacturers can affect numerous devices sold by numerous vendors. [1]
www.drizzle.com/~aboba/IEEE/11-02-TBDr0-I-Pre-Authentication.doc
[2]
RFC 2284, http://www.ietf.org/rfc/rfc2284.txt
[3]
http://www.cisco.com/global/AT/veranstaltungen_seminare/downloads/files/03_wlan_secur ity.pdf [4]
http://www.wirelessnewsfactor.com/perl/printer/19852/
[5]
http://www.cisco.com/warp/public/707/32.html
[6]
Hill, Joshua, “An Analysis of the RADIUS Authentication Protocol,” http://www.untruth.org/~josh/security/radius/radius-auth.html
[7]
Solar Designer, “An Analysis of the TACACS+ Protocol and its Implementations,” BugTraq mailing list, http://online.securityfocus.com/archive/1/62742 [9]
“Understanding Point-to-Point Tunneling Protocol (PPTP),” Microsoft Corporation, http://msdn.microsoft.com/library/default.asp?url=/library/enus/dnwebtool/html/understanding_pptp.asp [10]
http://msdn.microsoft.com/library/default.asp?url=/library/enus/dnwebtool/html/understand ing_pptp.asp [11]
http://www.counterpane.com/pptp-paper.html
[12]
http://www.counterpane.com/pptp.html
[13]
http://www.iana.org/assignments/protocol-numbers
[14]
“Layer 2 Tunnel Protocol”, Cisco Systems, http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t1/l2tpt. htm [15]
Open SSH, http://www.openssh.org
[16]
http://www.ietf.org/html.charters/secsh-charter.html
[17]
Mann, Scott, Ellen L. Mitchell, Mitchell Krell, Linux System Security, Prentice-Hall, September, 2002, http://www.nerdbooks.com/item.html?id=0130470112 [18]
“White Paper – IPSecIPSec Executive Summary”, Cisco Systems, http://www.cisco.com/warp/public/cc/so/neso/sqso/eqso/IPSec_wp.htm
[19]
Shinder, Thomas W., Debra Littlejohn Shinder, D. Lynn White, Configuring Windows 2000 Server Security, Syngress, January, 2000, http://www.nerdbooks.com/item.html?id=1928994024. [20]
http://www.howstuffworks.com/vpn3.htm
[21]
Shinder, Thomas W., Debra Littlejohn Shinder, D. Lynn White, Configuring Windows 2000 Server Security, Syngress, January, 2000, http://www.nerdbooks.com/item.html?id=1928994024. [22]
http://www.ietf.org/rfc/rfc2104.txt
[23]
“White Paper – IPSec Executive Summary”, Cisco Systems, http://www.cisco.com/warp/public/cc/so/neso/sqso/eqso/IPSec_wp.htm
[24]
http://www.networkmagazine.com/article/NMG20020603S0004
2.2 Email Email, or electronic mail, involves the transmission of messages over a network. An email system consists of back-end storage for email files, programs that allow users to access stored email files (“read” email), send email, and programs that relay email back and forth among email servers (called “relaying”) and clients. Some email systems use proprietary communication protocols specific to a certain email system, and some use standardized protocols. In the Internet world, the two most common email-related protocols are SMTP (Simple Mail Transport Protocol, via TCP port 25) for sending mail, and POP3 (Post Office Protocol v3, via TCP port 110) used by clients to retrieve incoming email from its storage location on a server. A newer protocol providing a superset of the POP3 functionality allowing access to a hierarchy of mail storage folders is IMAP (Internet Mail Application Protocol, via TCP port 143). Success Owl!
Email Ports
Common email-related protocols include SMTP for sending mail, and POP3 and IMAP for reading mail. SMTP uses TCP port 25. POP3 uses TCP port 110. IMAP uses TCP port 143. Internet email consists of an envelope of headers (of the form Header name: value), each on a separate line, which are interpreted by email servers and email clients, followed by a content area containing the actual message sent. Typical headers include “To:”, “From:”, “MessageID:” (the serial number for the message), “Reply-To:” (if the reply address is different from the sender’s address), “Subject:”, and “Received:” (which is very handy when attempting to trace the source of Spam email, discussed in a later section). A standard used for email content encoding on the Internet, is MIME (or Multipurpose Internet Mail Extensions). Email was originally used solely to transmit text; and, the SMTP protocol used for email transmission was text-based as well. But then a funny thing happened… people realized email would be useful for sending things other than text, such as pictures or even programs. Enterprising techs came up with the idea of encoding binary objects as a series of alphanumeric characters so that they could be sent through email and decoded and viewed/used by the receiver. A number of standards for encoding email content were used over the years, but MIME was the one which took hold because of its flexible approach of using additional headers to specify the type of content included in each binary data segment. These headers are, in turn, interpreted by email client software, which determines which program to use to display or save the object, based on the object’s type. It’s those MIME headers, in conjunction with the settings in your email program, which let your email program know to open faxes with fax-viewer software, Excel documents with Excel, .doc files with Word, .mp3 files with your favorite player, etc.
2.2.1 S/MIME S/MIME, or Secure/MIME, provides sender authentication and message privacy for email. It was developed by RSA Security[25]), and uses standardized formats for message data and digital certifications -- the PKCS #7 data format for messages, and X.509v3 format for digital certificates used for authentication (see chapter 4 for more information). S/MIME is a scalable secure email solution in which the standard hierarchies used in managing X.509v3 digital certificates are used to handle the chores of public key exchange and certificate authentication. For symmetric encryption, S/MIME can use 3DES, DES and RC2 algorithms.[26] One popular package that supports S/MIME is Microsoft Exchange with the Outlook client. Netscape clients also support it—since S/MIME is based on the same PKI as SSL, it has proven straightforward to implement in web browser email clients. Unlike PGP, most implementations are not open-source-based, so implementations have not necessarily been as closely examined for potential security issues that PGP implementations have been. Success Owl!
S/MIME
S/MIME or Secure/MIME provides sender authentication and message privacy for email communications. S/MIME uses X.509v3 digital certificates to perform public key exchange and authentication, without requiring that users manually exchange public key information through other channels.
2.2.2 PGP PGP, or Pretty Good Privacy, provides much the same functionality as S/MIME, but with message data digital certificate formats designed from the ground up, rather than being based on existing standards. PGP uses the Public-Private key encryption method. By implementing PGP without relying on controlled/patented algorithms, so that it could be distributed anywhere without license fees or patent issues, the developers hoped that the idea of using privacy-enhanced email would really catch on. As in S/MIME, 3DES is used for symmetric encryption of message data, and SHA-1 for hashing. Unlike with S/MIME, individual users are responsible for exchanging their public keys with each other and deciding that they trust the public key they received as being proof of the other party’s identity before messages can be sent. Key exchange is usually accomplished via a network of public servers. Success Owl!
PGP PGP provides private, authenticated email communication through the use of public key encryption, as does S/MIME.
Unlike with S/MIME, users are responsible for exchanging public keys with each other and determining that they trust the public keys they receive. Geek Owl! Phil Zimmerman Back in the days when encryption code was considered munitions and eligible for export only under certain circumstances (read: only when the US government possessed the means to easily defeat it), the primary developer of PGP, Phil Zimmerman, got into a bit of legal trouble for exporting PGP code. To show you how obscure some laws related to computer security can be, the same code in printed book form, courtesy of MIT, instead of on floppy or CD was ruled eligible for export (at least for a short time).
2.2.3 Vulnerabilities Data privacy is a major issue in email, as with many other types of network communication. It isn’t enough to ensure that your data is encrypted during transport and storage—rather, you should also ensure it is encrypted with a strong algorithm. See this footnote[27] for a Windows screen saver that attempts to brute-force with S/MIME 40-bit RC2 keys, which are considered a weak encryption mechanism, if your goal is more than casual protection from prying eyes. Sometimes casual protection is enough, but often business requirements demand more security. Your organization would be advised to develop a policy for email security,
specifying to users which levels of encryption, if any, are to be used for which types of communication, how long email is retained, who is permitted access to it, etc.
Message privacy There are privacy concerns about email content during both transmission and storage. Since SMTP is not an encrypted protocol, unless you apply encryption at a higher level through something like S/MIME or PGP, the entire message is transmitted around the Internet in clear text, for all with packet-sniffing software to see (if they care). Also, as Microsoft found out during the anti-trust trial, old email can come back to haunt you in a variety of ways. In Microsoft’s case, internal memos mined from corporate email archives were presented as evidence by both sides. Did it help them or hurt them? It was probably a bit of both. Think about the potential for this when developing your retention policy. There’s no getting around it -- email has a disturbing tendency to hang around for longer than you expect, and to be seen by more people than you expect. Whether it’s an email by a curious user to “BEDLAM DL3”[28], asking what the list (distributed to all of Microsoft.com) was for, personal discussions on a company server that ended up in a temp file seen by a system administrator, an email from one administrator to another about an intrusion that was just detected (which was read by a cracker who then knew to cover his tracks), or messages that should have been sent encrypted that were deleted the next morning by the receiver (but which still sit on backup tapes, protected in the corporate data vault, a year later), the contents just tend to be much less private than you think they are. When in doubt about whether you really “should,” email something or not, just pick up the phone.
Header privacy Another issue with email is that of header privacy. For example, you might want to send multiple users copies of an email message. When you do this, consider your set of recipients and the content of your message—do you want everyone on the list to know the identity of the others who have received the message? You may not. In that case, rather than including all of the names on the “To:” line, consider sending the message “To:” yourself, and “Bcc:” (or blind carbon-copy) everyone else, or use a distribution list—both of these messages will preserve the privacy of other recipients’ identities. Similarly, some SMTP servers log sent and received message header information in a file readable by anyone with access to the server.
Message forgery Another email issue is forgery, or message spoofing, due to the lack of sender authentication in vanilla (as opposed to PGP or S/MIME) email. If you’ve gotten spam, you’ve probably seen forged email. By “forged”, we mean email whose “From:” information along with other possible identifiable information is deliberately incorrect. Email can be forged for a variety of reasons, such as not wanting replies (senders of “make money fast” pleas generally don’t want tens of thousands of replies telling them to bug off, in their personal mailboxes), not wanting their identity to be known (in the case of someone who
wants to communicate anonymously, just to protect their privacy), or wanting to pretend to be someone else (like the virus email which masquerades as an email from Microsoft Security). How do they do it? Sometimes, it’s as simple as changing the “Name” field in their mail program, but leaving the email address as is. (Not very effective, but it is occasionally done, particularly when someone is using a “throwaway” Hotmail or ISP account to send a large volume of junk mail, and doesn’t care how many replies the sending account receives.) At other times, users take advantage of a feature of the SMTP protocol—you can claim to be anyone, without having to prove to the mail server that you are that person, by manually issuing commands to the SMTP server (or using a program designed to issue these commands for you, supplying whatever identifying information you provide it).
Password security Another issue with email-related communication is password security. Many implementations of the POP3 and IMPA3 mail-retrieval protocols still require users to send their user name and password to the mail server in clear text (that is, not encoded, and in a form that can be easily observed by someone monitoring network traffic). Clear text passwords are a bad thing, particularly because they often allow access to resources beyond a POP3 server— like an ISP’s network, a UNIX host, a Windows user account, etc. Microsoft’s answer to this was to create a “Secure Password Authentication” mechanism for POP3 connections to Exchange, which is best described as a version of the NT authentication process with a few enhancements. While it avoids clear text passwords, this “solution” seems to cause other security issues, at least when the Outlook Express client is used for an SPA connection.[29]. One way to get around the issue of sending your password in clear text is to forgo using a POP3 or IMAP3 client and instead use your ISP or email provider’s “web mail” connection to send and receive mail via SSL.
Client-side issues Other email issues are more on the client side than the server side, taking advantage of a bit of social engineering combined with shortcomings in the client program. For example, be warned that some email client programs when encountering an emailed file called something.doc.exe, will ask you if you’d like to open “something.doc” (i.e., only listing the characters after the first period, not the second), and then proceed to gleefully launch a virus contained in the actual “something.doc.exe,” file when you say OK. Refer to 2.3.3.2
Implementation flaws And then, as always, there are implementation flaws. Both Sendmail and Microsoft Exchange are infamous for bugs affecting mail server security. Rather than go through a laundry list of bugs here, we’ll just say that there have been problems in both which could result in an attacker gaining system administrator privileges. See your vendor for details—they’ll have plenty of them. There is no excuse for not watching for security bulletins and keeping key software packages, particularly ones as widely used as those email servers, updated with the vendor’s latest security fixes. If you don’t, your mail server risks “death by script kiddie”.
Still other vulnerabilities involve purely content issues -- undesirable messages sent via email, including Spam and hoaxes—which are discussed in the next section. Success Owl!
Email Security Email security issues include: • •
•
• •
Real World Owl!
Header and data privacy during transmission, logging and storage Lack of sender authentication in protocols for sending mail makes sending spoofed emails (with forged sender information) easy (this is a reason to use S/MIME or PGP) Some mail-related protocols such as POP3 and IMAP still require the user to send user/password information in clear text or with weak encryption, allowing attackers to obtain user passwords Issues in email-related client and server programs Risk for transmission of undesirable content such as viruses
Email in the Real World How does your organization handle email? Do you have an email security policy? How much sensitive information can be gained about your organization by sniffing email packets as they travel around the network? You might want to look into implementing S/MIME or PGP.
2.2.3.1 Spam Spam is a registered trademark of Hormel, a US food company that has been gracious enough to not make a legal issue of its trademark being used for what is officially known as UCE or Unsolicited Commercial Email. (Thank you, Hormel.). UCE begins by 'harvesting' email addresses from web sites and selling millions of them for a fee to offer products or services. Based on my (Tcat) inbox, it appears that the number one purchaser of email addresses is the adult entertainment industry or phony products that offer to either improve my sex life or make me more attractive. I guess with an unusual first name it is difficult to determine if I am male or female, so I get offers to make something bigger for both genders. Home mortgage offers seem to be leading over credit card offers, followed by some phone services. UCE comes in two types of email. They are plain text or HTML based. Plain text is the easiest type of spam to filter out. I use key words to filter them out to a folder to delete en mass. HTML is quite a bit sneakier. Because HTML email can tell a site I opened an email at a certain date and time, the sponsor knows they have a valid email address that they resell at a higher price. It doesn't matter that I deleted it, since the mere opening of the email even in preview mode triggers a validation that the email has been received and read, validating the address. (Tip: Turn off that Outlook “preview pane” to keep Outlook from automatically opening these HTML-based Spam messages. Yes, it’s an inconvenience when viewing desired mail. And more Spam, caused by Outlook reporting a valid address back to a spammer’s web server is quite possibly more of an inconvenience.)
Geek Owl! Spammers Getting Even More Slimly Ed Foster of InfoWorld reported a new twist on getting user to agree to install a virus[30]. Tcat has been a big fan of using a personal firewall to not allow any outbound port 80 traffic with email. While that is pretty effective, some of the spammers are just going deeper as seen here.
Figure 19: Spam1 but wait! It gets worse. My second example is Spam sent attempting to sell Norton Utilities (a Symantec company)
Figure 20: Spam2.bmp now This is a company that is supposed to be selling us protection from such garbage. There are several ways to approach UCE. 1.0 Filter and delete 1.1 Create a set of rules in an email server or client. 1.2 Purchase a commercial program to filter and delete. 1.3 Use a service such as Spam Cop (http://www.spamcop.net)
2.0 Generally speaking DO NOT respond with a message telling them to remove you. This only confirms an email address. Various options are available for “filter and delete”. Most take advantage of the fact that much spam content LOOKS similar. Spam mail tends to use bright colors, capital letters, include phrases like “your account”, “deal of a lifetime”, etc. Spam filters look for these characteristics and isolate incoming email that matches them into a “spam jail” (where you can inspect the messages at your leisure) or deletes them outright. An effective-sounding, different technique is offered by SpamRipper[31]. It keeps track of valid senders, and isolates any email not from a valid sender into a holding area. In the meantime, it sends a reply to the new sender, containing a verification code. If that sender replies with the verification code, then from that point forward, all messages from that sender are considered valid. (Of course, you can also manually add and remove users from the “valid senders” list yourself.) Also Robert Jensen of Mailboxfilter.com has a pretty good looking offering. The company has a 30 day trialware version[32]. If you are not going to follow our advice of #2, be prepared for the time and expense of using whatever state/providence law available to take the fight to the ISP level of the firm that bought in to UCE to have your domain blocked. This is the most costly route in terms of time/money/energy, and (for me) has sometimes been worth it. For starters, DO NOT believe the “From: “address, as it can be spoofed. The best hints as to the email message’s origin are found in the “Received” header which almost always indicates the IP address or domain name of the mail server which was used to send the mail. This brief look at spam reveals it consumes computer & network resources as well as productivity time. Success Owl!
Spam Spam is unsolicited commercial email. It is a point of concern for business because it consumes computer and network resources and staff productivity time.
2.2.3.2 Hoaxes Email can be used as a channel for the distribution of hoaxes, which are bogus stories containing information that sounds credible… and tends to get passed on. The sheer volume of hoaxes is too numerous to even begin to discuss here. A popular example includes some government entity wanting to tax email[33], or the infamous Nigerian email scam[34] in which someone offers to transfer money to you in exchange for using your bank account as a dropbox for a larger sum of money—but instead uses your bank account information to steal from you. How prevalent are these hoaxes? One guy has collected dozens of variants on the Nigerian email scam letter here.[35]
Pop Quiz 0010.00
Pop Quiz 0010.00 Questions 1. On a VPN, traffic is decrypted at ______ ________. 2. Microsoft supports the _______________ and ______standards for use in extranets.
3. ____________is used by an extranet to connect multiple intranets via the Internet. 4. _________ is being seen as an alternative to S/MIME? 5. PGP provides cryptographic routines for_____, ______ and _______ . 6. TACACS+ is an update to TACAS and is backwards compatible. True/False . Answers 1. On a VPN, traffic is decrypted at every endpoint. A virtual private network (VPN) is a secure communications protocol that encrypts traffic between two endpoints. At each endpoint, the traffic is decrypted. Traffic can consist of one-to-one, one-to-many and many-to-many conversations. A typical application for a company would be to place a VPN at a satellite location. All traffic between the location, other satellite locations and corporate headquarters is automatically encrypted. 2. Microsoft supports the PPTP and IPSec standards for use in extranets. Microsoft supports the Point-to-Point Tunneling Protocol (PPTP) and IPSec. 3. Tunneling is used by an extranet to connect multiple intranets via the Internet. 4. PGP/MIME is being seen as an alternative to S/MIME? S/MIME(Secure Multi-Purpose Internet Mail Extensions) is a secure method of sending email that uses the Rivest-Shamir-Adleman encryption system. S/MIME is included in the latest versions of the Web browsers from Microsoft and Netscape and has also been endorsed by other vendors that make messaging products. RSA has proposed S/MIME as a standard to the Internet Engineering Task Force (IETF). An alternative to S/MIME is PGP/MIME, which has also been proposed as a standard. 5. PGP provides cryptographic routines for e-mail, file transfer and file storage. PGP (Pretty Good Privacy) is a software package originally developed by Phil Zimmerman that provides cryptographic routines for e-mail, file transfer, and file storage applications. Zimmerman used existing cryptographic algorithms and protocols and developed a system that can run on multiple platforms. It provides message encryption, digital signatures, data compression, and e-mail compatibility. 6. TACACS+ is an update to TACAS and is backwards compatible. False [25]
http://www.rsasecurity.com
[26]
“S/Mime Frequently Asked Questions”, RSA Security, Inc., http://www.rsasecurity.com/standards/smime/faq.html
[27]
http://www.counterpane.com/smime.html
[28]
Winser, Michael, “Bedlam”, UserL