SSブログ
LinkStation/TeraStation ブログトップ

TeraStation telnet [LinkStation/TeraStation]


※ BuufaloのWebサイトより引用

LinkStation LS-WHTLと同じな「java -jar acp_commander.jar -t 192.168.0.43 -o」では だめ(rootのパスワードが残る)のようなので違う方法で...

acp_commander のコマンドモードを使い、/etc/shadow (Shadowパスワード)の
パーミッションを変えて、削除する。

※ acp_commanderの保存先:C:\Users\User\Desktop\TS-WXL、
  IPアドレス:192.168.0.43、macアドレス:00:1D:73:E7:6C:D5、
  adminのパスワード:adminPasswd など、固有の情報は仮のものです。


①まずは、コマンドプロンプトで以下を実行。
--------------------------------------------------------------------------------------------------------------
C:\Users\User\Desktop\TS-WXL> java -jar acp_commander.jar -t 192.168.0.43 -ip 192.168.0.43 -pw adminPasswd -s
ACP_commander out of the nas-central.org (linkstationwiki.net) project.
Used to send ACP-commands to Buffalo linkstation(R) LS-PRO.

WARNING: This is experimental software that might brick your linkstation!


Using random connID value = 50FA1AB3525B
Using target: TS-WXLCD5/192.168.0.43
Starting authentication procedure...
Sending Discover packet...
Found: TS-WXLCD5 (/192.168.0.43) TS-WXL(tsukuba) (ID=003212) mac: 00:1D:73:E7:6C:D5 Firmware= 1.760
Key=290DA543
Trying to authenticate EnOneCmd... ACP_STATE_OK
Trying to authenticate with admin password... ACP_STATE_OK
Enter telnet commands to LS, enter 'exit' to leave
/root>chmod 666 /etc/shadow


OK (ACP_STATE_OK)

>


>exit

Changeing IP: ACP_STATE_PASSWORD_ERROR
Please note, that the current support for the change of the IP is currently very rudimentary.
The IP has been set to the given, fixed IP, however DNS and gateway have not been set. Use the WebGUI to make appropriate settings.

C:\Users\User\Desktop\TS-WXL>

再起動しておく。

--------------------------------------------------------------------------------------------------------------


②admin で telnet 接続し、root のパスワードを消す。
--------------------------------------------------------------------------------------------------------------
BUFFALO INC. TeraStation series


TS-WXLCD5 login: admin
Password:adminPasswd
Last login: Sun Apr 30 19:06:42 JST 2023 on pts/0
-sh: /etc/profile: Permission denied
-sh-3.2$ vi /etc/shadow

  viで1行目のパスワードを、

   root:$1$S3IeVE7t$1LiWuOgI1tyShTpPl742a.:19506:0:99999:7:::

  以下のように「空」の設定に修正する。

   root::11009:0:99999:7:::

  :w! で上書き保存する。

  cat で修正結果を確認する。

-sh-3.2$ cat /etc/shadow
root::11009:0:99999:7:::
bin:*:11009:0:99999:7:::
daemon:*:11009:0:99999:7:::
halt:*:11009:0:99999:7:::
ftp:*:11009:0:99999:7:::
rpc:*:11009:0:99999:7:::
rpcuser:*:11009:0:99999:7:::
apache:*:11009:0:99999:7:::
admin:$1$sl0Bm/vh$cjHN7QBArdr1cJ8lENWFt.:19171:0:99999:7:::
sshd:!:13241:0:99999:7:::
nobody:!:13148:0:99999:7:::
guest:!:13148:0:99999:7:::
mysql:!:15033::::::
-sh-3.2$ exit
--------------------------------------------------------------------------------------------------------------


③rootでログオン(rootのパスワードは空)し、最終調整する。
--------------------------------------------------------------------------------------------------------------

BUFFALO INC. TeraStation series
TS-WXLCD5 login: root
Last login: Sun Apr 30 19:07:02 JST 2023 on pts/0
root@TS-WXLCD5:~#


  rootでログインできた。
  /etc/shadow のパーミッションを644に戻しておく。


root@TS-WXLCD5:~# chmod 644 /etc/shadow

  後は、passwdコマンドで、自分が考えたrootパスワードを設定しておくなど。

以上


【参考】
--------------------------------------------------------------------------------------------------------------

C:\Users\User\Desktop\TS-WXL> java -jar acp_commander.jar
ACP_commander out of the nas-central.org (linkstationwiki.net) project.
Used to send ACP-commands to Buffalo linkstation(R) LS-PRO.

WARNING: This is experimental software that might brick your linkstation!


Version 0.4.1 (beta)

Usage: acp_commander [options] -t target

options are:
-t target .. IP or network name of the Linkstation.
-m MAC ... define targets mac address set in the ACP package.
-na ... no authentication, skip the ACP_AUTH packet.
-ba ... use bug/bufferoverflow on LS to bypass password authent.
-pw passwd . your LS admin password.
-i ID ... define a connection identifier, standard: random value.
-p port ... define alternative target port, default = 22936
-b localIP.. bind to local address.

-f ... find linkstation(s).
-o ... open the linkstation by sending 'telnetd' and 'passwd -d root'.
-c cmd ... sends the given shell command cmd to the linkstation.
-s ... interactive shell.
-cb ... clear \boot, output of df follows for control of success.
-ip newIP... change IP to newIP, clears also admin password.
-save ... save configuration.
-load ... load configuration.
-blink ... blink LED's and play some tones.
-gui nr ... set Web GUI language 0=Jap, 1=Eng, 2=Ger.
-addons ... install addons.tar from local or linkstationwiki.
-diag ... run some diagnostics on LS settings (lang, backup).
-emmode ... Linkstation boots next into EM-mode.
-normmode .. Linkstation boots next into normal mode.
-reboot ... reboot Linkstation.
-shutdown .. shut Linkstation down.

