1 00:00:10,580 --> 00:00:15,940 It was okay being able to set a private password, which of course can be bypassed. 2 00:00:15,960 --> 00:00:20,680 It was okay not to offer encryption in the memo pad, not to put a password on any of your memos. 3 00:00:21,300 --> 00:00:24,940 They really haven't changed things, so a lot of third-party applications have come about 4 00:00:24,940 --> 00:00:28,620 that allow you to encrypt and set your Palm Pilot so it's more secure. 5 00:00:30,260 --> 00:00:36,460 For the last three years, different groups have not changed the security of the Palm Pilots, 6 00:00:36,500 --> 00:00:43,360 but have kind of brought the software to a different audience of people, maybe including you guys. 7 00:00:43,640 --> 00:00:47,500 And the first thing I've asked when I've given this talk before, or talked to people before, 8 00:00:47,620 --> 00:00:51,600 is if you guys have your beam, your infrared beam, set to on. 9 00:00:51,760 --> 00:00:54,300 Does everyone have it set to on by default, or is it off? 10 00:00:56,140 --> 00:00:58,280 Okay, let's check real quickly right now. 11 00:00:58,420 --> 00:00:59,740 So you go in your Palm Pilot. 12 00:01:00,000 --> 00:01:04,860 You go into Preferences, and inside Preferences, in the General Preferences, 13 00:01:05,500 --> 00:01:09,580 you'll find at the bottom it says your beam received is either on or off. 14 00:01:11,040 --> 00:01:15,300 I always leave mine set to off, which kind of sounds antisocial to a lot of people 15 00:01:15,300 --> 00:01:18,600 because it means I don't get all the little business cards, you know, and the little programs. 16 00:01:19,180 --> 00:01:23,020 I've got six different memo pad sketching programs, things like that. 17 00:01:23,600 --> 00:01:26,800 I recommend turning it to off, and that's kind of the first step 18 00:01:26,800 --> 00:01:29,340 because that's an automatic way. 19 00:01:30,000 --> 00:01:31,460 For people to be able to send you applications. 20 00:01:32,880 --> 00:01:36,620 Most of you are saying, oh, well, when they send me the application right now, 21 00:01:36,800 --> 00:01:39,940 I get to choose whether or not I want to use it. 22 00:01:41,320 --> 00:01:45,500 Well, if anyone sat through any of the other talks, people know about buffer overflows 23 00:01:45,500 --> 00:01:49,840 and how you can send commands to the TCPIP stack, and then maybe it fails, 24 00:01:49,880 --> 00:01:51,260 but it actually executes the command. 25 00:01:52,060 --> 00:01:53,140 We're going to go into it later. 26 00:01:53,240 --> 00:01:55,300 I'm going to show you guys the schematic and how it works, 27 00:01:55,420 --> 00:01:58,000 but the infrared channel is just a TCPIP stack. 28 00:01:58,280 --> 00:01:59,980 It's just as expensive. 29 00:02:00,000 --> 00:02:04,900 It's as acceptable to buffer overflows, just as acceptable to sending information, 30 00:02:05,300 --> 00:02:10,280 and it's only probably a week or two weeks before someone realizes that you can reset one bit 31 00:02:10,280 --> 00:02:13,820 and get people to automatically accept an application via infrared. 32 00:02:14,700 --> 00:02:18,800 So what I'm going to talk about today is an educational talk. 33 00:02:18,980 --> 00:02:20,860 That's always the disclaimer at the beginning of it. 34 00:02:22,000 --> 00:02:25,900 I want you guys to know that as we step through it towards the end of the class, 35 00:02:26,020 --> 00:02:29,980 we're going to be looking at some code from a commercial application. 36 00:02:30,000 --> 00:02:34,460 And I only show you this so you can kind of understand a little bit of the background 37 00:02:34,460 --> 00:02:38,020 about the differences between the way a PalmPilot executes a program and works, 38 00:02:38,840 --> 00:02:42,400 and the way a Windows program, for example, works, or a Linux program. 39 00:02:43,600 --> 00:02:47,040 With 6 million users, like I mentioned before, most people say, 40 00:02:47,120 --> 00:02:48,100 why would you exploit? 41 00:02:48,360 --> 00:02:50,560 Why would you even try to protect your PalmPilot? 42 00:02:51,700 --> 00:02:54,760 I know you guys out there have your phone numbers in it, 43 00:02:54,800 --> 00:02:57,340 and we're thinking that if people get a list of your phone numbers, 44 00:02:57,400 --> 00:02:58,800 that's not going to be that big of a deal. 45 00:03:00,000 --> 00:03:03,100 Well, maybe that won't be that big of a deal that they can know who your friends are, 46 00:03:03,160 --> 00:03:05,900 know whom the people are that you associate with. 47 00:03:07,120 --> 00:03:10,760 But what about those passwords that you might have stored in that memo pad file 48 00:03:10,760 --> 00:03:12,340 that's marked private, for example? 49 00:03:13,840 --> 00:03:17,160 Anyone can sit a PalmPilot down if they have a hot sink cradle, 50 00:03:17,260 --> 00:03:19,520 and you can go get one for $19 from good guys, 51 00:03:20,040 --> 00:03:21,800 put it in their computer, in a hot sink, 52 00:03:21,920 --> 00:03:24,060 then your information is on their computer. 53 00:03:24,340 --> 00:03:24,900 That's it. 54 00:03:25,220 --> 00:03:26,320 There's no password. 55 00:03:26,800 --> 00:03:28,100 There's nothing you can do. 56 00:03:28,420 --> 00:03:29,940 That information is completely... 57 00:03:30,000 --> 00:03:31,780 completely public inside of your application, 58 00:03:31,980 --> 00:03:34,220 and where the PalmPilot stores its databases. 59 00:03:36,280 --> 00:03:38,720 There are different input-output options for the Palm. 60 00:03:39,560 --> 00:03:42,020 With the 3x and above, you have the infrared port. 61 00:03:42,160 --> 00:03:42,880 We're going to go over that. 62 00:03:43,040 --> 00:03:44,240 We're going to go over the hot sink port, 63 00:03:44,400 --> 00:03:46,900 which is really just a serial port, a DB9 port. 64 00:03:48,380 --> 00:03:51,200 And also, we're going to go over some techniques that we can use 65 00:03:51,800 --> 00:03:53,720 to actually go and look inside 66 00:03:53,720 --> 00:03:56,300 and look how your PalmPilot protects your information. 67 00:03:58,140 --> 00:03:59,680 This is PalmDataSecurity.net. 68 00:03:59,740 --> 00:03:59,980 Windows.com. 69 00:04:00,000 --> 00:04:02,740 Windows 2000, also, if anyone's in here for that adventure. 70 00:04:04,920 --> 00:04:07,280 Why exploit and protect PalmPilots? 71 00:04:08,680 --> 00:04:11,780 Exploit PalmPilots because Palm users still have a false sense of security 72 00:04:11,780 --> 00:04:13,140 and because of the device simplicity. 73 00:04:13,840 --> 00:04:14,700 For the first... 74 00:04:15,300 --> 00:04:18,440 According to Palm, for the first 600,000 users, 75 00:04:18,760 --> 00:04:21,020 those are the people that were adopters of the Newton. 76 00:04:21,200 --> 00:04:23,360 People who actually use old... 77 00:04:23,960 --> 00:04:27,100 old devices that offered handwriting recognition, 78 00:04:27,400 --> 00:04:29,980 let you store your information, let you use a keyboard with it, 79 00:04:30,000 --> 00:04:30,600 these things. 80 00:04:30,740 --> 00:04:34,440 So, we're the experts, maybe, among the PDA category. 81 00:04:35,880 --> 00:04:38,900 Now, with Microsoft moving into it with Windows CE, of course, 82 00:04:38,920 --> 00:04:40,980 there's a lot of different competitors for it, 83 00:04:41,020 --> 00:04:45,240 but the PalmPilot still outsells the CE machine by... 84 00:04:45,240 --> 00:04:47,760 I think the last factor is six to one. 85 00:04:48,500 --> 00:04:50,680 So, this is the predominant platform. 86 00:04:51,320 --> 00:04:54,120 And because of that, you have people using it like... 87 00:04:54,120 --> 00:04:57,100 the person I saw at Best Buy the other day, 88 00:04:57,180 --> 00:04:58,180 who walked in and said, 89 00:04:58,260 --> 00:04:59,440 Oh, can I get a Palm? 90 00:04:59,440 --> 00:05:00,560 And the guy's like, 91 00:05:00,660 --> 00:05:03,220 Yeah, you want to go ahead and get the 5XE? 92 00:05:03,300 --> 00:05:04,780 And he's thinking commission on the side. 93 00:05:05,140 --> 00:05:05,920 You know, he's thinking, 94 00:05:06,000 --> 00:05:07,560 Go ahead and get the 5XE. 95 00:05:07,680 --> 00:05:08,320 And they go, 96 00:05:08,420 --> 00:05:09,100 Oh, that's great. 97 00:05:09,200 --> 00:05:10,980 I'm going to store in there all my birthdays. 98 00:05:11,620 --> 00:05:13,360 I'm going to store in there all my important numbers. 99 00:05:14,120 --> 00:05:14,960 And I'm thinking, 100 00:05:16,140 --> 00:05:18,340 Wow, you're taking this around with you everywhere. 101 00:05:18,540 --> 00:05:20,620 So, you've got all your important information with you 102 00:05:20,620 --> 00:05:21,660 right there in your pocket. 103 00:05:21,840 --> 00:05:23,560 And the one time that you leave it, 104 00:05:23,600 --> 00:05:24,680 sitting there in the restaurant, 105 00:05:24,880 --> 00:05:27,720 and that person goes and they know your maiden name 106 00:05:27,720 --> 00:05:29,220 because you have your mom's name in there. 107 00:05:29,440 --> 00:05:31,520 So, they know all your information. 108 00:05:32,040 --> 00:05:33,840 Also going to exploit it because the developers 109 00:05:33,840 --> 00:05:35,280 don't put time into their protection. 110 00:05:35,980 --> 00:05:37,560 This is a really sensitive area. 111 00:05:38,820 --> 00:05:42,960 The Palm Pilot community has, at last count, 112 00:05:43,020 --> 00:05:45,540 over 70,000 developers of applications. 113 00:05:46,140 --> 00:05:47,720 That's people all over the world. 114 00:05:47,780 --> 00:05:49,780 It's a really simple platform to write for. 115 00:05:49,980 --> 00:05:53,320 It's a really transparent platform to write for. 116 00:05:53,400 --> 00:05:57,460 It's kind of like a whole language 117 00:05:57,460 --> 00:05:59,080 developed around forms. 118 00:05:59,700 --> 00:06:02,480 It's kind of like HTML forms in its most basic sense. 119 00:06:02,780 --> 00:06:04,900 And because of that, everyone develops with it. 120 00:06:04,960 --> 00:06:06,160 You can get free development kits. 121 00:06:06,320 --> 00:06:10,780 You can get Darren Messina's free alternative development kit. 122 00:06:10,860 --> 00:06:12,060 You can get a lot of information 123 00:06:12,060 --> 00:06:14,940 on 3Com's website about the software. 124 00:06:16,220 --> 00:06:18,900 One particular example that I always cite 125 00:06:18,900 --> 00:06:20,520 is there's this company named Standalone. 126 00:06:20,600 --> 00:06:23,260 I don't know if anyone has super names on their computer. 127 00:06:23,460 --> 00:06:25,160 You know, they have a workout track or a casino. 128 00:06:25,720 --> 00:06:29,260 This company, Standalone, makes good applications. 129 00:06:29,440 --> 00:06:31,140 And they made three of them. 130 00:06:31,280 --> 00:06:33,180 And then they decided that they were going to go buy 131 00:06:33,180 --> 00:06:34,720 other people's applications 132 00:06:34,720 --> 00:06:37,380 and bring them in under the Standalone banner. 133 00:06:38,500 --> 00:06:40,220 Well, people really like super names 134 00:06:40,220 --> 00:06:41,420 because it takes your address book 135 00:06:41,420 --> 00:06:42,980 and it organizes it into tabs. 136 00:06:43,260 --> 00:06:44,960 And you can set up different groups. 137 00:06:45,020 --> 00:06:46,140 And you can set up different things. 138 00:06:46,580 --> 00:06:48,800 Well, the program costs $20. 139 00:06:49,660 --> 00:06:52,500 And as we know, just like Linux and everything else, 140 00:06:52,520 --> 00:06:53,300 people want free. 141 00:06:53,640 --> 00:06:55,140 People want free software. 142 00:06:55,420 --> 00:06:58,840 And because 75% of the Palm Pilot software is free, 143 00:06:58,840 --> 00:07:01,340 and only 25% of it is commercial applications, 144 00:07:02,020 --> 00:07:04,100 this eventually found its way to someone 145 00:07:04,100 --> 00:07:05,580 who wanted to look inside of it 146 00:07:05,580 --> 00:07:07,220 and make super names free. 147 00:07:08,180 --> 00:07:09,940 Well, Standalone became really upset 148 00:07:09,940 --> 00:07:11,360 at the whole developer's community. 149 00:07:11,480 --> 00:07:13,480 And they threatened to pull all of their applications 150 00:07:13,480 --> 00:07:14,740 at this issue. 151 00:07:15,060 --> 00:07:17,340 What they didn't tell you is their protection 152 00:07:17,340 --> 00:07:20,300 inside of the application was as simple as 153 00:07:20,840 --> 00:07:22,060 check register key. 154 00:07:22,780 --> 00:07:25,020 It says that in the middle of their code, 155 00:07:25,240 --> 00:07:26,540 check register key. 156 00:07:26,740 --> 00:07:28,140 They made no reasonable 157 00:07:28,840 --> 00:07:30,420 effort to protect their application. 158 00:07:30,840 --> 00:07:33,840 They took it for granted that everyone was a simple user 159 00:07:33,840 --> 00:07:37,320 or that everyone didn't want a level of protection. 160 00:07:37,580 --> 00:07:39,380 Well, unfortunately, we store all of our names 161 00:07:39,380 --> 00:07:40,260 inside super names. 162 00:07:40,460 --> 00:07:42,440 So they also have a section that's marked 163 00:07:42,440 --> 00:07:43,760 check password. 164 00:07:44,020 --> 00:07:46,580 And you can patch one byte of that password. 165 00:07:46,880 --> 00:07:48,020 And you hot sync. 166 00:07:48,200 --> 00:07:49,760 And you replace the version of super names 167 00:07:49,760 --> 00:07:50,680 that's in your computer. 168 00:07:50,840 --> 00:07:53,040 And you can view every single private record 169 00:07:53,040 --> 00:07:53,600 in the program. 170 00:07:54,260 --> 00:07:57,060 They've made no reasonable effort to try to protect it. 171 00:07:57,060 --> 00:08:00,540 The last part is we have to protect our own palm pilots. 172 00:08:00,660 --> 00:08:02,500 It's not going to seem like a big deal yet, maybe. 173 00:08:02,740 --> 00:08:04,540 Maybe everyone's gotten that application 174 00:08:04,540 --> 00:08:07,380 that turns all your palm pilot character set 175 00:08:07,380 --> 00:08:08,520 into lead characters. 176 00:08:09,160 --> 00:08:11,940 Fills it with the E's and the 3's and the 4's. 177 00:08:12,220 --> 00:08:14,080 That's probably the first example 178 00:08:14,080 --> 00:08:16,520 of someone taking advantage of the simplicity 179 00:08:16,520 --> 00:08:19,000 of the palm platform. 180 00:08:21,120 --> 00:08:23,260 So I think it's important to understand that 181 00:08:23,260 --> 00:08:24,960 in addition to exploiting it, 182 00:08:25,040 --> 00:08:27,020 one of the main goals is to try to get people 183 00:08:27,060 --> 00:08:28,020 to protect their applications. 184 00:08:28,600 --> 00:08:31,820 Has anyone in here played or seen the Game Boy emulator 185 00:08:31,820 --> 00:08:33,180 Liberty for the Palm Pilot? 186 00:08:33,660 --> 00:08:34,100 Okay. 187 00:08:34,500 --> 00:08:36,080 That's an example of an application 188 00:08:36,080 --> 00:08:37,660 that's protected very heavily. 189 00:08:37,920 --> 00:08:39,080 We're going to go into that later 190 00:08:39,080 --> 00:08:41,340 with respect to the author. 191 00:08:44,800 --> 00:08:46,060 We're going to go into that later, 192 00:08:46,140 --> 00:08:48,080 but I'm also going to talk about 193 00:08:48,080 --> 00:08:49,580 how there needs to be a balance between 194 00:08:49,580 --> 00:08:51,440 the protection that you use in a palm pilot 195 00:08:51,440 --> 00:08:53,980 and the simplicity we expect from the applications 196 00:08:53,980 --> 00:08:54,720 that we use. 197 00:08:59,640 --> 00:09:01,700 Your Palm Pilot serial port here 198 00:09:01,700 --> 00:09:03,880 is a lot like your computer's serial port. 199 00:09:04,680 --> 00:09:06,020 It's 3.3 volts. 200 00:09:06,240 --> 00:09:07,140 It's low power. 201 00:09:07,220 --> 00:09:07,840 It's DB9. 202 00:09:08,400 --> 00:09:10,140 Standard RS-232. 203 00:09:11,880 --> 00:09:13,960 This presentation will be available online, 204 00:09:14,120 --> 00:09:15,560 by the way, but you can see a link here. 205 00:09:15,660 --> 00:09:17,340 This is a really great technical link 206 00:09:17,940 --> 00:09:19,940 on the layout of the Palm Pilot. 207 00:09:20,040 --> 00:09:21,920 I know it might be hard to see from the back there, 208 00:09:23,380 --> 00:09:25,080 but basically you have one pin 209 00:09:25,080 --> 00:09:26,700 that's responsible for hot-syncing. 210 00:09:26,700 --> 00:09:28,800 Actually, that will turn on the device, too. 211 00:09:29,520 --> 00:09:30,880 When you make external devices, 212 00:09:31,140 --> 00:09:32,260 like I don't know if anyone has 213 00:09:32,260 --> 00:09:34,020 the Palm Pilot foldable keyboard here 214 00:09:34,020 --> 00:09:35,140 or the go-type, 215 00:09:35,760 --> 00:09:36,760 that's what they do. 216 00:09:37,960 --> 00:09:40,000 They send a signal to pin 4. 217 00:09:40,160 --> 00:09:41,680 They turn on your Palm Pilot, 218 00:09:41,800 --> 00:09:42,400 and it's ready to go. 219 00:09:42,980 --> 00:09:44,340 Once you're in the hot-sync, 220 00:09:44,480 --> 00:09:45,420 once you have it on, 221 00:09:45,520 --> 00:09:46,720 and once you have it in a cradle 222 00:09:46,720 --> 00:09:49,800 or any kind of DB9 RS-232 device, 223 00:09:50,020 --> 00:09:52,320 it can completely control your Palm Pilot. 224 00:09:52,520 --> 00:09:53,700 It can reset it, 225 00:09:54,500 --> 00:09:55,760 which it can use by sending 226 00:09:55,760 --> 00:09:57,800 an on-off to pin 7, 227 00:09:58,600 --> 00:10:01,560 and they can also transfer information back, 228 00:10:01,780 --> 00:10:03,780 and they have three different methods to do it. 229 00:10:03,900 --> 00:10:06,920 They can do it with standard Palm Pilot hot-syncing. 230 00:10:07,080 --> 00:10:08,920 You can do it with a direct data stream 231 00:10:08,920 --> 00:10:11,080 to the Palm Pilot and to the computer, 232 00:10:11,260 --> 00:10:13,160 or you can do it with a custom conduit, 233 00:10:13,180 --> 00:10:14,280 and we'll go a little bit into that. 234 00:10:18,960 --> 00:10:21,720 The second option you have is an IRDA port. 235 00:10:21,860 --> 00:10:23,960 It uses a modified TCP IP stack. 236 00:10:23,960 --> 00:10:29,340 It reacts to many common TCP IP commands. 237 00:10:29,660 --> 00:10:30,860 You can set up sessions. 238 00:10:31,060 --> 00:10:33,320 You can set up streams of information. 239 00:10:33,620 --> 00:10:35,520 It uses a standard TCP IP header, 240 00:10:36,460 --> 00:10:39,280 and it lets you communicate very effectively. 241 00:10:39,960 --> 00:10:42,580 Of course, your beam bit must be set to on, 242 00:10:42,720 --> 00:10:44,620 which is a lock on your Palm Pilot. 243 00:10:46,580 --> 00:10:48,480 What 3Com didn't plan for, 244 00:10:48,500 --> 00:10:50,040 and this is another example of how, 245 00:10:50,120 --> 00:10:51,280 as the platform grew, 246 00:10:51,580 --> 00:10:53,040 they didn't enhance the security 247 00:10:53,040 --> 00:10:53,880 of the Palm Pilot, 248 00:10:54,000 --> 00:10:57,240 is that, again, it's one single byte 249 00:10:57,240 --> 00:11:01,140 inside of your application that's on or off 250 00:11:01,140 --> 00:11:02,060 that allows you to beam. 251 00:11:02,240 --> 00:11:04,040 So they thought that they could lock people 252 00:11:04,040 --> 00:11:05,520 out of beaming copyrighted information. 253 00:11:05,900 --> 00:11:07,840 It definitely gives a false sense of security 254 00:11:07,840 --> 00:11:08,700 to the developers. 255 00:11:09,620 --> 00:11:11,520 You can do a standard buffer overflow. 256 00:11:11,920 --> 00:11:13,720 If you guys want to see more details of it 257 00:11:13,720 --> 00:11:14,600 over at this website, 258 00:11:14,860 --> 00:11:17,140 you'll get to see the operating system 259 00:11:17,140 --> 00:11:19,640 interacts here with the upper layer API, 260 00:11:20,380 --> 00:11:21,920 and you get to go through the application, 261 00:11:21,920 --> 00:11:22,960 and it works with the user. 262 00:11:23,060 --> 00:11:24,000 And here's the driver mode. 263 00:11:24,480 --> 00:11:28,500 Palm Pilots use a virtual driver system, 264 00:11:28,860 --> 00:11:30,420 but it's tied to the serial port. 265 00:11:30,660 --> 00:11:32,160 So basically, if you write a driver 266 00:11:32,160 --> 00:11:34,360 for the Palm Pilot to drive the keyboard, 267 00:11:35,160 --> 00:11:36,920 if you drive a modem, 268 00:11:37,500 --> 00:11:38,240 if you have a minstrel, 269 00:11:38,280 --> 00:11:38,880 if you have something else, 270 00:11:39,000 --> 00:11:41,100 it actually interacts just like it's a serial port. 271 00:11:41,240 --> 00:11:42,980 You need to emulate the serial port 272 00:11:42,980 --> 00:11:43,940 inside of the driver. 273 00:11:48,680 --> 00:11:50,460 Some of the techniques that we can use 274 00:11:50,460 --> 00:11:51,740 to protect our Palm Pilot 275 00:11:51,740 --> 00:11:54,280 include some operating system level tricks 276 00:11:54,280 --> 00:11:55,040 that you can use, 277 00:11:55,140 --> 00:11:57,020 some attacks against applications, 278 00:11:58,460 --> 00:12:00,540 and we're going to go over some future ideas 279 00:12:00,540 --> 00:12:01,180 for exploit. 280 00:12:01,400 --> 00:12:03,320 Because I think, probably, 281 00:12:03,560 --> 00:12:04,600 and I'm just going to venture to guess, 282 00:12:04,800 --> 00:12:06,360 that in the next six months, 283 00:12:06,560 --> 00:12:09,680 you're going to see a major Palm Pilot 284 00:12:10,620 --> 00:12:12,040 Trojan horse, most likely, 285 00:12:12,100 --> 00:12:13,300 that's passed to the Palm Pilot 286 00:12:13,300 --> 00:12:14,940 because it's open right now. 287 00:12:15,120 --> 00:12:16,740 Once it hits 10 million users, 288 00:12:17,420 --> 00:12:19,440 and 10 million users who are walking around 289 00:12:19,440 --> 00:12:20,480 at the local restaurants 290 00:12:20,480 --> 00:12:22,060 beaming everyone their business cards, 291 00:12:22,300 --> 00:12:24,000 it's going to seem like a good option 292 00:12:24,000 --> 00:12:26,100 for someone to write this code 293 00:12:26,100 --> 00:12:29,280 and to understand how the Palm Pilot works 294 00:12:29,280 --> 00:12:30,460 is going to help you protect yourself 295 00:12:30,460 --> 00:12:32,140 and others against it. 296 00:12:37,460 --> 00:12:38,920 This is the new Palm logo. 297 00:12:40,600 --> 00:12:42,880 The operating system processes applications 298 00:12:43,420 --> 00:12:44,740 in a very specific manner. 299 00:12:44,960 --> 00:12:47,660 All developers are tied to making their applications 300 00:12:47,660 --> 00:12:49,120 work the exact same way. 301 00:12:49,120 --> 00:12:51,600 There's a main event loop inside of it. 302 00:12:51,720 --> 00:12:54,360 It parses every time you choose from the menu, 303 00:12:54,420 --> 00:12:56,600 every time you choose from a button. 304 00:12:56,760 --> 00:12:58,380 It's all coded as strings, 305 00:12:58,500 --> 00:13:00,480 and it's all hard-coded in the application. 306 00:13:02,200 --> 00:13:03,760 You also have system shortcuts, 307 00:13:03,960 --> 00:13:05,540 which can redirect your beam 308 00:13:05,920 --> 00:13:07,780 and can set up debug modes, 309 00:13:07,960 --> 00:13:10,160 and there's some notorious hacks into it 310 00:13:10,160 --> 00:13:12,060 that let you see and dump the registers live 311 00:13:12,060 --> 00:13:12,880 while you're using it. 312 00:13:13,280 --> 00:13:14,920 There's one key one, actually. 313 00:13:15,880 --> 00:13:17,220 We're going to go over a method 314 00:13:17,220 --> 00:13:18,780 to redirect your infrared 315 00:13:19,120 --> 00:13:21,220 out through your serial port. 316 00:13:21,800 --> 00:13:23,500 Basically, you can learn about 317 00:13:23,500 --> 00:13:25,260 how that application sends itself 318 00:13:25,260 --> 00:13:28,340 over the modified TCP IP stack. 319 00:13:28,660 --> 00:13:30,020 You can dump it to a file, 320 00:13:30,120 --> 00:13:31,540 you can look at the entire session, 321 00:13:31,740 --> 00:13:34,500 and you can see how the infrared port works. 322 00:13:35,480 --> 00:13:36,420 Palm Pilot has limited, 323 00:13:36,860 --> 00:13:38,740 I'm sorry, 3Com, or Palm now, 324 00:13:38,840 --> 00:13:40,940 has limited developers' information 325 00:13:40,940 --> 00:13:42,280 on the infrared port 326 00:13:42,280 --> 00:13:44,000 because they actually used 327 00:13:44,000 --> 00:13:48,640 an implementation from a third-party company. 328 00:13:49,120 --> 00:13:50,500 This third-party company, 329 00:13:52,180 --> 00:13:53,720 they've been around for, I'd say, 330 00:13:54,360 --> 00:13:55,280 eight years, 331 00:13:55,460 --> 00:13:57,460 and this stack technology they use 332 00:13:57,460 --> 00:13:58,800 in the infrared port is about, 333 00:13:58,960 --> 00:14:01,200 probably about four to five years old, 334 00:14:01,280 --> 00:14:03,100 so it predates the 3X pretty significantly. 335 00:14:03,700 --> 00:14:04,840 We're also going to get into, 336 00:14:04,940 --> 00:14:05,880 in this section, 337 00:14:06,040 --> 00:14:06,820 some of the applications 338 00:14:06,820 --> 00:14:08,560 that let you view your databases, 339 00:14:09,320 --> 00:14:11,220 let you view the status of your databases, 340 00:14:11,500 --> 00:14:13,080 and let you look inside the registers 341 00:14:13,080 --> 00:14:14,340 and memory parts of your Palm. 342 00:14:20,220 --> 00:14:22,600 Should I yell real loud to wake people up? 343 00:14:24,180 --> 00:14:26,340 All right, Palm Pilots. 344 00:14:26,960 --> 00:14:29,480 How the operating system processes your application. 345 00:14:30,520 --> 00:14:32,860 All Palm apps save their state. 346 00:14:33,020 --> 00:14:36,880 They actually have what 3Com calls a static state, 347 00:14:37,180 --> 00:14:39,100 which means that at every point 348 00:14:39,100 --> 00:14:40,160 the application progresses, 349 00:14:40,360 --> 00:14:41,860 it has a pointer in memory 350 00:14:41,860 --> 00:14:44,040 to pick up exactly where it is. 351 00:14:44,200 --> 00:14:47,500 It also doesn't run background processes, 352 00:14:47,620 --> 00:14:48,820 so you don't really have, 353 00:14:49,120 --> 00:14:50,860 a multitasking operating system, 354 00:14:51,140 --> 00:14:53,880 which means that your Palm Pilot's very stable, actually, 355 00:14:53,920 --> 00:14:55,260 since it's not trying to do a lot of stuff 356 00:14:55,260 --> 00:14:56,840 with the Dragon Ball processor. 357 00:14:58,740 --> 00:15:00,320 Hack Master is an exception. 358 00:15:00,800 --> 00:15:03,880 Does anyone have Hack Master hacks on their computer, 359 00:15:04,040 --> 00:15:05,260 like, you know, like Beam Edit 360 00:15:05,260 --> 00:15:06,540 and those kinds of things that you have? 361 00:15:07,660 --> 00:15:09,520 The way they get around it is, 362 00:15:09,600 --> 00:15:11,080 we're going to go into it a little bit, 363 00:15:11,200 --> 00:15:13,380 but every Palm Pilot application 364 00:15:13,380 --> 00:15:15,180 works through something called system traps, 365 00:15:15,420 --> 00:15:16,840 and each system trap 366 00:15:17,720 --> 00:15:18,720 can be mapped 367 00:15:19,120 --> 00:15:20,460 just like the Windows API. 368 00:15:20,900 --> 00:15:23,620 You can actually hook into every single one of them. 369 00:15:23,820 --> 00:15:25,260 So that's what the Hack Masters do, 370 00:15:25,360 --> 00:15:27,080 is they hook into each of those system traps. 371 00:15:29,000 --> 00:15:30,780 When we talk about best practices, 372 00:15:30,840 --> 00:15:31,900 we're going to talk about why 373 00:15:31,900 --> 00:15:33,760 leaving your Hack Master extensions 374 00:15:33,760 --> 00:15:36,140 is probably not the best idea, 375 00:15:36,420 --> 00:15:38,260 because 3Com never really intended 376 00:15:38,260 --> 00:15:40,520 for anyone to patch their own system traps. 377 00:15:40,980 --> 00:15:42,360 It's just that need arose, 378 00:15:42,640 --> 00:15:44,400 especially for modifying 379 00:15:44,400 --> 00:15:46,840 the little pen keyboard that you have 380 00:15:46,840 --> 00:15:48,960 and doing spellcheck and those types of things. 381 00:15:49,760 --> 00:15:51,600 It's actually really, really dangerous 382 00:15:51,600 --> 00:15:52,400 on a Palm Pilot, 383 00:15:52,600 --> 00:15:54,540 because the Hack Master runs inside 384 00:15:54,980 --> 00:15:58,420 your RAM and kernel space, actually, 385 00:15:59,260 --> 00:16:00,740 as opposed to other operating systems 386 00:16:00,740 --> 00:16:01,700 that take the API 387 00:16:01,700 --> 00:16:03,680 and run it on top of the kernel. 388 00:16:04,000 --> 00:16:05,040 Not like Windows, 389 00:16:05,200 --> 00:16:06,340 but more like Windows 2000. 390 00:16:07,200 --> 00:16:09,220 Technically, one app is running at a time 391 00:16:09,220 --> 00:16:09,900 in the Palm Pilot. 392 00:16:09,960 --> 00:16:11,460 The memory is initialized at start, 393 00:16:11,660 --> 00:16:13,960 and it stays allocated until your soft reset. 394 00:16:14,300 --> 00:16:16,820 That means that if you've used your Palm Pilot 395 00:16:16,820 --> 00:16:18,640 for 3 weeks now, 396 00:16:19,120 --> 00:16:20,420 switching back and forth from applications, 397 00:16:20,660 --> 00:16:22,260 and you wrote this, and you've deleted this, 398 00:16:22,340 --> 00:16:23,160 and you've set this up, 399 00:16:23,340 --> 00:16:25,120 if you were to 3 weeks later 400 00:16:25,120 --> 00:16:27,200 use an application like Insider 401 00:16:27,200 --> 00:16:29,160 to look inside the memory inside your Palm Pilot, 402 00:16:29,280 --> 00:16:30,640 all your information, your state, 403 00:16:30,800 --> 00:16:31,860 is still in there. 404 00:16:33,200 --> 00:16:35,880 That's something that you don't have 405 00:16:35,880 --> 00:16:36,720 in the Windows environment, 406 00:16:36,920 --> 00:16:39,340 because basically when you shut down and restart, 407 00:16:39,960 --> 00:16:41,500 everything is gone and starts again. 408 00:16:41,880 --> 00:16:43,900 Or if you're forced to shut down and restart. 409 00:16:45,940 --> 00:16:47,880 Palm Pilot supports hidden windows, 410 00:16:49,120 --> 00:16:50,360 and you can change information with on screen. 411 00:16:50,600 --> 00:16:52,400 Not a lot of developers know this, 412 00:16:52,520 --> 00:16:54,000 but there's a few developers out there 413 00:16:54,000 --> 00:16:55,760 who've used this, which is a great way 414 00:16:55,760 --> 00:16:57,220 to protect your information. 415 00:16:57,660 --> 00:17:00,240 Because actually, everything we see 416 00:17:00,240 --> 00:17:01,340 is a form on screen, 417 00:17:01,460 --> 00:17:03,660 and you can create off-screen alerts and forms, 418 00:17:03,780 --> 00:17:06,020 the pop-ups and the static pieces of 419 00:17:07,340 --> 00:17:09,240 static input that you see on your screen. 420 00:17:10,140 --> 00:17:11,400 You can actually use, 421 00:17:11,620 --> 00:17:12,340 for example, 422 00:17:12,520 --> 00:17:13,560 your register, 423 00:17:13,860 --> 00:17:15,500 when you register your Palm Pilot application, 424 00:17:15,740 --> 00:17:17,120 we'll use standalone for an example. 425 00:17:19,120 --> 00:17:19,640 They have their protection. 426 00:17:19,940 --> 00:17:22,220 They got somewhat wise to the fact 427 00:17:22,220 --> 00:17:24,660 that they had documented in their source code 428 00:17:24,660 --> 00:17:26,840 their entire protection scheme. 429 00:17:27,120 --> 00:17:28,720 Now they use a method where they 430 00:17:28,720 --> 00:17:31,380 write some of the information to an off-screen window 431 00:17:31,380 --> 00:17:32,260 that you can't see 432 00:17:32,260 --> 00:17:33,780 when you do your registration. 433 00:17:34,680 --> 00:17:36,680 It actually contains the hash for 434 00:17:36,680 --> 00:17:38,880 if you use a special command, 435 00:17:39,100 --> 00:17:40,760 you can see the hot sync ID 436 00:17:40,760 --> 00:17:42,020 turned into hex, 437 00:17:42,200 --> 00:17:43,600 which is what they use to generate your 438 00:17:44,800 --> 00:17:45,720 unique code. 439 00:17:46,140 --> 00:17:48,740 There are several shortcuts. Everyone knows the shortcuts 440 00:17:49,120 --> 00:17:49,800 because Facebook looks like an L, 441 00:17:49,900 --> 00:17:52,140 a lowercase L, plus dot 442 00:17:52,140 --> 00:17:53,280 and these commands. 443 00:17:53,640 --> 00:17:56,720 These commands were used by 3Com Support 444 00:17:57,240 --> 00:17:58,900 to let you actually debug 445 00:17:58,900 --> 00:18:00,760 programs and things that are going on 446 00:18:00,760 --> 00:18:01,660 inside your Palm Pilot, 447 00:18:02,660 --> 00:18:03,660 or your Palm. 448 00:18:04,520 --> 00:18:07,020 If you use dot i, it starts your beam receive. 449 00:18:07,400 --> 00:18:08,160 That's automatic. 450 00:18:08,460 --> 00:18:10,240 It doesn't matter whether your beam receive is on, 451 00:18:10,300 --> 00:18:11,440 it doesn't matter whether it's off, 452 00:18:11,580 --> 00:18:12,620 it just starts it. 453 00:18:12,840 --> 00:18:15,820 Basically, it sends a flow of any information you want 454 00:18:15,820 --> 00:18:18,780 out through your Palm Pilot. 455 00:18:19,120 --> 00:18:20,360 If you use dot s, 456 00:18:20,600 --> 00:18:21,780 with the shortcut stroke, 457 00:18:21,940 --> 00:18:23,500 you get to redirect your beaming 458 00:18:26,360 --> 00:18:27,820 to a serial port. 459 00:18:28,260 --> 00:18:31,320 This is actually a really interesting 460 00:18:32,020 --> 00:18:33,340 use, I think, of the Palm. 461 00:18:33,460 --> 00:18:34,640 You stick it in your hot sync cradle, 462 00:18:35,300 --> 00:18:37,200 you use dot s to redirect 463 00:18:37,200 --> 00:18:38,640 your beaming to your serial port, 464 00:18:38,840 --> 00:18:41,000 and you can view what applications are beaming 465 00:18:41,000 --> 00:18:42,020 in and out. For example, 466 00:18:42,160 --> 00:18:44,620 does anyone play IR chess here? 467 00:18:44,840 --> 00:18:46,860 Or any of the great IR games 468 00:18:46,860 --> 00:18:48,560 that you use, battleship stuff? 469 00:18:49,120 --> 00:18:50,860 One experiment that I did was 470 00:18:50,860 --> 00:18:52,880 to set my beam to my serial port, 471 00:18:53,060 --> 00:18:55,100 and then read the information that it was sending 472 00:18:55,100 --> 00:18:56,400 back via IR. 473 00:18:56,620 --> 00:18:58,740 And actually, to show you an example of 474 00:18:58,740 --> 00:19:00,820 a little bit of, 475 00:19:00,860 --> 00:19:02,740 I would say laziness, maybe, 476 00:19:02,800 --> 00:19:03,740 with the Palm Pilot developers, 477 00:19:04,080 --> 00:19:06,920 every single time that you send something via IR, 478 00:19:07,120 --> 00:19:09,140 it re-syncs and sends all your 479 00:19:09,140 --> 00:19:10,820 registration information to the other person. 480 00:19:11,100 --> 00:19:13,260 Basically, it shares it encrypted back and forth 481 00:19:13,260 --> 00:19:13,900 between the program. 482 00:19:14,200 --> 00:19:15,440 It's a nice program, though. 483 00:19:15,440 --> 00:19:17,520 Dot t is an IR loopback. 484 00:19:18,900 --> 00:19:19,840 This was used 485 00:19:19,840 --> 00:19:20,780 so that you can actually 486 00:19:21,300 --> 00:19:23,340 record the information that's being shot out of your 487 00:19:23,340 --> 00:19:24,480 IR port 488 00:19:25,080 --> 00:19:26,820 back inside your Palm Pilot. 489 00:19:28,000 --> 00:19:29,560 Dot 1 is a debug mode. 490 00:19:29,680 --> 00:19:31,040 It lets you go in and view the registers 491 00:19:31,040 --> 00:19:33,000 of your Palm Pilot. It's not very robust. 492 00:19:33,360 --> 00:19:35,340 It was mostly intended to find out what the last 493 00:19:35,340 --> 00:19:37,580 error message was by 3Com support. 494 00:19:39,100 --> 00:19:41,820 Dot 2 is open the serial port in debug mode. 495 00:19:41,920 --> 00:19:43,420 And this is really, really interesting 496 00:19:43,420 --> 00:19:44,120 and really useful. 497 00:19:45,440 --> 00:19:47,200 There's no documentation on this one. 498 00:19:47,540 --> 00:19:48,480 The reason is, 499 00:19:49,940 --> 00:19:51,820 when the first Palm Pilot was released, 500 00:19:52,340 --> 00:19:53,180 3Com told everyone, 501 00:19:53,320 --> 00:19:54,360 this is for hot-syncing. 502 00:19:54,560 --> 00:19:55,640 That's all this does. 503 00:19:56,140 --> 00:19:58,360 And then we realized there are all these great peripherals 504 00:19:58,360 --> 00:19:59,660 that you can add on to it. 505 00:19:59,720 --> 00:20:00,580 You can put your modem on it. 506 00:20:00,640 --> 00:20:01,620 You can put your GSM on it. 507 00:20:01,720 --> 00:20:05,540 You can put the new Govox voice recorder on it. 508 00:20:06,080 --> 00:20:08,500 So they didn't actually document it 509 00:20:08,500 --> 00:20:09,520 as well as they should have. 510 00:20:09,860 --> 00:20:11,680 So what happened was, Landware, 511 00:20:11,800 --> 00:20:13,180 the company that makes the GoType keyboard, 512 00:20:15,440 --> 00:20:17,700 and read the information from the serial port 513 00:20:17,700 --> 00:20:19,520 and watched the communication of it 514 00:20:19,520 --> 00:20:21,400 because they had the hardware specs. 515 00:20:21,640 --> 00:20:23,640 They didn't have the software communication specs. 516 00:20:24,420 --> 00:20:24,880 So, 517 00:20:24,960 --> 00:20:27,400 I don't think 3Com intended for someone 518 00:20:27,400 --> 00:20:29,440 that was a commercial developer 519 00:20:29,440 --> 00:20:30,820 to actually hack their own 520 00:20:31,440 --> 00:20:32,620 Palm Pilot, but it happened. 521 00:20:33,780 --> 00:20:36,000 Dot 3 is to disable the auto-off. 522 00:20:36,200 --> 00:20:37,700 I actually really like that one 523 00:20:37,700 --> 00:20:39,020 because it really makes me angry 524 00:20:39,020 --> 00:20:39,920 when I'm taking notes. 525 00:20:40,060 --> 00:20:41,420 All of a sudden the thing turns off. 526 00:20:41,920 --> 00:20:43,220 Yeah, it turns on automatically. 527 00:20:45,440 --> 00:20:46,160 Let me get my stylus out. 528 00:20:46,940 --> 00:20:48,400 You also have Dot 4. 529 00:20:48,760 --> 00:20:50,840 Dot 4 flashes your username 530 00:20:50,840 --> 00:20:53,560 and unique number inside your Palm Pilot. 531 00:20:54,000 --> 00:20:55,640 This one's a little dangerous. 532 00:20:56,180 --> 00:20:58,100 This one actually gets rid of 533 00:20:58,100 --> 00:20:59,520 your Palm Pilot's username 534 00:20:59,520 --> 00:21:01,440 which is a randomly assigned name 535 00:21:01,440 --> 00:21:03,640 and also some random numbers in there. 536 00:21:04,040 --> 00:21:05,340 Basically when you do that 537 00:21:05,340 --> 00:21:06,920 your Palm Pilot can't identify itself 538 00:21:06,920 --> 00:21:08,340 and you're going to have to do a hard reset. 539 00:21:10,380 --> 00:21:11,660 Dot 5 removes 540 00:21:11,660 --> 00:21:13,660 your user configuration 541 00:21:13,660 --> 00:21:14,480 and your hot sink. 542 00:21:15,440 --> 00:21:16,580 The Palm Pilot registry 543 00:21:16,580 --> 00:21:19,500 is called SavePreferences.pdb. 544 00:21:19,560 --> 00:21:20,100 It's a database. 545 00:21:20,340 --> 00:21:21,360 It's not encrypted. 546 00:21:21,620 --> 00:21:23,440 It doesn't have any special information in it 547 00:21:24,380 --> 00:21:26,240 except that it contains most of your 548 00:21:26,240 --> 00:21:27,720 shareware usernames and passwords 549 00:21:27,720 --> 00:21:29,460 that you use. 550 00:21:30,400 --> 00:21:32,880 It's bad to reset your 551 00:21:32,880 --> 00:21:34,880 user configuration and your hot sink ID. 552 00:21:35,080 --> 00:21:36,800 Basically when you use this trick 553 00:21:37,440 --> 00:21:38,680 and you resync your Palm 554 00:21:38,680 --> 00:21:39,980 everything comes out in duplicate 555 00:21:39,980 --> 00:21:41,940 because it doesn't know what your record is. 556 00:21:42,120 --> 00:21:44,260 This is another example of where 3Com 557 00:21:45,480 --> 00:21:45,920 actually... 558 00:21:45,920 --> 00:21:47,780 I think they were hedging their bets. 559 00:21:47,900 --> 00:21:49,000 They wanted to make the hot sink application 560 00:21:49,000 --> 00:21:50,800 quick and easy to use 561 00:21:50,800 --> 00:21:53,180 when in truth what they ended up doing with it 562 00:21:53,180 --> 00:21:56,820 is making it very poorly unrobust. 563 00:21:57,360 --> 00:21:59,060 There's a program called Backup Buddy 564 00:21:59,060 --> 00:22:00,780 that lets you back up all your databases 565 00:22:00,780 --> 00:22:01,360 and everything. 566 00:22:01,640 --> 00:22:03,980 That kind of takes advantage of the fact 567 00:22:03,980 --> 00:22:05,340 that the Palm Pilot hot sink 568 00:22:05,340 --> 00:22:07,220 is a little bit simplistic. 569 00:22:08,740 --> 00:22:10,520 Dot 6 displays your ROM date. 570 00:22:10,780 --> 00:22:11,700 Very, very cool. 571 00:22:11,700 --> 00:22:13,600 Go into Best Buy sometimes 572 00:22:13,600 --> 00:22:15,480 and run a few Dot 6 shortcuts 573 00:22:15,480 --> 00:22:16,060 on their things. 574 00:22:16,200 --> 00:22:18,200 You'll find out how old their inventory is. 575 00:22:23,000 --> 00:22:25,780 Dot 7 lets you toggle your battery meter 576 00:22:25,780 --> 00:22:27,540 even though 3Com said that they weren't 577 00:22:27,540 --> 00:22:28,820 going to allow you to use 578 00:22:29,920 --> 00:22:31,940 actual rechargeable batteries with the Palm Pilot. 579 00:22:32,140 --> 00:22:33,100 A lot of us do. 580 00:22:33,780 --> 00:22:34,720 I used to. 581 00:22:34,780 --> 00:22:36,960 One thing that you should do if you do 582 00:22:36,960 --> 00:22:38,400 is use the Dot 7 shortcut 583 00:22:38,400 --> 00:22:39,840 because it will change your battery meter 584 00:22:41,700 --> 00:22:41,900 to rechargeable. 585 00:22:42,040 --> 00:22:43,660 It will more accurately reflect 586 00:22:43,660 --> 00:22:47,020 the state of your battery. 587 00:22:48,560 --> 00:22:50,100 Every Palm Pilot program 588 00:22:50,100 --> 00:22:51,760 is a Dot PRC file. 589 00:22:52,020 --> 00:22:53,580 You see those things running around. 590 00:22:54,220 --> 00:22:55,840 You see every application 591 00:22:55,840 --> 00:22:57,960 uses a Palm Resource file 592 00:22:57,960 --> 00:22:59,000 to run itself. 593 00:22:59,400 --> 00:23:00,860 It's a collection of forms 594 00:23:01,430 --> 00:23:02,300 which, for example, 595 00:23:02,400 --> 00:23:03,760 the form in your date book 596 00:23:03,760 --> 00:23:05,360 is the listing of the lines 597 00:23:05,360 --> 00:23:08,060 in your current appointment information. 598 00:23:08,420 --> 00:23:10,800 It uses alerts, which is when it pops up 599 00:23:11,700 --> 00:23:12,800 to register the shareware application. 600 00:23:13,360 --> 00:23:14,780 It uses strings, 601 00:23:15,040 --> 00:23:16,760 which you can actually hard code 602 00:23:16,760 --> 00:23:17,740 inside the application. 603 00:23:18,180 --> 00:23:20,080 A lot of developers who are using 604 00:23:20,080 --> 00:23:21,340 assembly language, 605 00:23:21,540 --> 00:23:23,060 and about 80% are, 606 00:23:23,420 --> 00:23:26,420 place a lot of strings within their application 607 00:23:26,420 --> 00:23:28,520 such as a check register key. 608 00:23:38,540 --> 00:23:40,880 The Palm Pilot uses a Dragon Ball 609 00:23:41,700 --> 00:23:43,860 processor. It's a Motorola M68K 610 00:23:43,860 --> 00:23:45,620 processor. It's the same one 611 00:23:45,620 --> 00:23:46,900 that was in your Commodore 64, 612 00:23:47,360 --> 00:23:49,100 just modified for power consumption. 613 00:23:51,420 --> 00:23:53,460 Loft offers a Dragon Balls app 614 00:23:53,460 --> 00:23:55,320 to view your M68K registers. 615 00:23:55,540 --> 00:23:56,380 That's what it's called. 616 00:23:56,540 --> 00:23:58,560 It's a very clever name with a Z. 617 00:23:58,880 --> 00:24:00,900 It actually lets you look inside 618 00:24:00,900 --> 00:24:02,400 of all the registers inside 619 00:24:03,140 --> 00:24:04,860 your Palm Pilot while it's running. 620 00:24:05,280 --> 00:24:07,020 It's actually really useful because 621 00:24:07,020 --> 00:24:08,420 an application like 622 00:24:09,960 --> 00:24:10,520 Afterburner, 623 00:24:11,700 --> 00:24:13,680 a Palm Accelerator and overclocking 624 00:24:13,680 --> 00:24:14,080 application, 625 00:24:15,300 --> 00:24:17,560 the developer of it used this 626 00:24:17,560 --> 00:24:19,680 to actually go inside and look 627 00:24:19,680 --> 00:24:21,700 at why his application was crashing so often. 628 00:24:21,840 --> 00:24:23,220 I find it much more stable. 629 00:24:23,480 --> 00:24:25,500 What you can use it for is to see exactly 630 00:24:25,500 --> 00:24:27,880 what's going on in that slow program. 631 00:24:28,460 --> 00:24:29,680 I don't know if anyone uses 632 00:24:29,680 --> 00:24:31,520 Datebook 4, but I assume almost everyone 633 00:24:31,520 --> 00:24:32,920 uses the Datebook alternative. 634 00:24:33,340 --> 00:24:35,220 That application is so slow 635 00:24:35,220 --> 00:24:37,560 and so sloth-like because of its 636 00:24:37,560 --> 00:24:39,360 programming that you can actually go in and see 637 00:24:39,360 --> 00:24:41,620 what it's doing. Basically every two lines of code 638 00:24:41,700 --> 00:24:43,560 it's making a direct memory call. 639 00:24:44,760 --> 00:24:45,760 There's a program 640 00:24:45,760 --> 00:24:47,460 by Sylvain Beaulieu 641 00:24:47,460 --> 00:24:49,500 I think, called 642 00:24:49,500 --> 00:24:51,280 Insider. This program 643 00:24:51,280 --> 00:24:52,960 actually lets you view 644 00:24:53,440 --> 00:24:55,340 your memory location inside your Palm Pilot. 645 00:24:55,460 --> 00:24:57,340 It lets you disassemble inside your Palm Pilot. 646 00:24:57,460 --> 00:24:59,320 It lets you copy sections of memory 647 00:24:59,320 --> 00:25:01,360 from your Palm Pilot, both live 648 00:25:01,360 --> 00:25:03,500 and in storage. This is a 649 00:25:03,500 --> 00:25:04,620 really amazing application. 650 00:25:05,480 --> 00:25:07,640 It's free unless you get 651 00:25:07,640 --> 00:25:08,400 the pro version. 652 00:25:08,780 --> 00:25:10,880 To get the pro version costs you about 653 00:25:11,700 --> 00:25:12,900 I think it's about $59. 654 00:25:14,120 --> 00:25:15,440 I don't have the pro version. 655 00:25:15,600 --> 00:25:16,840 I use the regular version. 656 00:25:17,720 --> 00:25:20,000 There's also a program called Palm Disassembler. 657 00:25:20,200 --> 00:25:21,540 You can get these programs 658 00:25:21,540 --> 00:25:23,500 from Palm Gear of course. 659 00:25:23,740 --> 00:25:25,580 It actually lets you disassemble your 660 00:25:25,580 --> 00:25:26,880 Palm Pilot applications and memory. 661 00:25:27,240 --> 00:25:29,420 I think probably the best way you can learn 662 00:25:29,420 --> 00:25:31,540 programming if anyone wants to be a Palm Pilot 663 00:25:31,540 --> 00:25:33,520 developer because it's a great 664 00:25:33,520 --> 00:25:35,260 community of people developing applications 665 00:25:35,260 --> 00:25:37,300 is to actually use the Palm Disassembler 666 00:25:37,300 --> 00:25:38,340 to look inside. 667 00:25:39,140 --> 00:25:41,680 The only weakness of it is it doesn't 668 00:25:41,700 --> 00:25:43,460 let you view the system traps 669 00:25:43,460 --> 00:25:45,680 which are something else that you have to 670 00:25:46,280 --> 00:25:47,480 contend with when you're programming 671 00:25:47,480 --> 00:25:48,300 for the Palm Pilot. 672 00:25:54,200 --> 00:25:55,360 Next section is on 673 00:25:55,360 --> 00:25:56,280 application attacks. 674 00:25:56,920 --> 00:25:58,880 By attack I don't mean 675 00:25:58,880 --> 00:26:01,420 guy beating up the application, taking advantage 676 00:26:01,420 --> 00:26:03,360 of it, you know, blue hair running around. 677 00:26:03,940 --> 00:26:05,680 What I mean is actually 678 00:26:05,680 --> 00:26:07,520 looking at the way the Palm Pilot 679 00:26:07,520 --> 00:26:08,880 runs and the way a program runs. 680 00:26:09,120 --> 00:26:11,580 This is the Palm Disassembler program that I talked 681 00:26:11,700 --> 00:26:12,180 about before. 682 00:26:12,800 --> 00:26:14,460 This is live on your Palm Pilot. 683 00:26:14,620 --> 00:26:17,520 You can actually see the code that each application 684 00:26:17,520 --> 00:26:18,540 is running in here. 685 00:26:24,060 --> 00:26:25,760 Your user interface 686 00:26:25,760 --> 00:26:27,180 is a physical layer. 687 00:26:27,280 --> 00:26:28,960 It's what you see in front of your Palm Screen. 688 00:26:29,660 --> 00:26:31,420 When you turn it on, every app 689 00:26:31,420 --> 00:26:33,240 is made up of forms, which is your input section, 690 00:26:33,460 --> 00:26:35,280 alerts, which is your pop-up section, 691 00:26:35,480 --> 00:26:37,660 and strings, which is your text section. 692 00:26:39,780 --> 00:26:41,540 When the resources are extracted 693 00:26:41,700 --> 00:26:43,320 you get these little binary files 694 00:26:43,320 --> 00:26:44,520 and they're actually 695 00:26:45,220 --> 00:26:47,400 in plain text. So you can actually 696 00:26:47,400 --> 00:26:49,540 view the resources that each Palm Pilot application 697 00:26:49,540 --> 00:26:50,200 uses. 698 00:26:51,440 --> 00:26:53,760 If you have TF or if you have F 699 00:26:53,760 --> 00:26:55,700 you've extracted a form. If you have A 700 00:26:55,700 --> 00:26:56,880 you've extracted an alert. 701 00:26:57,140 --> 00:26:59,720 If you have STI you've extracted a string. 702 00:27:00,120 --> 00:27:01,760 The rest are all code segments. 703 00:27:02,200 --> 00:27:03,640 Most Palm Pilot programs 704 00:27:03,640 --> 00:27:04,980 and most Palm Pilot developers 705 00:27:05,720 --> 00:27:07,520 use two code segments. 706 00:27:07,680 --> 00:27:09,340 They use the application 707 00:27:09,340 --> 00:27:11,580 initialization segment and then the 708 00:27:11,700 --> 00:27:12,780 file run all of their main events 709 00:27:12,780 --> 00:27:14,000 and their main programming often. 710 00:27:15,440 --> 00:27:17,240 You also have stylish actions. 711 00:27:17,560 --> 00:27:19,100 So in addition to all the resources 712 00:27:19,100 --> 00:27:21,540 that we see, you also have 713 00:27:21,540 --> 00:27:23,540 your stylish actions, your button actions, 714 00:27:23,640 --> 00:27:24,660 and your keyboard input. 715 00:27:25,220 --> 00:27:26,900 That's actually the digital keyboard, 716 00:27:27,040 --> 00:27:29,180 not actually the go type there that I'm referring to. 717 00:27:30,720 --> 00:27:31,800 So all those 718 00:27:31,800 --> 00:27:33,480 methods together let you interact 719 00:27:33,480 --> 00:27:35,020 with the forms. And that's what it is. 720 00:27:35,140 --> 00:27:37,360 It isn't an application that's running all the time 721 00:27:37,360 --> 00:27:38,680 using up memory and using resources. 722 00:27:39,100 --> 00:27:40,640 That's why I like the Palm Pilot. 723 00:27:41,700 --> 00:27:42,160 It's very basic and straightforward 724 00:27:42,160 --> 00:27:43,500 and lets you do what you want to do. 725 00:27:50,400 --> 00:27:51,780 The M68K processor 726 00:27:51,780 --> 00:27:53,400 is Motorola's processor. 727 00:27:53,620 --> 00:27:55,320 You have two versions. You have the Dragon Ball 728 00:27:55,320 --> 00:27:56,680 and you have the Dragon Ball EZ 729 00:27:56,680 --> 00:27:58,740 which is in the Palm 3X 730 00:27:58,740 --> 00:28:00,900 and the Palm 5X and 5XE. 731 00:28:03,200 --> 00:28:04,340 It's pretty simple. 732 00:28:04,980 --> 00:28:06,160 But we'll go over it. 733 00:28:06,520 --> 00:28:08,080 Basically everything in the application 734 00:28:10,100 --> 00:28:10,980 works linearly. 735 00:28:11,700 --> 00:28:12,720 It goes from beginning to end. 736 00:28:12,840 --> 00:28:14,480 It has a few subroutines that it uses. 737 00:28:14,620 --> 00:28:16,800 Most programs run in a straight line fashion. 738 00:28:17,220 --> 00:28:18,280 So the way they get around 739 00:28:18,280 --> 00:28:20,820 did you do it right or did you do it wrong 740 00:28:20,820 --> 00:28:23,060 is with simple instructions that you might 741 00:28:23,060 --> 00:28:24,740 if you've done any assembly language program 742 00:28:24,740 --> 00:28:25,200 you recognize. 743 00:28:25,600 --> 00:28:27,560 These are the Palm Pilot opcodes. 744 00:28:27,720 --> 00:28:31,420 The equivalence of branch all the time 745 00:28:31,420 --> 00:28:32,540 which is opcode 60. 746 00:28:32,820 --> 00:28:34,820 B and E. Branch if not equal 747 00:28:34,820 --> 00:28:36,040 which is opcode 66. 748 00:28:36,600 --> 00:28:38,840 Branch if equal which is 67. 749 00:28:39,520 --> 00:28:41,580 Branch if greater than and branch 750 00:28:41,700 --> 00:28:42,280 if less than. 751 00:28:42,820 --> 00:28:44,160 And then Debuffer. 752 00:28:46,260 --> 00:28:48,300 3Com released a Palm debugger 753 00:28:48,300 --> 00:28:49,920 and then they made it so that 754 00:28:51,020 --> 00:28:52,000 Code Warrior 755 00:28:52,000 --> 00:28:53,740 one of the major development platforms 756 00:28:53,740 --> 00:28:54,560 was the Palm Pilot 757 00:28:54,560 --> 00:28:57,400 could then continue the development of the debugger. 758 00:28:57,480 --> 00:28:58,640 And they kind of left it in a state 759 00:28:58,640 --> 00:29:00,940 where it only has information up to 760 00:29:00,940 --> 00:29:04,040 version 3.0 and 3.1 of the operating system. 761 00:29:04,880 --> 00:29:06,120 So someone developed 762 00:29:06,120 --> 00:29:07,560 and named it after his dog 763 00:29:07,560 --> 00:29:09,360 this program called Debuffer 764 00:29:09,360 --> 00:29:11,500 which is a full featured debugging application 765 00:29:11,700 --> 00:29:12,380 for your Palm Pilot. 766 00:29:12,940 --> 00:29:15,680 This application uses a system trap 767 00:29:17,240 --> 00:29:17,840 4E48 768 00:29:17,840 --> 00:29:19,640 that was reserved as 769 00:29:19,640 --> 00:29:21,780 unused by 3Com to actually control 770 00:29:21,780 --> 00:29:23,120 the execution of the program. 771 00:29:23,460 --> 00:29:24,980 That will come into play a little bit later 772 00:29:24,980 --> 00:29:26,140 when we're talking about liberty 773 00:29:26,140 --> 00:29:27,560 and how they protect their application. 774 00:29:32,440 --> 00:29:33,880 A few other opcodes 775 00:29:34,500 --> 00:29:35,860 instead of seq 776 00:29:35,860 --> 00:29:36,420 set of equal 777 00:29:36,420 --> 00:29:38,720 you set to 50 778 00:29:38,720 --> 00:29:40,220 automatically sets it to 779 00:29:41,700 --> 00:29:42,640 You also have NOP 780 00:29:42,640 --> 00:29:43,820 which is 4E71 781 00:29:43,820 --> 00:29:46,100 which is no instruction. 782 00:29:48,780 --> 00:29:50,220 You also have RTS 783 00:29:50,220 --> 00:29:51,040 which is return. 784 00:29:51,420 --> 00:29:53,140 Every Palm Pilot subroutine 785 00:29:53,140 --> 00:29:55,920 has to follow the exact same specification. 786 00:29:56,420 --> 00:29:57,520 It starts with the link 787 00:29:57,520 --> 00:29:59,140 it starts with reading the memory in 788 00:29:59,140 --> 00:30:00,500 processes it 789 00:30:00,500 --> 00:30:02,180 and it has to return it in one register 790 00:30:02,180 --> 00:30:03,160 D0 791 00:30:03,900 --> 00:30:05,920 just like when you're using 792 00:30:05,920 --> 00:30:08,560 16 bit Windows applications actually. 793 00:30:11,800 --> 00:30:13,080 Clear equals 42 794 00:30:13,080 --> 00:30:15,140 which lets you reset memory locations 795 00:30:15,760 --> 00:30:17,220 and move number 1 796 00:30:17,220 --> 00:30:18,080 or move number 0 797 00:30:18,080 --> 00:30:20,460 is move queue number 0 798 00:30:20,460 --> 00:30:21,540 move queue number 1 799 00:30:21,540 --> 00:30:23,580 7 0 and 0 1 800 00:30:23,580 --> 00:30:26,900 it's a 2 byte operation code. 801 00:30:33,240 --> 00:30:34,800 All your Palm Pilot applications 802 00:30:34,800 --> 00:30:36,140 work with system traps. 803 00:30:36,300 --> 00:30:37,000 This is the API. 804 00:30:37,000 --> 00:30:37,880 It's transparent 805 00:30:38,560 --> 00:30:40,020 to the application. 806 00:30:40,440 --> 00:30:42,280 It doesn't know of course 807 00:30:42,280 --> 00:30:44,680 whether it's calling a patched section of it 808 00:30:44,680 --> 00:30:46,840 whether it's calling a hacked section of it 809 00:30:46,840 --> 00:30:47,640 or what you're doing. 810 00:30:47,740 --> 00:30:49,120 This is how you can extend 811 00:30:49,120 --> 00:30:51,040 the usefulness of your Palm Pilot. 812 00:30:51,560 --> 00:30:54,020 System trap DLK get sync info 813 00:30:54,800 --> 00:30:55,620 That's what it's called. 814 00:30:55,860 --> 00:30:56,960 Anyone can run this. 815 00:30:57,080 --> 00:30:58,560 There's no restrictions on it. 816 00:30:58,640 --> 00:31:00,760 Anyone can view all of your hot sync information. 817 00:31:01,220 --> 00:31:03,300 That's how an application that's shareware 818 00:31:03,300 --> 00:31:04,980 will often get your hot sync ID. 819 00:31:07,000 --> 00:31:08,320 They require memlocks 820 00:31:08,320 --> 00:31:10,240 and they require you to lock the memory 821 00:31:10,240 --> 00:31:12,580 or they require you to read the default database 822 00:31:12,580 --> 00:31:13,360 in your Palm Pilot. 823 00:31:13,920 --> 00:31:16,480 Thus far no developer has begun to use that 824 00:31:16,480 --> 00:31:18,320 although that would be a better protection method 825 00:31:18,320 --> 00:31:19,180 for your application. 826 00:31:20,500 --> 00:31:22,040 System trap STR compare 827 00:31:22,040 --> 00:31:23,000 that's pretty straight forward. 828 00:31:23,200 --> 00:31:25,300 Compare two strings together in your Palm Pilot 829 00:31:25,300 --> 00:31:26,360 return the result. 830 00:31:26,520 --> 00:31:27,680 Are they equal or are they not equal? 831 00:31:28,520 --> 00:31:30,440 It usually will end a queue routine 832 00:31:30,440 --> 00:31:32,700 from an actual shareware developer. 833 00:31:33,660 --> 00:31:35,580 The shareware community like I mentioned 834 00:31:37,000 --> 00:31:38,960 has 70,000 shareware developers. 835 00:31:41,460 --> 00:31:43,280 Companies like Standalone, 836 00:31:43,540 --> 00:31:44,220 Landware, 837 00:31:44,800 --> 00:31:45,480 Iambic Software 838 00:31:45,480 --> 00:31:48,460 that creates action names 839 00:31:48,780 --> 00:31:49,780 and also creates 840 00:31:49,780 --> 00:31:52,180 the all money application. 841 00:31:54,660 --> 00:31:55,840 They actually 842 00:31:55,840 --> 00:31:57,380 to give you an example 843 00:31:57,380 --> 00:31:59,020 let's use Datebook. 844 00:31:59,220 --> 00:31:59,980 Datebook is 845 00:31:59,980 --> 00:32:01,900 I think the latest version is like 846 00:32:02,920 --> 00:32:03,640 380k 847 00:32:03,640 --> 00:32:06,000 and your Palm Pilot has in it 848 00:32:07,000 --> 00:32:07,860 if you have the 5x 849 00:32:07,860 --> 00:32:09,340 or if you have the 5 rather 850 00:32:09,340 --> 00:32:10,540 because it's really cool looking 851 00:32:10,540 --> 00:32:12,880 you have two megs of memory in it 852 00:32:13,700 --> 00:32:14,420 of RAM. 853 00:32:14,680 --> 00:32:16,840 So that takes up one quarter of your memory. 854 00:32:18,240 --> 00:32:19,880 That's because they've left in there 855 00:32:19,880 --> 00:32:20,980 their old string compares 856 00:32:20,980 --> 00:32:23,580 and old data and old code 857 00:32:23,580 --> 00:32:25,100 inside of your application 858 00:32:25,100 --> 00:32:26,800 because it's too much of a pain 859 00:32:26,800 --> 00:32:27,860 to recompile it sometimes. 860 00:32:29,620 --> 00:32:30,860 Apparently for about 861 00:32:30,860 --> 00:32:33,100 probably 20% of the applications out there 862 00:32:33,100 --> 00:32:35,260 they'd run much faster if they went in 863 00:32:37,000 --> 00:32:37,020 with their old string. 864 00:32:37,020 --> 00:32:37,880 They also have which is 865 00:32:37,880 --> 00:32:39,300 the closest a Palm Pilot has 866 00:32:39,300 --> 00:32:40,900 to an encrypted string 867 00:32:40,900 --> 00:32:43,000 which is CRC 16 calc block. 868 00:32:43,240 --> 00:32:46,120 It calculates a 16 bit CRC 869 00:32:46,120 --> 00:32:47,540 of information and memory. 870 00:32:48,480 --> 00:32:51,360 This is smarter than this 871 00:32:51,360 --> 00:32:52,820 for a developer to use 872 00:32:52,820 --> 00:32:53,600 if you want to use it. 873 00:32:53,680 --> 00:32:55,080 This is a one to one comparison. 874 00:32:55,500 --> 00:32:58,060 Most people don't know that CRC 16 calc 875 00:32:58,060 --> 00:32:59,600 returns the result 876 00:32:59,600 --> 00:33:02,020 not only of the 16 bit CRC 877 00:33:02,020 --> 00:33:04,000 but also the result of the comparison 878 00:33:07,000 --> 00:33:07,880 which is a really important distinction 879 00:33:08,860 --> 00:33:10,500 between itself and string compare 880 00:33:10,500 --> 00:33:12,000 and it's a different way to 881 00:33:12,000 --> 00:33:14,020 check your applications if you're a developer. 882 00:33:18,180 --> 00:33:19,940 Since the Palm Pilot came out 883 00:33:20,620 --> 00:33:22,260 there have been free tools 884 00:33:22,260 --> 00:33:24,420 that let you assemble and disassemble 885 00:33:24,420 --> 00:33:25,740 code for your Palm Pilot. 886 00:33:26,240 --> 00:33:27,860 One of the most popular is 887 00:33:27,860 --> 00:33:29,240 Pilot Disassembler. 888 00:33:29,380 --> 00:33:30,680 It's very quick and thorough. 889 00:33:30,860 --> 00:33:33,080 It has some switches and runs in DOS 890 00:33:33,080 --> 00:33:34,140 and I'm going to show you an example 891 00:33:37,040 --> 00:33:38,360 It's very, very fast. 892 00:33:38,760 --> 00:33:39,900 It's very functional. 893 00:33:39,960 --> 00:33:42,380 It lets you look at what's going on 894 00:33:42,380 --> 00:33:43,500 inside of a Palm Pilot application. 895 00:33:44,120 --> 00:33:46,260 You also have PRC2bin 896 00:33:46,260 --> 00:33:48,120 which takes all Palm Pilot resources 897 00:33:48,560 --> 00:33:49,880 dumps them into the binary files 898 00:33:49,880 --> 00:33:51,060 and lets you look at the forms 899 00:33:51,060 --> 00:33:52,340 and the elements of your application. 900 00:33:53,540 --> 00:33:55,380 And then you have my favorite program 901 00:33:55,380 --> 00:33:56,060 UltraEdit 902 00:33:56,060 --> 00:33:58,080 which is this fantastic editor 903 00:33:58,080 --> 00:33:59,740 that lets you view things in hex 904 00:33:59,740 --> 00:34:00,980 or in plain text mode. 905 00:34:02,060 --> 00:34:03,640 That's at UltraEdit.com 906 00:34:03,640 --> 00:34:04,940 I get nothing. 907 00:34:05,120 --> 00:34:07,140 I wear their name on my shirt 908 00:34:07,140 --> 00:34:07,460 or whatever. 909 00:34:07,740 --> 00:34:08,680 They don't give me anything. 910 00:34:14,380 --> 00:34:16,140 This is the most amazing thing 911 00:34:16,140 --> 00:34:19,220 that was written for the Palm Pilot world 912 00:34:19,220 --> 00:34:21,160 that wasn't written by 3Com. 913 00:34:21,960 --> 00:34:24,080 The Palm Pilot OS emulator 914 00:34:24,080 --> 00:34:26,000 lets you emulate your Palm Pilot 915 00:34:26,000 --> 00:34:26,720 on your PC. 916 00:34:27,060 --> 00:34:28,440 Some people may know about this 917 00:34:28,440 --> 00:34:29,220 some people don't. 918 00:34:30,980 --> 00:34:31,980 It's actually to test programs 919 00:34:31,980 --> 00:34:32,920 to see if it's going to crash 920 00:34:32,920 --> 00:34:33,800 your current configuration. 921 00:34:35,320 --> 00:34:37,100 What you do is you run the emulator 922 00:34:37,100 --> 00:34:38,080 and you seed it with a ROM 923 00:34:38,080 --> 00:34:39,460 for your different operating systems. 924 00:34:39,760 --> 00:34:41,820 You get this off 3Com's development site 925 00:34:41,820 --> 00:34:44,060 which is palmos.com slash dev. 926 00:34:45,000 --> 00:34:47,620 It lets you use your Palm 3 ROM 927 00:34:47,620 --> 00:34:48,340 your Palm 3X 928 00:34:48,340 --> 00:34:50,040 the different versions of your operating system 929 00:34:50,040 --> 00:34:51,440 basically and test how the application 930 00:34:51,440 --> 00:34:52,360 is going to run on it. 931 00:34:53,200 --> 00:34:55,260 You can set your hot sync ID in it 932 00:34:55,260 --> 00:34:56,760 which I think is actually really neat 933 00:35:00,980 --> 00:35:01,840 to have some obscure characters 934 00:35:01,840 --> 00:35:04,080 capital numbers letters in your hot sync ID. 935 00:35:04,420 --> 00:35:06,320 It comes with a ROM extract utility 936 00:35:06,320 --> 00:35:08,020 or you can find ROMs on the internet. 937 00:35:08,520 --> 00:35:10,720 And it lets you research and test your applications. 938 00:35:11,000 --> 00:35:12,280 So in the example of Liberty 939 00:35:12,920 --> 00:35:14,900 you're supposed to run all your games on this 940 00:35:14,900 --> 00:35:17,000 before your entire Palm Pilot crashes. 941 00:35:22,820 --> 00:35:24,660 We're going to go into a simple protection 942 00:35:24,660 --> 00:35:27,020 an application called LaunchEm. 943 00:35:27,940 --> 00:35:28,760 LaunchEm is 944 00:35:29,380 --> 00:35:30,140 demo ware. 945 00:35:30,980 --> 00:35:32,760 You demo your applications for 15 days. 946 00:35:33,700 --> 00:35:35,200 It's a special screen 947 00:35:36,060 --> 00:35:38,400 it changes basically your view of your operating system. 948 00:35:38,620 --> 00:35:39,360 It's got nice tabs 949 00:35:39,360 --> 00:35:40,460 and you organize your applications. 950 00:35:40,880 --> 00:35:41,820 You've got a trash can 951 00:35:41,820 --> 00:35:44,200 you've got all these great different resources. 952 00:35:44,760 --> 00:35:46,540 It's one of the most expensive 953 00:35:46,540 --> 00:35:47,980 it's by a company called Syn Solutions 954 00:35:47,980 --> 00:35:50,780 and they actually charge a lot 955 00:35:50,780 --> 00:35:52,480 for their shareware. 956 00:35:52,780 --> 00:35:54,200 I don't know how you guys feel 957 00:35:54,200 --> 00:35:55,600 but when you buy your Palm Pilot 958 00:35:55,600 --> 00:35:56,520 and you get it online 959 00:35:57,520 --> 00:36:00,520 it's like 150 bucks for your Palm Pilot now. 960 00:36:02,540 --> 00:36:05,420 It's respectable that the development time 961 00:36:05,420 --> 00:36:07,360 they've put into making an application like this 962 00:36:07,360 --> 00:36:09,560 other than the fact that this is based on a freeware application 963 00:36:09,560 --> 00:36:10,820 this particular program 964 00:36:11,800 --> 00:36:13,060 actually goes into 965 00:36:13,060 --> 00:36:14,940 creating new versions of the program 966 00:36:14,940 --> 00:36:15,700 and 967 00:36:17,000 --> 00:36:19,560 I think it's important to always keep in mind 968 00:36:19,560 --> 00:36:21,060 that if you're going to develop 969 00:36:21,060 --> 00:36:22,140 a Palm Pilot application 970 00:36:22,660 --> 00:36:24,460 that you should make sure to make it reasonable 971 00:36:24,460 --> 00:36:26,520 for the community of users out there 972 00:36:26,520 --> 00:36:28,240 who rely on it every day. 973 00:36:29,880 --> 00:36:30,960 So we're going to go over 974 00:36:30,980 --> 00:36:32,720 how this application protects itself. 975 00:36:35,740 --> 00:36:37,260 Why don't you guys go ahead 976 00:36:37,260 --> 00:36:38,540 and if you're taking notes 977 00:36:38,540 --> 00:36:41,100 take down the right section of the screen 978 00:36:41,100 --> 00:36:42,900 and the discovery section of the screen 979 00:36:42,900 --> 00:36:44,660 because I'm going to be switching back and forth 980 00:36:44,660 --> 00:36:46,800 inside of my computer. 981 00:36:58,880 --> 00:37:00,660 The first part of understanding 982 00:37:00,980 --> 00:37:02,420 the protection of the Palm Pilot programs 983 00:37:02,420 --> 00:37:04,600 is to understand the intent of the developer. 984 00:37:04,920 --> 00:37:06,260 If you are a developer 985 00:37:07,900 --> 00:37:09,880 I think DemoWare is a good idea 986 00:37:09,880 --> 00:37:11,040 but the only true protection 987 00:37:11,040 --> 00:37:12,340 that you're going to have for your program 988 00:37:12,340 --> 00:37:15,140 and all the time and effort you put into writing your program 989 00:37:15,140 --> 00:37:16,980 is to actually make it feature limited 990 00:37:16,980 --> 00:37:18,780 and not include the features in the program 991 00:37:18,780 --> 00:37:20,640 because the truth is that 992 00:37:21,960 --> 00:37:22,980 a simple alert 993 00:37:23,760 --> 00:37:24,820 that anyone can see 994 00:37:24,820 --> 00:37:25,440 that says demo 995 00:37:25,440 --> 00:37:27,780 is something that people can take advantage of 996 00:37:27,780 --> 00:37:29,620 and when you put all that time and effort 997 00:37:30,980 --> 00:37:31,100 into your application 998 00:37:31,100 --> 00:37:33,560 and it's protected in a simplistic way 999 00:37:33,560 --> 00:37:34,780 you're not going to see 1000 00:37:34,780 --> 00:37:38,260 the benefits of all your work. 1001 00:37:39,080 --> 00:37:40,480 The first step is 1002 00:37:40,480 --> 00:37:42,060 we'll start up the Palm Pilot 1003 00:37:42,060 --> 00:37:43,980 operating system emulator here. 1004 00:37:52,000 --> 00:37:54,600 The Palm Pilot emulator looks like this 1005 00:37:54,600 --> 00:37:55,380 you start it up 1006 00:37:55,380 --> 00:37:58,100 it asks you if you want to stick it on your start menu 1007 00:37:58,100 --> 00:37:59,780 which is fancy and nice. 1008 00:38:00,980 --> 00:38:02,520 You create a new session in it 1009 00:38:02,520 --> 00:38:04,600 you choose the device you want to emulate 1010 00:38:04,600 --> 00:38:06,940 in this case we'll do the Palm 3 1011 00:38:06,940 --> 00:38:08,920 because it doesn't make you 1012 00:38:08,920 --> 00:38:10,960 go through your graffiti sync when you start it. 1013 00:38:11,560 --> 00:38:12,820 We're going to choose a generic 1014 00:38:12,820 --> 00:38:14,180 skin for it 1015 00:38:14,180 --> 00:38:15,720 and we're going to choose to use 1016 00:38:15,720 --> 00:38:17,460 two megs of memory for it. 1017 00:38:18,140 --> 00:38:20,460 You choose a ROM file, one that you've extracted 1018 00:38:20,460 --> 00:38:21,580 off of your Palm Pilot 1019 00:38:22,320 --> 00:38:24,300 and you start up the emulator. 1020 00:38:25,720 --> 00:38:26,760 That looks familiar. 1021 00:38:28,740 --> 00:38:30,480 It looks exactly like 1022 00:38:30,980 --> 00:38:31,160 your Palm Pilot. 1023 00:38:31,440 --> 00:38:33,540 It acts exactly like your Palm Pilot 1024 00:38:33,540 --> 00:38:34,440 and if you notice 1025 00:38:42,180 --> 00:38:44,040 we're going to load in the application 1026 00:38:44,040 --> 00:38:45,440 and the way you load an application 1027 00:38:45,440 --> 00:38:47,060 is you right click on the interface 1028 00:38:48,480 --> 00:38:50,580 you install an application database 1029 00:38:51,840 --> 00:38:53,040 and we're going to 1030 00:38:53,040 --> 00:38:53,860 go ahead and install 1031 00:38:53,860 --> 00:38:58,480 a version of Launchum 1032 00:38:58,480 --> 00:38:59,660 by Sync Solutions. 1033 00:39:07,140 --> 00:39:08,820 All right, the application is loaded. 1034 00:39:09,140 --> 00:39:10,880 Much quicker than hot syncing. 1035 00:39:12,640 --> 00:39:13,920 You use this interface 1036 00:39:13,920 --> 00:39:15,740 just like you would use 1037 00:39:15,740 --> 00:39:16,360 your Palm Pilot. 1038 00:39:16,480 --> 00:39:18,780 Your arrow is your stylus 1039 00:39:18,780 --> 00:39:20,360 and you can interact with it directly. 1040 00:39:20,520 --> 00:39:21,920 You can see Launchum is over here. 1041 00:39:25,160 --> 00:39:26,140 Launchum is an editor. 1042 00:39:26,280 --> 00:39:27,120 When you start Launchum 1043 00:39:27,120 --> 00:39:29,140 it says welcome to your Launchum demo. 1044 00:39:29,520 --> 00:39:30,960 If you like Launchum 1045 00:39:30,980 --> 00:39:33,080 you can purchase it at Synergy Solutions' 1046 00:39:33,380 --> 00:39:35,040 website, SyncSolutions.com. 1047 00:39:35,800 --> 00:39:37,440 Unfortunately, one thing they didn't realize 1048 00:39:37,440 --> 00:39:38,860 is because this is a demo 1049 00:39:38,860 --> 00:39:40,820 you actually have to delete the application 1050 00:39:40,820 --> 00:39:42,840 which deletes your preferences for it 1051 00:39:42,840 --> 00:39:44,740 when you buy it and then reinstall it. 1052 00:39:45,160 --> 00:39:46,980 It's actually a very frustrating solution 1053 00:39:46,980 --> 00:39:47,980 for a lot of people. 1054 00:39:48,220 --> 00:39:50,000 You can set it to beautiful, Launchum. 1055 00:39:50,100 --> 00:39:52,560 So that's it. During the discovery phase 1056 00:39:52,560 --> 00:39:54,900 of understanding how the application protects itself 1057 00:39:56,140 --> 00:39:57,140 we found out 1058 00:39:57,140 --> 00:39:58,480 that a nag flashes welcome 1059 00:39:58,480 --> 00:40:00,140 to demo at startup. 1060 00:40:00,980 --> 00:40:02,560 The about says demo 1061 00:40:02,560 --> 00:40:05,160 so you can see that by going to the about of the application. 1062 00:40:05,400 --> 00:40:07,220 It's just like you're running it on your Palm Pilot. 1063 00:40:07,820 --> 00:40:08,780 It says demo 1064 00:40:08,780 --> 00:40:10,100 across the top right there. 1065 00:40:12,560 --> 00:40:14,220 And that's what we figured out 1066 00:40:14,220 --> 00:40:16,160 it uses to protect itself. 1067 00:40:16,600 --> 00:40:18,920 Now this is actually a very basic protection. 1068 00:40:19,080 --> 00:40:20,500 I really want everyone to understand 1069 00:40:20,500 --> 00:40:22,260 before I begin this part that 1070 00:40:23,300 --> 00:40:24,780 this is a really good application 1071 00:40:24,780 --> 00:40:26,380 and it's worth buying even though 1072 00:40:26,380 --> 00:40:27,440 it's a little bit expensive. 1073 00:40:28,640 --> 00:40:30,460 However, I think it should be protected 1074 00:40:30,980 --> 00:40:32,080 much more strongly because 1075 00:40:32,080 --> 00:40:35,080 it's a very good application. 1076 00:40:36,460 --> 00:40:37,900 So after you've looked at that 1077 00:40:37,900 --> 00:40:39,500 you go inside of the method of it 1078 00:40:39,500 --> 00:40:40,780 and the method we're going to use 1079 00:40:40,780 --> 00:40:42,160 is to disassemble it. 1080 00:40:43,220 --> 00:40:44,760 We're going to use the Palm Pilot 1081 00:40:44,760 --> 00:40:45,840 disassembly program. 1082 00:40:46,180 --> 00:40:47,300 It's a DOS application 1083 00:40:47,300 --> 00:40:49,920 so we run to DOS and hope that the computer doesn't crash. 1084 00:40:52,900 --> 00:40:55,060 You'll see the directory of information here. 1085 00:40:56,480 --> 00:40:58,280 I've got the tools dis 1086 00:40:58,280 --> 00:41:00,360 which is Palm Pilot disassembler. 1087 00:41:00,980 --> 00:41:02,720 You'll see to bin and I've got high note launch 1088 00:41:02,720 --> 00:41:04,880 and my walkthroughs for this. 1089 00:41:06,540 --> 00:41:07,680 You run DOS 1090 00:41:08,780 --> 00:41:10,300 and you run question mark. 1091 00:41:11,060 --> 00:41:12,280 Oh, there we go. 1092 00:41:12,840 --> 00:41:14,400 Actually you run it without the question mark 1093 00:41:14,400 --> 00:41:16,460 and you can look at all the command line options for it. 1094 00:41:16,560 --> 00:41:18,720 It has help. It lets you set the offset 1095 00:41:18,720 --> 00:41:19,760 you disassemble by. 1096 00:41:20,400 --> 00:41:22,260 It lets you set the instructions you use. 1097 00:41:22,340 --> 00:41:24,980 You can use a custom traps file to view the system traps. 1098 00:41:25,240 --> 00:41:27,040 But mostly it just works by doing 1099 00:41:27,040 --> 00:41:29,640 DOS and the application's name. 1100 00:41:35,800 --> 00:41:38,920 And because they're very tiny programs on the Palm Pilot 1101 00:41:38,920 --> 00:41:40,800 it actually works rather quickly. 1102 00:41:46,140 --> 00:41:47,900 Yeah, see it's working really quickly. 1103 00:41:48,160 --> 00:41:50,160 It's the quality of Windows right here. 1104 00:41:50,640 --> 00:41:51,740 There you go. Alright. 1105 00:41:52,780 --> 00:41:54,480 Tweeting all that sophisticated code. 1106 00:41:58,100 --> 00:41:59,240 While that's working 1107 00:41:59,240 --> 00:42:00,700 we'll go back to this side of things. 1108 00:42:00,960 --> 00:42:02,100 Oh, there we go. It's done. 1109 00:42:03,740 --> 00:42:04,180 Okay. 1110 00:42:04,280 --> 00:42:06,560 So we're left with the disassembled code 1111 00:42:06,560 --> 00:42:08,220 in this directory that we can look at. 1112 00:42:08,480 --> 00:42:10,220 That's the source file right here. 1113 00:42:12,500 --> 00:42:14,140 Now we're going to go into the method 1114 00:42:14,140 --> 00:42:15,140 that you would use to 1115 00:42:15,140 --> 00:42:16,980 view this application's code. 1116 00:42:18,200 --> 00:42:19,340 The first thing is 1117 00:42:19,340 --> 00:42:20,500 you have to take 1118 00:42:20,500 --> 00:42:22,120 a Palm Pilot application 1119 00:42:22,120 --> 00:42:23,620 and divide it into its resources. 1120 00:42:24,480 --> 00:42:26,620 So you go ahead and go back to your MS-DOS prompt 1121 00:42:26,620 --> 00:42:28,300 and use PRC2bin 1122 00:42:28,300 --> 00:42:30,160 which lets you separate out 1123 00:42:30,160 --> 00:42:32,500 the resources that you see in your Palm Pilot. 1124 00:42:32,980 --> 00:42:34,260 And you use LaunchUp. 1125 00:42:37,440 --> 00:42:38,220 And it just 1126 00:42:38,220 --> 00:42:40,180 extracts an entire text file 1127 00:42:40,680 --> 00:42:42,540 of all the resources inside your Palm. 1128 00:42:42,640 --> 00:42:43,380 So now you can see 1129 00:42:44,780 --> 00:42:46,400 we have here alerts 1130 00:42:46,400 --> 00:42:47,380 in this section. 1131 00:42:48,320 --> 00:42:50,420 We have bitmaps 1132 00:42:50,420 --> 00:42:52,400 in this section and then we also have forms 1133 00:42:52,400 --> 00:42:54,020 and strings that make up the application. 1134 00:42:56,160 --> 00:42:58,240 So what you would normally do in this application 1135 00:42:58,240 --> 00:43:00,440 is you'd search it for the form 1136 00:43:00,440 --> 00:43:01,300 that's your about. 1137 00:43:01,820 --> 00:43:04,120 The about nag is number 270. 1138 00:43:06,300 --> 00:43:08,140 Everything in the Palm Pilot is 1139 00:43:08,140 --> 00:43:10,280 very specific, very documented, 1140 00:43:10,400 --> 00:43:11,820 very viewable, and very public. 1141 00:43:11,940 --> 00:43:14,400 Which makes it an easy platform to learn to program on. 1142 00:43:15,980 --> 00:43:18,380 So we'll look at alert number 270 here. 1143 00:43:19,180 --> 00:43:20,600 Which is this one at the top. 1144 00:43:22,720 --> 00:43:23,880 We'll use UltraEdit. 1145 00:43:24,480 --> 00:43:25,260 Highly recommended. 1146 00:43:26,060 --> 00:43:28,060 And we'll see that this is exactly 1147 00:43:28,060 --> 00:43:29,200 what we saw on our screen. 1148 00:43:29,660 --> 00:43:32,080 LaunchUp demo. Welcome to the demo of LaunchUp. 1149 00:43:32,160 --> 00:43:34,540 If you like LaunchUp, you can purchase it 1150 00:43:34,540 --> 00:43:35,140 at Syn Solutions. 1151 00:43:36,040 --> 00:43:37,440 That's the way the Palm Pilot works. 1152 00:43:37,560 --> 00:43:39,260 Everything is embedded in the PRC file 1153 00:43:39,260 --> 00:43:40,360 and everything can be extracted. 1154 00:43:43,040 --> 00:43:44,460 In the interest of time, 1155 00:43:44,640 --> 00:43:46,060 you search the application 1156 00:43:46,060 --> 00:43:46,780 for that. 1157 00:43:47,220 --> 00:43:49,380 The application, you can actually see 1158 00:43:49,380 --> 00:43:51,480 that it occurs at address 376A. 1159 00:43:51,940 --> 00:43:54,120 You can actually see that it shows the form 1160 00:43:54,480 --> 00:43:55,180 and uses a knit form 1161 00:43:55,180 --> 00:43:56,520 to display the about. 1162 00:43:56,820 --> 00:43:59,380 It actually displays the alert in the same manner. 1163 00:43:59,640 --> 00:44:00,800 And you can skip the nag 1164 00:44:00,800 --> 00:44:03,360 and you can modify one byte to do that. 1165 00:44:04,560 --> 00:44:06,360 This is a good commercial application 1166 00:44:06,360 --> 00:44:07,420 like I emphasized. 1167 00:44:08,060 --> 00:44:09,760 That's very simple protection 1168 00:44:09,760 --> 00:44:10,740 for your Palm Pilot. 1169 00:44:12,240 --> 00:44:13,660 There's an intermediate protection 1170 00:44:13,660 --> 00:44:14,800 for your Palm Pilot. 1171 00:44:14,940 --> 00:44:16,560 I'll also point this out as an example. 1172 00:44:17,100 --> 00:44:19,080 HiNote uses a great protection scheme. 1173 00:44:19,320 --> 00:44:21,220 It doesn't slow down your Palm Pilot. 1174 00:44:21,300 --> 00:44:22,440 It doesn't slow down application. 1175 00:44:24,660 --> 00:44:26,180 It has a three-section key 1176 00:44:26,180 --> 00:44:28,600 and it not only checks it 1177 00:44:28,600 --> 00:44:29,540 during the registration, 1178 00:44:29,880 --> 00:44:32,120 it also checks it midway through using the program 1179 00:44:32,120 --> 00:44:33,420 and forbids you from using it 1180 00:44:33,420 --> 00:44:34,900 if there's not the letter H 1181 00:44:34,900 --> 00:44:37,620 at this one particular place inside your code. 1182 00:44:37,880 --> 00:44:39,560 That to me is a good example 1183 00:44:40,380 --> 00:44:42,100 of the balance between 1184 00:44:42,100 --> 00:44:44,120 the sophistication of the protection 1185 00:44:44,120 --> 00:44:45,520 and the simplicity of the protection 1186 00:44:45,520 --> 00:44:47,960 and the fact that we like our programs 1187 00:44:47,960 --> 00:44:48,600 to run quickly. 1188 00:44:51,700 --> 00:44:54,120 It's by a company called Cyclos. 1189 00:44:54,480 --> 00:44:55,320 It's a great application. 1190 00:44:55,500 --> 00:44:56,900 It's an alternative to BrainFarce 1191 00:44:56,900 --> 00:44:59,100 that lets you put text and pictures 1192 00:44:59,100 --> 00:45:00,720 into the same outlines that you do. 1193 00:45:01,140 --> 00:45:02,240 It has a nag. 1194 00:45:02,300 --> 00:45:03,140 It asks you to register. 1195 00:45:03,380 --> 00:45:04,880 If you register bad, 1196 00:45:05,140 --> 00:45:06,520 it tells you invalid entry. 1197 00:45:06,820 --> 00:45:10,080 It has the invalid entry alert inside of it. 1198 00:45:10,220 --> 00:45:13,100 It also has a form that you see at startup 1199 00:45:13,100 --> 00:45:14,560 and it also has a registration form. 1200 00:45:15,580 --> 00:45:16,420 Like I mentioned, 1201 00:45:16,480 --> 00:45:17,880 this is a very smart protection. 1202 00:45:18,840 --> 00:45:20,200 You take your key in 1203 00:45:20,200 --> 00:45:21,840 and about eight lines later 1204 00:45:21,840 --> 00:45:24,000 it says, oh, CRC16 1205 00:45:24,000 --> 00:45:26,440 calc block. Let's see if the two codes match. 1206 00:45:26,760 --> 00:45:27,660 It says yes. 1207 00:45:27,820 --> 00:45:30,300 It's only actually checking the first segment of your code 1208 00:45:30,300 --> 00:45:32,320 until later when you try to run the program 1209 00:45:32,320 --> 00:45:34,380 and it actually checks the second segment. 1210 00:45:34,520 --> 00:45:36,440 It won't let you create any new items 1211 00:45:36,440 --> 00:45:38,460 if your code's not proper. 1212 00:45:38,780 --> 00:45:39,240 So basically, 1213 00:45:39,880 --> 00:45:42,280 in terms of preventing people 1214 00:45:42,280 --> 00:45:43,480 from cracking the application 1215 00:45:43,480 --> 00:45:45,760 and matching the security and the functionality 1216 00:45:45,760 --> 00:45:46,820 of Shareware with it, 1217 00:45:47,960 --> 00:45:50,060 this actually is a good protection because people think 1218 00:45:50,200 --> 00:45:51,040 they've patched it, 1219 00:45:51,100 --> 00:45:52,680 suddenly the thing doesn't work. 1220 00:45:52,940 --> 00:45:53,820 They think it's ruined. 1221 00:45:54,460 --> 00:45:58,700 It's quite effective to obfuscate 1222 00:45:58,700 --> 00:45:59,740 actually your code 1223 00:45:59,740 --> 00:46:01,120 and the intent of it. 1224 00:46:01,540 --> 00:46:03,020 I want to go over protection ideas. 1225 00:46:03,660 --> 00:46:05,760 There's a trade-off between complexity and speed 1226 00:46:05,760 --> 00:46:06,800 which I've been talking about. 1227 00:46:07,600 --> 00:46:09,560 Palm Pilot programs need good protection. 1228 00:46:09,860 --> 00:46:11,560 They don't need protection like 1229 00:46:12,200 --> 00:46:13,700 Liberty is, which actually 1230 00:46:14,060 --> 00:46:15,480 prevents you from running the program 1231 00:46:15,480 --> 00:46:16,220 at its peak need. 1232 00:46:18,580 --> 00:46:19,920 To give you an example 1233 00:46:20,200 --> 00:46:20,920 of the way Liberty, 1234 00:46:21,120 --> 00:46:23,120 the Palm Pilot Game Boy emulator, 1235 00:46:23,240 --> 00:46:23,560 is protected, 1236 00:46:24,260 --> 00:46:26,440 it uses seven code segments. 1237 00:46:26,720 --> 00:46:29,780 It uses four encrypted segments. 1238 00:46:30,040 --> 00:46:32,240 It encrypts it against its own key database. 1239 00:46:32,680 --> 00:46:33,400 And then, 1240 00:46:33,520 --> 00:46:35,100 just to prevent you from doing 1241 00:46:35,100 --> 00:46:37,260 what we've just done up here on screen 1242 00:46:37,260 --> 00:46:38,740 and disassembling it, 1243 00:46:38,840 --> 00:46:41,380 it actually uses an illegal instruction 1244 00:46:42,020 --> 00:46:43,060 by 3Com, 1245 00:46:43,220 --> 00:46:43,940 a two-byte instruction, 1246 00:46:44,320 --> 00:46:46,040 to prevent you from disassembling it. 1247 00:46:46,500 --> 00:46:49,960 But it uses it 1100 times 1248 00:46:50,200 --> 00:46:51,060 inside of its code. 1249 00:46:51,500 --> 00:46:52,740 So you can imagine the heft 1250 00:46:52,740 --> 00:46:54,040 that it's added to the application 1251 00:46:54,040 --> 00:46:56,920 and to the actual function of it. 1252 00:46:59,260 --> 00:47:00,740 Future exploits for the Palm Pilot. 1253 00:47:00,860 --> 00:47:01,820 Things to watch out for. 1254 00:47:02,140 --> 00:47:03,060 This is nice. 1255 00:47:03,660 --> 00:47:04,840 This is from the 3Com website. 1256 00:47:05,180 --> 00:47:06,100 I thought it was good because 1257 00:47:06,100 --> 00:47:07,320 it's like we've all graduated. 1258 00:47:09,620 --> 00:47:11,600 People will exploit conduits. 1259 00:47:11,640 --> 00:47:12,900 Anyone can write a conduit. 1260 00:47:12,980 --> 00:47:14,920 A conduit sits in your hot sink 1261 00:47:14,920 --> 00:47:17,520 and it coordinates data from your Palm Pilot 1262 00:47:17,520 --> 00:47:19,320 to any executable. 1263 00:47:20,200 --> 00:47:20,500 Anything. 1264 00:47:20,720 --> 00:47:22,060 You can write any executable. 1265 00:47:22,180 --> 00:47:24,940 If you use Pocket Quicken 1266 00:47:24,940 --> 00:47:26,560 or if you use Ultra Soft Money, 1267 00:47:26,740 --> 00:47:27,480 that's what it does. 1268 00:47:27,700 --> 00:47:29,260 It puts a custom conduit in there. 1269 00:47:29,340 --> 00:47:30,600 When you hot sink your Palm Pilot, 1270 00:47:30,760 --> 00:47:32,960 it transfers that information to its executable 1271 00:47:32,960 --> 00:47:34,320 and it writes it to a database. 1272 00:47:34,560 --> 00:47:35,900 In the case of Ultra Soft Money, 1273 00:47:36,040 --> 00:47:37,720 it writes it to your Microsoft Money database. 1274 00:47:39,400 --> 00:47:41,160 A conduit is an executable 1275 00:47:41,160 --> 00:47:43,120 that translates or alters Palm databases 1276 00:47:43,120 --> 00:47:43,900 during hot sink. 1277 00:47:44,900 --> 00:47:47,640 When you install a conduit, it doesn't ask you. 1278 00:47:50,200 --> 00:47:50,920 It writes it into your hot sink. 1279 00:47:51,400 --> 00:47:53,460 It adds the DLL to your Palm directory 1280 00:47:53,460 --> 00:47:54,600 and makes a registry entry 1281 00:47:54,600 --> 00:47:57,700 and uses what's called the Notifier DLL 1282 00:47:57,980 --> 00:47:59,060 for conflict resolution. 1283 00:47:59,340 --> 00:48:00,600 This is required by 3Com. 1284 00:48:01,020 --> 00:48:03,360 This is where it actually 1285 00:48:03,360 --> 00:48:05,100 is actually really weak 1286 00:48:05,100 --> 00:48:07,660 in that anyone can reset 1287 00:48:07,660 --> 00:48:10,140 the Notifier DLL part of a conduit 1288 00:48:10,140 --> 00:48:11,700 to make it do anything that it wants. 1289 00:48:11,900 --> 00:48:13,020 You could take that information, 1290 00:48:13,360 --> 00:48:15,440 you could dump it out to CCPIP, 1291 00:48:15,720 --> 00:48:18,180 you could put an email in someone's directory 1292 00:48:18,180 --> 00:48:20,180 that sends all of your Palm Pilot information 1293 00:48:20,200 --> 00:48:20,940 to someone. 1294 00:48:21,120 --> 00:48:23,240 It can interact at the system level of Windows, 1295 00:48:23,460 --> 00:48:25,620 so you can make it execute a Visual Basic script 1296 00:48:25,620 --> 00:48:28,140 every time you start up your Internet Explorer window. 1297 00:48:28,560 --> 00:48:29,520 It's dangerous. 1298 00:48:29,880 --> 00:48:31,700 There's absolutely zero 1299 00:48:32,200 --> 00:48:34,120 way to protect against it 1300 00:48:34,120 --> 00:48:35,020 other than being diligent. 1301 00:48:35,180 --> 00:48:36,680 We'll talk about that real quick. 1302 00:48:37,040 --> 00:48:39,420 Write contents to a network location for monitoring. 1303 00:48:41,820 --> 00:48:43,560 Second idea is Trojans. 1304 00:48:43,600 --> 00:48:45,440 Your Palm Pilot, we all love the applications. 1305 00:48:45,700 --> 00:48:46,320 They're all free. 1306 00:48:46,560 --> 00:48:49,360 Palm users will load almost anything 1307 00:48:50,200 --> 00:48:51,780 that's free on their Palm Pilots. 1308 00:48:52,200 --> 00:48:53,640 Little dancing bugs 1309 00:48:53,640 --> 00:48:55,660 and taxi cabs and everything else 1310 00:48:55,660 --> 00:48:56,300 you can imagine. 1311 00:48:57,140 --> 00:48:59,960 If you have Hack Master on your machine, 1312 00:49:00,380 --> 00:49:02,260 every time you reset your Palm Pilot 1313 00:49:02,260 --> 00:49:03,280 it reloads all your hacks. 1314 00:49:04,180 --> 00:49:06,280 Everything hooks in at the system level. 1315 00:49:06,780 --> 00:49:07,640 So basically, 1316 00:49:07,760 --> 00:49:10,080 if you hot sync and you tell 1317 00:49:10,080 --> 00:49:11,520 the Palm Pilot that it needs to reset 1318 00:49:11,520 --> 00:49:13,760 after hot sync and then you reset it, 1319 00:49:13,900 --> 00:49:16,040 whatever you've just put in is loaded in your Palm 1320 00:49:16,040 --> 00:49:17,920 and working at the system level. 1321 00:49:18,980 --> 00:49:20,180 You can alter the 1322 00:49:20,200 --> 00:49:21,320 built-in database types, 1323 00:49:21,460 --> 00:49:22,960 which is published in the SDK. 1324 00:49:23,540 --> 00:49:25,760 And you can put custom keys in there 1325 00:49:25,760 --> 00:49:28,220 to track information that people don't see 1326 00:49:28,220 --> 00:49:29,480 because the PDB files 1327 00:49:29,480 --> 00:49:30,940 are only viewable by 1328 00:49:30,940 --> 00:49:33,480 the exact routine inside the PRC file. 1329 00:49:33,740 --> 00:49:35,660 So you can store anything you want in there. 1330 00:49:35,860 --> 00:49:37,540 That's a great idea if you guys 1331 00:49:37,540 --> 00:49:39,060 want to really protect your information 1332 00:49:39,060 --> 00:49:41,840 is to write raw data to a PDB database. 1333 00:49:42,780 --> 00:49:44,240 And you can store your data 1334 00:49:44,240 --> 00:49:45,160 in someone else's Palm. 1335 00:49:45,400 --> 00:49:47,400 Every database is linked by a creator ID. 1336 00:49:47,600 --> 00:49:49,040 Every time you synchronize, 1337 00:49:50,200 --> 00:49:51,300 that information is shared 1338 00:49:51,980 --> 00:49:53,400 with the hot sync application. 1339 00:49:53,740 --> 00:49:56,060 So you can grab a creator ID 1340 00:49:56,060 --> 00:49:57,000 off another application, 1341 00:49:57,320 --> 00:49:58,800 put it on your custom database, 1342 00:49:59,140 --> 00:50:00,600 write anything you want to that database, 1343 00:50:00,820 --> 00:50:02,160 and when you synchronize next time, 1344 00:50:02,180 --> 00:50:03,600 it will be available to you on the computer. 1345 00:50:04,580 --> 00:50:06,280 These are how you protect yourself. 1346 00:50:06,660 --> 00:50:07,820 Turn your beam off. 1347 00:50:08,220 --> 00:50:09,540 It's not going to happen now. 1348 00:50:09,660 --> 00:50:10,900 It may not happen next month, 1349 00:50:10,960 --> 00:50:13,680 but it will happen soon that someone will take advantage of that. 1350 00:50:14,020 --> 00:50:16,120 And you can imagine walking around DEF CON 1351 00:50:16,120 --> 00:50:18,540 and walking around and all of a sudden everyone's Palm Pilots 1352 00:50:20,200 --> 00:50:21,380 hiding his face in the corner. 1353 00:50:23,380 --> 00:50:24,920 Monitor your hot sync log. 1354 00:50:25,280 --> 00:50:26,180 All you have to do 1355 00:50:26,180 --> 00:50:27,540 to monitor your hot sync log 1356 00:50:28,120 --> 00:50:29,180 is go to 1357 00:50:29,180 --> 00:50:31,080 I won't be able to get it up with the presentation 1358 00:50:31,080 --> 00:50:33,060 is to right click on your hot sync 1359 00:50:33,060 --> 00:50:34,080 and say view log. 1360 00:50:34,400 --> 00:50:36,880 Make sure that nothing's being installed in your directory. 1361 00:50:38,440 --> 00:50:39,860 You can test your applications 1362 00:50:39,860 --> 00:50:41,960 by using it on the Palm emulator. 1363 00:50:42,320 --> 00:50:43,280 Anyone can get that. 1364 00:50:43,340 --> 00:50:44,440 Go to 3Com's site. 1365 00:50:44,580 --> 00:50:45,680 Search for POSC. 1366 00:50:46,160 --> 00:50:48,280 And you should check your hot sync properties 1367 00:50:50,200 --> 00:50:51,100 for rogue conduits. 1368 00:50:51,540 --> 00:50:54,020 Conduits, again, can pass any information anywhere. 1369 00:50:54,360 --> 00:50:56,160 They pass to a Windows executable. 1370 00:50:57,760 --> 00:50:58,760 In the future, 1371 00:50:59,540 --> 00:51:02,020 you're going to see Palm viruses 1372 00:51:02,020 --> 00:51:03,860 which will actually be Trojans 1373 00:51:03,860 --> 00:51:05,160 and which will be taking information 1374 00:51:05,160 --> 00:51:07,640 and transporting around using conduits 1375 00:51:07,640 --> 00:51:10,520 and using the hot sync vulnerabilities. 1376 00:51:11,360 --> 00:51:12,180 Symantec has 1377 00:51:12,180 --> 00:51:13,540 a Palm virus protection 1378 00:51:13,540 --> 00:51:15,420 that they were supposed to release a month ago. 1379 00:51:16,460 --> 00:51:17,820 I've seen a beta of it. 1380 00:51:17,880 --> 00:51:19,520 It's not out yet, but it's really nice. 1381 00:51:20,200 --> 00:51:21,440 You can actually watch what's being hot synced 1382 00:51:21,440 --> 00:51:23,060 back and forth between your Palm. 1383 00:51:23,240 --> 00:51:25,260 It lets you authorize conduits 1384 00:51:25,260 --> 00:51:26,260 that are to be hot synced. 1385 00:51:27,260 --> 00:51:28,480 If you want to write up this, 1386 00:51:29,640 --> 00:51:31,220 some of the programs we've talked about 1387 00:51:31,220 --> 00:51:32,640 like Pilot Disassembler, 1388 00:51:32,700 --> 00:51:33,880 which is a free disassembler, 1389 00:51:34,020 --> 00:51:36,100 are available here at this website. 1390 00:51:37,400 --> 00:51:38,980 Thank you guys very, very much 1391 00:51:38,980 --> 00:51:39,620 for sitting in this. 1392 00:51:39,720 --> 00:51:41,980 I want to take questions for about 3 minutes 1393 00:51:42,460 --> 00:51:43,800 if anyone has any 1394 00:51:43,800 --> 00:51:45,660 and go over some of the different Palm aspects. 1395 00:51:45,780 --> 00:51:46,100 Yes, sir? 1396 00:51:50,200 --> 00:51:52,660 It will be on the DEFCON site 1397 00:51:52,660 --> 00:51:54,280 and it will also be here 1398 00:51:54,280 --> 00:51:55,820 later this evening. 1399 00:51:55,980 --> 00:51:57,080 You'll be able to get it tomorrow morning 1400 00:51:57,080 --> 00:51:57,680 if you want to get it. 1401 00:51:58,020 --> 00:52:02,200 I recommend using 1402 00:52:02,200 --> 00:52:04,120 a program called JAWS Memo. 1403 00:52:04,260 --> 00:52:08,940 It's 4,096-bit encryption. 1404 00:52:10,080 --> 00:52:11,760 I also tend to be 1405 00:52:11,760 --> 00:52:12,580 and Bruce and I 1406 00:52:12,580 --> 00:52:13,400 talked the other day 1407 00:52:13,400 --> 00:52:14,920 a fan of Blowfish encryption. 1408 00:52:15,760 --> 00:52:16,680 You can use 1409 00:52:17,500 --> 00:52:18,780 what's the name of the application? 1410 00:52:19,360 --> 00:52:20,120 I don't know. 1411 00:52:21,940 --> 00:52:22,500 CryptPad, 1412 00:52:22,800 --> 00:52:24,120 which actually is an encrypted 1413 00:52:24,120 --> 00:52:25,860 memo pad that uses Blowfish encryption. 1414 00:52:26,280 --> 00:52:27,400 Both of them are really good. 1415 00:52:27,980 --> 00:52:29,840 Don't choose something like SAM, 1416 00:52:30,160 --> 00:52:32,000 which is by 1417 00:52:32,000 --> 00:52:33,280 a Switch developer. 1418 00:52:33,420 --> 00:52:35,480 It can use up to a one-bit key. 1419 00:52:35,840 --> 00:52:36,400 So you're thinking, 1420 00:52:36,540 --> 00:52:39,620 I want one byte to protect my information. 1421 00:52:39,900 --> 00:52:41,220 I recommend something stronger 1422 00:52:41,220 --> 00:52:42,220 like the Blowfish encryption. 1423 00:52:43,100 --> 00:52:44,120 Any other questions? 1424 00:52:45,200 --> 00:52:47,020 Thank you guys very, very much 1425 00:52:47,020 --> 00:52:49,140 and have a good day. Look for the information up there. 1426 00:52:50,220 --> 00:52:50,520 Thank you.