elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


+  Foro de elhacker.net
|-+  Programación
| |-+  Ingeniería Inversa (Moderadores: karmany, .:UND3R:., MCKSys Argentina)
| | |-+  Alguien que me de un indicio sobre este tema! Exe + DLL
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Alguien que me de un indicio sobre este tema! Exe + DLL  (Leído 2,651 veces)
Sir-Kero

Desconectado Desconectado

Mensajes: 3



Ver Perfil
Alguien que me de un indicio sobre este tema! Exe + DLL
« en: 24 Julio 2014, 02:01 am »

Buenas noches a todos, agradeceria mucho que alguien me de un indicio de cual podria ser la forma en que se genera esta clave--> LicenseKey:

 QXXV8nCdmL92ENG7d0txlLfb24GhsUMII/V7FqV1BdlucA2KiEe9+wras7NEv0wBD+cZpzLEc7r3qVU/vCI9zrwvqqsv7ql1fQ+kWIufXXW9LjnVvxAxJQ==

Se aloja dentro de una base de datos al lado de estas otras 2 claves:

LD: d4Jn3Vh8LnYifxGecX0STxBeMdO9KKNH
MD: d4Jn3Vh8LnblWQrB2BVUpb5ZrzhSXgHl

Las 3 se generan cuando se instala un trial y te dan 30 dias de uso, segun he podido comprobar las 2 ultimas claves contiene fechas, la LD parece ser la fecha actual cuando se instala el programa y la ultima podria ser la fecha final...son solo especulaciones de mi parte ya que no conozco nada de criptografia.

Es un programa en VB NET que se valida con una DLL, si alguien tiene una idea de como descifrar la clave, le agardeceria me de luces al respecto, o si conocen de algun material para estudiar seria tambien de agradecer.

Con Ilspy he visto este codigo dentro de la DLL: Lo coloco por si da alguna pista mas-->

SECURITY INFO:

Public Class SecurityInfo
      <DebuggerNonUserCode()>
      Public Sub New()
      End Sub

      Public Shared Function Encrypt(sUnlock As String, PlainText As String) As String
         Dim result As String
         Try
            Dim flag As Boolean = Operators.CompareString(sUnlock, "BJ3N73LI*JVGDBXTR4", False) = 0
            If flag Then
               result = Convert.ToBase64String(SecurityInfo.Encrypt(PlainText, New DESCryptoServiceProvider() With { .Key = Encoding.ASCII.GetBytes("DBxtr4N*"), .IV = Encoding.ASCII.GetBytes("DBxtr4N*") }))
            Else
               result = ""
            End If
         Catch expr_61 As Exception
            ProjectData.SetProjectError(expr_61)
            result = ""
            ProjectData.ClearProjectError()
         End Try
         Return result
      End Function

      Public Shared Function Decrypt(sUnlock As String, PlainText As String) As String
         Dim result As String
         Try
            Dim flag As Boolean = Operators.CompareString(sUnlock, "BJ3N73LI*JVGDBXTR4", False) = 0
            If flag Then
               Dim dESCryptoServiceProvider As DESCryptoServiceProvider = New DESCryptoServiceProvider()
               dESCryptoServiceProvider.Key = Encoding.ASCII.GetBytes("DBxtr4N*")
               dESCryptoServiceProvider.IV = Encoding.ASCII.GetBytes("DBxtr4N*")
               Dim cypherText As Byte() = Convert.FromBase64String(PlainText)
               result = SecurityInfo.Decrypt(cypherText, dESCryptoServiceProvider)
            Else
               result = ""
            End If
         Catch expr_65 As Exception
            ProjectData.SetProjectError(expr_65)
            result = ""
            ProjectData.ClearProjectError()
         End Try
         Return result
      End Function

      Private Shared Function Encrypt(PlainText As String, key As SymmetricAlgorithm) As Byte()
         Dim memoryStream As MemoryStream = New MemoryStream()
         Dim cryptoStream As CryptoStream = New CryptoStream(memoryStream, key.CreateEncryptor(), CryptoStreamMode.Write)
         Dim streamWriter As StreamWriter = New StreamWriter(cryptoStream, Encoding.Unicode)
         streamWriter.WriteLine(PlainText)
         streamWriter.Close()
         cryptoStream.Close()
         Dim result As Byte() = memoryStream.ToArray()
         memoryStream.Close()
         Return result
      End Function

      Private Shared Function Decrypt(CypherText As Byte(), key As SymmetricAlgorithm) As String
         Dim memoryStream As MemoryStream = New MemoryStream(CypherText)
         Dim cryptoStream As CryptoStream = New CryptoStream(memoryStream, key.CreateDecryptor(), CryptoStreamMode.Read)
         Dim streamReader As StreamReader = New StreamReader(cryptoStream, Encoding.Unicode)
         Dim result As String = streamReader.ReadLine()
         streamReader.Close()
         cryptoStream.Close()
         memoryStream.Close()
         Return result
      End Function
   End Class
End Namespace

SECURITY KEY:

Namespace DBxtraNET
   Public Class SecurityKey
      Private sCompany As String

      Private nDesigner As Integer

      Private nViewer As Integer

      Private nVersion As Integer

      Private nJobs As Integer

      Private dPD As DateTime

      Private dED As DateTime

      Private dMD As DateTime

      Private sLicenseStringIn As String

      Private sSecurityKey As String

      Private bLicenseValid As Boolean

      Public ReadOnly Property LicenseValid() As Boolean
         Get
            Return Me.bLicenseValid
         End Get
      End Property

      Public ReadOnly Property LicenseDecrypt() As String
         Get
            Return SecurityInfo.Decrypt("BJ3N73LI*JVGDBXTR4", Me.sLicenseStringIn)
         End Get
      End Property

      Public Property Company() As String
         Get
            Return Me.sCompany
         End Get
         Set(value As String)
            Me.sCompany = value
         End Set
      End Property

      Public ReadOnly Property CompanyKey() As String
         Get
            Dim flag As Boolean = Me.sCompany.Length > 0
            ' The following expression was wrapped in a checked-statement
            Dim result As String
            If flag Then
               Dim num As Integer = 0
               Dim arg_29_0 As Integer = 0
               Dim num2 As Integer = Me.sCompany.Length - 1
               Dim num3 As Integer = arg_29_0
               While True
                  Dim arg_4C_0 As Integer = num3
                  Dim num4 As Integer = num2
                  If arg_4C_0 > num4 Then
                     Exit While
                  End If
                  num += Strings.Asc(Me.sCompany(num3))
                  num3 += 1
               End While
               Dim text As String = Conversions.ToString(Me.sCompany(0)) + Conversion.Hex(num)
               result = text
            Else
               result = ""
            End If
            Return result
         End Get
      End Property

      Public ReadOnly Property DateKey() As String
         Get
            Dim value As String = Me.dPD.ToString("yyyyMMdd")
            Dim number As Integer = Convert.ToInt32(Conversions.ToDecimal(value))
            Dim value2 As String = Me.dED.ToString("yyyyMMdd")
            Dim number2 As Integer = Convert.ToInt32(Conversions.ToDecimal(value2))
            Dim value3 As String = Me.dMD.ToString("yyyyMMdd")
            Dim number3 As Integer = Convert.ToInt32(Conversions.ToDecimal(value3))
            Return String.Concat(New String()() { Conversion.Hex(number), ".", Conversion.Hex(number2), ".", Conversion.Hex(number3) })
         End Get
      End Property

      Public ReadOnly Property LicenseString() As String
         Get
            Dim flag As Boolean = Operators.CompareString(SecurityInfo.Decrypt("BJ3N73LI*JVGDBXTR4", Me.sSecurityKey), "BJJDEBEXTR4JVG", False) = 0
            Dim result As String
            If flag Then
               Dim plainText As String = String.Concat(New String()() { Conversions.ToString(AddressOf Me.Designers), "|", AddressOf Me.CompanyKey, "|", Conversions.ToString(AddressOf Me.Viewers), "|", AddressOf Me.DateKey, "|", Conversions.ToString(AddressOf Me.Version), ".", Conversions.ToString(AddressOf Me.Jobs) })
               result = SecurityInfo.Encrypt("BJ3N73LI*JVGDBXTR4", plainText)
            Else
               result = ""
            End If
            Return result
         End Get
      End Property

      Public Property Designers() As Integer
         Get
            Return Me.nDesigner
         End Get
         Set(value As Integer)
            Me.nDesigner = value
         End Set
      End Property

      Public Property Viewers() As Integer
         Get
            Return Me.nViewer
         End Get
         Set(value As Integer)
            Me.nViewer = value
         End Set
      End Property

      Public Property Version() As Integer
         Get
            Return Me.nVersion
         End Get
         Set(value As Integer)
            Me.nVersion = value
         End Set
      End Property

      Public Property Jobs() As Integer
         Get
            Return Me.nJobs
         End Get
         Set(value As Integer)
            Me.nJobs = value
         End Set
      End Property

      Public Property PD() As DateTime
         Get
            Return Me.dPD
         End Get
         Set(value As DateTime)
            Me.dPD = value
         End Set
      End Property

      Public Property ED() As DateTime
         Get
            Return Me.dED
         End Get
         Set(value As DateTime)
            Me.dED = value
         End Set
      End Property

      Public Property MD() As DateTime
         Get
            Return Me.dMD
         End Get
         Set(value As DateTime)
            Me.dMD = value
         End Set
      End Property

      Public Sub New(_sSecurityKey As String)
         Me.sLicenseStringIn = ""
         Me.sSecurityKey = ""
         Me.bLicenseValid = False
         Me.sSecurityKey = _sSecurityKey
         Dim flag As Boolean = Operators.CompareString(SecurityInfo.Decrypt("BJ3N73LI*JVGDBXTR4", Me.sSecurityKey), "BJJDEBEXTR4JVG", False) = 0
         If flag Then
            Me.sCompany = ""
            Me.nDesigner = 0
            Me.nViewer = 0
            Me.nVersion = 0
            Me.nJobs = 0
            Me.dPD = DateAndTime.Now
            Me.dED = DateAndTime.Now
            Me.dMD = DateAndTime.Now
         End If
      End Sub

      Public Sub New(_sCompany As String, sLK As String, _sSecurityKey As String)
         Me.sLicenseStringIn = ""
         Me.sSecurityKey = ""
         Me.bLicenseValid = False
         Me.sSecurityKey = _sSecurityKey
         Dim flag As Boolean = Operators.CompareString(SecurityInfo.Decrypt("BJ3N73LI*JVGDBXTR4", Me.sSecurityKey), "BJJDEBEXTR4JVG", False) = 0
         If flag Then
            Me.sCompany = _sCompany
            Me.nDesigner = 0
            Me.nViewer = 0
            Me.nVersion = 0
            Me.nJobs = 0
            Me.dPD = DateAndTime.Now
            Me.dED = DateAndTime.Now
            Me.dMD = DateAndTime.Now
            Me.sLicenseStringIn = sLK
         End If
      End Sub

      Public Sub New(_sCompany As String, _nDesigner As Integer, _nViewer As Integer, _nVersion As Integer, _dPD As DateTime, _dED As DateTime, _dMD As DateTime, sSecurityKey As String, Optional _nJobs As Integer=5)
         Me.sLicenseStringIn = ""
         Me.sSecurityKey = ""
         Me.bLicenseValid = False
         Dim flag As Boolean = Operators.CompareString(SecurityInfo.Decrypt("BJ3N73LI*JVGDBXTR4", sSecurityKey), "BJJDEBEXTR4JVG", False) = 0
         If flag Then
            Me.sCompany = _sCompany
            Me.nDesigner = _nDesigner
            Me.nViewer = _nViewer
            Me.nVersion = _nVersion
            Me.nJobs = _nJobs
            Me.dPD = _dPD
            Me.dED = _dED
            Me.dMD = _dMD
         End If
      End Sub

      Public Function IsLicenseValid() As Boolean
         ' The following expression was wrapped in a checked-statement
         Dim num As Integer = AddressOf Me.LicenseDecrypt.IndexOf("|") + 1
         Dim num2 As Integer = AddressOf Me.LicenseDecrypt.IndexOf("|", num)
         AddressOf Me.LicenseDecrypt.Substring(num, num2 - num)
         Return Operators.CompareString(AddressOf Me.LicenseDecrypt.Substring(num, num2 - num), AddressOf Me.CompanyKey, False) = 0
      End Function

      Public Sub LoadFromLicenseKey()
         ' The following expression was wrapped in a checked-statement
         Try
            Dim num As Integer = AddressOf Me.LicenseDecrypt.IndexOf("|")
            Dim num2 As Integer = AddressOf Me.LicenseDecrypt.IndexOf("|", num + 1)
            Dim num3 As Integer = AddressOf Me.LicenseDecrypt.IndexOf("|", num2 + 1)
            Dim num4 As Integer = AddressOf Me.LicenseDecrypt.LastIndexOf("|")
            AddressOf Me.Designers = Conversions.ToInteger(AddressOf Me.LicenseDecrypt.Substring(0, num))
            AddressOf Me.Viewers = Conversions.ToInteger(AddressOf Me.LicenseDecrypt.Substring(num2 + 1, num3 - 1 - num2))
            Dim text As String = AddressOf Me.LicenseDecrypt.Substring(num4 + 1)
            Dim flag As Boolean = text.Contains(".")
            If flag Then
               Dim num5 As Integer = text.IndexOf(".")
               AddressOf Me.Version = Conversions.ToInteger(text.Substring(0, num5))
               AddressOf Me.Jobs = Conversions.ToInteger(text.Substring(num5 + 1))
            Else
               AddressOf Me.Version = Conversions.ToInteger(AddressOf Me.LicenseDecrypt.Substring(num4 + 1))
               AddressOf Me.Jobs = 0
            End If
            Dim text2 As String = AddressOf Me.LicenseDecrypt.Substring(num3 + 1, num4 - (num3 + 1))
            Dim value As String = text2.Substring(0, text2.IndexOf("."))
            Dim num6 As Integer = CInt(Convert.ToInt64(value, 16))
            Dim value2 As String = text2.Substring(text2.IndexOf(".") + 1, text2.LastIndexOf(".") - 1 - text2.IndexOf("."))
            Dim num7 As Integer = CInt(Convert.ToInt64(value2, 16))
            Dim value3 As String = text2.Substring(text2.LastIndexOf(".") + 1)
            Dim num8 As Integer = CInt(Convert.ToInt64(value3, 16))
            Dim dateTime As DateTime = New DateTime(Conversions.ToInteger(num6.ToString().Substring(0, 4)), Conversions.ToInteger(num6.ToString().Substring(4, 2)), Conversions.ToInteger(num6.ToString().Substring(6, 2)))
            AddressOf Me.PD = dateTime
            dateTime = New DateTime(Conversions.ToInteger(num7.ToString().Substring(0, 4)), Conversions.ToInteger(num7.ToString().Substring(4, 2)), Conversions.ToInteger(num7.ToString().Substring(6, 2)))
            AddressOf Me.ED = dateTime
            dateTime = New DateTime(Conversions.ToInteger(num8.ToString().Substring(0, 4)), Conversions.ToInteger(num8.ToString().Substring(4, 2)), Conversions.ToInteger(num8.ToString().Substring(6, 2)))
            AddressOf Me.MD = dateTime
            Me.bLicenseValid = True
         Catch expr_28D As Exception
            ProjectData.SetProjectError(expr_28D)
            Me.bLicenseValid = False
            ProjectData.ClearProjectError()
         End Try
      End Sub

      Public Sub SetLicenseKey(sLK As String)
         Me.sLicenseStringIn = sLK
      End Sub
   End Class
