Showing posts with label Hack. Show all posts
Showing posts with label Hack. Show all posts

Friday, 25 February 2011

Versioned Entity Caching for high read/write on Google App Engine Python


The usage of memcache for lowering the load on App Engine Datastore is well known. Here is an approach to versioned caching of datastore entities in App Engine. The Model is deigned primarily for purposes where entity is updated very frequently. The idea for these kind of entity generated while working on the Multiuser Chat room for App Engine using Channel APIs.

Expectations

The Model is designed with the following factors in mind

  • Very frequent read/write access to entity
  • Effective usage of memcache to reduce load on datastore operations
  • Strong consistency between datastore and memcache


Design Plan

The Entities have an internal version number. This version number is increased everytime there is an update in the entity.


from google.appengine.ext import db


#   The maximum difference in revisions acceptable  at any instant
#   between memcached values and the datastore values. The higher it
#   is, the greater catastrophe when memcache goes down, but lesser
#   datastore usage. The lesser it is, the more consistent your datastore
#   and memcache are, and higher datastore operations. 4~6
FAULT_TOLERANCE = 4

class GlobalVersionedCachingModel(db.Model):
    """
    The Model uses internal versioning of information with prime focus on very
    high read/writes and consistency.
    Every entity has a datastore's version number information and the version
    number from memcache. When the entity is updated, it happens in memcache
    only and the memcached version number increases. If this number is greater
    than the datastore version number by a certain amount called
    "fault tolerance", then the datastor entity is sync'd with the memcache
    entity.
    """
    
    _db_version = db.IntegerProperty (default=0, required=True)
    _cache_version = db.IntegerProperty (default=0, required=True)
    _fault_tolerance = db.IntegerProperty(default = FAULT_TOLERANCE)
    

Approach #1

Initially, both the versions are set to 0 when the entity is created. _fault_tolerance is the maximum allowed difference between the cache version and the datastore version. Since the entity is primarily read from and written to memcache, and later updated to datastore, the datastore version number can be behind the memcache version number. When the difference between the two exceeds fault tolerance, then the datastore is updated with the memcache details.

The downside of this approach is that when the memcache goes out, then the datastore entity is fetched. This entity, in worst case scenario, could be lagging from the actual entity by a maximum of _fault_tolerance factor. Fault Tolerance can be decreased to improve the consistency between memcached entity and the datastore entity but that will result in higher datastore read/write operations.


Approach #2

In this approach, instead of directly writing into the datastore, we initiate a task queue and that gets the task done for us. The good part of this approach is that we can keep smaller values of _fault_tolerance and still expect faster processing. This approach is ideal where strong consistency is required between the entities and latency shall also be minimal


Methods


def get2 (keys, **kwargs):
    keys, multiple = datastore.NormalizeAndTypeCheckKeys (keys)
    getted_cache = memcache.get_multi (map (str, keys))
    ret = map (deserialize_entities, getted_cache.values ())
    keys_to_fetch = [key for key in keys if getted_cache.get(key, None) is not None]
    getted_db = db.get(keys_to_fetch)
    memcache_to_set = dict ((k,v) for k,v in zip (map (str,keys_to_fetch), 
                                            map (serialize_entities, getted_db)))
    ret.extend(getted_db)
    memcache.set_multi (memcache_to_set)
    if multiple:
        return ret
    if len (ret) > 0:
        return ret[0]

class GlobalVersionedCachingModel(db.Model):
    """
    The Model uses internal versioning of information with prime focus on very
    high read/writes and consistency.
    Every entity has a datastore's version number information and the version
    number from memcache. When the entity is updated, it happens in memcache
    only and the memcached version number increases. If this number is greater
    than the datastore version number by a certain amount called
    "fault tolerance", then the datastor entity is sync'd with the memcache
    entity.
    """
    
    _db_version = db.IntegerProperty (default=0, required=True)
    _cache_version = db.IntegerProperty (default=0, required=True)
    _fault_tolerance = db.IntegerProperty(default = FAULT_TOLERANCE)
    created = db.DateTimeProperty (auto_now_add=True)
    updated = db.DateTimeProperty (auto_now=True)
    
    @property
    def keyname (self):
        return str (self.key ())

    def remove_from_cache (self, update_db=False):
        """
        Removes the cached instance of the entity. If update_db is True,
        then updates the datastore before removing from cache so that no data
        is lost.
        """
        if update_db:
            self.update_to_db()
        memcache.delete(self.keyname)
    
    def update_to_db (self):
        """
        Updates the current state of the entity from memcache to the datastore
        """
        self._db_version = self._cache_version
        logging.info('About to write into db. Key: %s' %self.keyname)
        self.update_cache ()
        return super (GlobalVersionedCachingModel, self).put ()
    
    def update_cache (self):
        """
        Updates the memacahe for this entity
        """
        memcache.set (self.keyname, serialize_entities (self))

    def put (self):
        self._cache_version += 1
        memcache.set (self.keyname, serialize_entities (self))
        if self._cache_version - self._db_version >= self._fault_tolerance or \
                                                self._cache_version == 1:
            self.update_to_db ()
    
    def delete (self):
        self.remove_from_cache()
        return super (GlobalVersionedCachingModel, self).delete ()
    
    @classmethod
    def get_by_key_name (cls, key_names, parent=None, **kwargs):
        try:
            parent = db._coerce_to_key (parent)
        except db.BadKeyError, e:
            raise db.BadArgumentError (str (e))
        rpc = datastore.GetRpcFromKwargs (kwargs)
        key_names, multiple = datastore.NormalizeAndTypeCheck (key_names, basestring)
        logging.info(key_names)
        keys = [datastore.Key.from_path (cls.kind (), name, parent=parent) for name in key_names]
        if multiple:
            return get2 (keys)
        else:
            return get2 (keys[0], rpc=rpc)
    
    
    


