reverse engineering part 1 Flashcards

(51 cards)

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
what does SPL stand for
stack pointer
26
what does BPL stand for
base pointer
27
what is register aliasing
registers RAX,EAX,AX,AH,AL all describe different parts of the same memory cell
28
what bits do each register stand for RAX EAX AX AH AK
RAX - 64 bits EAX - 32 bits AX - 16 bits AL - lower 8 bits AH - higher 8 bits
29
what does mov dst, src do
moves data from source (src) to destination (dst)
30
what does push src do
push onto source (src) stack
31
what does pop dst do
pops value from stack and stores it in destination (dst)
32
what does add dst, src do
dst += src
33
what does sub dst, src do
dst -= src
34
what does imul dst, src do
dst *= src
35
after arithmetic operations 3 fags are set , what are they?
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
what does the zero flag do
sets to 1 if result is 0
37
what does the sign flag do
sets to 1 if result is negative
38
what does the overflow flag do
sets to 1 if operation has overflowed
39
what does jmp label stand for
jump to label
40
what does call fn stand for
pushes instruction pointer into stack and jumps to function and always has a return statement
41
what does ret stand for
pops ip from stack
42
what does cmp a,b stand for
calculates b-a and set flags
43
what does test a,b stand for
calculate a&b and sets flags
44
what does je label stand for
jumps to Label if flag zero is set
45
what does jne label stand for
jumps to label if zero flag is not set
46
what does nop label stand for
No-op instruction , does not do anything
47
what does and dst,src stand for
dst &= src
48
what does or dst,src stand for
dst |= src
49
what does xor dst,src stand for
dst ^= src
50
what do square brackets indicate Direct Memory Access: [address]
they indicate the operand is a memory address instead of a direct value or register
51
what are the dofferent ways of memory addresses