Skip to content

Instantly share code, notes, and snippets.

@phryneas
Last active January 14, 2016 11:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phryneas/2064c6f04688275992a4 to your computer and use it in GitHub Desktop.
Save phryneas/2064c6f04688275992a4 to your computer and use it in GitHub Desktop.
quick web shell scan
#!/usr/bin/zsh
#improvements are greatly welcome:
terms=( )
terms=( $terms "exec" )
terms=( $terms "eval" )
terms=( $terms "passthru" )
terms=( $terms "shell_exec" )
terms=( $terms "system" )
terms=( $terms "pcntl_exec" )
terms=( $terms "proc_open" )
terms=( $terms "proc_nice" )
terms=( $terms "proc_terminate" )
terms=( $terms "proc_get_status" )
terms=( $terms "proc_close" )
terms=( $terms "leak" )
terms=( $terms "apache_child_terminate" )
terms=( $terms "posix_kill" )
terms=( $terms "posix_mkfifo" )
terms=( $terms "posix_setpgid" )
terms=( $terms "posix_setsid" )
terms=( $terms "posix_setuid" )
terms=( $terms "popen" )
terms=( $terms "gzdeflate" )
terms=( $terms "gzdecode" )
terms=( $terms "base64_decode" )
joined=${(j:\|:)terms}
grep "\b\($joined\)\s*(" --include '*.php' . -R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment