Skip to main content

Quiz - Module 10: IPC Communication

Test your knowledge on inter-process communication!


Question 1​

What does IPC stand for?

  • A) Internet Protocol Connection
  • B) Inter-Process Communication
  • C) Internal Process Control
  • D) Input Process Channel
See the answer

Answer: B) Inter-Process Communication

IPC refers to the mechanisms for communication between processes.


Question 2​

What is a pipe?

  • A) A virus
  • B) A unidirectional communication channel between processes
  • C) A file
  • D) A network protocol
See the answer

Answer: B) A unidirectional communication channel between processes

Pipes allow data to be passed between processes.


Question 3​

What is a named pipe?

  • A) A temporary file
  • B) A pipe with a name accessible by multiple processes
  • C) A virus
  • D) A protocol
See the answer

Answer: B) A pipe with a name accessible by multiple processes

Named pipes persist and are accessible by their name.


Question 4​

Where are named pipes located in Windows?

  • A) C:\Pipes
  • B) \.\pipe\
  • C) /tmp/
  • D) C:\Windows\Pipes
See the answer

Answer: B) \.\pipe\

Windows named pipes are in the \.\pipe\ namespace.


Question 5​

What is a socket?

  • A) A file
  • B) A bidirectional network communication endpoint
  • C) A virus
  • D) A type of RAM
See the answer

Answer: B) A bidirectional network communication endpoint

Sockets allow local or network communication.


Question 6​

What is the difference between TCP and UDP for sockets?

  • A) None
  • B) TCP is connected and reliable, UDP is connectionless and fast
  • C) UDP is more secure
  • D) TCP is faster
See the answer

Answer: B) TCP is connected and reliable, UDP is connectionless and fast

TCP guarantees delivery, UDP does not.


Question 7​

What is shared memory?

  • A) A virus
  • B) A memory area accessible by multiple processes
  • C) A file
  • D) A protocol
See the answer

Answer: B) A memory area accessible by multiple processes

Shared memory is the fastest IPC method.


Question 8​

What is a semaphore?

  • A) A virus
  • B) A synchronization mechanism between processes
  • C) A file
  • D) A protocol
See the answer

Answer: B) A synchronization mechanism between processes

Semaphores control access to shared resources.


Question 9​

What is a mutex?

  • A) A virus
  • B) Mutual Exclusion - lock for one process at a time
  • C) A file
  • D) A protocol
See the answer

Answer: B) Mutual Exclusion

A mutex ensures that only one thread/process accesses a resource.


Question 10​

What is a RAT?

  • A) A rodent
  • B) Remote Access Trojan
  • C) An official protocol
  • D) A type of RAM
See the answer

Answer: B) Remote Access Trojan

A RAT allows an attacker to remotely control a machine.


Question 11​

How does a RAT typically communicate?

  • A) By email
  • B) Via network sockets (reverse or direct connection)
  • C) By SMS
  • D) By Bluetooth only
See the answer

Answer: B) Via network sockets

RATs often use reverse shells via TCP.


Question 12​

What is a reverse shell?

  • A) An email virus
  • B) A connection where the victim connects to the attacker
  • C) A shell that reverses command order
  • D) A security protocol
See the answer

Answer: B) A connection where the victim connects to the attacker

The reverse shell bypasses firewalls by initiating the outgoing connection.


Question 13​

What is a bind shell?

  • A) A virus
  • B) A shell that listens on a port, the attacker connects to it
  • C) A graphical shell
  • D) A protocol
See the answer

Answer: B) A shell that listens on a port

The bind shell opens a port on the victim (often blocked by firewalls).


Question 14​

Which Windows function creates a named pipe?

  • A) CreateFile
  • B) CreateNamedPipe
  • C) MakePipe
  • D) NewPipe
See the answer

Answer: B) CreateNamedPipe

CreateNamedPipe creates a named pipe server.


Question 15​

Which function connects to a named pipe?

  • A) OpenPipe
  • B) CreateFile with the pipe path
  • C) ConnectPipe
  • D) JoinPipe
See the answer

Answer: B) CreateFile with the pipe path