-d1 | -d2 .. set debug level, generate additional output
-q ... quiet, surpress header, does not work with -h or -v
-h | -v ... extended help
-u ... usage (this output)

*) this is not the MAC address the packet is sent to, but the address within
the ACP packet. The linkstation will only react to ACP packets if they
carry the correct (its) MAC-address or FF:FF:FF:FF:FF:FF

This program is the result of the work done at nas-central.org (linkstationwiki.net),
which is not related with Buffalo(R) in any way.

Experimental software, use with care, it might brick your Linkstation!


C:\Users\User\Desktop\TS-WXL>


nice!(0)  コメント(0) 
共通テーマ:パソコン・インターネット

Link Stationの殻にHDDを挿してファームを入れる [LinkStation/TeraStation]

BUFFALO NAS Linkstation LS-WH1.0TGL/R1、LS-WH2.0TGL/R1のHDDなしの殻を使えるようにする方法を備忘。

こちらなどを参考にする。
https://bbs.kakaku.com/bbs/05384013001/SortID=23873606/
http://www.yamamo10.jp/yamamoto/comp/home_server/LS-WH20TGLR1/index.php



以下は、自分の環境用などに再整理中

【用意するもの】
ハードウェア
①WindowsPC
②LANケーブル(クロス) またはLANケーブル(ストレート)×2とHUBでも可
③LS-WH1.0TGL/R1, LS-WH2.0TGL/R1など
④HDD(SATA) 同じ容量のもの2つ(RAID1での使用を想定)
⑤SATA-USBコンバータ または USB-HDDケース

ソフトウェア
⑥LS-WHGL/R1シリーズ ファームウェア アップデータ
 Ver.3.09は、次のリンク先からダウンロード可
 https://www.buffalo.jp/support/download/detail/?dl_contents_id=60506
⑦NASNavigator2
 https://www.buffalo.jp/support/download/detail/?dl_contents_id=60819
⑧TFTPサーバソフト
 以下などを使う
  ・簡易TFTPサーバ
   https://www.vector.co.jp/soft/win95/net/se100186.html
  ・TFTP Boot Recovery 1.53
   https://www.yokoweb.net/share/osl/tftp-boot-recovery/
⑨オプション
 パケットやり取り確認用にWireshark
 https://www.wireshark.org/download.html

【手順】
LS-WHGL/R1シリーズ ファームウェア アップデータ

3.09
https://www.buffalo.jp/support/download/detail/?dl_contents_id=60506

3.10β
https://www.buffalo.jp/support/download/detail/?dl_contents_id=60504


解凍中にパスワードを聞いてきますので、以下のいずれかがパスワードとなります。

1NIf_2yUOlRDpYZUVNqboRpMBoZwT4PzoUvOPUp6l
aAhvlM1Yp7_2VSm6BhgkmTOrCN1JyE0C5Q6cB3oBB
YvSInIQopeipx66t_DCdfEvfP47qeVPhNhAuSYmA4
IeY8omJwGlGkIbJm2FH_MV4fLsXE8ieu0gNYwE6Ty


aAhvlM1Yp7_2VSm6BhgkmTOrCN1JyE0C5Q6cB3oBB
で解凍できました。

→ initrd.buffalo




(8)・PCのIPアドレスを 192.168.11.1 に変更し、LS-WTGL/R1と接続
  ・PCのFW機能を停止

  fw
http://mrxray.on.coocan.jp/Delphi/Others/MicrosoftSecurity.htm#02


  ・TFTPサーバを起動し先ほどのフォルダを指定(時計横のアイコン右クリック)
  フォルダにあるファイル:
   Uimage.buffalo ---最初の解凍でできたもの
    initrd.img ---最初の解凍でできたもの
   initrd.buffalo ---パスワードで解凍してできたもの
   LSUpdater.exe ---
 
(9)LS-WTGL/R1の電源ON
 電源ランプは最初点火するが消える。真ん中 赤ランプ6回点滅、下のLANランプは点火、
 
(10)リセットスイッチ長押し、赤LEDの点滅が消える。 
 (wiresharkでみるとTFTPアクセスしていた)
 {Uimage.buffalo(1.7M)とinitrd.buffalo(5.1M)が読まれる}
  (TFTPはNASがIP:192.168.11.150でTFTP-PC:192.168.11.1)

NAS NAVigator2
.
.
.
.
.
.




nice!(0)  コメント(0) 
共通テーマ:パソコン・インターネット

LS-WHGLやLS-WTGLにtelnetdを走らせる [LinkStation/TeraStation]

1.Javaを入れておきます。
  Javaはこちらからダウンロードしてインストールます。

2.acp_commander.jarをダウンロードします。
  acp_commander.jarはこちらからダウンロードします。

3.コマンドプロンプトでacp_commander.jarを走らせます。

  

4.telnetでLinkstationにログインします。
  IDは root で、初期パスワードは設定されていません。

  

  passwd コマンドでパスワードを設定すると、次からはパスワード入力が
  求められます。

  


5.Linkstationの起動スクリプトを修正します。

  

  を実行して起動スクリプトを開き、ファイル末尾に以下の1行を追記します。

  

  SSHのときは、代わりに以下の1行を記載します。

  
.
nice!(0)  コメント(0) 
共通テーマ:パソコン・インターネット
LinkStation/TeraStation ブログトップ

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。