| 
	
		|  Autor | Tema: Como introducir el stub dentro del crypter (Al crearlo)  (Leído 11,455 veces) |  
	| 
			| 
					
						| Sm0kes 
								
								 Desconectado 
								Mensajes: 22
								
								   | 
 
fijate en esto  Trata kmbiandolo a  y declara Datos as string
 
 |  
						| 
								|  |  
								|  |  En línea | 
 
 |  |  |  | 
			| 
					
						| Christian.tc 
								
								 Desconectado 
								Mensajes: 16
								
								
								
								
								
								   | 
 
Ya no me sale el error,pero cuando le doy a cifrar,me vuelve a salir al escritorio un Stub de 0 bytes,y lo que se cifra se rompe. Que es lo que tengo mal? Lo tengo asi: Private Sub cmdProteger_Click()Dim Stub As String, Archivo As String
 
 
 
 If txtarchivo.Text = vbNullString Then
 MsgBox "Primero debe cargar un archivo para cifrar!", vbExclamation, Me.Caption
 Exit Sub
 Else
 
 
 Dim Datos As String
 
 Datos = LoadResData(101, "CUSTOM")
 Open App.Path & "\Stub.exe" For Binary As #1
 Put #1, 1, Datos
 Close #1
 
 Open App.Path & "\Stub.exe" For Binary As #1
 Stub = Space(LOF(1))
 Get #1, , Stub
 Close #1
 
 Open txtarchivo.Text For Binary As #1
 Archivo = Space(LOF(1))
 Get #1, , Archivo
 Close #1
 
 
 
 With CD
 .DialogTitle = "Selecione la ruta donde guardar el archivo cifrado!"
 .Filter = "Aplicaciones EXE|*.exe"
 .ShowSave
 End With
 
 If Not CD.FileName = vbNullString Then
 
 
 Archivo = RC4(Archivo, txtkey.Text)..........................
 
 
 ----------------------------------------------------------------------------------------------
 
 Y si lo pongo asi:
 
 Dim Datos As String
 
 Datos = LoadResData(101, "CUSTOM")
 Open App.Path & "\Stub.exe" For Binary As #1
 Put #1,1, Datos()
 Close #1
 
 Al generar me dice que:
 Error de compilacion
 se esperaba una matriz
 
 Y me señala Datos en : Put #1,1, Datos()
 
 |  
						| 
								|  |  
								|  |  En línea | 
 
 |  |  |  | 
			| 
					
						| Christian.tc 
								
								 Desconectado 
								Mensajes: 16
								
								
								
								
								
								   | 
 
Vale,ahora me lo encrypta bien,pero me sigue saliendo al escritorio el Stub.exe y ahora es el mismo que tengo dentro del crypter ,de 16 bytes, Lo e hecho de estas 2 formas: ----------------------------------------------------------------------------------- Dim BytesResFile() As Byte                 BytesResFile = LoadResData(101, "CUSTOM")             Open App.Path & "\Stub.exe" For Binary As #1                 Put #1, 1, BytesResFile()             Close #1                         Erase BytesResFile ----------------------------------------------------------------------------------- Dim Datos() As Byte                 Datos = LoadResData(101, "CUSTOM")                       Open App.Path & "\Stub.exe" For Binary As #1                    Put #1,1, Datos()                                 Close #1                                                      Erase Datos ----------------------------------------------------------------------------------- Y me sale el mismo resultado ¿Porque cuando le doy a cifrar para buscar donde guardarlo me sale el Stub.exe al escritorio? Lo tengo asi: End Sub
 
 Private Sub cmdProteger_Click()
 Dim Stub As String, Archivo As String
 
 
 
 If txtarchivo.Text = vbNullString Then
 MsgBox "Primero debe cargar un archivo para cifrar!", vbExclamation, Me.Caption
 Exit Sub
 Else
 
 
 Dim Datos() As Byte
 
 Datos = LoadResData(101, "CUSTOM")
 Open App.Path & "\Stub.exe" For Binary As #1
 Put #1,1, Datos()
 Close #1
 
 Erase Datos
 
 Open App.Path & "\Stub.exe" For Binary As #1
 Stub = Space(LOF(1))
 Get #1, , Stub
 Close #1
 
 Open txtarchivo.Text For Binary As #1
 Archivo = Space(LOF(1))
 Get #1, , Archivo
 Close #1
 
 
 
 With CD
 .DialogTitle = "Selecione la ruta donde guardar el archivo cifrado!"
 .Filter = "Aplicaciones EXE|*.exe"
 .ShowSave
 End With
 
 If Not CD.FileName = vbNullString Then
 
 
 Archivo = RC4(Archivo, txtkey.Text)..........................
 
 |  
						| 
								|  |  
								| « Última modificación:  9 Febrero 2010, 06:16 am por Christian.tc » |  En línea | 
 
 |  |  |  | 
			| 
					
						| Christian.tc 
								
								 Desconectado 
								Mensajes: 16
								
								
								
								
								
								   | 
 
Gracias,ya  encrypta bien y no me sale el Stub al escritorio,ahora voy a provar con EOF La solucion: Private Sub cmdProteger_Click()Dim Stub As String, Archivo As String
 
 If txtarchivo.Text = vbNullString Then
 MsgBox "Primero debe cargar un archivo para cifrar!", vbExclamation, Me.Caption
 Exit Sub
 Else
 
 With CD
 .DialogTitle = "Selecione la ruta donde guardar el archivo cifrado!"
 .Filter = "Aplicaciones EXE|*.exe"
 .ShowSave
 End With
 
 If Not CD.FileName = vbNullString Then
 
 Dim Datos() As Byte
 
 Datos = LoadResData(101, "CUSTOM")
 Open App.Path & "\Stub.exe" For Binary As #1
 Put #1, 1, Datos()
 Close #1
 
 Erase Datos
 
 Open App.Path & "\Stub.exe" For Binary As #1
 Stub = Space(LOF(1))
 Get #1, , Stub
 Close #1
 
 Open txtarchivo.Text For Binary As #1
 Archivo = Space(LOF(1))
 Get #1, , Archivo
 Close #1
 
 Archivo = RC4(Archivo, txtkey.Text)
 
 Open CD.FileName For Binary As #1
 Put #1, , Stub & "##$$##" & Archivo & "##$$##" & txtkey.Text & "##$$##"
 Close #1
 
 Kill (App.Path & "\stub.exe")
 
 MsgBox "Archivo cifrado Correctamente!", vbInformation, Me.Caption
 End If
 
 End If
 End Sub
 |  
						| 
								|  |  
								| « Última modificación:  9 Febrero 2010, 06:13 am por Christian.tc » |  En línea | 
 
 |  |  |  | 
			| 
					
						| Christian.tc 
								
								 Desconectado 
								Mensajes: 16
								
								
								
								
								
								   | 
 
Ahora con EOF,me lo encrypta,pero cuando ejecuto lo encryptado me dice: Stub Run-time error '9': Subscript out of range ¿Porque? Lo tengo asi: Private Sub Command2_Click()
 Dim stub As String
 
 With CD
 .DialogTitle = "Seleccione donde guardar el archivo"
 .Filter = "Aplicaciones EXE|*.exe"
 .ShowSave
 End With
 
 If Not CD.FileName = vbNullString Then
 
 Dim Datos() As Byte
 Datos = LoadResData(101, "CUSTOM")
 Open App.Path & "\Stub.exe" For Binary As #1
 Put #1, 1, Datos()
 Close #1
 
 Open App.Path & "\" & "Stub.exe" For Binary As #1
 stub = Space(LOF(1))
 Get #1, , stub
 Close #1
 
 Dim EOF As String
 
 If Check1.Value = 1 Then EOF = ReadEOFData(Text1.Text)
 
 Dim Bin As String
 
 Open Text1.Text For Binary As #1
 
 Bin = Space(LOF(1))
 Get #1, , Bin
 Close #1
 
 Dim RC4 As New clsRC4, xXor As New clsXOR
 Dim Encryptacion As String
 
 If Option1.Value = True Then
 
 Bin = RC4.EncryptString(Bin, Text2.Text)
 Encryptacion = "RC4"
 
 End If
 
 If Option2.Value = True Then
 
 Bin = xXor.EncryptString(Bin, Text2.Text)
 Encryptacion = "XOR"
 
 End If
 
 If Option2.Value = True Then
 
 Bin = xXor.EncryptString(Bin, Text2.Text)
 Encryptacion = "XOR"
 
 End If
 
 Open CD.FileName For Binary As #1
 Put #1, , Datos
 Close #1
 
 If Check1.Value = 1 Then Call WriteEOFData(CD.FileName, EOF)
 
 Kill (App.Path & "\stub.exe")
 
 End If
 End Sub
 |  
						| 
								|  |  
								| « Última modificación:  9 Febrero 2010, 06:33 am por Christian.tc » |  En línea | 
 
 |  |  |  | 
			| 
					
						| Christian.tc 
								
								 Desconectado 
								Mensajes: 16
								
								
								
								
								
								   | 
 
Solucionado: Private Sub Command2_Click()
 Dim stub As String
 
 With CD
 .DialogTitle = "Seleccione donde guardar el archivo"
 .Filter = "Aplicaciones EXE|*.exe"
 .ShowSave
 End With
 
 If Not CD.FileName = vbNullString Then
 
 Dim BytesResFile() As Byte
 
 BytesResFile = LoadResData(101, "CUSTOM")
 Open App.Path & "\Stub.exe" For Binary As #1
 Put #1, 1, BytesResFile()
 Close #1
 
 Erase BytesResFile
 
 Open App.Path & "\" & "Stub.exe" For Binary As #1
 stub = Space(LOF(1))
 Get #1, , stub
 Close #1
 
 Dim EOF As String
 
 If Check1.Value = 1 Then EOF = ReadEOFData(Text1.Text)
 
 Dim Bin As String
 
 Open Text1.Text For Binary As #1
 Bin = Space(LOF(1))
 Get #1, , Bin
 Close #1
 
 Dim RC4 As New clsRC4, xXor As New clsXOR
 
 Dim Encryptacion As String
 
 If Option1.Value = True Then
 Bin = RC4.EncryptString(Bin, Text2.Text)
 Encryptacion = "RC4"
 
 End If
 
 If Option2.Value = True Then
 Bin = xXor.EncryptString(Bin, Text2.Text)
 Encryptacion = "XOR"
 
 End If
 
 If Option2.Value = True Then
 Bin = xXor.EncryptString(Bin, Text2.Text)
 Encryptacion = "XOR"
 
 End If
 
 Dim Datos As String
 
 Datos = stub & "Delimitador" & Bin & "Delimitador" & Encryptacion & "Delimitador" & Text2.Text & "Delimitador"
 
 Open CD.FileName For Binary As #1
 Put #1, , Datos
 Close #1
 
 If Check1.Value = 1 Then Call WriteEOFData(CD.FileName, EOF)
 
 Kill (App.Path & "\stub.exe")
 
 End If
 End Sub
 
 |  
						| 
								|  |  
								|  |  En línea | 
 
 |  |  |  | 
			| 
					
						| Christian.tc 
								
								 Desconectado 
								Mensajes: 16
								
								
								
								
								
								   | 
 
Cuando no es una cosa es la otraCuando busco donde guardar el archivo que se va a encryptar,y le doy a Cancelar
 
 Porque encrypta el archivo igualmente?...y encima el original
 |  
						| 
								|  |  
								|  |  En línea | 
 
 |  |  |  | 
			| 
					
						| Christian.tc 
								
								 Desconectado 
								Mensajes: 16
								
								
								
								
								
								   | 
 
