parent
8066e69ee4
commit
c2f877c1ac
8
school/os-sec/20181015_0-betriebssysteme.md
Normal file
8
school/os-sec/20181015_0-betriebssysteme.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Betriebssysteme
|
||||
date: 2018-10-15
|
||||
---
|
||||
|
||||
# Betriebssysteme
|
||||
|
||||
Bell-LaPaluda?
|
88
school/os-sec/20181015_1-x86.md
Normal file
88
school/os-sec/20181015_1-x86.md
Normal file
@ -0,0 +1,88 @@
|
||||
---
|
||||
title: x86 ASM
|
||||
date: 2018-10-15
|
||||
---
|
||||
|
||||
# x86 ASM
|
||||
|
||||
## Outline
|
||||
|
||||
* 32 bit System
|
||||
|
||||
## Syntax
|
||||
|
||||
### Intel Syntax (verwendet in Vorlesung)
|
||||
|
||||
* Intel Syntax (Ziel Operant ist immer links)
|
||||
* Adressen in `[1234]`
|
||||
|
||||
### AT&T Syntax
|
||||
|
||||
* Ziel Operant ist rechts
|
||||
* Register mit `%`
|
||||
* Number Literals mit `$`
|
||||
|
||||
## Memory Layout
|
||||
|
||||
* `.bss` global uninitialized variables
|
||||
* `.data` global initialized variables
|
||||
* heap: dynamic variables
|
||||
* `.text`: code (usually read-only)
|
||||
* stack: lokale Variablen + procedure activation records
|
||||
* heap grows up
|
||||
* stack grows down
|
||||
|
||||
### Stack Frame
|
||||
|
||||
* **ESP**: Ende des Stacks
|
||||
* **EBP**: Begin des aktuellen Stack Frames
|
||||
|
||||
Enthält:
|
||||
|
||||
* Lokale Variablen
|
||||
* Parameter
|
||||
* Caller Adresse
|
||||
|
||||
| :---: |
|
||||
| <prev frame> |
|
||||
| --- |
|
||||
| Parameters |
|
||||
| :---: |
|
||||
| Return address |
|
||||
| :---: |
|
||||
| prev frame address (alter *EBP*) |
|
||||
| :---: |
|
||||
| *EBP* -> |
|
||||
| :---: |
|
||||
| Local variables |
|
||||
| :---: |
|
||||
| *ESP* -> |
|
||||
| :---: |
|
||||
| <free memory> |
|
||||
| :---: |
|
||||
|
||||
### MOV
|
||||
|
||||
* `mov eax, ebx`: `eax = ebx`
|
||||
* `mov edx, [1234]`: `edx = *1234`
|
||||
|
||||
|
||||
### `PUSH`
|
||||
|
||||
* `push ecx`: Wert von `ecx` auf den Stack, `esp - 4`
|
||||
* `pop esi`: `esp + 4`
|
||||
|
||||
### `RET`
|
||||
|
||||
* `pop eip`
|
||||
|
||||
### Subroutinen
|
||||
|
||||
`f(1,2,3)` ->
|
||||
|
||||
```
|
||||
push 3
|
||||
push 2
|
||||
push 1
|
||||
call f
|
||||
```
|
8
school/os-sec/index.md
Normal file
8
school/os-sec/index.md
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
title: Betriebssystemsicherheit
|
||||
---
|
||||
|
||||
# Betriebssystemsicherheit
|
||||
|
||||
* [Betriebssysteme](20181015_0-betriebssysteme)
|
||||
* [x86 ASM](20181015_1-x86)
|
Loading…
Reference in New Issue
Block a user