Skip to content

Commit 0d2a058

Browse files
committed
exams: Add 2024 autumn written exams
Add "Testing System" and "Fuzzing System" exams. Signed-off-by: Teodor Dutu <[email protected]>
1 parent 4b511ac commit 0d2a058

File tree

3 files changed

+114
-0
lines changed

3 files changed

+114
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Fuzzing Systems for Embedded Applications
2+
3+
A fuzzer/fuzzing system generates semi-random inputs to send to a target application to discover bugs—inputs that lead to crashes.
4+
We propose building a fuzzing system for binary applications on embedded systems with specific architectures (e.g., ARM/MIPS).
5+
The fuzzing system runs on an x86 system and uses an emulator to run the application.
6+
The fuzzer sends inputs to the application through the emulator and extracts introspection information useful for fuzzing.
7+
8+
Answer the following questions with "True" or "False" and justify your answer.
9+
Justifications should be simple, 2-3 sentences for each response.
10+
11+
1. The fuzzing system is an application that must run with privileged permissions.
12+
- **Answer:** False
13+
- **Justification:** The fuzzing system starts the emulator and sends inputs without performing privileged actions.
14+
15+
1. The fuzzing system can run inside a virtual machine.
16+
- **Answer:** True
17+
- **Justification:** Since the system uses an emulator, nothing prevents it from running inside a virtual machine.
18+
19+
1. The performance of the fuzzing system (number of inputs sent per second) is comparable to that of a fuzzing system for native applications (running natively on the local x86 system).
20+
- **Answer:** False
21+
- **Justification:** Emulating instructions introduces significant overhead compared to running natively.
22+
23+
1. During the execution of the embedded application in the emulator, no system calls are made on the local system.
24+
- **Answer:** False
25+
- **Justification:** The emulator performs system calls for tasks such as memory allocation or synchronization.
26+
27+
1. The emulated application must be an ELF (Executable and Linking Format) file, specific to Linux.
28+
- **Answer:** False
29+
- **Justification:** The executable format depends on the emulator and can be ELF, PE, COFF, or raw.
30+
31+
1. We can run only one instance of the fuzzing system because we can run only one instance of the emulator.
32+
- **Answer:** False
33+
- **Justification:** Multiple emulator instances can run simultaneously, limited only by available resources.
34+
35+
1. The application source code is required to run the application on the emulator.
36+
- **Answer:** False
37+
- **Justification:** The emulator runs machine code, so only the binary application is needed, while the source code is optional.
38+
39+
1. The emulator appears as a process in the local system.
40+
- **Answer:** True
41+
- **Justification:** Applications run as processes, and the emulator on the local system functions as a process.
42+
43+
1. Using the emulator, the fuzzing system can have direct access to the memory of the running application.
44+
- **Answer:** True
45+
- **Justification:** The emulator emulates memory and the processor, allowing direct memory access.
46+
47+
1. If the system is x86 on 32-bit, the emulated application architecture cannot be 64-bit.
48+
- **Answer:** False
49+
- **Justification:** Emulation allows any architecture to be simulated, depending on the emulator's capabilities.
50+
51+
1. A crash in the emulated application can lead to a crash of the fuzzing system.
52+
- **Answer:** False
53+
- **Justification:** The application crashes inside the emulator, which should not affect the local system if implemented properly.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Testing System
2+
3+
A testing system allows building an application that can run on different architectures and platforms (operating systems).
4+
For real testing, the application must run on a system with the appropriate architecture and platform.
5+
The testing system provides configurations that enable local builds followed by deployment of the resulting application (and necessary files - build artifacts) to a dedicated system for testing.
6+
The test result is returned to the local (build) system.
7+
8+
Answer the following questions with "True" or "False" and justify your answer.
9+
Justifications should be simple, 2-3 sentences for each response.
10+
11+
1. The application cannot be compiled on another architecture or platform, it must be compiled on the running system, not locally.
12+
- **Answer:** False
13+
- **Justification:** Cross-compiling suites, along with build systems or containers, can be used to create a build environment for testing on another platform or architecture.
14+
15+
1. Testing systems can be virtual machines.
16+
- **Answer:** True
17+
- **Justification:** Yes, the application can be tested on a virtual machine.
18+
While there may be performance penalties, it is possible to test effectively on virtual machines.
19+
20+
1. The testing system will be significantly more performant if written in a compiled language (C, Go, Rust) compared to an interpreted one (Python, JavaScript, Ruby).
21+
- **Answer:** False
22+
- **Justification:** The testing system invokes the application (via fork-exec).
23+
The choice of a compiled or interpreted language does not significantly impact this process.
24+
25+
1. The testing system must run with privileged permissions.
26+
- **Answer:** False
27+
- **Justification:** The system performs operations such as compiling, running, and copying files over the network, all of which can be executed by non-privileged users.
28+
29+
1. The build process in the testing system is CPU-intensive.
30+
- **Answer:** True
31+
- **Justification:** The build process involves compiling, linking, and other operations that are CPU-intensive.
32+
33+
1. The testing system's runtime process can be CPU-intensive or I/O-intensive depending on the application's nature.
34+
- **Answer:** True
35+
- **Justification:** The nature of the application dictates whether the testing system's runtime process will be CPU-intensive or I/O-intensive.
36+
37+
1. The testing system would benefit from a multi-threaded implementation.
38+
- **Answer:** False
39+
- **Justification:** The testing system launches other processes (build, application).
40+
A multi-threaded implementation would not significantly alter the overall behavior or efficiency.
41+
42+
1. The local (build) system and testing systems can communicate using a network file system.
43+
- **Answer:** True
44+
- **Justification:** Yes, and it is recommended for efficient and easy transfer of build artifacts and test results.
45+
46+
1. Testing systems can be used by multiple local (build) systems.
47+
- **Answer:** True
48+
- **Justification:** This is both possible and recommended to save resources, especially since testing systems may remain idle part of the time.
49+
50+
1. Testing the application runtime is facilitated if the application is compiled into a static executable.
51+
- **Answer:** True
52+
- **Justification:** A statically compiled application does not require dependent libraries, making it easier to test by simply copying and running the executable.
53+
54+
1. Applications built for a different architecture can be tested locally in a container without significant performance penalties.
55+
- **Answer:** False
56+
- **Justification:** Running an application built for another architecture locally requires an emulator, whether in a container or not.
57+
Emulators are typically slow, leading to significant performance penalties.

config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,10 @@ docusaurus:
388388
- Exams:
389389
path: chapters/general/drills/tasks
390390
subsections:
391+
- 2024 Autumn:
392+
subsections:
393+
- Testing System/: testing-system.md
394+
- Fuzzing System/: fuzzing-system.md
391395
- 2024 Summer:
392396
subsections:
393397
- Syscall Tracing/: syscall-tracing.md

0 commit comments

Comments
 (0)