[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

222.0. "Define foo=3 in DCL without "="" by SIERRA::OSMAN (and silos to fill before I feep, and silos to fill before I feep) Wed Mar 26 1986 17:14

The answer is:
    
    
    
    
$ foo 'f$extract(0,1,f$fao("!AD",1,f$fao("!61*a")))' 3
    
    
    
    You might wonder why I cared.  Well, there is this not-to-be-mentioned
    system set up that you can mail messages to.  The system then
    puts your message into a file and "@"'s the file.
    
    Well, I wondered what would happen if I mailed messages that had
    nothing to do with the intended use of the system.  Could I get
    it to do free work for me ??
    
    Well, I quickly discovered that the system filtered out all lines
    not looking like
    
    		$ foo . . .
    
    So, I got around this by sending it things like
    
    		$ foo = "whatever I want to execute"
    		$ foo
    		$ foo = "whatever I want to do next"
    		$ foo
    
    However, honest as I've grown in my old age, I told the developer
    of the system my hack.
    
    He "fixed" the system to filter out all lines containing the "="
    character.
    
    That's when I concocted the
    
    	   	$ foo 'f$extract(0,1,f$fao("!AD",1,f$fao("!61*a")))' "whatever I want to execute"

    trick.
    
    His latest fix is to filter out lines containing "'" characters
    (apostrophes) as well as "=".  I believe the system is secure
    now.
    
    /Eric
T.RTitleUserPersonal
Name
DateLines
222.1PARVAX::PFAUHacker for hireWed Mar 26 1986 19:305
    This reminds me of an old TECO macro that printed out the alphabet. The
    trick to the macro was that no character in the macro itself was
    repeated....
    
    tom_p
222.2How About "@"?VAXUUM::DYERBrewer - PatriotThu Mar 27 1986 00:225
	    Have you tried this?

 		$ foo @SYS$SYDEVICE:[DECNET]DASTARDLY_FILE

			<_Jym_>
222.3How About ":"?VAXUUM::DYERBrewer - PatriotThu Mar 27 1986 00:305
	    Have you tried this?

		$ foo :any nasty command you want

			<_Jym_>
222.4@, no, : maybeSIERRA::OSMANand silos to fill before I feep, and silos to fill before I feepFri Mar 28 1986 14:4719
    I experimented, without success with the
    
    		$ foo @something
    
    strategy.
    
    I appears that the "foo" symbol was originally defined as
    
    		$ foo == "$filespec"
    
    and that DCL doesn't execute the "@" on such a thing.  Instead,
    it merely runs the filespec and feeds the line "@something" to it.
    
    The ":" idea sounds promising, I'll let you know when I get results.
    
    /Eric
    
    p.s.	Has anyone figured out yet what system I'm hacking ??
    
222.5JON::MORONEYFri Mar 28 1986 15:244
    Yup.  You shouldn't pick on poor Mr. * with your hacking, with the
    service he's providing..
    
    -Mike
222.6. . . a.k.a. ____::__E_E_VAXUUM::DYERBrewer - PatriotFri Mar 28 1986 16:222
	    Yeah, leave E_ (____::|_____::) _e___e_____ alone!
			<_Jym_>
222.7I help, not hinder! (: doesn't work)SIERRA::OSMANand silos to fill before I feep, and silos to fill before I feepFri Mar 28 1986 16:4418
    Actually, I've been helping him.  When I first found loopholes in
    his system, I told him about it by coercing his software to send
    him a message telling him what the hole was.
    
    Anyway, it looks like ":" isn't a loophole either.  I'm not sure
    why not.  I suspect the filter avoids executing
    
    	$ foo . . .
    
    if the first character after "foo" isn't alphabetic.
    
    It's too bad the filter has to check for specific things.
    
    As a meta question, is there a more elegant way to protect
    one's software than the current method of specifically checking
    for certain known-to-be-nasty ascii characters ?
    
    /Eric
222.8I'd Run It Through A Keyword ParserVAXUUM::DYERBrewer - PatriotMon Mar 31 1986 10:030
222.9Coupla thoughts.KLOV02::BROWNWed Apr 02 1986 12:5821
    
    The best way to trap 'nasty' commands is to only execute specified
    commands within the command procedure. For example never do anything
    like :-
    $'Command
    Always do something like :-
    $If "''Command'".eqs."FOO" Then $Foo
    (Make sure FOO is defined within the command procedure as a local
    	symbol, and that the user has no chance to re-define it. To
    	play REALLY safe you can re-define the command FOO every time
    	just before invoking it)
    To pass parameters to a command use F$PARSE on the file names. For
    example (parameter P1 is a file name) :-
    $P1 = F$Parse(P1)
    $If P1.eqs."" Then $Goto ....
    $Command 'P1
                
    You can always give the user a menu of numbered commands and force
    	him to use a numbered command instead.
    
    
222.10KOALA::ROBINSScott A. Robins&quot;Wed Apr 02 1986 15:525
    re .9:
    If you want a 'secure' .com file, never use the "''command'"
    construction.  See the note earlier about 'in-use' procedures.
    
    Scott
222.11Secure command file is an oxymoronERIS::CALLASJon CallasThu Apr 03 1986 14:414
    If you want a secure command file, convert it to an executable image
    (using TPU, your favorite compiler, and the linker) and install it.
    
    	Jon 
222.12cashe me if you canPHENIX::SMITHWilliam P.N. Smith, CSM Components Eng.Tue Jun 24 1986 16:157
    Umm, maybe I'm just being dense here, but I missed something.  What
    is the point of having a system remotely execute something you send
    it?  What can you do remotely that you can't do easier locally?
    Examples would be greatly appreciated...
    
    WPNS
    
222.13Is There A [GAMES] Directory?VAXUUM::DYERBanish BigotryWed Jun 25 1986 01:182
	    Look for goodies that aren't on your system, for starters.
			<_Jym_>
222.14check remote jobs is another reasonROXIE::OSMANand silos to fill before I feep, and silos to fill before I feepWed Jun 25 1986 14:494
Another thing you may want is to look at the batch or print queues
on the remote system, to see how your PRINT/REMOTE job is humming.

/Eric
222.15...DSSDEV::ALDENKen AldenWed Jun 25 1986 16:306
    Or compile a long bliss job when your local node is 730 and the
    remote node is an 8800.:-)
    
    
    
    
222.16:-) or :-( ?SWIFT::PITTTony Pitt, UK CS, Basingstoke, EnglandFri Jun 27 1986 11:463
    How about shutting down the network?
    
    T
222.17to access third-party softwareREX::MINOWMartin Minow, DECtalk EngineeringMon Jun 30 1986 16:507
We have some third-party software that is only licensed for use on
a specific cpu.  We have people who want to use this software who
are located on a different cpu.  The easiest solution seems to be
to copy the files back and forth as needed.

Martin.