w00tw00t.at.ISC.SANS.DFind

Well i’ve been having this problem for a long time, with script kiddies trying to run scans on my server with Dfind (http://class101.org ).

These are some of these request from the apache server logs

/var/log/httpd/access_log.2:80.237.172.185 – - [05/Mar/2007:09:20:47 -0800] “GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1″ 400 299 “-” “-”
/var/log/httpd/access_log.2:83.71.188.242 – - [05/Mar/2007:16:25:40 -0800] “GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1″ 400 299 “-” “-”
/var/log/httpd/access_log.2:213.254.226.49 – - [06/Mar/2007:05:11:47 -0800] “GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1″ 400 299 “-” “-”
/var/log/httpd/access_log.2:216.30.246.14 – - [09/Mar/2007:08:56:12 -0800] “GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1″ 400 299 “-” “-”
/var/log/httpd/access_log.3:80.237.211.76 – - [25/Feb/2007:07:46:16 -0800] “GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1″ 400 299 “-” “-”
/var/log/httpd/access_log.3:83.71.188.242 – - [25/Feb/2007:17:51:23 -0800] “GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1″ 400 299 “-” “-”
/var/log/httpd/access_log.3:80.237.172.185 – - [27/Feb/2007:05:42:20 -0800] “GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1″ 400

 

All this while i’ve been lazy :D , but today i felt like trying something to fix it. What i’ve come up with is this

grep “w00tw00t” /var/log/httpd/access_log*|awk ‘{print $1}’|sed ’s/\(.*\)://g’|sort|uniq|cat /etc/apf/deny_hosts.rules -|sort|uniq

 

This is one of the things i wrote to get all the list of IPs from the Apache access logs who have been running these scans. Well the purpose of this is to feed these IPs to APF (http://www.rfxnetworks.com/apf.php ) the output of this is pumped to /etc/apf/deny_hosts.rules to block any of these lamers from further accessing my server ^_^

Only problem is for some strange reason, I couldn’t pipe the output of the command directly to /etc/apf/deny_hosts.rules. The file always ended up with output of "grep "w00tw00t" /var/log/httpd/access_log*|awk ‘{print $1}’|sed ’s/\(.*\)://g’|sort|uniq". Well maybe i’ll figure it out sometime later. SLEEPP!! awaits!!

Django for Python

Django is a web-framework similar to Rails for Ruby, i’ve not worked on rails much thought but my friend vivek seems to be the "GURU" of rails =), but when he mentioned Django i just wanted to give it a try. From what i can say Django has been a no pain and all gain framework. Easy to setup and code. In the world of Web 2.0, isn’t that want we want. I had an old friend who ones said "Good Programmers are Lazy Programmers".I still remember your words, Hats-off to you Jacob!. That said, Django is pretty easy to get things started with, I won’t start with providing a tutorials for it, the site already has a great set of tutorials. You can also check out www.djangobook.com  which is a book in making for Django. One other interesting thing to check out is a video on Django at http://video.google.com/videoplay?docid=-70449010942275062&q=Django
 

If you have trouble figuring out Django you can also drop in at the IRC channel #django at irc.freenode.net 

Well thats it from me for a while, I’ve been feeling lazy lately :b 

My very own 360°s

I finally got my XBOX 360, without a doubt the best console eva!

mmm, what have i been playing? 

  • Project Gotham Racing III (aka PGR III)
  • Dead or Alive 4
  • Crackdown
  • GRAW 2
  • Burnout Revenge
  • Kameo
  • Gears of War (My Favourite) :b
  • Ninety-Nine Nights

and now my very own gamecard, though iam still a n00b :(

IP VPN with Hamachi

Want to setup a VPN? but don’t have the time, or you are just plain old lazy to setup something like OpenVPN? Well then Hamachi is for you!.  Hamachi is a zero-configuration virtual private networking application with an open security architecture and NAT-to-NAT traversal capabilities. Ok, why a VPN? u ask. An IP VPN is a partitioned private network constructed over a shared IP-based backbone that utilizes technologies to ensure privacy of data, so you can setup your own private network over the internet and still communicate with the peers securely. You can setup a VPN just to do something very simple as playing a multi-player game over the internet and simulate a local LAN. Setting up Hamachi is a piece of cake!. Just download the windows installer if you use windows or get the tarball of the binaries for linux. Setup is as simple as running the installer and you are all set to go :b

But Hamachi is not a replacement for something like OpenVPN it still has some disadvantages

- dependends on a third party mediation server – if necessary, you can firewall your Hamachi connection (although this sort of negates the convenience of not having to open up ports on your computer for certain games that you would have if you don’t firewall your Hamachi-NIC: the regular NIC would still be firewalled without problems as things are being tunneled), but firewalling your connection is global for ALL Hamachi networks you have joined whereas OpenVPN creates a separate virtual NIC for each "network" that you and your peers create

- some games act up with the predefined 5.0.0.0 mask 255.0.0.0 network, which in Hamachi you cannot change, although a workaround would be IPX on all Hamachi clients if the game supports it. In OpenVPN you decide any IP ranges and settings yourself

- so far, Hamachi cannot be "bridged" with other NIC’s on your system like you can with OpenVPN or at least I haven’t been able to

- perhaps Hamachi cannot be forced into promiscuous mode which is necessary for this to work or simply refuses to use static IP addresses if you manually enter the 5.0.0.0 address

– no Windows 98 support, which some gamers still use especially with older games that require IPX or even NetBEUI.

You can get Hamachi from http://www.hamachi.cc/

So what are you waiting for? go, give it a try! :D  

Groovy – Dynamic Language for Java Platform

Well i know its been a long time since i posted somethin, and yes shame on me :p

I came across somethin today which is pretty amazing for what it can do for you, Its like a small scripting engine for java or you may just call it a seperate language of its own. The best part is the amount of code you would write in groovy compared to java to perform the same task. For most part groovy sounds more like "Ruby for Java". For a quick start install the groovy eclipse plugin from http://groovy.codehaus.org/Eclipse+Plugin. Groovy scripts are compiled to Java Class files and they are nothing different than normal class file. So in your application you could write some portions in Groovy and some in Java, since compiled Groovy class files can be used in Java and Java classes can be used in Groovy without doin anything extra. You will know what I am talkin about once you start coding in it, so stop wasting time and get to work!

Resources:

http://groovy.codehaus.org/
http://www-128.ibm.com/developerworks/java/library/j-pg09196.html 

XGL is here!

Always wanted something new on the Linux user interface, something similar to Aero on Windows Vista?

Well then here comes XGL, according to the offical statement

Xgl is a new Xserver architecture layered on top of OpenGL.

As XGL improves, i guess it would put Windows Vista far behind. The best way to install XGL if u are using Open SUSE 10.2 is open up Yast Package Manager and search for XGL and Compiz (Window Manager, that works great with XGL)

some of the  features of XGL include:

  • Decouple window resolution from display resolution. Applications may render windows at a particular resolution, but may be seen on-screen at a different resolution. Consider a background/root gradient. Such a window (texture) may only be a few pixels in size but appear at 1600×1200 or larger.

  • Fast, simple screen rotation/flipping/panning/magnification.

  • Advanced font rendering, including on-the-fly outline font rendering using textures and fragment programs (see [WWW]http://www.loria.fr/~levy/publications/papers/2005/VTM/vtm.pdf).

  • Simulated hardware overlay planes. This long-time workstation graphics feature could be implemented with texture compositing.

  • Full-screen color manipulation, including gamma correction, contrast enhancement, dimming/brightening, etc.

  • Mixed pixel depths on one screen. Redirected, top-level windows could all have different color depths (8, 16, 24, 32bpp). For example: XTerms may be created with 8bpp (requiring 1/4 the texmem of a 32bpp visual) and displayed with a color-lookup table (fragment program texel lookup).

  • Arbitrary per window colormaps (fragment program texel lookup)

  • Alternate window color spaces. "video" windows may be stored as YCbCr (smaller than RGB) and converted to RGB on the fly when displayed using texture hardware.

  • Window image compression: Use S3TC texture compression to compress windows whose contents seldom change. Best use would be the desktop background stored in the root window. Potentially big memory savings.

  • New opportunities for antialiased X rendering with OpenGL multisampled surfaces.

You want to try out XGL and dont have Open SUSE installed? try out DreamLinux  (http://www.tuxmachines.org/node/8358)
run the Live CD version of DreamLinux 2.0 XGL Edition to check out all the EyeCandy of XGL.

There goes Vista..and here comes XGL!…hail Open Source! 

Some Links:

http://en.opensuse.org/Xgl
http://www.novell.com/coolsolutions/feature/17174.html
http://www.dreamlinux.com.br

 

I am back!

Well after a long time of inactivity, which was the result of lots of things goin on with me including a new job and relocating to singapore. I am finally back into maintaining the blog. I have been doin a lot of interesting projects at Singapore Press Holding (http://sph.com.sg , the company that i work for)  including playing my part in the upgradation of Business Times (http://business-times.asiaone.com ) and a totally new project which includes a Newsletter System using (Apache Velocity, Apache MyFaces and Spring Framework) , more on that later. Its been interesting to know that there are really people who come across my blog eventhought there is not much in it, which i assure is goin to change, and contain a lot of usefull articles about the work that i do, and part of which can be helpfull to someone in need ;)  

hmm…too much talkin and a long way to go

MySQL 5.0 Stored Procedures

MySQL 5.0 comes with some really cool additions like stored procedures, functions and views.

I was experimenting with writing a procedure at work and, this is what i came up with.

DELIMITER $$;
 
 DROP PROCEDURE IF EXISTS `vms_database`.`FixSafety`$$
 
 CREATE PROCEDURE `FixSafety`()
 BEGIN
     DECLARE id, b int ;   
     DECLARE serial_no1 varchar(255) ;
     DECLARE track_id varchar(255) ;   
     DECLARE cur_1 CURSOR FOR SELECT MAX(SAFETY_VALVE_REPAIR_ID) AS id , SERIAL_NO , SAFETY_VALVE_EQUIPMENT_TRACK_ID AS track_id  FROM safety_valve_repair WHERE SERIAL_NO IS NOT NULL AND trim(SERIAL_NO)!= GROUP BY SERIAL_NO;
   
     DECLARE CONTINUE HANDLER FOR NOT FOUND
     SET b = 1 ;   
     OPEN cur_1 ;   
     REPEAT
         FETCH cur_1 INTO id, serial_no1, track_id ;       
         UPDATE safety_valve_repair SET SAFETY_VALVE_EQUIPMENT_TRACK_ID=id,MOST_RECENT_FLAG=‘N’ WHERE SERIAL_NO = serial_no1 AND SAFETY_VALVE_REPAIR_ID!=id ;
         UPDATE safety_valve_repair SET MOST_RECENT_FLAG=‘Y’ WHERE SAFETY_VALVE_REPAIR_ID = id ;
         UNTIL b = 1
     END REPEAT ;
     CLOSE cur_1 ;
 END$$
 
 DELIMITER ;$$

The procedure that i wrote was 2-3 times faster, than a piece of java code that, i wrote to perform the same operation.
Eventhough i still don’t like much of how procedures are written in MySQL 5.0, its still a good start.

JBoss Seam (EJB3+JSF+WORKFLOW)

Ok you wanted a sneak peak into EJB3? find a way to integrate JSF with EJB3?

Well here comes JBoss Seam it has everything u need to get started with EJB3 and also to find out how cool JSF can be when integrated with EJB3. I came across some nice features about Seam when i visited the Linux Asia 2006 conference held in New Delhi, India. I met Subramaniam Satyamoorthy (Director of Operations and Services (Asia Pacific)) , quite a funny guy :) . He showed us some of the workings of Seam, that got me hooked into it. And i am still experimenting with a lot of interesting stuff in it, not to mention JBoss jBPM which i had no idea about untill i knew about JBoss Seam. EJB3 uses Hibernate for persistance so you got best of both worlds :p. Maybe after a while i might  just post some code for download regrading Seam. Eventhough Seam is still in beta its still a handfull.  So check it out at http://www.jboss.com/products/seam 

and oh btw, you need to either select "ejb3 cluster" or "ejb3" profile while installing Jboss Application Server .

Integrating Codesnippet and Editormonkey plugin for Wordpress 2.x

I just tried out one of the best wordpress plugins out there the Codesnippet and Editormonkey , since for people like me who like to paste code everywhere they can :p and also since wordpress is not so kind to us :( , i had to go search for a plugin that would make my life a bit easier. Codesnippet is a great plugin to get syntax highlighting done for your code. Similarly Editormonkey replaces the default WYSIWYG editor in Wordpress 2.x with a much more advanced WYSIWYG editor with choices to either use TinyMCE or FCKEditor. Well i tried them both and was very impressed but when i started using the both together, came across some gliches Codesnippet stopped working since Editormonkey would change much of my code into HTML with "<" and ">" etc converted to  &lt; and &gt; and i could no longer use "code" blocks with "lang" attributes. So i tried hacking into it and came up with a few fixes for Codesnippet to work with Editormonkey. So if you are one of those who likes to use both you can download the modified "Codesnippet.php" from here.

You might also want to change the css for "Codesnippet" under Options->Code Highligting to something like this

border:1px solid #ccc; background:#eee; padding: 5px;margin:10px; font-size: xx-small; overflow:auto

 

looks much nicer in firefox.

Don’t forget to visit Codesnippet’s page at http://blog.enargi.com/codesnippet/   and Editormonkey at http://www.rajprasad.net/plugins/editormonkey
really great plugins….

Update: looks like the codesnippet site is down but u can download codesnippet from here

This is not the exact release, its just a tar of the files in my plugins directory . I have put it up just coz there is no download available elsewhere. 

Cheers!

« Previous PageNext Page »