Skip to content

Releases: InfraTechShelf/lapstool

LapsTool 0.2.0-alpha

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

LapsTool 0.1.0-alpha

Choose a tag to compare

@InfraTechShelf InfraTechShelf released this 02 Nov 15:10

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

Active Directory の LAPS で管理されているローカル管理者パスワードを参照し、有効期限の変更と、参照したパスワードでのリモートデスクトップ接続までを1つの画面で行える Windows 用 GUI ツールです。ローカル管理者権限なしで動きます。


できること

  • パスワードの参照:コンピューター名で検索し(* でワイルドカード)、パスワードを取得します。表示は伏せ字が初期状態で、[表示]で平文に切り替わります。コピーしたパスワードは、一定時間(初期値30秒)が過ぎるとクリップボードから自動で消去します
  • Windows LAPS と旧 LAPS の両方に対応:どちらで管理されている端末かは自動で判定します。Windows LAPS(暗号化パスワードを含む)は Microsoft 公式の LAPS PowerShell モジュールで取得し、旧 Microsoft LAPS は ms-Mcs-AdmPwd 属性を読みます
  • 有効期限の変更:日時を指定して変更するか、今すぐ期限切れにできます。パスワードが実際に変わるのは、対象端末で次にポリシーが処理されたときです
  • リモートデスクトップ接続:パスワードを入力・貼り付けせずに接続できます。資格情報を「このログオン中のみ」有効な形で一時登録して mstsc に渡し、接続後(初期値20秒後)とツールの終了時に削除します
  • 接続に使うローカルアカウント名を設定可能:会社ごとに異なるアカウント名に合わせられます。Windows LAPS が記録しているアカウント名を優先することもできます
  • 会社ごとの初期値を配布可能:設定画面から LapsTool.defaults.xml を書き出し、exe と同じフォルダに置くと、全利用者の初期値になります
  • 操作ログ:誰が・いつ・どの端末を参照・変更したかを記録します。パスワードは記録しません

権限について

本ツールはサインインしているユーザーの権限で AD にアクセスします。誰がパスワードを参照・変更できるかは AD と LAPS の権限設定で決まり、本ツールがそれを迂回することはありません。必要な権限は README を参照してください。

パスワードの扱いの詳細は SECURITY.md にまとめています。

検証状況

項目 状況
旧 LAPS 環境での検索・参照・有効期限の変更・RDP 接続 確認済み
Windows LAPS 環境(暗号化・平文)での参照・有効期限の変更・RDP 接続 未検証

Windows LAPS 環境で試した結果(動いた・動かなかった)を Issues で教えていただけると助かります。検証手順は ZIP 内の 検証手順.md にあります。

ご利用にあたって

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

ダウンロード

LapsTool-0.1.0-alpha.zip(46,882 バイト)

SHA-256: 2fca3a9030121f087f58ad56ada3a56992eefa3aa943945e24fce76fcf1ee833
Get-FileHash -Algorithm SHA256 .\LapsTool-0.1.0-alpha.zip

ZIP 内の LapsTool.exe・LapsTool.exe.config・LapsTool.Core.dll を同じフォルダに置いて実行してください。


English

LapsTool 0.1.0-alpha is the first public release.

LapsTool is a small Windows GUI that looks up local administrator passwords managed by LAPS in Active
Directory, changes their expiration time, and opens a Remote Desktop session with the retrieved
password - all from one window, without local admin rights.

  • Windows LAPS (encrypted or clear-text, via Microsoft's LAPS PowerShell module) and legacy
    Microsoft LAPS
    (ms-Mcs-AdmPwd) are both supported and detected per computer
  • Remote Desktop without typing the password: the credential is stored for the current logon
    session only, handed to mstsc, and deleted after a short delay (20 seconds by default) and when the
    tool exits
  • The local account name used for connections is configurable, and organization-wide defaults can
    be shipped as LapsTool.defaults.xml next to the executable
  • Copied passwords are cleared from the clipboard automatically; an operation log records who viewed
    or changed what, never the password itself
  • All authorization is left to Active Directory. See SECURITY.md for how passwords are handled

Status: tested with legacy LAPS. Windows LAPS has not been tested yet - reports in Issues are
welcome. The UI and documentation are in Japanese.

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

SHA-256: 2fca3a9030121f087f58ad56ada3a56992eefa3aa943945e24fce76fcf1ee833