End Namespace


GRACIAS MIL!

P.D. no se si es el foro indicado o si esta es la forma de publicar, si no lo es pido disculpas por el caso.
En línea

tincopasan


Desconectado Desconectado

Mensajes: 1.286

No es lo mismo conocer el camino que recorrerlo.


Ver Perfil
Re: Alguien que me de un indicio sobre este tema! Exe + DLL
« Respuesta #1 en: 24 Julio 2014, 03:45 am »

parece que usa cifrado de base 64, ¿probaste parchar en vez de buscar la clave?
En línea

Sir-Kero

Desconectado Desconectado

Mensajes: 3



Ver Perfil
Re: Alguien que me de un indicio sobre este tema! Exe + DLL
« Respuesta #2 en: 24 Julio 2014, 03:53 am »

Hola Tincopasan, pues si se me ha ocurrido lo de parchar, estoy leyendo manuales en la web del maestro Narvaja como me lo sugirio otro colega, todos de NET por supuesto, pero no se me hace facil dado que empeze leyendo sobre OLLY y ahora se tiene que usar reflector con reflexil, aun no tengo identificada la forma de parchar, y podria ser una tonteria hacerlo pero cuando no sabes ni por donde empezar en NET, pues lo obvio no lo es tanto....alguna sugerencia o literatura al respecto?
En línea

Sir-Kero

Desconectado Desconectado

Mensajes: 3



Ver Perfil
Re: Alguien que me de un indicio sobre este tema! Exe + DLL
« Respuesta #3 en: 24 Julio 2014, 04:43 am »

Me han dicho en el foro de criptografia que este tema no esta permitido, que los moderadores lo van a eliminar, asi que doy por cerrado el POST, cualquier ayuda bibliografica al respecto por favor me la hacen llegar en MP, MIL GRACIAS!
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Ayuda]Nesecito alguien que sepa sobre el tema[Ayuda]
Programación Visual Basic
ninto33 2 4,165 Último mensaje 29 Diciembre 2009, 00:44 am
por MCKSys Argentina
¿Alguien conoce este tema musical?
Foro Libre
WHK 4 2,709 Último mensaje 15 Enero 2011, 03:48 am
por WHK
Alguien me ayuda a recopilar datos sobre el tema de las Orange-xxxx ? « 1 2 »
Wireless en Windows
El_Andaluz 13 20,218 Último mensaje 17 Agosto 2013, 23:24 pm
por GOolden
SS7, ¿alguien ha investigado sobre el tema?
Hacking
petaculos 3 3,133 Último mensaje 1 Septiembre 2016, 16:46 pm
por MCKSys Argentina
Necesito que alguien me ayude sobre este tema de hacer un trainer de juego
Foro Libre
MG50 2 2,448 Último mensaje 23 Enero 2017, 23:43 pm
por Eleкtro
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines