Hacking—The Art of Exploitation
Jon Erickson
NO STARCH PRESS
San Francisco
HACKING.
Copyright 2003 Jon Erickson.
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher.
1 2 3 4 5 6 7 8 9 10 – 06 05 04 03
No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.
Publisher: William Pollock
Managing Editor: Karol Jurado
Cover and Interior Design: Octopod Studios
Technical Reviewer: Aaron I. Adams
Copyeditor: Kenyon Brown
Compositor: Wedobooks
Proofreaders: Stephanie Provines, Seth Benson
Indexer: Kevin Broccoli
For information on translations or book distributors, please contact No Starch Press, Inc. directly:
No Starch Press, Inc.
555 De Haro Street, Suite 250, San Francisco, CA 94107
phone: 415-863-9900; fax: 415-863-9950; info@nostarch.com; http://www.nostarch.com
The information in this book is distributed on an "As Is" basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.
Library of Congress Cataloguing-in-Publication Data
Erickson, Jon (Jon Mark), 1977-
Hacking : the art of exploitation / Jon Erickson.
p. cm.
1-59327-007-0
1. Computer security. 2. Computer hackers. 3. Computer networks–Security measures. I. Title.
QA76.9.A25E72 2003
005.8–dc22
2003017498
ACKNOWLEDGMENTS
I would like to thank Bill Pollock, Karol Jurado, Andy Carroll, Leigh Sacks, and everyone else at No Starch Press for making this book a possibility and allowing me so much creative control of the process. Also, I would like to thank my friends Seth Benson and Aaron Adams for proofreading and editing, Jack Matheson for helping me with assembly, Dr. Seidel for keeping me interested in the science of computer science, my parents for buying that first Commodore Vic-20, and the hacker community for their innovation and creativity that produced the techniques explained in this book.