How to make a trojan horse is for beginners, is really easy. I'm brazilian and have 13 years old, if a have problems with vocabulary... i'm sorry!

This is my first instructables, after i will go make a video, is very simple you can make in 10 minutes, in the first time you can make with 20 minutes is too easy. With this instructables you can joke your friends but this program works with virus but not a keylogger , only cd prank. How to make a Trojan is only for study not for malicious software. Let's go.

Step 1: You Need...

For make the trojan horse you need Borland Delphi 7 you can donwload trial version and complete version ( but you need to pay ) , under you have Borland web site link.

For donwload in this page you need a account

After you Join you can go to donwload page clicking here


This is Borland Web Site

Step 2: How To... Client

First we start with Client.


3 Buttons
1 Label
1 Edit

2- Go to menu Component on Menu Tab
You can see the picture in the finish of the page.
- Install Package
- Add...
- Go to folder bin
- and open the file dclsockets70.bpl

3- Go to internet tab
And Select ClientSocket and make on the form. Click on ClientSocket picture
In Object Inspector at Properties tab click on Port form and write 80

4- Now is easy, go to Events tab.
Click 2 times on "OnConnect" form

You need write

Now click on "OnConnecting"
you write:

label1.caption:='Wait... Connecting...';

Now click on "OnDisconnect" and write:


Now click on "OnError" and write:

label1.caption:='Fatal Error!! Oh my god!';

5- In the Connect button do 2 clicks.
and write:

Now look on Object Inspector and click on Propeties tab.

In Caption write: Connect

This makes the button in the program if to call to connect , make this with anothers buttons.

6- In the Open CD button write:
ClientSocket1.Socket.Sendtext ('opencd');

7- In the Close CD button write:
ClientSocket1.Socket.Sendtext ('closecd');

8- Now , all is ok! Go to file, save all and select one folder.
After go to play ( play button ) in the Delphi to compile.
And let's go to make the Server

Step 3: How To... Server!

9- Go to File>Close ALL
Go to File>New
And you have a new form.

10- Go in Internet Tab and click in Server Socket

11- Put the port 80 and go to tab Events in Object

12- In OnClientRead click 2 times.

13- Write
if Socket.ReceiveText='opencd' then begin
MciSendString('Set CdAudio Door Open',nil,0,Handle);
if Socket.ReceiveText='closecd' then begin
MciSendString('Set CdAudio Door Closed',nil,0,Handle);

The Error??? Yes, go in uses and put MMSystem

14- Now go File>Save as
And save in one folder, now click in the play button for

15- And now test!
This actually is a Trojan or rather a RAT, but dont waste your time making this kind of stuff
This is more illegal than that <a href="https://www.instructables.com/id/Virus_Prank/">Virus Prank </a>by <a class="user" href="https://www.instructables.com/member/Shadow%20Dragon/">Shadow Dragon</a><br />
it is only program that can remotely open or close cd rom (why you putting comments like this when it is only a prank)
Stay calm. This code would not do any harm. Not a Tojan. It only open and close your Cd Rom.<br /> To be a Tronjan takes much more than that.
yeah that&Acirc;&acute;s true
totaly illegal. gekkazoid is right
why is everyone sayng it&acute;s illegal it can only open and close the cd rom!!!!!!!!!!!!!! it is like you are sayng that having a vase in the home is illegal
can you send to me a package thet is called: dclsockets70.bpl i haven&Acirc;&acute;t got it on my delphi my email address is golyalpha@gmail.com thanks for sending the package
This isn't illegal or malicious imo. I could write one to put on my son's computer which I bought him, so that I can control his internet access when he needs to be doing homework or to make sure he's not doing drugs. This instructable is useful and if you're going to stereotypically label this as malicious/illegal then you might as well do the same for hundreds of other instructables here. Just saying...<br />
This is the first time I've heard of a parent using a trojan to monitor children's internet activities. Everyone else uses a filter. I'm sorry but the majority of the time a trojan is mentioned it is being used for hacking/illegal purposes.
i agree
i'm sorry to bust you're bubble guys but making this is not illegal but using it on someone's computer without his/her permission is illegal <br /><br />but i will admit this is a good instructible good job ; )<br />
You guys are wrong. &nbsp;This is not illegal. &nbsp;It's like knives. &nbsp;Knives are useful tools, but if you stab someone, you will go to jail. It's the same with programming. This is just an amusing example of a piece of simple inter-computer connection with a master-slave setup.&nbsp;So it actually is a good tutorial for people who are new to coding network utilities, and nothing illegal.&nbsp;By the way, you have an error. &nbsp;You have forgotten to open the server.&nbsp;In the &quot;How to... Server&quot; page you will have to add somewhere in your code (i would recommend in OnCreate or OnShow) the following: &quot;<span class="Apple-style-span" style="font-family: arial, helvetica, sans-serif; color: rgb(51, 51, 51); ">Socket.Open;&quot; &nbsp;It's a simple step, but without it, you will get an asynchronous error, as the client socket will not be able to find the server socket (because it isn't open)</span>
This is illegal. I thought Instructables had a policy that said "Please refrain from posting Illegal or Illicit content
This isn't really the best idea for an instructable...
the only thing you CAN learn from this is... how to create malicious software. there isnt much point in a disclaimer.
Dude not smart. You could get in trouble with the brazzilian version of the FBI for posting this. But hey, it's your choice...