🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #6446

Re: shelling to Dos

#6446
From: Steven Abrams
Date: Wed, 26 Dec 1990 02:04
39 lines
2291 bytes
In article <1990Dec25.233917.15240@mstr.hgc.edu> craig@sa2.hgc.edu
(craig chaiken) writes: 
>The following is a list of ways to prevent an application from shelling out to
>DOS:

>1)	Rename COMMAND.COM just prior to executing the application, and restore
>	it upon exit from the application.  (Dangerous if the machine crashes
>	while COMMAND.COM is renamed).

This may be the best bet;  even better, is to permanently rename
COMMAND.COM to something else and use the SHELL= in config.sys to
allow the system to boot with the "other" COMMAND.COM.  To be doubly
safe, reset COMSPEC environment variable to some nonexistent program
before running the application to prevent it from checking the env.
for the location of COMMAND.COM.  The downside of this approach is
that if, when the application exits, it has used enough RAM to walk on
the transient portion of COMMAND.COM, when DOS checks the environment
to find out where to load COMMAND.COM, it will fail with "Please
insert disk with COMMAND.COM in Drive C: and press any key..." or
something dumb like this.    

>4)	Write a TSR to capture the INT 21H EXEC function (AH=4BH).  Ignor any
>	requests to run COMMAND.COM, and execute all other requests. (Actually,
>	not that hard to program, but certainly not for beginners).

I think this is the best option of all, but, as you said, not for the
fainthearted.  


~~~Steve

--
/*************************************************
 *
 *Steven Abrams             abrams@cs.columbia.edu
 *
 **************************************************/
#include <std/dumquote.h>
#include <std/disclaimer.h>
Technical Details
Message-ID: <ABRAMS.90Dec25210447@division.cs.columbia.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!cs.columbia.edu!abrams
References: <1990Dec24.012958.9228@magnus.ircc.ohio-state.edu> <1990Dec25.233917.15240@mstr.hgc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!cunixf.cc.columbia.edu!cs.columbia.edu!abrams
From: abrams@cs.columbia.edu (Steven Abrams)
Newsgroups: comp.sys.ibm.pc.misc,comp.sys.novell
Subject: Re: shelling to Dos
Message-ID: <ABRAMS.90Dec25210447@division.cs.columbia.edu>
Date: 26 Dec 90 02:04:47 GMT
References: <1990Dec24.012958.9228@magnus.ircc.ohio-state.edu>
 <1990Dec25.233917.15240@mstr.hgc.edu>
Sender: news@cs.columbia.edu (The Daily News)
Organization: Columbia University Department of Computer Science
Lines: 39
In-Reply-To: craig@sa2.hgc.edu's message of Tue, 25 Dec 90 23:39:17 GMT