OS X For Hackers At Heart

THE APPLE OF EVERY HACKER'S EYE

Bruce Potter Technical Editor 

FOREWORD BY TOM OWAD

Ken Caruso
Chris Hurley
Johnny Long
Preston Norvell
Tom Owad

e-books shop
e-books shop
Purchase Now !
Just with Paypal


Book Details
 Price
 3.00 USD
 Pages
 464 p
 File Size
 15,642 KB
 File Type
 PDF format
 ISBN
 1-59749-040-7
 Copyright   
 2005 by Syngress Publishing, Inc  

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, smartcards,
and promotion of secure software engineering practices.
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 billpaying)
job as a professional hacker and security researcher
for Computer Sciences Corporation. Johnny enjoys
spending time with his family, pushing all the shiny buttons
on them thar new-fangled Mac computers, and making much-
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,
Thanks first to Christ without whom I am nothing.To Jen, Makenna,
Trevor and Declan, my love always.Thanks to Bruce Potter for the opportunity
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. Previous to this Ken has worked at Alteon, a
Boeing Company, Elevenwireless, and Digital Equipment
Corporation. Ken’s expertises include wireless networking, digital
security, design and implementation of mission critical systems.
Outside of the corporate sector Ken is co-founder of
Seattlewireless.net one of the first community wireless networking projects in the U.S.
Ken studied Computer Science at Daniel Webster College and is
a member of The Shmoo Group of Security Professionals. Ken has
been invited to speak at many technology and security events
including but not limited to Defcon, San Diego Telecom Council,
Society of Broadcast Engineers, and CPSR: Shaping the Network Society.
Ken would like to acknowledge the great support he has always
received from friends and family as well the unflagging patience of
his editor at Syngress. Ken wrote Chapter 3.

Chris Hurley (Roamer) is a Senior Penetration Tester
working in the Washington, DC area. He is the founder of
the WorldWide WarDrive, a four-year effort by INFOSEC
professionals and hobbyists to generate awareness of the
insecurities associated with wireless networks and is the
lead organizer of the DEF CON WarDriving Contest.
Although he primarily focuses on penetration testing
these days, Chris also has extensive experience performing vulnerability
assessments, forensics, and incident response. Chris has spoken
at several security conferences and published numerous whitepapers
on a wide range of INFOSEC topics. Chris is the lead author of
WarDriving: Drive, Detect, Defend (Syngress, ISBN: 1-931836-03-5),
and a contributor to Aggressive Network Self-Defense (Syngress, ISBN:
1-931836-20-5) and InfoSec Career Hacking (Syngress, ISBN: 1-
59749-011-3). Chris holds a bachelor’s degree in computer science.
He lives in Maryland with his wife Jennifer and their daughter
Ashley. Chris wrote Chapter 4.

Tom Owad is a Macintosh consultant in south-central PA
and the D.C. area and vice president of Keystone
MacCentral. He serves on the board of directors of the
Apple I Owners Club, where he is also webmaster and archivist.
Tom is owner and Webmaster of Applefritter, a Macintosh
community of artists and engineers. Applefritter provides its members
with discussion boards for the exchange of ideas and hosts
countless member-contributed hardware hacks and other projects.
Tom holds a BA in computer science and international affairs from
Lafayette College, PA.Tom is the author of the Syngress title, Apple I
Replica Creation: Back to the Garage (ISBN: 1-931836-40-X).
Tom wrote Chapter 7. He is also the foreword contributor.

