Government Security
Network Security Resources

Jump to content

Photo

Keyboard Hook (Keylogger)

- - - - - server trojan c# keylogger
  • Please log in to reply
2 replies to this topic

#1 colinsouth

colinsouth

    Private First Class

  • Members
  • 29 posts

Posted 20 November 2009 - 09:28 PM

So iv made my C# trojan n its working a treat, but I am currently working on a keylogger and cant find out how to have the server monitor each keypress??

I have the client/server stuff set up for it, just need a way to add each keystroke to a string or byte[].

Anyone know how i can acheive this?

Cheers in advance.

#2 BobS0327

BobS0327

    Private First Class

  • Members
  • 27 posts

Posted 22 November 2009 - 02:17 PM

So iv made my C# trojan n its working a treat, but I am currently working on a keylogger and cant find out how to have the server monitor each keypress??

I have the client/server stuff set up for it, just need a way to add each keystroke to a string or byte[].

Anyone know how i can acheive this?

Cheers in advance.


One option would be to use StreamWriter.


using System;
using System.IO;

class Test 
{
	public static void Main() 
	{
    	string path = @"c:\temp\MyLogger.txt";
    	if (!File.Exists(path)) 
    	{
        	// File does not exist, create a file to write to.
        	using (StreamWriter sw = File.CreateText(path)) 
        	{
            	sw.Write("Tab");
            	sw.Write("[");
            	sw.Write("}");
        	}	
    	}
    	else
    	{
        	// File exists, append to it.
        	using (StreamWriter sw = File.AppendText(path)) 
        	{
            	sw.Write("Space");
            	sw.Write("A");
            	sw.Write("]");
        	}
    	}	
	}
}





#3 AgentSmithers

AgentSmithers

    Private First Class

  • Members
  • 26 posts

Posted 12 May 2011 - 10:42 AM

So iv made my C# trojan n its working a treat, but I am currently working on a keylogger and cant find out how to have the server monitor each keypress??

I have the client/server stuff set up for it, just need a way to add each keystroke to a string or byte[].

Anyone know how i can acheive this?

Cheers in advance.

Yeah just keep in mind if you use something like .NET for writing apps just be sure the computer its going on has the framework, Whenever I write .NET i use framework 2.0 to ensure the best chance it will run.
Http://ControllingTheInter.Net
My General Computer Forum, From Security To Programming And Back To Troubleshooting.





Also tagged with one or more of these keywords: server, trojan, c#, keylogger