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


  Mostrar Mensajes
Páginas: [1] 2 3 4
1  Programación / Programación Visual Basic / Re: [POC] Kaspersky Killer en: 3 Julio 2009, 18:58 pm
Buenisimo aporte, me gustaria saber si ese code le ha fucnionado a alguien, estoy pasando el modulo del Unhook Api a ASm pero he visto que en esta parte del modulo
Do While bFirstChunk Or CBool(BaseRelocationFromPtr(pbr).VirtualAddress)

pbr previamente no tiene ningun valor, es decir de NULL, entonces al querer copiar desde 0 la memoria, el code peta en esta funcion

Private Function BaseRelocationFromPtr(ByVal pbr As Long) As IMAGE_BASE_RELOCATION
    CopyMemory VarPtr(BaseRelocationFromPtr), pbr, 8
End Function

alguna sugerenica XCryptOR gracias
2  Programación / ASM / Re: ASM y MSN en: 26 Abril 2009, 04:20 am
No entiendo, no se si es por la manera de compilar pero asi funciona, le he puesto una string antes de las direcciones de MSn y funciona, habia visto que habia un return raro al cargarse la direccion.

Código:
format PE GUI 4.0
include 'win32ax.inc'

invoke LocalAlloc, LPTR, 1000
mov ebx, eax
invoke CoInitialize,0
invoke CoCreateInstance,CLSID_Messenger,NULL,\
                        0x4,\
                        IID_IMessenger,ebx

struct  GUID
       Data1             dd ?
       Data2             dw ?
       Data3             dw ?
       Data4             rb 8
ends

yoseba db '0000000000000000000000000000000000000000', 0
CLSID_Messenger  GUID 0xb69003b3,0xc55e,0x4b48,<0x83,0x6c,0xbc,0x59,0x46,0xfc,0x3b,0x28>
IID_IMessenger   GUID 0xd50c3186,0x0f89,0x48f8,<0xb2,0x04,0x36,0x04,0x62,0x9d,0xee,0x10>


data import
library kernel32, 'kernel32.dll',\
        ole32, 'ole32.dll'

import ole32, CoInitialize, 'CoInitialize',\
              CoCreateInstance, 'CoCreateInstance'

include 'API\KERNEL32.INC'
end data

voy a compilarlo de otra manera a ver  :-\, tanto tiempo viendo en que fallaba ya me estaba volviendo loco
3  Programación / ASM / Re: ASM y MSN en: 26 Abril 2009, 01:42 am
En CoCreateInstance, he debugeado el exe del C y se coloca igual los datos que en el de ASM pero no entiendo porque no funciona igual, pero luego estoy intentando ver la estructura del IUnknown de C y como que es algo distinta sino me equivoco...
4  Programación / ASM / Re: ASM y MSN en: 26 Abril 2009, 01:25 am
El code de C funciona perfecto
El de ASM me este error el OLLY ERROR_NO_TOKEN (000003F0)
5  Programación / ASM / Re: ASM y MSN en: 26 Abril 2009, 00:47 am
Bueno en C asi funciona
Código:
#include <windows.h>
#include <objbase.h>
#include <stdio.h>
#include <conio.h>

const GUID IID_IMessenger =
   {0xd50c3186,0x0f89,0x48f8,{0xb2,0x04,0x36,0x04,0x62,0x9d,0xee,0x10}};

const GUID CLSID_Messenger =
   {0xb69003b3,0xc55e,0x4b48,{0x83,0x6c,0xbc,0x59,0x46,0xfc,0x3b,0x28}};

int main(int argc, char* argv[])
{
 HRESULT hr;
 IUnknown* pMsgr;

 CoInitialize(0);
 hr = CoCreateInstance(CLSID_Messenger, NULL, CLSCTX_LOCAL_SERVER, IID_IMessenger, (void**)&pMsgr);
 printf("CreateInstance=%u=0x%X\n", hr, hr);
 if (pMsgr)
 {
   pMsgr->Release();
 }
 CoUninitialize();

 printf("Try to exit messenger now.\n");
 _getch();
 
 return 0;
}

pero en ASM seguimos en las mismas  :-\

Código:
format PE GUI 4.0
include 'win32ax.inc'

invoke CoInitialize,NULL
invoke CoCreateInstance,CLSID_Messenger,NULL,\
                        CLSCTX_LOCAL_SERVER,\
                        IID_IMessenger,pMsgr

struc GUID def
 {   
   match d1-d2-d3-d4-d5, def   
    \{   
 .Data1 dd 0x\#d1   
 .Data2 dw 0x\#d2   
 .Data3 dw 0x\#d3   
 .Data4 db 0x\#d4 shr 8,0x\#d4 and 0FFh   
 .Data5 db 0x\#d5 shr 40,0x\#d5 shr 32 and 0FFh,\   
  0x\#d5 shr 24 and 0FFh,\   
  0x\#d5 shr 16 and 0FFh,\   
  0x\#d5 shr 8 and 0FFh,0x\#d5 and 0FFh   
    \}   
 }   

; .......................................
struct  IUnknown
        QueryInterface   dd ?
        AddRef           dd ?
        Release          dd ?
ends
; ........................................

CLSCTX_LOCAL_SERVER      = 0x4
IID_IMessenger  GUID     D50C3186-0F89-48f8-B204-3604629DEE10
CLSID_Messenger GUID     B69003B3-C55E-4b48-836C-BC5946FC3B28
pMsgr           IUnknown ?


data import
library kernel32, 'kernel32.dll',\
        ole32, 'ole32.dll'

import ole32, CoInitialize, 'CoInitialize',\
              CoCreateInstance, 'CoCreateInstance'

include 'API\KERNEL32.INC'
end data

pero creo que cada vez falta menos  ;D
6  Programación / ASM / Re: ASM y MSN en: 25 Abril 2009, 23:32 pm
No hay mucha motivacion con el tema, hoy me h epuesto de nuevo a investigar sin mucho exito  :-\, el CoCreateInstance me da error y creo que las constantes las he puesto bien  :huh:

Código:
format PE GUI 4.0
include 'win32ax.inc'

macro comcall object,proc,[arg]
 { common
    if ~ arg eq
   reverse
     pushd arg
   common
    end if
    mov eax,[object#.#handle]
    push eax
    mov eax,[eax]
    call [eax+object#.#proc] }

invoke LocalAlloc, LPTR, 1000000; suficiente memoria para la interfaz IMessenger
                                                ; ya que no se el tamaño que tendra
mov ebx, eax
invoke CoInitialize,NULL
invoke CoCreateInstance,CLSID_Messenger,NULL,23,\; 23 = CLSCTX_ALL
                        IID_IMessenger,ebx
;eax = 0x80040154 deberia de dar 0  :-(

struc GUID d1,d2,d3,d4,d5
 {
   .Data1 dd 0x#d1
   .Data2 dw 0x#d2
   .Data3 dw 0x#d3
   .Data4 db 0x#d4 shr 8,0x#d4 and 0FFh
   .Data5 db 0x#d5 shr 40,0x#d5 shr 32 and 0FFh,0x#d5 shr 24 and 0FFh,0x#d5 shr 16 and 0FFh,0x#d5 shr 8 and 0FFh,0x#d5 and 0FFh
 }

IID_IMessenger GUID 0D50C3186,0F89,48f8,0B204,3604629DEE10
CLSID_Messenger GUID 0B69003B3,0C55E,4b48,836C,0BC5946FC3B28

data import
library kernel32, 'kernel32.dll',\
        ole32, 'ole32.dll'

import ole32, CoInitialize, 'CoInitialize',\
              CoCreateInstance, 'CoCreateInstance'

include 'API\KERNEL32.INC'
end data
7  Programación / ASM / Re: ASM y MSN(Creacion de Objetos COM) en: 19 Abril 2009, 05:28 am
Bueno ya voy avanzando he descubierto como hacerlo en fasm la creacion de objetos, a ver si alguien se anima  :P, estoy viendo como puedo crear una especie de libreria solo para el evento de sacar los contactos, o alguna forma de poder interactuar con una libreria, aunque parece que hay que crearse una propia...

Código:
format PE GUI 4.0 
entry start

include 'win32a.inc'

macro comcall object,proc,[arg]
 { common
    if ~ arg eq
   reverse
     pushd arg
   common
    end if
    mov eax,[object#.#handle]
    push eax
    mov eax,[eax]
    call [eax+object#.#proc] }

struc GUID d1,d2,d3,d4,d5
 {
   .Data1 dd 0x#d1
   .Data2 dw 0x#d2
   .Data3 dw 0x#d3
   .Data4 db 0x#d4 shr 8,0x#d4 and 0FFh
   .Data5 db 0x#d5 shr 40,0x#d5 shr 32 and 0FFh,0x#d5 shr 24 and 0FFh,0x#d5 shr 16 and 0FFh,0x#d5 shr 8 and 0FFh,0x#d5 and 0FFh
 }

struc ITaskBarList
 {
    .handle                  dd  ?
   virtual at 0
    .QueryInterface          dd  ?
    .AddRef                  dd  ?
    .Release                 dd  ?
    .HrInit                  dd  ?
    .AddTab                  dd  ?
    .DeleteTab               dd  ?
    .ActivateTab             dd  ?
    .SetActiveAlt            dd  ?
   end virtual
 }

CLSCTX_INPROC_SERVER        = 0x1
CLSCTX_INPROC_HANDLER       = 0x2
CLSCTX_LOCAL_SERVER         = 0x4
CLSCTX_INPROC_SERVER16      = 0x8
CLSCTX_REMOTE_SERVER        = 0x10
CLSCTX_INPROC_HANDLER16     = 0x20
CLSCTX_INPROC_SERVERX86     = 0x40
CLSCTX_INPROC_HANDLERX86    = 0x80
CLSCTX_ESERVER_HANDLER      = 0x100
CLSCTX_NO_CODE_DOWNLOAD     = 0x400
CLSCTX_NO_CUSTOM_MARSHAL    = 0x1000
CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000
CLSCTX_NO_FAILURE_LOG       = 0x4000
CLSCTX_DISABLE_AAA          = 0x8000
CLSCTX_ENABLE_AAA           = 0x10000
CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000

ID_EXIT = 0
ID_SHOW = 1
ID_HIDE = 2

IDD_COMDEMO = 1

section '.data' data readable writeable

 CLSID_TaskbarList GUID 56FDF344,FD6D,11D0,958A,006097C9A090
 IID_ITaskbarList GUID 56FDF342,FD6D,11D0,958A,006097C9A090

 ShellTaskBar ITaskBarList

section '.code' code readable executable

 start:

        invoke  CoInitialize,NULL
        invoke  CoCreateInstance,CLSID_TaskbarList,NULL,CLSCTX_INPROC_SERVER,IID_ITaskbarList,ShellTaskBar

        invoke  GetModuleHandle,0
        invoke  DialogBoxParam,eax,IDD_COMDEMO,HWND_DESKTOP,COMDemo,0

        comcall ShellTaskBar,Release

        invoke  ExitProcess,0

proc COMDemo,hwnd,msg,wparam,lparam
        push    ebx esi edi
        cmp     [msg],WM_INITDIALOG
        je      wminitdialog
        cmp     [msg],WM_COMMAND
        je      wmcommand
        cmp     [msg],WM_CLOSE
        je      wmclose
        xor     eax,eax
        jmp     finish
  wminitdialog:
        jmp     processed
  wmcommand:
        cmp     [wparam],BN_CLICKED shl 16 + ID_EXIT
        je      wmclose
        cmp     [wparam],BN_CLICKED shl 16 + ID_SHOW
        je      show
        cmp     [wparam],BN_CLICKED shl 16 + ID_HIDE
        jne     processed
  hide:
        comcall ShellTaskBar,HrInit
        comcall ShellTaskBar,DeleteTab,[hwnd]
        jmp     processed
  show:
        comcall ShellTaskBar,HrInit
        comcall ShellTaskBar,AddTab,[hwnd]
        comcall ShellTaskBar,ActivateTab,[hwnd]
        jmp     processed
  wmclose:
        invoke  EndDialog,[hwnd],0
  processed:
        mov     eax,1
  finish:
        pop     edi esi ebx
        return
endp

section '.idata' import data readable

  library kernel,'KERNEL32.DLL',\
          user,'USER32.DLL',\
          ole,'OLE32.DLL'

  import kernel,\
         GetModuleHandle,'GetModuleHandleA',\
         ExitProcess,'ExitProcess'

  import user,\
         DialogBoxParam,'DialogBoxParamA',\
         EndDialog,'EndDialog'

  import ole,\
         CoInitialize,'CoInitialize',\
         CoCreateInstance,'CoCreateInstance'

section '.rsrc' resource data readable

  directory RT_DIALOG,dialogs

  resource dialogs,\
           IDD_COMDEMO,LANG_ENGLISH+SUBLANG_DEFAULT,comdemo

  dialog comdemo,'COM demonstration',70,70,170,24,WS_CAPTION+WS_POPUP+WS_SYSMENU+DS_MODALFRAME
    dialogitem 'BUTTON','Show',ID_SHOW,4,4,45,15,WS_VISIBLE+WS_TABSTOP
    dialogitem 'BUTTON','Hide',ID_HIDE,54,4,45,15,WS_VISIBLE+WS_TABSTOP
    dialogitem 'BUTTON','Exit',ID_EXIT,120,4,45,15,WS_VISIBLE+WS_TABSTOP
  enddialog

; Extraido de  http: // board.flatassembler.net/index.php

http://board.flatassembler.net/topic.php?t=553
 
8  Programación / ASM / Re: ASM y MSN en: 19 Abril 2009, 04:32 am
Bueno por lo que he leido hay que crear un objeto, se hace con las apis, CoInitialize, CoCreateInstance, CoUninitialize...
en este foro hay un ejemplo en C++ http://foro.elhacker.net/programacion_general/utilizando_el_api_del_messenger_en_c-t24808.0.html;msg791907
estoy leyendo tambien esto que me he encontrado sobre objetos bastante interesante.
Introducción al modelo COM
http://upiia.uab.es/teach/a20383/practiques/practica2/com.htm
9  Programación / ASM / Re: ASM y MSN en: 19 Abril 2009, 02:44 am
alguna pista please?, alguna manera de usar un libreria desde asm llevo tiempo investigando y no encuentro nada gracias
10  Programación / ASM / Re: [SRC] [FASM] Controlar WebCam en: 19 Abril 2009, 02:41 am
Muy bueno el code se agradece, para hacer las fotos mas livianas puede usar la compresion BMP RLE8 las fotos pesan casi como JPG
Páginas: [1] 2 3 4
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines