1
mirror of https://github.com/carlospolop/PEASS-ng synced 2024-11-27 14:13:38 +01:00

Merge pull request #214 from 0x2342/ld_fix

Empty LD_LIBRARY_PATH before running strace. Prevents false positives…
This commit is contained in:
Carlos Polop 2021-09-24 13:07:39 +01:00 committed by GitHub
commit b3e4ec6a2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -2757,8 +2757,11 @@ if echo $CHECKS | grep -q IntFiles; then
printf $ITALIC
echo "----------------------------------------------------------------------------------------"
echo " --- Trying to execute $sname with strace in order to look for hijackable libraries..."
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=""
timeout 2 "$STRACE" "$sname" 2>&1 | grep -i -E "open|access|no such file" | sed -${E} "s,open|access|No such file,${SED_RED}$ITALIC,g"
printf $NC
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH
echo "----------------------------------------------------------------------------------------"
echo ""
fi

View File

@ -3156,10 +3156,13 @@ if echo $CHECKS | grep -q IntFiles; then
printf $ITALIC
echo "----------------------------------------------------------------------------------------"
echo " --- Trying to execute $sname with strace in order to look for hijackable libraries..."
OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=""
timeout 2 "$STRACE" "$sname" 2>&1 | grep -i -E "open|access|no such file" | sed -${E} "s,open|access|No such file,${SED_RED}$ITALIC,g"
printf $NC
echo "----------------------------------------------------------------------------------------"
echo ""
export LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH
fi
fi
fi