# 查看用户信息

windows 通过 whoami 和 net user 查看用户基本信息

linux 下通过 id 进行查看,还可以查看 passwd 文件查看用户列表

# 查看服务器信息

通过 hostname 查看机器名

windows 下通过 systeminfo 查看目标机器的信息

linux 下使用 uname -a 或者 lsb_release -a 显示系统信息

# 查看进程信息

windows 下使用 tasklist /SVC 查看进程

linux 下使用 ps aux 查看进程

# 查看路由表

ipconfig、ifconfig 查看网络信息

windows 下 route print 查看路由表信息, netstat -ano 查看网络连接状态

linux 下使用 /sbin/route 查看路由数据

# 防火墙

windows 下使用 netsh advfirewall show currentprofile 查看防火墙状态

查看防火墙规则: netsh advfirewall firewall show rule name=all

linux 下使用 grep -Hs iptables /etc/*

# 计划任务

windows 下查询 schedule 使用: schtasks /query /fo LIST /v

linux 下通过 ls -al /etc/cron* 查看定时任务, cat /etc/crontab

# 应用信息收集

windows 下使用 wmic product get name,version,vendor 获取到安装的程序。

使用 wmic qfe get Caption, Description, HotFixID, InstalledOn 获取安装的补丁。

linux 下使用 dpkg -l 查看安装的程序

# 查找可读写的 file

windows 使用一个叫 accesschk.exe 的软件进行查找

或者使用 powershell 进行

linux 下使用 find / -writable -type d 2>/dev/null 查找可写的文件

# 查找未挂载的磁盘

windows 下使用 mountvol

linux 下使用 mountcat /etc/fstab/bin/lsblk 进行查询

# 查询驱动器

windows 下使用 powershell。

linux 下使用 lsmod ,并通过 /sbin/modinfo 查询某一 mod 的细节。

# installElevate

windows 下查询注册表: reg query HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Installerreg query HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer

linux 下查询具有 s 权限的文件: find / -perm -u=s -type f 2>/dev/null

# 自动化工具

windows 下使用 windows-privesc-check 的工具进行枚举

linux 下使用 unix-privesc-check 工具进行枚举

# windows 提权实践

UAC 的存在,保证一些操作需要高权限进行

通过 fodhelper.exe 进行 bypass

具体怎么做的由于没有字幕,我完全搞不明白,只知道使用 process monitor 进行调制,在注册表中添加了一项内容。好像绕过了 UAC 认证这一步骤?然后可以通过注册表键值,直接绕过 UAC 执行。

网上有相关的文章可以搜到的

我对 windows 下的 powershell 真的一点也不了解啊!

  • leveraging unquoted service paths
  • windows kernel vulnerabilities: USBPcap Case Study

# linux 提权实践

  • insecure file permissions: cron case study

通过 grep "CRON" /var/log/cron.log 查询计划任务日志,写入计划任务等待反弹。

  • insecure file permissions:/etc/passwd

写入一个 root 用户到 passwd,直接 su 过去拿到 root 权限

  • 内核提权

编译 C 代码,直接执行 pwn2root