NewWork mode: your Claude Code or Codex on work calls, answering from your project's codeSkip to content

Quiz: Cybersecurity / InfoSec

Cybersecurity / InfoSec questions from real interviews as a quiz, with an explanation for every option.

Try it: 5 questions

Loading…

Sample questions

  1. Which approaches help protect shared state from race conditions when requests run concurrently? Select all that apply.

    • Add a mutex in one process and treat it as sufficient for every application instance
    • Use a record version and reject an update if the data has changed
    • Separate the check from the write, then retry after a network failure without rechecking state
    • Choose locking or coordination whose scope matches the shared state
    • Perform the check and update atomically at the layer that owns the shared state
    Full answer
  2. Which measures help protect against SSRF? Select all that apply.

    • Allow only specified schemes, hosts, and ports instead of accepting arbitrary URLs.
    • Check that the resolved IP address is public and recheck it at connection time; apply the same checks to redirects.
    • Use an outbound proxy or network filter to block internal networks and cloud metadata endpoints.
    • Validate only the original URL and allow any redirects because they are followed by the same server.
    • Use a regular expression to check for the string localhost; that is sufficient to block internal addresses.
    Full answer
  3. Which statements correctly describe HTTP Request Smuggling and its common categories? Select all that apply.

    • In TE.CL the priorities are reversed, while TE.TE means components handle Transfer-Encoding indicators differently.
    • The flaw can occur even when all components parse requests identically; the categories refer to HTTP encryption methods.
    • The flaw occurs when components on one connection interpret request boundaries differently.
    • CL.TE and TE.CL describe response-routing differences, while TE.TE is a way to associate a response with a client.
    • In CL.TE, the front end uses Content-Length while the back end uses Transfer-Encoding.
    Full answer
  4. Which statements about sending and storing JWTs are correct? Select all that apply.

    • JavaScript injected into a page can read a token in browser storage, so XSS defenses and short token lifetimes matter.
    • Avoid putting JWTs in query strings because URLs may be recorded in browser history, logs, or referrer headers.
    • A cookie with Secure, HttpOnly, and an appropriate SameSite setting reduces theft through JavaScript, but does not remove the need for CSRF protections.
    • A JWT in a request body is always safe, even when the request is sent without TLS.
    • A token in an Authorization header cannot be stolen or accidentally exposed, so its expiration does not matter.
    Full answer
  5. What is the main difference between authentication and authorization?

    • Authentication determines access rights; authorization verifies identity.
    • Authentication encrypts data; authorization decrypts it.
    • Authentication verifies identity; authorization determines access rights.
    • Authentication creates an account; authorization checks a password.
    Full answer
  6. How does a switch typically handle VLAN tags when sending frames through trunk and access ports, and what does Native VLAN mean?

    • A trunk carries multiple VLANs with tags, except for the Native VLAN; an access port sends frames untagged for its VLAN.
    • An access port sends tagged frames, while a trunk removes tags; the Native VLAN is the VLAN assigned to an access port.
    • A trunk sends all frames untagged, while an access port adds tags; the Native VLAN is the management VLAN.
    • A trunk carries only one VLAN at a time, while an access port preserves the original tags; the Native VLAN tags all trunk traffic.
    Full answer
  7. What does defer do in Go?

    • Schedules a function call to run when the surrounding function exits.
    • Starts a function concurrently and does not wait for it to finish.
    • Runs a function immediately but saves its result until the function returns.
    • Retries a function call if it returns an error.
    Full answer
  8. How are VBS and HVCI related in Windows?

    • VBS and HVCI are two names for the same memory-protection feature.
    • VBS isolates only applications, while HVCI encrypts data stored in Windows.
    • VBS creates a hypervisor-based isolated environment, and HVCI uses it to check code integrity.
    • HVCI creates the hypervisor-based environment, while VBS verifies driver signatures.
    Full answer
  9. What does ASLR do when a process starts?

    • Automatically fixes memory-management bugs
    • Randomizes the locations of the process's memory regions
    • Prevents the process from executing code in data regions
    • Encrypts the contents of the process's memory
    Full answer
  10. What is pprof used for in Go?

    • Automatically fixing memory leaks and optimizing code
    • Profiling an application and finding CPU, memory, and blocking bottlenecks
    • Compiling an application and managing its dependencies
    • Inspecting network requests and finding errors in HTTP routes
    Full answer