lightweight security for win98

Discussion in 'other anti-malware software' started by dahyippur, Feb 19, 2007.

Thread Status:
Not open for further replies.
  1. herbalist

    herbalist Guest

    DW,
    Found several problems with your DOS entries.
    1, These entries are in both C:\autoexec.bat and S:\autoexec.bat.
    Code:
    SUBST P: C:\STORE1
    SUBST Q: C:\STORE2
    SUBST R: C:\STORE3
    SUBST S: C:\STORE4
    SUBST T: C:\STORE5
    The 2nd set is redundant as they were just performed by the first set.

    2, I'm assuming these are typos in red:
    Code:
    XCOPY32 /c /e /h /r /k /y C:\WINDOWS\*.INI P:\[color=red]REGESTRY[/color]
    XCOPY32 /c /e /h /r /k /y C:\WINDOWS\*.DAT P:\[color=red]REGESTRY[/color]
    
    This creates an additional directory with the wrong name. The XCOPY lines also need a backslash following REGISTRY to prevent DOS prompting about whether the destination is a file or directory.

    3, The switches used on XCOPY32 work fine when used in a DOS window, but when executed by autoexec.bat they result in "invalid switch" errors. I got this error for the following switches: /c /h /k /r. Only /e and /y worked from autoexec.bat, which prevented the copying of all hidden, system and read only files. It may work better to use COPY here instead of XCOPY32 or use the ATTRIB command first.

    4, The last line XCOPY32 /c /e /h /r /k /y C:\*.SYS P:\REGISTRY is a problem. The source and destination are on the same physical drive, even if "P" is a virtual drive. It results in a cyclic re-copying of everything in STORE1 to P:\, which is the same location. This command wouldn't execute via autoexec.bat. DOS refused to run the command. When run thru a DOS window, it doesn't catch that the source and destination are the same physical location and just keeps copying over and over.

    Your setup has several things in common with one I use. I use a physical backup directory and call a separate batch file via an entry in autoexec.bat. Had trouble with the XCOPY command not performing as expected too. I'm going to work with this tonite and see where it goes.
    Rick
     
  2. herbalist

    herbalist Guest

    This might explain a few things that are happening here.
    When I enter XCOPY32 /? in a DOS window, it returns the following:
    Code:
    Copies files and directory trees.
    
    XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/W]
                               [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
                               [/K] [/N]
    
     source       Specifies the file(s) to copy.
     destination  Specifies the location and/or name of new files.
     /A           Copies files with the archive attribute set,
                  doesn't change the attribute.
     /M           Copies files with the archive attribute set,
                  turns off the archive attribute.
     /D:date      Copies files changed on or after the specified date.
                  If no date is given, copies only those files whose
                  source time is newer than the destination time.
     /P           Prompts you before creating each destination file.
     /S           Copies directories and subdirectories except empty ones.
     /E           Copies directories and subdirectories, including empty ones.
                  Same as /S /E. May be used to modify /T.
     /W           Prompts you to press a key before copying.
     /C           Continues copying even if errors occur.
     /I           If destination does not exist and copying more than one file,
                  assumes that destination must be a directory.
     /Q           Does not display file names while copying.
     /F           Displays full source and destination file names while copying.
     /L           Displays files that would be copied.
     /H           Copies hidden and system files also.
     /R           Overwrites read-only files.
     /T           Creates directory structure, but does not copy files. Does not
                  include empty directories or subdirectories. /T /E includes
                  empty directories and subdirectories.
     /U           Updates the files that already exist in destination.
     /K           Copies attributes. Normal Xcopy will reset read-only attributes.
     /Y           Overwrites existing files without prompting.
     /-Y          Prompts you before overwriting existing files.
     /N           Copy using the generated short names.
    
    When I make the same XCOPY32 /? entry in pure DOS mode, it returns:
    Code:
    Copies files (except hidden and system files) and directory trees.
    
    XCOPY source [destination] [/A | /M] [/D:date] [/P] [/S [/E]] [/V] [/W]
    
      source       Specifies the file(s) to copy.
      destination  Specifies the location and/or name of new files.
      /A           Copies files with the archive attribute set,
                   doesn't change the attribute.
      /M           Copies files with the archive attribute set,
                   turns off the archive attribute.
      /D:date      Copies files changed on or after the specified date.
      /P           Prompts you before creating each destination file.
      /S           Copies directories and subdirectories except empty ones.
      /E           Copies any subdirectories, even if empty.
      /V           Verifies each new file.
      /W           Prompts you to press a key before copying.
    Interesting that neither acknowleged the "32" in the filename.
    XCOPY and XCOPY32 behave differenly in real DOS than they do in a DOS window, with a completely different set of valid switches.
    Rick
     
  3. dw2108

    dw2108 Registered Member

    Joined:
    Jan 24, 2006
    Posts:
    480
    Good point, herbalist -- I had this nagging thought that I put all the switches in the wrong place somewhere! I'll have to fix that later.

    Dave

    P.S. herbalist, since different Win 9x systems somtimes have subtle DOS differences owing to Bill Gates' software piracy fear, toss in as many alternatives as you can to prevent the problems which you have addressed. With the right switches, all these work fine on 3 of my Win 9x systems. There's a fourth which rejects a switch. These Gates-induced inconsistencies need to be avoided. Your link presents some very nice work.
     
    Last edited: May 7, 2007
  4. herbalist

    herbalist Guest

    Thanks. I tried using several methods to copy the windows directory via that batch file, but every tool I used truncated the names when I ran it in DOS mode, including XCLONE. This was on both my 98 and 98SE boxes. Both have the 6.22 DOS supplement added.

    Normally the switches are put after the source and destination instead of after the command itself. I tried making that change in the entries but the results were the same. Invalid switches.

    The differences in the behavior of XCOPY could also be due to variations in the config.sys and autoexec.bat files, and what drivers are loaded at the exact point in time the additional entries or batch file runs. On the 98SE unit I tried this on, the autoexec.bat had one line in it. I'll try to look into this as I get time. In the mean time, I'm interested to see more of this.
    Rick
     
  5. dw2108

    dw2108 Registered Member

    Joined:
    Jan 24, 2006
    Posts:
    480
    It looks like we're getting off to a good beginning with respect to weeding out DOS eccenticies. I'll try to correct my errors above in the next few days. and thanks for pointing them out. No doubt, I shall make more errors because an illness is affecting my mental clarity, and I may be off or on for several days at a time. So do jump me when it looks as though I stated 2 + 2 = 5, and bear with my physical limitations. WE MUST FIX THAT UP WHICH BILL GATES GOOFED! (Never end a prepositon with a sentence?)

    Dave
     
  6. EASTER.2010

    EASTER.2010 Guest

    Thanks dave:

    We know you're doing your best and will continue at it. You really given us something flavorable to chew on here and personally i can't wait to impliment this technique myself.

    @herbalist

    Thanks to you again my friend for your ever present sense of mind where it concerns 98 systems/techniques and most of all security. I've learned a lot from your own experiences you've shared and never given up on 98 thanks to your attention to detail. LoL
     
  7. EASTER.2010

    EASTER.2010 Guest

    Minor *BUMP to see if dw2108 might continue the procedure he started.

    Many Thanks.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.