Preston Norvell is a computer and networking geek. He
has been fortunate to work as an administrator, engineer
and consultant, and currently works as a network architect
for a satellite communications company in the small town
of Alaska, USA. He has pulled Ethernet cable through
sewage melted by body heat, written the bill software for a
utility, co-written a book on Mac OS X Security, designed
and deployed systems and networks in places small and large, ported
Open Source software to Mac OS X, and many other rather silly fun things.
In his off time he tinkers with computers and networks, thinks
about collections databases for museums, purchases entirely too
many DVD’s, wastes too much time, cooks for friends when he can,
enjoys a spot of tea now and again, and continues to add to the
lived-in look of his dwelling at a reasonable pace. He also plans to
take over the world with a vast army of mind-controlled, monkeypiloted robot minions.
I would like to thank Bruce and the folks at Syngress for the opportunity
to tag along on this project, as well as their patience and guidance.
Apologies to my friends and co-workers for my absences and the late mornings
with tired eyes and many thanks for their patience and support.
Thanks also to Hershey for Good & Plenty’s, Republic of Tea for Blackberry
Sage and a little place in Chinatown for their white tea and lapsang souchong.
And thanks much to the social insects all.
Preston wrote Chapter 1. He also contributed to the technical editing of this book.

Table of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Chapter 1 A Network Admin’s Guide to Using Mac OS X
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
Running a Headless Mac . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Apple Remote Desktop . . . . . . . . . . . . . . . . . . . . . . . . .4
VNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Serial Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Adding Serial Ports . . . . . . . . . . . . . . . . . . . . . . . . . .10
Booting to the Console Instead of the GUI . . . . . . . .10
Connecting to the Headless Mac . . . . . . . . . . . . . . . .12
Extra Credit: Serial over Bluetooth . . . . . . . . . . . . . .13
Extra Extra Credit: Logging to the Serial Port . . . . . .18
Adding Interfaces to the Mac . . . . . . . . . . . . . . . . . . . . . . .19
Physical Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20
Interface Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
GUI Configuration . . . . . . . . . . . . . . . . . . . . . . . . . .21
Command Line Configuration . . . . . . . . . . . . . . . . .22
The Macintosh as a Router . . . . . . . . . . . . . . . . . . . . . . . . .25
Basic Host Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . .26
Basic Static Routing . . . . . . . . . . . . . . . . . . . . . . . . . . .29
Basic Dynamic Network Routing . . . . . . . . . . . . . . . . .30
“Real” Routing with Zebra . . . . . . . . . . . . . . . . . . . . .32
Downloading and Installing Zebra . . . . . . . . . . . . . . .33
Configuring Zebra for Routing . . . . . . . . . . . . . . . .36
Mac OS X as a RADIUS server . . . . . . . . . . . . . . . . . . . . .42
FreeRADIUS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Mac OS X Server Integration . . . . . . . . . . . . . . . . . .46
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . .51
Chapter 2 Automation
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Using Automator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55
Creating a One-shot Automation . . . . . . . . . . . . . . . . . .58
Creating a More Versatile Automation . . . . . . . . . . . . . .61
Saving Automations as Applications and Workflows . . . . .62
Saving Automations as Plug-ins . . . . . . . . . . . . . . . . . . .64
Finder Plug-ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . .64
iCal Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65
Image Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
Print Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . .66
Folder Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67
Script Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
Hacker-friendly Automator Actions . . . . . . . . . . . . . . . .69
Automator | Run AppleScript . . . . . . . . . . . . . . . .70
Automator | Run Shell Script . . . . . . . . . . . . . . . .70
Automator | Run Web Service . . . . . . . . . . . . . . .71
Automator | View Results . . . . . . . . . . . . . . . . . . .72
Finder | Set the Desktop Picture . . . . . . . . . . . . . .73
Image Capture | Take Picture . . . . . . . . . . . . . . . . .73
Mail | Add Attachments . . . . . . . . . . . . . . . . . . . . .75
PDF | Encrypt PDF Document . . . . . . . . . . . . . . .76
PDF | Watermark PDF . . . . . . . . . . . . . . . . . . . . .76
Safari | Download URLs . . . . . . . . . . . . . . . . . . . .77
Safari | Get Link URLs . . . . . . . . . . . . . . . . . . . . .77
Safari | Filter URLs . . . . . . . . . . . . . . . . . . . . . . . . .78
System | System Profile Action . . . . . . . . . . . . . . . . .80
XCode Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
Understanding AppleScript . . . . . . . . . . . . . . . . . . . . . . . .81
Introducing the Script Editor . . . . . . . . . . . . . . . . . . . . .81
Hello,World! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .83
Recording Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
AppleScript Save Options . . . . . . . . . . . . . . . . . . . . . . .86
Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86
Application (Applet) . . . . . . . . . . . . . . . . . . . . . . . . .86
Bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86
Script Assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87
AppleScript Dictionary . . . . . . . . . . . . . . . . . . . . . . . . .88
Not Quite An AppleScript Language Guide . . . . . . . . . .89
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90
Line Breaks (The ¬ character) . . . . . . . . . . . . . . . . . .90
Capitalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
The “the” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91
Variables and Basic Mathematical Operations . . . . . . .91
Looping (Repeat) . . . . . . . . . . . . . . . . . . . . . . . . . . .93
Learning By Example: Interactive Dialogs . . . . . . . . . . . .95
A Simple Mac Help Script . . . . . . . . . . . . . . . . . . . .95
Interactive Dialog Boxes . . . . . . . . . . . . . . . . . . . . . . . .95
Bash Scripting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100
Foundations of Shell Scripting . . . . . . . . . . . . . . . . . . .101
Selecting a Shell . . . . . . . . . . . . . . . . . . . . . . . . . . .102
Permissions and Paths . . . . . . . . . . . . . . . . . . . . . . .102
Common Conventions . . . . . . . . . . . . . . . . . . . . . .103
Pipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105
Job Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .109
Tests and Return Codes . . . . . . . . . . . . . . . . . . . . .110
The All-Important If,Then, and Else . . . . . . . . . . . .113
Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
Harnessing Mac’s UNIX Commands . . . . . . . . . . . . . .119
Cat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Grep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120
Sed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122
Awk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
Pulling It Together: A bash Mini-project . . . . . . . . . . . .126
Curl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Lynx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
Bridging the Gap From bash to AppleScript . . . . . . . . .138
Using Bash, AppleScript, and Automator Together! . . . . . . .139
Overcoming Automator’s Lame Display Dialogs . . . . . .140
Exchanging Data With AppleScript . . . . . . . . . . . . . . .141
Exchanging Data With Bash . . . . . . . . . . . . . . . . . . . .143
Ethereal Auto-Launcher . . . . . . . . . . . . . . . . . . . . . . . .144
Password-protected Zip and Unzip . . . . . . . . . . . . . . . .146
Basic nmap Front-end . . . . . . . . . . . . . . . . . . . . . . . . .153
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
Links to Sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . .158
Chapter 3 OS X in a Microsoft Environment
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160
Who Should Read this Chapter? . . . . . . . . . . . . . . . . .160
Windows Terms You Should Know . . . . . . . . . . . . . . .161
Accessing Network File Systems . . . . . . . . . . . . . . . . . . . .163
Mounting Network File Systems via AppleScript . . . . .166
Mounting Network File Systems via Terminal . . . . . . .168
Using a .nmbrc or nsmb.conf File to Store Login
Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169
Microsoft Distributed File System . . . . . . . . . . . . . . . .171
NTLM Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . .172
Accessing NTLM-Protected Web Servers
via the Command Line . . . . . . . . . . . . . . . . . . . . . . . .173
Using an NTLM-Protected Proxy from the
Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174
Using a Local Proxy to Handle NTLM Authentication .175
Connecting to a Windows PPTP Server . . . . . . . . . . . . . .180
Split Tunneling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
Routing DNS Requests . . . . . . . . . . . . . . . . . . . . . . .184
Zen of Running Windows Boxes from a Mac . . . . . . . . . .185
MS Remote Desktop Client . . . . . . . . . . . . . . . . . . . .185
Opening Remote Desktop Connections from the
Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . .187
Opening Concurrent Remote Desktop Sessions . . .188
Making Local Resources Available on the Remote
Windows Computer . . . . . . . . . . . . . . . . . . . . . . . .189
Rdesktop—The Open Source Remote Desktop Client 191
Installing Rdesktop . . . . . . . . . . . . . . . . . . . . . . . . .192
Setting Up Terminal to Use Your X11 Server . . . . . .193
Using Rdesktop . . . . . . . . . . . . . . . . . . . . . . . . . . .195
Using Shell Scripts to Speed up Rdesktop Logins . .196
Virtual Network Computing . . . . . . . . . . . . . . . . . . . .197
Installing VNC on Windows . . . . . . . . . . . . . . . . . .199
Connecting the VNC Server from OS X . . . . . . . . .201
Synergy—Using a Mac and PC from one
Keyboard/Mouse . . . . . . . . . . . . . . . . . . . . . . . . . . . .202
Installing and Configuring Synergy . . . . . . . . . . . . . . .203
Talking to Windows From the Terminal . . . . . . . . . . . .207
SSH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207
Installing SSH on Windows . . . . . . . . . . . . . . . . . . .208
Starting and Stopping a Service . . . . . . . . . . . . . . . .211
Windows Command Line Tools . . . . . . . . . . . . . . .212
Samba Command Line Utilities . . . . . . . . . . . . . . . .214
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218
Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . .221
Chapter 4 WarDriving and Wireless Penetration Testing with OS X
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
WarDriving with KisMAC . . . . . . . . . . . . . . . . . . . . . . . .224
KisMAC Startup and Initial Configuration . . . . . . . . . .225
Configuring the KisMAC Preferences . . . . . . . . . . . . .226
Scanning Options . . . . . . . . . . . . . . . . . . . . . . . . . .226
Filter Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227
Sound Preferences . . . . . . . . . . . . . . . . . . . . . . . . .228
Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231
.kismac Preferences . . . . . . . . . . . . . . . . . . . . . . . . .231
Mapping WarDrives with KisMAC . . . . . . . . . . . . . . .233
Importing a Map . . . . . . . . . . . . . . . . . . . . . . . . . .233
Practicing WarDriving with KisMAC . . . . . . . . . . . . . .239
Using the KisMAC Interface . . . . . . . . . . . . . . . . . .239
Penetration Testing with OS X . . . . . . . . . . . . . . . . . . . . .244
Attacking WLAN Encryption with KisMAC . . . . . . . .244
Attacking WEP with KisMAC . . . . . . . . . . . . . . . .244
Re-injection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
Attacking WPA with KisMAC . . . . . . . . . . . . . . . . . . .248
Other Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249
Brute Force Attacks Against 40-Bit WEP . . . . . . . .249
Wordlist Attacks . . . . . . . . . . . . . . . . . . . . . . . . . . .250
Other OS X Tools for WarDriving and WLAN Testing . . . .250
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253
Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . .255
Chapter 5 Mac OS X for Pen Testers
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258
The OS X Command Shell . . . . . . . . . . . . . . . . . . . . . . . .260
Compiling and Porting Open Source Software . . . . . . . . . .264
OS X Developer Tools . . . . . . . . . . . . . . . . . . . . . . . . .264
Perl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .266
Configuring CPAN . . . . . . . . . . . . . . . . . . . . . . . .267
Using CPAN’s Interactive Mode . . . . . . . . . . . . . . .269
Using CPAN in Command-Line Mode . . . . . . . . . .273
Installing XWindows . . . . . . . . . . . . . . . . . . . . . . . . . .273
Compiling Programs on Mac OS X . . . . . . . . . . . . . . .275
Compiling Versus Porting . . . . . . . . . . . . . . . . . . . . . .276
Installing Ported Software on Mac OS X . . . . . . . . . . .277
Why Port: A Source Install Gone Bad! . . . . . . . . . . .277
DarwinPorts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279
Fink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
Installing Binary Packages Using apt-get . . . . . . . . .284
Using The “Top 75 Security Tools” List . . . . . . . . . . . . . . .288
Category: Attack (Network) . . . . . . . . . . . . . . . . . . . . .289
Category: Attack (Scanner) . . . . . . . . . . . . . . . . . . . . . .290
Category: Attack (Web) . . . . . . . . . . . . . . . . . . . . . . . .290
Category: Crypto . . . . . . . . . . . . . . . . . . . . . . . . . . . .291
Category: Defense . . . . . . . . . . . . . . . . . . . . . . . . . . . .292
Category: Defense / Forensics . . . . . . . . . . . . . . . . . . .294
Category: Evasion . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
Category: Footprinting . . . . . . . . . . . . . . . . . . . . . . . .294
Category: Monitor (Sniffing) . . . . . . . . . . . . . . . . . . . .295
Category: Multipurpose . . . . . . . . . . . . . . . . . . . . . . . .298
Category: Password Cracking . . . . . . . . . . . . . . . . . . . .298
Category: Password Cracking (Remote) . . . . . . . . . . . .299
Category: Programming . . . . . . . . . . . . . . . . . . . . . . . .300
Category: Scanning . . . . . . . . . . . . . . . . . . . . . . . . . . .300
Installing and Using The “Big”Tools . . . . . . . . . . . . . . . . .301
Ethereal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301
Nessus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303
Other OS X “Must Haves” . . . . . . . . . . . . . . . . . . . . . . . .306
Running CD-based Linux Distributions . . . . . . . . . . . .308
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . .315
Chapter 6 Mac Tricks (Stupid Powerbook Stunts That Make You Look Like a God)
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318
Desktop Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318
Screen Savers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .320
Widgets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322
System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322
Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323
Calculators and Converters . . . . . . . . . . . . . . . . . . . . .326
Fun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327
Apple Motion Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . .328
VNC with Apple Remote Desktop . . . . . . . . . . . . . . . . . .331
Gestures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
Sogudi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337
GUI Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .339
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343
Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . .345
Chapter 7 OS X For the Road Warrior
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348
Safe and Secure E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . .348
IMAP SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350
STARTTLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352
GnuPG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353
Connecting From Anywhere (Almost) . . . . . . . . . . . . .354
GPRS Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355
Firewalling Your Mac . . . . . . . . . . . . . . . . . . . . . . . . . .359
Battery Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . .361
Conservation Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . .361
Calibration and Total Discharge . . . . . . . . . . . . . . . . . .363
Resetting the Power Manager . . . . . . . . . . . . . . . . . . .364
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365
Solutions Fast Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365
Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . .366
Appendix A Hacking the iPod . . . . . . . . . . . . . . . . . . . 369
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
Opening Your iPod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
Preparing for the Hack . . . . . . . . . . . . . . . . . . . . . . . .375
First Generation iPods . . . . . . . . . . . . . . . . . . . . . . . . .376
Second and Third-Generation iPods . . . . . . . . . . . . . . .379
Replacing the iPod Battery . . . . . . . . . . . . . . . . . . . . . . . .382
Preparing for the Hack . . . . . . . . . . . . . . . . . . . . . . . .383
Battery Replacement: First and Second-Generation iPods . .385
Battery Replacement:Third-Generation iPods . . . . . . .390
Upgrading a 5GB iPod’s Hard Drive . . . . . . . . . . . . . . . . .397
Preparing for the Hack . . . . . . . . . . . . . . . . . . . . . . . .398
Performing the Hack . . . . . . . . . . . . . . . . . . . . . . . . . .399
From Mac to Windows and Back Again . . . . . . . . . . . . . . .409
Preparing for the Hack . . . . . . . . . . . . . . . . . . . . . . . .409
Going from Windows to Macintosh . . . . . . . . . . . . . . .410
Going from Macintosh to Windows . . . . . . . . . . . . . . .411
iPod Diagnostic Mode . . . . . . . . . . . . . . . . . . . . . . . . . . .413
The Diagnostic Menu . . . . . . . . . . . . . . . . . . . . . . . . .413
Disk Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416
Additional iPod Hacks . . . . . . . . . . . . . . . . . . . . . . . . . . .418
Installing Linux on an iPod . . . . . . . . . . . . . . . . . . . . .418
Repairing the FireWire Port . . . . . . . . . . . . . . . . . . . .418
Scroll Wheel Fix . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419
iPod Resources on the Web . . . . . . . . . . . . . . . . . . . . . . .420
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423


Bookscreen
e-books shop

Foreword
Preston wrote Chapter 1. He also contributed to the technical editing of
“The computer for the rest of us” was never considered much of a hacker’s
platform.The original Mac didn’t even have arrow keys (or a control key, for
that matter), forcing the user to stop what he was doing, take his hands off the
keyboard, and use the mouse.The Mac’s case was sealed so tight, a special tool
known as the “Mac cracker” was made to break it open. It was a closed
machine, an information appliance.The expansionless design and sealed case of
the Mac stood in stark contrast to the Apple II that came before it.

With its rich graphical interface and ease of use, the Mac became the standard
for graphic artists and other creative types. Custom icons and desktop patterns
soon abounded.The users that embraced the Macintosh for its simplicity
began using ResEdit (Resource Editor) to modify system files and to personalize
their machines.The Mac developed a fanatical following, and you could
rest assured that each fanatic’s system was unique, with the icons, menus, program
launchers, windows, sounds, and keyboard shortcuts all scrutinized and
perfected to meet his personal needs. My Color Classic even played Porky Pig’s
“That’s all folks” each time it shut down (although the novelty wore off on that one pretty quick).

Mac OS X was met with some trepidation. It broke every program and
system modification, it didn’t have a proper Apple menu—and what on earth
was this “dock”? Jef Raskin, who gave the Mac its name, wrote of Mac OS X,
“Apple has ignored for years all that has been learned about developing UIs. It’s
unprofessional, incompetent, and it’s hurting users.” Bruce Tognazzini, founder
of the Apple Human Interface Group, even penned an article titled “Top 10
Reasons the Apple Dock Sucks.”

