Command Injection

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/56

flashcard set

Earn XP

Description and Tags

Command Injection

57 Terms

1
New cards
What is command injection?

Tricking an application into executing attacker-supplied operating-system commands.

2
New cards
Why do web applications become vulnerable to command injection?

They incorporate untrusted input into commands executed on the server.

3
New cards
What does command stacking mean?

Using separators to cause multiple commands to execute from one input.

4
New cards
Which MITRE ATT&CK technique covers command injection into public-facing apps?

T1190: Exploit Public-Facing Application.

5
New cards
What user-input locations can carry injected commands?

URL parameters, form fields, cookies, and other accepted input.

6
New cards
Which HTTP method commonly carries URL query parameters?

GET.

7
New cards
Which HTTP method commonly submits browser form variables?

POST.

8
New cards
Which privileges do injected commands typically have?

The privileges of the affected web-server process.

9
New cards
What can an attacker attempt after gaining command execution with limited privileges?

Privilege escalation or lateral movement to other systems.

10
New cards
What shell character commonly separates commands on Linux?

A semicolon (;).

11
New cards
What character can separate commands in Windows command-line input?

Ampersand (&).

12
New cards
What is the purpose of testing -h or /? as application input?

To see whether an underlying command returns help output.

13
New cards
What does PARAM ; echo Injected test?

Whether a Unix shell executes a second command after the first.

14
New cards
What does PARAM | echo Injected test?

Whether output piping can trigger another command.

15
New cards
When does PARAM || echo Injected execute echo?

When the first command exits with nonzero status.

16
New cards
When does PARAM && echo Injected execute echo?

When the first command exits successfully with status 0.

17
New cards
What does PARAM & echo Injected do?

Starts the first command in the background, then runs echo.

18
New cards
What is Bash $(...) syntax used for?

Command substitution: execute a command and substitute its output.

19
New cards
What do backticks around a command mean in a Unix shell?

Command substitution.

20
New cards
What does >(echo Injected) demonstrate?

Unix process substitution.

21
New cards
Why is echo commonly used when testing command injection?

It is available in Linux, Windows Command Prompt, and PowerShell.

22
New cards
What is blind command injection?

Injected commands run, but their output is not shown in the application.

23
New cards
How can a response delay help identify blind command injection?

A deliberate delay may show that a command executed.

24
New cards
How can network traffic confirm blind command injection?

Observe a request or ICMP packet initiated by the target.

25
New cards
What is the Lightning Labs event for practicing command stacking?

Section 4: Command Stacking.

26
New cards
What is the Falsimentis example application's purpose?

Collect community-service reports and generate branded shareable images.

27
New cards
Which form fields influence the branded image filename in the walkthrough?

First name and last name.

28
New cards
Why is the generated image name a clue during reconnaissance?

It shows that user input determines a server-side output filename.

29
New cards
What program is invoked by the example web application to combine images?

composite.

30
New cards
What does PHP system() do in the walkthrough?

Runs the constructed command on the server.

31
New cards
What is the purpose of csfooter.png in the walkthrough?

It is the branding image merged into the uploaded image.

32
New cards
What does PHP's dot (.) operator do in the walkthrough?

Concatenates strings to build the command line.

33
New cards
Which characters enable the walkthrough's injected second command?

A semicolon to separate commands and # to comment out trailing text.

34
New cards
What does the Unix id command show?

The executing user's identity and group information.

35
New cards
What is meant by a non-stateful command-injection exploit?

Each request runs independently; shell state does not persist.

36
New cards
Why is cd unreliable across separate command-injection requests?

The working-directory change ends when that command exits.

37
New cards
What directory did pwd return in the exploit example?

/var/www/html.

38
New cards
What should be used instead of relying on cd in command injection?

Fully qualified file or directory paths.

39
New cards
What example command lists a specific directory without first using cd?

ls /var/www/html

40
New cards
What example command reads a file without relying on directory state?

cat /var/www/html/.env

41
New cards
Can command injection affect devices other than web servers?

Yes. CLI consoles on routers, printers, and IoT devices may be vulnerable.

42
New cards
What type of appliance is the Crestron DGE-100?

A networked digital graphics engine.

43
New cards
Which TCP port is associated with the DGE-100 console example?

TCP 41795.

44
New cards
Which device command is abused in the DGE-100 example?

The console's ping command.

45
New cards
What vulnerability identifier is used for the Crestron DGE-100 example?

CVE-2018-5553.

46
New cards
What is a key security risk of passing user input to a local executable?

The input may be interpreted as an unintended system command.

47
New cards
What does SAST stand for?

Static Application Security Testing.

48
New cards
What does SAST examine to find command injection weaknesses?

Application source code.

49
New cards
Which SAST tool does Book 4 highlight?

Semgrep.

50
New cards
Which other SAST tools are named?

Snyk and Aikido Security.

51
New cards
Which application testing tools are mentioned for vulnerability assessment?

Burp Suite and Acunetix Vulnerability Scanner.

52
New cards
What does WAF stand for?

Web Application Firewall.

53
New cards
How can a WAF help with command injection?

It can mitigate some requests and log attack attempts.

54
New cards
What network behavior may indicate command injection compromise?

Unusual outbound connections originating from a web server.

55
New cards
What does C2 stand for?

Command and control.

56
New cards
Why should web-server outbound traffic be monitored?

Unexpected outbound traffic may indicate attacker command and control.

57
New cards
What is the main secure-development lesson for command injection?

Do not let untrusted input control server-side command execution.