How to write a Trojan Horse

I am going to tell you a very simple exmaple on how to write to write a Torjan Horse. Its is very basic one and is not malicious but you may end up losing unsaved data. It takes less than a minute to create this trojan and does not involve any coding though you can use the basic idea to write your own trojan that actully does something if you want to.

  1. Right click on the desktop screen and click an option under new that says new shortcut. 
  2.  Now write the following command in the space provided.  shutdown -s -t  60 -s “Any message you want to put  between the colons”.
  3. Click next you will get a screen that is shown below. Here enter whatever you would like to name your file and then click finish.
  4. Now to make it more effective click on the Trojan you just made and click properties and click on the change icon option. Here select whatever icon you like that you think would make your Trojan more effective. Here you can write your code and use the same logic to make it look like something else which enable you to run your code.

SO YOU HAVE JUST BUILT YOUR FIRST TROJAN !!!!!!!!!!!!!!!!!!!!!

Advertisements

Cronjob to run perl script

The first thing I would suggest is to see if your Perl script is running fine. Normally what cron does is to email the output of the script or the errors  if any exists to the email address provided.

As  I wanted to run my script daily and already had an email function inside my script I did not use it although for simpler scripts you can use it. You just need to write a line at the top of crontab i.e.

MAILTO=”asdasd@ads.com”;

 

Now the main part i.e. running a Perl Script. Normally they require an environment variable to be set as cron does not execute in the same environment as your script does when you do it manually. There are many things you can do but the best thing that I found out was to add four lines at the top of your script

i.e.

#!/usr/local/bin/perl

BEGIN {

push @INC,(‘etc/perl

/usr/local/lib/perl/5.12.4,

/usr/lib/perl5,

/usr/share/perl5,

/usr/lib/perl/5.12,

/usr/share/perl/5.12’

);

}

 

This is basically telling where your Modules are situated and as cron does not know. You can just copy paste this as most of the time it is the same else just write the path of the folder where your Perl Modules are stored.

Now one thing you should check is try going out of all the folder and run your script giving the whole path and see if it is running or not i.e. ‘$ perl /home/admin/Desktop/1.pl’.

If it runs then you are ready to set up your cron Job else edit the paths that I have given with the ones that are shown in the error message and try again.

Now open a terminal and type ‘crontab –e’. This enables you to edit the crontab file.

Now if you are using UBUNTU you are given an option of using the NANO editor select it its easy and if you are using Fedora then you have to use ‘vi’. Don’t know learn it.

Now start typing the command

‘00 4 * * * perl /home/admin/Desktop/2.pl’

This command will run your perl Script every day at 4 in the morning. The * * * are different combinations of time day week month and year. You can easily lookup that on the internet.

TADA!!!!! Your cron job is ready to run.

http://www.itauthor.com/2010/08/03/gotchas-with-running-a-perl-script-as-a-cron-job/