提权原理和枚举

权限体系:

ugo

suid sgid

capabilities

AppArmor Selinux

ACL

一些安全机制:

Grsecurity

Pax

ExecShield

ASLR

TOMOYO Linux

SMACK

Yama

CGroups

Linux Namespaces

stackGuard

Proplice

seccomp

ptrace

capsicum

Mprotect

chroot

firejail

枚举:内网渗透

1
2
3
4
命令行tty
python -c 'import pty;pty.spawn("/bin/bash")'
stty raw -echo
export TERM=xterm-color

提权枚举

1.手工枚举(不全,仅小记)

用户:whoami | id | who | w | last

内核:uname -a | lsb_release -a | cat /proc/version | cat /etc/issue | hostnamectl

网络:ip addr | ifconfig | ip route | ip neigh | arp -a

权限:sudo -l | capabilities(getcap -r / 2>/dev/null)

环境变量:echo $PATH | env

进程:ps | ps -ef | ps axjf(查看进程数) | ps aux | top -n 1 |

网络:netstat -a | netstat -at | netstat -au | netstat -l | netstat -s | netstat -ano

whcih awk perl python ruby gcc vi nmap find netcat nc wget tftp ftp tmux screen 2>/dev/null(用 which 仅显示第一次找到的地方)

cat /etc/fstab(未挂在的文件系统)

2.自动枚举

需要对扫描结果进行仔细的分析

提权工具库:

  • PEASS-ng
  • LinEnum
  • Linux-smart-enumeration
  • Linux-exploit-suggester
  • LinuxPrivchecker.py
  • unix-privesc-check

提权原理和枚举
https://jimi-lab.github.io/2025/07/06/提权原理和枚举/
作者
Jimi
发布于
2025年7月6日
许可协议