Examples of command line parameters

Kaspersky Threat Intelligence Portal allows you to start object execution with specific command line parameters. The Command line parameters field is optional and available only when a Microsoft Windows execution environment is selected.

You can use environment variables by placing the % sign in front of and after the variable name, for example: %SYSTEMROOT%. By default, the environment variables are expanded on the user's host before the object is transferred to and executed in the Sandbox. To transfer environment variables to the Sandbox as is, without expansion, use the %% sign, for example: %%SYSTEMROOT%%.

The command line may contain a $sample variable that will be replaced in the Sandbox with the actual path to the object in the operating system (for example, <notepad path> /A $sample).

A command in the command line must not exceed 1024 characters, otherwise Kaspersky Threat Intelligence Portal shortens it. Depending on the technical constraints of an operating system that is used as an execution environment in the Sandbox, the command may be further shortened.

Examples:

Specify an application that you want to execute the object with:

%windir%\System32\notepad.exe /a $sample

"%ProgramFiles%\Internet Explorer\iexplore.exe" $sample

 

Specify a file to write the output of the object to:

$sample > %userprofile%\test_output.txt

 

Execute an object and write the output into a file that includes the computer name as the file name:

$sample --t –r=2 >> %TEMP%\%COMPUTERNAME%.txt

Environment variables usage

Environment variables

Microsoft Windows 10 x64

Microsoft Windows 7 x64

Microsoft Windows 7

Microsoft Windows XP

ALLUSERSPROFILE

Yes.

Yes.

Yes.

Yes.

APPDATA

Yes.

Yes.

Yes.

Yes.

CLIENTNAME

.

No.

No.

Yes.

CommonProgramFiles

Yes.

Yes.

Yes.

Yes.

CommonProgramFiles(x86)

Yes.

Yes.

No.

No.

CommonProgramW6432

Yes.

Yes.

No.

No.

COMPLUS_ProfAPI_ProfilerCompatibilitySetting

Yes.

Yes.

Yes.

Yes.

COMPUTERNAME

Yes.

Yes.

Yes.

Yes.

ComSpec

Yes.

Yes.

Yes.

Yes.

COR_ENABLE_PROFILING

Yes.

Yes.

Yes.

Yes.

COR_PROFILER

Yes.

Yes.

Yes.

Yes.

DriverData

Yes.

No.

No.

No.

FP_NO_HOST_CHECK

No.

Yes.

Yes.

Yes.

HOME

No.

No.

No.

No.

HOMEDRIVE

Yes.

Yes.

Yes.

Yes.

HOMEPATH

Yes.

Yes.

Yes.

Yes.

LOCALAPPDATA

Yes.

Yes.

Yes.

No.

LOGNAME

No.

No.

No.

No.

LOGONSERVER

Yes.

Yes.

Yes.

Yes.

MAIL

No.

No.

No.

No.

NUMBER_OF_PROCESSORS

Yes.

Yes.

Yes.

Yes.

OneDrive

Yes.

No.

No.

No.

OS

Yes.

Yes.

Yes.

Yes.

Path

Yes.

Yes.

Yes.

Yes.

PATHEXT

Yes.

Yes.

Yes.

Yes.

PROCESSOR_ARCHITECTURE

Yes.

Yes.

Yes.

Yes.

PROCESSOR_IDENTIFIER

Yes.

Yes.

Yes.

Yes.

PROCESSOR_LEVEL

Yes.

Yes.

Yes.

Yes.

PROCESSOR_REVISION

Yes.

Yes.

Yes.

Yes.

ProgramData

Yes.

Yes.

Yes.

No.

ProgramFiles

Yes.

Yes.

Yes.

Yes.

ProgramFiles(x86)

Yes.

Yes.

No.

No.

ProgramW6432

Yes.

Yes.

No.

No.

PROMPT

Yes.

Yes.

Yes.

Yes.

PSModulePath

Yes.

Yes.

Yes.

No.

PUBLIC

Yes.

Yes.

Yes.

No.

PWD

No.

No.

No.

No.

SESSIONNAME

Yes.

Yes.

Yes.

Yes.

SHELL

No.

No.

No.

No.

SHLVL

No.

No.

No.

No.

SystemDrive

Yes.

Yes.

Yes.

Yes.

SystemRoot

Yes.

Yes.

Yes.

Yes.

TEMP

Yes.

Yes.

Yes.

Yes.

TERM

No.

No.

No.

No.

TMP

Yes.

Yes.

Yes.

Yes.

USER

No.

No.

No.

No.

USERDOMAIN

Yes.

Yes.

Yes.

Yes.

USERDOMAIN_ROAMINGPROFILE

Yes.

No.

No.

No.

USERNAME

Yes.

Yes.

Yes.

Yes.

USERPROFILE

Yes.

Yes.

Yes.

Yes.

windir

Yes.

Yes.

Yes.

Yes.

windows_tracing_flags

No.

Yes.

Yes.

No.

windows_tracing_logfile

No.

Yes.

Yes.

No.

XDG_RUNTIME_DIR

No.

No.

No.

No.

XDG_SEAT

No.

No.

No.

No.

XDG_SESSION_ID

No.

No.

No.

No.

XDG_VTNR

No.

No.

No.

No.

Page top