Sinisterly
Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Hacking (https://sinister.ly/Forum-Hacking)
+--- Forum: Tutorials (https://sinister.ly/Forum-Tutorials)
+--- Thread: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] (/Thread-Guide-On-Hack-Through-Cross-Site-Request-Forgery-CSRF-Tutorial)

Pages: 1 2


Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - Shining White - 05-02-2012

Guide On Cross-Site Request Forgery (CSRF) - by Shining White

Hello Good Day to all , Since we have Some famous web hacking tut SQLi , XSS , LFI , RFi on HC , I decided to Post about CSRF known as Cross-Site Request Forgery


Okay lets Start with Introduction ,

Cross-Site Request Forgery (CSRF ) known as C-Surf , Session Riding , XSRF or one-click attack

of-course as Many of you know CSRF is not the XSS (Cross-Site Scripting)
If you are Searching about XSS - Please Read the Thread Written by 1234HotMaster

For the who don't know in XSRF / CSRF When the Victim Click the Attackers link Victim Send Attacker Request to the web server without any knowlegdge aout it (if not understand not worry , read other part :whistle: )

There is a little misunderstand regarding a CSRF
### If Site is not Vulenerble to the XSS then it not Vulns to the CSRF

Probablly Wrong CSRF Not Require any XSS Vulnerability it (XSS Vulnerability ) Just Make XSRF Vulnerable Easier ,

There is only Requirment for the CSRF is , VIctim / User must loging to the Target Site ,
Actually i can't say to the Web Site it should be Web Application
can't explain more about the Differences of Web App and Web Site Now,

Having strong passwords is always a good idea, but CSRF bypasses that part of the protection, because works once the user has logged themself into the site using their strong password.
look the below lines -- >


you must find a form submission at the target site, or a URL that has side effects, that making something , Like , Ban Member , Money Transfer etc

you must find 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.
like HC - Session ID is Encoded so Attacker can't guess the Values Each time ,


Lets take a Sample site - www.hackcommunity.com
When Illusion (Administrator) Log in to the HackCommunity.com Web Site is provide Session ID to his Browser Cookies , it will Stand till he log out from the HC , After log out
Session is Expiring
In Mean While All request from His browser take as His Request from Site, because of Session ID ,
If the browser has valid session keys, it means all the request sent by this browser is valid an belong to this user


Now Attacker Send or Post a Malasious http Link to the Administrator TO Click , Thats why we call it One-Click-Attack

Administrator session id is Stored, so this http requset would be recognised as a request sent by this user and website would act according to this request.

So lets say Attacker Need to Ban Shining White From the HC ,
and he found Banning Link of the Admin is

Code:
www.hackcommunity.com/userban.php?id=1337
it just a sample , for Ban it as also ban period , Wink and

Send a Link or Attacker can add IMG tag on the link , because Browser take img tag as Link source

here

Code:
<img src="www.hackcommunity.com/userban.php?id=1337">

well Viola ! Shining Whity is Banned .. ,

Well talking about Site using Forms ,

well take sample www.paypal.com
there is Form to send money to the other person , When it Filled the Data is doing through the URL

Let think This this think going through the Link

User ID -
Amount Need to Send -
Receiver ID -


and the you found the link is

Code:
http://www.paypal.com/transfermoeny? userid=______&amount=______& Receiver =_______

So you know the format of the form so you will send the link in an image tag to the user

Code:
<img src=\"http://www.paypal.com/transfermoeny? userid=Victim&amount=9999223& Receiver =Shining">

What are the Vulnerable to XSRF ???

Well as i mentioned Web Application are the Vulnerable to the Attack
Blog
Forum
Hosting Site
Money Trasfer sites
etc


Okay Saying in simple word , CSRF mean Misredirection Through the Victims Session ID
i guess you know about the misdirection theory on Social Engineering , if not post here and request a thread ,


==========================================

The CSRF Cross-Site Request Forgery Tutorial by Shining White for Hackcommunity.com -
=============================================================
Please be Kind to Mention it before the Leech or post on another site , (Please don't post this same thread on HC again :lolSmilealso i spend much time to read the lot of Sites and take collection information , So i can't give t credit to anyone since this is originnaly written by me for HC ,



RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - HrDe - 05-03-2012

Coolllllllllllllllllllll nice share by a Legend !!!!!!!!!!!


RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - #Unkn0wn - 05-03-2012

Nice share machan Smile Keep it up


RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - Shining White - 05-03-2012

(05-03-2012, 10:04 AM)HrDe Wrote: Coolllllllllllllllllllll nice share by a Legend !!!!!!!!!!!


(05-03-2012, 10:07 AM)#Unkn0wn Wrote: Nice share machan Smile Keep it up

I thought no one care about the CSRF , Actually I bet most users now don't even know what CSRF can do or what is it ,
glad something if something found useful :wub:


RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - HrDe - 05-18-2012

Now this thread list on "Thread Market" and also on top of my write thread http://www.hackcommunity.com/Thread-Find-Vulnerability-in-Joomla-Website-By-BackTrack

Thanks for ur excellent work done.


RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - d3v0id - 11-28-2012

Nice work dude ,Got some extra information ,Are u frm TN-Tamil Nadu


RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - Shining White - 11-28-2012

(11-28-2012, 11:22 AM)d3v0id Wrote: Nice work dude ,Got some extra information ,Are u frm TN-Tamil Nadu

Hey thanks Smile , and nah not from Tamil Nadu , Smile

PS : just like to know did you think like that ? Biggrin


RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - FunKx - 11-28-2012

I find this as explenation thread, rather than tutorial. You give knowledge, but you don't teach the actions. Anyway, good thread.


RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - d3v0id - 11-28-2012

#unk0wn posted that "Nice share machan"
Normally in TN ,they use to call friends machan ,so i thought of it


RE: Guide On Hack Through Cross-Site Request Forgery (CSRF) [Tutorial] - Shining White - 11-28-2012

(11-28-2012, 12:07 PM)d3v0id Wrote: #unk0wn posted that "Nice share machan"
Normally in TN ,they use to call friends machan ,so i thought of it

Machn = Cousin in tamil i guess ? , also it is using in some Asian country's
(like we saying "Nice Share Bro")
are you from TN ?