It's ±€231 for my price.
Thursday 2009 October 29
www.ubuntu-tw.org reaches 1M hits per day, again.
By BlueT on Thursday 2009 October 29, 07:24 - Ubuntu@Taiwan
Ubuntu@Taiwan 正體中文站 討論區+wiki 又重回每日點擊百萬數了。
伺服器不穩定了好一陣子,現在終於重回當年盛況,每日點擊數超過一百萬! XD
特此紀念。
Thursday 2009 September 24
KVM - build ubunt guest, bridge network and iptables port forwarding
By BlueT on Thursday 2009 September 24, 16:42 - Ubuntu
Once you install and setup KVM, configure kvm itself and system network
bridge interface correctly on your Ubuntu server,
you can now starting to build a guest OS / disk image, run it, and use iptables
to forward connections to those new VPSes.
Build guest:
HTTP_PROXY="Proxy_IP:Port" sudo ubuntu-vm-builder kvm hardy \ --dest 'DEST_DIR'\ --hostname 'GUEST_HOSTNAME'\ --ip 'GUEST_IP_YOU_WANT'\ --arch 'i386'\ --mem '256'\ --rootsize '4096'\ --swapsize '1024'\ --kernel-flavour 'virtual'\ --domain 'bluet.org'\ --mirror 'http://ftp.twaren.net/ubuntu'\ --components 'main,universe,multiverse,restricted'\ --addpkg ssh --addpkg vim --addpkg unattended-upgrades --addpkg acpid\ --name 'Default_User_Name' --user 'Default_User_Account' --pass 'Default_User_Password'\ --mask '255.255.255.0'\ --net '192.168.122.0'\ --bcast '192.168.122.255'\ --gw '192.168.122.1'\ --dns '192.168.122.1'\ --tmp '/dev/shm/'\ --libvirt qemu:///system ;
Modify that to fit your needs.
Forward "connections to specific port on HostOS" to a specific port on
GuestOS (VPS):
Run these commands in HostOS:
$ sudo iptables -t nat -I PREROUTING -p tcp -d HostOS_IP --dport HostOS_Port -j DNAT --to GuestOS_IP:GuestOS_Port $ sudo iptables -A FORWARD -p tcp -d GuestOS --dport GuestOS_Port -j ACCEPT
For example, if you want to ssh to your VPS, you can pick a spare (not-using by
other application) port, and forward "connections to the specified port on
HostOS" to the GuestOS's port 22.
Let's say, when HostOS is using IP 192.168.1.2, GuestOS is using IP
192.168.122.2, the choosen port on HostOS is 10022, you can do the following
commands.
$ sudo iptables -t nat -I PREROUTING -p tcp -d 192.168.1.2 --dport 10022 -j DNAT --to 192.168.122.2:22 $ sudo iptables -A FORWARD -p tcp -d 192.168.122.2 --dport 22 -j ACCEPT
Finally, you got a configured VPS, you can start running it and ssh into
it.
Start the VPS:
If your GuestOS' hostname is "vps01", you can do this to start running
it:
$ virsh start vps01
And then ssh into it:
$ ssh -v 192.168.1.2 -p 10022
Refs: KVM document page on
ubuntu.com
How to flush / clean DNS cache in Linux
By BlueT on Thursday 2009 September 24, 15:45 - Ubuntu
Sometimes your system caches too much on DNS query / records.
DNS caching helps alot on reducing time and bandwidth when your application
needs DNS informations,
but just like anything else in the world; it's not a good thing when it does
too over.
Let's see how to flush DNS cache in your system.
In Ubuntu:
$ sudo /etc/init.d/dns-clean restart
For Others:
Flush nscd DNS cache:
$ sudo /etc/init.d/nscd restart
OR
$ sudo service nscd restart
OR
$ sudo service nscd reload
OR
$ sudo nscd -i hosts
Flush dnsmasq dns cache
$ sudo /etc/init.d/dnsmasq restart
Flush caching BIND server dns cache
$ sudo /etc/init.d/named restart
OR
$ sudo rndc flush
Refs: How To
Flush Linux / UNIX DNS Cache
Tuesday 2009 July 21
HITcon 2009 WasGame 解題分享
By BlueT on Tuesday 2009 July 21, 03:05 - CompuTech
這次很開心跟 Dark, H4K, TW1943 一起組隊玩 wargame.
當初預定拿 200 分的目標有達到, 雖然沒拿第一名不過重點是培養了團隊默契, 感覺真的很棒.
回想起四五年前和 devil2k 一起 team hacking 德國佬網站的日子, 到現在已經很久沒有這種感覺了.
謝謝你, 2963. 啊不是, 我是說, 謝謝你們, Zuso Security 的朋友們.
其實應該可以再拿 80 分的... 因為
guestbook 在最後十分鐘 admin 沒進來, 所以沒拿到 session.
有兩題 windows 題在時間結束後十分鐘內解出來
此次 windows 題都是 Dark 跟 H4K 解的, 我只能分享 Unix 跟 Misc.
此次大多用 Perl, Firefox + Firebug + LiveHttpHeaders, telnel, strings, VirtualBox +
XP 等工具解題
Unix1: 看 source code 後, 把參數準備好餵進去就行了. 在 PATH_INFO 卡一陣, 後來 h4k 找到了.
Unix2: 用黑刀 dezend 在 winxp 解出 source code, 再讀一讀就出來了.
Unix3: dump, gdb 都沒用. 會後才看 timhsu 的 DefCon 分享找出 kill -11 core dump + strings,
好像解出來了.
Unix4: 第一天 guest password 被改掉, 第二天連不上, 殘念...
Misc1: hack the _ 用 google 就行. 不過題目是五個底線,
我就找五個字母的不過都不對.....答案確是六個字母....這有點誤導不太好 Orz
Misc2: 卡了一陣,用 Perl 將亂碼的每一個 char 分開用 ord() 印出, 會發現 2xx 2xx 2xx 160 2xx 2xx 2xx
160 ..., 用 hex, 重組等方式試了好久沒結果. 後來想說 160 應該是分隔號, 用
space 代進找出 shift 數目, 處理完後用 chr() 印出就成了!
Misc3: 也卡好久, 又是找浮水印又是做圖形處理的. 後來 TW1943 在 google 提示找到特殊字行比對就成功了 XD
Misc4: git 的, 沒解出來. 因為不熟 git, 偶爾用的 github config 是 git://xxxxxx/xx/xx.git, 也不合.
會後才知道 git://xxxxx/ 也可以... Orz
Misc5: D311 網站, 改了 post data 又追 html 又追 javascript, 還找到 order -> backet
-> backetsubmit -> score -> backet 和 admin.js 等等的流程,
想說這會不會是很大的題目所以追了整個 .150 的 pages... 結果 TW1943 用 input value 猜一猜試到規則...評直覺 1500
下去就過了....繞了那麼大一圈, 想當初我還猜了 1699 為什麼沒過, 1699 才是 D311 的價錢吧! XD
Misc6: 這是 timhsu 的題目....用 hexdump 跟 gdb 都沒用. 會後聽 tim 提示他的 defcon 分享看了一下才知道用
kill -11, 再把 core strings, 好像解出來了.
Misc7: 又是 git... .git 裡的 index 跟 pack 又不 match. 後來搞好久又 rebuild index 又 unpack
.pack 都 error, 就在失望之際用 git gui 看了一下... 耶?! 我已經救回來啦?! XD 看 history/diff 就有 key 了
:P
Misc8: guestbook. 解 javascript 解完, 是過濾 input 的...但是這題到底要我們幹嘛? 到最後才想到是要 XSS 偷
admin cookie / php session id, 可是結束前十分鐘關主就休息沒登入了...所以沒偷到, 慚念.
Misc9: python 2.6 reverse engineering... 去年也有, 看到有點火. 這是 language specific 的東西,
跟 .git 一樣都是綁定的, 有點不是很開心. 這題試了好些 decompile tool 都沒啥用, 不然就是看不懂結果. 有參賽者把它轉成 2.5
的解開了.
Misc10: packet.pcap. 看到是 802.11 WEP encrypted, 用 aircrack 一下就成了.
Misc11: 一堆正妹圖... 又是 strings, 圖片資訊等等的都找過一次都不對, 然後又觀察圖片上有些字糊掉變型去猜, 也不對. 會後關主說是每一個
file 裡都有 gps 座標, 全連起來後一堆點點會拼成 "32E" 的字....而且說所有圖的主角都是 32E!! XDDD
Misc12: 一開始看到 cookie 改了下拿到 key, 可是 upload 後確是 error! 搞一陣 Misc13 開了, 才發現那是
Misc13 的 key XD 晚上跟 Orange 交換心得時經提示後試了下, 這題是 parent dir 有 indexing enabled, 找
config 再登入就能拿到 key.
Misc13: 參見 Misc12....是改 cookie
Misc14: 又是 python. hate.
會後,
約好名年 Zuso 要 BF 一隊, 咱四個一隊, 攻下第一二名 XD
(TBC)
Sunday 2009 July 12
FSCK Gandi's Blog Service Again.
By BlueT on Sunday 2009 July 12, 06:03 - CompuTech
There seems No Way to change my blog's theme/template....
I need 64bit kernel on my 32bit Ubuntu system...
By BlueT on Sunday 2009 July 12, 06:01 - Ubuntu
1. I got 4G ram installed on my IBM X61 Laptop, with Ubuntu 9.04 Jaunty
Desktop for i386 installed.
2. I need to use my whole 4G of ram bcoz I always has about 400 tabs opened in
my Firefox.
All 32bit system can allocat only 33.5G of memory.
X61 uses Intel chips and VGA chip, which is some kind of shit.
Want to improve the xorg's intel driver, you got to install the latest kernel
and driver, with UXA mode enabled.
Then, you might get glxgear score about 700~800fps, nice.
Now here comes the problem.
Kernel's PEM conflicts with UXA, and makes the UXA's advanced GPU memory
handling unusable.
So I can only have two choice:
1. Use generic kernel and better graphic performance, but only 3G of ram. But
my memory is always full.
2. Use server kernel, got whole 4G of ram, but the glxgear score is only about
220fps. Sucks!
With 64bit system, the kernel can natively support to 64G of ram, so I can use
64bit generic kernel with whole my 4G of ram and enjoy the 800fps glxgear
score. That's Great!
BUT, How To Install a AMD64 (64bit) Kernel on my i386 (32bit) System?
I did some google search but still find nothing really helpful...
FSCK GANDI's Blog Service.
By BlueT on Sunday 2009 July 12, 05:43 - CompuTech
I spend about half of an hour of my time to write my blog post and
submit.
No error, the input box became blank. It's usual when posting a post
successfully.
But when I check my blog, nothing shows.
Back to the dashboard and click some link, I asks me to login again.
WTF?! Where's My Article?! Damned It!!!!
Wednesday 2009 July 8
sockstat for Linux
By BlueT on Wednesday 2009 July 8, 08:05 - Ubuntu
sockstat was only for freebsd, now it's on linux too. something like ‘lsof
-i -n’ or ‘netstat -anpe‘.
You can get the 0.3-1ubuntu1 version at the "Builds":
https://launchpad.net/ubuntu/+source/sockstat/0.3-1ubuntu1
I download it and install it on my jaunty i386 without any problem.
Intro by chihchun:
http://people.debian.org.tw/~chihchun/2009/02/23/sockstat-for-linux/
Tuesday 2007 November 20
Language
By BlueT on Tuesday 2007 November 20, 02:56 - CompuTech
Orz
Monday 2007 November 19
Premier billet
By BlueT on Monday 2007 November 19, 19:14
Je suis le premier billet. Modifiez moi.
