🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7068

Re: Hooking Winsock Functions

#7068
From: John Smith
Date: Sat, 19 Mar 2005 16:50
41 lines
2712 bytes
Any source code examples available which do NOT rely on thirdparty, 
compiled, exes, libs or dlls?  If not, sounds like a plausable hack...

Regards

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:41b414db$1@newsgroups.borland.com...
>
> "KR" <kr@nospamme.net> wrote in message
> news:pan.2004.12.04.14.44.41.939127@nospamme.net...
>
>> No driver needed.  Do a google search on "api hooking" and
>> "dll injection".  Can be complicated, but not as much as
>> writing a driver (plus there are tools to simplify this).
>
> Using API hooking is much more complicated, not to mentio more dangerous,
> than using a driver.  The NDIS architecture is specifically designed for
> allowing such hooking.  API hooking, on the other hand, is a programming
> hack, it is not the offcial way to approach this issue.
>
>> Most winsock-intercepting programs (firewalls, etc) use this
>> method I think, and don't resort to installing drivers.
>
> That is completely wrong.  They do take the driver approach.  For one 
> thing,
> it is much easier to install and uninstall.  Just install a single file 
> onto
> the machine and set up a few official config values so that WinSock loads
> the driver.  Using API hooking, on the other hand, you have to use a 
> global
> DLL hook that is installed into every process, altering that process's
> memory in order to redirect the function calls to new memory that the DLL
> owns.  That can be VERY dangerous, not to mention that it triggers
> anti-virus protections because it is virus-like behavior to alter a
> program's memory.  Second, it is much more accurate and reliable from a
> programming standpoint to use a driver than hooking API calls anyway.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <423c5867@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4198c26d@newsgroups.borland.com> <pan.2004.12.04.14.44.41.939127@nospamme.net> <41b414db$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,65f5aa4e8e0f93de
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "John Smith" <assemblywizard@gmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4198c26d@newsgroups.borland.com> <pan.2004.12.04.14.44.41.939127@nospamme.net> <41b414db$1@newsgroups.borland.com>
Subject: Re: Hooking Winsock Functions
Date: Sat, 19 Mar 2005 08:50:41 -0800
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 66.81.210.111
Message-ID: <423c5867@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1111251047 66.81.210.111 (19 Mar 2005 08:50:47 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail