Long Filename in NT Makes File Unusable

From: Damian Profancik (dprofancik_at_HOTMAIL.COM)
Date: 06/12/03

  • Next message: David Arnstein: "811493 again and again"
    Date:         Thu, 12 Jun 2003 09:21:30 -0500

           We are using policy files (ntuser.pol) for some of our NT users to
    restrict access on a terminal server. Windows adds a .tmp extension to the
    file when the roaming profile logs into both NT and 2000 machines. Windows
    suggests a fix for this at
    http://support.microsoft.com/default.aspx?kbid=271518. However, the problem
    I am having is removing one of the files that 2000 has added the .tmp
    extension to. The file is 226 characters in length (i.e.
    ntuser.pol.tmp.tmp.tmp… etc.). When I attempt to delete it off of a NT box
    from a 2000 or XP machine it won’t let me. Actually, I can’t do anything to
    it. I can’t view its properties (it give an error saying, “The properties
    for this item are not available.”), delete it, copy it, cut it, rename it
    (these actions just do nothing), or create a shortcut to it (it gives an
    error saying, “Windows could not create the shortcut. Check to see if the
    disk is full.”). I have also tried to remove it in DOS, but not even
    wildcard characters work. “del *.tmp” and “del ntuser~1.tmp” say that they
    can’t find any files by that name. Attempts to change the file’s attributes
    in DOS also fail. The security implications are the DoS potential if a
    world writeable drive is found. I have tried to create a file with a name
    of the same length, but it would only allow 224 characters on NT, 2000, or
    XP. The only way I was able to remove to 226 character-named file was to
    click on it twice, as if to rename it, then rename it and delete it.
    However, anytime I tried to delete the new file I created of 224 characters
    or even right-clicked on it, it crashed explorer with a Dr. Watson error. I
    thought Windows could handle filenames up to 256 characters. I was able to
    go back to the XP machine and delete the file I created. I am curious how
    the system created the 226 characters file.

    Damian Profancik

    MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.

    Delivery co-sponsored by TruSecure
    Free 14-day trial of New Threat & Vulnerability Notification Service

    TruSecure's new IntelliShield(tm) web-based threat and vulnerability
    service isn't your typical alert service. Supported by TruSecure's vast
    intelligence resources - including the ICSA Labs - IntelliShield's early
    warning, analysis, decision support, and threat management tools provide
    organizations with unmatched intelligence to better protect critical
    information assets. Experience it for yourself - just click below to begin
    your free, no obligation 14-day trial today!



  • Next message: David Arnstein: "811493 again and again"

    Relevant Pages

    • [Full-disclosure] Re: What A Click! [Internet Explorer]
      ... > tell your windows to open .HTA files in notepad. ... > (since there are more ways to cover windows with malicious lookalikes). ... >> Using custom Microsoft Agent characters it is possible to cover any kind ... including security or download dialogs. ...
    • Re: Tk 8.4.11 / Windows XP / Encoding problem
      ... Some of our clients are experiencing a weird problem on their Windows XP PCs. ... suddenly they start showing other characters instead of the correct utf-8 ... Tcl usually does proper detection of the system encoding. ...
    • Re: How many bytes per Italian character?
      ... yes I know how to ask Windows CE how big a buffer I'm going to need. ... and characters in Italian are the same size as characters in English, ... So have you detected that WinCE will cause a buffer overrun? ... It is not an error to tell you a string might be longer than it actually ...
    • Re: File Attributes a real stumper
      ... Windows is based on that ANSI character set, or it may contain reserved windows names, such as 'com', 'lpt', or others. ... I've seen these type of files created using FTP, which supports ASCII, and an FTP server supports ASCII, and Windows will create it from FTP, but when you try to view it, or delete it, you'll have problems. ... A little background on undeletable files and folders: ... They would upload their illegal software to the FTP servers they find, but they would name the files and the folder they create with extended characters and symbols that FTP supports but Windows does not directly support, as well as create a very deep file structure with these extended unsupported ASCII characters, and/or file names with these characters that are greater than 256 characters. ...
    • Re: Code Review - is this code shit
      ... of Windows files] will be seriously misread. ... of such characters are meant to be line separators (this would handle ... This is how best to use a crappy language for this purpose. ...