Hack Forums
[C] Hijacking Windows Live Messenger Messages - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C] Hijacking Windows Live Messenger Messages (/showthread.php?tid=2472450)



Hijacking Windows Live Messenger Messages - Feminist - May 6, 2012

I wrote this about two years ago, it was just pseudo code that I finished off

It was for WLM 2009 I believe, install the hook however you want

Code
int WINAPI MySend(SOCKET s, const char* buf, int len, int flags)
{
    //Info for messenger 2009
    /*
        MSG msgnumber N num        <- Header
        No content-length to be edited
        CR LF CR LF
        0D 0A 0D 0A <message>

      if( *(DWORD*)buf == 0x2047534d ) //header
    {
        char maxMessage[600] = "";
        strcat(maxMessage, buf);
        strcat( (maxMessage + len), "This message has been replaced via hook.\0");
        return pSend(s, maxMessage, strlen(maxMessage), flags);
    }
    */

    return( pSend(s, buf, len, flags) );
}



* - Gone With The Wind - May 7, 2012

(May 6, 2012 11:10 PM)scriptkiddy Wrote:  I wrote this about two years ago, it was just pseudo code that I finished off

It was for WLM 2009 I believe, install the hook however you want

Code
int WINAPI MySend(SOCKET s, const char* buf, int len, int flags)
{
    //Info for messenger 2009
    /*
        MSG msgnumber N num        <- Header
        No content-length to be edited
        CR LF CR LF
        0D 0A 0D 0A <message>

      if( *(DWORD*)buf == 0x2047534d ) //header
    {
        char maxMessage[600] = "";
        strcat(maxMessage, buf);
        strcat( (maxMessage + len), "This message has been replaced via hook.\0");
        return pSend(s, maxMessage, strlen(maxMessage), flags);
    }
    */

    return( pSend(s, buf, len, flags) );
}

Doesn't the header have something that acts like a content-Len field you must change?


* - iVision - May 7, 2012

How could you ever use this? I mean what is the addres and such of the wlm server.


* - Feminist - May 7, 2012

(May 7, 2012 06:10 AM)Element Products Wrote:  Doesn't the header have something that acts like a content-Len field you must change?

You don't have to modify the content length

(May 7, 2012 08:35 AM)iVision Wrote:  How could you ever use this? I mean what is the addres and such of the wlm server.

Hook send however you want


* - Gone With The Wind - May 7, 2012

(May 7, 2012 09:00 AM)scriptkiddy Wrote:  You don't have to modify the content length

Never knew that, I wrote a big class to rebuild the packets from scratch 🤐.


* - anonslu - May 9, 2012

excuse me sir is this the c programming language


* - Feminist - May 9, 2012

(May 9, 2012 06:18 AM)anonslu Wrote:  excuse me sir is this the c programming language

This is just the hook, you have to install it. Will work for both C and C++


* - dr0ne - May 9, 2012

Kinda pointless without a proper hooking engine.


* - Feminist - May 9, 2012

(May 9, 2012 02:00 PM)dr0ne Wrote:  Kinda pointless without a proper hooking engine.

Not really, it just means that noobs won't copy paste it and it won't show up on the market place in a few days from now lol


* - dr0ne - May 9, 2012

(May 9, 2012 02:34 PM)scriptkiddy Wrote:  Not really, it just means that noobs won't copy paste it and it won't show up on the market place in a few days from now lol

I meant pointless in the fact that people won't know how to implement it/what it's even for.

Nice share nonetheless 🤝


* - Gone With The Wind - May 10, 2012

(May 9, 2012 02:40 PM)dr0ne Wrote:  I meant pointless in the fact that people won't know how to implement it/what it's even for.

Nice share nonetheless 🤝

If they're too stupid to write a simple hooking engine this code should not bother them. If he releases a hooking engine there will be a sudden surge C++ rootkits for sale.