


先日、Windows 10のWindows Subsystem for Linux(WSL)上で動作するKali Linuxをインストールしてみました。
このKali Linuxはコンソールのみになりますが、下記の記事を参考にデスクトップ環境(xfce4)を追加してみました。
Run ‘Kali Linux’ Natively On Windows 10 — Just Like That!
https://thehackernews.com/2018/03/kali-linux-hacking-windows.html
- パッケージリストの更新
- ディストリビューションの更新
- wgetのインストール
- Xfce4のインストールスクリプトをダウンロード
- Xfce4のインストール
- サービスの開始
- リモートデスクトップで接続
- ログアウト
- サービスの停止
1 2 3 4 5 6 7 8 |
rootlinks@Win10:~$ sudo apt-get update Get:1 http://ftp.ne.jp/Linux/packages/kali/kali kali-rolling InRelease [30.5 kB] Get:2 http://ftp.ne.jp/Linux/packages/kali/kali kali-rolling/main amd64 Packages [16.0 MB] Fetched 16.0 MB in 11s (1,479 kB/s) Reading package lists... Done W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument W: store: aptMethod::Configuration: could not load seccomp policy: Invalid argument |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
rootlinks@Win10:~$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: apt apt-utils debconf debconf-i18n e2fsprogs gcc-8-base gdbm-l10n gpgv ifupdown isc-dhcp-client isc-dhcp-common libapparmor1 libapt-inst2.0 libapt-pkg5.0 libc-bin libc-l10n libc6 libcom-err2 libext2fs2 libgcc1 libgdbm5 libslang2 libss2 libstdc++6 libsystemd0 libudev1 locales-all perl-base systemd systemd-sysv udev vim-tiny xxd 33 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 22.0 MB of archives. After this operation, 6,066 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://ftp.ne.jp/Linux/packages/kali/kali kali-rolling/main amd64 libc-l10n all 2.27-1 [860 kB] (snip) Setting up locales-all (2.27-1) ... Processing triggers for libc-bin (2.27-1) ... W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
rootlinks@Win10:~$ sudo apt-get install wget Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: ca-certificates libpsl5 openssl publicsuffix The following NEW packages will be installed: ca-certificates libpsl5 openssl publicsuffix wget 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 149 kB/1,933 kB of archives. After this operation, 5,280 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://ftp.ne.jp/Linux/packages/kali/kali kali-rolling/main amd64 libpsl5 amd64 0.19.1-5 [44.9 kB] Get:2 http://ftp.ne.jp/Linux/packages/kali/kali kali-rolling/main amd64 publicsuffix all 20180223.1310-1 [104 kB] Fetched 149 kB in 2s (69.2 kB/s) Preconfiguring packages ... Selecting previously unselected package libpsl5:amd64. (Reading database ... 16141 files and directories currently installed.) Preparing to unpack .../libpsl5_0.19.1-5_amd64.deb ... Unpacking libpsl5:amd64 (0.19.1-5) ... Selecting previously unselected package wget. Preparing to unpack .../wget_1.19.4-1_amd64.deb ... Unpacking wget (1.19.4-1) ... Selecting previously unselected package openssl. Preparing to unpack .../openssl_1.1.0g-2_amd64.deb ... Unpacking openssl (1.1.0g-2) ... Selecting previously unselected package ca-certificates. Preparing to unpack .../ca-certificates_20170717_all.deb ... Unpacking ca-certificates (20170717) ... Selecting previously unselected package publicsuffix. Preparing to unpack .../publicsuffix_20180223.1310-1_all.deb ... Unpacking publicsuffix (20180223.1310-1) ... Setting up libpsl5:amd64 (0.19.1-5) ... Processing triggers for libc-bin (2.27-1) ... Setting up publicsuffix (20180223.1310-1) ... Setting up openssl (1.1.0g-2) ... Setting up wget (1.19.4-1) ... Setting up ca-certificates (20170717) ... Updating certificates in /etc/ssl/certs... 148 added, 0 removed; done. Processing triggers for ca-certificates (20170717) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
rootlinks@Win10:~$ wget https://kali.sh/xfce4.sh --2018-03-09 21:03:13-- https://kali.sh/xfce4.sh Resolving kali.sh (kali.sh)... 45.79.158.143 Connecting to kali.sh (kali.sh)|45.79.158.143|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 315 [text/x-sh] Saving to: ‘xfce4.sh’ xfce4.sh 100%[=====================>] 315 --.-KB/s in 0s 2018-03-09 21:03:15 (3.45 MB/s) - ‘xfce4.sh’ saved [315/315] rootlinks@Win10:~$ cat xfce4.sh #!/bin/bash echo "[+] Installing XFCE4, this will take a while" apt-get update apt-get dist-upgrade -y --force-yes apt-get --yes --force-yes install kali-desktop-xfce xorg xrdp echo "[+] Configuring XRDP to listen on port 3390 (but not starting the service)..." sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini |
マシン性能にもよると思いますが、この時は20分ぐらい掛かりました。
途中でキーボードレイアウトを指定します。
1 2 3 4 5 6 7 8 9 10 11 12 |
rootlinks@Win10:~$ sudo sh xfce4.sh [+] Installing XFCE4, this will take a while Hit:1 http://ftp.ne.jp/Linux/packages/kali/kali kali-rolling InRelease Reading package lists... Done W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument W: http: aptMethod::Configuration: could not load seccomp policy: Invalid argument Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. (snip) |
サービスがport 3390で開始されます。
1 2 3 4 5 |
rootlinks@Win10:~$ sudo /etc/init.d/xrdp start [sudo] password for rootlinks: [....] Starting Remote Desktop Protocol server: xrdp-sesman xrdp[20180309-21:53:14] [DEBUG] Testing if xrdp can listen on 0.0.0.0 port 3390. [20180309-21:53:14] [DEBUG] Closed socket 6 (AF_INET6 :: port 3390) . ok |
127.0.0.1:3390に接続するとデスクトップが表示されます。
1 2 3 |
rootlinks@Win10:~$ sudo /etc/init.d/xrdp stop [sudo] password for rootlinks: [ ok ] Stopping Remote Desktop Protocol server: xrdp xrdp-sesman. |
思っていた以上の出来栄えで今後が期待できそうです。
this article is useful !
thanks !
can we have a a frendly link ?
Thanks!