命令行的精巧之处多着呢。这里整理一下建立畸形目录技巧
_______最后更新 2006-5-21 By est
1.不可显示ASCII字符
记得在目录名中加入alt+255 alt+160等不可显示的ASCII字符,在Win9x中就可能不能打开了~~
2.UNICODE字符
在XP中新建文件夹,编辑目录名,右键,插入Unicode控制符,随便选一个,看看~~显示长度为0的文件夹建好了。(如果再把文件夹图标改成 透明………嘿嘿)
3.加点
建立:在cmd里输入 md D:\est..\
访问:运行 D:\est..\
混淆:建立 D:\est\。这样每次打开 D:\a..\目录就自动进入了 D:\a\目录~~
删除:rd D:\est..\
以上是加两个点,其实可以加3个、四个……
4.建立空格目录名
建立: 用 md "By est \ \",注意:est后面有个空格的哦!原则就是畸形目录名后加一个 \ \ ,即 \空格\。
访问:对于建立好的目录在explorer中可以直接访问,cmd中用 cd "By est \ \"
删除: rd /s /q "\\.\D:\By est \" 。最好加一个引号,否则你会死的很惨!
5.保留设备名
建立:md D:\con\ (注意:后面的 \ 号!!不能少!!)
访问:XP下直接访问。但是无法在explorer中直接删除目录。2k中用 运行 D:\con\。9x中未知~~应该无法访问
删除:rd /s D:\con\ (不行就用上面的 rd /s /q \\.\D:\con\)
其它的 aux com1 nul 等类推
注意:Vista里已经取消了这个限制。
6.超长目录名
其实也没什么技术含量,就是255字节以上的超长的文件名。Windows已经不能正常访问,但是 卡吧死机 可以~~~汗~~~
7.畸形盘符(不知道走题没)
这里将的盘符就是平时大家熟悉的 C: D: E:,和大家熟悉的命令subst。两者结合你还熟悉不?请看下例:
subst T: C:\windows 把T:映射为C:\windows目录
subst 1: C:\windows 看见没!用数字做盘符!!在NT Cmd下是完全合法的!
subst 晕: C:\windows 晕~用汉字做盘符~~
完整输入:
subst 晕: C:\windows
晕:
dir
notepad 晕:\system.ini
C:
然后到“我的电脑”去看看?什么也没有!据测试,很多软件不能识别数字/中文盘符,所以如果把病毒映射到畸形盘符在运行,杀毒软件能杀吗?这是个问题!
8.可隐藏文件夹的 点 文件名
大家知道在DOS和其它OS中, . 代表当前目录, .. 代表上级目录,所以我们可以利用这点来建立畸形目录
建立: md "D:\...\"
访问:运行 D:\...\
删除:rd /s "D:\...\"
其实多加几个点无所谓,但是三个点似乎只能建立在非NTFS分区上! 在FAT分区上可以建立名为: . 和 .. 的文件夹,而资源管理器里就完全不可见了。
用以上方法建立的目录在纯DOS和explorer中几乎都不能正常访问和正常删除,所以可以用来加强目录的安全性和强壮性!
版权所有 中国DOS联盟原创贴 作者群:est,无奈何
转载请注明原作者和出处!
如有补充请跟贴!
P.S.请高手解释一下以上畸形目录的原理,以及 \\.\D:\ 的应用,谢谢!!
Last edited by electronixtar on 2006-10-20 at 01:20 ]
The ingenuity of the command line is quite a lot. Here is a sort-out of techniques for creating abnormal directories
_______Last updated 2006-5-21 By est
1. Non-displayable ASCII characters
Remember to add non-displayable ASCII characters like alt+255, alt+160, etc. in the directory name, and it may not be able to be opened in Win9x ~~
2. UNICODE characters
Create a new folder in XP, edit the directory name, right-click, insert a Unicode control character, randomly choose one, and see ~~ A folder with a display length of 0 is created. (If you change the folder icon to transparent again... heh heh)
3. Adding dots
Create: Enter md D:\est..\ in cmd
Access: Run D:\est..\
Confusion: Create D:\est\. In this way, each time you open the D:\a..\ directory, you will automatically enter the D:\a\ directory ~~
Delete: rd D:\est..\
The above is adding two dots, actually you can add three, four...
4. Creating a directory name with spaces
Create: Use md "By est \ ", note: there is a space after est! The principle is to add a \ \ after the abnormal directory name, that is, \ space \.
Access: For the created directory, you can directly access it in explorer, and in cmd, use cd "By est \ "
Delete: rd /s /q "\\.\D:\By est \ ". It is better to add a quote, otherwise you will die very miserably!
5. Retaining device names
Create: md D:\con\ (Note: the \ after it! Can't be less!)
Access: Directly access in XP. But the directory cannot be directly deleted in explorer. In 2k, use run D:\con\. Unknown in 9x ~~ Should be unable to access
Delete: rd /s D:\con\ (If not working, use the above rd /s /q \\.\D:\con\)
Others like aux com1 nul, etc. are similar
Note: This restriction has been removed in Vista.
6. Ultra-long directory names
Actually, there is no technical content, just an ultra-long file name above 255 bytes. Windows cannot access it normally, but Kaba can crash ~~ Sweat ~~
7. Abnormal drive letters (not sure if it's off-topic)
The drive letters here are the familiar C: D: E: that everyone is familiar with, and the familiar command subst. Are you still familiar with the combination of the two? Please see the following example:
subst T: C:\windows Map T: to the C:\windows directory
subst 1: C:\windows See! Use numbers as drive letters!! It is completely legal in NT Cmd!
subst 晕: C:\windows晕~ Use Chinese characters as drive letters~
Complete input:
subst 晕: C:\windows
晕:
dir
notepad 晕:\system.ini
C:
Then go to "My Computer" to see? There is nothing! According to the test, many software cannot recognize digital/Chinese drive letters, so if the virus is mapped to an abnormal drive letter and run, can the anti-virus software kill it? This is a problem!
8. Dot file names of hidden folders
Everyone knows that in DOS and other OS, . represents the current directory, .. represents the parent directory, so we can use this to create abnormal directories
Create: md "D:\...\"
Access: Run D:\...\
Delete: rd /s "D:\...\"
Actually, adding more dots doesn't matter, but three dots can only be created on non-NTFS partitions! On FAT partitions, folders named . and .. can be created, and they are completely invisible in the resource manager.
The directories created by the above methods are almost impossible to access and delete normally in pure DOS and explorer, so they can be used to enhance the security and robustness of the directory!
All rights reserved. Original post of China DOS Union. Author group: est, Wu Nai He
Please indicate the original author and source when reprinting!
Please post if there are supplements!
P.S. Please ask experts to explain the principles of the above abnormal directories, as well as the application of \\.\D:\, thank you!
Last edited by electronixtar on 2006-10-20 at 01:20 ]