Skip to content

Instantly share code, notes, and snippets.

@infernalheaven
Forked from SeanPesce/find_symbol.sh
Created April 2, 2023 16:23
Show Gist options
  • Save infernalheaven/f739375cd449a88796b34d784e2c7b3f to your computer and use it in GitHub Desktop.
Save infernalheaven/f739375cd449a88796b34d784e2c7b3f 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment