vbulletin 3rd party login authentication in VB.net

vbulletin authentication VB.net 2008

Page 1 of 1

7 Replies - 8645 Views - Last Post: 25 April 2010 - 02:45 AM Rate Topic: -----

#1 freakboy321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-December 09

vbulletin 3rd party login authentication in VB.net

Post icon  Posted 26 December 2009 - 03:11 AM

Hello,

I need some help on some coding for my new program I am coding using visual studio 2008, vb.net

I have a vbulletin forum and want my program users to be able to use their same usernames and passwords they do to login my vbulletin forum. My program is done except for the user authentication. I have searched and googled for weeks now, here is what I know:

• vbulletin 3.8.4 uses, md5(md5($password) . $salt)

• I know how to get the Salt and stored hash from the mysql "user" table.

• I know how to connect to my database without any issues.


I used this code I found here and just modified 3 lines so I could try to get it to work. The code works fine for md5 + salt but as you know I need it to do this: md5(md5($password) . $salt)

Imports System
Imports System.Security.Cryptography
Imports System.Text

Public Class Form1

	Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

	End Sub



	Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

		Dim strText As String = TextBox2.Text
		Dim salt As String = TextBox3.Text


		Dim bytHashedData As Byte()
		Dim encoder As New UTF8Encoding()
		Dim md5Hasher As New MD5CryptoServiceProvider

		' Get Bytes for "password"
		Dim passwordBytes As Byte() = encoder.GetBytes(strText)

		' Get Bytes for "salt"
		Dim saltBytes As Byte() = encoder.GetBytes(salt)

		' Creat new Array to store both "password" and "salt" bytes
		Dim passwordAndSaltBytes As Byte() = _
		New Byte(passwordBytes.Length + saltBytes.Length - 1) {}

		' Store "password" bytes
		For i As Integer = 0 To passwordBytes.Length - 1
			passwordAndSaltBytes(i) = passwordBytes(i)
		Next

		' Append "salt" bytes
		For i As Integer = 0 To saltBytes.Length - 1
			passwordAndSaltBytes(i + passwordBytes.Length) = saltBytes(i)
		Next

		' Compute hash value for "password" and "salt" bytes
		bytHashedData = md5Hasher.ComputeHash(passwordAndSaltBytes)

		' Convert result into a base64-encoded string.
		Dim hashValue As String
		hashValue = Convert.ToBase64String(bytHashedData)

		TextBox4.Text = (hashValue.ToString)




	End Sub

End Class

 



Can anyone help me get this code to do md5(md5($password) . $salt) ? Here is an example of what my hashes have to look like: (32 chrs long) 6dd6c36f92efe965366f39c422cecf2e

TextBox1.Text, is for the username (not needed for now)
TextBox2.Text, is for the users password
TextBox3.Text, is for the salt
TextBox4.Text, is the hash output


After I can do this I will be able to code my program to retrieve the users salt and compare the hash to the one stored in my mysql database.

Thanks in advance,

FB

This post has been edited by freakboy321: 26 December 2009 - 03:18 AM


Is This A Good Question/Topic? 0
  • +

Replies To: vbulletin 3rd party login authentication in VB.net

#2 freakboy321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-December 09

Re: vbulletin 3rd party login authentication in VB.net

Posted 31 December 2009 - 08:16 AM

Is this ok if I bump this thread?

Thanks guys for looking, I need to complete this project soon.

All the best,
FB
Was This Post Helpful? 0
  • +
  • -

#3 Ändrew  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 25
  • View blog
  • Posts: 312
  • Joined: 21-April 08

Re: vbulletin 3rd party login authentication in VB.net

Posted 31 December 2009 - 02:46 PM

So you can get the salt? and the password in MD5 is easy. Why if you can do that why not just + the strings together, and just MD5 that as thats what the code says to do :)

yourmd5hashfunc(yourmd5hashfunc(password) + salt)



One last question whats a salt?

Ändrew
Was This Post Helpful? 0
  • +
  • -

#4 Sethro117  Icon User is offline

  • Still the sexiest mofo.
  • member icon

Reputation: 236
  • View blog
  • Posts: 2,378
  • Joined: 14-January 09

Re: vbulletin 3rd party login authentication in VB.net

Posted 31 December 2009 - 06:02 PM

Protects from brute force.
Was This Post Helpful? 0
  • +
  • -

#5 Ändrew  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 25
  • View blog
  • Posts: 312
  • Joined: 21-April 08

Re: vbulletin 3rd party login authentication in VB.net

Posted 31 December 2009 - 10:09 PM

MIG, on 1 Jan, 2010 - 4:07 AM, said:

Well mabey not brute force but rainbow table attacks.

Friend really wanted to put that in.
Was This Post Helpful? 0
  • +
  • -

#6 freakboy321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-December 09

Re: vbulletin 3rd party login authentication in VB.net

Posted 17 February 2010 - 12:03 AM

View PostÄndrew, on 31 December 2009 - 01:46 PM, said:

So you can get the salt? and the password in MD5 is easy. Why if you can do that why not just + the strings together, and just MD5 that as thats what the code says to do :)

yourmd5hashfunc(yourmd5hashfunc(password) + salt)



One last question whats a salt?

Ändrew


So can you help me out? or do you want me to pay you? I need this done ASAp! someone please help me
Was This Post Helpful? 0
  • +
  • -

#7 freakboy321  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-December 09

Re: vbulletin 3rd party login authentication in VB.net

Posted 20 February 2010 - 12:30 AM

I have completed this project, thanks guys for trying to help me :)
Was This Post Helpful? 0
  • +
  • -

#8 Guest_svencom*


Reputation:

Re: vbulletin 3rd party login authentication in VB.net

Posted 25 April 2010 - 02:45 AM

good work can you share the full codes or the part off the project
thanks
email me info@grosthuizen-community.nl
Was This Post Helpful? 0

Page 1 of 1