Español
Foro

Ayuda! WM_TIMER es una Scheunentor!!!

 
¡Hola Profaner..

Sombrero veces alguien Lust a testen, si [...]  bajo XP generell gefixt es?

- Einen Service a programieren es dafür no necesariamente nötig, normales Programa con RUN AS (auch con PrivAktivate posible) como Admin starten y el Angreiferprogramm en un Account con eingeschränkten Rechten ausführen.
- In el Hauptprogramm una Temporizador einfügen (muß natürlich una Ventana haben).
- Im Angreiferprogramm una Procedimiento escribir, el una Messagebox ausgibt, el Proc pero no ausführen dejar.
- Mit ProcAddr el Adresse el Procedimiento ermitteln.
- Mit PostMessage (oder tal vez SendMessage) WM_TIMER con el Adresse el Procedimiento vom Angreiferprogramm a el Hauptprogramm senden.

Klapp el???

 
20.05.2005  
 



Hey, no Kommentare? Kein Interesse, el veces a testen??

Yo übersetze veces: Laut des Artikels es posible, con el Message WM_TIMER una Programa, el una Temporizador benutzt y una propio Ventana ha, dazu a bewegen, eigenen Code auszuführen.
Laufen esta Programas en una otro Account como en mi (z.B. como interaktiver Service), würden esta Programas con el Rechten dieses otro Accounts ausgeführt voluntad.
Man loggt se quasi como Invitado una, envía a el Handle des Hauptfensters uno laufenden Virenscanners oder uno Firewall una WM_TIMER Message y kann se entonces una selbstgeschriebene PROC Administratorprivilegien verschaffen.
Führt el no el gesamte Windows Sicherheit en el Absurde?
 
20.05.2005  
 



Pida a los Artikel auch sólo sobrevolados - aber auch así verstanden como Usted AH.

Yo escribir grade al ACP el ODoku - Yo debería otra vez genau lesen si hierbei auch el ProcAddr externer Progs mgl. es - oder sólo el ProcAddr eigener Procs.

Salve.
 
20.05.2005  
 




Frank
Abbing
Hi,

Yo habs getestet. Zumindest bajo XP Home se no el Prozedure des Zielprogramms en el Quellprogramm ausgeführt! Stattdessen se el Quellprogramm siempre otra vez comenzó!!!

Im Anhang mi beiden Testprogramme. Zum Testen el Quellprogramm zuerst starten y laufen dejar. Dann el Zielprogramm starten. Normalerweise debería se ahora - así Andreas bastante ha - en el Quellprogramm jede Sekunde una Messagebox abierto. En me es el no así. Bin veces gespannt, como se el con otro Windowsversionen verhält...

3 kB
Hochgeladen:20.05.2005
Ladeanzahl38
Descargar
 
20.05.2005  
 



Selbes en me: xph,xpp!

Bestimmt irgend solch una kumulatives Actualización

Vorrausgesetzt natürlich Franks Demo entspricht el Behaupteten.

Salve,
 
20.05.2005  
 




Frank
Abbing
Hab intenta el Procedimiento-Adresse encima tmprc y encima wTimerID (aktuelle Fassung) a transferencia. Beides el gleiche Ergebniss...
Hier el Quellcodes:

Quelle:
KompilierenMarcaSeparación
.386                   ; minimum processor needed for 32 bit
.model flat, stdcall   ; FLAT memory model & STDCALL calling
option casemap :none   ; set code to case sensitive
include masm32includewindows.inc
include masm32includeuser32.inc
include masm32includekernel32.inc
includelib masm32libuser32.lib
includelib masm32libkernel32.lib
include    D:PROGRAMMEmasm32includedebug.inc
includelib D:PROGRAMMEmasm32libdebug.lib
szText MACRO Name, Text:VARARG
LOCAL lbl
jmp lbl
Name db Text,0
lbl:
ENDM
m2m MACRO M1, M2
push M2
pop  M1
ENDM
return MACRO arg
mov eax, arg
ret
ENDM
WinMain PROTO :DWORD,:DWORD,:DWORD,:DWORD
WndProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
TopXY PROTO   :DWORD,:DWORD
.data
szDisplayName db "Quellfenster mit Timer",0
CommandLine   dd 0
hWnd          dd 0
hInstance     dd 0
timer         dd 0
testit        db "Test",0
.code
start:
invoke GetModuleHandle, NULL ; provides the instance handle
mov hInstance, eax
invoke GetCommandLine        ; provides the command line address
mov CommandLine, eax
invoke WinMain,hInstance,NULL,CommandLine,SW_SHOWDEFAULT
invoke ExitProcess,eax       ; cleanup & return to operating system
WinMain proc hInst     :DWORD,
hPrevInst :DWORD,
CmdLine   :DWORD,
CmdShow   :DWORD
LOCAL wc   :WNDCLASSEX
LOCAL msg  :MSG
LOCAL Wwd  :DWORD
LOCAL Wht  :DWORD
LOCAL Wtx  :DWORD
LOCAL Wty  :DWORD
szText szClassName,"Generic_Class"
mov wc.cbSize,         sizeof WNDCLASSEX
mov wc.style,          CS_HREDRAW or CS_VREDRAW
or CS_BYTEALIGNWINDOW
mov wc.lpfnWndProc,    offset WndProc      ; address of WndProc
mov wc.cbClsExtra,     NULL
mov wc.cbWndExtra,     NULL
m2m wc.hInstance,      hInst               ; instance handle
mov wc.hbrBackground,  COLOR_BTNFACE+1     ; system color
mov wc.lpszMenuName,   NULL
mov wc.lpszClassName,  offset szClassName  ; window class name
invoke LoadIcon,hInst,500    ; icon ID   ; resource icon
mov wc.hIcon,          eax
invoke LoadCursor,NULL,IDC_ARROW         ; system cursor
mov wc.hCursor,        eax
mov wc.hIconSm,        0
invoke RegisterClassEx, ADDR wc     ; register the window class
mov Wwd, 500
mov Wht, 350
invoke GetSystemMetrics,SM_CXSCREEN ; get screen width in pixels
invoke TopXY,Wwd,eax
mov Wtx, eax
invoke GetSystemMetrics,SM_CYSCREEN ; get screen height in pixels
invoke TopXY,Wht,eax
mov Wty, eax
invoke CreateWindowEx,WS_EX_OVERLAPPEDWINDOW,
ADDR szClassName,
ADDR szDisplayName,
WS_OVERLAPPEDWINDOW,
Wtx,Wty,Wwd,Wht,
NULL,NULL,
hInst,NULL
mov   hWnd,eax  ; copy return value into handle DWORD
invoke LoadMenu,hInst,600                 ; load resource menu
invoke SetMenu,hWnd,eax                   ; set it to main window
invoke ShowWindow,hWnd,SW_SHOWNORMAL      ; display the window
invoke UpdateWindow,hWnd                  ; update the display
StartLoop:
invoke GetMessage,ADDR msg,NULL,0,0         ; get each message
cmp eax, 0                                  ; exit if GetMessage()
je ExitLoop                                 ; returns zero
invoke TranslateMessage, ADDR msg           ; translate it
invoke DispatchMessage,  ADDR msg           ; send it to message proc
jmp StartLoop
ExitLoop:
return msg.wParam
WinMain endp
; #########################################################################
WndProc proc hWin   :DWORD,
uMsg   :DWORD,
wParam :DWORD,
lParam :DWORD

.if uMsg == WM_COMMAND

    .if wParam == 1000

        invoke SendMessage,hWin,WM_SYSCOMMAND,SC_CLOSE,NULL

    .elseif wParam == 1900

        szText TheMsg,"Assembler, Pure & Simple"
        invoke MessageBox,hWin,ADDR TheMsg,ADDR szDisplayName,MB_OK

    .endif

.elseif uMsg == WM_TIMER

    .if wParam!=111

        invoke SetTimer,hWnd,111,1000,wParam

    .endif

.elseif uMsg == WM_DESTROY

    invoke PostQuitMessage,NULL
    return 0

.endif

invoke DefWindowProc,hWin,uMsg,wParam,lParam
ret
WndProc endp
; ########################################################################
TopXY proc wDim:DWORD, sDim:DWORD
shr sDim, 1      ; divide screen dimension by 2
shr wDim, 1      ; divide window dimension by 2
mov eax, wDim    ; copy window dimension into eax
sub sDim, eax    ; sub half win dimension from half screen dimension
return sDim
TopXY endp
; ###################################################################
end start

Ziel:
KompilierenMarcaSeparación
.386                   ; minimum processor needed for 32 bit
.model flat, stdcall   ; FLAT memory model & STDCALL calling
option casemap :none   ; set code to caso sensitive
include masm32includewindows.inc
include masm32includeuser32.inc
include masm32includekernel32.inc
includelib masm32libuser32.lib
includelib masm32libkernel32.lib
include    D:PROGRAMMEmasm32includedebug.inc
includelib D:PROGRAMMEmasm32libdebug.lib
szText MACRO Name, Texto:VARARG
LOCAL lbl
jmp lbl
Name db Texto,0
lbl:
ENDM
m2m MACRO M1, M2
push M2
pop  M1
ENDM
volver MACRO arg
mov eax, arg
ret
ENDM
WinMain PROTO :DWORD,:DWORD,:DWORD,:DWORD
WndProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
TopXY PROTO   :DWORD,:DWORD
.data
szDisplayName db "Zielfenster sin Timer",0
CommandLine   dd 0
hWnd          dd 0
hInstance     dd 0
timer         dd 0
testit        db "Test",0
fname         db "Quellfenster con Timer",0
cname         db "Generic_Class",0
.code
start:
invoke GetModuleHandle, NULL ; provides the instance handle
mov hInstance, eax
invoke GetCommandLine        ; provides the command line address
mov CommandLine, eax
invoke WinMain,hInstance,NULL,CommandLine,SW_SHOWDEFAULT
invoke ExitProcess,eax       ; cleanup & volver to operating system
timerproc proc
invoke MessageBox,0,addr testit,addr testit,64
ret
timerproc endp
WinMain proc hInst     :DWORD,
hPrevInst :DWORD,
CmdLine   :DWORD,
CmdShow   :DWORD
LOCAL wc   :WNDCLASSEX
LOCAL msg  :MSG
LOCAL Wwd  :DWORD
LOCAL Wht  :DWORD
LOCAL Wtx  :DWORD
LOCAL Wty  :DWORD
szText szClassName,"Generic_Class"
mov wc.cbSize,         sizeof WNDCLASSEX
mov wc.style,          CS_HREDRAW or CS_VREDRAW
or CS_BYTEALIGNWINDOW
mov wc.lpfnWndProc,    offset WndProc      ; address of WndProc
mov wc.cbClsExtra,     NULL
mov wc.cbWndExtra,     NULL
m2m wc.hInstance,      hInst               ; instance handle
mov wc.hbrBackground,  COLOR_BTNFACE+1     ; system color
mov wc.lpszMenuName,   NULL
mov wc.lpszClassName,  offset szClassName  ; window class name
invoke LoadIcon,hInst,500    ; icon ID   ; resource icon
mov wc.hIcon,          eax
invoke LoadCursor,NULL,IDC_ARROW         ; system cursor
mov wc.hCursor,        eax
mov wc.hIconSm,        0
invoke RegisterClassEx, ADDR wc     ; register the window class
mov Wwd, 500
mov Wht, 350
invoke GetSystemMetrics,SM_CXSCREEN ; get screen width en pixels
invoke TopXY,Wwd,eax
mov Wtx, eax
invoke GetSystemMetrics,SM_CYSCREEN ; get screen height en pixels
invoke TopXY,Wht,eax
mov Wty, eax
invoke CreateWindowEx,WS_EX_OVERLAPPEDWINDOW,
ADDR szClassName,
ADDR szDisplayName,
WS_OVERLAPPEDWINDOW,
Wtx,Wty,Wwd,Wht,
NULL,NULL,
hInst,NULL
mov   hWnd,eax  ; copy volver value into handle DWORD
invoke LoadMenu,hInst,600                 ; load resource menu
invoke SetMenu,hWnd,eax                   ; set it to main window
invoke ShowWindow,hWnd,SW_SHOWNORMAL      ; display the window
invoke UpdateWindow,hWnd                  ; update the display
invoke FindWindow,addr cname,addr fname

.if eax!=0

    invoke SendMessage,eax,WM_TIMER,addr timerproc,addr timerproc

.endif

StartLoop:
invoke GetMessage,ADDR msg,NULL,0,0         ; get each mensaje
cmp eax, 0                                  ; exit if GetMessage()
je ExitLoop                                 ; returns zero
invoke TranslateMessage, ADDR msg           ; translate it
invoke DispatchMessage,  ADDR msg           ; send it to mensaje proc
jmp StartLoop
ExitLoop:
volver msg.wParam
WinMain endp
WndProc proc hWin   :DWORD,
uMsg   :DWORD,
wParam :DWORD,
lParam :DWORD

.if uMsg == WM_COMMAND

    .if wParam == 1000

        invoke SendMessage,hWin,WM_SYSCOMMAND,SC_CLOSE,NULL

    .elseif wParam == 1900

        szText TheMsg,"Assembler, Pure & Simple"
        invoke MessageBox,hWin,ADDR TheMsg,ADDR szDisplayName,MB_OK

    .endif

