|
-
Dec 19th, 2008, 02:24 PM
#1
Thread Starter
New Member
ws2_32.dll hooking
Hi,
Basically, I have an app that communicates with a server. I need a way to monitor all the sent and received packets that are being transmitted through the app. I've been killing myself the past two days trying to figure a way to hook into ws2_32.dll to monitor these packets but I can't find a way! I'm not a VB expert, but I'm sure for someone else here, this is 5 minutes work!
Thanks in advance!!
-
Dec 20th, 2008, 04:40 AM
#2
Re: ws2_32.dll hooking
It may or may not be 5 minutes work, but I suspect you're unlikely to get a response since the methodology required would lend itself to hacking into C/S applications which would not be something that anyone (with good intentions) would post on a public forum such as this (IMHO).
I'm not suggesting for a moment that your intentions are questionable, just that somebody else reading the soultion may have other ideas!
-
Dec 20th, 2008, 05:01 AM
#3
Thread Starter
New Member
Re: ws2_32.dll hooking
Since I would only need to log the packets being sent and received through my app, I can hardly see how it would be some sort of malicious software. Would it be possible for help via PM?
-
Dec 20th, 2008, 05:06 AM
#4
Re: ws2_32.dll hooking
The only constructive suggestion I can make is, that as it's 'your app' you modify it so that as data is transmitted and received you log the data to a file. I assume it's using Winsock so the necessary changes would be trivial.
-
Dec 23rd, 2008, 02:10 PM
#5
Re: ws2_32.dll hooking
Thats what I was going to say, if its your own application then cant you just build the monitoring/logging functionality into your app?
Also, I dont quite see why Doogle thinks this could be used in a malicious way as its just monitoring packets - I assume you mean literally just counting them or something, not inspecting their contents?
As for hooking that dll, try the API forum and post whatever code you have got so far
-
Dec 23rd, 2008, 05:58 PM
#6
Re: ws2_32.dll hooking
If you are looing for a packet sniffer then you may want to have a look at this, you could try modifying it to suit your needs.
-
Dec 25th, 2008, 02:12 AM
#7
Re: ws2_32.dll hooking
My concern was, and is, the use of the work "Packets". In order to get at Packets you have to be down at the TCP and / or IP levels as normally, things like Winsock never see a Packet, only the payload.
If you're at the Packet level then you're able to see all Packets, not just the ones you want to look at. That presents a Security threat, since you can modify the contents, spoof the IP address etc. Not something we should (IMHO) be publishing here for all and sundry to see.
-
Dec 25th, 2008, 09:02 PM
#8
Thread Starter
New Member
Re: ws2_32.dll hooking
I basically need a way to be able monitor the packets that get transferred between my app and the internet. IE: If I had a WebBrowser control and load a page, I should be able to see a few GET packets being transferred.
I've seen this done in Delphi where they person hooked ws2_32.dll and monitored everything that gets sent between the application and ws2_32.dll. I just need a way to be able to do something similar in VB.
If it is too "unsafe" to post it, can someone at least help me out via PM or MSN?
-
Dec 25th, 2008, 09:10 PM
#9
Re: ws2_32.dll hooking
Have you tried looking at the link I provided in post #6?
-
Dec 25th, 2008, 09:12 PM
#10
Thread Starter
New Member
Re: ws2_32.dll hooking
Yes I did, but it's too complicated. I don't need to monitor ALL connections, just the data being transferred from my app and nothing else.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|