| View previous topic :: View next topic |
| Author |
Message |
dezuzi Expert Cheater
Reputation: 0
Joined: 09 Aug 2006 Posts: 146 Location: In your washing machine
|
Posted: Sat Sep 30, 2006 7:59 am Post subject: How to block one "send" ? My method won't work. |
|
|
Putting a return right in the beginning of the "send" function in the assembly editor just crashes the application, ive tried some other things, like editing the length of the message (which confuses the server and somewhat kills my ability to send more messages) or the message itself, which does pretty much the same but im not going to deep into this.
Is there any way of rerouting all "send" functions to not send anything at all?
It is hard for me to log it all because messages are sent even when the breakpoint is active (which are quite a lot) which contain no data at all.
So basically all i need to know is how to reroute a "send" function, whitout sending a message, that does not crash my application.
I hope someone can help me with this, or give me some tips
EDIT: it all sounds a bit unspecific, im too tired right now ill try to make it more clear tomorrow
|
|
| Back to top |
|
 |
dezuzi Expert Cheater
Reputation: 0
Joined: 09 Aug 2006 Posts: 146 Location: In your washing machine
|
Posted: Sun Oct 01, 2006 3:01 pm Post subject: |
|
|
BUMP!
in other words, prevent a call from being made, AND not crashing the application itself
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25962 Location: The netherlands
|
Posted: Sun Oct 01, 2006 3:04 pm Post subject: |
|
|
try replacing the function with
xor eax,eax
ret "parameter count in bytes"
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
dezuzi Expert Cheater
Reputation: 0
Joined: 09 Aug 2006 Posts: 146 Location: In your washing machine
|
Posted: Sun Oct 01, 2006 3:17 pm Post subject: |
|
|
| i just did and it crashes in a different way, now i actually get one of those windows debug windows telling me it crashed, would it be better if gave you some code?
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25962 Location: The netherlands
|
Posted: Sun Oct 01, 2006 3:30 pm Post subject: |
|
|
e.g in case of winsock's send:
xor eax,eax
ret 10
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
dezuzi Expert Cheater
Reputation: 0
Joined: 09 Aug 2006 Posts: 146 Location: In your washing machine
|
Posted: Sun Oct 01, 2006 3:36 pm Post subject: |
|
|
this is what i have at the moment
i might be doing something wrong if so i wouldnt know what, im reading alot about assembly right know but i cant seem to find what i need, i appreaciate your help Dark Byte
But this still crashes me
[code]
SEND (ws2_32.dll) CALLEe: 0040323c (call 00403fa0)
SEND FUNCTION
replaced*71ab1af4 - 55 - push ebp
replaced*71ab1af5 - 8b ec - mov ebp,esp
replaced*71ab1af7 - 83 ec 10 - sub esp,10
71ab1afa - 56 - push esi
71ab1afb - 57 - push edi
71ab1afc - 33 ff - xor edi,edi
71ab1afe - 81 3d 1c 20 ac 71 93 1c ab 71 - cmp [71ac201c],_wsafdisset+118
71ab1b08 - 0f 84 85 3d 00 00 - je wsasend+171
71ab1b0e - 8d 45 f8 - lea eax,[ebp-08]
71ab1b11 - 50 - push eax
71ab1b12 - e8 69 f7 ff ff - call ordinal99+1280
71ab1b17 - 3b c7 - cmp eax,edi
71ab1b19 - 89 45 fc - mov [ebp-04],eax
71ab1b1c - 0f 85 c4 94 00 00 - jne wsasetevent+1ed2
71ab1b22 - ff 75 08 - push [ebp+08]
71ab1b25 - e8 26 f7 ff ff - call ordinal99+1250
71ab1b2a - 8b f0 - mov esi,eax
71ab1b2c - 3b f7 - cmp esi,edi
71ab1b2e - 0f 84 ab 94 00 00 - je wsasetevent+1ecb
71ab1b34 - 8b 45 10 - mov eax,[ebp+10]
71ab1b37 - 53 - push ebx
71ab1b38 - 8d 4d fc - lea ecx,[ebp-04]
71ab1b3b - 51 - push ecx
71ab1b3c - ff 75 f8 - push [ebp-08]
71ab1b3f - 8d 4d 08 - lea ecx,[ebp+08]
71ab1b42 - 57 - push edi
71ab1b43 - 57 - push edi
[/code]
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)
71AB1AF4:
jmp newmem
nop
returnhere:
newmem: //this is allocated memory, you have read,write,execute access
//place your code here
xor eax,eax
ret 0010
originalcode:
push ebp
mov ebp,esp
sub esp,10
exit:
jmp returnhere
[/code][/code]
|
|
| Back to top |
|
 |
|