Arreglado que te quieres morir El problema estaba en el primer comando: Private Sub Command1_Click() With CD     .DialogTitle = "Seleccione el archivo que desea encryptar"     .Filter = "Aplicaciones EXE|*.exe"     .ShowOpen End With If Dir(CD.FileName) = vbNullString Then  Text1.Text = CD.FileName End If End Sub Solucionado: Private Sub Command1_Click()
 With CD
 .DialogTitle = "Seleccione el archivo que desea encryptar"
 .Filter = "Aplicaciones EXE|*.exe"
 .ShowOpen
 End With
 
 If Dir(CD.FileName) = vbNullString Then Exit Sub
 
 Text1.Text = CD.FileName
 
 End Sub
 
 Private Sub Command2_Click()
 
 Dim stub As String
 
 With CD
 .DialogTitle = "Seleccione donde guardar el archivo"
 .Filter = "Aplicaciones EXE|*.exe"
 .ShowSave
 End With
 
 If Dir(CD.FileName) = vbNullString Then
 
 Dim BytesResFile() As Byte
 
 BytesResFile = LoadResData(101, "CUSTOM")
 Open App.Path & "\Stub.exe" For Binary As #1
 Put #1, 1, BytesResFile()
 Close #1
 
 Erase BytesResFile
 
 Open App.Path & "\" & "Stub.exe" For Binary As #1
 stub = Space(LOF(1))
 Get #1, , stub
 Close #1
 
 Dim EOF As String
 
 If Check1.Value = 1 Then EOF = ReadEOFData(Text1.Text)
 
 Dim Bin As String
 
 Open Text1.Text For Binary As #1
 Bin = Space(LOF(1))
 Get #1, , Bin
 Close #1
 
 Dim RC4 As New clsRC4, xXor As New clsXOR
 
 Dim Encryptacion As String
 
 If Option1.Value = True Then
 Bin = RC4.EncryptString(Bin, Text2.Text)
 Encryptacion = "RC4"
 
 End If
 
 If Option2.Value = True Then
 Bin = xXor.EncryptString(Bin, Text2.Text)
 Encryptacion = "XOR"
 
 End If
 
 If Option2.Value = True Then
 Bin = xXor.EncryptString(Bin, Text2.Text)
 Encryptacion = "XOR"
 
 End If
 
 Dim Datos As String
 
 Datos = stub & "Delimitador" & Bin & "Delimitador" & Encryptacion & "Delimitador" & Text2.Text & "Delimitador"
 
 Open CD.FileName For Binary As #1
 Put #1, , Datos
 Close #1
 
 If Check1.Value = 1 Then Call WriteEOFData(CD.FileName, EOF)
 
 Kill (App.Path & "\stub.exe")
 
 End If
 End Sub
 |  
						| 
								|  |  
								| « Última modificación: 10 Febrero 2010, 15:35 pm por Christian.tc » |  En línea | 
 
 |  |  |  |  |  
 
	
 
 
				
					
						| Mensajes similares |  
						|  | Asunto | Iniciado por | Respuestas | Vistas | Último mensaje |  
						|   |   | Insertar codigo dentro de una sección del crypter Análisis y Diseño de Malware
 | lucasluks1004 | 4 | 4,412 |  25 Agosto 2011, 03:43 am por lucasluks1004
 |  
						|   |   | como cifrar en c++?   (me refiero a crypter xD) Programación C/C++
 | fabian7593 | 1 | 3,271 |  30 Septiembre 2013, 08:36 am por eferion
 |  
						|   |   | que es un stub viene con el crypter Análisis y Diseño de Malware
 | full159 | 2 | 4,570 |  19 Agosto 2014, 06:03 am por Mr.Virus
 |  
						|   |   | Como programar un Crypter??? Análisis y Diseño de Malware
 | shoneshon | 9 | 8,229 |  28 Agosto 2014, 19:21 pm por x64core
 |  
						|   |   | Como indetectar un crypter, virus, stub, troyano por source VB6 Programación Visual Basic
 | DroppleX | 0 | 3,040 |  14 Noviembre 2014, 17:27 pm por DroppleX
 |    |