Similar Readings

Saturday, 17 July 2010

Is it possible to get users email by hosting gadget on appspot?


Google App Engine provides its User API service, using which you can allow people with Google Accounts to easily access your application. It works in a manner much similar to Google's other login services. When you login, you are taken to a central page, common for all google services and then after you have authenticated yourself, you are redirected back to the service.

Since Google uses a central page for login and logout and it is a cookie based authentication, it might trigger question - if someone is logged into gmail or orkut or other such google service is it possible to get their Google Accounts using App Engine's Users API? In order to do so, i deployed an application on App Engine, which would write "hello World!" on the canvas. This gadget XML is generated pragmatically and at the backend, there is a code which checks for a valid Google Account Holder.

The corresponding code goes as follows:
(There is no space at line 39, the space are mentioned here to go according to the syntax highlighter)




Upon deploying the gadget on orkut and gmail, i found that everytime the gadget loads, i just see a new entry in the Log, saying "User is None".

This means that you can authenticate only users for your own domain/application, not for all of the Google products services :-)

The complete source code of the application can be found at its Google Code repository http://code.google.com/p/codecontrol-samples/source/browse/user-authentication/src/.

Monday, 7 September 2009

Mere dost bhi hacker

Was sitting idle and then thought of this song for one of my hac0r friend

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

kabhie hum hacker nikle
kabhie doosre hacker


kya kare zindagi isko hum jo mile.. isko hack kartey gaye.... meri zindagi "life of a procastinator"... mere dost bhi hacker......


kabhie zindagi se maanga HDD mei google ka database le aao
kabhie USB de ke kaha... sabka CC and CVV number isme daalo
hacking ke sab kareene ... hai hamesha se kamine
kya kare.. zindagi.. isko hum jo mile...
isko hack kartey gaye...

jiska bhi database choda.... ander se aur nikla...
Microsoft waale to hadd hai, Linux ka server nikla

Kabhie hum hacker nikle... kabhie doosre attacker
attacker..... attacker
mere dost bhi hacker
meri zindagi hacker
ek PP se dosti thi.... ye huzoor bhi hacker

Monday, 27 April 2009

Google preventing automated searches



It looks like there has been an increase in the number of automated searches being performed over google. And they are not happy with it.

What i was fascinated with is the google calculator. I has just started to write a script in Python for calculation related things and what i could get is that there are now less ways to do automated search over Google.


Let's have a look at how Google prevents automated searches.

If we open http://www.google.com and do a search for "35 mm in inches", what we obtain is the result. A close look at the URL pattern gives the following information.

  • The new search pattern of google is
    http://www.google.com/#hl=en&q=5+mm+in+inches&btnG=Google+Search&aq=0&oq=5+mm+in+in&fp=CGM4k02K5DI
    . The use of anchor tag (#hl) is interesting.
    Another interesting thing is that there are two parameteres on which the same search keyword is being fired - q and oq.
    The q is the actual query that is used to fetch the result and oq is the query that you typed. The following image makes this even more clear.


  • Another interesting thing is that if we try to open the same page via Python's URLLIB2 interface, we get the google home page.

  • Apart from that, the most famous URL pattern for any search
    http://www.google.com/search?q=google+search

    gives a 403 - Forbidden, when tried to access via Python's urllib2 interface.


So, it looks like Google is narrowing the way people perform automated search on its engine.


In the next couple of days, i will be trying to find out if there is still some holes left, or not and will discuss my findings here in a more elaborate manner. You could very well, follow my blog to make sure you don't miss anything. Comments most welcome.

Monday, 15 December 2008

Abstracting forms and models in appengine & django

If you have many Models in your appengine, django apps you are not going to create a separate form class for all the Models, are you? You got to be kidding me.
So, here is a simple short code that will generate the class object for you, just pass in various details :-)



def Formfactory(model, exclude_list, data=None, instance=None):
"""
An abstraction layer for forms and models
"""
class AbstractForm(djangoforms.ModelForm):
class Meta:
pass
setattr(Meta, 'model', model)
setattr(Meta, 'exclude', exclude_list)

myForm = AbstractForm(data=data, instance=instance)
return myForm

