If you have not read part 1 and part 2, I strongly recommend you read both my articles for learning more about Website Hacking....
Basic Information About Website Hacking Part 1
How to find a vulnerable Website?? Part 2
Basic XSS Tutorial For Website Hacking Part 3
You might be interested in some of our other articles:
- RAT(Remote Administration Tool) Guide
- Tabnabbing: Beware of New Type of Phishing Attack
- Facebook, Hotmail, Gmail Passowrd hacking through Winspy Keylogger
- Remote Password Hacking Software - Sniperspy keylogger
- How To Hack Password Through Mobile
Cross Site Request Forgery Website Hacking Tutorial
What is it?CSRF attack we can to send a fake request from the browser of the user, and thus enter to site with the permission of the user and maintain interact with the site like the script is the user himself.
CSRF is commonly used to confirm something without the users the awareness, so for example, lets say Bob has an account on webbhosting.com, and Josh wants this account completely removed from the DB, this can be done by the user himself, but others can't remove his account except the ones with appropriate permissions. So lets say the link to remove an account was:
Code:
This can be included in a IMG file, such as:
Code:
You can trick people to go to the link by saying its pictures, a download, etc, etc.
I would also recommend that you encode the action that is being performed via:
meyerweb.com
Prevention:
When you get links sent by people you don't know very well, just use the view-source: function in FF. Another prevention is to add a token via:
Code:
You can also use this to force the administrator to spit logs on the server (in this case a SQL backup) most of these aren't chmod'd, robots.txt'd, so within a few days you can use this to locate the database:
Code:
Code:
etc
I'd recommend using base64/URL encode usage using a ?refer / ?redirect / XSS vulnerability on their site, you can use this to redirect to the dumpfile that will spit the backup log on the site, once clicked by the administrator you're goal is reached.
Example :
A great example of using on CSRF, is bank site after the user connects to site created cookies on his computer(Role of the cookies is save the data).
From this moment any action performed from the user browser approved by the site system. Here comes in the AJAX technology, with the AJAX we can to send request(packet request) performed by the browser itself.
This means all the cookies and sessions of the user sent with the request(Unlike server-side language) So if there is a form that is used on bank site to money transfer.
We can send POST request to a form using AJAX and the request is approved by the site system, because all the cookies of the user browser sent with the AJAX request
Example for CSRF exploit
html:
Code:
php:
Code:
What's the risk here?, as you can see the php script check if it's valid cookies and without additional filtering operation approved the transfer.
This means that if we have the cookies we need only to send fake request to system with the cookies of the user and the system is approved the transfer.
AJAX:
Code:
As already explained, requests sent AJAX are sent from the browser itself so we do not have to worry about to get the cookies of the user.
So even though we sent only the POST in the request sent to the server you'll see something like this:
Code:
Once returned from the server 200(request was received successfully) transferred $100 from the user account to account number 0123456789.
And so the CSRF attack works........
Limitations :
Several things have to happen for cross-site request forgery to succeed:
- The attacker must target either a site that doesn't check the referrer header (which is common) or a victim with a browser or plugin bug that allows referrer spoofing (which is rare).
- The attacker must find a form submission at the target site, or a URL that has side effects, that does something (e.g., transfers money, or changes the victim's e-mail address or password).
- The attacker must determine the right values for all the form's or URL's inputs; if any of them are required to be secret authentication values or IDs that the attacker can't guess, the attack will fail.
- The attacker must lure the victim to a Web page with malicious code while the victim is logged in to the target site.
So friends, I hope you will like this
Cross Site Request Forgery Tutorial For Website Hacking....
If you have any problem in above Website hacking Using Cross Site Request Forgery Tutorial, please mention it in comments section.
Enjoy Website Hacking ........
Filed Under: Website Hacking
Click Here To Download Winspy Keylogger