Closed Meatballs1 closed 8 years ago
n.b. The code parses out pretty much all the pieces of data, you dont need to grab all of these bits for what we want, but you need to work out most of the offsets as you go anyway due to variable sized objects. If someone wants to take the code later and output the $prefix
value and each of the target $server_name
and $share_name
they can see where each folder is being redirected.
From a real life environment using DFSv1, each users home directory had a redirection to another file-share, rather than being hosted directly on the namespace server. The Pkt structure contains a list of each of the folders and their targets. I'm not sure if this occurs in DFSv2.
For example
\\domain\dfsshare\home\bob
is on thedfsshare
namespace which is hosted onDC01
The redirection for folder
\bob
points to\\fileshare01\homes$\bob
etc.Previously
Get-DFSShare
will just listDC01
as a fileshare.https://msdn.microsoft.com/en-us/library/cc227146.aspx
This additional code parses the Pkt, grabs each of the unique servername targets under the namespace so that they can be interrogated by
Invoke-UserHunter
etc.Testing Environment
New Folder
Output