SeManageVolumePrivilege: ์์ ํ์ผ ์ฝ๊ธฐ๋ฅผ ์ํ ์์ ๋ณผ๋ฅจ ์ก์ธ์ค
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
๊ฐ์
Windows ์ฌ์ฉ์ ๊ถํ: ๋ณผ๋ฅจ ์ ์ง ๊ด๋ฆฌ ์์ ์ํ (์์: SeManageVolumePrivilege).
๊ถํ ๋ณด์ ์๋ ์กฐ๊ฐ ๋ชจ์, ๋ณผ๋ฅจ ์์ฑ/์ ๊ฑฐ, ์ ์ง ๊ด๋ฆฌ IO์ ๊ฐ์ ์ ์์ค ๋ณผ๋ฅจ ์์ ์ ์ํํ ์ ์์ต๋๋ค. ๊ณต๊ฒฉ์์๊ฒ ํนํ ์ค์ํ ์ ์ ์ด ๊ถํ์ผ๋ก ์์ ๋ณผ๋ฅจ ์ฅ์น ํธ๋ค(์: \.\C:)์ ์ด๊ณ NTFS ํ์ผ ACL์ ์ฐํํ๋ ์ง์ ๋์คํฌ I/O๋ฅผ ์คํํ ์ ์๋ค๋ ๊ฒ์ ๋๋ค. ์์ ์ก์ธ์ค๋ฅผ ํตํด ํ์ผ ์์คํ ๊ตฌ์กฐ๋ฅผ ์คํ๋ผ์ธ์ผ๋ก ํ์ฑํ๊ฑฐ๋ ๋ธ๋ก/ํด๋ฌ์คํฐ ์์ค์์ ์ฝ๋ ๋๊ตฌ๋ฅผ ํ์ฉํ์ฌ DACL์ ์ํด ์ ๊ทผ์ด ๊ฑฐ๋ถ๋ ๊ฒฝ์ฐ์๋ ๋ณผ๋ฅจ ์์ ์ด๋ค ํ์ผ์ด๋ ๋ฐ์ดํธ ๋จ์๋ก ๋ณต์ฌํ ์ ์์ต๋๋ค.
๊ธฐ๋ณธ: ์๋ฒ ๋ฐ ๋๋ฉ์ธ ์ปจํธ๋กค๋ฌ์ Administrators.
์ ์ฉ ์๋๋ฆฌ์ค
- ๋์คํฌ ์ฅ์น๋ฅผ ์ฝ์ด ACL์ ์ฐํํ ์์ ํ์ผ ์ฝ๊ธฐ(์: %ProgramData%\Microsoft\Crypto\RSA\MachineKeys ๋ฐ %ProgramData%\Microsoft\Crypto\Keys ์๋์ ๋จธ์ ๊ฐ์ธํค, ๋ ์ง์คํธ๋ฆฌ ํ์ด๋ธ, DPAPI ๋ง์คํฐํค, SAM, VSS๋ฅผ ํตํ ntds.dit ๋ฑ ๋ฏผ๊ฐํ ์์คํ ๋ณดํธ ์๋ฃ ํ์ทจ).
- raw device์์ ๋ฐ์ดํธ๋ฅผ ์ง์ ๋ณต์ฌํ์ฌ ์ ๊ธด/๊ถํ ์๋ ๊ฒฝ๋ก(C:\Windows\System32\โฆ) ์ฐํ.
- AD CS ํ๊ฒฝ์์ CA์ ํค ์๋ฃ(๋จธ์ ํค ์คํ ์ด)๋ฅผ ํ์ทจํด โGolden Certificatesโ๋ฅผ ๋ฐ๊ธํ๊ณ PKINIT๋ฅผ ํตํด ์ด๋ค ๋๋ฉ์ธ ์ฃผ์ฒด๋ ๊ฐ์ฅ(impersonate)ํ ์ ์์. ์๋ ๋งํฌ ์ฐธ์กฐ.
์ฐธ๊ณ : ๋ณด์กฐ ๋๊ตฌ์ ์์กดํ์ง ์๋ ํ NTFS ๊ตฌ์กฐ๋ฅผ ํ์ฑํ ํ์๊ฐ ์ฌ์ ํ ํ์ํฉ๋๋ค. ์์ฉ ๋๊ตฌ ์ค ๋ค์๋ ์์ ์ก์ธ์ค๋ฅผ ์ถ์ํํฉ๋๋ค.
์ค์ ๊ธฐ๋ฒ
- ์์ ๋ณผ๋ฅจ ํธ๋ค์ ์ด๊ณ ํด๋ฌ์คํฐ๋ฅผ ์ฝ๊ธฐ:
Click to expand
```powershell # PowerShell โ read first MB from C: raw device (requires SeManageVolumePrivilege) $fs = [System.IO.File]::Open("\\.\\C:",[System.IO.FileMode]::Open,[System.IO.FileAccess]::Read,[System.IO.FileShare]::ReadWrite) $buf = New-Object byte[] (1MB) $null = $fs.Read($buf,0,$buf.Length) $fs.Close() [IO.File]::WriteAllBytes("C:\\temp\\c_first_mb.bin", $buf) ```// C# (compile with Add-Type) โ read an arbitrary offset of \\.\nusing System;
using System.IO;
class R {
static void Main(string[] a){
using(var fs = new FileStream("\\\\.\\C:", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)){
fs.Position = 0x100000; // seek
var buf = new byte[4096];
fs.Read(buf,0,buf.Length);
File.WriteAllBytes("C:\\temp\\blk.bin", buf);
}
}
}
- Use an NTFS-aware tool to recover specific files from raw volume:
- RawCopy/RawCopy64 (์ฌ์ฉ ์ค์ธ ํ์ผ์ ์นํฐ ์์ค ๋ณต์ฌ)
- FTK Imager or The Sleuth Kit (์ฝ๊ธฐ ์ ์ฉ ์ด๋ฏธ์ง, ์ดํ ํ์ผ ์นด๋น)
- vssadmin/diskshadow + shadow copy, then copy target file from the snapshot (VSS๋ฅผ ์์ฑํ ์ ์๋ค๋ฉด; ์ข ์ข ๊ด๋ฆฌ์ ๊ถํ์ด ํ์ํ์ง๋ง SeManageVolumePrivilege๋ฅผ ๊ฐ์ง ๋์ผํ ์ด์์์๊ฒ ํํ ์ ๊ณต๋จ)
Typical sensitive paths to target:
- %ProgramData%\Microsoft\Crypto\RSA\MachineKeys\
- %ProgramData%\Microsoft\Crypto\Keys\
- C:\Windows\System32\config\SAM, SYSTEM, SECURITY (๋ก์ปฌ ๋น๋ฐ)
- C:\Windows\NTDS\ntds.dit (๋๋ฉ์ธ ์ปจํธ๋กค๋ฌ โ shadow copy๋ฅผ ํตํด)
- C:\Windows\System32\CertSrv\CertEnroll\ (CA certs/CRLs; ๊ฐ์ธ ํค๋ ์์ machine key store์ ์ ์ฅ๋จ)
AD CS tieโin: Forging a Golden Certificate
๋ง์ฝ machine key store์์ Enterprise CA์ ๊ฐ์ธ ํค๋ฅผ ์ฝ์ ์ ์๋ค๋ฉด, ์์์ ์ฃผ์ฒด์ ๋ํด clientโauth ์ธ์ฆ์๋ฅผ ์์กฐํ๊ณ PKINIT/Schannel์ ํตํด ์ธ์ฆํ ์ ์์ต๋๋ค. ์ด๋ ํํ Golden Certificate๋ผ๊ณ ํฉ๋๋ค. ์ฐธ๊ณ :
(์น์ : โForging Certificates with Stolen CA Certificates (Golden Certificate) โ DPERSIST1โ).
Detection and hardening
- SeManageVolumePrivilege (Perform volume maintenance tasks)์ ํ ๋น์ ์ ๋ขฐํ ์ ์๋ ๊ด๋ฆฌ์์๊ฒ๋ง ์๊ฒฉํ ์ ํํ์ญ์์ค.
- Sensitive Privilege Use์ \.\C:, \.\PhysicalDrive0 ๊ฐ์ ๋๋ฐ์ด์ค ๊ฐ์ฒด์ ๋ํ ํ๋ก์ธ์ค ํธ๋ค ์คํ์ ๋ชจ๋ํฐ๋งํ์ญ์์ค.
- ์์ ํ์ผ ์ฝ๊ธฐ๋ก๋ถํฐ ํค ์๋ฃ๊ฐ ์ฌ์ฉ ๊ฐ๋ฅํ ํํ๋ก ๋ณต๊ตฌ๋์ง ์๋๋ก HSM/TPM ๊ธฐ๋ฐ CA ํค ๋๋ DPAPI-NG๋ฅผ ์ฐ์ ์ฌ์ฉํ์ญ์์ค.
- ์ ๋ก๋, ์์ ๋ฐ ์ถ์ถ ๊ฒฝ๋ก๋ฅผ ์คํ ๋ถ๊ฐ๋ฅ(non-executable)ํ๊ณ ๋ถ๋ฆฌ๋ ์ํ๋ก ์ ์งํ์ญ์์ค(์น ์ปจํ ์คํธ ๋ฐฉ์ด๋ก์ ์ด ์ฒด์ธ ํ-์ ์ฉ๊ณผ ์์ฃผ ๊ฒฐํฉ๋จ).
References
- Microsoft โ Perform volume maintenance tasks (SeManageVolumePrivilege): https://learn.microsoft.com/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/perform-volume-maintenance-tasks
- 0xdf โ HTB: Certificate (SeManageVolumePrivilege used to read CA key โ Golden Certificate): https://0xdf.gitlab.io/2025/10/04/htb-certificate.html
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


