-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copying "unknown" reparse points #34
Comments
Hi Jeffrey, Actually what's your use case for doing such a copy? |
Does it contain more than the data fsutil dumps? From what I understand the actual .exe being started in the WindowsApps Folder contains a special condition for being executed (look in the explorer right click properties dialogue, there will be a new column checking for some string, which matches the first string contained in the data of that reparse point ). I think the case of wsl this is kinda being used as setuid mechanism, where it is checked that was run through the "symlink" contained in the users appdata folder, and then the wsl can with elevated credentials startup its vm... Anyways, my usecase might be a bit special, but the whole ordeal is. Due to some misunderstandings, the local users AppData folder was being deleted, along with all the necessary app exec links for wsl. Now all uninstalling and reinstalling of wsl did not work, and as such starting it as a user won't work ( as the .exe files in the WindowsApps folder cannot be started as a normal user, unless started through that special link). All attempts to re-create them from scratch for me failed so far, so I was thinking about, that if they do only consist of all the information that fsutil can also display, that feeding that data block to some tool and then re-creating the link might do the deal. M$ support answer is simple as always: just reinstall windoze. Another usecase to be able to create them with arbitrary data might be to play around and see how they work. Decompiling windows code to figure out whats going on is really tedious and leads to too much dead ends ;) |
No, as far as I can tell, everything is in fsutil output. I could easily create a new dedicated tool for managing AppExecLinks. (Displaying the content of existing ones, or creating new ones.)
The third string is the target executable. But as shown above, it's not always directly related to the target application. Note that the AppExecLink.bat script I used above is just a simple wrapper around fsutil.exe. It only converts the hexadecimal dump to readable strings. And it only works with ASCII strings. The final tool should support any Unicode character. |
My hope here would be that while it would initially be difficult, having a tool to play with will one day lead to more knowledge about what works and what doesn't.... |
Hi, this might be an odd request, but it seems that a lot of windows internal knowledge is in these libraries. Since at least 2018 windows has a special kind of reparse point ( 0x8000001b ) that acts similar to a symlink but contains some extra data ( that seemingly gets passed on to checking for executable permissions etc. when executing files through it... things are rather bad documented here.. )
Would it be possible that the junction tool ( or maybe it fits better into any other?? ) can copy reparse points verbatim? Or even create the attached data from a file or similar?
It happens sometimes that one of these special reparse points gets deleted, and sometimes the only solution is to reinstall windows, but all that was really needed is to (re)create that reparse point...
The text was updated successfully, but these errors were encountered: