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

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Análisis y Diseño de Malware (Moderador: fary)
| | |-+  Los ejuecutables (.exe , .msi) me salen como aplicaciones html (.hta)
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Los ejuecutables (.exe , .msi) me salen como aplicaciones html (.hta)  (Leído 9,436 veces)
**Aincrad**


Desconectado Desconectado

Mensajes: 668



Ver Perfil WWW
Los ejuecutables (.exe , .msi) me salen como aplicaciones html (.hta)
« en: 16 Noviembre 2017, 15:35 pm »

hola, como dice el titulo no puedo abrir ni el administrador de tareas ya que ahora todos los .exe el windows los lee como .hta y los abre asi:



AQUI DEJO UNA FOTO DE CUANDO REINICIE LA PC:



no solo los .exe tambien los .bat.  :(

todo paso cuando copile un batch y lo abri :

el batch es este bueo no es del todo batch mas bien es una aplicacion html dentro de un batch:

Código
  1. @goto :batch
  2. <html><!--
  3. :batch
  4. @echo off
  5. if /I "%1"=="{AddText}" goto :addtext
  6. if /I "%1"=="{GetText}" goto :gettext
  7. if /I "%1"=="{StripChars}" goto :StripChars
  8. mode con: cols=31 lines=5
  9. title [%~n0]
  10. color 0a
  11. echo.
  12. echo.
  13. echo.          loading ...
  14. reg add HKCU\Software\Classes\%~x0 /d "htafile" /f >nul
  15. start "" mshta.exe "%~dpnx0"
  16. exit
  17. :addtext
  18. for /f "tokens=*" %%A in ('echo.%2') do set "filedir=%%~dpA" & set "filename=%%~nxA"
  19. copy /y %2 "%filedir%\[WithMessage] %filename%" >nul
  20. echo.>>"%filedir%\[WithMessage] %filename%"
  21. echo.>>"%filedir%\[WithMessage] %filename%"
  22. set "txt=%3"
  23. set "txt=%txt:~1%"
  24. set "txt=%txt:~0,-1%"
  25. echo.:#%txt%>>"%filedir%\[WithMessage] %filename%"
  26. echo.[WithMessage] %filename%
  27. exit
  28. :gettext
  29. set /a "linenum=0+0"
  30. for /f "tokens=*" %%A in ('echo.%2') do for /f "tokens=*" %%B in ('type "%%~dpnxA"') do set "msgline=%%B"
  31. for /f "tokens=1,2 delims=#" %%A in ('echo.%msgline%') do (
  32. if "%%A"==":" (
  33. echo.%%B
  34. ) else (
  35. echo.{nomsg}
  36. )
  37. )
  38. exit
  39. :StripChars
  40. set "txt=%2"
  41. set "txt=%txt:~1%"
  42. echo."%txt:~0,-3%"
  43. exit
  44. -->
  45. <head>
  46. <title>Encrypt Messages Into Image-Files</title>
  47. <HTA:APPLICATION ID="ThisApp"
  48. APPLICATIONNAME="Encrypt Messages Into Image-Files"
  49. scroll="no"
  50. icon=""
  51. showintaskbar="no"
  52. sysmenu="yes"
  53. caption="yes"
  54. maximizebutton="no"
  55. minamizebutton="no"
  56. >
  57. </head>
  58. <script language="VBScript">
  59. sub Window_OnLoad
  60. Ext = split(split(ThisApp.commandline,chr(34))(1),".")(ubound(split(split(ThisApp.commandline,chr(34))(1),".")))
  61. createobject("wscript.shell").run "reg add HKCU\Software\Classes\."&Ext&" /d "&chr(34)&Ext&"file"&chr(34)&" /f",0,true
  62. window.resizeto 670,600
  63. end sub
  64. sub addtxt()
  65. buildtxt = ""
  66. for c = 1 to len(document.all.txtmessage.value)
  67. buildtxt = buildtxt& chr(asc(mid(document.all.txtmessage.value,c,1))+4)
  68. next
  69. buildnewfileandgetname = CommandLine("@call "&chr(34)&split(ThisApp.commandline,chr(34))(1)&chr(34) _
  70. &" {AddText} "&chr(34)&document.all.addmsgto.value&chr(34)&" "&chr(34)&buildtxt&chr(34))
  71. msgbox "The JPG-File was copied and the message was injected into the copy. The copy is in the same folder."
  72. end sub
  73. sub readtxt()
  74. rawtxt = CommandLine("@call "&chr(34)&split(ThisApp.commandline,chr(34))(1)&chr(34) _
  75. &" {GetText} "&chr(34)&document.all.getmsgfrom.value&chr(34))
  76. if NOT rawtxt = "{nomsg}" then
  77. decryptmsg = ""
  78. for c = 1 to len(rawtxt)
  79. decryptmsg = decryptmsg& chr(asc(mid(rawtxt,c,1))-4)
  80. next
  81. decryptmsg = CommandLine("@call "&chr(34)&split(ThisApp.commandline,chr(34))(1)&chr(34) _
  82. &" {StripChars} "&chr(34)&decryptmsg&chr(34))
  83. else
  84. decryptmsg = "no message in this file"
  85. end if
  86. msgbox "Hidden Message: "&decryptmsg,0,"Viewing Hidden Message"
  87. end sub
  88. function CommandLine(cmmd)
  89. set clipboard = createobject("htmlfile")
  90. cliptext = clipboard.ParentWindow.ClipboardData.GetData("text")
  91. createobject("wscript.shell").run chr(34)&"%comspec%"&chr(34)&" /d /c "&cmmd&"|clip",0,true
  92. CommandLine = clipboard.ParentWindow.ClipboardData.GetData("text")
  93. if NOT isnull(cliptext) then clipboard.ParentWindow.ClipboardData.SetData "text",cliptext
  94. end function
  95. </script>
  96. <body bgcolor=black style=border:0px;padding:0px;margin:0px;color:black;font-size:0;font-family:arial ><br/><font color=cyan size=2><center><br/>
  97. <font size=4 face=terminal>
  98. <a style=color:red;text-decoration:none target=_blank href=https://hackforums.net/member.php?action=profile&uid=3089494 >by <u>ImDeepWithWindows</u></a>
  99. </font><br/><br/><hr noshade=noshade style=color:purple;border-color:purple;border-style:solid;padding:0px;margin:0px />
  100. <div align=left>encrypt messages inside JPG image-files</div>
  101. <hr noshade=noshade style=color:purple;border-color:purple;border-style:solid;padding:0px;margin:0px /><center><br/><br/>
  102. <fieldset style=width:60%;border-style:solid;border-color:grey;margin:0px;padding:0px;border-width:4px>
  103. <legend style=color:yellow;margin:0px;padding:0px;border-style:solid;border-color:grey;border-width:4px ><b>Hide Message In JPG File</b></legend>
  104. <br/><br/><br/>Browse For JPG-File:
  105. <input type=file value="Select Image File" name=addmsgto style=display:inline-block;border-color:purple;border-style:solid;background-color:black;color:yellow accept="jpg,image/jpg" />
  106. <br/><br/>Message To Hide: <input type=text name=txtmessage style=border-color:grey;border-style:solid;background-color:black;color:yellow /><br/>
  107. <br/><input type=submit value="Hide Message" style=color:#00ff00;background-color:black;border-color:purple;border-style:solid onclick=addtxt() />
  108. <br/><br/><br/></fieldset><br/><br/><br/><fieldset style=width:60%;border-style:solid;border-color:grey;margin:0px;padding:0px;border-width:4px>
  109. <legend style=color:yellow;margin:0px;padding:0px;border-style:solid;border-color:grey;border-width:4px ><b>Read Hidden Message From JPG File</b></legend>
  110. <br/><br/><br/>Browse For JPG-File:
  111. <input type=file value="Select Image File" name=getmsgfrom style=border-color:purple;border-style:solid;background-color:black;color:yellow accept="jpg" /><br/>
  112. <br/><input type=submit value="Read Hidden Message" style=color:#00ff00;background-color:black;border-color:purple;border-style:solid onclick=readtxt() />
  113. <br/><br/><br/></fieldset>



bueno sospecho que este batch me configuro mediante el registro de windows (regedit) para que todos los .exe y .bat se reconocieran como .hta

por que sospecho esto? sospecho esto por el siguiente codigo:

Código
  1. sub Window_OnLoad
  2. Ext = split(split(ThisApp.commandline,chr(34))(1),".")(ubound(split(split(ThisApp.commandline,chr(34))(1),".")))
  3. createobject("wscript.shell").run "reg add HKCU\Software\Classes\."&Ext&" /d "&chr(34)&Ext&"file"&chr(34)&" /f",0,true
  4. window.resizeto 670,600
  5. end sub



en esa parte que es vbs el code toca el registro , mi sospecha es que hay se cofigura para que lea todos los .exe y .bat como si fueran .hta .

Código
  1. reg add HKCU\Software\Classes\%~x0 /d "htafile" /f >nul

me parece que esa parte del code tambien es lo que me esta jodiendo.

PD: ME IMAGINO QUE LA SOLUCIÓN SERIA UN VBS QUE TAMBIEN EDITE EL REGISTRO VOLVIENDO LOS VALORES COMO ESTABAN ANTES.


GRACIAS DE ANTEMANO

MOD: Imagenes adaptadas a lo permitido.
« Última modificación: 16 Noviembre 2017, 15:45 pm por MCKSys Argentina » En línea



MCKSys Argentina
Moderador Global
***
Desconectado Desconectado

Mensajes: 5.465


Diviértete crackeando, que para eso estamos!


Ver Perfil
Re: Los ejuecutables (.exe , .msi) me salen como aplicaciones html (.hta)
« Respuesta #1 en: 16 Noviembre 2017, 15:48 pm »

Bueno, ahora sabes porqué se aconseja siempre trabjar con VM's...  :)

Intenta restaurar el sistema a un punto anterior.

Saludos!
En línea

MCKSys Argentina

"Si piensas que algo está bien sólo porque todo el mundo lo cree, no estás pensando."

**Aincrad**


Desconectado Desconectado

Mensajes: 668



Ver Perfil WWW
Re: Los ejuecutables (.exe , .msi) me salen como aplicaciones html (.hta)
« Respuesta #2 en: 16 Noviembre 2017, 15:55 pm »

descubri que la intentar abrir los programas .exe directamente no sirve pero al abrirlo indirectamente si abren.

por ejemplo abro el programa vlc player no me sirve, pero al abrir un video si abre el vls player.

entonces como el antivirus no me abre directamente , doy click derecho analizar con 360 segurity y si me abrio el antivirus lo puse a analizar la pc y me soluciono el problema que tenia con los .exe y .msi . los detecto como "ANOMALIAS DEL SISTEMA"

YA SOLUCIONE EL PROBLEMA CON LOS EJECUTABLES . PERO EN EL CASO DE LOS ARCHIVOS POR LOTES .BAT Y .CMD SIGUE IGUAL LOS DETECTA COMO SI FUERAN APLICACIONES HTML (.HTA)
En línea



Serapis
Colaborador
***
Desconectado Desconectado

Mensajes: 3.348


Ver Perfil
Re: Los ejuecutables (.exe , .msi) me salen como aplicaciones html (.hta)
« Respuesta #3 en: 16 Noviembre 2017, 16:57 pm »

No es buena idea ejecutar un script (por curiosidad), sin saber qué hace, antes mira su código y aunque no lo comprendas (de un simple vistazo) en su totalidad, al menos alguna idea genérica si puedas tener y podrás decidir con mejor certeza si es o no recomendable evitar su ejecución.

Si tienes un win-xp, puedes editar el registro de la siguiente manera (si tienes otra versión más actual, conviene tomar copia de ese otro S.O. sin duda las claves para las dll, serán distintas y no funcionaría)
 
Para los bat, copia el siguiente contenido y pégalo en fichero, dale el nombre que quieras (por ejemplo: batfile), pero con extensión .reg, guarda el fichero y ejecútalo, te preguntará si deseas añadir el contenido al registro, le dices que sí y listo.

Citar
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.bat]
@="batfile"

