2015年2月17日 星期二

OpenVAS 的好朋友 "Kali Linux"




卡哩 Linux (Kali Linux) 到底是什麼東東???

相信大家的心裡一定是一頭霧水,跟我一樣充滿了疑問?有聽過 RedHat、Fedora、Debian & Ubuntu 等等... 各式各樣的 Linux,就是沒有聽過 Kali Linux。

其實 "她" 可厲害了!她可以說是全世界駭客們的最愛,此話怎麼說?她是專門設計給 "滲透測試" 專用的系統。當這個系統安裝好後,預設就安裝好各式各樣的滲透掃描工具,這當中當然也包含了 這套 OpenVAS,所以說 Kali 是 OpenVAS 的好朋友,一點都不為過。

接下來的 "圖解" 就是要說明我們這篇所要討論的大致內容:

我們就從 Kali Linux 的安裝開始說起:
Step 1: Download from this official website https://www.kali.org/downloads/

Step 2: After download "kali-linux-1.1.0-amd64.iso" upload to VMware (ex. ESXi 5.5)
VMware vSphere Client | Configuration | Storage | Datastores






Step 3: Create a new Virtual Machine for Kali Linux.
Getting Started | Create a new virtual machine | Typical | Name for VM |  Storage | OS version | Network | Disk size | Select Edit | Select ISO for Connect CD/DVD







 Tips 3-1: Change the disk size to "20 GB".



Step 4: First start VM for install Kail Linux.

 Step 5: Select "Graphical install" then "Enter"

Step 6: "Select a language" for the installation.

Step 7: "Select your location" for your time zone. (ex. Taiwan)

Step 8: "Configure the keyboard" (ex. American English)

Step 9: "Configure the network" for setup a hostname for this system. (ex. kali)

Step 10: Assign a domain name. (ex. openvas.com)

Step 11: "Set up users and passwords" for root password.

Step 12: "Partition disks" for an entire disk.

Step 13: Double check for install disk will be erased.

Step 14: Select the first one for default "All files in the partition"

Step 15: Double check with overwrite the partition and keep for default.

Step 16: Select "Yes" to write the changes to disks.

Step 17: After "Continue" then installing the system.



Step 18: Select "No" for without use a network mirror.

Step 19: Select "Yes" for install the GRUB boot loader to the MBR (Master Boot Record).

Step 20: After "Installation is complete" then click "Continue" for restart and boot into the new system.


Step 21: After reboot as below then log in user name "root" and password set is during installation.


Step 22: Congratulations! As below shows completed installation and running well for Kali Linux.


恭喜你!!! 如上圖,到目前為止已經成功安裝好 Kali Linux ,而且也可以成功 root 登入。接下來我們將繼續說明,如何在 Kali Linux 執行 OpenVAS。讓我們繼續看下去:

Step 1: First start OpenVAS on Kali Linux should check update first.
Application | Kali Linux | Vulnerability Analysis | OpenVAS | openvas feed update



Step 2: Click "openvas initial setup" as below in red.
Application | Kali Linux | Vulnerability Analysis | OpenVAS | openvas initial setup

Step 3: Enable SSH service for remote mode.
# service ssh start

Step 4: Connect via Putty with Kali Linux.

Step 5: Login by user "root" and password.

Step 6: Start OpenVAS via command line.
# openvas-setup


Step 7: Check OpenVAS service up.
# netstat -an |grep '939'

Tips 7-1: OpenVAS use port 9390,9391 & 9392 that why we use command "netstat" to check port service.

Step 8: OpenVAS listen IP only for loaclhost (127.0.0.1), open to others IP then restart OpenVAS service.
# gsad --listen=192.168.2.68 ## Kail Linux eth0 IP
# openvas-stop
# openvas-start


Tips 8-1: Above shows 3 ports of service is all up in blue.

