Tuesday, December 19, 2006

Malware Block List

另一個免費的 Mailware list
名子就 Malware Block List http://www.malware.com.br/

提供各種格式供搭配使用 如 squidGuard, Clamv, DNS 等
這個 Database 是數量蠻多的 品質也不錯

給大家作為參考

Thursday, December 14, 2006

Squid : 解救 Invalid Response 的網頁 - relaxed_header_parser on

之前我文章有提過 上 http://sii.tse.com.tw 會出現下面的錯誤訊息

ERROR
The requested URL could not be retrieved

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

While trying to process the request:

GET / HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-icq, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: zh-TW
Proxy-Connection: Keep-Alive
If-Modified-Since: Wed, 29 Nov 2006 01:05:45 GMT; length=14906
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; IEMB3)
Host: sii.tse.com.tw
Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAGQAAAAYABgAfAAAAAQABABIAAAACgAKAEwAAAAOAA4AVgAAAAAAAACUAAAABYKIIgUBKAoAAAAPVABDAHAANAAzADIAMwAzAFEASgBaAEwAMQBTALjPNZk2jsKNAAAAAAAAAAAAAAAAAAAAAFpLr1fvdFTabDl01lYpPRXBMGBKt0ILqX==

The following error was encountered:

Invalid Response
The HTTP Response message received from the contacted server could not be understood or was otherwise malformed. Please contact the site operator. Your cache administrator may be able to provide you with more details about the exact nature of the problem if needed.

Your cache administrator is root.


現在我終於查出原因了 是某些網頁的 Header 的問題
在 squid.conf 請不要不要將 relaxed_header_parser 設成 off
請用 relaxed_header_parser on

中山大學圖書館電子資料庫 ezproxy 如果用 squid 也會遇到同樣的問題
http://www.lib.nsysu.edu.tw/database/search/DatabasesList.asp?Language=%A6%E8%A4%E5

以下為 squid.conf - relaxed_header_parser 的說明
# TAG: relaxed_header_parser on|off|warn
# In the default "on" setting Squid accepts certain forms
# of non-compliant HTTP messages where it is unambiguous
# what the sending application intended even if the message
# is not correctly formatted. The messages is then normalized
# to the correct form when forwarded by Squid.
#
# If set to "warn" then a warning will be emitted in cache.log
# each time such HTTP error is encountered.
#
# If set to "off" then such HTTP errors will cause the request
# or response to be rejected.
#

如何解譯 混淆網址 Deobfuscation urls

看到一堆怪怪的數字網址怎麼辦 如下
http://0320.185.64275/nocache/3589j7gxbgtw6P/rspr47.gif
這個網址是 ReadNotify 夾在信件的一段 HTML
這是一種欺瞞的手法 主要是不要讓人知道主機的 IP

不過沒關係 我在找了一個工具
Dns Stuff 網站提供 URL DEOBFUSCATOR 可以解譯
http://www.dnsstuff.com/ 請選 [URL DEOBFUSCATOR]

將上述的網址輸入 [URL DEOBFUSCATOR] 格子裡面 結果如下
http://208.185.251.19/nocache/3589j7gxbgtw6P/rspr47.gif


可以發現 這個例子至少混合八進位及十進位兩種以上的方法
0320.185.64275
0320 是八進位 ==> 208
185 是十進位 => 185
64275 是十進位 => 換成十六進位的 FB13 => 251.19
如果是使用 Squid Proxy 預設是不接受這種有意欺瞞的網址的
如果是不透過 Proxy 或是使用 ISA 就可以讀取
但 不管如何 目前瀏覽器 是不會將解譯後的網址顯示出來

原理參考
http://www.pc-help.org/obscure.htm

Tuesday, December 12, 2006

關於 HP 在非法調查醜聞一事中所使用的郵件追蹤技術

This summary is not available. Please click here to view the post.

Monday, December 11, 2006

Brocade : SAN Health Diagnostics Capture - 繪製 SAN topology

Brocade 推出 SAN Health Diagnostics Capture (原名 SAN Health)
提供客戶一個免費的工具,只要你有 Brocade SAN Switch 的話。
他主要的功能,就是把你環境的 SAN Switch Topology 繪製出來,
SAN Switch 有哪些 ports , 接什麼主機或 Storage 都會畫的清清楚楚。

1.下載方式
連線到 "Brocade Connect" http://www.brocadeconnect.com
登入後 進到 Download Utility 找 SAN Health Diagnostics Capture
安裝好後執行 SAN Health

ps. Brocade Connect 需要申請帳號才有 申請時準備一下 WWID

2. 執行
這是很煩人的部分 先要敲基本資料 然後再輸入 SAN 的 Information
接著把 SAN Switch 一台一台 add 進去
每一台 SAN Switch 都要敲對帳號密碼 並測試連線成功
等你全部輸入完畢後 上面的臉全部是笑臉後 再按 audit
如果沒有笑臉 只好回頭看那裡弄錯了
最後產生一份報表 .BSH 檔 寄回去(或用上傳的) Brocade
隔天前就會收到一份 .zip 的報表
裡面有跟據你的環境做的 Visio 檔還有 Excel 檔

Excel 檔有點太細了 真希望 Brocade 下次推一個可以選自定報表的功能
Visio 到還可以 可以很清楚看到你的 SAN Switch 的環境

3. SAN Health Pro 的部份
SAN Health Pro 是進階的工具 需要花錢買 License
如果沒有 License 只有 View 的功能

基本上 我不太建議買這種工具
如果 SAN Switch 有問題 請 Support 廠商來看就好了
要買什麼東西 請廠商提建議 這是他們的責任

Sunday, December 10, 2006

利用 Glance 監視系統