[HKEY_CLASSES_ROOT\.bat\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"


[HKEY_CLASSES_ROOT\batfile]
@="MS-DOS Batch File"
"EditFlags"=hex:30,04,00,00

[HKEY_CLASSES_ROOT\batfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
  65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,35,\
  00,33,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell]

[HKEY_CLASSES_ROOT\batfile\shell\edit]

[HKEY_CLASSES_ROOT\batfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
  00

[HKEY_CLASSES_ROOT\batfile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\batfile\shell\open\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\batfile\shell\print]

[HKEY_CLASSES_ROOT\batfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
  00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\batfile\shellex]

[HKEY_CLASSES_ROOT\batfile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\PifProps]
@="{86F19A00-42A0-1069-A2E9-08002B30309D}"

[HKEY_CLASSES_ROOT\batfile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"


Los valores hexadecimales, son cadenas de texto, por ejemplo:
el hexadeciaml bajo esta clave:
[HKEY_CLASSES_ROOT\batfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
  00,25,00,31,00,00,00
Equivale a este texto:
%SystemRoot%\System32\NOTEPAD.EXE /p %1

Lo mismo para el cmd (guárdalo a otro fichero, por ejemplo cmdfile.reg), esta es la info de registro:
Citar
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.cmd]
@="cmdfile"

[HKEY_CLASSES_ROOT\.cmd\PersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"


[HKEY_CLASSES_ROOT\cmdfile]
@="Windows NT Command Script"
"EditFlags"=hex:30,04,00,00

[HKEY_CLASSES_ROOT\cmdfile\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
  65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,35,\
  00,33,00,00,00

[HKEY_CLASSES_ROOT\cmdfile\shell]

[HKEY_CLASSES_ROOT\cmdfile\shell\edit]

[HKEY_CLASSES_ROOT\cmdfile\shell\edit\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,25,00,31,00,00,\
  00

[HKEY_CLASSES_ROOT\cmdfile\shell\open]
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\cmdfile\shell\open\command]
@="\"%1\" %*"

[HKEY_CLASSES_ROOT\cmdfile\shell\print]

[HKEY_CLASSES_ROOT\cmdfile\shell\print\command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,4e,00,4f,00,\
  54,00,45,00,50,00,41,00,44,00,2e,00,45,00,58,00,45,00,20,00,2f,00,70,00,20,\
  00,25,00,31,00,00,00

[HKEY_CLASSES_ROOT\cmdfile\shellex]

[HKEY_CLASSES_ROOT\cmdfile\shellex\DropHandler]
@="{86C86720-42A0-1069-A2E8-08002B30309D}"

[HKEY_CLASSES_ROOT\cmdfile\shellex\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\cmdfile\shellex\PropertySheetHandlers\PifProps]
@="{86F19A00-42A0-1069-A2E9-08002B30309D}"

[HKEY_CLASSES_ROOT\cmdfile\shellex\PropertySheetHandlers\ShimLayer Property Page]
@="{513D916F-2A8E-4F51-AEAB-0CBC76FB1AF8}"

...y para la próxima si vas a cambiar el registro, antes accede al mismo y 'exporta' el contenido completo de las claves que vayas a modificar, así podrás restaurar desde la copia si algo falló y no salió como esperabas...
En línea

**Aincrad**


Desconectado Desconectado

Mensajes: 668



Ver Perfil WWW
Re: Los ejuecutables (.exe , .msi) me salen como aplicaciones html (.hta)
« Respuesta #4 en: 16 Noviembre 2017, 20:01 pm »

Gracias por la respuesta @NEBIRE .

Ya lo había solucionado, solamente hice esto:


inicio + r  ,  escribí  regedit y presione enter y me fui a HKEY_CURRENT_USER\Software\Classes\.bat   y hay edite el valor que estaba en htafile lo cambie a BAT_auto_file  y listo ya solucione el problema con los .bat .

PD: no creo que esa fuera la manera de hacerlo correctamente pero lo hice , y funciono.

PD2: Con esto que me paso tengo una buena idea para hacer un virus . jejejejeje. ;D
« Última modificación: 16 Noviembre 2017, 20:03 pm por **Aincrad** » En línea



Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines