|
UPDATED: NTFS Data Streams: the true way to hide information and extend your file system
|
Email
|
| Submitted on: |
8/1/2003 1:07:52 AM |
| By: |
Ion Alex Ionescu
|
| Level: |
Advanced |
| User Rating: |
By 77 Users |
| Compatibility: |
VB 4.0 (32-bit), VB 5.0, VB 6.0, VB Script |
| Views: |
49166 |
|
(About the author) |
|
|
|
11/10/2003: To celebrate my mother's birthday (to whom I shall dedicate this update to) I've decided to post a new version of the code. As posted in the recent article, all of the bugs and features that you have suggested have been implemented. Thank you very much for your comments! If you find any new bugs, please let me know!
This article will teach you about a big secret of the NT File System (NTFS): Alternate Data Streams. First off, a brief history about ADS will be offered, followed by practical applications of data streams, with examples. Finally, explanations on how to protect yourself from the dangers (and what they are) of ADS. Full source code is included as well as a GUI for scanning your disk for ADS, as well as editing and viewing them (or creating new ones). As a bonus, there are two versions, one in pure API, and one using VB controls. Finally, you can integrate this app in a VBS script, with very little modification, for server maintenance.
This article has accompanying files
|
 |
| |
Terms of Agreement:
By using this article, you agree to the following terms...
- You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
- You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
- You may link to this article from another website, but ONLY if it is not wrapped in a frame.
- You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
|
NTFS Alternate Data Streams (ADS)
What they are, and what they mean for you.
1. Introduction
To properly introduce the
insertion of ADS support in NTFS, which started with Windows NT 3.1, we must
first take a look in the Macintosh world. As some of you might know, Macintosh
files do not generally have an extension. Yet, the OS is capable of recognizing
who made the application and properly execute it (along with coloring the file
based on your settings or other Mac features). This is possible because
Macintosh files have two “forks”. The resource fork, which contains this
information, and the data fork, which contains the executable code itself (as a
side note, this has changed in Mac OS X). When Windows NT 3.1 came out, it had
compatibility support for AppleTalk, meaning that NT and MacOS users could
easily exchange data. This caused a problem however, since there was no way to
copy the resource fork and the data fork of a file directly onto the NT file
system. Doing so would only copy the data fork, since the resource fork wasn’t
physically in the file, but in a separate stream. (In other words, the data and
resource fork don’t occupy the same cluster on disk, or are part of the same
contiguous file). Microsoft then had to implement NTFS ADS, which meant that NT
would see the resource fork as another stream, and would be able to copy it
along with the file onto a Macintosh computer. Extremely low-level and
inaccessible by most APIs or programs, ADS didn’t become popular until much
later.
2. The dawn of ADS
With Windows NT 4, ADS took on a
more important place in the heart of the NT OS. NT 4 started supporting Hard
Links (Hard Links is something from the Unix world, it’s the ability to
logically “map” a file or folder to another one. For example,
c:\mymusic\mp3\alex\rock\heavy\2002 can be mapped to C:\Heavy Rock 2002. While
this seems much like a shortcut, a shortcut is an extra file that the Shell has
to interpret. You cannot directly do file operations on a shortcut, and you
can’t use it in the command prompt. A Hard Link is a “physical shortcut”.) and
some anti-virus companies started writing checksums in a special ADS. However,
no official API was made for Hard Links, and checksum ADS were really rare. This
changed in Windows 2000.
3. The golden age of ADS
Windows 2000 brought a number of
new features to NTFS, sparse files, summary information data, ACLs and the
Encrypted File System, and an easy to use API to create hard links. All this
information is stored in the ADS of a file. For example, right-clicking on a
movie and going to properties allows you to enter information such as “Author,
Keyword, Title”. This information is not written in the file itself, but in an
ADS. Encrypting a file will also create a special ADS. Since ADS was becoming
more known, some viruses are also known to exploit ADS. Why? Because Microsoft
left a lot of holes in the implementation.
4. What’s an ADS anyways?
An alternate data stream, as
mentioned in the introduction, is any kind of data that can be attached TO a
file but not IN the file on an NTFS system. The Master File Table of the
partition will contain a list of all the data streams that a file contains, and
where their physical location on the disk is. Therefore, alternate data streams
are not present in the file, but attached to it trough the file table. A typical
file contains only a single data stream, called $DATA. This is the data
contained in the file itself, and is not an ALTERNATE data stream, since it is
the data stream itself.
The convention that Microsoft
chose for file naming is the following:
filename.extetsion:alternatedatastreamname:$DATA. When you open a file, by
any normal means, you are therefore accessing the $DATA stream. Since there is
no alternate data stream, the file system actually opens
filename.extension::$DATA. If however this file had an alternate data stream
called “joe”, and you wanted to open it, you would have to open
filename.extension:joe:$DATA. I hope this is clear until now.
In the previous paragraphs, I
mentioned that an ADS can store Hard Links, Encryption, Summary Information,
etc. However, these are the uses that the OS has for an ADS. You, the user, can
create an infinity of ADS for your own usage. Let’s see why this is useful.
5. What ADS mean for you
If you understood everything
until now, you have noticed that ADS are not stored in the file itself. You
might be asking yourself “if I store 1MB worth of text into an ADS of a file,
will the file become 1MB bigger?” Here’s the great side about ADS…it won’t.
Since the data is never stored in the file itself, the APIs to retrieve the size
of the file will never take into account the ADS you might’ve added (or that the
OS added). Just like Explorer will only display and open the $DATA data stream
(the file itself), Explorer will only show the size of $DATA (the size of the
file itself). Explorer is not exhibiting a bug; any application calling the
normal Windows API will exhibit the same behavior. So what does this mean? It
means you can store 2 Gigabytes of data into the ADS of an empty file and that
the OS will display the file as empty. Opening this file with notepad will
result in a blank text page, and even a hex editor would display the file as
empty. The 2GB would however be shaved off your disk, and would you forget the
existence of this ADS, only a reformat would reclaim your space.
6. Small summary
To review what we’ve learnt till
now: An NTFS file is made of data streams. The main data stream, called $DATA is
the file itself and can be opened, read, written or otherwise modified by any
application. You will never see any mention of this data stream. The second type
of data stream is called an alternate data stream, or ADS. Any kind of
information can be stored in an ADS, and it will remain invisible to the user.
The data will never be seen when opening the file, and the file size of the file
will never change. An example of an OS-created ADS is the Summary Information
you can write about a file. A user can create any number of ADS he wants and
store whatever information inside.
7. Clarifications (practical
example)
I mention that a user will not
see an ADS, but that he can create them. I then say that an ADS will be
invisible to the user…what is the point then? You must be wondering, and this
chapter will offer an easy example so you can understand better. Suppose that
you have hundreds of passwords on numerous sites. You share the computer with
your roommate, who isn’t exactly a genius in computers, but would easily find
“passwords.txt”, or even something more “subtle”. Here’s a trick, using ADS,
that you can use. First, open notepad and paste some useless readme text. Save
this file to c:\readme.txt. Now, click on the start menu, then press run, and
type “notepad c:\readme.txt:passwords.txt”. Press OK. Notepad will ask if you
want to create the file, since it’s empty. Of course, Notepad is actually
referring to the data stream. Press OK, and then write down your passwords.
Close Notepad, and save the file when it asks you. Now for the test. Open
c:\readme.txt from explorer, or from Notepad or the Run command. You will see
your original readme text, with no mention of your passwords. Check the file
size in Explorer or DOS…it hasn’t changed. Now go back to the Run command, and
type “notepad c:\readme.txt:passwords.txt”. Notepad will open your passwords.
Now, assuming that you delete the Run previously-typed commands, your friend
will never have the idea of entering that command. Even if he knew about ADS,
how would he know which file you’ve stored it in, or what you’ve called your
ADS? If you want, you can also try running “notepad
c:\windows\explorer.exe:passwords.txt” and write your information there. Windows
and Explorer will run fine, yet your passwords will be linked to explorer.exe. I
don’t suggest you do that in this example, since the only way to delete the ADS
is to delete the file itself (or use my program…)
8. Malicious usage
“So wait…if *I* can store hidden
information on my own computer…can’t a hacker or a Trojan horse program store
information or even executable code in ADS? Can’t a joker create a 5GB file on
my computer without me ever finding out?” Unfortunately, the answer to all those
questions is yes. Executable code can be placed in an ADS, and even executed,
without ever touching the host program. That’s right… using API or the “Start”
command in DOS, you can execute “Explorer.exe:Trojan.exe”. What this will do is
execute the Trojan program, without Explorer ever running. To make matters
worse, Windows 2000 displays “Explorer.exe” in Task Manager, not “Trojan.exe”.
Thankfully, XP has fixed this horrible security bug. (but it still only shows
explorer.exe:Trojan.exe…you could call the file something less conspicuous).
This is NOT a tutorial on how to use ADS to hack, so I will not give any details
on how to copy executable code or running it. Unfortunately, a Trojan might’ve
already done that on your system, or a more computer-savvy “friend”. Here’s the
good news: Using Kernel Native APIs and the Backup APIs, it is possible to
rapidly seek out any ADS on your hard drive, as well as read/write to them, or
delete them.
9. My program
The program attached is a fully
working example, complete with comments about almost every line. It is written
in pure API, so even the Form itself is created using API, not the Visual Basic
Designer. I’ve done this for speed, and also to teach you a bit more about API
controls. You can see in the screenshot that it doesn’t look bad at all. The
application is split into modules, so if you simply want to include Stream
functionality in your application, you can use the StreamModule.
10. Final notes
I greatly recommend compiling
the application into a Native EXE for much faster speed. It should take less
then two minutes to scan your whole disk (It takes me 30 seconds, but I have a
fast CPU and HD so I’m estimating). If you find any suspicious ADS (you will be
able to see their name) or huge sizes (you will also see the size), you can use
the Open button to delete malicious ones, or simply to view/edit the ones you
are wondering about. Finally, you can create your own ADS. For security reasons,
my program only allows you to write clear-text ADS, not executable ones.
Enjoy! This is my first big
article, so if you find it too hard to understand, please don’t hesitate to
write your comment down. If you have any trouble, or any other comment, also
feel free to write it. I will happily accept any criticism or ideas =) I’m only
17 years old so sorry if my English isn’t spotless (It’s my third language).
FAQ (Frequently Asked
Questions)
1. Why can’t the Message Box
show executable streams?
As I said before, this
project doesn’t support binary streams for security reasons. The module is very
clearly written and you can always use different methods to display the buffer
containing the data if you wish, after calling ViewStream.
2. Why are there two
projects? What’s _NOAPI?
Because some people might
just be interested in the StreamModule itself and the framework used to
manipulate ADS, I have included a project made with VB’s designer and using OCX
files that come with VB. This project has the suffix _NOAPI. While it’s meant
for beginners, I strongly recommend even intermediate programmers to look at the
API version. It’s much faster because of the list view and status bar being in
API.
3. The _NOAPI version only
contains a form with some code, and the StreamModule… why does it make a bigger
EXE then the API version, which has 4 modules filled with code?
Just because VB’s designer
hides the code for you doesn’t mean it’s there. My API implementation is faster
and cleaner then what VB does in the background. And it needs no OCX files at
all.
4. I am an advanced
programmer or server admin, what are the advantages of using the API version?
Firstly, you will notice that
the scanning is much faster (almost twice as fast), unless you remove the status
bar refresh on each file (but then your application will look hung for two
minutes). Secondly, the API version is 36kb, plus the 1MB VB6 runtime. The
_NOAPI version is 40kb, plus the 1MB VB6 runtime, plus the comdlg32.ocx, plus
the comctl32.ocx, all together totaling over 2MB.
Finally, using one of the
many API-Call add-ons for VBScript, you can create an automated VBS file that
will scan your server or active directory for any streams, based on your
criteria, all while showing the same GUI as in my VB example, since it was all
created in API.
|
|
Download article
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come
out every day, so no prevention program can catch 100% of them. For your own safety, please:
- Re-scan downloaded files using your personal virus checker before using it.
- NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
- Scan the source code with Minnow's Project Scanner
If you don't have a virus scanner, you can get one at many places on the net
including:McAfee.com
|
Terms of Agreement:
By using this article, you agree to the following terms...
- You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
- You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
- You may link to this article from another website, but ONLY if it is not wrapped in a frame.
- You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
|
Other 8 submission(s) by this author
|
|
Report Bad Submission
|
Your Vote
|
| |
Other User Comments
|
8/1/2003 2:29:55 AM: Richard L.
excellent dude. I never knew you can do anything with ADS. Thanks for code 5 globes! (If this comment was disrespectful, please report it.)
|
8/1/2003 2:29:57 AM:
This is one great tutorial, it's very clear and understandeble, thank's very much for making this (If this comment was disrespectful, please report it.)
|
8/1/2003 2:31:16 AM:
I can't seem to vote here, the picture with the verification code isn't shown. (If this comment was disrespectful, please report it.)
|
8/1/2003 3:57:40 AM: rae the coder
hardcore dude, this is tight 5 (If this comment was disrespectful, please report it.)
|
8/1/2003 4:42:49 AM: Light Templer
READ/WRITE to/from NTFS streams is easy, IF: You have to know the stream's name... The only method to get it I knew so far is the tool from SysInternals.com . With your code we can do all in VB now including enum streams of a file! Fine stuff, Alexandr! Thx alot! (And 5 globes from me ;)) Regards - LT (If this comment was disrespectful, please report it.)
|
8/1/2003 6:48:45 AM: Michael Bapst
This is an incredible piece of work, best code I have seen in a long time, 5 globes from me! (if I can get that verification picture to show up on the voting page...) (If this comment was disrespectful, please report it.)
|
8/1/2003 12:01:53 PM:
5 globes!!!!! (If this comment was disrespectful, please report it.)
|
8/1/2003 1:38:25 PM: Mark Randall
I honestly wish I could give you more globes than I can, this is one of the best tutorials, and pieces of code I have *ever* seen. Congratulations to you. (If this comment was disrespectful, please report it.)
|
8/1/2003 2:40:36 PM: Ole Chrisitian Spro
Well first of all thank you for the turtorial! It was very well written and easy to read, especially for your third language! Second I bow before you in awe of your knowledge in VB. I just started learning it... think I'll just quit right away when I see all of this... lol I would have given you some globes if I too had seen the varification code. Keep it up! (btw spam me with mails on how to get better when you've got nothing better to do ;)) (If this comment was disrespectful, please report it.)
|
8/1/2003 6:45:33 PM: Andy H.
First introduced a long time ago, yet still widely unknown, ADSs do pose somewhat of a threat. I have been researching this topic for a couple of years now, and pretty much know everything about this topic. I think you did an excellent job explaining everything. I tried to vote 5 stars, but I can't. If you have any questions, or anybody, you or they can e-mail me. Once again, great job. (If this comment was disrespectful, please report it.)
|
8/1/2003 7:23:22 PM: Mark Randall
Hmmm, do you get the problem where the image does not appear? It looks like an ASP Problem.. It tries to send HTML instead of an image. (If this comment was disrespectful, please report it.)
|
8/1/2003 7:28:07 PM:
This is an excellent program. I commend your work. SyberTrek (If this comment was disrespectful, please report it.)
|
8/1/2003 7:29:04 PM: Alexandru Ionescu
Hey everyone, thanks for the comments. Looks indeed like PSC is having a bug. I'd really appreciate it if you'd vote when it comes back up...I'll send an email so I hope you won't mind. Thanks again for your support! (If this comment was disrespectful, please report it.)
|
8/1/2003 8:13:36 PM:
Very well documented application! Shows deep understanding of computer engineering. Are you taking these out of Knuth's manuals? I read them several times since '65 and I haven't fund a better and nicely done piece of code! 5 (five) golden stars. Thank you Alexandru. (If this comment was disrespectful, please report it.)
|
8/1/2003 10:32:41 PM:
When I can vote I will give you 5 globes! This is one of the most informative and well written tutorials ever! Thanks!! (If this comment was disrespectful, please report it.)
|
8/1/2003 10:39:22 PM: Wolf McCloud
Nothing is perfect. I found errors in it. I also found solutions. First of all, if you got too many files, it freezes. In the sub Seeker, just add before the Wend, DoEvents. Second, when you try to click an item that isnt there (I mean, you try to click in a blank spot) on the list, it returns an error. All you have to do is add On Error Resume Next. Also, it gives an error when it isn't a NTFS partition. All you could do is add that in the sub Seeker............... On Error GoTo Hell ................ Exit Sub Hell: MsgBox "This disk is not formatted as NTFS.". Except those little mistakes, this code is perfect. (If this comment was disrespectful, please report it.)
|
8/1/2003 10:41:48 PM: Wolf McCloud
I don't know what's the problem with pscode but there is an internal error on server when trying to get the picture. I hope it will be fixed cause I want to give out 5 donuts to thing and eat one or two... boxes =P (If this comment was disrespectful, please report it.)
|
8/1/2003 10:45:59 PM: Wolf McCloud
Oh, also, it doesn't like much to be interrupted. It freezes when you try to cancel search. (If this comment was disrespectful, please report it.)
|
8/1/2003 10:46:35 PM: Wolf McCloud
For this, just add a boolean that it will check when scanning. It is set to true when u want to stop... u know what to do. And again, great work! (If this comment was disrespectful, please report it.)
|
8/2/2003 12:03:12 AM: Alexandru Ionescu
I haven't seen it freeze with the API version...are you sure? Anyways I'll add a doevents, should've been there since the start. I'll fix up that menu bug as well... and of coures it gives an error with non-NTFS...it's not meant for NTFS :P. This isn't much of a full app to use, so of course there's lil bugs...it's up to the coders to improve it for their own use. Thank you for the comments though! (If this comment was disrespectful, please report it.)
|
8/2/2003 12:14:42 AM:
hi;
i wish to use u r NTFS article in one of my Security focused books to be released soon.
Credit of article will be Given to you. I just wanted permission to use it.
Please mail me at : Admin@Christudas.com
thx Regards Chris (If this comment was disrespectful, please report it.)
|
8/2/2003 8:26:18 AM: Sahir
no words just 5 ***** for u (If this comment was disrespectful, please report it.)
|
8/2/2003 10:44:21 AM: Chad Lavoie
This code is some of the best that I have ever seen. The only way to detect the ADS is when you try to copy the file to a non-NTFS partition, windows warns you that you will loose some stream data, displaying the name of the stream, just an interesting finding. 5 Stars from me, thanks for posting! (If this comment was disrespectful, please report it.)
|
8/2/2003 11:37:12 AM:
Requesting permission from moderator to give 7 globes. That's a real post!!! smashing!! (If this comment was disrespectful, please report it.)
|
8/2/2003 11:52:26 AM:
Very nice. This is the first time of commented. 5 globes. Nothing to click here to vote. (If this comment was disrespectful, please report it.)
|
8/2/2003 2:17:45 PM:
Thank you for your article: I knew about NTFS data streams but I realize I had never really understood what they are before reading your article. I wonder where you got all these informations!? 6 Globes. (If this comment was disrespectful, please report it.)
|
8/2/2003 3:35:54 PM: Timothy OConnor
yes i do want to know. How did you get the information. please e-mail me at visual314@aol.com also is there any programs that will find ads files. E-mail me please! (If this comment was disrespectful, please report it.)
|
8/2/2003 3:37:25 PM: Timothy OConnor
oh ya also then i rite click it doesn't display the options. i compiled it into a exe. (If this comment was disrespectful, please report it.)
|
8/2/2003 3:49:07 PM: Timothy OConnor
oh ya i have just one more question. Can you attach a ads to a folder or a reg key or something else other then a file? Please e-mail me at visual314@aol.com. And there are two bugs i found in the no api ads finder. (If this comment was disrespectful, please report it.)
|
8/4/2003 6:50:10 AM:
Man thank you very much. You are GREAT ;) BTW, the voting thing is not working !! :/ (If this comment was disrespectful, please report it.)
|
8/5/2003 2:08:37 PM:
The voting is now working. I have been trying for the past several days. I hope everyone who liked this code comes back and votes for you. Thanks for the tutorial, it was very well written! (If this comment was disrespectful, please report it.)
|
8/5/2003 8:53:58 PM:
Wow Great tutorials and very well written. Thancks (If this comment was disrespectful, please report it.)
|
8/5/2003 10:14:27 PM: James Dougherty
Nice! (If this comment was disrespectful, please report it.)
|
8/6/2003 1:16:25 AM: Wolf McCloud
Aw, if I vote twice, wont give 10 (If this comment was disrespectful, please report it.)
|
8/6/2003 11:25:51 AM: Sub-Zero
Great stuff. BTW, don't hard code the path to wordpad, on a non-english OS, we get a File not found error :) (If this comment was disrespectful, please report it.)
|
8/6/2003 11:44:48 AM: Sub-Zero
I just found something weird. I opened a file, created a new stream, but didn't save it, the app showed it with size 0, then I created another and this time I saved. But, the app was still showing only the first one. When I deleted it, the second one appeared! Is this a bug in ADS or in your enum sub? (If this comment was disrespectful, please report it.)
|
8/6/2003 3:11:35 PM: Sub-Zero
I modified it a little, I added a size column in seek mode, usefull for finding too big streams fast, I also added a menu to seek mode to switch to open mode with the selected file :) (If this comment was disrespectful, please report it.)
|
8/6/2003 4:03:09 PM: Phantom Man
I'll Give You 5 Globes For This Well Presented And Informative Artical. Truly A Well Presented Piece Of Information, Your Demonstration Code Is Very Nicley Layed Out and Presented As Well.
It's A Shame There's Not More Articals Of This Calibre.
You Get 5 Globes And My Best Regards. (If this comment was disrespectful, please report it.)
|
8/6/2003 4:05:20 PM: Phantom Man
You'll Get 5 Globes As soon As PSC Sorts The Voting Out! (If this comment was disrespectful, please report it.)
|
8/6/2003 6:29:51 PM: Alexandru Ionescu
Subzero: Thanks for the comments! The 0byte thing is a bug in my Listview implementation... I've known about it but didn't fix it... I will do a little update soon. The option to automatically switch from seek to open is very smart too, I'll add it as well. As for showing the size, I originally had it but was afraid it would slow down the seeking process. Anyone that implements the module is free to add it however. Once again, thanks for your support! (If this comment was disrespectful, please report it.)
|
8/7/2003 7:53:40 AM: Phantom Man
As Promised, Here's Your 5 Globes.
Regrads Phantom Man (If this comment was disrespectful, please report it.)
|
8/8/2003 2:57:52 PM: <>
I love your COde and Explanation, 5 Globes. Just one small thing. If i remember correct, you stated that You can only delete ADS by deleting the File its attached to or using your prog, right? Well this might seem to obvious, but there is one other way :). Copying the file to a FAT32 or FAT16 HD, this auto-strips the files from its ADS. But otherwise great work (If this comment was disrespectful, please report it.)
|
8/8/2003 3:00:50 PM: Sub-Zero
Hi again, I tested your program against another one I found, CrucialADS, and guess what, yours is WAY faster. It took only 25 seconds to scan my C drive, it took almost 5 minutes with CrucialADS to find the same thing. (If this comment was disrespectful, please report it.)
|
8/8/2003 3:14:41 PM: Alexandru Ionescu
Of course, having a fat/12/16/32 will permit the stripping of a stream, so will zipping a file without checking the "Save data streams" option by the way. Subzero: that's the beauty of using Native API (undocumented) instead of the Backup APIs. I'll be posting a revolutionnary code in 2 months (still working on it) that will basically let you look "under the hood" of NT. A user-friendly kernel-debugger kindof. (If this comment was disrespectful, please report it.)
|
8/12/2003 9:12:02 AM: Ali Akbar
Great Article once again. Very informative. Keep up the good work. (If this comment was disrespectful, please report it.)
|
8/18/2003 11:59:40 AM: Haru Glory
This is great!!! (If this comment was disrespectful, please report it.)
|
8/27/2003 3:27:56 PM:
Very very very very very very good.... Extremely good...! (If this comment was disrespectful, please report it.)
|
8/31/2003 12:47:52 PM: Pinoy Ako!
i can't test this bcoz my os is win 98 fat32. but when i read it and look at the code, it gave some ideas. for that, 5 globes. I hope you beat those 2 guys or at least be co-winners. you said they cheated. maybe yes, but they're code are really excellent. P.S. Your a true hacker(not j3rk hacker) in action. (If this comment was disrespectful, please report it.)
|
8/31/2003 1:58:49 PM: Alexandru Ionescu
Hi Pinoy, thanks for the comments. Their code is indeed very good and deserves to be on the top, but I am angered by the fact that in the last week they have tried to beat each others by adding more votes. They could've both won with only 40 votes each instead of fighting to beat each others :) (If this comment was disrespectful, please report it.)
|
9/9/2003 8:56:48 PM:
I get the message, Sorry your System doesnt support Alternate Data Streams. I'm on win2k though. Is there a service I have disabled that might be causing it? (If this comment was disrespectful, please report it.)
|
9/9/2003 9:07:46 PM: Alexandru Ionescu
Hi, are you sure you're using NTFS? (If this comment was disrespectful, please report it.)
|
9/10/2003 12:47:04 AM: Pinoy Ako!
Congratulations. I guess you're right. the other one cheated, he has more votes but did'nt win....... (If this comment was disrespectful, please report it.)
|
9/11/2003 7:25:13 AM: Lenin Cruz
Your codes great! This is the kind of stuff im looking for! hmmmmmmmmmmmm....Ideas popping out of my head
5 globes for you (If this comment was disrespectful, please report it.)
|
9/13/2003 6:22:44 PM:
Excellent Mate... You've already won the award, but 5 globes from me anyway. Very well written tutorial and some great code!!! (If this comment was disrespectful, please report it.)
|
9/14/2003 4:02:06 PM:
very, very informative tutorial. great job and thank you for taking the time to share! (If this comment was disrespectful, please report it.)
|
9/16/2003 6:19:38 PM: Billy Conner
its kinda late to be saying this, but i just thought i'd add that you can create/open/modify ADS streams using vb without API. EX:Open "c:\MyGame\Game.exe:SavedData" For Binary As #1. Note:Always check for NTFS first. (If this comment was disrespectful, please report it.)
|
9/16/2003 7:45:42 PM: Alexandru Ionescu
Thanks everyone for your kind comments! I really appreciate it! Billy, of course you can do it using VB...but Open/Close end up calling CreateFile API...so it's the same thing. Also, the point of the program was to discover/find and get stream data information, not simply open them knowing their existence. Thanks for the input. (If this comment was disrespectful, please report it.)
|
9/17/2003 9:35:57 AM:
Heres the problem: -Windows 2000. - Tried it on both NTFS partitions. C: (swap,1st partition) D: (Windows drive,2nd partition) NTFS E: (data partition, 3rd partition) NTFS
I get the FAT Error on the NTFS drives: - 'Sorry your System doesnt support Alternate Data Streams'. - I click OK. - I then get 'Runtime Error 5' if I run if I click Search for Hidden Data Streams after the error MsgBox mentioned previously goes away. (If this comment was disrespectful, please report it.)
|
9/17/2003 4:23:57 PM: Alexandru Ionescu
Try to change the code to point to D or E...the C: value is hardcoded. (If this comment was disrespectful, please report it.)
|
9/20/2003 7:11:01 PM: KenKnutson
I must say I'm impressed. It's not very often I get a chance to learn about, as well as details of, several things I hadn't been aware of before. I'm relatively new to NTFS and knew nothing about ADS, thanks for the very detailed and informative article. (If this comment was disrespectful, please report it.)
|
9/24/2003 10:23:49 AM: Daniel Keep
It's not often that you come across someone who actually brings something that's little known (or, indeed, unknown in some cases) to the table, as opposed to simple rehashing a well-established formula (how many bitmapped button controls are there, anyway?). This is an excellent article, and I'm happy to say that I've learnt something new. I use FAT32, so it's not much practical use to me, but oh well; at least I'm much the wiser :) (If this comment was disrespectful, please report it.)
|
9/24/2003 5:55:51 PM:
Well done Alexandru, I'm impressed. Thanks for your excellent contribution to the open source community. ***** (If this comment was disrespectful, please report it.)
|
9/25/2003 11:59:40 PM: Alexandru Ionescu
Thanks a lot everyone for your comments. I will hopefully have time to submit my new article for October :) (If this comment was disrespectful, please report it.)
|
9/26/2003 2:00:48 PM: antares
this is a clear explanation and original piece of c++ like VB implemention - great work !!!
(If this comment was disrespectful, please report it.)
|
9/27/2003 12:08:49 AM: Brian Clark
wow. Simply wow. This is by FAR the best artical I have ever seen here on PSC. (If this comment was disrespectful, please report it.)
|
10/2/2003 7:44:38 AM:
Well done mate! this is a hell of an article!
I found a small bug, when I try erasing the stream, it deletes the original file :) . I'm glad I didn't tried that with explorer.exe :D (If this comment was disrespectful, please report it.)
|
10/2/2003 3:46:52 PM:
Nice but old... How to copy executable code? Simple: "type exefile.exe > txtfile.txt:exename.exe "
Running it? No big deal, type on the command prompt: start c:\txtfile.txt:exename.exe (If this comment was disrespectful, please report it.)
|
10/30/2003 5:16:03 AM:
Five star job! (If this comment was disrespectful, please report it.)
|
10/30/2003 10:45:17 AM:
Whats your other languages? Great tutorial! Only wish i had NT! (If this comment was disrespectful, please report it.)
|
11/5/2003 5:08:59 AM: mvdz
Very interesting article. I found other information regarding ADS on http://www.heysoft.de/nt/ntfs-ads.htm (If this comment was disrespectful, please report it.)
|
11/6/2003 10:00:53 AM: Chris George
Very Nice job. I learned something new today! Thanks for sharing :) (If this comment was disrespectful, please report it.)
|
11/8/2003 11:11:24 AM: Bryant Zadegan
Holy Fµ<| All 5 of my balls go to you today D@mn I sure wish i could have given u more tho... (If this comment was disrespectful, please report it.)
|
11/11/2003 9:06:30 AM: TrewG
Absolutely fantastic, this has opened a whole new world of possibilities (well fo me anyway). Thanks well worth top marks. (If this comment was disrespectful, please report it.)
|
11/11/2003 8:49:48 PM: hoy boy
great...5 globes (If this comment was disrespectful, please report it.)
|
11/16/2003 4:02:29 AM:
Excellent piece of work. I hope that your excellence will be some day appreciated by means other (i.e. $$$ :-) than only fellow programmers' respect. After all one has to make a living, right? (If this comment was disrespectful, please report it.)
|
12/24/2003 5:01:58 AM: Ian Northwood
Anyone trying to put this to practical use will speedily find that few apps actually support ADS. Among that number we can include, er, any Office app.
LOL..... (If this comment was disrespectful, please report it.)
|
2/4/2004 1:22:12 PM: Ben Lewis
thanks, i now can change the autor details on ma music wen it messes up (If this comment was disrespectful, please report it.)
|
3/28/2004 7:37:44 AM:
Comming from a C on Linux/BSD person who usually treats VB with disdain, this code is great. With the history and background information, the article also feels like UNIX style documentation. I was initially perplexed how an obvious trojan (listening on 65535) could hide on a neighbor's PC, but ever-faithful Google lead me to ADS stuff and eventually here. Although I realize that this isn't a full-fledged utility, I have two important suggestions (both pertain to the Seeker function) : watch out for directories and filenames that start with a period - I've seen just a few :-) - also don't forget to check directories for named streams. (If this comment was disrespectful, please report it.)
|
11/8/2004 1:19:52 AM: Billy Conner
im using xpsp2 now and i try to use this to edit/view/delete and it doesnt work due to it needing to trim the null chars from the end of the variable FileName before you append GetSelectedItem to it(Just the API version).i fixed it easily though; i just trimmed GetSelectedItem when it stores to Filename in the WM_NOTIFY subclassing procedure. also i see that it still scans even when i select an item. there is no way back to the first list. and the new list that shows gets items added to it when its scanning. so that its showing the path names and the ADS for the current selected path. thats probably a hard bug to fix though; maybe just disabling the scan would be more proper when a file is selected. i get errors when i keep double clicking on items in the list. anyways i hope you can understand what im trying to explain. just keep messing around with the listview items and it'll error on you quite often on both versions. (If this comment was disrespectful, please report it.)
|
2/9/2005 5:37:04 PM:
bruce@aol.com (If this comment was disrespectful, please report it.)
|
2/9/2005 5:39:46 PM:
email addresses (If this comment was disrespectful, please report it.)
|
2/9/2005 5:47:23 PM:
john@aol.com (If this comment was disrespectful, please report it.)
|
12/4/2005 2:10:51 AM: kody
Proud to share same country. I've learned things I have never thought about ... 5 stars. (If this comment was disrespectful, please report it.)
|
8/1/2009 1:04:20 PM: jim sie
Absolutely genius .. how that can be? read the delete files.. graet man absoltely genius.. mY regard from Indo thanks (If this comment was disrespectful, please report it.)
|
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)
To post feedback, first please login.
|