LoginSignup
1
0

More than 5 years have passed since last update.

Windows認証させる StreamRelay.NET.exe

Last updated at Posted at 2017-06-21

接続時に、認証をしてくれるストリームSystem.Net.Security.NegotiateStreamクラスがあるので、これを使うことで、Workstation上では同一ユーザ/パスワードのプロセス、またはNTドメイン(ActiveDirectory)上の場合は同一ドメインユーザでないと認証されないと思う。


Windows認証させる StreamRelay.NET.exe

サーバ側(192.0.2.1)

StreamRelay.NET.exe -LocalPort 91 -RemotePort 80 -RemoteHost 192.0.2.2 -LocalProxy netstream:///?NTLM
とすると、91/tcpに接続するには、NTLM認証(Windows統合認証)が必要となる

クライアント側

StreamRelay.NET.exe -LocalPort 90 -RemotePort 91 -RemoteHost 192.0.2.1 -RemoteProxy netstream:///?NTLM
とすると、互いに認証されて接続される


Windows認証させるリモート・シェル

nc -nvv -l -p 90 -e cmd.exe

StreamRelay.NET.exe -LocalPort 90 -RemotePort -1 -RemoteProgram cmd.exe

では、認証のないリモート・シェル・サービスだけど、

StreamRelay.NET.exe -LocalPort 90 -RemotePort -1 -RemoteProgram cmd.exe -LocalProxy netstream:///?NTLM

としてあげると、認証機能付(Windows統合認証)リモート・シェル・サービスになるよ。


目次へ戻る

目次というか最初の一歩

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0