Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell Docker Containers #982

Merged
merged 6 commits into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Modules/Windows/PowerShell_Docker_Containers.mkape
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Description: Docker Container Details
Category: LiveResponse
Author: DReneau
Version: 1.1
Id: 87bf8201-6256-45ad-8b2b-a6034235db53
ExportFormat: txt
Processors:
- Executable: C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe
CommandLine: "$filePath = '%destinationDirectory%\\docker_container_info.txt'; $dockerOutput = (docker version | Out-String).TrimEnd() + [System.Environment]::NewLine + [System.Environment]::NewLine + (docker ps --all --format 'ID: {{.ID}} | Name: {{.Names}} | Image: {{.Image}} | Size: {{.Size}} | Status: {{.Status}} | Command: {{.Command}}' | Out-String).TrimEnd(); Set-Content -Path $filePath -Value $dockerOutput -Encoding UTF8;"
ExportFormat: txt

# Documentation
# https://docs.docker.com/reference/cli/docker/container/ls/
# This module combines Docker ps and Docker version commands. Output is based on installed Docker and the status.
# Example:
# .\kape.exe --msource C:\kape\path\to\acquired\Windows\System32\config --mdest C:\kape\out --module powershell_docker_containers