Networks
System Calls
Buffer Overflow
Libraries
Misc.
100

This dotted-decimal identifier, e.g., 128 .10 .116 .31, uniquely designates every host on a network.

What is an IP address?

100

They’re the gateway between a user-space process and the OS kernel—everything from file I/O to fork begins with one of these.

What is a system call?

100

Fail to use strncpy() (or another bounded copy) and you open your program to this classic memory-safety vulnerability.

What is a buffer overflow?

100

When compiling code that uses sin() or sqrt(), you add this linker flag so GCC pulls in the math library.

What is -lm?

100

In a Makefile, every command in the “recipe” section must begin with this single whitespace character—not a space—or make will complain.

What is a tab?

200

It’s the distributed system that turns human-friendly names like google.com into IP addresses.

What is DNS?

200

create ↔ terminate ↔ execute ↔ wait are classic examples of this category of system calls.

What is process management?

200

In the read_login example with char buffer[8], overrunning the buffer lets an attacker overwrite this saved value—so the program never gets back to main().


void read_login(int x, int y) { 

     char buffer[8]; 

     printf(“Enter login: “); 

     fscanf(stdin, “%s”, buffer); 

     printf(“Hello, %s. Code %d.%d\n”, buffer, x, y); 

}

What is the return address?

200

C libraries come in two main forms: one gets baked into the executable at link-time, the other is loaded at run-time and ends in “.so”.  Name either form.

What is a static library / shared (dynamic) library?

200

The GCC flag that tells the compiler to “optimize more, but without inflating code size” is -O followed by this digit.

What is 2?
300

Building reliability on top of IP, this protocol adds acknowledgments and retransmissions.

What is TCP?

300

Prototype: int ___(const char *pathname, int flags [, mode_t mode]); —name the system call.

What is open?

300

Modern OSes randomize stack, heap, and code addresses with this three-letter acronym—making buffer-overflow exploits far less predictable.

What is ASLR (Address Space Layout Randomization)?

300

A library that is copied into the executable during linking (instead of loaded later) is called this kind of library.

What is a static library?

300

The function you pass to signal(SIGALRM, …) so it runs whenever an alarm goes off is called a signal _____ (or simply a callback).

What is a handler?

400

A classic four-call sequence for a TCP server: create an endpoint, give it a name, mark it passive, then accept a connection. Name all four system calls in order.

What are socket(), bind(), listen(), accept()?

400

Forget to call this descriptor-closing system call and you’ll spring a file-descriptor leak.

What is close?

400

A quick way to keep a string copy inside its destination buffer is to use this length-limited cousin of strcpy. What function is it?

What is strncpy?

400

On Unix systems, almost every library file begins with this three-letter prefix—think ___m.so for the math library.  What prefix is it?

What is lib?

400

printf, strcpy, and other standard C functions live in this shared object file—typically found as /usr/lib/____.so.

What is libc?
500

An endpoint for data exchange is fully identified by this two-part term: a 32-bit network number and a 16-bit local number (<1024 are privileged).

What is a socket address (IP address + port)?)

500

On x86-64, this single assembly instruction switches the CPU to kernel mode to service a system call.

What is syscall?

500

Attackers love this classic C function because it copies a string into a buffer without checking its size—perfect for triggering an overflow. Name the function.

What is strcpy?

500

To stop a header file from being included twice, we wrap its contents with #ifndef, #define, and #endif.  What are these duplicate-include guards commonly called?

What are header guards?

500

In setting up a TCP server, this system call assigns a newly created socket to a local IP address and port before you can listen()

What is bind()?