Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
[SMF] Imported User Password Hack Details »»
[SMF] Imported User Password Hack
Version: 0.11, by muf muf is offline
Developer Last Online: Apr 2021 Show Printable Version Email this Page

Version: 3.5.0 Rating:
Released: 09-29-2005 Last Update: Never Installs: 12
Template Edits
Code Changes  
No support by the author.

Resource : [SMF] Imported User Password Hack
Type : Source Code Modification
Version : 0.1
Author : mf @ http://www.videngineering.net

Description : After SMF import, no need to reset password!

vBulletin impex hashes all imported passwords with salt; md5(old_password . salt). For most forums, that means md5(md5(password) . salt). For SMF, however, that means md5(md5_hmac(password, username) . salt). Since vB login checks for md5(md5(password) . salt), that means an imported SMF user will have to have his/her password reset. That, or you install this little hack.

Tested : Yes, tested on 3.5.0 Stable (will not work on vB 2.x or 3.0.x)

Screenshot : None, obviously

Notes : My first hack :speechless:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 11-28-2005, 01:57 PM
muf muf is offline
 
Join Date: Sep 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Floris
He means it doesn't hurt to have users change their password anyway, despite the layer of security, passwords should be rotated more frequently to avoid abuse.
And that is why I said that if you do not require the password to be different (rotated) from the original password, users will simply use the original password. Also, security experts are returning from the old notion that frequent password rotation is secure; many companies have practically experienced that password rotation simply means users will start using weaker and weaker passwords, and when they are forced to use strong passwords, they will write it down on post-it notes and such in order to keep themselves from forgetting it. It is better to let users come up with one good password, stick with it, and let nobody intercept it, than it is to keep changing passwords until the whole meaning of the word password is lost. That said, the number of passwords I use (strong as well as weak) can be counted on one hand. But then again, I don't rely on passwords for most of my security.
Reply With Quote
  #23  
Old 02-04-2006, 05:44 PM
Parham Parham is offline
 
Join Date: Mar 2005
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks For This Great Modification ! [ Installed ! ]
Reply With Quote
  #24  
Old 02-15-2006, 06:39 AM
DeMiNe0 DeMiNe0 is offline
 
Join Date: Jun 2004
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this doesn't work on 3.5.3
Reply With Quote
  #25  
Old 03-02-2006, 10:46 PM
envoys envoys is offline
 
Join Date: Nov 2005
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did not work for me on 3.5.4... 40,000 users have to reset passwords now.
Reply With Quote
  #26  
Old 04-01-2006, 05:04 AM
bouncybounce bouncybounce is offline
 
Join Date: Mar 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I downloaded version 3.5.0 and tried this with a fresh install and it didn't work.

The import went OK, but users cannot insert their old password. I did notice that some of the code that the author of this mod mentioed arte actually slightly different in the version 3.5.0, that I downloaded. Perhaps some settings have been changed since the author originally wrote this mod?

Anyway, it doesn't work anymore. Shame. :tired:
Reply With Quote
  #27  
Old 04-08-2006, 10:34 AM
muf muf is offline
 
Join Date: Sep 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bouncybounce
I downloaded version 3.5.0 and tried this with a fresh install and it didn't work.

The import went OK, but users cannot insert their old password. I did notice that some of the code that the author of this mod mentioed arte actually slightly different in the version 3.5.0, that I downloaded. Perhaps some settings have been changed since the author originally wrote this mod?

Anyway, it doesn't work anymore. Shame. :tired:
I'll post an updated version once I upgrade to the latest 3.5.x. The strange thing still is I have the thing running on my 3.5.0 (installed as per my own instructions), and it just works. So unless anyone could pass me any type of usable debug info I won't be able to make it magically work for everyone else. A possibility is also that the impex password hashing has changed (for whatever reason). To reproduce my SMF->vB import process (which I performed before direct SMF->vB3.5 imports were possible), first use ImpEx to go from SMF to vB 3.0.7, then use the upgrade feature to go from 3.0.x to 3.5.x. See if that helps. Other than that, big shame it isn't working guys! My sincere apologies but I have no idea as to the source of the problem. Maybe I'm just being a bit of a n00b (after all this *is* my first hack).
Reply With Quote
  #28  
Old 04-11-2006, 05:13 AM
bouncybounce bouncybounce is offline
 
Join Date: Mar 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

I actually found that a few of the lines in the vBulletin code were slightly different from the ones posted in your instructions. I wonder if there has been some slight ammendments done even to the 3.5.0 version?

Either that or I got the instructions wrong, but I don't think so. I can't remember which template it was now, but it was towards the end of the process.
Reply With Quote
  #29  
Old 02-10-2007, 01:48 AM
prophecydude prophecydude is offline
 
Join Date: Jan 2007
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So which version does this ACTUALLY work on? I am converting a SMF 1.1.1 forum to 3.6.4, and I need to know if this will work. I don't mind trying an older copy of vBulletin and upgrading afterwards.
Reply With Quote
  #30  
Old 02-27-2008, 01:58 AM
cheesegrits's Avatar
cheesegrits cheesegrits is offline
 
Join Date: May 2006
Posts: 500
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm importing SMF 1.1.4 to vB 3.7b5, and it seems that SMF's password hashing has changed since this mod was released. It now uses sha1() instead of md5_hmac().

So I had a go at it, and got vB authentication working without having to edit any files (except one line in config.php). All it needs is:

1) In your ./includes/config.php, insert this line:

PHP Code:
define('DISABLE_PASSWORD_CLEARING'1); 
NOTE - this forces vB to send a cleartext password from the browser to the server when you login. This is a potential security risk, albeit a very unlikely one to be exploited - if anyone has compromised your systems to the point that they can pick this information off the wire, you have bigger problems than exposing some passwords! But regardless, you should really treat this as a transitional hack, and give your users something like a month to change their passwords, before you disable this stuff.

2) Create a plugin on the 'login_failure_verify_password' hook, and paste this PHP into it:

PHP Code:
if ($vbulletin->GPC['vb_login_password'])
{
    
$hack_username preg_replace('#^imported_#','',$vbulletin->GPC['vb_login_username']);
    
$sha_passwd sha1(strtolower($hack_username) . unhtmlspecialchars(stripslashes($vbulletin->GPC['vb_login_password'])));
    
$vb_passwd md5($sha_passwd $vbulletin->userinfo['salt']);
    if (
$vbulletin->userinfo['password'] == $vb_passwd)
    {
        unset(
$return_value);
    }

And that's it.

The way this works is, if the regular vB password verification fails (using the md5 version of the password, which will fail if they still have their impex'ed SMF password set), the plugin is called. Because we set DISABLE_PASSWORD_CLEARING in config.php, vB is now including the clear text password from the browser during login. So the plugin can take that cleartext password, and hash it using SMF's method, and see if that matches the stored hash. If it does, then they have a valid SMF style password.

Note that the code above also works for any usernames which have been changed from 'joeblow' to 'imported_joeblow' due to username conflicts on the impex

Although I'm using vB 3.7b5, I think this method should work for 3.6 as well. I have no idea which versions of SMF this will work for - all I know is, it works for the SMF v1.1.4 users I'm importing.

I may add automatic changing of the password to a native vB password the first time an SMF user logs in, and release this as a mod. But if not ... maybe the above will help someone out.

-- hugh
Reply With Quote
  #31  
Old 12-18-2009, 07:04 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

would this work for an ikonboard 3.0 import as im having the same issue with passwords - thanks
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04545 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete