Dela via


Kommandoexempel för livesvar

Gäller för:

Vill du uppleva Microsoft Defender för Endpoint? Registrera dig för en kostnadsfri utvärderingsversion.

Lär dig mer om vanliga kommandon som används i livesvar och se exempel på hur de vanligtvis används.

Beroende på vilken roll du har kan du köra grundläggande eller avancerade livesvarskommandon. Mer information om grundläggande och avancerade kommandon finns i Undersöka entiteter på enheter med livesvar.

analyze

# Analyze the file malware.txt
analyze file c:\Users\user\Desktop\malware.txt
# Analyze the process by PID
analyze process 1234

connections

# List active connections in json format using parameter name
connections -output json
# List active connections in json format without parameter name
connections json

dir

# List files and sub-folders in the current folder (by default it will show relative paths [-relative_path])
dir
# List files and sub-folders in the current folder, with their full path
dir -full_path
# List files and sub-folders in a specific folder
dir C:\Users\user\Desktop\
# List files and subfolders in the current folder in json format
dir -output json

fileinfo

# Display information about a file
fileinfo C:\Windows\notepad.exe

findfile

# Find file by name
findfile test.txt

getfile

# Download a file from a machine
getfile c:\Users\user\Desktop\work.txt
# Download a file from a machine, automatically run prerequisite commands
getfile c:\Users\user\Desktop\work.txt -auto

Obs!

Följande filtyper kan inte laddas ned med det här kommandot från Live Response:

Dessa filtyper stöds av PowerShell.

Använd PowerShell som ett alternativ om du har problem med att använda det här kommandot inifrån Live Response.

library

# List files in the library
library
# Delete a file from the library
library delete script.ps1

processes

# Show all processes
processes
# Get process by pid
processes 123
# Get process by pid with argument name
processes -pid 123
# Get process by name
processes -name notepad.exe

putfile

# Upload file from library
putfile get-process-by-name.ps1
# Upload file from library, overwrite file if it exists
putfile get-process-by-name.ps1 -overwrite
# Upload file from library, keep it on the machine after a restart
putfile get-process-by-name.ps1 -keep

registry

# Show information about the values in a registry key
registry HKEY_CURRENT_USER\Console
# Show information about a specific registry value (the double backslash \\ indicates a registry value versus key)
registry HKEY_CURRENT_USER\Console\\ScreenBufferSize

remediate

# Remediate file in specific path
remediate file c:\Users\user\Desktop\malware.exe
# Remediate process with specific PID
remediate process 7960
# See list of all remediated entities
remediate list

run

# Run PowerShell script from the library without arguments
run script.ps1
# Run PowerShell script from the library with arguments
run get-process-by-name.ps1 -parameters "-processName Registry"

Obs!

För långvariga kommandon som "run" eller "getfile" kanske du vill använda symbolen "&" i slutet av kommandot för att utföra åtgärden i bakgrunden. På så sätt kan du fortsätta undersöka datorn och återgå till bakgrundskommandot när du är klar med grundläggande fg-kommando.

När du skickar parametrar till ett livesvarsskript ska du inte inkludera följande förbjudna tecken: ';', '&', '|', '!' och '$'.

scheduledtask

# Get all scheduled tasks
scheduledtasks
# Get specific scheduled task by location and name
scheduledtasks Microsoft\Windows\Subscription\LicenseAcquisition
# Get specific scheduled task by location and name with spacing
scheduledtasks "Microsoft\Configuration Manager\Configuration Manager Health Evaluation"

undo

# Restore remediated registry
undo registry HKEY_CURRENT_USER\Console\ScreenBufferSize
# Restore remediated scheduledtask
undo scheduledtask Microsoft\Windows\Subscription\LicenseAcquisition
# Restore remediated file
undo file c:\Users\user\Desktop\malware.exe

Tips

Vill du veta mer? Engage med Microsofts säkerhetscommunity i vår Tech Community: Microsoft Defender för Endpoint Tech Community.