OS X for Hackers at Heart 2005.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
343_OSX_FM.qxd 11/4/05 6:56 PM Page i Register for Free Membership to [email protected] Over the last few years, Syngress has published many best-selling and critically acclaimed books, including Tom Shinder’s Configuring ISA Server 2004, Brian Caswell and Jay Beale’s Snort 2.1 Intrusion Detection, and Angela Orebaugh and Gilbert Ramirez’s Ethereal Packet Sniffing. One of the reasons for the success of these books has been our unique [email protected] program. Through this site, we’ve been able to provide readers a real time extension to the printed book. As a registered owner of this book, you will qualify for free access to our members-only [email protected] program. Once you have registered, you will enjoy several benefits, including: ■ Four downloadable e-booklets on topics related to the book. Each booklet is approximately 20-30 pages in Adobe PDF format. They have been selected by our editors from other best-selling Syngress books as providing topic coverage that is directly related to the coverage in this book. ■ A comprehensive FAQ page that consolidates all of the key points of this book into an easy-to-search web page, pro- viding you with the concise, easy-to-access data you need to perform your job. ■ A “From the Author” Forum that allows the authors of this book to post timely updates and links to related sites, or additional topic coverage that may have been requested by readers. Just visit us at www.syngress.com/solutions and follow the simple registration process. You will need to have this book with you when you register. Thank you for giving us the opportunity to serve your needs. And be sure to let us know if there is anything else we can do to make your job easier. 343_OSX_FM.qxd 11/4/05 6:56 PM Page iii OS X for Hackers at Heart THE APPLE OF EVERY HACKER’S EYE Ken Caruso Chris Hurley Johnny Long Preston Norvell Tom Owad FOREWORD BY TOM OWAD Bruce Potter Technical Editor APPLEFRITTER.COM 343_OSX_FM.qxd 11/4/05 6:56 PM Page iv Syngress Publishing, Inc., the author(s), and any person or firm involved in the writing, editing, or produc- tion (collectively “Makers”) of this book (“the Work”) do not guarantee or warrant the results to be obtained from the Work. There is no guarantee of any kind, expressed or implied, regarding the Work or its contents.The Work is sold AS IS and WITHOUT WARRANTY.You may have other legal rights, which vary from state to state. In no event will Makers be liable to you for damages, including any loss of profits, lost savings, or other incidental or consequential damages arising out from the Work or its contents. Because some states do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you. You should always use reasonable care, including backup and other appropriate precautions, when working with computers, networks, data, and files. Syngress Media®, Syngress®,“Career Advancement Through Skill Enhancement®,”“Ask the Author UPDATE®,” and “Hack Proofing®,” are registered trademarks of Syngress Publishing, Inc.“Syngress:The Definition of a Serious Security Library”™,“Mission Critical™,” and “The Only Way to Stop a Hacker is to Think Like One™” are trademarks of Syngress Publishing, Inc. Brands and product names mentioned in this book are trademarks or service marks of their respective companies. KEY SERIAL NUMBER 001 HJIRTCV764 002 PO9873D5FG 003 829KM8NJH2 004 GFR5J82S4D 005 CVPLQ6WQ23 006 VBP965T5T5 007 HJJJ863WD3E 008 2987GVTWMK 009 629MP5SDJT 010 IMWQ295T6T PUBLISHED BY Syngress Publishing, Inc. 800 Hingham Street Rockland, MA 02370 OS X for Hackers at Heart Copyright © 2005 by Syngress Publishing, Inc.All rights reserved. Printed in Canada. Except as permitted under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher, with the exception that the program listings may be entered, stored, and executed in a com- puter system, but they may not be reproduced for publication. Printed in Canada 1 2 3 4 5 6 7 8 9 0 ISBN: 1-59749-040-7 Publisher:Andrew Williams Page Layout and Art: Patricia Lupien Acquisitions Editor: Jaime Quigley Copy Editor:Amy Thomson Technical Editor: Bruce Potter Indexer: J. Edmund Rush Cover Designer: Michael Kavish Distributed by O’Reilly Media, Inc. in the United States and Canada. For information on rights, translations, and bulk sales, contact Matt Pedersen, Director of Sales and Rights, at Syngress Publishing; email [email protected] or fax to 781-681-3585. 343_OSX_FM.qxd 11/4/05 6:56 PM Page v Acknowledgments Syngress would like to acknowledge the following people for their kindness and sup- port in making this book possible. Syngress books are now distributed in the United States and Canada by O’Reilly Media, Inc.The enthusiasm and work ethic at O’Reilly are incredible, and we would like to thank everyone there for their time and efforts to bring Syngress books to market:Tim O’Reilly, Laura Baldwin, Mark Brokering, Mike Leonard, Donna Selenko, Bonnie Sheehan, Cindy Davis, Grant Kikkert, Opol Matsutaro, Steve Hazelwood, Mark Wilson, Rick Brown,Tim Hinton, Kyle Hart, Sara Winge, Peter Pardo, Leslie Crandell, Regina Aggio Wilkinson, Pascal Honscher, Preston Paull, Susan Thompson, Bruce Stewart, Laura Schmier, Sue Willing, Mark Jacobsen, Betsy Waliszewski, Kathryn Barrett, John Chodacki, Rob Bullington, Kerry Beck, and Karen Montgomery. The incredibly hardworking team at Elsevier Science, including Jonathan Bunkell, Ian Seager, Duncan Enright, David Burton, Rosanna Ramacciotti, Robert Fairbrother, Miguel Sanchez, Klaus Beran, Emma Wyatt, Chris Hossack, Krista Leppiko, Marcel Koppes, Judy Chappell, Radek Janousek, and Chris Reinders for making certain that our vision remains worldwide in scope. David Buckland, Marie Chieng, Lucy Chong, Leslie Lim,Audrey Gan, Pang Ai Hua, Joseph Chan, and Siti Zuraidah Ahmad of STP Distributors for the enthusiasm with which they receive our books. David Scott, Tricia Wilden, Marilla Burgess, Annette Scott, Andrew Swaffer, Stephen O’Donoghue, Bec Lowe, Mark Langley, and Anyo Geddes of Woodslane for distributing our books throughout Australia, New Zealand, Papua New Guinea, Fiji,Tonga,Solomon Islands, and the Cook Islands. v 343_OSX_FM.qxd 11/4/05 6:56 PM Page vi 343_OSX_FM.qxd 11/4/05 6:56 PM Page vii Technical Editor and Contributing Author Bruce Potter is a Senior Associate at Booz Allen Hamilton. Prior to working at Booz Allen Hamilton, Bruce served as a software security consultant for Cigital in Dulles, VA. Bruce is the founder of the Shmoo Group of security professionals. His areas of expertise include wireless security, large-scale network architectures, smart- cards, and promotion of secure software engineering prac- tices. Bruce coauthored the books 802.11 Security and Mac OS X Security. He was trained in computer science at the University of Alaska, Fairbanks. First and foremost I would like to thank my family for putting up with me and my time constraints due to the many projects I am dealing with. I’d also like to thank The Shmoo Group for all the guidance and wisdom they have imparted on me over the years. Finally, a big thank-you goes to Syngress, for giving me the opportunity to work on an interesting enjoyable project. Bruce wrote Chapter 7. Contributing Authors Johnny Long is a “clean-living” family guy who just so happens to like hacking stuff. Recently, Johnny has enjoyed writing stuff and presenting stuff at conferences, which has served as yet another diversion to a serious (and bill- paying) job as a professional hacker and security researcher for Computer Sciences Corporation. Johnny enjoys spending time with his family, pushing all the shiny but- tons on them thar new-fangled Mac computers, and making much- vii 343_OSX_FM.qxd 11/4/05 6:56 PM Page viii too-serious security types either look at him funny or start laughing uncontrollably. Johnny has written or contributed to several books, including Google Hacking for Penetration Tester” from Syngress Publishing, which has secured rave reviews and has lots of pictures. Johnny can be reached through his website, http://johnny.ihackstuff.com Thanks first to Christ without whom I am nothing.To Jen, Makenna, Trevor and Declan, my love always.Thanks to Bruce Potter for the opportu- nity to chime in on this one, and to my fellow co-authors. I hold you all in the highest regard.Thanks to Anthony K,Al E, Ryan C,Thane E, and Gilbert V for introducing me to the Mac.Thanks to Jaime Quigley,Andrew Williams and all of Syngress. I can’t thank you enough.Thanks to Jason Arnold (Nexus!) for hosting me, and all the mods on JIHS for your help and support. Shouts to Nathan B, Sujay S, Stephen S, James Foster, Jenny Yang, SecurityTribe, the Shmoo Group, Sensepost, Blackhat, Defcon, Neal Stephenson (Baroque), Stephen King (On Writing),Ted Dekker (Thr3e), P.O.D., Pillar, Project86, Shadowvex,Yoshinori Sunahara.“I’m sealing the fate of my selfish existence / Pushing on with life from death, no questions left / I’m giving my life, no less” from A Toast To My former Self by Project86 Johnny wrote Chapter 2 and Chapter 5. He also contributed to the technical editing of this book. Ken Caruso is a Senior Systems Engineer for Serials Solutions a Pro Quest company. Serials Solutions empowers librarians and enables their patrons by helping them get the most value out of their electronic serials. Ken plays a key role in the design and engineering of mission critical customer facing systems and networks.