2009年12月29日 星期二

網路壓力測試工具Iperf

最近公司代理了Firewall產品,產品有VPN與NAT功能,特別是結合在一起時,效能問題倍受疑慮。

還好我們客戶用了一個工具來檢視之後(雖然是震憾教育),但學到很多^^

這個工具就是Iperf,可以在這個地方下載:
http://www.noc.ucf.edu/Tools/Iperf/iperf.exe

有Linux版與Windows版,我們以Windows版本為例,簡單說明使用方式與參數。

使用方式:
這於這個工具是Server Client架構,所以需要在兩台電腦上測試,中間經過什麼東西,
就是想測試效能的設備,比如Firewall,VPN,SSL-VPN,Wireless AP...,所以先找兩台電腦,
一台當Server,一台當Client:
Step.1 下載: 到http://www.noc.ucf.edu/Tools/Iperf/iperf.exe 將程式下載,之後將程式copy到想存放的地方,比如說D:/之下。
Step.2 開啟dos視窗: 執行->cmd
Step.3 執行Server: 從comandline輸入 D:/iperf.exe -s (其它參數)
Step.4 執行Client: 從comandline輸入 D:/iperf.exe -c serverip (其它參數)

參數參考:
Client端/Server端 都可用的參數:
-f, --format [kmKM] 以什麼方式顯示: Kbits, Mbits, KBytes, MBytes
-i, --interval # 每隔多少秒顯更新頻寬資訊
-l, --len #[KM] 設定讀寫的緩衝區長度 (預設 8 KB)
-m, --print_mss 顯示TCP/IP標頭的MTU(最大segment)大小
-o, --output 將report或錯誤訊息輸出到這個檔案裡
-p, --port # 設定server與client的溝通port
-u, --udp 使用UDP代替TCP測試
-w, --window #[KM] TCP的window大小(socket buffer size)
-B, --bind bind某,結合某介面或multicast的位址用
-C, --compatibility 與舊版本比較用,不送任何封包
-M, --mss # 設定TCP最大segment大小 (MTU - 40 bytes)
-N, --nodelay 設定無TCP延遲,取消Nagle's演算法
-V, --IPv6Version 設定為IPv6格式

Server端參數:
-s, --server 執行Server模式
-D, --daemon 執行Server背景模式
-R, --remove 移除服務

Client 端參數:
-b, --bandwidth #[KM] UDP參數,以bits/sec傳送(預設 1 Mbit/sec, implies -u)
-c, --client 執行Client模式,並連線到Server的IP:
-d, --dualtest 同時執行雙向的模擬測試
-n, --num #[KM] 傳輸多少bytes封包 (取代-t)
-r, --tradeoff 單獨執行雙向的模擬測試
-t, --time # 每隔幾秒傳輸一次 (預設10 秒)
-F, --fileinput 選取某檔案傳輸測試
-I, --stdin 將鍵盤輸入的資料進行傳輸測試
-L, --listenport # 進行雙測試時,接收回應的port
-P, --parallel # 同時執行多少個Client連線
-T, --ttl # 進行Multicat的time-to-live(預設為 1)

其它參數:
-h, --help 顯示help 資訊
-v, --version 顯示版本

範例:
1. Server端:
iperf -s -u -i 1 -l 1024 -p 5001

設置Server只接收UDP封包,每隔1秒更新顯示一次,進行讀寫的緩衝區大小為1020k,進行監聽的port為5001

2.Client端:
iperf -c 192.168.4.88 -u -i 1 -l 1024 -p 5001 -t 200 -b 1m

設置Client端,連向ServerIP為192.168.4.88,以UDP傳送,每隔1秒更新顯示一次,進行寫的緩衝區大小為1020k,從5001port丟封包出去,每隔200秒丟一次1M的封包

2009年11月12日 星期四

Office 2007重新輸入序號

這陣子不小心去更新Office~使得需要重新驗證licence,
從網路上找到了重新輸入key的方法,就是把regeditkey改刪掉,
刪除路徑如下:

HKEY_LOCAL_MACHINE\Software\Microsoft\Office\12.0\Registration\{91120000-0011-0000-0000-0000000FF1CE}

刪除下面這兩個的值:
DigitalProductID
ProductID

再重新開啟任何一個office應用程式就ok了~
前提是你的key是合法的,不然還是不會過~~

2009年11月6日 星期五

六個步驟讓Web應用程式更安全

資料來源: OWASP

1. 建立溝通管道Build a community: Large enterprises like the Federal government are particularly prone to the silo effect; a simple intranet site that's well managed can work wonders to leverage the expertise throughout an entire Department.

