Jul 30, 2012

Obtain Domain Controller list in AD

Here's a quick way to find find out the server name of the AD domain controller on your network.

c:\> nltest /dc:labs.example.org

 

If you are running on a Linux machine, you also can find out the server name and IP address in AD too.

$ nslookup -type=all _ldap._tcp.dc._msdcs.labs.example.org

$ dig @dns1.example.org  _ldap._tcp.dc._msdcs.labs.example.org -t srv

$ dig @dns1.example.org  _ldap._tcp.dc._msdcs.labs.example.org -t any


Jul 4, 2012

File and Folder Ending with Period/Dot

This is a small test on NTFS.

Usually there is no way for you to have file or folder name that ends with a "period" or "dot". For example, you create a new folder called "F1.", Windows OS will rename it to "F1".

One day, I save a PDF file to my Windows 7 (64-bit) from SANS (using Chrome), and for some reasons the file is saved as an ending "dot". And I can't open/del/ren/mov the file. I even try to remove the folder that contain the file but still fail.

After a quick search, here's what I found this, http://support.microsoft.com/kb/320081
But to have fun on this, you still can try.

To Create a File or Folder that ends with "dot":
c:\mkdir \\?\c:\folder.
c:\echo test > \\?\c:\file.

To Remove a file or folder that ends with "dot":
c:\rmdir \\?\c:\folder.
c:\del \\?\c:\file.

Basically those files and folders can't be accessed at all. And you can't rename or move them. Have fun!