Author Topic: Warning re: 8.3 filenames (FAT32 and NTFS)  (Read 3361 times)

0 Members and 1 Guest are viewing this topic.

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Warning re: 8.3 filenames (FAT32 and NTFS)
« on: October 27, 2005, 12:33:14 pm »
This isn't really a security vulnability, but it can lead to suicides (probably):

Quote
Hi to all readers,

this day I found a annoying misbehavior in Windows XP professional
with SP2.

I had a directory with some Java sources (*.java) and some backup
files (*.jav). Because I din't longer need the backup files I would
delete them with 'del *.jav'. But this command also delete all the
source files. #ยง%*. The last backup was 4 hours ago. :-/

So I tried what happen and the result is the command above checks
only the first three chars from the extension (DOS is alive).

Here is how you can reproduce it:

mkdir testbug
cd testbug
rem.>file1.jav
rem.>file2.java
rem.>file3.javas
del *.jav

All three files are deleted. Is this a known bug or a unknown feature?

Frank
-- 21 is only half the truth

_______________________________________________

Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Warning re: 8.3 filenames (FAT32 and NTFS)
« Reply #1 on: October 27, 2005, 12:39:20 pm »
In FAT32 I'd understand but for 8.3 filenames to be an issue with NTFS? Wtf?
I'd think this would only be a FAT* issue due to the LFN addition (or VFAT)
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Warning re: 8.3 filenames (FAT32 and NTFS)
« Reply #2 on: October 27, 2005, 12:50:26 pm »
Here's how to disable the behaviour on newly created files:

Quote
The default setting on Windows is to create an 8.3 short file name for every file that cannot fit in the 8.3 format. The example you posted is expected behavior on a default Windows installation.

Fire up the Registry Editor and drill down to: HKLM\SYSTEM\CurrentControlSet\Control\FileSystem

To disable creation of 8.3 short file names on local NTFS file systems, create or update the following DWORD registry keys:

NtfsDisable8dot3NameCreation // NTFS only
Win95TruncatedExtensions // del *.xxx phenomenon

I don't think it's possible to disable 8.3 creation on FAT file systems. Other interesting keys:

Win31FileSystem  // FAT compatibility
NtfsDisableLastAccessUpdate // OT, but personal favorite

Changes take place after reboot.

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7503
  • One for a Dime two for a Quarter!
    • View Profile
Re: Warning re: 8.3 filenames (FAT32 and NTFS)
« Reply #3 on: October 27, 2005, 01:07:14 pm »
Must be to keep compatibility with FAT*, oh well. Thier stupid decision.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Warning re: 8.3 filenames (FAT32 and NTFS)
« Reply #4 on: October 28, 2005, 12:05:55 pm »
Frank
-- 21 is only half the truth

Hahahhaha