adb

Your Ad Here

Cookie Editing using java script Hacking Underground

First, let me introduce these two terms: JavaScript and cookie. JavaScript is a scripting language used to enhance web pages, while cookie is a simple text file that the web server sets in the client’s computer so as recognize the user. JavaScript is a simple yet powerful programming environment for web pages.


Since the study of JavaScript is itself a large topic, l can’t explain everything over here. Now let us move to our main topic: cookies i.e. editing using JavaScript.


The Document Object Model specifies document. Cookies can be modified or accessed using the methods: void () and alert ().


How to view cookies set by a site:


This is simply done by putting the following text before the URL in the address bar.


JavaScript: alert (document.cookie); Website address


This will display the status of cookies set by the site.


Now, l will take an example.


Suppose, l have signed in to the site


http: www.dipakg.com.np

When l sign in, it sets a cookie as below (only for demonstration):


PHPSESSID O1A3CDFG ALLOWED_ADMIN = No


This can be viewed using the command I have shown previously.

Think of this cookie. Look for ALLOWED_ADMIN = NO.
lf it was AllOWED_ADMIN =YES, we could get access to the site with the privileges of the admin of the site ( for supposition ) . So, let us now move forward to see cookie editing.

How to edit cookies using JavaScript;


The void () method is used to edit cookies. The following text is kept before the URL in the address bar for editing cookies:

JavaScript: void (document.cookie =” Data field =Value'');

Now, we have successfully modified the concerned cookie / s to get privileges of the admin.


What l just wants to demonstrate is that such cookies can be modified using JavaScript.

Think what would happen if any malicious user modifies cookies for unauthorized access. He could do everything he wants. In the above tutorial, I've just shown simple cookie manipulation but there are thousands of other methods provided by JavaScript . Probably, you have now understood the value of JavaScript. Learn it, hack it and enjoy it...

Comments :

0 comments to “Cookie Editing using java script Hacking Underground”