Skip to content

Instantly share code, notes, and snippets.

@SeanPesce
Last active May 10, 2023 19:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save SeanPesce/a2f79a5e262c69a02f8cb39fbdd64e1b to your computer and use it in GitHub Desktop.
Save SeanPesce/a2f79a5e262c69a02f8cb39fbdd64e1b to your computer and use it in GitHub Desktop.
Linux shell command to find binaries that contain a specific symbol. Useful when searching for command injection and other vulnerabilities.
#!/bin/bash
SYMBOL_NAME="system"; find ./ -type f -exec printf "{}: " \; -exec sh -c "objdump -T \"{}\" 2>&1 | grep -e \" $SYMBOL_NAME\" ; echo \"\"" \; | grep -e " $SYMBOL_NAME"
@SeanPesce
Copy link
Author

Modify the value of SYMBOL_NAME to search for different symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment