[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

347.0. "KERNEL mode DEPOSIT cmd??" by SMAUG::ZOLFONOON () Thu Oct 30 1986 12:50

    Is there any system utility that allows me to change the contents
    of the system's data structures on a running system(assuming that
    I have the proper privilege)??
    
    tx
    riaz
    
T.RTitleUserPersonal
Name
DateLines
347.1xDelta has it nowVAXWRK::NORDLINGERIn a GALAXY far, far awayThu Oct 30 1986 13:275
	Yes, could use (x)Delta. 
	Be careful though or you'll see how software
	really can damage hardware.

	John ;^)
347.2How about the console?ERIS::CALLASO jour frabbejais! Calleau! Callai!Thu Oct 30 1986 15:456
    You can also do it from the console. If you're on a MicroVAX II, type
    D/V/U (deposit/virtual/unconditional) <address> <value>. I use this to
    test patches on running VMS systems sometimes (when they're easy to
    hand-assemble, that is). Works like a charm.
    
    	Jon
347.3ULTRA::PRIBORSKYTony PriborskyThu Oct 30 1986 19:0117
    If you have XDELTA, follow the instructions for activating XDELTA
    on a running system.   If it isn't loaded, AND what you want to
    change is in non-paged pool, try the following from a suitably
    privileged account:
    
    $ RUN SYS$LIBRARY:DELTA
    1;M
    10001:sys_space_addr/ new
                                                        
    The 10001: tells DELTA to do the examine or deposit from the context
    of process 10001, which is the PID of the SWAPPER.   Obviously,
    you can't set breakpoints (unless you want to crash!)   I've used
    it to change values in UCB's, etc...
    
    Also, it isn't "atomic" enough to replace values more than a longword,
    or to change instructions that span more than one instruction or
    a longword.   Use with caution.
347.4Why doesn't ANALYZE/SYSTEM allow this already ?REGINA::OSMANand silos to fill before I feep, and silos to fill before I feepFri Oct 31 1986 18:1937
Below, I'll tell you another way to do it.

First, a question:  How come SDA won't let you do it, under the ANALYZE/SYSTEM
facility ?  Is it just that it's considered too dangerous ?  Certainly
in terms of programming it, it's trivial, particularly in an environment
like SDA which seems to understand all the necessary syntaxes already.

Any developers want to reveal some history on this ?

Anyway, it's interesting that you bring up the topic now.  Just this
week, I implemented a tool to do exactly what you asked for.  Once
you have my tool, you can say right at DCL:

	$ @w {LONG,WORD,BYTE} address value

For instance

	$ @w long 80307ff0 100

To get this tool, please copy files W.* from hannah::usrd$:[osman.rmx].
Then, to use it, just @ the w.com file.

I haven't yet put in any safety checks so make sure you specify EXACTLY
what size, address, and value you intend, or system will crash.

Safety checks I'm considering:

o	Require you to enter correct OLD value you're replacing

o	Do a PROBER and PROBEW to make sure page exists.

o	Exception handler to catch what PROBEs don't (is this
	ever necessary, except in the case of race conditions ?)

Please let me know if the tool works for you.

/Eric