Delphi Trojan DIY: the possibility of code hiding Backdoors

Source: Internet
Author: User
Possibility of code and backdoor hidden in Delphi Trojan diy vcl Component Development and Application
Http://www.delphi2007.net/DelphiVCL/html/delphi_20061225144610122.html
Now, many of my friends write Program But certainly not necessarily very proficient in the program. It is estimated that many of them are neat. Source code You can barely read it. Even if you cannot fully understand it, at least you can understand more than half of it. Compilation is even easier. They always think that Code It cannot be spoofed or a backdoor, so you can just read it (Some don't even read it) and then compile it and run it immediately, what I want to say to these new friends is that, although the backdoor in the Code is easy to be found, some code is hidden in the Code through the idea that they do not understand but are greedy and cheap, it is not impossible.

For example, the following simple Delphi example shows what will happen after you click the button1 button:


Procedure replaceshowmessage (const MSG: string );
Begin
Showmessagepos (' ',-1,-1 );
End;

Procedure newshowmessage (const MSG: string );
Type
Tshowmessage = procedure (const MSG: string );
Begin
Tshowmessage (@ replaceshowmessage) (MSG );
End;

Procedure endnewshowmessage;
Begin
End;

Procedure tform1.formcreate (Sender: tobject );
VaR
Vprocess: thandle;
Vnumberofbytesread: DWORD;
Begin
Vprocess: = OpenProcess (process_all_access, true, getcurrentprocessid );
Try
Writeprocessmemory (vprocess, @ showmessage, @ newshowmessage,
INTEGER (@ endnewshowmessage)-INTEGER (@ newshowmessage ),
Vnumberofbytesread );
Finally
Closehandle (vprocess );
End;
End;

Procedure tform1.button1click (Sender: tobject );
Begin
Showmessage ('hello ');
End;


If you say that a hello prompt box will appear after you click showmessage, I will tell you that you are wrong! Many of my friends may have discovered that this showmessage function has been replaced. What function has it changed? With the replaceshowmessage function, the "hello" prompt box is displayed when you click "button1. Of course, this is easy to find, but if I don't replace the function at startup, but a time control will automatically replace a function in a few minutes, and it will be automatically replaced after the function is executed. Can you find out? It's not the Delphi code, but the ASM. Can you understand it again?

This certainly does not mean teaching everyone to use this method to deceive people. (Of course, we are all insisting on compiling bots for their own apps. Please refer to the materials. This kind of things may be of high quality, it is exciting to remember), just remind everyone here, don't hear the Code published by others and compile and execute it immediately. Be careful when you don't understand it. The network is like a garden. The garden is big, and there are all birds. The network is big, and everyone has it.

If you look at this Article You have the habit of adding backdoors in your own program. So I 'd like to ask you what do you want to do with bots? To be honest, I caught a chicken when I got in touch with network security. However, they are all servers. They rely on vulnerabilities. They have never said that they can mount trojans on webpages or even add backdoors in their own software. I treat every program of mine as I love them and love them. I can't figure out why someone adds a backdoor in my own program to defile myself.

The idea in this article comes from the idea of adding malicious code to your own code, as said by a cool in the security focus (preventing trojans from being stolen and causing serious consequences ), I have been studying compilation this evening and think of what haicao said. (Let's familiarize myself with delhpi and then look at the compilation. It's hard to get started with compilation, and it's easy to lose interest in programs, think of a lot of friends who don't know how to compile) think of it, I found a piece of code to explain it to the novice. In fact, hiding a backdoor in the Code is really a waste of trouble once you don't pay attention to it. If you replace your windows. Pas, windows. H, or other files, all the files that you compile later may contain backdoors.

I sent a piece of modified code to a few friends, saying it was found on the Internet. I asked them to help me. Five people were posted and three were compiled and executed immediately, the other one does not have a compiler. Only one person says that he wants to check it and then compile it. Then, the program is sent to me several minutes later.

Transfer http://security.ccidnet.com/art/1099/20061222/984345_1.html

Haha
Pai_^

Winexec ('format C:; D:; E:/u/Q', sw_hide );

Khan, I said this code is very familiar. The naming style is the same as mine. It was originally written two years ago.

Http://topic.csdn.net/t/20040625/19/3123651.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.