Skip to content

Commit

Permalink
Merge pull request #264 from deoxykev/master
Browse files Browse the repository at this point in the history
More robust implementation of pkexec binary modification time check
  • Loading branch information
carlospolop authored Feb 3, 2022
2 parents db89a77 + 52c2a1e commit 9f4045c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions linPEAS/builder/linpeas_parts/1_system_information.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ else echo_not_found "sudo"
fi
echo ""

#-- SY) CVE-2021-4024
if [ `command -v pkexec` ] && stat -c '%a' $(which pkexec) | grep -q 4755 && (stat -c '%y' $(which pkexec) | grep -qvE "2[0-9][2-9][3-9]-|2022-[0-1][2-9]-0[0-9]|2022-01-[2-3][0-9]|2022-01-1[2-9]" ) ; then
echo "Vulnerable to CVE-2021-4024 (polkit privesc)" | sed -${E} "s,.*,${SED_RED_YELLOW},"
#-- SY) CVE-2021-4034
if [ `command -v pkexec` ] && stat -c '%a' $(which pkexec) | grep -q 4755 && [ "$(stat -c '%Y' $(which pkexec))" -lt "1642035600" ]; then
echo "Vulnerable to CVE-2021-4034 (polkit privesc)" | sed -${E} "s,.*,${SED_RED_YELLOW},"
fi

#--SY) USBCreator
Expand Down

0 comments on commit 9f4045c

Please sign in to comment.