Mac OS X was an entirely different operating system. Most classic Mac OS
applications were compatible, but only when operating inside a special runtime
environment. All system extensions and user interface modifications were
permanently lost. For many users, these changes are what made the computer
“theirs” and they replied heavily upon their customizations to efficiently get
work done.The loss was tremendous. And it was worth it.

Preemptive multitasking, symmetric multiprocessing, multithreading, and
protected memory. Protected memory was the one I wanted most.
At a 1998 keynote, Steve Jobs showed off a mere dialog box, to great
applause.The dialog read:“The application Bomb has unexpectedly quit.You
do not need to restart your computer.” I take it for granted on Mac OS X, but
as I write this, I’m recalling occasions when Internet Explorer brought my
entire system down multiple times in a single day.
Mac OS X promised to combine the power and stability of Unix with the
ease of use of Macintosh. I was cautiously optimistic with early releases (I’ve
been using Mac OS X since Developer Release 4).

Protected memory doesn’t do much good when all your apps are running
in the Classic Environment, and the user interface did indeed leave a lot to be
desired. But with each revision, Mac OS X has improved dramatically.With
Mac OS 10.4 Tiger, I no longer even have the Classic Environment installed,
the user interface has improved to a degree that in many ways I far prefer it to
that of Mac OS 9. Mac OS X has succeeded in combining the best of Unix
with the best of the Macintosh.

