跳转至

Linux 提权

查看用户信息

Bash
1
2
3
4
w
id
whoami
cat /etc/passwd

系统版本信息

Bash
1
2
3
cat /etc/os-release
内核
uname -a

进程信息

Bash
ps aux
ps -efw

网络连接

Bash
1
2
3
4
ip a
ifconfig
ip route
ss -partu

计划任务

Bash
1
2
3
4
5
6
7
grep -ro Ri /etc/cron*
grep -RE 'passwords?=".*"' 2>/dev/null
grep -E '\w*([0-9]|[0-9][0-9])\w*' /etc/cron*
/etc/crontab
crontab -l
ls /var/spool/cron
cat /var/log/cron.log

查看实时进程

Bash
pspy

可写的目录

Bash
find / -writable -type d 2>/dev/null

系统分区

Bash
/etc/fstab

SUID 程序枚举

Bash
find / -perm -u=s -type f 2>/dev/null

环境变量

Bash
1
2
3
4
env
env -spilt-string-touch /tmp/yfh
cat .bashrc
cat .bash_history

sudo 权限

Bash
sudo -l

自动化工具及提权参考网站

Bash
1
2
3
4
5
# 自动化工具
linpeas

# 提权参考网址
https://gtfobins.github.io/