Some Interesting Notes regarding System Attributes Storage on the RSTS/E Filesystem

Here are sectors 4 and 5 (counting from zero, naturally) of a RSTS/E filesystem. Don't worry that you have to memorize this, just skim over it a bit. We're going to take a look at these blocks through several different lenses. You'll notice right away that some numbers are red and some are blue. These are particularly interesting for reasons discussed below.

Following long-standing PDP-11 tradition, we'll render this as 16-bit words, in octal:

0004000 000020 177777 000000 000000 000020 044000 147052 053600
0004020 000060 000401 075273 076725 036160 000000 000040 000001
0004040 000001 000000 000007 000000 000000 000000 000000 000020
0004060 000120 000001 147052 053600 036160 000000 000100 000005
0004100 000001 000000 000000 000000 000000 000000 000000 000020
0004120 000200 000402 075273 076725 036160 000000 000140 000701
0004140 000001 003374 002535 041714 000000 000000 000000 000020
0004160 000261 015765 000266 022062 000577 071620 000000 000020
0004200 000320 075273 046152 057642 024000 000000 000160 000220
0004220 000240 001501 001635 001641 001645 003145 003151 003155
0004240 000000 003161 003165 003171 003175 004075 000000 000000
0004260 000001 000001 001000 000000 000266 000000 000266 000770
0004300 000401 022062 000231 022062 000630 071620 000000 000020
0004320 000440 071620 050553 074324 024000 000000 000300 000340
0004340 000360 003201 003205 003211 003215 003221 003225 003231
0004360 000000 003235 003241 003245 000000 000000 000000 000000
0004400 000001 000001 001000 000000 000231 000000 000231 000516
0004420 000001 015765 000317 022056 000744 071620 000000 000020
0004440 000540 012710 012445 057642 024000 000000 000420 000460
0004460 000500 003251 003255 003261 003265 003271 003275 003301
0004500 000000 003305 003311 003315 003321 004101 004121 000000
0004520 000561 015765 000011 015765 000271 131574 071620 000020
0004540 000640 057164 000000 057032 024000 000000 000520 000600
0004560 000001 001002 000052 000000 000011 000000 000011 000326
0004600 000000 004005 000000 000000 000000 000000 000000 000000
0004620 000001 000000 000000 000000 000000 000000 000000 000020
0004640 000700 000403 075273 076725 036160 000000 000620 004611
0004660 000001 000000 000000 000000 000000 000000 000000 000020
0004700 000740 000404 075273 076725 036160 000000 000660 005445
0004720 000001 000000 000000 000000 000000 000000 000000 000020
0004740 010020 000405 075273 076725 036160 000000 000720 005215
0004760 000020 000001 000000 000000 000000 000000 000000 000000
0005000 000001 000000 000000 000000 000000 000000 000000 000020
0005020 010120 000406 075273 076725 036160 000000 010000 005151
0005040 000001 000001 000042 000015 000000 000000 000764 000020
0005060 010160 062144 027415 074740 036160 000000 010040 000000
0005100 000001 000000 000000 000000 000000 000000 000000 000020
0005120 010220 000412 006254 026232 036160 000000 010100 000000
0005140 000001 000004 000012 000064 000000 000000 000000 000020
0005160 000000 001002 075273 076725 036160 000000 010140 001371
0005200 000001 000003 000062 000032 000000 000000 000000 000020
0005220 010260 001001 075273 076725 036160 000000 010200 000000
0005240 000001 000000 000001 000000 000000 000000 000000 000020
0005260 010360 002000 006254 026232 036160 000000 010240 001411
0005300 000000 000000 000000 000000 000000 000000 000000 000000
0005320 000000 000000 000000 000000 000000 000000 000000 000000
0005340 000001 000002 004760 000032 000000 000000 000000 000020
0005360 010420 002004 006254 026232 036160 000000 010340 000000
0005400 000001 000000 000000 000000 000000 000000 000000 000020
0005400 000001 000000 000000 000000 000000 000000 000000 000020
0005420 010460 175372 076733 076400 036160 000000 010400 000000
0005440 000001 000011 000022 000103 000001 000000 000000 000020
0005460 010520 175001 076733 076400 036160 000000 010440 000665
0005500 000001 000003 000033 000055 000003 000000 000000 000020
0005520 010060 175000 076733 076400 036160 000000 010500 000000
0005540 000000 000000 000000 000000 000000 000000 000000 000000
0005560 000000 000000 000000 000000 000000 000000 000000 000000
0005600 000000 000000 000000 000000 000000 000000 000000 000000
0005620 000000 000000 000000 000000 000000 000000 000000 000000
0005640 000000 000000 000000 000000 000000 000000 000000 000000
0005660 000000 000000 000000 000000 000000 000000 000000 000000
0005700 000000 000000 000000 000000 000000 000000 000000 000000
0005720 000000 000000 000000 000000 000000 000000 000000 000000
0005740 000000 000000 000000 000000 000000 000000 000000 000000
0005760 000020 000001 000000 000000 000000 000000 000000 000000
0006000