2. 分享專業知識Spread the expertise: Right now the majority of what application security knowledge exists within security groups. This is a good start but ultimately the programs build and fix the applications; staff them with experts, too.

3. 在工具上思考Think beyond tools: While tools can automate certain assessment tasks, realize that they only assist with a portion of your assessments. Even then, assessments are just one portion of an assurance program.

4. 提供指引手冊Provide guidance: Developers want to build secure, compliant software; they just don't always know how. Make standards, requirements and reference models available to your programs.

5. 不斷檢測Don't wait to test: Late-cycle testing under release pressure is stressful on the program and testers alike. Start testing earlier in the cycles and involve your assessment team in the scheduling.

6. 持續觀察審視Zoom-in your continuous monitoring: A "minor" application change can fly through change control but create huge vulnerabilities. Scrutinize changes to applications carefully, particularly Internet-facing or other high-risk systems.

SSL 連線可以被當中間人

這對我們賣資安設備的人來說實在是很大的影響!!

因為我們幾乎所有的設備的管理都是透過遠端連線,如果HTTPS這種看到"金鎖頭"的連線

可以被用來Man-in-the-middle,哇~我很難很想像目前專做SSL-VPN的廠商如何因應這個消息的公佈!!?

下面是Networkword Security的文章:
http://www.networkworld.com/news/2009/110509-ssl-hole-cracks-open-secured.html

大意是說,PhoneFactor(提供手機雙因素認證的公司)的團員發現這個弱點,他們發現任何透過SSL加密的連線都存在這個弱點,目前還在進行Patche的開發中還未更新出來,這個弱點可以在已經加密的連線上輸入指令搶劫這個連線,讓駭客坐在中間,聽、看、編改兩端的通訊。

真的恐佈的漏洞呀~

2009年8月21日 星期五

在CentOS下設chkconfig

只有一沒設就會忘記~~以把apache為例:

設定Apache一開機就執行:
chkconfig --level 35 httpd on

檢示設定狀況:
chkconfig --list httpd

2009年8月10日 星期一

資訊收集網站(Information Gathering Webs)

1.歷史網站資料(ArchiveOrg):
http://www.archive.org/index.php
說明: 收集網站歷史資料的網站,真是很特別~可以用來收集網站的歷史資訊。

2.個人資訊收集(Yahoo):
http://people.yahoo.com/
說明: 輸入名字就可找相關資料。

3.個人資訊收集(Intelius)
http://www.intelius.com/
說明: 輸入名字就可找相關資料。

4.Google大神:
http://www.google.com
說明: 想找啥就打啥!

5.人力銀行:
1111
104
YES123
說明: 用來找公司相關資訊用

2009年8月9日 星期日

弱點更新網站(Vulnerability Research Website)

弱點更新網站,可以定期了解有哪些弱點可能會危害環境資安:

1.美國電腦緊急處理中心(US-CERT):
http://www.us-cert.gov
說明: 在首頁左邊有最近安全等級的圖示,可以了解現在的安全狀況,
也可以定期看他們的Report,做的都很不錯^^

2.常見弱點公佈網(CVE - Common Vulnerabilities and Exposures):
http://cve.mitre.org
說明: 不論做黑箱、灰箱、白箱的測試,基本上弱點說明都是參考到這邊的。

3.資安追查者(Securitytracker):
http://www.securitytracker.com
說明: 跟CVE很像的弱點列示網站。

4.微軟(Microsoft):
http://www.microsoft.com/security
說明: 電腦的老大哥,這應該不用說太多,去看就知道啦~

5.資安團隊(Securiteam):
http://www.securiteam.com
說明: 就是有人這麼熱心,自組的資安團隊,定期更新資安訊息。

7.封包風暴(PacketStormSecurity):
http://www.packetstormsecurity.com
說明: 更新最新的安全弱點、安全工具的非營利組織。

8.駭客風暴(HackerStorm):
http://www.hackerstorm.com
說明: 最屌的還是下載他們免費的OSVDB(Open Source Vulnerability Database),可以離線查尋CVE的弱點與說明。

9.駭客觀測網(Hackerwatch):
http://www.hackerwatch.org
說明: 利用McAfee的ClientFirwall了解全球目前主要危害Port的統計、及潛在目的與來源網址。

10.資安者(Secunia):
http://secunia.com/
說明: 每天數千條弱點資訊更新,還提供個人PC的線上掃描服務。

11.H區域(Zone-H):
http://www.zone-h.org/
說明: 這應該不用說了~全球的駭客駭到網站後都會把戰利品貼到這裡,所以這裡有最新的被駭網站資訊。

12.毫蟲(milworm):
http://www.milw0rm.com
說明: 入侵手法的資料庫網站,將弱點與入侵結合的網站。(請勿用於非法用途!!)