### Usage
t = Formfactory(Person, ['created_by', 'date_of_joining'] , data={'Name':'pranny'})


It can be normally used with all the is_valid() and rest.

Hope you will find it useful. Don't forget to comment.

Tuesday, 8 April 2008

Simple IRC Logging Bot in Python

This is a simple IRC chats logging bot. ALl it does is to connect to an IRC Channel, and log the conversations in real time, in a raw manner. The code presented here is just a proof of concept. For actual code, please visit http://code.google.com/p/pikudotbot/.




#!/usr/bin/env python

"""
# A simple IRC Bot, that logs conversation in an IRC Channel
#
# (C) 2008, Pranav Prakash
#
# Email: pranny@gmail.com
#
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
"""

import sys, string, socket

class Bot(object):
"A Simple Bot class"

"""This is the bot class, and the actual bots will be instances of
this class"""

def __init__(self, HOST, PORT, NICK, REALNAME, IDENTITY):
self.host = HOST
self.port = PORT
self.nick = NICK
self.realname = REALNAME
self.identity = IDENTITY
self.connected = 0 # disconnected by default
self.sock = socket.socket()
self.join = 0

def connect(self, HOST = 'irc.freenode.net', PORT = 6667):
loop = 1
if self.connected == 1:
print "Disconnecting from %s:%s" %(self.host, self.port)
self.connected = 0
self.host = HOST
self.port = PORT
self.sock.close()
else:
print "Connecting to %s:%s" %(self.host, self.port)
self.sock.connect((self.host, self.port))
self.sock.send('NICK ' + self.nick + '\n')
self.sock.send('USER ' + self.identity + ' ' + self.host + ' blah :' + self.realname+'\n')
while loop == 1:
t = self.sock.recv(512)
print t
if t.find('PRIVMSG') != -1:
self.join = 1 # ready to Join a channel
return
if len(t) < 1:
loop = 0
self.join = 0 # not ready to join a channel

def joinChannel(self, CHANNEL):
self.channel = CHANNEL
loop = 1
print self.join
if self.join == 1:
self.sock.send('JOIN '+self.channel+'\n')
while loop ==1:
t = self.sock.recv(512)
print t
if t.find('privmsg') != -1 or t.find('PRIVMSG') != -1:
logIt(t)

else:
print "Not ready to join"

def disconnect(self):
if self.connected == 1:
self.sock.close()

def logIt(text):
f = open('logfile','a')
f.write(text)
f.close()


if __name__ == '__main__':
piku = Bot('irc.freenode.net', 6667, 'piku_b02', 'piku_b02', 'piku_b02')
piku.connect()
piku.joinChannel('#orkut_linux')

Friday, 21 March 2008

Managing gtalk status your way

Alright fine, so i have returned after a long time, with another of my post of google talk and gmail. In this post i will tell you how to manage your gtalk status effectively. As you must have read from my previous post of Being invisible in gtalk, there are ways through which you can be invisible in gtalk. Here are some things more.

Being invisible in gMail

Recently gmail has introduced the feature of being invisible. When you change your status you can select invisible. This will make sure that you can see other people who are online and chat with them, but they can't see you being online.

Showing off your music track in Pigdin

Now, for those who are using google talk on Windows, it is easy to show off their current music track. For those who are using Pidgin on Linux or Windows, there is an add-on that you need to install. Then you can also publicize your music track. Here is the link to download the plugin known as MusicTracker. The project is hosted at Google Code and you can get it from here

Being always idle in google talk

Through a plugin for gtalk called as gAlwaysIdle you can always be in idle status, and thus safely ignore people whom you don't want to talk to. You can download the plugin from gAlwaysIdle

Friday, 22 February 2008

Get SMS Alert for google talk

Hello, the wait for SMS alert in google talk is finally over, here is a way how you can get SMS alert from google regarding people who SMSed you while you were offline. Although there is no official service, this is a tweak or "jugaad" in a sense, that lets you to receive SMS notifications when you are not available.



  1. Install Pidgin IM client. In case you are having issues regarding configuring Pidgin for google talk, you can look here.
  2. Create a Google Calender and in the settings tab (on the top right corner), go for notification settings. Create a SMS alert for it. Type your mobile number and verify your mobile.
  3. If you are Windows user, download this file . Unzip it and copy the file named gsms.dll in the folder C:\Program Files\pidgin\plugins.

    In case you are a Linux user, download the required file from this location to ~.purple/plugins.
  4. Configure the plugin as follows

    Open the Plugins from the main window of Pidgin, and then so the following things

    Gmail account: your gmail e-mail (example: foo.bar@gmail.com).
    Password: password for specified account.
    Timeout: Number of minutes for gsms to collect chats until it sends them.
    Calendar feed path: Which calendar to use (example: "/private/full" translates to: http://www.google.com/calendar/feeds/foo.bar@gmail.com/private/full)

Monday, 7 January 2008

The creator of First Computer Virus to get Google

No, no horseshoes in the boxing gloves, it’s going to be a fair fight. Unfortunately. I would have liked to see somebody go up against Google and fight dirty, but I guess that there are laws against this, nowadays, they track you anywhere you are and then they do you in. Eh, well, at least there’s going to be a fight after all, although I’m pretty certain that this will be ended in the first round with a KO from Google.

Rick Skrenta, the co-founder of Topix, a news site and the Open Directory Project and,
as I said, the inventor of the first ever computer virus, has decided that Google is too big, so he came up with a means to hurt its supremacy. At least on paper it sounds like a good idea, but the results are rarely the same in real life. Or, in cyberspace, whatever, you choose.

The project is named Blekko and the homepage has already been booked and it presents an image that Google should be scared of. You can see it by either going to www.blekko.com or by looking at the picture on the left, it’s your choice. Those are some scary looking socks, I must admit. Will they be the socks that scare Google? We’ll live and learn if it crashes and burns or if it rises above.

Rick said on his blog that "the idea that what you can see in positions 1-3 above the fold on Google are the sum of what the web has to say about every possible query is crazy. And yet they have 85%+ market share, and little effective competition. At the same time there is such a fabulous business in search. It’s the highest monetization service on the web, by far. Why does this Coke have no Pepsi?"

Well, it’s going to be a while before this will come to be (the real competition, that is), the best prognosis has Blekko out in 2009. It would be happy to go for just 1 percent of the niche at the start… seeing as that means 1 billion dollars.

Thursday, 22 November 2007

CyberBullying, the horrible face of Social Web

Cyberbullying suicide stokes the internet fury machine. This is one of the top news at Wired.

What is Cyberbullying?
Cyberbullying or online bullying is a term used to refer to bullying over electronic media, usually through instant messaging and email. Other terms for cyberbullying are electronic bullying, electronic harassment, e-bullying, SMS bullying, mobile bullying, online bullying, digital bullying, or Internet bullying. Cyberbullying is willful and involves recurring or repeated harm inflicted through the medium of electronic text. According to R.B. Standler bullying intends to cause emotional distress and has no legitimate purpose to the choice of communications. Cyberbullying can be as simple as continuing to send e-mail to someone who has said they want no further contact with the sender. Cyberbullying may also include threats, sexual remarks, pejorative labels (i.e., hate speech). Cyber-bullies may publish personal contact information for their victims at websites. They may attempt to assume the identity of a victim for the purpose of publishing material in their name that defames or ridicules them.

Types of Cyberbullying.
Cyberbullying can occur in following forms. One or more can be potential.
  • E-Mail.
  • Blogs
  • Instant Messages (IMs)
  • Chat rooms
  • Bash boards
  • Small text Messages (SMSs)
  • Websites
  • Voting Booths
  • Others


Statistics
The Youth Internet Safety Survey-2, conducted by the Crimes Against Children Research Center at the University of New Hampshire in 2005, found that 9% of the young people in the survey had experienced some form of harassment. The survey was a nationally representative telephone survey of 1500 youth 10-17 years old. One third reported feeling distressed by the incident. Distress is more likely for younger youth and those who are the victims of aggressive harassment (including being telephoned, sent gifts, or visited at home by the harasser). Compared to youth not harassed online, victims are more likely to have social problems. On the other hand, youth who harass others are more likely to have problems with rule breaking and aggression. Significant overlap is seen -- youth who are harassed are significantly more likely to also harass others.
Hinduja and Patchin completed a study in the summer of 2005 of approximately 1500 Internet-using adolescents and found that over one-third of youth reported being victimized online and over 16% of respondents admitted to cyber-bullying others. While most of the instances of cyber bullying involved relatively minor behavior (41% were disrespected, 19% were called names), over 12% were physically threatened and about 5% were scared for their safety. Notably, less than 15% of victims told an adult about the incident. Additional research by Hinduja and Patchin found that online bullying victimization is related to offline problem behaviors.

A survey by the Crimes Against Children Research Center at the University of New Hampshire in 2000 found that 6% of the young people in the survey had experienced some form of harassment including threats and negative rumours and 2% had suffered distressing harassment.

A study by Campbell of Year 8 students in Queensland, Australia found 14% had been a victim of cyber-bullying, 11% admitted to bullying, while 25% knew someone who had bullied. Anecdotal evidence suggests that girls are more involved than boys as they are more likely to communicate regularly.

Preventing Cyberbullying
Following measures should be taken to prevent cyber-bullying.
  1. Never give out personal information, password, PINs etc
  2. Don't believe everything you see or read.
  3. Use netiquette
  4. Don't send a message to someone else when you are angry.
  5. Don't open a message from someone you don't know.
  6. If it doesn't look or feel right, it probably isn't
  7. You don't have to be "Always On" turn off, disconnect, unplug, try actual reality instead of virtual reality!


If you are a victim, what should you do.
If you have been a victim of cyberbullying, you should follow these steps.
  1. Don't reply the message from cyberbullies
  2. Do not keep this to yourself! You are NOT alone and you did NOT do anything to deserve this! Tell an adult you know and trust!
  3. Inform your Internet Service Provider (ISP) or cell phone/pager service provider
  4. Inform your local police
  5. Do not erase or delete messages from cyberbullies
  6. Protect Yourself. Never arrange to meet with someone you met online unless your parents go with you. If you are meeting them make sure it is in a public place.


These steps would help you protect yourself from cyberbullying.

Monday, 29 October 2007

Apple Leopard Hacked in a day


Apple Leopard, "The most impressive OS X version", as said by apple.com, has been hacked in less than 24 hours. The hackers have managed to bring out a patched DVD that anyone like you and me, can use to install Leopard on your system without even buying the Mac. Please note the tutorial that I am going to post is still experimental and things might not work the right way simply because it is still early days in hacking Leopard to work on PC’s. Well if you don’t mind your PC getting screwed then go ahead and try out this tutorial.

Make sure you backup all important data before you proceed. Here are the things that you will need before Install Leopard on your PC…

  1. The patched DVD image
  2. The Zip file containing the patch
  3. One pen drive or USB Flash Drive formatted as FAT32


Well once you have all these you can go ahead and Install Leopard..

Step 1. Getting things ready


* Burn the DVD Image onto a Single Layer DVD-R using a software like Nero.
* Format the USB Flash Drive and the drive label should be "Patcher" without the quotes. Please note it has to be "Patcher" only and nothing else for the patch to work when we apply it later.
* Extract the Zip file and put its contents into the USB Flash Drive.
* Now your USB Drive should contain a folder called "files", if it doesn’t then check to see where you have gone wrong.


Step 2. Installing Leopard


* Now that you have the Patched DVD with you, you can now install Leopard. Pop in the DVD into the drive and boot into it by pressing F12 at the BIOS Prompt.
* Boot into the DVD and the installer should now load. It take a while though, so be patient.
* Select your Language and make sure you select Customize and you need to deselect all the packages that are displayed.
* Leopard will now install. This can take a while, so go grab yourself a coffee.
* It will ask you to Reboot, so go ahead and Reboot. Before rebooting make sure that USB Flash Drive is connected to the PC.


Step 3. Patching Leopard


* Now that you have got Leopard installed, you need to patch it. Before we do that Boot into the Leopard DVD like the way you did before.
* Wait for the Darwin Bootloader to load. Once it loads up press F8. You should now see a prompt. Type -s and hit enter. The DVD will now load in Verbose mode. Watch for any errors. It should load without a problem because you have already installed Leopard.
* Once the setup is loaded select your Language. Once done you should now be seeing the Welcome Screen. Once there navigate to Utilities-Terminal.
* Once the terminal loads up, you now need to browse to your USB Drive, so follow the steps below, typing it exactly as it appears below in the Terminal.

In the command line type the following as they appear here

cd ..
cd ..
cd Volumes
cd Patcher
cd files

Notice the space between cd and the 2 dots.
* Now its the time to run the patcher to make sure Leopard will work on your PC. Type the following into the Terminal.

./9a581PostPatch.sh
* The Patch should now run. You can answer Yes while removing the ACPUPowerManagement.kext
* After the Script is done, you should now be able to Boot into Leopard after you restart.


Step 4. Congratulations! You’ve done the Impossible!


Well that was it. Please note this has not been extensively tested, so most of your Hardware like Sound, Network may not work. If something goes wrong for you or you want to help us, then please join the discussion over at OSX86Scene. If you noticed I haven’t posted the links to the Torrent that contains the DVD image and the zip. Well I haven’t posted them because I am sure the lawyers over at Apple are going to sue the hell out of me. If you wondering where you can find them, then head over to Demonoid and search for it. Some Updates and Clarifications :

* This Hack works on Intel PC’s with atleast SSE3
* You need to format your Leopard Partition to HFS+
* Make Sure you install Leopard on MBR and not GUID or it won’t boot.
* More Patched DVD’s from Uphuck, Netkas is in the works so it would be better if you wait for the polished releases to come out.

Monday, 10 September 2007

1 in every 28 email reaching india has virus

Malicious websites on the rise

With the Internet becoming the order of life for more and more Indians, who depend on e-mails to stay in touch, their computers are facing an increasing virus threat with one in every 28 e-mails being infected, says a recent study.

A study by the messaging security and management services provider, MessageLabs, reveals that malicious websites are on the rise.

A new virus, StormWorm, which uses virtual postcards and YouTube video for its attack, is affecting computers.

According to the study, 1.8 million computers have been affected by StormWorm worldwide. In August, India was the most vulnerable region in virus attacks, with one in every 27.8 e-mails having been infected. However, during this period, spam attacks (or unsolicited bulk e-mails), accounted for only 29.5 per cent of the total e-mails received, says the study.

It also found that there was a rise in e-mails containing links to virtual postcards and YouTube video invites.

On August 15, there was a significant outburst of new malicious websites comprising 600,000 e-mails, which were distributed in just 24 hours.

As a result of this latest StormWorm activity, the number of e-mails which contained links to malicious code increased to 19.5 per cent in August, a rise of 19 per cent from the July figure of just 0.5 per cent.

The analysis also reveals steep rise in the number of new malicious websites appearing every day. In August, a daily average of 1,772 such new sites were identified and blocked, an average increase of 783 a day since July

The analysis on web trends also reveals the steep rise in the number of new malicious websites appearing every day. In August, a daily average of 1,772 new malicious sites were identified and blocked, an average increase of 783 per day since July. In August, the global ratio of spam in email traffic from new and unknown sources, for which the recipients' addresses were deemed valid, was 74%, an increase of three per cent on the previous month.

During this time, Israel received the highest number of spam attack at the rate of 70.7%, while France saw the most significant increase in spam levels at a 9.5%, followed by Spain at 9.2%.

Across sectors, agriculture ranks as the most spammed with 66.9%, while finance is the least spammed one with 30.5%.

The highest increase in spam activity across all sectors during August was observed in the telecom sector where it rose by 22.3% since July and repositioned this vertical as the second most spammed segment. The largest drop was in the business support services sector, which fell by 6.2%. The global ratio of viruses in email traffic from new and previously unknown bad sources destined for valid recipients was 1 in 80.4 or 1.24% in

August, a decrease of 0.14% since the previous month. The education sector moved to the top of the virus chart in August despite a fall in virus activity of 0.18%, the study revealed.

Wednesday, 15 August 2007

The new Orkut Bug

This is the new bug i discovered at orkut.

Send a message say "Happy Independence day" to all your friends. And then send a message to a few of your friends. Then go in the sent maul folder. What you will notice is that, the profile name are of your friends only, but the pictures are some other. When you click on the pictures, then you will see that, those are the pictures of some Brazilian Communities, with few members.

Donno what is this. Is orkut promoting these Brazilian Communities or there is a serious bug at orkut.

Friday, 10 August 2007

What is hacking?

Whenever the word 'Hacking' or 'Hacker' comes to our mind, the picture or the image which is created is that of an intelligent being who is criminal by nature, who attacks other computer systems, damages it, break codes and passwords, send viruses etc. Their mindset are as if the 'hackers' are the computer criminals. They have a very wrong notion in this regard and have a completely negative attitude and utter dislike for the 'Hackers'.

In this regard, the media has wrongly associated the computer criminals as 'Hackers'. The media has played a major role and has its hands behind this creation of negative connotation of the word 'hacker'. General public may spread rumors but it is hard to believe, someone speaking about completely new term, which is also a totally new concept to him.

But the fact is that the terms 'Hacker' and so called 'Computer Criminal' are absolutely two different terms and are not linked with each other in any respect. They speak what they read and listen from others. For this, whenever any cyber crime occurred, by unauthorized use of other computer systems, the news published and delivered in public was by the use of the term 'hacking'. So we can say that it is because of media why people have hatred or negative feeling for the 'hackers'.

Now if such cyber criminals are not hackers then two major question which arises are:

1. Who are Hackers? And,
2. What are such cyber criminals called?

Actually, 'Hackers' are very intelligent people who use their skill in a constructive and positive manner. They help the government to protect national documents of strategic importance, help organizations to protect documents and company secrets, and even sometimes help justice to meet its end by extracting out electronic evidence. Rather, these are people who help to keep computer criminals on the run.

Now dealing with the second part, i.e., what are such cyber criminals called? The actual word for such criminals is not 'hacker' but 'cracker'.

First I would like to explain the term 'Hacker', because there is a great misconception regarding it. Ankit Fadia, who is a great master mind of India in the field of 'Hacking', has said:

"Traditionally, hackers were computer geeks who knew almost everything about computers and were widely respected for their wide array of knowledge. But over the years, the reputation of hackers has been steadily going down. Today, they are feared by most people and are looked upon as icons representing the underground community of our population."

In the light of this general allusion of the term 'hacking', which is generally construed by people, The word 'hacker' can be used to describe all of these: -

1. Code Hackers - They know computers inside out. They can make the computer do nearly anything they want it to.

2. Crackers - They break into computer systems. Circumventing Operating Systems and their security is their favorite past time. It involves breaking the security on software applications.

3. Cyber Punks - They are the masters of cryptography.

4. Phreakers - They combine their in-depth knowledge of the Internet and the mass telecommunications system.

5. Virus Builders - Virus incidents have resulted in significant and data loss at some stage or the other. The loss could be on account of: -
* Viruses - A virus is a program that may or may not attach itself to a file and replicate itself. It can attack any area: from corrupting the data of the file that it invades, using the computer's processing resources in attempt to crash the machine and more.

* Worms - Worms may also invade a computer and steal its resources to replicate themselves. They use the network to spread themselves. "Love bug" is a recent example.

* Trojan horse - Trojan horse is dicey. It appears to do one thing but does something else. The system may accept it as one thing. Upon execution, it may release a virus, worm or logic bomb.

* Logic bomb - A logic bomb is an attack triggered by an event, like computer clock reaching a certain date. Chernobyl and Melissa viruses are the recent examples.

Hacking v/s Cracking
The term hacker is a term used by some to mean 'a clever programmer' and by others, especially journalists or their editors, to mean 'someone who tries to break into computer systems'. Programmers who use their skills to cause trouble, crash machines, release computer viruses, steal credit card numbers, make free long distance calls (the phone system is so much like a computer system that it is a common target for computer criminals), remove copy-protection, and distribute pirated software may also call themselves 'hackers', leading to more confusion. Hackers in the original sense of the term, however, look down on these sorts of activities. Hackers generally deplore cracking. Among the programming community, and to a large extent even amongst the illegal programming community, these people are called 'crackers' and their activities known as 'cracking' to distinguish it from hacking.

A cracker is generally someone who breaks into someone else's computer system, often on a network, bypasses passwords or licenses in computer programs or in other ways intentionally breaches computer security. A cracker can be doing this for profit, maliciously, for some altruistic purpose or cause, or because the challenge is there. Some breaking-and-entering has been done ostensibly to point out weaknesses in a site's security system.

Sending Viruses v/s Hacking
Even though hacking is not at all an offense but if construed in a manner which is generally used by he public the question comes up is that whether sending viruses can be termed as hacking.

The term cracking means, 'illegal access'. Now, 'access' comprises the entering of the whole or any part of a computer system (hardware, components, stored data of the system installed, directories, traffic and content-related data). However, it does not include the mere sending of an e-mail message or file to that system. 'Access' includes the entering of another computer system, where it is connected via public telecommunication networks or to a computer system on the same network, such as a LAN (local area network) or Intranet within an organization. The method of communication (e.g. from a distance, including via wireless links or at a close range) does not matter. So if a virus is send through an e-mail, it is not an illegal 'access' and hence cannot be termed as 'cracking'.

Cyber Hacking
(or rather Cyber Cracking in verity), is one of the Cyber Crimes and Cyber Crime is a universal term that allude to all criminal activities done using the medium of computers, internet, cyber space and the world wide web (www). In India, the law regulating such crimes is the Information Technology Act, 2000 (or the IT Act, 2000). If studied in detail, we will find that there are still many areas in the said Act, which need Amendments. Like, it does not even define the term 'Cyber Crime' and the crimes mentioned in Chap. XI named 'offenses' have been declared penal offenses punishable by imprisonment or fine. Then Sec.66 defines hacking, but it went on defining what is in reality 'cracking'. The definition of hacking provided in Sec.66 of the Act is also very wide and capable of misapplication. There is every possibility of this section being misapplied.

So in light of Sec.66 of the Act read along with this project topic I will now use the words 'Hacking' and 'Cracking' interchangeably as per the demand of the chapter.

Crackers are becoming a peril so uncontrollable that even the largest companies in the world are finding it difficult to cope up with their perpetual attacks. Some crackers just crack systems and gain access to them, for 'fun'. Their intention is not to commit any crime. Now, it is a question of debate whether such act in itself constitutes an offence or not. They may not be brought within the ambit of existing laws because the IT Act uses the word 'destroys or deletes or alters any information' and in this case they just gain access to the system and nothing else. The act of such a cracker can perhaps, most appropriately, be considered in the light of laws relating to criminal trespass.

Trespass to Property
In common language the word 'trespass', means to go on another's property without permission or right. Though it is ordinarily a civil wrong, if trespass is done with criminal intention, it is treated as criminal trespass. The ingredients of the offense of criminal trespass have been laid down under sec.441 of the Indian Penal Code. The object of making trespass a criminal offense is to keep the trespasser away from the premises of individuals so the one may enjoy his/her property uninterrupted by any intruder.

In applying the section to hacking on the Internet, the question which arises is "whether websites are property". Many of the words used to describe websites have a basis in real property: the word 'site' itself is one, as are such expressions as 'home' pages, 'visiting' Websites, 'traveling' to a site and the like. This usage suggests that the trespass action might appropriately be applied to websites as well. That analogies to real property trespass can be made does not suggest, however, that they should be made. The fundamental issue is whether the treatment of websites as property makes sense in light of the justifications for the institution of property generally.

Thus, as trespass actions are stranded in the idea of protecting an owner's control over his property and as even the websites should be considered as a species of property, there is no reason for not allowing a cause of action for 'trespass to websites'.

Mens Rea
The next question that is of importance arises when a cracker has no intention to commit any further crimes. The question is 'whether such cracking is enough to constitute threats or annoyance? Under Indian law it has been clearly laid down in Smt. Mathri v. State of Punjab that for establishing the offense of criminal trespass it is not enough to merely show that the person entering upon the property of another had knowledge that his act would cause annoyance. The rule that a person must be presumed to intend the natural consequences of his act is not a binding rule, if any other intention can be shown. This interpretation may be problematic while dealing with crimes on the Internet.

Liability

There is no doubt as far as liability is concerned when a Cracker is caught. Now this liability can be of two types.
1. Civil Liability
2. Penal Liability

As like in the case of trespass, when just cracking is there by the cracker, it is of a civil nature but once the intention to cause harm or rather damage the system is proved, the liability becomes that of a penal nature.

Now it is not just criminal trespass, which can be done by cracking but cracking may also result in many other crimes which are mentioned in the Indian Penal Code, 1860. Like, if a cracker cracks an e-banking website and transfers money into his own account, this may constitute a crime under Sec.378 of the Penal Code, which in this case may also be termed as Cyber Theft. This kind of act is completely of a penal liability.

In R. v. Gold prestel systems provided it subscribers free e-mail facilities and access to its database. The accused - Gold and Schifreen cracked into its computer and were charged in England under the Forgery and Counterfeiting Act, 1981. They were convicted but the Court of Appeal and the House of Lords as well acquitted them as an instrument was necessary to commit the offence under the said Act, which had to be similar to other examples in the statutory definitions, which were physical objects.

For this, then the Law Commission in England recommended that cracking be made penal and proposed: -
* A broad offense that seeks to deter the general practice of hacking by imposing penalties of a moderate nature on all types of unauthorized access; and

* A narrower but more serious offense imposes much heavier penalties.

Similar considerations apply in our country also. The IT Act tries to achieve this by providing civil and penal consequences for cracking and other wrongful activities. The case concerning Sec.66 of the IT Act, 2000, in India was first lodged in Lucknow in February, 2001.

Interestingly, the victim of the first cyber crime was none other than a police employee. The FIR was lodged by junior engineer, police range, V K Chauhan, whose password for Internet access was hacked and 100 hours of connectivity time exhausted even before he could use it once. The case was registered under Sec.66 of the IT Act.

Interest in Hacking


The effectiveness of a judicial system is anchored by regulations which define every aspect of a system's functioning and primarily, its jurisdiction. A court must have jurisdiction, venue, and appropriate service of process in order to hear a case and deliver an effective judgment. Jurisdiction is the power of a court to hear and determine a case. Without jurisdiction, a court's judgment is futile and impotent. Such jurisdiction is essentially of two types, namely subject matter jurisdiction and personal jurisdiction , and these two must be conjunctively satisfied for a judgment to take effect. It is the presence of jurisdiction that ensures the power of enforcement to a court and in the absence of such power, the decree of a court, is, to say the least, which is of little or of no use. Moreover, only generally accepted principles of jurisdiction would ensures that courts abroad also enforce the orders of other judicial bodies.

The Cyber Crimes like cracking can be seen as multi-jurisdictional because of the ease which a user can access the website from anywhere in the world. It can even be viewed as 'a jurisdictional' in the sense that from the users' perspective as state and national borders are essentially transparent.

The Indian jurisprudence with regard to jurisdiction over the hacking is almost non-existent. In the first place, there has been very few cases or rather only one case regarding hacking, to the best of my knowledge, in India and then secondly, it is an emerging field and that too where the place of action for the dispute is very difficult to decide. But an interesting feature of the IT Act is that it is applicable to offenses and contraventions committed by any person not just in India but also outside India, as per sec.1(2) . This principle has been elaborated in sec.75 of the Act which provides that Indian Courts will have jurisdiction over acts committed outside India as well as over foreigners committing such acts, if the act amounts to an offence or contravention involving a computer, computer system or computer network located in India. Thus the determining factor is the location of computer, computer system or computer network that is involved in an act or transaction.

In India, the court would assume jurisdiction over a defendant, if even a part of the cause of action for the dispute arose within its jurisdiction. Now these may appear to be distinct and disparate points of view but when you get down to examining the essential ingredients that must be fulfilled in order to satisfy the requirements of these principles, there are several similarities between them which may allow the Indian Courts to assume jurisdiction.

First of all, to conclude I would like to state that there are lots and lots of fallacies regarding the term hacking. Even though people are not aware about it today but by the study of various samples and researches made, I have found that it is very rapidly expanding its scope and day by day more and more people are interested in it.

Again it has two aspects. It can help the society to a great extent but it may also prove to be otherwise. In such cases punishments must be proportionate and serve as a sufficient deterrent. As computer data often contain personal information a cracker can also infringe one's right to privacy guaranteed by Art.21 of the Constitution of India.

Cracking can also be taken as an offense under Indian Penal Code. For this there are two types of liabilities, i.e., 'civil' and 'penal'.

Then for deciding the applicability of jurisdiction of a case, the court faces a lot of problem, due to its insensitiveness to local constraints. So, even when inventions and discoveries had widened the scientific horizons, it has also posed new challenges for the legal world. This Information Technology has posed new problems in jurisprudence to which it is very difficult to give a concrete shape.

Thursday, 19 July 2007

reCaptcha... Protect Yourself from spam

pra...@gmail.com

Hidemail is a new technology from reCaptcha where in your email id is made hidden and untill and unless you solve a captcha, you are not reveled the email id of the person. Like you see in the case above. If you have to see my complete email ID, then you have to click on the ... and then solve the captcha and then only the email ID will be reveled.

External Links:
1. Recaptcha official website
2. mailHide technology