Boot Process Flashcards

Learn the boot process

1
Q

Win XP - Pre-Boot

A

Power On Self Test (POST)

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

Win XP - MBR

A

Loads boot code

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

Win XP - Bootcode

A

Searches partition table for boot sector and loads NTLDR

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

Win XP - NTLDR

A

Reads in boot.ini for OS choices, runs NTDETECT.com to query hardware
Stored data from NTDETECT.com in HKLM\Hardware registry key
Starts NTOSKRNL.exe and HAL.dll

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

Win XP - NTOSKRNL.exe

A

starts SMSS.exe

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

Win XP - SMSS.exe

A

Launches Winlogon.exe and CSRSS

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

WIn XP - Winlogon

A

starts LSASS, loads MSGINA, starts SCM, starts logonui.exe

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

WIn XP - MSGINA.dll

A

Graphical Identification and Authorization (GINA) dll library
Activates the user shell
Customizable identification and authentication procedures
Logon dialog

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

WIn XP - Winlogon

A

Receives credentials from MSGINA and passes them to LSASS

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

WIn XP - LSASS

A

Checks creds against LSA database cache then NTLM or Kerberos if not found
Sends user token back to Winlogon

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

WIn XP - Winlogon

A

Starts userinit in user context

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

WIn XP - Userinit

A

Loads user profile, runs startup programs, starts explorer.exe

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

BIOS

A

Basic Input/Output System

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

Win7 - Pre-Boot

A

Power On Self Test (POST)

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

Win7 - MBR

A

First 512 byte sector on hard disk

Reads and loads Volume Boot Record

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

Win7 - VBR

A

Loads bootmgr into memory

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

Win7 - Bootmgr

A

Reads Boot Config Database (BCD)
Boot menu and memtest
Calls winload (fresh boot)
Calls winresume

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

Win7 - Winload

A

Loads NTOSKRNL.exe
Loads dependencies
Loads device drive

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

Win7 - NTOSKRNL

A

SYSTEM
Prepares for running native system
Runs SMSS

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

Win7 - HAL.dll

A

Hardware Abstraction Layer (HAL)

Interfaces driver to kernel

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

Win7 - SMSS

A

Session manager
Session 0 loads Win32k.sys (kernel subsystem)
Runs WININIT

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

Win7 - WININIT

A

Starts Service Control Manager (SCM)
Starts Local Security Authority SubSystem (LSASS)
Starts Local Session Manager (LSM)

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

Win7 - CSRSS

A

Client/Server Runtime SubSystem
Client side of the win32 subsystem process
Thread creation

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

VBR

A

Volume Boot Record

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
CSRSS
Client/SErver Runtime SubSystem
26
SMSS
Session Manager SubSystem
27
BCD
Boot Config Database
28
EFI
Extensible Firmware Interface
29
UEFI
Unified Extensible Firmware Interface
30
EFI/UEFI - Step 1
Power On Self Test (POST)
31
EFI/UEFI - Step 2
``` Runs Bootloader (from NVRAM) Loads BCD (also in NVRAM) ```
32
EFI/UEFI - Step 3
Bootloader detects hardware
33
EFI/UEFI - Step 4
EFI boot manager gives OS boot menu
34
EFI/UEFI - Step 5
Winload.efi: EFI version of winload
35
EFI/UEFI - Step 6
Requires EFI system partition Formatted as FAT Up to 1GB in size
36
Win7 - Winlogon
Coordinates logon and useractivity | Launches logonui
37
Win7 - Logonui
Interactive logon dialog box
38
Win7 - Services
Loads auto-start drivers and services
39
Main difference between local and domain logon
Where the user is authenticating
40
Local Logon authenticates where?
Locally
41
Domain Logon authenticates where?
With the domain controller
42
Tasklist
cmd.exe : loaded modules, services, owner
43
Process States - New/Created
Open file (.exe) Create initial thread Pass to kernel32.dll to check permissions Pass to csrss, build structure, spawns first sub-thread, inserts into windows subsystem-wide proc list Starts execution of initial thread For real-time systems, processes may be held in “New State” to avoid contention, otherwise moved to “Ready State”
44
Process States - Running
Process currently being executed (one or more threads executing)
45
Process States - Ready
Process ready to execute when given the opportunity (CPU Time)
46
Process States - Waiting
Process can’t execute until some event occurs (I/O Read)
47
Process States - Terminated/Exit
Termination of a process due to a halt or abort
48
Paging - Pages
Memory is allocated to process in distinct chunks
49
Paging - Page Size
Smallest unit of protection at the hardware level | 4KB for small page, 2MB for large page
50
Paging - Overcommitted
Physical memory becomes overcommitted (threads try to use more memory than available) pages are written to the page file on disk
51
Paging - Page Fault
Occurs when a thread references an invalid page | if page is on disk in the page file, it can be brought back into memory
52
What are Windows Services?
Long running executable application that run in their own container (process) Can be started automatically at boot, on demand, or when requested Can be paused, stopped, or restarted Run in the background, normally without a user interface
53
sc
cmd.exe, querying and management
54
Sc queryex eventlog
info for eventlog service including PID
55
Tasklist /FI “pid eq XXX” /v
query tasklist for PID associated with eventlog
56
Tasklist /FI “pid eq XXX” /svc
query tasklist for svchost services
57
Sc qdescription eventlog
query eventlog service description
58
Sc qc eventlog
show the binary command that loads the service
59
Threads
Basic unit to which the OS allocates processor time Can execute any part of the process code Including parts currently being executed by another thread Share memory with each other as well as the process Deadlock is possible if the threads are waiting for each other’s resources Synchronization (semaphores, mutexes) are used to control access to shared variables Client/Server Run-Time Subsystem (CSRSS) maintains a list of threads Threads are part of a execution priority pool 0-31 per processor, highest executes next
60
Handles
Objects are data structures representing a system resource (file, thread, etc) Applications can’t access objects directly, must obtain a handle Handles for each process are tracked in an internal table known as the Object Manager Handles allow a common interface to objects, regardless of underlying changes to the object Handles allow Windows to track ACLs for objects during handle creation time
61
Thread States - Ready
Waiting for Execution, in priority pool
62
Thread States - Deferred Ready
Selected to run, but not yet executed. Optimization for scheduling database
63
Thread States - Standby
Next thread to run, only one per processor per system
64
Thread States - Running
A thread currently running on a processor
65
Thread States - Waiting
A period of inactivity while waiting for an event
66
Thread States - Transition
Ready for execution, but paging needed to bring back into memory
67
Thread States - Terminated
Finished execution, heading for deallocation in most cases
68
Thread States - Initialized
Thread is being created
69
Process
The primary container (memory structure) for a program being executed
70
Thread
Represents sequential machine-code instructions that a processor executes
71
Handle
Pointer to OS objects referenced within a process
72
What are system processes?
processes owned by, and executed by the operating system | required for the system to function
73
What are the two types of system processes?
User | Kernel
74
User mode processes
Runs in private virtual address space | Applications are isolated, one crash will not cause another to crash
75
Kernel mode processes
All run in a single virtual address space | Not isolated from other processes
76
Virus
Requires user interaction to replicate
77
Worm
Does not require user interaction to replicate
78
Trojan
Malware hidden within another legitimate program | Not usually self-replicating
79
Malicious Mobile Code
Transmitted from remote host to local host | Executed without user instruction (i.e. Javascript, VBScript, etc)
80
Blended Attack
Multiple infection/transmission methods used together
81
Backdoor
Malicious program that allows illegitimate access to a machine User is unaware
82
Remote Access Tool (RAT)
Malicious program that provides remote command and control
83
Rootkit
Malicious program that is ONLY used to hide things | DOES NOT provide access or command and control alone
84
Keylogger
Records keyboard usage
85
Botnet Client
Remote administration/Command and Control of a botnet
86
Spyware
Monitors behavior of user
87
Adware
Paid for ads to infected users
88
Ransomware
Blocks access to a resource, requires payment from victim
89
Bot Herder
Person in control of the botnet
90
Botnet
Multiple machines infected and controlled by a bot herder
91
Zombie
Individual machine infected and part of the botnet
92
Static Analysis
Examine malware without executing it | Strings
93
Dynamic Analysis
Examine malware while it is running
94
What is virtualization?
Virtualization is technology that allows you to create multiple simulated environments or dedicated resources from a single, physical hardware system. Software called a HYPERVISOR connects directly to that hardware and allows you to split 1 system into separate, distinct, and secure environments known as VIRTUAL MACHINES (VMs).
95
Benefits of virtualization
One set of Hardware -> Many virtual machines (VM) VMs can be dynamically created and allocated to users Baseline Image can be more rapidly updated VMs instances can easily be rolled back to undo changes Provide fault tolerance through redundant hardware and migration Could be used as a pivot point Could provide persistence if data store is compromised Lessens attribution Configurable software solution (OS, Services, Programs, etc) Useful for protected Malware Analysis (Malware Detonation Chamber) Quick restoration times Usable as Honey Pot or Tar Pit Difficult for malware to maintain persistence Easily manageable across enterprise
96
Risks of Virtualization
Typically require more upfront planning and configuration In public cloud environments, lack of granularity in control of data at rest can lead to compliance issues (HIPPA, etc). Some functions may not work well in a VM, such as copy/paste, printers, netstat, without additional setup effort. Persistence can be lost if the target machine is restored Could end up in a honey pot or tar pit If the data store is compromised all new instances will also be compromised Planning and initial setup cost more with virtual networks.
97
What is situational awareness?
A method of gaining an understanding of the current operating environment on the target machine It applies both defensively and offensively Allows you to get an idea of what the system is used for and what type of users use it Used to decide what courses of action are appropriate for the system
98
Situational Awareness - What areas are the most important to be aware of?
``` Running Processes Active Users Network Configuration Network Communications Logging Scheduled Jobs Aliases ```
99
What runs SMSS
NTOSKRNL
100
What runs WININIT?
SMSS
101
What starts Service Control Manager (SCM)?
WININIT
102
What starts Local Security Authority SubSystem (LSAAS)?
WININT
103
What starts Local Session Manager (LSM)?
WININIT
104
What starts CSRSS?
SMSS
105
What starts Winlogon?
CSRSS
106
What starts Userint?
WInlogon
107
What starts Explorer?
Userinit
108
What starts Winload?
Bootmgr
109
What starts NTOSKRNL?
Winload
110
What starts Services.exe?
WININIT