reverse engineering part 1 Flashcards

1
Q

decribe the ways data can be code and how it can be attacked

A

attacks trick program into accepting data which is code
e.g sql injections and XSS

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

describe how code can be data

A

executable code is written/modified like any document so attacker can end up doing what they want to the program

this is reverse engineering

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

what is the definifiton of reverse engineering

A

process of analysing the software to understand its functionality without access to source code

low level programs are analysed, functionality can be altered and protecteions can be taken away

good protections can also slow this process down and not fully stop it

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

goals of reverse engineering

A

security research
learning how compilers and systems work
debuggers and preformance optimisation

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

describe to be binaries in systems

A

systems have different binary formats

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

how is a c programme transformed into an executable binary

A

a compiler

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

what does a compiler do to a C programme

A

transforms it into an executable binary

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

what does a binary contain

A

machine code instructions

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

do systems have different binary formats

A

yes

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

can CPUs support different instruction sets

A

yes

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

what is a debugger

A

programme that debugs other programmes

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

what processes can you do using a debugger

A

can halt or run target programme at any point
step through code line by line
display or alter contents of memory, CPU registers and stack frames

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

what is a dissembler

A

programmes that converts machine code into assembly language

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

describe what dissembler does to machine code

A

machine code is in binary representation , it converts it to low level programming language representation

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

what is a decompiler

A

programme that converts machien code to high level programming language ( e.g c# code )

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

when c programme is put through compiler what does it become

A

x86-64 binary

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

when x86-64 binary is decompiled what does it become

A

C PROGRAMME

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

when x86-64 binary us disassembled what does it become

A

x86-64 Assembly

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

what is assembly

A

machine code in deterministic mapping

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

what are registers

A

small but fast units of storage for the CPU

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

what is memory

A

larger chunks of data , referenced by address
contains code , heap and stack.

22
Q

what are the two types of registers

A

general purpose registers
special purpose registers

23
Q

what are general purpose registers used for

A

they are used for computation

24
Q

what are special purpose registers used for

A

store instruction pointers (program counter) etc

25
Q

what does SPL stand for

A

stack pointer

26
Q

what does BPL stand for

A

base pointer

27
Q

what is register aliasing

A

registers RAX,EAX,AX,AH,AL all describe different parts of the same memory cell

28
Q

what bits do each register stand for
RAX
EAX
AX
AH
AK

A

RAX - 64 bits
EAX - 32 bits
AX - 16 bits
AL - lower 8 bits
AH - higher 8 bits

29
Q

what does mov dst, src do

A

moves data from source (src) to destination (dst)

30
Q

what does push src do

A

push onto source (src) stack

31
Q

what does pop dst do

A

pops value from stack and stores it in destination (dst)

32
Q

what does add dst, src do

A

dst += src

33
Q

what does sub dst, src do

A

dst -= src

34
Q

what does imul dst, src do

A

dst *= src

35
Q

after arithmetic operations 3 fags are set , what are they?

A

ZF: zero flag, sets to 1 if result is negative
SF: sign flag, sets to 1 if result is negative
OF: overflow flag, sets to 1 if operation has overflowed

36
Q

what does the zero flag do

A

sets to 1 if result is 0

37
Q

what does the sign flag do

A

sets to 1 if result is negative

38
Q

what does the overflow flag do

A

sets to 1 if operation has overflowed

39
Q

what does jmp label stand for

A

jump to label

40
Q

what does call fn stand for

A

pushes instruction pointer into stack and jumps to function and always has a return statement

41
Q

what does ret stand for

A

pops ip from stack

42
Q

what does cmp a,b stand for

A

calculates b-a and set flags

43
Q

what does test a,b stand for

A

calculate a&b and sets flags

44
Q

what does je label stand for

A

jumps to Label if flag zero is set

45
Q

what does jne label stand for

A

jumps to label if zero flag is not set

46
Q

what does nop label stand for

A

No-op instruction , does not do anything

47
Q

what does and dst,src stand for

A

dst &= src

48
Q

what does or dst,src stand for

A

dst |= src

49
Q

what does xor dst,src stand for

A

dst ^= src

50
Q

what do square brackets indicate
Direct Memory Access: [address]

A

they indicate the operand is a memory address instead of a direct value or register

51
Q

what are the dofferent ways of memory addresses