The Macintosh has become “the computer for everybody.” For novices, it
remains the easiest computer there is. For enthusiasts, as in the old days, there is
a vast array of third-party applications, utilities, and customizations, to tweak
and improve the way the OS works. For hackers and programmers, there’s the
command line and the BSD Unix compatibility layer.

All the power, all the tools, and all the geekery of Linux is present in Mac
OS X. Shell scripts, X11 apps, processes, kernel extensions… it’s a unix platform.
It’s even possible to forgo Apple’s GUI altogether and run KDE.Why
you’d want to is another matter.While its unix core is what has made Mac OS
X a viable platform for hackers and programmers, it’s the user interface that has made it popular.
Apple’s Terminal application is perpetually running on my PowerBook, but
so is iTunes, iCal, and a slew of Dashboard Widgets.

If Apple hadn’t moved to Mac OS X, I would have two computers.A
classic Macintosh would be home to my “business” work—my email, calendar,
word processor, etc.The other would be a Linux box, which I would probably
connect to via an ssh connection from my Mac. Here would be the toys, the
programming tools, the shell scripts, and everything I couldn’t do within the
confines of the old Mac.Thanks to the elegance and sophistication of Mac OS
X, this isn’t necessary. I’ve got every program I want to run and every tool I
need to use on a single 4.6 lbs, 12” PowerBook.
—Tom Owad
Loading...
DMCA.com Protection Status