Step 9: Open a browser for login OpenVAS (ex. https://192.168.2.68:9392)

Tips 9-1: Change OpenVAS "admin" login password.
# openvasmd --user=admin --new-password=<New Password>

Step 10: Login by username "admin" and new password.


Tips 10-1: Change GUI Language via Extras | My Settings |User Interface Language


Congratulation!!!
OpenVAS is working on Kali Linux now.

恭喜你!!! 說明到這裡,已經讓 OpenVAS 能正常的在 Kali Linux 上面執行。
或許在安裝過程和啟動服務中,並沒有想像的順利,不過只要稍微注意一下,這些 "提示(Tips)" 的說明,應該都可以迎刃而解。

之所以會運用 Kali Linux 執行 OpenVAS,是因為 OpenVAS 的安裝雖然很容易,但是有些套件並是原生就有, 都需要額外的 tuning ,所以直接使用 Kali 的 OpenVAS 也會相對容易些。

Ok~關於 Kali Linux 的介紹,我們就先說到這裡。等以後有機會,需要用到上面其他不同的測試工具時,我們再來繼續做討論。

先祝福大家 "新年快樂"~ 我們明年見!

~ See you ~

參考出處:
https://www.kali.org/
http://www.openvas.org/

2015年2月13日 星期五

LOAD IMPACT 雲端自動化測試(二)

Good afternoon!!! 各位午安 ~

今天就緊接著上一節 Load Impact 的介紹。
記得上一節介紹到 "無註冊版" 的使用方法。而這一節要介紹的 "註冊 Free版" 是從註冊、登入到測試方法,這都會在這一節做個說明。

而這兩種版本在使用上最大的差別在於 "註冊 Free版" 可以做細部設定,如錄製腳本(Scenario)和設定測試方法等。當然,如果要更進階的功能設定,如設定超過 250 VUs、測試時間超過5分鐘或是要在瀏覽器 Plug-in 錄製 Scenario 的功能 ...等等,這些都是需要額外付費的。

現在我們就從如何註冊帳號開始做說明:
Step 1: Link to http://loadimpact.com/ click "Sign up"

Step 2: Enter your Email & Password in yellow then click "Register account" in red.

Step 3: After sign up a new account show as below "Registration complete" in red.

Step 4: Before "Sign in" have to activated from your registered email as below in red.

Step 5: Enter your Email & Password in yellow then click "Sign in" in red.

Step 6: Enter your details as below in red then click "Save and continue" in yellow.

Step 7: After login into a main page as below.

Step 8: Click "User scenarios" in red then "Create user scenario" in yellow.

Step 9: Naming a "User scenario"(ex. Test Case 01) and "Script generation" (ex. http://www.hinet.net) in red.

Step 10: Click "Auto-generate"in yellow for created a new user scenario without detail setting.

Step 11: After auto-generate show as below click "Save" in red then completed to created a user scenario(ex. Test Case 01) in 2nd picture.


Tips 11-1: Click "Record session" in yellow then pop out "Test proxy setting" in red.

Tips 11-2: Before click "Test proxy setup" have to check proxy setting first as below.


Tips 11-3: After click "Test proxy setup" then click "Start recording" for record session.


Tips 11-4: After finish session record click "Stop recording" then click "Overwrite script"


Tips 11-5: Click "Save" to updated the modified scenario.

Step 12: After click "Start a new test" as below in red, enter the target URL or IP then click "Start test" will test like "unregistered version".

Step 13: After click "Advanced configuration" for more setting show as below page.

Step 14: Check above in red shows limitation for current subscription.

Step 15: Naming the test configuration and enter the target URL in red.

Step 16: Expand "Load test execution plan" for setting "Max VUs" and "Duration" with this test.

Tips 16-1: Click "Add step" for change load test plan, the chart will change automatically in yellow.

Step 17: "User scenarios" for setting more detail resource.


Step 18: "Server metrics agents" have to purchase.

Step 19: "Client and network emulation" for setting client and network type.

Step 20: "Extra setting" for add extra IP address.

Step 21: Click "Create test configuration and start test" for start test.


Step 22: Testing in processing.






Step 23: After test finished show as below in red then US cloud resource in yellow, Singapore cloud resource in blue.

Step 24: Check "Charts" for the VUs from US in orange, from Singapore VUs in yellow and the time of users to load time show in blue during this test.

Step 25: Check "Pages" show pages for this test scenario.

Step 26: Check "URLs" all successful then click "Next" for others.

Step 27: Check "Resource types" for percentage of URL content type & load time.

Step 28: Finally Check "Logs" shows no log for this test.

說明到這裡相信大家對於 Load Impact 這套雲端測試工具,應該會有一定程度的瞭解。其實只要遵守測試的 VUs 不超過 250個,測試時間不超過5分鐘的這些限制,這是一套還蠻不錯的免費雲端測試工具。如果需要更多的測試環境設定,當然也就必須遵循使用者付費的原則,尤其是用在商業方面。

如果有機會的話,我們再來介紹別套不同的雲端測試工具。

~ See you ~

參考出處: