Chapter 3 Security Engineering Flashcards
ISO/IEC/IEEE 42010
systems and software engineering – architecture description (outlines specifications for system architecture frameworks and architecture languages)
What is an architecture view?
Architecture views expresses architects decision regarding each stakeholders concerns
Each view confirms to a particular viewpoint (eg Logical, physical, structural)
Baking in vs Bolting on security
Baking in : At architecture phase
Bolting on: At development phase
What do general registers hold
variables and temporary data
What do special registers hold
program counter
stack pointer
program status word
What does program counter register hold?
memory address of next instruction to be fetched
what is the significance of program status word
PSW holds different bits, one of the bits indicates if CPU should be in user mode or privileged mode
What are the 6 different types of RAM
- Static
- Dynamic
- Synchronous
- EDO DRAM
- Burst EDO DRAM
- Double data rate DRAM
What are the characteristics of Static RAM
- Fast
- takes lot of space
- more costly
- uses transistors
What are the characteristics of Dynamic RAM
- slow
- less space
- less costly
- uses capacitors
What are the characteristics of Synchronous RAM
Synchronises clock of RAM with that of CPU for faster access
What are the characteristics of EDO DRAM
Has a look ahead feature to access data while first one is being sent to CPU
In Burst EDO DRAM, data can be sent in bursts of 4 blocks
What are the characteristics of Double Data Rate DRAM
Reads on both clock pulses, effectively doubling speed
What are the two common memory protection techniques
Address Space Layout Randomisation (ASLR)
Data Execution Prevention (DEP)
What is multi-tasking
multiple programs loaded in memory at same time
AND
multiple programs executed simultaneously by CPU
What is difference between multi-tasking and multi-programming
To be checked
Asymmetric multi-processisng
Multiple CPUs can be used for processing at same time
Specific applications dedicated to one CPU
Good for time sensitive applications
What is Thrashing
when a computer spends more time moving data from one small portion of memory to other rather than processing the data
What are the different types of memory addresses
Physical memory addresses used by CPU: Absolute addresses
Addresses used by software : Logical
Known address with offset : Relative addresses
Co-operative vs pre-emptive multi-tasking
processes voluntarily release resources vs forcefully (CPU decides amount of time)
What is process spawning
creating new child processes is referred to as spawning processes
eg in linux/unix - command interpreter is a process itself and within it when commnads are executed like grep etc, they spawn new processes with characteristics similar to the parent process but with its own memory space
In what states can a process be in?
- Blocked state – waiting for inputs
- Ready state – waiting to send instructions to CPU
- Running state – being executed by CPU
What are the responsibilities of Operating System
- Creating new processes
- Assigning them resources
- Synchronizing communication
- Making sure nothing insecure is taking place
What does the OS Process table contain
- One entry per process in the table
- State of the process
- Stack pointer
- Memory allocation
- Program counter
- Status of open files
How does CPU switch between processes
CPU requires all of the information in process table loaded into registers for process execution. When process 1’s time is up and process 2 is to be executed, the process 1 information is moved back to the process table and maintained there till required again for process 1 to execute.
Break between two processes happens using interrupt
what are the types of interrupts
Software Interrupts
Hardware Interrupts (used by devices)
How do interrupts work
The s/w or h/w raises interrupts to the cpu.
The cpu then acknowledges or entertains the interrupt as per its decision
If one process needs to interrupt another process, OS decices on the priority to determine if the interruption should be allowed
Maskable vs non-maskable interrupt
maskable interrupt can be ignored
What are the functions of Memory stacks
- Each process has its own stack
- It is in LIFO mode
- Stack pointer is used to indicate to CPU where it is within the stack
- Last instrcutuion in stack is the return pointer where the results or control are transferred
What is a thread
A thread is made up of the individual instruction set and the data that must be worked on by the CPU
Who creates a thread
A thread is created by a process
Each thread shares same resources of the process that created it eg memory space, file access
What is multi-threading
Application running multiple tasks via threads at the same time
Give an example of how process can become malicious
An attacker can inject malicious instructions in a process. Since process is already verified by OS and running, such injections can end up executing the attackers code. To prevent this, processes should only accept instructions from a approved entity and that the instructions are validated before execution
What is a software deadlock
process A commits resource 1 and needs resource 2 to do the job while process B has committed resource 2 and needs resource 1 to do the job