Menu
Navigation
Home
Forum
Search
Links
Fun Stuff
Comical Banners
Downloads
Jokes
Uselessfacts
Weird Laws
Pics
Claim to fame
USA 2004
Edinburgh 2005
Bristol 2005
Italy 2005
Lugano 2005
Minneapolis 2006
Lugano 2006
London 2006
Longleat House 2006
Paris 2006
Nashville 2007
The Peak District 2007
New Mexico 2007
Silverstone 2007
Geneva 2007
Silverstone 2008
Florida 2008
Projects
Adding Custom Songs to Guitar Hero III
BOINC FAQ Service
BOINC Stats Services
Cancer Stats Service
Fractal Applet
JDBC-ODBC Tutorial
MC68000 IDE
Maze Applet
NetSend
PCF FAQ
SAAS
Seti Graph
Seti Stats Service
TLL Compiler Applet
Wii GH3 Guitar with PC version

NetSend by Neil Munday

I wrote this program in August 2003 out of curiosity to discover how certain people generate the annoying Messenger pop-up messages in Windows XP, 2000 and NT (see below for an example). The Messenger service of these operating systems is not to be confused with either MSN or Windows Messenger.

PopUp

You may not have experienced these messages if you are running the built in firewall of XP or any other available firewall. The Messenger service is run by default and is used to send and receive messages across any network. The service listens on port 135 which is blocked by most firewalls as this port is used as part of NetBIOS and for the Windows RPC (Remote Procedure Call) service. A flaw in the latter service was responsible for the spread of the MSBlast virus.

How does it work?

You can send messages using the Messenger service via the "net" program of Windows. To send a message to another computer, open a command window and then specify either the host's name or IP address like so:

net send 127.0.0.1 hello world!

net send workpc hello world!

You can also send messages to an entire workgroup (a technique used by commercial spammers).

net send workgroup hi!

However, the from host of the message will be the name of the sending host. Therefore, the receiver could easily send you a message back or trace the message.

Fortunately, it is relatively simple to send "anonymous" messages using the Messenger service. I use the term "anonymous" loosely as it could be possible for the receiver to find out the sender's IP address if they have software that monitors their network connection (e.g. a firewall).

Sending anonymous messages

By using the Windows API and either Visual Basic or Visual C++, it is possible to create a program to perform such a task. By using a function - NetMessageBufferSend - provided by the "netapi32" library, one can generate Messenger messages.

In VB the function is declared as follows:

Private Declare Function NetMessageBufferSend Lib "netapi32.dll" ( _
        lpServerName As Any, _
        lpMsgName As Byte, _
        lpFromName As Any, _
        lpBuf As Byte, _
        ByVal lnBufLen As Long _
) As Long

lpServerName is a pointer to a constant Unicode string specifying the name of the server on which the function is to execute. The string must begin with \\. If this parameter is NULL, the local computer is used.

lpMsgName is a pointer to a constant Unicode string specifying the message alias (recipient) to which the message buffer should be sent.

lpFromName is pointer to a constant Unicode string specifying who the message is from. If this parameter is NULL, the message is sent from the local computer name. This is the parameter that allows us to send messages anonymously.

lpBuf is a pointer to a buffer that contains the body of the message to be sent.

lnBufLen specifies a DWORD value that contains the length (in bytes) of the message text pointed to by the lpBuf parameter.

This function returns 1 if the message was sent.

The developed program

Using this function as the main part of the program, it was possible to create a user interface to allow users to send messages. The user interface can be seen below:

NetSend

This program will only work on Windows XP, 2000 or NT. It can be download here.

This program is not to be used for spamming or any other unauthorised actions.

Copyright © Neil Munday 2003