RE: A beginner's guide to XSRF 10-11-2013, 10:44 AM
#6
(10-11-2013, 07:26 AM)Starfall Wrote: You're welcome.
On the subject of anti-XSRF tokens I actually took a look at MyBB's implementation and found a bit of an interesting thing.
Spoiler:
If I'm not mistaken, loginkey, salt and regdate never change, so if you can get someone's postcode once, you have it forever.PHP Code:/* functions.php, line nums provided */ 479 function generate_post_check() 480 { 481 global $mybb, $session; 482 if($mybb->user['uid']) 483 { 484 return md5($mybb->user['loginkey'].$mybb->user['salt'].$mybb->user['regdate']); 485 } 486 // Guests get a special string 487 else 488 { 489 return md5($session->useragent.$mybb->config['database']['username'].$mybb->settings['internal']['encryption_key']); 490 } 491 }
So, in theory, I could pull someone's post and use it to create an XSRF that I wouldn't continuously have to have the victim execute?
Damn, this sounds like a project.



![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)