Bitzu

312-50 ยท Web servers and web applications

Injection, parameter tampering and logic flaws

Command injection, XXE, file inclusion (LFI/RFI), file upload flaws, parameter tampering, business logic flaws, input validation.

Key points

  • Injection: untrusted input run as code or commands (OS command injection, XXE via XML parsers).
  • LFI/RFI: loads unintended files. Unrestricted upload: executable content on the server.
  • Parameter tampering: price or role values the server wrongly trusts.
  • Business logic flaws: skipping steps, replaying coupons.
  • Defenses: server-side allow-lists, parameterized APIs, external XML entities off, safe uploads, server re-checks prices and state.

Practice questions

Single choice

What is the main cause of OS command injection?

  1. User input concatenated into a system command
  2. Missing HTTPS
  3. A cookie without the Secure flag
  4. An outdated browser
Show answer

Answer: A. User input concatenated into a system command

User input is concatenated into a shell command, so metacharacters change what is executed. Weak TLS or cookie flags are unrelated.

Select all that apply

Which measures make file upload safer?

  1. Allow-listing permitted file types and checking content
  2. Storing uploads outside the web root without execute permission
  3. Trusting the extension sent by the client
  4. Saving uploads in the script directory
  5. Keeping the original uploaded filename for execution
Show answer

Answer: A. Allow-listing permitted file types and checking content, B. Storing uploads outside the web root without execute permission

Allow-listing types and storing files outside the web root without execute permission prevents uploaded content from running. Trusting the filename extension alone or serving from the code directory is unsafe.

True or false

True or false: validating input only in JavaScript in the browser is sufficient protection against tampering.

Show answer

Answer: False

False. Client-side checks are trivially bypassed with a proxy or curl; validation must be enforced on the server.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More 312-50 topics in this module