Here it is again, in hexadecimal (for today's more sophisticated palates):

0004000 0010 ffff 0000 0000 0010 4800 ce2a 5780
0004020 0030 0101 7abb 7dd5 3c70 0000 0020 0001
0004040 0001 0000 0007 0000 0000 0000 0000 0010
0004060 0050 0001 ce2a 5780 3c70 0000 0040 0005
0004100 0001 0000 0000 0000 0000 0000 0000 0010
0004120 0080 0102 7abb 7dd5 3c70 0000 0060 01c1
0004140 0001 06fc 055d 43cc 0000 0000 0000 0010
0004160 00b1 1bf5 00b6 2432 017f 7390 0000 0010
0004200 00d0 7abb 4c6a 5fa2 2800 0000 0070 0090
0004220 00a0 0341 039d 03a1 03a5 0665 0669 066d
0004240 0000 0671 0675 0679 067d 083d 0000 0000
0004260 0001 0001 0200 0000 00b6 0000 00b6 01f8
0004300 0101 2432 0099 2432 0198 7390 0000 0010
0004320 0120 7390 516b 78d4 2800 0000 00c0 00e0
0004340 00f0 0681 0685 0689 068d 0691 0695 0699
0004360 0000 069d 06a1 06a5 0000 0000 0000 0000
0004400 0001 0001 0200 0000 0099 0000 0099 014e
0004420 0001 1bf5 00cf 242e 01e4 7390 0000 0010
0004440 0160 15c8 1525 5fa2 2800 0000 0110 0130
0004460 0140 06a9 06ad 06b1 06b5 06b9 06bd 06c1
0004500 0000 06c5 06c9 06cd 06d1 0841 0851 0000
0004520 0171 1bf5 0009 1bf5 00b9 b37c 7390 0010
0004540 01a0 5e74 0000 5e1a 2800 0000 0150 0180
0004560 0001 0202 002a 0000 0009 0000 0009 00d6
0004600 0000 0805 0000 0000 0000 0000 0000 0000
0004620 0001 0000 0000 0000 0000 0000 0000 0010
0004640 01c0 0103 7abb 7dd5 3c70 0000 0190 0989
0004660 0001 0000 0000 0000 0000 0000 0000 0010
0004700 01e0 0104 7abb 7dd5 3c70 0000 01b0 0b25
0004720 0001 0000 0000 0000 0000 0000 0000 0010
0004740 1010 0105 7abb 7dd5 3c70 0000 01d0 0a8d
0004760 0010 0001 0000 0000 0000 0000 0000 0000
0005000 0001 0000 0000 0000 0000 0000 0000 0010
0005020 1050 0106 7abb 7dd5 3c70 0000 1000 0a69
0005040 0001 0001 0022 000d 0000 0000 01f4 0010
0005060 1070 6464 2f0d 79e0 3c70 0000 1020 0000
0005100 0001 0000 0000 0000 0000 0000 0000 0010
0005120 1090 010a 0cac 2c9a 3c70 0000 1040 0000
0005140 0001 0004 000a 0034 0000 0000 0000 0010
0005160 0000 0202 7abb 7dd5 3c70 0000 1060 02f9
0005200 0001 0003 0032 001a 0000 0000 0000 0010
0005220 10b0 0201 7abb 7dd5 3c70 0000 1080 0000
0005240 0001 0000 0001 0000 0000 0000 0000 0010
0005260 10f0 0400 0cac 2c9a 3c70 0000 10a0 0309
0005300 0000 0000 0000 0000 0000 0000 0000 0000
0005320 0000 0000 0000 0000 0000 0000 0000 0000
0005340 0001 0002 09f0 001a 0000 0000 0000 0010
0005360 1110 0404 0cac 2c9a 3c70 0000 10e0 0000
0005400 0001 0000 0000 0000 0000 0000 0000 0010
0005420 1130 fafa 7ddb 7d00 3c70 0000 1100 0000
0005440 0001 0009 0012 0043 0001 0000 0000 0010
0005460 1150 fa01 7ddb 7d00 3c70 0000 1120 01b5
0005500 0001 0003 001b 002d 0003 0000 0000 0010
0005520 1030 fa00 7ddb 7d00 3c70 0000 1140 0000
0005540 0000 0000 0000 0000 0000 0000 0000 0000
0005560 0000 0000 0000 0000 0000 0000 0000 0000
0005600 0000 0000 0000 0000 0000 0000 0000 0000
0005620 0000 0000 0000 0000 0000 0000 0000 0000
0005640 0000 0000 0000 0000 0000 0000 0000 0000
0005660 0000 0000 0000 0000 0000 0000 0000 0000
0005700 0000 0000 0000 0000 0000 0000 0000 0000
0005720 0000 0000 0000 0000 0000 0000 0000 0000
0005740 0000 0000 0000 0000 0000 0000 0000 0000
0005760 0010 0001 0000 0000 0000 0000 0000 0000
0006000

And again with some ASCII interpretation where possible:

0004000 020  \0 377 377  \0  \0  \0  \0 020  \0  \0   H   * 316 200   W
0004020   0  \0 001 001 273   z 325   }   p   <  \0  \0      \0 001  \0
0004040 001  \0  \0  \0  \a  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0004060   P  \0 001  \0   * 316 200   W   p   <  \0  \0   @  \0 005  \0
0004100 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0004120 200  \0 002 001 273   z 325   }   p   <  \0  \0   `  \0 301 001
0004140 001  \0 374 006   ] 005 314   C  \0  \0  \0  \0  \0  \0 020  \0
0004160 261  \0 365 033 266  \0   2   $ 177 001 220   s  \0  \0 020  \0
0004200 320  \0 273   z   j   L 242   _  \0   (  \0  \0   p  \0 220  \0
0004220 240  \0   A 003 235 003 241 003 245 003   e 006   i 006   m 006
0004240  \0  \0   q 006   u 006   y 006   } 006   =  \b  \0  \0  \0  \0
0004260 001  \0 001  \0  \0 002  \0  \0 266  \0  \0  \0 266  \0 370 001
0004300 001 001   2   $ 231  \0   2   $ 230 001 220   s  \0  \0 020  \0
0004320     001 220   s   k   Q 324   x  \0   (  \0  \0 300  \0 340  \0
0004340 360  \0 201 006 205 006 211 006 215 006 221 006 225 006 231 006
0004360  \0  \0 235 006 241 006 245 006  \0  \0  \0  \0  \0  \0  \0  \0
0004400 001  \0 001  \0  \0 002  \0  \0 231  \0  \0  \0 231  \0   N 001
0004420 001  \0 365 033 317  \0   .   $ 344 001 220   s  \0  \0 020  \0
0004440   ` 001 310 025   % 025 242   _  \0   (  \0  \0 020 001   0 001
0004460   @ 001 251 006 255 006 261 006 265 006 271 006 275 006 301 006
0004500  \0  \0 305 006 311 006 315 006 321 006   A  \b   Q  \b  \0  \0
0004520   q 001 365 033  \t  \0 365 033 271  \0   | 263 220   s 020  \0
0004540 240 001   t   ^  \0  \0 032   ^  \0   (  \0  \0   P 001 200 001
0004560 001  \0 002 002   *  \0  \0  \0  \t  \0  \0  \0  \t  \0 326  \0
0004600  \0  \0 005  \b  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0004620 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0004640 300 001 003 001 273   z 325   }   p   <  \0  \0 220 001 211  \t
0004660 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0004700 340 001 004 001 273   z 325   }   p   <  \0  \0 260 001   %  \v
0004720 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0004740 020 020 005 001 273   z 325   }   p   <  \0  \0 320 001 215  \n
0004760 020  \0 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005000 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0005020   P 020 006 001 273   z 325   }   p   <  \0  \0  \0 020   i  \n
0005040 001  \0 001  \0   "  \0  \r  \0  \0  \0  \0  \0 364 001 020  \0
0005060   p 020   d   d  \r   / 340   y   p   <  \0  \0     020  \0  \0
0005100 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0005120 220 020  \n 001 254  \f 232   ,   p   <  \0  \0   @ 020  \0  \0
0005140 001  \0 004  \0  \n  \0   4  \0  \0  \0  \0  \0  \0  \0 020  \0
0005160  \0  \0 002 002 273   z 325   }   p   <  \0  \0   ` 020 371 002
0005200 001  \0 003  \0   2  \0 032  \0  \0  \0  \0  \0  \0  \0 020  \0
0005220 260 020 001 002 273   z 325   }   p   <  \0  \0 200 020  \0  \0
0005240 001  \0  \0  \0 001  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0005260 360 020  \0 004 254  \f 232   ,   p   <  \0  \0 240 020  \t 003
0005300  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005320  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005340 001  \0 002  \0 360  \t 032  \0  \0  \0  \0  \0  \0  \0 020  \0
0005360 020 021 004 004 254  \f 232   ,   p   <  \0  \0 340 020  \0  \0
0005400 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0 020  \0
0005420   0 021 372 372 333   }  \0   }   p   <  \0  \0  \0 021  \0  \0
0005440 001  \0  \t  \0 022  \0   C  \0 001  \0  \0  \0  \0  \0 020  \0
0005460   P 021 001 372 333   }  \0   }   p   <  \0  \0     021 265 001
0005500 001  \0 003  \0 033  \0   -  \0 003  \0  \0  \0  \0  \0 020  \0
0005520   0 020  \0 372 333   }  \0   }   p   <  \0  \0   @ 021  \0  \0
0005540  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005560  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005600  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005620  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005640  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005660  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005700  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005720  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005740  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0005760 020  \0 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0006000

Well, that's a nice bit of gobbledygook and no mistake. You're wondering when we're going to get to the point. Well, you've arrived. Well, almost. We need a bit of history.

Old timers will happily tell you how spoiled we are today that we can name our files any old thing we like. They'll let you know how it sucked to be them years ago when they could only have 6 characters in their filenames. Uppercase, naturally. They'll go on about how octal is better than hexadecimal as if the number base mattered a damn. They might not tell you, however, that there were other bases in use besides 8, 10 and 16. They won't tell you about the numbers that were written out in base 40.

It's a system called RADIX-50 (because 50 is octal for 40). RADIX-50 will allow you to store a 6-"digit" number in the 36-bit word of the PDP-10, or a 3-"digit" number in the 16-bit word of the PDP-11. The secret lies in the selection of the digits to represent that base-40 number:

[space]ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789

The '?' in that list stands for an "invalid" RADIX-50 character. Some sites might have used it for a favorite character, but that would be non-standard.

"ABC" would be stored in a 16-bit word as 1*40^2 + 2*40 + 3 or 1683. Oh, wait. That's supposed to be in octal: 1*050^2 + 2*050 + 3 which is 03223. Two 16-bit words would hold a six-character file name, a third word would hold a three-character extension.

So, let's write a quick filter that will take a 16-bit word and render it in base 40 and print the result. (Or you can download one here.) Here are those two disk blocks interpreted as RADIX-50:

0004000   P %8O           P KT2 29R N    AH  FQ SYS TEM IZ2       2   A 
0004040   A       G                   P  B    A 29R N   IZ2      AX   E 
0004100   A                           P  CH  FR SYS TEM IZ2      BP  KI 
0004140   A AD.  4M J36               P  DQ DR7  DV E1Z  IW RSX       P 
0004200  EH SYS LIB OLB FP       B2  CX  D   T3  WE  WI  WM A 7 AAA AAE 
0004240     AAI AAM AAQ AAU AL?           A   A  L2      DV      DV  LX 
0004300  FQ E1Z  C3 E1Z  JH RSX       P  GH RSX MAC SML FP       D2  EX 
0004340  F  AAY AA? AA3 AA7 ABA ABE ABI     ABM ABQ ABU                 
0004400   A   A  L2      C3      C3  HN   A DR7  EG E1V  LD RSX       P 
0004440  H2 CSP COM OLB FP       F2  GX  H  ABY AB? AB3 AB7 ACA ACE ACI 
0004500     ACM ACQ ACU ACY AL3 AMI      II DR7   I DR7  DY ... RSX   P 
0004540  JP ODT     OBJ FP       HP  IX   A  L4  AB       I       I  EN 
0004600     AKM                           A                           P 
0004640  KH  FS SYS TEM IZ2      J  AUA   A                           P 
0004700  L   FT SYS TEM IZ2      J2 A1M   A                           P 
0004740 BV2  FU SYS TEM IZ2      KX A$U   P   A                         
0005000   A                           P BXP  FV SYS TEM IZ2     BVP AZY 
0005040   A   A   4   M          LT   P BYH PBT GUE ST  IZ2     BWH     
0005100   A                           P BZ   FZ BAD GER IZ2     BX      
0005140   A   D   J  AL               P      L4 SYS TEM IZ2     BX2  SA 
0005200   A   C  AJ   Z               P BZ2  L3 SYS TEM IZ2     BYX     
0005240   A       A                   P B.P  YX BAD GER IZ2     BZP  SQ 
0005300                                                                 
0005340   A   B AWX   Z               P B?H  Y. BAD GER IZ2     B.      
0005400   A                           P B0  %FJ TES T   IZ2     B.2     
0005440   A   I   R  A$   A           P B02 % A TES T   IZ2     B?X  J7 
0005500   A   C   $  AE   C           P BWX %   TES T   IZ2     B0P     
0005540                                                                 
0005600                                                                 
0005640                                                                 
0005700                                                                 
0005740                                   P   A                         
0006000

(The % characters in the output reflect the fact that RADIX-50 can only represent numbers up to 63999 = 0174777. Not everything in those sectors are valid RADIX-50 numbers. "%8O" = 65535 = 0177777.)

Now take a look at the words in red. Those aren't filenames; those are passwords! They let you access the account stored in the blue words as a project-programmer number. PPNs don't make much sense in RADIX-50, but you can pick them out pretty easily from the hexadecimal listing.

In RSTS/E, privileged accounts have a project number of 1 and the system administrator usually used [1,2] as the maintenance account. So while it's cool that we have everyone's passwords, to 0wn the box you just need the password to [1,2]. Here we pick out the relevant lines from each dump:

Octal:       0004120 000200  000402  075273  076725  036160  000000  000140  000701 
Hexadecimal: 0004120 0080    0102    7abb    7dd5    3c70    0000    0060    01c1   
ASCII:       0004120 200 \0  002 001 273 z   325 }   p <     \0 \0   ` \0    301 001
RADIX-50:    0004120 " CH"   " FR"   "SYS"   "TEM"   "IZ2"   "   "   " BP"   " KI" 

The hex number 0102 displays the PPN [1,2] quite nicely (and remember the PDP-11 was a little-endian machine which is why 001 and 002 are inverted in the ASCII line). The RADIX-50 line gives up the password "SYSTEM". In each case, the PPN and password are immediately followed by 036160 / 0x3c70 / "p <" / "IZ2". So next time you head over to the computer center and borrow a terminal, that RSTS/E box is all yours!


Christopher Osburn / Seattle, Washington, USA / chris [whirlpool] muppetlabs [spot] com
Mon Jun 18 14:07:47 PDT 2007