From: Chris_F_Chiesa@cup.portal.com
Newsgroups: comp.os.vms
Subject: Re: HELP!!! Security problem for gurus.
Date: Sat, 26 Dec 92 00:31:36 PST
Organization: The Portal System (TM)
  <1992Dec22.161918.9033@ncsa.uiuc.edu> <1h9e1nINN1c9@gap.caltech.edu>
  <1992Dec23.194607.26032@ncsa.uiuc.edu>

In a recent article whose header Portal doesn't pull in for me here,
jsue@ncsa.uiuc.edu (Jeffrey L. Sue) writes:
>
>In article <1h9e1nINN1c9@gap.caltech.edu> carl@SOL1.GPS.CALTECH.EDU writes:
>>
>>Easy:  Just pick a date that's before NOW.  
>Hmm....
>MAIL$09A8BDA800050096.MAI doesn't like it has anything to do with a date.
>
> [... several paragraphs of talking-out-of-both-sides-of-his-mouth 
> deleted, in which he says first that he knows quite a bit about how
> VMS works, even though things like how Mail determines the "bignumber"
> portion of MAIL$*.MAI files are of little use to him, and then says
> that it's not worth any effort on his part to look it up, deleted]

Jeff, unfortunately this is EXACTLY the kind of attitude Carl was 
originally complaining about, although the epithet "using shit for 
brains" probably wasn't intended originally to refer specifically to
YOU but rather to any such types who MIGHT POTENTIALLY be readers 
here.  However, you seem to be waving a membership card in that club...

The whole POINT of Carl's semi-flame was that if you kept your wits
about you and really peered into the depths -- even a tiny bit; this
really isn't very deep at all -- of how VMS does things, you'd be 
infinitely better equipped to come up with creative solutions to unu-
sual requests/problems (i.e. how to hide files?  stick 'em in your
Mail directory with names that you KNOW won't be re-used.  How do 
you KNOW what names won't be re-used?  Be aware of how Mail assigns
the names!) than some other guy who just sits back and disdains such
"details" as "not worth (his) effort" to know about.  I believe that
it is IMPOSSIBLE to sit here, today, and pass judgment on what infor-
mation will be useful to you TOMORROW.  And Carl's point is that if 
you DO pass such judgment today, it's not HIS (or MY, or anyone else's
on comp.os.vms) problem, nor HIS/my/our responsibility to pull your
fat out of the fire should you come up dry on something tomorrow.  It
is expected that querents here make at least a token effort to solve
their problems before posting their questions, and in most cases if
that means a question that isn't answered in DEC manuals that expec-
tation includes having ALREADY GONE BEYOND the manuals to a deeper,
even if just a TAD BIT deeper, understanding of how things work.  How
anyone can expect to program or manage a computer system -- VMS or 
ANY kind -- without such "deeper" knowledge, is beyond me -- without
it, one is just a dumb button-pusher relying on someone else (the
VMS designer, the CSC call-fielder, etc.) to hold his hand when things
don't magically work right.  I hate that word, "magic," but a lot of 
computer users seem mighty fond of it as a concept.

Having said that, one way in which you might have put two and two 
together and noticed how MAIL$*.MAI filenames were related to date/
time, might have been to occasionally do some programming with date/
time related System Services, and to occasionally delve into just WHAT
the contents of a VMS date-time quadword happen to look like, and to
notice that by golly, the strings of digits in MAIL$*.MAI filenames
look awful similar to a date-time quadword examined in hexadecimal.
You might then write a program to test your hypothesis, letting you
type in the string of digits in a MAIL$*.MAI filename, converting it
to binary, and using $ASCTIM to see what that binary value represen-
ted, if anything, when interpreted as a date/time quadword.  You would
then observe that the "bignumber" strings represented dates, all in 
the past, all of them falling within the time span you'd been using 
VMS Mail and retaining messages, etc.  It might even happen that you'd
discover that the "bignumber" represented the date-and-time that the
file was created/the mail message contained in that file was received.
This really isn't so farfetched, either, as *I* did it entirely on
my own as a second-year non-privileged VMS user while still a young
college student.  (Lest you counter that your work "doesn't involve
the use of time-related System Services," I suggest that it is your
responsibility as a VMS user/manager to be somewhat familiar with the
programming facilities provided by the system, and that you should be
writing test programs to exercise your knowledge of ALL the available 
System Services, Run-Time Library routines, utilities, etc.  It is 
then your further responsibility, as a writer of even the smallest of
test programs using System Services et al, to have some familiarity
with the appearance, in memory, of the data structures used, or cre-
ated, by these routines.  Examining system data structures in hexa-
decimal should also become second-nature, even if you still prefer
decimal as a first choice.  By doing each of these things to any sig-
nificant degree, and keeping your wits about you when looking at two
seemingly-unrelated areas (MAIL$*.MAI filenames, and the $GETTIM 
system service, say), you stand a good chance of picking up these kinds
of details in the course of everyday life, instead of having to wait
years to MAYBE pick it up in someone else's comp.os.vms (or INFO-VAX)
posting.  Any remark to the effect that "it's not worth (my) effort,"
to me says that you DON'T CARE about knowing how things work, and that
would seriously erode my confidence in, and respect for, you if you
were MY overseeing System Manager! 

I don't consider this a "flame" so much as a statement of my personal
standards for VMS users/managers/programmers, of which I myself am all
three...

Chris Chiesa
   Chris_F_Chiesa@cup.portal.com