Last active
May 10, 2023 19:03
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Modify the value of SYMBOL_NAME to search for different symbols.