.elseif uMsg == WM_DESTROY

    invoke PostQuitMessage,NULL
    volver 0

.endif

invoke DefWindowProc,hWin,uMsg,wParam,lParam
ret
WndProc endp
; ########################################################################
TopXY proc wDim:DWORD, sDim:DWORD
shr sDim, 1      ; divide screen dimension by 2
shr wDim, 1      ; divide window dimension by 2
mov eax, wDim    ; copy window dimension into eax
sub sDim, eax    ; sub half win dimension from half screen dimension
volver sDim
TopXY endp
; ########################################################################
end start
 
20.05.2005  
 




CB
XP Pro SP2: selbes Resultat como en Franco.
 
XProfan 8/9.1, Win XP, AMD 64/3200
21.05.2005  
 



Yo habe el Sache veces con uno otro Message y innerhalb uno lokalen Prozesses getestet. Dabei se wirklich el angegebene Adresse angesprungen.

Zum Glück va el also doch no así simplemente:
Jeder Prozess ha sí (si yo lo correcto verstanden habe) seine privaten Adressbereich. Un ermittelte Adresse bezieht se also sí siempre sólo en el aktuellen Prozess. Damit el Prozess, el Yo attackieren voluntad, weiß welche Adresse él anspringen se, se uno wohl algo untersuchen, mappen y rechnen necesario. In el Artikel es sí auch de una Debugger el Rede...
 
21.05.2005  
 




Jörg
Sellmeyer
En me passiert gar nix.
Win98SE / XProfan9
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
21.05.2005  
 



¡Hola Jörg...

Kann auch no, Adresse paßt no.
 
21.05.2005  
 




Frank
Abbing
Hi,

> Kann auch no, Adresse paßt no.

El Adresse passt ya. Posesiones el überprüft. Das Sourceprogramm erhält tatsächlich genau el Adresse. Nur biegt Windows beim Installieren des Timers bajo XP el Adresse en en el Startpunkt des eigenen Programms. Bajo 98 se el Temporizador dagegen anscheinend nada comenzó.
 
21.05.2005  
 



¡Hola Franco...

Yo vermute veces, el el Adresse , el uno como bekommt, una virtuelle Adresse es, el siempre en el aktuellen Prozess bezogen es. (Sehe Yo el correcto? Mit deinen MASM Kenntnissen wirst Si es usted el en jedenfall mejor wissen como Yo.) Yo vermute, el uno zuerst una vez el reale Adrese el Prtozedur en el Speicher haben muß. Danach podría uno evtl. el erhaltene Adresse en el a attackierenden Prozeß umrechnen, dessen reale Speicheradresse uno dazu aber auch sólo una vez kennen müßte. Como siehst Si es usted el?

Ach sí..., el Message EM_SETWORDBREAKPROC se ebenfalls dazu genutzt voluntad puede, fremden Code anzuspringen - con el läßt se el evtl. mejor testen.
 
21.05.2005  
 




Respuesta


Título del Tema, max. 100 Signo.
 

Systemprofile:

Kein Systemprofil creado. [anlegen]

XProfan:

 Contribución  Font  Smilies  ▼ 

Bitte registro en una Contribución a verfassen.
 

Tema opciones

8.790 Views

Untitledvor 0 min.
Peter Max Müller19.10.2017
Donnie14.04.2013
Claus de Lieth08.02.2013
Daniel Mittermeier29.09.2012
Más...

Themeninformationen



Admins  |  AGB  |  Applications  |  Autores  |  Chat  |  Política de Privacidad  |  Descargar  |  Entrance  |  Ayuda  |  Merchantportal  |  Pie de imprenta  |  Mart  |  Interfaces  |  SDK  |  Services  |  Juegos  |  Búsqueda  |  Support

Ein Projekt aller XProfan, el lo son!


Mi XProfan
Privado Noticias
Eigenes Ablageforum
Temas-Merkliste
Eigene Beiträge
Eigene Temas
Zwischenablage
Cancelar
 Deutsch English Français Español Italia
Traducciones

Política de Privacidad


Wir uso Cookies sólo como Session-Cookies wegen el technischen Notwendigkeit y en uns hay no Cookies de Drittanbietern.

Wenn du hier en unsere Webseite klickst oder navigierst, stimmst du unserer Erfassung de Informationen en unseren Cookies en XProfan.Net a.

Weitere Informationen a unseren Cookies y dazu, como du el Kontrolle darüber behältst, findest du en unserer nachfolgenden Datenschutzerklärung.


einverstandenDatenschutzerklärung
Yo möchte no Cookie