Linux Journal | November 2010 | Issue
Total Page:16
File Type:pdf, Size:1020Kb
OpenWrt | Pico Projector | D-Bus | Rockbox | Samurai | Boxee ™ Security Testing with Samurai Hacks from DEF CON Control Your Linux System with Since 1994: The Original Magazine of the Linux Community a Smartphone NOVEMBER 2010 | ISSUE 199 | www.linuxjournal.com LPoweredARG byE Open H SourceADRON COLLIDER Automate and Personalize Your Desktop with D-Bus Use Linux to Find Your Phone PLUS: Intro to Rockbox Hacking a Wi-Fi-Enabled Pico Projector JOIN THE MOBILE REVOLUTION WITH THE WO More and more people are browsing the web on their phones. At 1&1, you get the software you need to create websites that are optimized for mobile viewing. Layouts, designs and wizards enhanced for the latest smartphones, like iPhone and BlackBerry® Compatible across multiple platforms Valued at up to $479! * F REE SOFTWARE INCLUDED WITH 1&1 HOSTING PLANS. CHOOSE FROM: NetObjects Fusion® 1&1 Edition is a website design Adobe® Dreamweaver® CS4 is a sophisticated application which creates sites that are optimized for website design application for creating professional web- mobile viewing. The 1&1 Edition was designed specifi cally sites. Dreamweaver® includes the Adobe® Device Central to complement 1&1 web hosting packages and includes module, enabling web designers to test their websites on additional mobile templates as an extra bonus. mobile devices by emulating the latest smartphones. pC2_1AND1.indd 1 9/16/10 3:53:19 PM RLD‘S LARGEST WEB HOST. AT 1&1 INTERNET: HURRY – OFFERS END 10/31/2010! 1&1® HOME PACKAGE 1&1® BUSINESS PACKAGE 1&1® DEVELOPER PACKAGE N2 Domain Names Included N3 Domain Names Included N5 Domain Names Included (.com, .net, .org, .info or .biz.) (.com, .net, .org, .info or .biz.) (.com, .net, .org, .info or .biz.) N150 GB Web Space N250 GB Web Space N300 GB Web Space NUNLIMITED Traffi c NUNLIMITED Traffi c NUNLIMITED Traffi c N10 FTP Accounts N25 FTP Accounts N50 FTP Accounts N25 MySQL Databases N50 MySQL Databases N100 MySQL Databases NExtensive Programming Lan- NExtensive Programming Lan- NExtensive Programming Lan- guage Support: Perl, Python, guage Support: Perl, Python, guage Support: Perl, Python, PHP4, PHP5, PHP6 (beta) with PHP4, PHP5, PHP6 (beta) with PHP4, PHP5, PHP6 (beta) with Zend® Framework Zend® Framework Zend® Framework NNetObjects Fusion® 1&1 Edition NNetObjects Fusion® 1&1 Edition NNetObjects Fusion® 1&1 Edition or Adobe® Dreamweaver CS4 or Adobe® Dreamweaver CS4 NNEW: 1&1 Power Plus Performance Guarantee $ .99 $ .99 $ .99 6per month 9per month 19per month $ .49* $ .99* $ .99* per month per month per month 3 for the first 6 months 4 for the first 6 months 9 for the first 6 months ALSO ON SALE: .us domains $0.99/fi rst year* ® .com domains $7.99/fi rst year* Visit our website for a full list of special offers. www.1and1.com * S pecial offers valid through October 31, 2010. 12 month minimum contract term required for software offer. Setup fee and other terms and conditions may apply. Software available for download in the 1&1 Control Panel only. Domain offer valid fi rst year only. After fi rst year, standard pricing applies. Visit www.1and1.com for full promotional offer details. Program and pricing specifi cations and availability subject to change without notice. 1&1 and the 1&1 logo are trademarks of 1&1 Internet AG, all other trademarks are the property of their respective owners. © 2010 1&1 Internet, Inc. All rights reserved. p01_1AND1.indd 1 9/16/10 3:54:29 PM NOVEMBER 2010 CONTENTS Issue 199 FEATURES HACKING ON THE COVER • Security Testing with Samurai, 44 50 56 62 p. 73 The Large Finding Your Control Your Controlling Your • Hacks from DEF CON, p. 30 • Control Your Linux System with Hadron Collider Phone, the Linux Desktop Linux System with a Smartphone, p. 62 Open-source software is Linux Way with D-Bus a Smartphone • Large Hadron Collider—Powered by Open Source, p. 44 helping power the most Set up your N900 to Get on da bus! It’s not just for making • Automate and Personalize Your complex scientific human phone home if it gets Koen Vervloesem phone calls! Desktop with D-Bus, p. 56 endeavor ever attempted. lost. Jamie Popkin • Use Linux to Find Your Phone, Carl Lundstedt Daniel Bartholomew p. 50 • Hacking a Wi-Fi-Enabled Pico Projector, p. 40 • Intro to Rockbox, p. 70 2 | november 2010 www.linuxjournal.com STORAGE WITHOUT BOUNDARIES Imagine what you can achieve with Aberdeen. Aberdeen’s AberSAN Z-Series scalable storage platform brings the simplicity of network attached storage (NAS) to the SAN environment, by utilizing the innovative ZFS file system. Featuring the high performance of the Intel Xeon processor 5600 series, the AberSAN Z-Series offers enterprise level benefits at entry level pricing, delivering the best bang for the buck. Who gives you the best bang for the buck? NetApp EMC Aberdeen FAS 2050 NS120 AberSAN Z20 Deduplication ✓ ✓ ✓ Thin Provisioning ✓ ✓ ✓ VMware® Ready Certified ✓ ✓ ✓ Citrix® StorageLink™ Support ✓ ✓ ✓ Optional HA Clustering ✓ ✓ ✓ Optional Virtualized SAN ✓ ✓ ✓ Optional Synchronous Replication ✓ ✓ ✓ Optional Fibre Channel Target ✓ ✓ ✓ Unified Storage: NFS, CiFS, iSCSI ✓ ✓ ✓ Unlimited Snapshots x x ✓ Unlimited Array Size x x ✓ Hybrid Storage Pooling x x ✓ Integrated Search x x ✓ File System WAFL 64-bit UxFS 64-bit ZFS 128-bit RAID Level Support 4 and DP 5 and 6 5, 6 and Z Maximum Storage Capacity 104TB 240TB Over 1,000TB Warranty 3 Years 3 Years 5 Years Published Starting MSRP Not Available Not Available $8,995 Above specific configurations obtained from the respective websites on Sept. 13, 2010. Intel, Intel Logo, Intel Inside, Intel Inside Logo, Pentium, Xeon, and Xeon Inside are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. All trademarks are the property of their respec- 888-297-7409 tive owners. All rights reserved. For terms and conditions, please see www.aberdeeninc.com/abpoly/abterms.htm. lj036 www.aberdeeninc.com/lj036 p03_Aberdeen.indd 1 9/16/10 3:49:29 PM NOVEMBER 2010 CONTENTS Issue 199 COLUMNS 18 Reuven M. Lerner’s At the Forge 2010 Book Roundup 22 Dave Taylor’s Work the Shell Scripting Common File Rename Operations 24 Mick Bauer’s Paranoid Penguin Building a Transparent Firewall with Linux, Part III 30 Kyle Rankin’s Hack and / Some Hacks from DEF CON 36 0 A.D. 80 Doc Searls’ EOF Coding in Pixels REVIEW 40 Chinavasion Pico Projector Kyle Rankin INDEPTH 70 Rockbox Open-source firmware for your MP3 player. Bryan Childs 73 Web Application Security Testing 40 PICO PROJECTOR with Samurai Test your Web application before malicious attackers do it for you. Jes Fraser IN EVERY ISSUE 8 Current_Issue.tar.gz 10 Letters 14 UPFRONT 34 New Products 36 New Projects 65 Advertisers Index 79 Marketplace 70 ROCKBOX 73 SAMURAI USPS LINUX JOURNAL (ISSN 1075-3583) (USPS 12854) is published monthly by Belltown Media, Inc., 2121 Sage Road, Ste. 310, Houston, TX 77056 USA. Periodicals postage paid at Houston, Texas and at additional mailing offices. Cover price is $5.99 US. Sub scrip tion rate is $29.50/year in the United States, $39.50 in Canada and Mexico, $69.50 elsewhere. POSTMASTER: Please send address changes to Linux Journal, PO Box 16476, North Hollywood, CA 91615. Subscriptions start with the next issue. Canada Post: Publications Mail Agreement #41549519. Canada Returns to be sent to Pitney Bowes, P.O. Box 25542, London, ON N6C 6B2 4 | november 2010 www.linuxjournal.com 7KHQH[WJHQHUDWLRQRILQWHOOLJHQWVHUYHUSURFHVVRUV 7KH,QWHO;HRQSURFHVVRUVHULHVDXWRPDWLFDOO\ UHJXODWHVSRZHUFRQVXPSWLRQWRFRPELQHLQGXVWU\OHDGLQJ HQHUJ\HIÀFLHQF\ZLWKLQWHOOLJHQWSHUIRUPDQFHWKDWDGDSWV WR\RXUZRUNORDG&KHFNRXWWKHQHZLQWHOOLJHQWIHDWXUHV RIWKH;HRQDWLQWHOFRPLWFHQWHU 6HUYHUVIURPL;V\VWHPVIHDWXUHWKH,QWHO;HRQSURFHVVRUVHULHV Triton Twin-Blade • Intel® Xeon® processor 5600 series The Triton Twin-Blade Server • 20 server compute nodes in 7U of rack space supports up to 120 dual processor • N+1 redundant, high-ef!ciency (94%) 2500W power supplies servers with 240 Intel Xeon 5600 • Remote access through SOL, KVM, KVM over IP technologies Enterprise Servers series processors per 42U rack, for Open Source achieving an unmatched .35U per www.iXsystems.com dual processor node. Gemini2 800-820-BSDi Cleverly disguised as any other • Intel® Xeon® processor 5600 series Intel is not responsible for and 2 • 4 nodes in a 2U form factor has not veri!ed any statements or 2U server, the Gemini houses 4 computer system product-speci!c highly ef!cient, extremely powerful • Up to 192GB DDR3 SDRAM per node claims contained herein. RAID 5-capable servers. • 3 x 3.5" SAS/SATA drives per node ,QWHO&RUSRUDWLRQ$OOULJKWVUHVHUYHG,QWHOWKH,QWHOORJR,QWHO6SRQVRUVRI7RPRUURZ,QWHO;HRQDQG;HRQ,QVLGHDUHWUDGHPDUNVRI,QWHO&RUSRUDWLRQLQWKH86DQGRWKHUFRXQWULHV 2WKHUQDPHVDQGEUDQGVPD\EHFODLPHGDVWKHSURSHUW\RIRWKHUV Executive Editor Jill Franklin [email protected] Senior Editor Doc Searls [email protected] Associate Editor Shawn Powers [email protected] Associate Editor Mitch Frazier [email protected] Art Director Garrick Antikajian [email protected] Products Editor James Gray [email protected] Editor Emeritus Don Marti [email protected] Technical Editor Michael Baxter [email protected] Senior Columnist Reuven Lerner [email protected] Security Editor Mick Bauer [email protected] Hack Editor Kyle Rankin [email protected] Virtual Editor Bill Childers [email protected] Contributing Editors Ibrahim Haddad • Robert Love • Zack Brown • Dave Phillips • Marco Fioretti • Ludovic Marcotte Paul Barry • Paul McKenney • Dave Taylor • Dirk Elmendorf • Justin Ryan Proofreader Geri Gale Publisher Carlie Fairchild [email protected] General Manager Rebecca Cassity [email protected] Senior Sales Manager Joseph Krack [email protected] Associate Publisher Mark Irgang [email protected] Webmistress Katherine Druckman [email protected] Accountant Candy Beauchamp [email protected] Linux Journal is published by, and is a registered trade name of, Belltown Media, Inc. PO Box 980985, Houston, TX 77098 USA Editorial Advisory Panel Brad Abram Baillio • Nick Baronian • Hari Boukis • Steve Case Kalyana Krishna Chadalavada • Brian Conner • Caleb S.