0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

インシデントレスポンスで役に立つpowershellコマンド20

Posted at
Get-Process # 現在の実行中プロセス一覧を取得。プロセスの状態確認に必須。

Get-Service # サービスの状態を確認。マルウェア感染によるサービス改変の調査に。

Get-EventLog -LogName Security -Newest 100 # セキュリティログの最新100件を取得。ログオンや権限変更など監視。

Get-WinEvent -LogName System -MaxEvents 100 # システムログの取得。システムエラーやサービスの問題調査。

Get-Command # 利用可能なコマンド一覧を確認。

Get-ProcessMitigation # プロセスの緩和設定(DEP、ASLRなど)を取得。

Get-NetTCPConnection # TCPネットワーク接続情報を取得。マルウェアの不正通信検知に役立つ。

Test-NetConnection -ComputerName <IP> -Port <Port> # 指定IP/ポートへの接続テスト。ファイアウォールなどの疎通確認。

Get-ItemProperty -Path "HKLM:\Software\Microsoft\Windows\CurrentVersion\Run" # スタートアップに登録されたプログラムの確認。

Get-Content -Path C:\Windows\System32\winevt\Logs\Security.evtx # イベントログファイルの直接内容表示。

Get-Process | Where-Object {$_.CPU -gt 100} # CPU使用率が高いプロセスを抽出。不審な動作の特定に使う。

Get-WmiObject Win32_StartupCommand # 起動時コマンドの一覧。スタートアップ設定を取得。

Get-ChildItem -Path C:\ -Recurse -Force -ErrorAction SilentlyContinue # フォルダ内のファイルを再帰的に列挙。不審ファイル探索に使用。 

Get-Acl -Path <ファイルパス> # ファイルやフォルダのアクセス権限を確認。

Get-History # PowerShellのコマンド実行履歴を表示。

Invoke-WebRequest -Uri <URL> # 指定URLからデータ取得。攻撃者のC2など通信調査に。

Get-Process | Select-Object Name,Id,Path # プロセスの実行ファイルパスを含む詳細取得。

Get-WmiObject Win32_Process | Select-Object Name,ProcessId,CommandLine # プロセスの起動コマンドライン情報取得。

Get-EventLog -LogName Application -After (Get-Date).AddDays(-1) # 過去1日間のアプリケーションログを取得。

Get-ScheduledTask # スケジュールされたタスク一覧を取得。マルウェアの持続化手段の確認に使う。
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?