hardmultiple choiceObjective-mapped

Exhibit

Application log excerpt:
15:08:02 POST /tools/pingHost host=10.0.0.15
15:08:02 Application executed: /bin/sh -c "ping -c 1 10.0.0.15"
15:09:11 POST /tools/pingHost host=10.0.0.15;curl%20http://198.51.100.55/s
15:09:11 Application executed: /bin/sh -c "ping -c 1 10.0.0.15;curl http://198.51.100.55/s"
15:09:12 Outbound HTTPS session established to 198.51.100.55

Based on the exhibit, what is the BEST remediation for the application flaw shown?

A user-controlled parameter is being passed to a shell command on the server. The application is intended to test connectivity to approved internal hosts only.

Question 1hardmultiple choice
Full question →

Based on the exhibit, what is the BEST remediation for the application flaw shown?

A user-controlled parameter is being passed to a shell command on the server. The application is intended to test connectivity to approved internal hosts only.

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

Keep the current shell command, but add HTML encoding to the response page.

Output encoding helps prevent browser-side issues, but it does not stop command injection on the server.

B

Best answer

Replace the shell call with a safe library function and strictly allowlist approved host values.

The flaw is server-side command injection caused by passing user input into a shell. A safe library call removes shell interpretation, and an allowlist limits inputs to known-good targets.

C

Distractor review

Increase the web server timeout so the ping utility has more time to complete.

Timeout tuning does not prevent an attacker from appending extra shell commands to the request.

D

Distractor review

Require users to authenticate before they can access the page.

Authentication may reduce exposure, but it does not correct the underlying unsafe command execution.

Common exam trap

Common exam trap: NAT rules depend on direction and matching traffic

NAT is not only about the public address. The inside/outside interface roles and the ACL or rule that matches traffic are just as important.

Technical deep dive

How to think about this question

NAT questions usually test address translation, overload/PAT behaviour, static mappings and whether the right traffic is being translated. Read the interface direction and address terms carefully.

KKey Concepts to Remember

  • Static NAT maps one inside address to one outside address.
  • PAT allows many inside hosts to share one public address using ports.
  • Inside local and inside global describe the private and translated addresses.
  • NAT ACLs identify traffic for translation, not always security filtering.

TExam Day Tips

  • Identify inside and outside interfaces first.
  • Check whether the scenario needs static NAT, dynamic NAT or PAT.
  • Do not confuse NAT matching ACLs with normal packet-filtering intent.

Related practice questions

Related SY0-701 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this SY0-701 question test?

Static NAT maps one inside address to one outside address.

What is the correct answer to this question?

The correct answer is: Replace the shell call with a safe library function and strictly allowlist approved host values. — The exhibit shows OS command injection: the application builds a shell command directly from user input, and the attacker appends a second command using a semicolon. The best remediation is to remove shell interpretation by calling a safe library or API function and to restrict inputs with a strict allowlist of approved hosts. This addresses both the injection path and the application’s intended business requirement. Authentication or output encoding alone would not fix the flaw. Why others are wrong: HTML encoding only affects how responses are displayed and does nothing to stop the server from executing injected shell commands. Extending timeouts may make normal pings more reliable, but it does not mitigate command chaining. Authentication is valuable, yet even authenticated users could exploit the flaw unless the command execution pattern is redesigned to avoid shell expansion entirely.

What should I do if I get this SY0-701 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.