Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Incidents
[Top] [All Lists]

Re: Tracking down random ICMP

Subject: Re: Tracking down random ICMP
Date: Tue, 23 Jan 2007 16:37:57 -0500 (EST)
On Tue, 23 Jan 2007, Valdis.Kletnieks@vt.edu wrote:

I'm not aware of any well-known userspace API that generates ICMP, so any userspace would have to be hand-crafting the packets itself. So what you're looking for is a process that has a raw socket open.

at least on Win32:

        http://msdn2.microsoft.com/en-us/library/aa366045.aspx

and then something along these lines:

HANDLE hIcmpFile;
char[] SendData = "Data Buffer";
LPVOID ReplyBuffer;

if ((hIcmpFile = IcmpCreateFile()) == INVALID_HANDLE_VALUE)
  printf("\tUnable to open file.\n");
else
  printf("\tFile created.\n");

// Declare and initialize variables
ReplyBuffer = (VOID*) malloc(sizeof(ICMP_ECHO_REPLY) + sizeof(SendData));
if ((dwRetVal = IcmpSendEcho(hIcmpFile,
  inet_addr("1.2.3.4"),               // jose@ fix to use a valid IP
  SendData, sizeof(SendData),
  NULL, ReplyBuffer,
  sizeof(SendData) + sizeof(ICMP_ECHO_REPLY),
  1000)) != 0) {
  PICMP_ECHO_REPLY pEchoReply = (PICMP_ECHO_REPLY)ReplyBuffer;
  printf("\tReceived %ld messages.\n", dwRetVal);
  printf("\tMessage: %s\n", pEchoReply->Data);
}
else {
  printf("\tCall to IcmpSendEcho() failed.\n");
  printf("\tError: %ld\n", GetLastError());
}

// END OF EXAPLE

anything that can trace API calls (ie debuggers and such) should be able to help you track down the process.

________
jose nazario, ph.d.                 jose@monkey.org
http://monkey.org/~jose/            http://monkey.org/~jose/secnews.html
                                    http://www.wormblog.com/

<Prev in Thread] Current Thread [Next in Thread>