glance 是 HP-UX 系統監控的一套工具
除了平常可以直接下 glance 看 系統 CPU, Memory, DISK IO 等效能的數據
glance 也可以利用 "-adviser_only" 在 command line 觀看系統效能
詳細的參數請見 glance 文件 /opt/perf/paperdocs/gp/C/adviser.pdf

下面是一個簡單的範例

# vi testmetrics
print gbl_cpu_user_mode_util, gbl_cpu_sys_mode_util, gbl_cpu_idle_util

執行
# glance -adviser_only -syntax ./testmetrics -j 10
4.0 1.3 94.7
0.2 0.7 99.1
# glance -adviser_only -syntax ./testmetrics -j 10 > data.out

Friday, December 08, 2006

Windows AD Command - dsquery example

Rleam = ACTY.com.tw
下面有一個 ACTY 的 OU, 並在下面建各部門的 OU

1. List user in TEST' OU
dsquery user ou=TEST,ou=ACTY,dc=ACTY,dc=com,dc=tw
2. 列出所有部門
dsquery * ou=Div,ou=group,dc=ACTY,dc=com,dc=tw -scope onelevel

3.修改使用者密碼
dsquery user -samid {員工編號}|dsmod user -pwd 1234 -mustchpwd yes

4.查詢某部門員工特定資訊(將 ou=TEST 改成遇查尋的部門)
dsquery * ou=TEST,ou=ACTY,dc=ACTY,dc=com,dc=tw -scope onelevel -attr sAMAccountName userPrincipalName department

參考文章
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/zh-cht/library/ServerHelp/58f55db1-3546-408e-b3a6-edab03f7eb37.mspx

Thursday, December 07, 2006

phpldapadmin config

有人在酷學園問的問題 把自己設定檔翻出來看了一下


edit phpldapadmin/config/config.php

env.

dc=10.254.1.1, realm=ACTY.com, user=ldapuser

ex.
$ldapservers->SetValue($i,'server','host','10.254.1.1');
$ldapservers->SetValue ($i,'server','base',array('ou=ACTY,dc=com'));
$ldapservers->SetValue($i,'login','dn','cn=ldapuser,cn=Users,dc=ACTY,d
c=com');

Wednesday, December 06, 2006

SMC Skype Phone WSKP100 試用心得

想了很久終於買了 SMC Skype Phone
開始脫離用耳機講電話的日子

試用的結果 感覺很簡單容易上手
就好像是在用一般手機一樣
唯一不同的是 我們是用來講 Skype
只是很好笑的是 在設定的過程中
我發現我過去做了一件蠢事
我以前居然是把無線 AP 當作無線 HUB 來用
我把中華電信的線路接到 LAN Port 了
要不是 SMC SKype Phone 無法撥接
否則我真的就這樣一直用下去

這一支真的覺得不錯用 按鍵的觸感也不錯
適合想給爸媽 或是不太懂電腦的人用
誠心推薦大家 難得好用的國產品

Squid report - Sarg 程式安裝與設定

SARG - Squid Analysis Report Generator
顧名思義 就是產生 Squid Report

下載網址 http://sarg.sf.net/
如果要使用繪圖功能請安裝 gd-devel

程式安裝步驟
1. run ./configure
configure options:
--enable-bindir=where sarg binary will be saved
default: /usr/bin
--enable-sysconfdir - where the configuration directory is
default: /usr/local/sarg
--enable-htmldir - where the www html root dir is
default: /var/www/html

--enable-mandir - where the sarg man page will be saved
default: /usr/local/man/man1
這裡我們用
./configure --enable-sysconfdir=/etc/sarg --with-gd

2. make

3. make install

4. Go to /etc/sarg (or file entered with --sysconfdir on configure)
and change sarg.conf as you need.

建議可以修改的選項
a. 基本選項
access_log /var/log/squid/access.log
output_dir /var/www/html/sarg
overwrite_report yes
b. 如果有使用 gd 畫圖
charset Windows-1251
c. 如果 Squid 整合 AD
ntlm_user_format domainname+username

Friday, December 01, 2006

[CentOS] Disabling IPv6 in Centos 4.x Experiences

http://lists.centos.org/pipermail/centos/2006-September/069975.html

Hi there,

While I was looking "how to disable ipv6 under centos" I have found a
gazzillion pages about how to do it and some of then even list things that i
am not sure where they came from, so for the record I list most of them here
in case someone else need them.
Some of the methods involved the direct modification of system scripts, and
I am against that so I wont list them here (removing the entire section of
ipv6 calls in IFUP is not a good idea).

How to disable ipv6 support in Centos 4.x
Pick any method, a combo or all of them

Method 1, add the line:
alias net-pf-10 off
to the /etc/modprobe.conf

Method 2 Add to /etc/sysconfig/network file:
NOZEROCONF=yes # Bonus: Disable the ugly generation of 169.254 zeroconf
networks.
NETWORKING_IPV6=no

Note about method 2. I must mention the fact that I actually READ the entire
ifup script and dependencies and I found that it calls at line 361:
# if [ "${NETWORKING_IPV6}" = "yes" ]; then
# /etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}

However adding the NETWORKING_IPV6=NO has no effect whatsoever because even
after a reboot the interfaces continue to load an ipv6 address. BTW it does
the same for zeroconf and doesn`t work either.

Method 3:
/etc/sysconfig/network-scripts/ifcfg-XXXXX file;
IPV6INIT=no


So pick your best method or a combo and let us know which one worked for
you:
In my case Centos 4.3 2.6.9-34.EL i386 with a pair of 3COM 3c905CX lan
boards did not responded to Method 1 and 2 and 3. So I'm still battling with
this ipv6 thing.