Hacking Knoppix byScott Granneman John Wiley & Sons 2006 (336 pages) ISBN:0764597841 Written by a seasoned pro who has been using Knoppix for years, this lighthearted yet informative book shows hack-hungry fans how to customize Knoppix distributions, create Knoppix-based live CDs, rescue a Windows computer that won't boot, and more Table of Contents Hacking Knoppix Introduction Part I - Navigating the Amazing Knoppix Toolkit Chapter 1 - Unraveling the Knoppix Toolkit Maze Chapter 2 - Maximizing Knoppix Internet Tools Chapter 3 - Connecting to Other Machines and Resources Part II - Rescuing and Recovering Systems Using Knoppix Chapter 4 - Fixing Linux with Knoppix Chapter 5 - Fixing Windows with Knoppix Chapter 6 - Assessing Security with Knoppix Part III - Knoppix Variants Chapter 7 - Clustering with Knoppix Chapter 8 - Checking Out Security Distros Part IV - Customizing Knoppix and Live CDs Chapter 9 - Changing Knoppix to Fit Your Needs Chapter 10 - Remastering Knoppix Chapter 11 - Creating Archix, Knoppix for Kids Chapter 12 - Creating Myppix, Your Personal Knoppix Appendix A - Booting Knoppix Appendix B - Installing Knoppix to Your Hard Drive Index List of Figures List of Sidebars Back Cover Knoppix is so cool It's easy to use, ultra-portable, and doesn't care what platform you're using It camps on your system without canceling out your regular installation or messing with your files And it's really fun to play with Here are all kinds of ways to customize Knoppix for your particular needs, plus the scoop on various Knoppix distros Learn to build a Knoppix first-aid kit for repairing cranky Windows and rescuing precious data, or create your own Live CD Sweet! What can you do with it? Hundreds of things including these: Surf the Web Listen to music Fix Linux Fix Windows Test system security Create diskless clients Build a Knoppix distro for kids Personalize your own distro About the Author Scott Granneman is an author, educator, and consultant Scott's book on the Firefox web browser, Don't Click on the Blue E!: Switching to Firefox, has garnered wide praise In addition, he is a monthly columnist for SecurityFocus and for Linux Magazine, and he blogs professionally on the Open Source Weblog He is currently an adjunct professor at Washington University in St Louis, where he teaches a variety of courses about technology, social software, and the Internet Finally, as a co-owner of WebSanity, Scott helps nonprofits and businesses use the company's Content Management System to take full advantage of the Web's communication, sales, and service opportunities He's been using Linux for a decade, and swears by it Hacking Knoppix Scott Granneman WILEY Published by Wiley Publishing, Inc 10475 Crosspoint Boulevard Indianapolis, IN 46256 http://www.wiley.com © 2006 Wiley Publishing, Inc Indianapolis, Indiana Published simultaneously in Canada ISBN 13: 978-0-7645-9784-8 0-7645-9784-1 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 1B/RU/RS/QV/IN No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600 Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S at (800) 762-2974, outside the U.S at (317) 572-3993 or fax (317) 572-4002 Wiley also publishes its books in a variety of electronic formats Some content that appears in print may not be available in electronic books Library of Congress Cataloging-in-Publication Data Granneman, Scott Hacking Knoppix / Scott Granneman p cm Includes index ISBN 13: 978-0-7645-9784-8 (paper/cd-rom) ISBN 10: 0-7645-9784-1 (paper/cd-rom) Linux Knoppix (Computer file) 3 Operating systems (Computers) I Title QA76.76.O63G7229 2005 005.4′32-dc22 2005029725 Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc and/or its affiliates, in the United States and other countries, and may not be used without written permission ExtremeTech and the ExtremeTech logo are trademarks of Ziff Davis Publishing Holdings, Inc Used under license All rights reserved All other trademarks are the property of their respective owners Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book About the Author Scott Granneman is an author, educator, and consultant Scott's book on the Firefox web browser, Don't Click on the Blue E!: Switching to Firefox, has garnered wide praise In addition, he is a monthly columnist for SecurityFocus and for Linux Magazine, and he blogs professionally on the Open Source Weblog He is currently an adjunct professor at Washington University in St Louis, where he teaches a variety of courses about technology, social software, and the Internet Finally, as a co-owner of WebSanity, Scott helps nonprofits and businesses use the company's Content Management System to take full advantage of the Web's communication, sales, and service opportunities He's been using Linux for a decade, and swears by it Credits Executive Editor Carol Long Acquisitions Editor Debra Williams Cauley Development Editor Maryann Steinhart Technical Editors Robert Citek Jason Luster Production Editor William A Barton Project Coordinator Michael Kruzil Copy Editor Luann Rouff Editorial Manager Mary Beth Wakefield Production Manager Tim Tate Vice President and Executive Group Publisher Richard Swadley Vice President and Publisher Joseph B Wikert Graphics and Production Specialists Lauren Goddard Stephanie D Jumper Barbara Moore Melanee Prendergast Quality Control Technicians John Greenough Leeann Harney Jessica Kramer Media Project Supervisor Laura Moss Media Development Specialist Angela Denny Kit Malone Travis Silvers Proofreading and Indexing TECHBOOKS Production Services Cover Design Anthony Bunyan Acknowledgments Hacking Knoppix has truly been a team effort, and there are a lot of folks to recognize In particular, I want to acknowledge the hard work, energy, and flat-out brilliance displayed by Klaus Knopper and all of the other hackers, programmers, developers, and users who have contributed in a thousand different ways to the growth of one of the coolest and most innovative technologies available today: Knoppix This book couldn't have been written without the help and support of many important individuals My agent, Laura Lewin, has been helpful in too many ways for me to recount My main editor at Wiley, Debra Williams Cauley, shepherded this work effectively, efficiently, and with great care and humanity Thanks, Debra! My technical editor and guru, and all-around great human being, Robert Citek, continues to teach me a tremendous amount about Linux and open source Jerry Bryan has looked over everything I've written in the last several years and helps make things shine My wife, Denise, supported me completely during her own tough times and has always given me an example to follow Finally, my cute little Shih Tzu, Libby, was a boon companion at all times and deserves almost constant belly rubs Paul Love, Josh Myer, and Robert Citrek contributed chapters to this book: Paul Love—CISSP, CISA, CISM, Security+—has been in the IT field for 15 years and is currently a security manager at a financial institution Paul holds a master of science degree in network security and a bachelor's degree in information systems He was the lead author of Beginning Unix, has co-authored two Linux security books, contributed to multiple Linux/ Unix books, and has been the technical editor for more than 10 best-selling Linux and Unix books Josh Myer is Linux Administrator for ibiblio at the University of North Carolina-Chapel Hill He's proficient in multiple programming languages and works in Linux, Windows, Mac OS X, Solaris, SCO Unix, and SCO Xenix operating systems He has designed in GCC and GNU Make, Microsoft Visual Studio, and Apple development environments, and his experience includes systems administration, clustering, and networking Robert Citek has a master of science degree microbiology from the University of California at Riverside, and currently works for Orion Genomics as a bioinformaticist exploring various plant and animal genomes using a number of open-source software tools, including Knoppix He has worked with Unix since the mid-eighties, and with GNU/Linux since the mid-nineties, both as a hobbyist and as a computational biologist You can find him on the Knoppix forums at http://knoppix.net Alex de Landgraaf, John A Goebel, and Benjamin Mako Hill also contributed to the writing of this book Chapter 8: Checking Out Security Distros Figure 8-1: Now that is good menuing! Figure 8-2: Gkismet has found quite a number of wireless networks near me Figure 8-3: You can find out a lot about a Wireless Access Point using Kismet Figure 8-4: GRAB gives you a simple way to image a hard drive Figure 8-5: What kinds of files do you want Retriever to find today? Figure 8-6: Retriever displays its finds Figure 8-7: Helix enables you to perform several tasks on a running Windows machine Figure 8-8: Eight invaluable tools for recovering computers running Windows Figure 8-9: Helix generates a very useful security report about your Windows machine Figure 8-10: Four more invaluable tools Figure 8-11: Directories and files that have been accessed on a Windows machine Figure 8-12: Think your email username and password are secret? Guess again Figure 8-13: What's the password? Figure 8-14: Not a very secure password Figure 8-15: Update ClamAV's anti-virus database Figure 8-16: Tell ClamAV where you want to scan for viruses Figure 8-17: Mtr hard at work, pinging constantly along the route to my host Chapter 9: Changing Knoppix to Fit Your Needs Figure 9-1: KPackage, showing the details of KPDF Figure 9-2: KPDF, ready to open PDF files Figure 9-3: The saveconfig script shows the selection of save options Figure 9-4: Specify where your files should be stored Figure 9-5: The introduction screen Figure 9-6: Specify where your files should be stored Figure 9-7: Warning! Don't click Yes right away! Figure 9-8: Make sure you have enough free space before continuing! Chapter 11: Creating Archix, Knoppix for Kids Figure 11-1: Earth at Night C Mayhew and R Simmon (NASA/GSFC), NOAA/ NGDC, DMSP Digital Archive Figure 11-2: The boot screen for Archix utilizes the famous St Louis Arch Chapter 12: Creating Myppix, Your Personal Knoppix Figure 12-1: The KDE default panel, just begging for improvement Figure 12-2: A much cleaner, more efficient panel Figure 12-3: Which config files do you want to save? Figure 12-4: Pick where you want to save your configuration files Appendix A: Booting Knoppix Figure A-1: Start with the Knoppix boot splash screen Figure A-2: Knoppix in graphics mode Figure A-3: Knoppix stopping at the end of the stage 1 boot process Appendix B: Installing Knoppix to Your Hard Drive Figure B-1: Starting the knoppix-installer Figure B-2: Partition detection Figure B-3: Knoppix Partition Menu window Figure B-4: QTParted Figure B-5: Knoppix installer main menu Figure B-6: Select a system type Figure B-7: Select a partition for the Knoppix installation Figure B-8: Select a filesystem type Figure B-9: Enter personal identification Figure B-10: Use the Knoppix-generated username or create your own Figure B-11: Enter a user password Figure B-12: Enter an administration (root) password Figure B-13: Create a system hostname Figure B-14: Select the boot loader location Figure B-15: Starting the installation from the main menu Figure B-16: Review the installation parameters Figure B-17: Installation progress Figure B-18: Click yes to create a boot disk Figure B-19: Successful installation List of Sidebars Chapter 1: Unraveling the Knoppix Toolkit Maze Converting MP3s to WAVs Chapter 2: Maximizing Knoppix Internet Tools Recommended Extensions Sign Up for IM Accounts Chapter 3: Connecting to Other Machines and Resources Command-Line Controls for FreeNX Server Some Other Handy NFS Commands Chapter 8: Checking Out Security Distros Author's Experience Sniffing Packets with the Snarfs Chapter 9: Changing Knoppix to Fit Your Needs UnionFS Opens New Doors Chapter 11: Creating Archix, Knoppix for Kids Searching for Cool Wallpaper ... decade, and swears by it Hacking Knoppix Scott Granneman WILEY Published by Wiley Publishing, Inc 10475 Crosspoint Boulevard Indianapolis, IN 46256 http://www .wiley. com © 2006 Wiley Publishing, Inc... I'm going to be doing intensive security work, I change the name of knoppix. img to knoppix. img.normal, and then alter the name of knoppix. img.security to knoppix. img When I start Knoppix, I simply use knoppix home=scan as usual, but this time the image... Library of Congress Cataloging-in-Publication Data Granneman, Scott Hacking Knoppix / Scott Granneman p cm Includes index ISBN 13: 978-0-7645-9784-8 (paper/cd-rom) ISBN 10: 0-7645-9784-1 (paper/cd-rom) Linux Knoppix (Computer file) 3