EasyHook recv doesn't “hook” all packets

前端 未结 3 1764
粉色の甜心
粉色の甜心 2021-02-10 14:02

I managed to write a semiworking EasyHook example that hooks recv function. I wrote a form, added a WebBrowser component, and started the application. The problem is, I get the

相关标签:
3条回答
  • 2021-02-10 14:31

    Problem Solved. The line that created trouble was

    CreateRecvHook.ThreadACL.SetExclusiveACL(new Int32[] { 0 });
    

    I changed it to

    CreateRecvHook.ThreadACL.SetInclusiveACL(new Int32[] { 0 });
    

    and now everything works just fine. Thanks everybody :)

    0 讨论(0)
  • 2021-02-10 14:31

    There are a lot of different functions used with sockets. Maybe the plugin is not using the function named recv. Off the top of my head I can think of recvfrom, recvmsg, WSARecv, WSARecvFrom, WSARecvMsg, ReadFile, ReadFileEx.

    Then, the plugin could be doing requests with overlapped I/O (possibly complicated by completion routines or completion ports), in which case the data isn't stored during the e.g. ReadFile function call but at some later time. Hooking those would be considerably more challenging.

    0 讨论(0)
  • 2021-02-10 14:36

    I wrote a tool dumping http using sharppcs in c#. It uses the winpcap-driver. I think it is more reliable tan apihooks.

    HTTPSaver (with sources)
    SharpPcap
    Winpcap

    0 讨论(0)
提交回复
热议问题