Skip to content

LapsTool 0.2.0-alpha

Latest

Choose a tag to compare

@InfraTechShelf InfraTechShelf released this 03 Nov 15:14

LapsTool 0.2.0-alpha を公開しました。

リモートデスクトップ接続の方式を変えたバージョンです。あわせて、画面を1列にまとめ、表示まわりの不具合を直しました。


変更点

リモートデスクトップ接続:ユーザー名だけを渡す方式に変更

[接続]を押すと、mstsc の資格情報の入力画面に <コンピューター名>\<LAPS のアカウント> が入った状態で起動します。パスワードはクリップボードにコピーされるので、パスワード欄に貼り付けて接続してください。クリップボードは一定時間(初期値30秒)が過ぎるか、ツールを終了すると消去されます。

0.1.0 では、資格情報マネージャーに資格情報を一時登録して、パスワードを入力せずに接続する方式でした。この方式をやめた理由は次のとおりです。

  • RDP の認証は mstsc に渡した資格情報で行われます。LAPS のアカウントはローカルアカウントなので、認証は必ず NTLM になり、接続先の身元を確認できません。
  • そのため Windows の既定のポリシーでは保存資格情報が拒否され、ほとんどの環境で「お使いの資格情報は機能しませんでした」と表示されて、結局パスワードの入力を求められていました。
  • その際の入力画面には、mstsc が前回その接続先で使った別のアカウント名(例:ドメインの Administrator)が出ていました。
  • 自動ログオンを通すには、サーバーのなりすましを防げなくなるポリシー変更が必要です。ツールの前提として、それを求めないことにしました。

この変更により、パスワードが資格情報マネージャーに書き込まれることはなくなりました。

画面を1列に

検索結果の一覧をなくし、検索欄・パスワード・有効期限の変更・リモートデスクトップを縦1列に並べました。ワイルドカード(*)で複数ヒットしたときだけ、検索欄の下に候補一覧が出ます。

不具合の修正

  • 検索の後にパスワードがローテーションされると、パスワードを取得しても有効期限の表示が古いままだった問題を直しました。

設定の変更

  • 「一時資格情報を削除するまで」をなくしました。
  • 「接続時にパスワードをクリップボードにコピーする」を追加しました(初期値:オン)。0.1.0 の「接続時にクリップボードにもコピー」(初期値:オフ)の値は引き継ぎません。
  • そのほかの設定(ローカルアカウント名など)は、0.1.0 の設定ファイルからそのまま引き継ぎます。

検証状況

項目 状況
旧 LAPS 環境での検索・参照・有効期限の変更・RDP 接続 確認済み(0.1.0 で確認)
Windows LAPS 環境での検索・参照・今すぐ期限切れ 確認済み
Windows LAPS 環境での RDP 接続(入力画面に LAPS のアカウントが入る・貼り付けて接続できる・クリップボードが消去される) 確認済み
暗号化パスワードを runas /netonly で起動したツールから取得できるか 未検証

検証手順は ZIP 内の 検証手順.md にあります。試した結果を Issues で教えていただけると助かります。

ご利用にあたって

  • アルファ版です。 仕様が予告なく変わることがあり、不具合が含まれる可能性があります
  • Microsoft の非公式ツールです。 Microsoft とは関係がなく、Microsoft による承認・サポートもありません
  • 実行ファイルはコード署名していないため、初回の実行時に Windows SmartScreen の警告が出ることがあります。「詳細情報」→「実行」で起動できます
  • 動作要件:Windows 11、Windows 10(2023年4月以降の更新プログラム適用済み)、Windows Server 2019 以降。.NET Framework 4.8

ダウンロード

LapsTool-0.2.0-alpha.zip(45,265 バイト)

SHA-256: 94cc775c1d15918fa6eb225a894cafb320dc6d37e11df5fd913251b551a2bee3
Get-FileHash -Algorithm SHA256 .\LapsTool-0.2.0-alpha.zip

0.1.0 から更新する場合は、LapsTool.exe・LapsTool.exe.config・LapsTool.Core.dll の3つを差し替えてください。


English

LapsTool 0.2.0-alpha changes how Remote Desktop connections are started.

  • Remote Desktop now passes only the user name. mstsc opens with
    <computer>\<LAPS account> already filled in, and the password is placed on the clipboard (cleared
    after 30 seconds by default, and when the tool exits) so you can paste it.
    Version 0.1.0 stored a temporary credential in Credential Manager instead. Because LAPS accounts are
    local accounts, the RDP logon always uses NTLM, and Windows' default policy refuses saved
    credentials in that case - so users were prompted anyway, often with a different account name
    pre-filled. Making it work would require a policy that gives up server authentication, which the
    tool should not depend on. Passwords are no longer written to Credential Manager.
  • Single-column window. The result list is gone; a candidate list appears only when a wildcard
    search returns several computers.
  • Fixed: the expiration time shown after fetching a password could be stale if the password had
    rotated since the search.
  • Settings: "delete temporary credential after" was removed; "copy password to clipboard when
    connecting" was added (on by default). Other settings carry over from 0.1.0.

Status: tested with Windows LAPS (search, retrieval, expire now, Remote Desktop) and with legacy
LAPS in 0.1.0. Retrieving encrypted passwords from a tool started with runas /netonly has not been
tested. The UI and documentation are in Japanese.

Unofficial tool, not affiliated with Microsoft. Binaries are not code-signed.

SHA-256: 94cc775c1d15918fa6eb225a894cafb320dc6d37e11df5fd913251b551a2bee3