Self-deletion Implementation Program of EXE-type Trojan program

Source: Internet
Author: User

The auto-deletion of a program is no longer a new topic. It is widely used in Trojans and viruses. Think about it. When your program is still running (usually with resident and infected modules completed), it will automatically delete itself from the disk, so that you can be unaware of it, oh, isn't it cool?

The earliest Method of Self-deletion was written by Gary Nebbett, which is too classic. The procedure is as follows:

# Include "windows. h"

Int main (int argc, char * argv [])

{

Char buf [MAX_PATH];

HMODULE module;

Module = GetModuleHandle (0 );

GetModuleFileName (module, buf, MAX_PATH );

CloseHandle (HANDLE) 4 );

_ Asm

{

Lea eax, buf

Push 0

Push 0

Push eax

Push ExitProcess

Push module

Push DeleteFile

Push UnmapViewOfFile

Ret

}

Return 0;

}

Compile it and run it. How is it? It disappears from your eyes, right? Is it amazing?

  • 1
  • 2
  • Next Page
[Content navigation]
Page 1: Self-deletion Implementation Program of EXE Trojan program Page 1: Self-deletion Implementation Program of EXE Trojan program

Related Article

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.