外出先から自宅のコンピュータを操作したい(まだ出来ていない)

UltraVNC を使う.

  1. UltraVNC をインストールする
    • Vista だから,無難に D:\Program Files 以下にインストールしておく
    • アドオンか何かもインストールする?にYes
    • 最後の4個のチェックボックスはオフのままにする
  2. 日本語化パッチをあてる
  3. drivers.zip の install.bat を実行してビデオフックドライバをインストールし,Windows を再起動する
  4. UltraVNC Server を実行する
    • パスワード設定は「MS ログオンを使用」を選ぶ
    • 「キーボード&マウス」で「日本語」を選ぶ
    • 「最後のクライアントが切断されたとき」は「ロック」
  5. UltraVNC をサービスに登録する
  6. タスクトレイアイコン右クリックメニューのプロパティからビデオフックドライバを有効化する
  7. プラグインが MSRC4Plugin.dsm しかなく,うまく動かない(new_rc4.key の生成に失敗する)
  8. MSRC4Plugin_NoReg.dsm を入手し設定しようにも,うまく動かない(同上)
  9. 「an unrecoverable error occurred generatekey failed ultravnc」でググる
  10. UltraVNC • View topic - winvnc gen key new_rc4.key with msrc4plugin 1.2.4 に至り「SecureVNC かなるほど,いっそ別のものでもいいな」
  11. SecureVNC DSM Plugin の使い方が分からない

いきなり WAN でやったせいだよな.LAN で試してみよう.

SecureVNC DSM Plugin の使い方

このプラグインは非対称鍵暗号方式を利用した通信で共通鍵を交換し,以降の通信をこの共通鍵で暗号化する.共通鍵交換までの過程が二通り用意されている.ちゃんと書いてあるな.

Explanation

Basically, the server has a 2048-bit key for the RSA cipher. It sends the public key to the viewer. The viewer then generates the 128-bit symmetric key for the ARC4/AES stream cipher.

The viewer encrypts the symmetric key and sends it back to the server, which then decrypts it using its internal private key.

All further communication is then encrypted using this symmetric key.

Optionally, the ClientAuth key pair is used to sign and verify the key, to detect and prevent the possiblity of an active man-in-the-middle attack. The plugin by default is secure against passive man-in-the-middle attacks (that is, communication is observed by not modified). If the communication can be actively modified, a malicious node can intercept the key exchange and inject their own keys. This is a flaw with all key exchanges that do not rely on a trusted third party or secure channel. Please generate a keypair for client authentication to avoid this possibility.

ARC4 is significantly faster than AES, and when properly implemented is effectively just as secure. The current version drops the initial 3072 bytes of the ARC4 keystream to avoid known biases. SHA1 is used as the internal hashing algorithm.

AES is now the default encryption algorithm; to use ARC4, please use the ARC4 builds on the server. The viewer is capable of both.

Like all negotiations between two parties, it is susceptible to a man-in-the-middle attack. The only way to avoid this is to involve a trusted third party. However that is overkill for most purposes, I believe; this can only be exploited if a malicious party is able to both view AND modify the communication between the two parties.

SecureVNC Plugin - Simple, effective, and securely encrypted VNC sessions for UltraVNC

ここでは,私が利用したいと思った「ビューア側 PC を限定する方法」について述べる.

ビューア側 PC を限定する方法
  1. サーバ側・ビューア側の両方に SecureVNCPlugin.dsm を置く
  2. サーバ設定で SecureVNCPlugin.dsm を有効化し,Generate Viewer Key で Server_ClientAuth.pubkey(公開鍵) と Viewer_ClientAuth.pkey(秘密鍵) を作る
  3. ビューア側に Viewer_ClientAuth.pkey をコピーする
  4. ビューア側の SecureVNCPlugin.dsm を有効化する

利用できる鍵ペアは一対に限る.複数パターンを置いたところで,「条件にマッチするファイル名をリストアップ」し,その1件目だけを使用するようだ.「条件にマッチするファイル名」は,公開鍵は ClientAuth.pubkey で終わっていること,秘密鍵は ClientAuth.pkey で終わっていること.つまりは,_ 以前を自由にできる.

その他

ダウンロードしたのもセットアップしたのも 1.0.6.5 なのに,タイトルバーには 1.0.6.4 と出ている.パッチ適用前でも,バージョン情報ダイアログでも.

鍵を生成するタイプでなく,鍵ペアを生成するでもない状態が一番楽かな.でもこの場合の秘密鍵ってどこにあるんだろう.SecureVNCPlugin.dsm 内で決めうちなんだろうか.安全なのかな.