Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.24 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <TlHelp32.h>
  3. #include "JunkCode.h"
  4.  
  5. #define DLL_NAME "xxx.dll"
  6.  
  7.  
  8. #define JUNKS \
  9. __asm _emit 0x89 \
  10. __asm _emit 0x06 \
  11. __asm _emit 0x80 \
  12. __asm _emit 0x97 \
  13. __asm _emit 0x12 \
  14. __asm _emit 0x98 \
  15. __asm _emit 0x67 \
  16. __asm _emit 0x64 \
  17. __asm _emit 0x74 \
  18. __asm _emit 0x22 \
  19. __asm _emit 0x96 \
  20. __asm _emit 0x95 \
  21. __asm _emit 0x35 \
  22. __asm _emit 0x60 \
  23. __asm _emit 0x53 \
  24. __asm _emit 0x64 \
  25. __asm _emit 0x77 \
  26. __asm _emit 0x52 \
  27. __asm _emit 0x17 \
  28. __asm _emit 0x12 \
  29. __asm _emit 0x22 \
  30. __asm _emit 0x49 \
  31. __asm _emit 0x90 \
  32. __asm _emit 0x67 \
  33. __asm _emit 0x04 \
  34. __asm _emit 0x26 \
  35. __asm _emit 0x59 \
  36. __asm _emit 0x33 \
  37. __asm _emit 0x10 \
  38. __asm _emit 0x98 \
  39. __asm _emit 0x64 \
  40. __asm _emit 0x96 \
  41. __asm _emit 0x74 \
  42. __asm _emit 0x64 \
  43. __asm _emit 0x55 \
  44. __asm _emit 0x35 \
  45. __asm _emit 0x48 \
  46. __asm _emit 0x47 \
  47. __asm _emit 0x44 \
  48. __asm _emit 0x89 \
  49. __asm _emit 0x97 \
  50. __asm _emit 0x78 \
  51. __asm _emit 0x56 \
  52. __asm _emit 0x50 \
  53. __asm _emit 0x87 \
  54. __asm _emit 0x69 \
  55. __asm _emit 0x88 \
  56. __asm _emit 0x79 \
  57. __asm _emit 0x89 \
  58. __asm _emit 0x23 \
  59. __asm _emit 0x44 \
  60. __asm _emit 0x16 \
  61. __asm _emit 0x18 \
  62. __asm _emit 0x03 \
  63. __asm _emit 0x50 \
  64. __asm _emit 0x76 \
  65. __asm _emit 0x75 \
  66. __asm _emit 0x53 \
  67. __asm _emit 0x73 \
  68. __asm _emit 0x35 \
  69. __asm _emit 0x48 \
  70. __asm _emit 0x78 \
  71. __asm _emit 0x80 \
  72. __asm _emit 0x67 \
  73. __asm _emit 0x30 \
  74. __asm _emit 0x02 \
  75. __asm _emit 0x21 \
  76. __asm _emit 0x07 \
  77. __asm _emit 0x30 \
  78. __asm _emit 0x37 \
  79. __asm _emit 0x82 \
  80. __asm _emit 0x59 \
  81. __asm _emit 0x13 \
  82. __asm _emit 0x88 \
  83. __asm _emit 0x65 \
  84. __asm _emit 0x22 \
  85. __asm _emit 0x37 \
  86. __asm _emit 0x14 \
  87. __asm _emit 0x46 \
  88. __asm _emit 0x72 \
  89. __asm _emit 0x23 \
  90. __asm _emit 0x63 \
  91. __asm _emit 0x91 \
  92. __asm _emit 0x83 \
  93. __asm _emit 0x37 \
  94. __asm _emit 0x51 \
  95. __asm _emit 0x71 \
  96. __asm _emit 0x08 \
  97. __asm _emit 0x30 \
  98. __asm _emit 0x37 \
  99. __asm _emit 0x59 \
  100. __asm _emit 0x22 \
  101. __asm _emit 0x72 \
  102. __asm _emit 0x74 \
  103. __asm _emit 0x06 \
  104. __asm _emit 0x99 \
  105. __asm _emit 0x21 \
  106. __asm _emit 0x85 \
  107. __asm _emit 0x42 \
  108. __asm _emit 0x47 \
  109. __asm _emit 0x75 \
  110. __asm _emit 0x53 \
  111. __asm _emit 0x73 \
  112. __asm _emit 0x35 \
  113. __asm _emit 0x48 \
  114. __asm _emit 0x78 \
  115. __asm _emit 0x80 \
  116. __asm _emit 0x67 \
  117. __asm _emit 0x30 \
  118. __asm _emit 0x02 \
  119. __asm _emit 0x21 \
  120. __asm _emit 0x07 \
  121. __asm _emit 0x30 \
  122. __asm _emit 0x37 \
  123. __asm _emit 0x82 \
  124. __asm _emit 0x59 \
  125. __asm _emit 0x13 \
  126. __asm _emit 0x88 \
  127. __asm _emit 0x65 \
  128.  
  129.  
  130.  
  131. #define _JUNK_BLOCK(s) __asm jmp s JUNKS __asm s:
  132.  
  133.  
  134. DWORD Process(char* ProcessName)
  135. {
  136. _JUNK_BLOCK(jmp_label1)
  137. HANDLE hPID = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
  138.  
  139. _JUNK_BLOCK(jmp_label2)
  140. PROCESSENTRY32 ProcEntry;
  141.  
  142. _JUNK_BLOCK(jmp_label3)
  143. ProcEntry.dwSize = sizeof(ProcEntry);
  144.  
  145. _JUNK_BLOCK(jmp_label4)
  146. do
  147. {
  148. _JUNK_BLOCK(jmp_label5)
  149. if (!strcmp(ProcEntry.szExeFile, ProcessName))
  150. {
  151. _JUNK_BLOCK(jmp_label6)
  152. DWORD dwPID = ProcEntry.th32ProcessID;
  153.  
  154. _JUNK_BLOCK(jmp_label7)
  155. CloseHandle(hPID);
  156.  
  157. _JUNK_BLOCK(jmp_label8)
  158. return dwPID;
  159. }
  160.  
  161. _JUNK_BLOCK(jmp_label9)
  162. }
  163. while (Process32Next(hPID, &ProcEntry));
  164.  
  165. _JUNK_BLOCK(jmp_label10)
  166. }
  167.  
  168. int main()
  169. {
  170. _JUNK_BLOCK(jmp_label11)
  171. DWORD dwProcess;
  172.  
  173. _JUNK_BLOCK(jmp_label12)
  174. char myDLL[MAX_PATH];
  175.  
  176. _JUNK_BLOCK(jmp_label13)
  177. GetFullPathName(DLL_NAME, MAX_PATH, myDLL, 0);
  178.  
  179. _JUNK_BLOCK(jmp_label4)
  180. dwProcess = Process("csgo.exe");
  181.  
  182.  
  183. _JUNK_BLOCK(jmp_label15)
  184. pBut();
  185. yAD();
  186. mop();
  187. LlKk();
  188. AfUh();
  189. HANDLE hProcess = OpenProcess(PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION, FALSE, dwProcess);
  190.  
  191. _JUNK_BLOCK(jmp_label16)
  192. xtXP();
  193. BNxW();
  194. Wchh();
  195. Xze();
  196. DbL();
  197. LPVOID allocatedMem = VirtualAllocEx(hProcess, NULL, sizeof(myDLL), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
  198.  
  199. _JUNK_BLOCK(jmp_label17)
  200. dmfc();
  201. tXm();
  202. dgm();
  203. qmY();
  204. MYa();
  205. WriteProcessMemory(hProcess, allocatedMem, myDLL, sizeof(myDLL), NULL);
  206.  
  207. _JUNK_BLOCK(jmp_label18)
  208. gHo();
  209. iHj();
  210. TNsp();
  211. DHaz();
  212. SieU();
  213. CreateRemoteThread(hProcess, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibrary, allocatedMem, 0, 0);
  214.  
  215. _JUNK_BLOCK(jmp_label19)
  216. CloseHandle(hProcess);
  217.  
  218. _JUNK_BLOCK(jmp_label20)
  219. return 0;
  220. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement