Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

23
Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357

Transcript of Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Page 1: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Security Architecture and Design

Chapter 4Part 2

Pages 319 to 357

Page 2: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Virtual Memory

Page 3: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Virtual Memory

Page 4: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Process Isolation

• Protects processes from each other.• Encapsulated – no other process has access to

another process’ internal code.• Data Hiding – no other process knows how a

process work• Interact with another process through its API

Page 5: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Time Multiplexing

Page 6: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Name Distinction

• Process ID (PID)

Page 7: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

RAM

• Dynamic Random Access Memory• Millions of transistors and capacitors• Capacitor stores 1 or 0• 1 = several electrons stored in it• Need to be read and rewritten regularly

Page 8: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Static RAM (SRAM)

• Does not require continuous refreshing• Faster than DRAM• More expensive and smaller capacity• Used for Cache memory

Page 9: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Memory Management

Page 10: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Dynamic Link Libra (DLL)

• Crypt32.dll

Page 11: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Buffer Overflow

Page 12: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Buffer Overflow

Page 13: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Buffer Overflow

char buf[10];gets(buff)

Page 14: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Memory Protection Techniques

• Windows “Address Space Layout Randomization”

• Randomly rearrange key data areas in memory– Starting address of function– Stack address– Libraries

• Prevents attackers guessing through trial and error

Page 15: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Prevent Buffer Overflow

• Use Java or C#• Buffer = new char[10];• Buffer[20] causes an exception to be thrown

Page 16: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Memory Leak

• Languages like C++• Buffer = new int[100];• Delete(buffer);• Can be used for a Denial of Service Attack

(DoS)• Java and C# have garbage collection

Page 17: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

I/O Device

• Block devices– Disk– Transfers sectors

• Character devices– Printers, mouse– Stream of characters

Page 18: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

I/O

• Handled by the OS device driver• Communicates with the device controller

Page 19: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Interrupts

• OS schedules I/O• I/O with Direct Memory Access• Devices sends an interrupt when I/O is

completed• OS moved process from blocked to waiting• OS schedules next I/O on device

Page 20: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

CPU Architecture

• Figure page 343

Page 21: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Ring Architecture

• Figure 4-15 on page 344• OS Kernel– Communicates with I/O devices– Schedules processes– Handles interrupts

• Application Program Interface (API)• Windows only uses Rings 0 and 3• Attack: replace DLL with malicious code

Page 22: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Operating System Architecture

• Monolithic– Figure 4-16 on page 347

• Microkernel Architecture– Figure 4-18 on page 350– Small kernel– Operating systems utilities are invoked in user

mode

Page 23: Security Architecture and Design Chapter 4 Part 2 Pages 319 to 357.

Virtual Machines

• Figure 4-21 on page 356• List on pages 356-7