Working with Processes and Services Flashcards

1
Q

What is the basic command for displaying all running processes?

A

Get-Process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What Get-Process parameter is used for filtering process by their name?

A

Get-Process -Name {process_name}

Get-Process -Name "notepad"

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What Get-Process parameter is used for retrieving the process with a specific process ID (PID)?

A

Get-Process -Id {PID}

Get-Process -Id 31132

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What Get-Process parameter is used to include the user that runs the service?

A

Get-Process -IncludeUsername {username}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What Get-Process parameter is used for

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You have an IP address of 34.120.241.214 that you find suspicious so you would like to determine which process communicates to that IP address. How would you do it?

A
C:\Windows\System32>netstat -ano | findstr 34.120.241.214
  TCP    10.43.43.1:55549       34.120.241.214:443     ESTABLISHED     9304

C:\Windows\System32>tasklist | findstr 9304
Evernote.exe                  9304 Console                    2     21,900 K

in CMD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the very useful CMD command used to display a list of currently running tasks, including services and processes?

A

tasklist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Does tasklist require administrative privileges?

A

no, it does not typically require administrative privileges to run, making it accessible for general users

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to display status for the eventlog service in CMD?

A
C:\Windows\System32>sc query eventlog

SERVICE_NAME: eventlog
        TYPE               : 30  WIN32
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which command is used in PowerShell to provide a list of services?

A

Get-Service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to use tasklist to display only running processes?

A

tasklist /FI "STATUS eq running"

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to export a table of running processes to CSV file in CMD?

A

tasklist /FI "STATUS eq running" /FO CSV > C:\Users\jan\Desktop\running_tasks.csv

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to display all tasks that have DLL modules loaded in them with tasklist?

A

tasklist /M

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How to use tasklist to determine which services are running under which instances of svchost.exe and other host processes?

A

tasklist /svc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How to display detailed information about the listed tasks, including the session number, session name, memory usage, etc. with tasklist?

A

tasklist /V

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the Window Title column in the output of the tasklist /V command?

A
  • title of the window associated with each process, if applicable
  • particularly relevant for processes that have a user interface with a visible window
  • when a process has a graphical user interface (GUI) with an open window, the “Window Title” column shows the title of that window

the window title might be the name of the opened Word document

17
Q

How to check which processes are running with elevated privileges in Windows?

A

Task Manager > Details > right click on a column > Select Columns > Elevated

18
Q

How to filer out lines that have “N/A” value in the Window Title in tasklist /v command?

A

tasklist /V | findstr /V /C:"N/A"
<br></br>
* tasklist /V generates the verbose list of tasks.
* | pipes the output of tasklist to findstr.
* findstr /V is used to print only lines that do not contain the specified string.
* /C:”N/A” specifies the string to exclude, in this case, “N/A”.

19
Q

What is the purpose of the Session Name column in the tasklist output?

A

provide information about the type of session in which a process is running

20
Q

If the value of the Session Name column is Services for a process, what does it mean?

A
  • process is running in Session 0, which is reserved for system services and other non-interactive processes
  • typically system-level processes, background services, and drivers that do not interact directly with the user interfac
21
Q

If the value of the Session Name column is Console for a process, what does it mean?

A

interactive user session - indicates that the process is part of a user session, where it can interact with the user interface and the logged-in user can interact with the process

22
Q

How to display all running process and their process name, process ID, the user running the process, when the process started, and the path of the executable file sorted by the start time?

A

Get-Process -IncludeUserName | Select-Object Name, ID, UserName, StartTime, Path | Sort-Object StartTime