cmsc 426 final lecture 8

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/16

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

17 Terms

1
New cards

What is the main goal of reverse engineering?

To understand how a system was designed, how it operates, and how to reproduce or enhance it, without access to the original design.

2
New cards

What are examples of reverse engineering in everyday life?

Taking apart an alarm clock to modify it, analyzing TikTok's recommendation algorithm, replicating the Coca Cola formula, or disassembling anti-cheat software.

3
New cards

What are Crackmes and their purpose?

reverse engineering challenges used to test and practice reverse engineering skills and explore computational complexity.

4
New cards

What are common strategies for reverse engineering/crackme tasks?

Check if you can add code, search for debug statements, attach a debugger, and remember the structure and behavior of the program.

5
New cards

What are types of binary executable files?

Windows: PE files, Linux: ELF files, Mac: Mach-O files. They define the program format and entry point for execution.

6
New cards

What is a disassembler and name examples?

A tool that converts machine code back to assembly. Examples include objdump, IDA, Ghidra, and Binary Ninja.

7
New cards

How is a process's address space structured?

It includes segments such as Stack, Heap, Global/Static variables, and Code/Text. The stack grows downward, and the heap grows upward.

8
New cards

What is stack allocation?

Memory allocated during program execution for local variables, function calls, parameters, and return addresses. It grows downward.

9
New cards

What is heap allocation?

Dynamically allocated memory using functions like malloc() or new. It grows upward and is controlled by the user.

10
New cards

What are buffer overflows and why are they dangerous?

They occur when data exceeds buffer size and spills into adjacent memory, potentially overwriting important data like return addresses (EIP).

11
New cards

What are common x86 registers and their functions?

EAX-EDX: data storage, ESI/EDI: string ops, ESP/EBP: stack tracking, EIP: instruction pointer.

12
New cards

What do PUSH and POP instructions do?

PUSH adds data to the stack and decreases ESP. POP retrieves data from the stack and increases ESP.

13
New cards

What does the CALL instruction do?

Pushes return address to the stack and jumps to the function address.

14
New cards

What does the RET instruction do?

Pops the return address from the stack into EIP to resume execution.

15
New cards

What is the 'cdecl' calling convention?

Used in C, it defines stack usage rules: parameter order, preserved registers, and stack cleanup by the caller.

16
New cards

How can vulnerable code be identified and avoided?

Use code inspection, fuzzing, enforce input size limits, use safe languages, and avoid deprecated functions like gets() or strcpy().

17
New cards

What are safe alternatives to unsafe functions?

Use fgets() instead of gets(), strncpy() instead of strcpy(), strncat() instead of strcat(), snprintf() instead of sprintf().