Use CreateFile("\\.\pipe\PipeName", ...).


Question 16​

What is the client-server model?

  • A) A virus
  • B) A model where the server provides services to clients
  • C) A file
  • D) An email protocol
See the answer

Answer: B) A model where the server provides services to clients

The client requests, the server responds.


Question 17​

Which Python library is used for sockets?

  • A) os
  • B) socket
  • C) network
  • D) tcp
See the answer

Answer: B) socket

import socket allows creating sockets in Python.


Question 18​

Which socket method listens for incoming connections?

  • A) socket.wait()
  • B) socket.listen()
  • C) socket.hear()
  • D) socket.receive()
See the answer

Answer: B) socket.listen()

listen() puts the socket in listening mode.


Question 19​

Which method accepts an incoming connection?

  • A) socket.get()
  • B) socket.accept()
  • C) socket.receive()
  • D) socket.take()
See the answer

Answer: B) socket.accept()

accept() blocks until a new connection and returns the client socket.


Question 20​

Which method sends data via socket?

  • A) socket.put()
  • B) socket.send()
  • C) socket.write()
  • D) socket.push()
See the answer

Answer: B) socket.send()

send() or sendall() send data.


Question 21​

Which method receives data via socket?

  • A) socket.get()
  • B) socket.recv()
  • C) socket.read()
  • D) socket.pull()
See the answer

Answer: B) socket.recv()

recv(buffer_size) receives data.


Question 22​

What is localhost?

  • A) A remote server
  • B) The local machine's address (127.0.0.1)
  • C) A virus
  • D) A protocol
See the answer

Answer: B) The local machine's address (127.0.0.1)

localhost points to the machine itself.


Question 23​

What is a port?

  • A) A file
  • B) A number identifying a service on a machine
  • C) A virus
  • D) A cable
See the answer

Answer: B) A number identifying a service on a machine

Ports distinguish services (80=HTTP, 443=HTTPS...).


Question 24​

Which port range is reserved for system services?

  • A) 0-1023
  • B) 1024-49151
  • C) 49152-65535
  • D) 0-65535
See the answer

Answer: A) 0-1023

Ports 0-1023 are the "well-known" reserved ports.


Question 25​

What is serialization?

  • A) A virus
  • B) The conversion of objects into a transmittable format
  • C) A protocol
  • D) A type of RAM
See the answer

Answer: B) The conversion of objects into a transmittable format

Serialization allows sending complex data structures.


Question 26​

What is JSON?

  • A) A virus
  • B) JavaScript Object Notation - data exchange format
  • C) A network protocol
  • D) A programming language
See the answer

Answer: B) JavaScript Object Notation

JSON is a lightweight text format for data exchange.


Question 27​

Why encode data in bytes for sockets?

  • A) For security
  • B) Sockets transmit bytes, not strings
  • C) For compression
  • D) It's optional
See the answer

Answer: B) Sockets transmit bytes, not strings

Encoding (str.encode()) and decoding (bytes.decode()) are necessary.


Question 28​

What is a deadlock?

  • A) A virus
  • B) A mutual block where multiple processes wait indefinitely
  • C) A file
  • D) A protocol
See the answer

Answer: B) A mutual block

Deadlock occurs when processes wait on each other.


Question 29​

How to avoid race conditions?

  • A) Use more RAM
  • B) Use synchronization mechanisms (mutex, semaphores)
  • C) Restart the PC
  • D) Delete files
See the answer

Answer: B) Use synchronization mechanisms

Mutexes, semaphores, and locks prevent access conflicts.


Question 30​

Which command lists named pipes in Windows?

  • A) dir pipes
  • B) Get-ChildItem \.\pipe\ (PowerShell)
  • C) list pipes
  • D) show pipes
See the answer

Answer: B) Get-ChildItem \.\pipe\

Get-ChildItem \\.\pipe\ or [System.IO.Directory]::GetFiles("\\.\pipe\").


Score​

ScoreLevel
27-30Excellent!
22-26Very good!
17-21Good
12-16Fair
0-11Needs review

Module 10 Quiz - IPC Communication - 30 questions