LanSchool Keylogger Vulnerability
Henry Y, Aaron D, Thomas D
Update 2/2/2010
We finally had some time to work on this update. The new decryption tables are now in the uploader and are posted below. We now have two tables, one for 7.4.1.4 and one for older versions. Click the show table link above the table to change versions.
Update 1/15/2010
LanSchool released a patch in version 7.4.1.4 that changed the encryption slightly. So far, we have confirmed that they modified which values are mapped to which characters, but everything else seems to be the same. Thus, the table below is now incorrect for version 7.4.1.4, but the information should still be fine.
The network monitoring program LanSchool is often used to keep an eye on students, similar to other programs like Vision6 and SynchronEyes. It has features such as remote control (local user loses all control), task manager disabling, port 80 blocking, and keylogging. The keylogger, which stores its information on the computer from which the data is captured, is especially vulnerable to exploitation, as it may contain passwords and other sensitive data that people may have typed on the computer.
The LanSchool keylogger stores its data in a file called 'lskdata.bin' encrypted with a slightly modified substitution cipher. Every key can have one of four possible single byte values based on the byte's absolute position in the file, mod 4. For example, if the letter 'a' was encoded at position 739, its value would be 106, because this is the value for 'a' at position 3 (739 % 4 = 3). Clearly, by typing four consecutive characters of 'a' and reading the output, one would have enough information to consistently decode this letter. This technique was used to generate the table of character-value associations.
Reading in one of the files using these tables to automatically look up each character was very successful.
If one holds down the shift key and presses multiple letters, LanSchool seems to only record the first letter as capitalized. This may be a bug in their code, or it may suggest a lack of complete understanding of the system, but this means that capital letters typed in succession may not be read correctly (e.g., "ABCdEF" might be read as "AbcdEf").
Further, LanSchool only stores the last 50,000 key presses. The information would have to be gathered and merged periodically to maintain a full record. However, to quote the LanSchool website (lanschool.com) this is “weeks of keystrokes.”
| LanSchool Version 7.4.1.4 | |||||
|---|---|---|---|---|---|
| Letter | POS % 4 | ||||
| % = 0 | % = 1 | % = 2 | % = 3 | ||
| a | 41 | 99 | 128 | 103 | |
| b | 42 | 96 | 131 | 100 | |
| c | 43 | 97 | 130 | 101 | |
| d | 44 | 102 | 133 | 98 | |
| e | 45 | 103 | 132 | 99 | |
| f | 46 | 100 | 135 | 96 | |
| g | 47 | 101 | 134 | 97 | |
| h | 32 | 106 | 137 | 110 | |
| i | 33 | 107 | 136 | 111 | |
| j | 34 | 104 | 139 | 108 | |
| k | 35 | 105 | 138 | 109 | |
| l | 36 | 110 | 141 | 106 | |
| m | 37 | 111 | 140 | 107 | |
| n | 38 | 108 | 143 | 104 | |
| o | 39 | 109 | 142 | 105 | |
| p | 56 | 114 | 145 | 118 | |
| q | 57 | 115 | 144 | 119 | |
| r | 58 | 112 | 147 | 116 | |
| s | 59 | 113 | 146 | 117 | |
| t | 60 | 118 | 149 | 114 | |
| u | 61 | 119 | 148 | 115 | |
| v | 62 | 116 | 151 | 112 | |
| w | 63 | 117 | 150 | 113 | |
| x | 48 | 122 | 153 | 126 | |
| y | 49 | 123 | 152 | 127 | |
| z | 50 | 120 | 155 | 124 | |
| 0 | 120 | 50 | 209 | 54 | |
| 1 | 121 | 51 | 208 | 55 | |
| 2 | 122 | 48 | 211 | 52 | |
| 3 | 123 | 49 | 210 | 53 | |
| 4 | 124 | 54 | 213 | 50 | |
| 5 | 125 | 55 | 212 | 51 | |
| 6 | 126 | 52 | 215 | 48 | |
| 7 | 127 | 53 | 214 | 49 | |
| 8 | 112 | 58 | 217 | 62 | |
| 9 | 113 | 59 | 216 | 63 | |
| (space) | 104 | 34 | 193 | 38 | |
| [ | 19 | 89 | 186 | 93 | |
| ] | 21 | 95 | 188 | 91 | |
| \ | 20 | 94 | 189 | 90 | |
| ; | 115 | 57 | 218 | 61 | |
| '' | 111 | 37 | 198 | 33 | |
| , | 100 | 46 | 205 | 42 | |
| . | 102 | 44 | 207 | 40 | |
| / | 103 | 45 | 206 | 41 | |
| A | 9 | 67 | 160 | 71 | |
| B | 10 | 64 | 163 | 68 | |
| C | 11 | 65 | 162 | 69 | |
| D | 12 | 70 | 165 | 66 | |
| E | 13 | 71 | 164 | 67 | |
| F | 14 | 68 | 167 | 64 | |
| G | 15 | 69 | 166 | 65 | |
| H | 0 | 74 | 169 | 78 | |
| I | 1 | 75 | 168 | 79 | |
| J | 2 | 72 | 171 | 76 | |
| K | 3 | 73 | 170 | 77 | |
| L | 4 | 78 | 173 | 74 | |
| M | 5 | 79 | 172 | 75 | |
| N | 6 | 76 | 175 | 72 | |
| O | 7 | 77 | 174 | 73 | |
| P | 24 | 82 | 177 | 86 | |
| Q | 25 | 83 | 176 | 87 | |
| R | 26 | 80 | 179 | 84 | |
| S | 27 | 81 | 178 | 85 | |
| T | 28 | 86 | 181 | 82 | |
| U | 29 | 87 | 180 | 83 | |
| V | 30 | 84 | 183 | 80 | |
| W | 31 | 85 | 182 | 81 | |
| X | 16 | 90 | 185 | 94 | |
| Y | 17 | 91 | 184 | 95 | |
| Z | 18 | 88 | 187 | 92 | |
| ! | 105 | 35 | 192 | 39 | |
| @ | 8 | 66 | 161 | 70 | |
| # | 107 | 33 | 194 | 37 | |
| $ | 108 | 38 | 197 | 34 | |
| % | 109 | 39 | 196 | 35 | |
| ^ | 22 | 92 | 191 | 88 | |
| & | 110 | 36 | 199 | 32 | |
| * | 98 | 40 | 203 | 44 | |
| ( | 96 | 42 | 201 | 46 | |
| ) | 97 | 43 | 200 | 47 | |
| _ | 23 | 93 | 190 | 89 | |
| + | 99 | 41 | 202 | 45 | |
| - | 101 | 47 | 204 | 43 | |
| = | 117 | 63 | 220 | 59 | |
| { | 51 | 121 | 154 | 125 | |
| } | 53 | 127 | 156 | 123 | |
| | | 52 | 126 | 157 | 122 | |
| : | 114 | 56 | 219 | 60 | |
| " | 106 | 32 | 195 | 36 | |
| < | 116 | 62 | 221 | 58 | |
| > | 118 | 60 | 223 | 56 | |
| ? | 119 | 61 | 222 | 57 | |